TWI890495B - Method and system for file recovery based on multiple snapshots - Google Patents
Method and system for file recovery based on multiple snapshotsInfo
- Publication number
- TWI890495B TWI890495B TW113123036A TW113123036A TWI890495B TW I890495 B TWI890495 B TW I890495B TW 113123036 A TW113123036 A TW 113123036A TW 113123036 A TW113123036 A TW 113123036A TW I890495 B TWI890495 B TW I890495B
- Authority
- TW
- Taiwan
- Prior art keywords
- file
- files
- list
- file list
- snapshot
- Prior art date
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本申請實施例涉及數據管理領域,特別涉及一種基於多個快照進行檔案還原的方法及系統。The present application relates to the field of data management, and more particularly to a method and system for file restoration based on multiple snapshots.
勒索軟體(Ransomware)是一種惡意軟體,通常透過加密來破壞受害者的數據,致使用戶無法正常存取自己的檔案。一旦檔案被加密,攻擊者會要求支付一定數量的贖金以解密檔案。這導致受害者承受經濟壓力,即使支付了贖金,也無法保證數據一定能被完全恢復。對於數據安全來說,增強對勒索軟體的防護和應對能力是至關重要的。Ransomware is a type of malware that destroys victims' data, typically by encrypting it, preventing users from accessing their files. Once encrypted, attackers demand a ransom to decrypt the files. This places financial pressure on victims, and even after paying the ransom, there's no guarantee that data will be fully recovered. Strengthening protection against and response to ransomware is crucial for data security.
為對抗勒索軟體的攻擊,備份解決方案已成為企業和政府機構至關重要的最後一道防線。 但是,傳統的備份解決方案並不足以抵禦勒索軟體,因為不知道備份的檔案是否「乾淨」,往往導致需要進行數據還原時,需要更多的時間在過往的多個備份快照中,以人工方式進行檔案內容檢驗。To combat ransomware attacks, backup solutions have become a crucial last line of defense for businesses and government agencies. However, traditional backup solutions are insufficient to combat ransomware because they lack visibility into the integrity of backed-up files. This often leads to time-consuming manual verification of file contents across multiple backup snapshots when data recovery is required.
此外,由於勒索軟體的特殊性,傳統對抗病毒感染的解決方案並不能套用在勒索軟體攻擊的防範上。傳統的防病毒軟體使用病毒定義庫來檢測和隔離已知病毒,並須定期更新病毒定義庫,以便識別新的病毒變種。檔案若被病毒感染後,通常需要對被感染的檔案進行隔離,有時尚可能對被感染的檔案進行清除病毒的動作。但檔案若是被勒索軟體損毀,檔案的內容往往遭受加密演算法的大規模破壞,若無原加密金鑰是無法透過將內容解密來還原。因此檔案若是被勒索軟體損毀,實務上必要透過事先備份,來提高還原被加密的數據的可能性。因此,對抗病毒的解決方案並不能克服勒索軟體的威脅。Furthermore, due to the unique nature of ransomware, traditional solutions for combating virus infections are inapplicable to ransomware attacks. Traditional antivirus software uses virus definition libraries to detect and isolate known viruses, and these libraries must be regularly updated to identify new virus variants. Once a file is infected by a virus, it is typically necessary to isolate the infected file, and sometimes it is possible to remove the virus. However, when files are damaged by ransomware, the encryption algorithm often extensively damages the file contents, making them impossible to decrypt and restore without the original encryption key. Therefore, if files are damaged by ransomware, it is practically necessary to back up the files in advance to increase the likelihood of recovering the encrypted data. Therefore, anti-virus solutions cannot overcome the threat of ransomware.
針對勒索軟體的數據還原方面,習知技術主要分為兩個大類,第一類是從單一個快照進行數據還原,第二類為從多個快照進行數據還原。When it comes to ransomware data recovery, there are two main types of techniques: recovering data from a single snapshot, and recovering data from multiple snapshots.
針對從單一個快照進行數據還原,最直接了當的方式是從距今為止最新的快照進行檔案的還原,另一種方式是透過作業系統觀察並推測被勒索軟體攻擊的時間點(例如,透過檢測檔案存取行為是否異常增加、設置蜜罐(Honey pot)來檢測勒索軟體),並手動或自動選擇被攻擊的時間點之前的其中一個快照來進行檔案的還原。但是,這種方式並無法完全確定用來還原的快照是否乾淨,有可能還原後的數據仍存在被勒索軟體破壞的檔案。用戶還是得花時間對還原完的檔案進行人工檢驗,以確保每個檔案都是被攻擊前的「乾淨」狀態。The most straightforward way to restore data from a single snapshot is to restore files from the most recent snapshot. Another approach is to observe and infer the time of the ransomware attack through the operating system (for example, by detecting an unusual increase in file access behavior or setting up a honeypot to detect ransomware). Then, manually or automatically, restore files from a snapshot before the attack. However, this method cannot completely guarantee that the restored snapshot is clean; the restored data may still contain files damaged by ransomware. Users still need to take the time to manually verify the restored files to ensure that each file is in its "clean" state before the attack.
針對從多個快照進行數據還原,是對多個快照一一進行掛載(Mount)及掃描,以找出每個快照中未被勒索軟體損毀的檔案,再比對這些檔案的修改日期,基於最新的、未被勒索軟體破壞的檔案來作數據還原。但是,這種逐一掛載快照進行掃描的方式,將花費許多時間,無法滿足數據快速還原的要求,尤其企業適逢攻擊時,快速回復檔案更是刻不容緩。Restoring data from multiple snapshots involves mounting and scanning each snapshot one by one to identify files within each snapshot that have not been damaged by the ransomware. The modified dates of these files are then compared, and data recovery is performed based on the most recent files that have not been damaged by the ransomware. However, this method of mounting and scanning each snapshot individually is time-consuming and cannot meet the requirements for rapid data recovery, especially when a business is attacked, where rapid file recovery is crucial.
因此,有必要對現有的檔案還原的方式提出改進與優化。Therefore, it is necessary to improve and optimize the existing file restoration methods.
本申請實施例提供了一種基於多個快照進行檔案還原的方法及系統,能夠提升數據還原的效率。所述技術方案如下:This application embodiment provides a method and system for restoring files based on multiple snapshots, which can improve the efficiency of data restoration. The technical solution is as follows:
根據本申請實施例的一個方面,提供了一種基於多個快照進行檔案還原的方法,其包括:接收儲存於端點設備的多個檔案,將其備份成第一快照及儲存對應該第一快照的第一檔案清單;在備份該第一快照時,檢測每個檔案的檔案格式是否損毀,若有檔案的檔案格式損毀,則在該第一檔案清單中將該檔案標記為可疑檔案;接收儲存於該端點設備的多個檔案,將其備份成第二快照及儲存對應該第二快照的第二檔案清單;在備份該第二快照時,檢測每個檔案的檔案格式是否損毀,若有檔案的檔案格式損毀,則在該第二檔案清單中將該檔案標記為可疑檔案;在從該端點設備接收到還原請求時,讀取該第一檔案清單和該第二檔案清單,將該第二檔案清單中標記為可疑檔案的檔案以該第一檔案清單中對應但未被標記為可疑檔案的檔案取代,以生成一候選檔案清單;以及響應於該還原請求,將該候選檔案清單發送至該端點設備,以基於該候選檔案清單進行檔案還原。According to one aspect of an embodiment of the present application, a method for restoring files based on multiple snapshots is provided, comprising: receiving multiple files stored on an endpoint device, backing them up as a first snapshot, and storing a first file list corresponding to the first snapshot; when backing up the first snapshot, detecting whether the file format of each file is damaged, and if the file format of any file is damaged, marking the file as a suspicious file in the first file list; receiving multiple files stored on the endpoint device, backing them up as a second snapshot, and storing a second file list corresponding to the second snapshot; and when backing up the second snapshot, When taking a snapshot, the system detects whether the file format of each file is damaged. If the file format of a file is damaged, the system marks the file as a suspicious file in the second file list. When a restore request is received from the endpoint device, the system reads the first file list and the second file list, replaces the files marked as suspicious files in the second file list with corresponding files in the first file list that are not marked as suspicious files, so as to generate a candidate file list. In response to the restore request, the system sends the candidate file list to the endpoint device so that the file is restored based on the candidate file list.
本申請實施例中,所述方法更包括:檢測該第二檔案清單中被標記為可疑檔案的檔案是否存在相關聯檔案; 檢測該第一檔案清單中對應的相關聯檔案是否未被標記為可疑檔案;以及將該第二檔案清單中的該相關聯檔案以該第一檔案清單中對應但未被標記為可疑檔案的相關聯檔案取代,以生成該候選檔案清單。In the embodiment of the present application, the method further includes: detecting whether there is an associated file for the file marked as a suspicious file in the second file list; detecting whether the corresponding associated file in the first file list is not marked as a suspicious file; and replacing the associated file in the second file list with the corresponding associated file in the first file list that is not marked as a suspicious file to generate the candidate file list.
本申請實施例中,該相關聯檔案是指基於以下一者或兩者以上的組合的檔案:位於同一資料夾的檔案、相關類型的檔案、存在相依關係的檔案以及在同一時期被修改的檔案。In the embodiment of the present application, the associated files refer to files based on a combination of one or more of the following: files located in the same folder, files of related types, files with a dependent relationship, and files modified at the same time.
本申請實施例中,所述方法更包括:以該候選檔案清單檢測該端點設備,以檢測該端點設備中對應的檔案之檔案格式是否損毀,若否,由該候選檔案清單中優化掉(optimize out)對應之一或多個檔案;以及基於該優化後的候選檔案清單進行檔案還原。In the embodiment of the present application, the method further includes: detecting the endpoint device with the candidate file list to detect whether the file format of the corresponding file in the endpoint device is damaged; if not, optimizing out one or more corresponding files from the candidate file list; and performing file recovery based on the optimized candidate file list.
本申請實施例中,該檔案的檔案格式是否損毀或是否為可疑檔案的檢測是基於以下至少一者:檢測該檔案是否可以以任一軟體應用程式開啟;檢測該檔案是否可以被任一檔案解析器解析;以及檢測該檔案的檔案內容熵值(file content entropy)是否偏高。In the embodiment of the present application, the detection of whether the file format is damaged or whether it is a suspicious file is based on at least one of the following: detecting whether the file can be opened by any software application; detecting whether the file can be parsed by any file parser; and detecting whether the file content entropy value of the file is high.
本申請實施例中,所述方法更包括:根據該候選檔案清單,將快照中的檔案還原到該端點設備。In this application embodiment, the method further includes: restoring the files in the snapshot to the endpoint device based on the candidate file list.
本申請實施例中,所述方法更包括:根據該候選檔案清單,將快照中的檔案還原到該端點設備以外的第二端點設備。In this embodiment of the application, the method further includes: restoring the files in the snapshot to a second endpoint device other than the endpoint device based on the candidate file list.
本申請實施例中,所述方法更包括:若該第二檔案清單中對應的檔案被標記為可疑檔案,接收對應第三快照的第三檔案清單;將該第三檔案清單中未被標記為可疑檔案的檔案合併到該候選檔案清單中,以生成更新的候選檔案清單;以及將該更新的候選檔案清單發送至該端點設備,以響應該更新請求。In this embodiment of the application, the method further includes: if the corresponding file in the second file list is marked as a suspicious file, receiving a third file list corresponding to the third snapshot; merging the files in the third file list that are not marked as suspicious files into the candidate file list to generate an updated candidate file list; and sending the updated candidate file list to the endpoint device in response to the update request.
本申請實施例中,為留存該端點設備之檔案被損毀時的現況,所述方法更包括:若還原時從快照取得的備份檔案將覆蓋該端點設備一或多個檔案,則先將該一或多個檔案複製到其他資料夾。In the embodiment of the present application, in order to preserve the current status of the files of the endpoint device when they are damaged, the method further includes: if the backup file obtained from the snapshot during restoration will overwrite one or more files of the endpoint device, then the one or more files are first copied to another folder.
本申請實施例中,為留存該端點設備之檔案被損毀時的現況,所述方法更包括:將從快照取得的備份檔案放入其它資料夾中,以避免覆蓋該端點設備原有之一或多個檔案。In the embodiment of the present application, in order to preserve the current status of the files of the endpoint device when they are damaged, the method further includes: placing the backup files obtained from the snapshot into other folders to avoid overwriting one or more original files of the endpoint device.
根據本申請實施例的另一個方面,提供了一種基於多個快照進行檔案還原的系統,其包括:一處理器;以及一記憶體,與該處理器連接,該記憶體儲存多個指令,其可由該處理器執行,以執行上述的方法。According to another aspect of an embodiment of the present application, a system for performing file recovery based on multiple snapshots is provided, comprising: a processor; and a memory connected to the processor, the memory storing multiple instructions that can be executed by the processor to perform the above method.
本申請實施例提供的技術方案可以包括如下有益效果:The technical solution provided by the embodiment of this application can include the following beneficial effects:
本申請實施例的基於多個快照進行檔案還原的方法及系統中, 在進行每一次數據備份時,掃描每一個備份檔案,以將被勒索軟體損毀的檔案標示為可疑檔案。例如,在兩次數據備份過程中,生成可能帶有可疑檔案標記的第一檔案清單及可能帶有可疑檔案標記的第二檔案清單。而後,需要進行數據還原時,讀取該第一檔案清單和該第二檔案清單,將該第二檔案清單中標記為可疑檔案的檔案以該第一檔案清單中對應但未被標記為可疑檔案的檔案取代,以生成一候選檔案清單。而後,可以基於所生成的候選檔案清單進行檔案還原。由於,在數據還原之間事先對可疑檔案作了標記,故可以避免將可能被勒索軟體損毀的檔案還原到目標設備上。再者,由於可以快速整理出一份不包括可疑檔案的候選檔案清單進行數據還原,故大大節省了數據還原所需的時間,甚至是所需要花費的人力。In the method and system for restoring files based on multiple snapshots of the present application, each backup file is scanned during each data backup to identify files damaged by ransomware as suspicious. For example, during two data backups, a first list of files potentially marked as suspicious and a second list of files potentially marked as suspicious are generated. Later, when data restoration is required, the first and second lists are read, and files marked as suspicious in the second list are replaced with corresponding files in the first list that are not marked as suspicious, to generate a candidate list of files. File restoration can then be performed based on this generated candidate list of files. Because suspicious files are marked beforehand during data restoration, files that may have been damaged by ransomware can be avoided from being restored to the target device. Furthermore, by quickly compiling a list of candidate files that exclude suspicious files for data restoration, the time and even manpower required for data restoration can be significantly reduced.
以下將結合本申請實施例中的圖式,對本申請實施例中的技術方案進行清楚、完整地描述。 顯然地,所描述的實施例僅是本申請一部分的實施例,而非全部實施例。 基於本申請中的實施例,所屬技術領域具有通常知識者在沒有作出創造性勞動前提下所獲得的所有其他實施例,都屬於本申請保護的範圍。The following, combined with the accompanying drawings, provides a clear and complete description of the technical solutions in the embodiments of this application. Obviously, the described embodiments represent only a portion of the embodiments of this application, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of this application without inventive effort are also within the scope of protection of this application.
本申請實施例提供一種備份解決方案,以防範勒索軟體的攻擊。特別是,在進行每一次備份時,掃描每一個備份檔案內容,將被勒索軟體損毀的檔案標示為可疑檔案。因此,在從多個快照進行數據還原時,可以快速整理出一份不包括可疑檔案的候選檔案清單進行數據還原,大量節省了數據還原所需的時間,提升數據還原的效率。而且,由於知道每個備份檔案是否為可疑檔案,故可有效避免還原後的數據仍存在被勒索軟體加密之檔案的情形。This embodiment of the application provides a backup solution to protect against ransomware attacks. Specifically, during each backup, the contents of each backup file are scanned, and files damaged by ransomware are marked as suspicious. Therefore, when restoring data from multiple snapshots, a list of candidate files that excludes suspicious files can be quickly compiled for restoration, significantly reducing the time required for data restoration and improving data restoration efficiency. Furthermore, since each backup file is known to be suspicious, it is effectively prevented from containing files encrypted by ransomware after restoration.
圖1顯示根據本申請實施例的基於多個快照進行檔案還原的系統10的方塊圖。如圖1所示,該系統10包括一備份模組11、一清單生成模組12及一還原模組13,其中備份模組11 可以進一步包括備份單元110、檢測單元120和標記單元130,清單生成模組12連接於備份模組11和還原模組13之間。FIG1 shows a block diagram of a system 10 for restoring files based on multiple snapshots according to an embodiment of the present application. As shown in FIG1 , the system 10 includes a backup module 11, a checklist generation module 12, and a restore module 13. The backup module 11 may further include a backup unit 110, a detection unit 120, and a marking unit 130. The checklist generation module 12 is connected between the backup module 11 and the restore module 13.
該系統10可以採用在單獨的硬體中運行的軟體或韌體來實現,也可以採用硬體、軟體和韌體任兩者以上的組合來實現。本申請實施例中,備份模組11、清單生成模組12及還原模組13可以為透過程式碼實現的軟體模組。可以使用具有處理器和記憶體的電腦裝置或電腦環境中的伺服器(例如,雲端儲存伺服器)來運行本申請實施例中的系統10,以在數據備份時對被勒索軟體損毀的檔案進行可疑檔案的標示,而後在數據還原時快速排除這些可疑檔案。The system 10 can be implemented using software or firmware running on standalone hardware, or a combination of any two or more of these. In this embodiment of the present application, the backup module 11, the list generation module 12, and the restore module 13 can be software modules implemented via program code. The system 10 in this embodiment of the present application can be run on a computer device with a processor and memory, or on a server in a computer environment (e.g., a cloud storage server). This system can be used to mark files damaged by ransomware as suspicious during data backup, and then quickly exclude these suspicious files during data restoration.
備份模組11用以進行數據備份。具體地,備份模組11的備份單元110可以將來自於端點設備中一或多個檔案備份為該端點設備的快照,並生成對應這些檔案的一份檔案清單。在備份進行的過程中,檢測單元120檢測每個檔案的檔案格式是否損毀(例如,檢測該檔案是否可以以任一軟體應用程式開啟、比對該檔案的前一版本是否可以以任一軟體應用程式開啟、檢測該檔案是否可以被任一檔案解析器解析、比對該檔案的前一版本是否可以被任一檔案解析器解析、檢測該檔案的檔案內容熵值(file content entropy)是否偏高、及比對該檔案的前一版本之檔案熵值是否偏高)。如果一個檔案的檔案格式已損毀,則可能其為被勒索軟體攻擊的檔案,可認為其為可疑檔案。當檢測單元120檢測到一個檔案的檔案格式損毀時,標記單元130在該檔案清單中將該檔案標記為可疑檔案。The backup module 11 is used to perform data backup. Specifically, the backup unit 110 of the backup module 11 can back up one or more files from the endpoint device as a snapshot of the endpoint device and generate a file list corresponding to these files. During the backup process, the detection unit 120 detects whether the file format of each file is damaged (for example, detecting whether the file can be opened with any software application, comparing whether the previous version of the file can be opened with any software application, detecting whether the file can be parsed by any file parser, comparing whether the previous version of the file can be parsed by any file parser, detecting whether the file content entropy value of the file is too high, and comparing whether the file entropy value of the previous version of the file is too high). If the file format of a file is damaged, it may be a file attacked by ransomware and can be considered as a suspicious file. When the detection unit 120 detects that the file format of a file is damaged, the marking unit 130 marks the file as a suspicious file in the file list.
備份模組11在進行每一次數據備份時,都執行上述過程。舉例來說,在第一時間點進行的一個數據備份過程中,備份單元110接收儲存於端點設備的一或多個檔案,將檔案備份成第一快照及儲存對應該第一快照的第一檔案清單;在第二時間點進行的另一個數據備份過程中,備份單元110接收儲存於同一個端點設備的一或多個檔案,將檔案備份成第二快照及儲存對應該第二快照的第二檔案清單。例如,第二時間點晚於第一時間點,也就是,第一快照是一個備份時間較早的快照,第二快照是一個備份時間較晚的快照。在備份單元110備份該第一快照時,檢測單元120檢測每個檔案的檔案格式是否損毀,如果該檔案的檔案格式損毀,則標記單元130在該第一檔案清單中將該檔案標記為可疑檔案;而在備份單元110備份該第二快照時,檢測單元120檢測每個檔案的檔案格式是否損毀,如果該檔案的檔案格式損毀,則標記單元130在該第二檔案清單中將該檔案標記為可疑檔案。當然,數據備份不僅限於上述描述的兩個備份過程,還存在其他更多的備份過程,上述的兩個備份過程僅為示例而已。The backup module 11 executes the above process each time it performs a data backup. For example, during a data backup process performed at a first time point, the backup unit 110 receives one or more files stored on an endpoint device, backs up the files into a first snapshot, and stores a first file list corresponding to the first snapshot. During another data backup process performed at a second time point, the backup unit 110 receives one or more files stored on the same endpoint device, backs up the files into a second snapshot, and stores a second file list corresponding to the second snapshot. For example, the second time point is later than the first time point, meaning that the first snapshot is an earlier backup time and the second snapshot is a later backup time. When backup unit 110 backs up the first snapshot, detection unit 120 detects whether the file format of each file is corrupted. If the file format of the file is corrupted, marking unit 130 marks the file as a suspicious file in the first file list. When backup unit 110 backs up the second snapshot, detection unit 120 detects whether the file format of each file is corrupted. If the file format of the file is corrupted, marking unit 130 marks the file as a suspicious file in the second file list. Of course, data backup is not limited to the two backup processes described above. There are many other backup processes. The above two backup processes are merely examples.
在用戶想要對數據進行還原時,系統10會收到來自用戶的還原請求,清單生成模組12響應該還原請求,從備份模組11接收第一檔案清單和第二檔案清單,並基於該第一檔案清單和該第二檔案清單,生成一候選檔案清單,使得後續的數據還原操作可以基於此候選檔案清單來實現。需注意的是,如果第一檔案清單和/或第二檔案清單包括了可疑檔案的標記,那麼清單生成模組12從備份模組11接收到的檔案清單也會包括此可疑檔案的標記。When a user wishes to restore data, system 10 receives a restore request from the user. In response to the restore request, list generation module 12 receives the first and second file lists from backup module 11. Based on these lists, it generates a candidate file list, allowing subsequent data restore operations to be performed based on this candidate file list. It should be noted that if the first and/or second file lists include suspicious file flags, the file list received by list generation module 12 from backup module 11 will also include these suspicious file flags.
清單生成模組12生成該候選檔案的過程中,將該第二檔案清單中標記為可疑檔案的檔案以該第一檔案清單中對應但未被標記為可疑檔案的檔案取代。也就是,如果發現備份時間較晚的第二快照中存在任一個可能被勒索軟體損毀的可疑檔案,那麼清單生成模組12可以從備份時間靠前的快照(如,第一快照)中尋找一個該檔案未被損毀的版本,並將其記錄到該候選檔案清單中,而在後續數據還原的過程中,以此未被損毀的版本來作還原。而如果清單生成模組12從備份時間靠前的快照找不到一個對應該檔案的未被損毀的版本,那麼清單生成模組12可將該檔案從該候選檔案清單中移除,以避免被勒索軟體損毀的檔案被還原到該端點設備。第二檔案清單中未被標記為可疑檔案的檔案,也即正常檔案,其修改時間或建立時間可能晚於第一檔案清單中對應的檔案,因此將第二檔案清單中的正常檔案記錄到該候選檔案清單中,可使得數據還原時能夠以距當前時間點較近的檔案版本進行還原。When generating the candidate files, list generation module 12 replaces the files marked as suspicious in the second file list with the corresponding files in the first file list that are not marked as suspicious. In other words, if a suspicious file that may have been corrupted by ransomware is found in the second snapshot (backed up later), list generation module 12 can search for an uncorrupted version of the file in an earlier snapshot (e.g., the first snapshot) and record it in the candidate file list. This uncorrupted version can then be used for restoration during subsequent data recovery. If the list generation module 12 cannot find an undamaged version of the file from the snapshot with an earlier backup time, the list generation module 12 can remove the file from the candidate file list to prevent files damaged by ransomware from being restored to the endpoint device. Files in the second file list that are not marked as suspicious files, i.e., normal files, may have modification or creation times later than the corresponding files in the first file list. Therefore, recording the normal files in the second file list in the candidate file list allows data to be restored using file versions that are more recent than the current time point.
如前所述,系統10包括還原模組13,其用以依據該候選檔案清單,對該候選檔案清單所記錄的候選檔案進行還原。例如,還原模組13可以將候選檔案還原到端點設備上,該端點設備可以是一個雲端儲存器,也可以是一個本地端儲存器。還原模組13可以幫助端點設備依據該候選檔案清單從多個快照中取回要還原的檔案,並將這些檔案傳送給該端點設備。在其他實施例中,還原模組13也可以根據該候選檔案清單,將快照中的檔案還原到該端點設備以外的第二端點設備。As previously described, system 10 includes a restore module 13, which is configured to restore candidate files recorded in the candidate file list based on the candidate file list. For example, restore module 13 can restore the candidate files to an endpoint device, which can be a cloud storage device or a local storage device. Restoration module 13 can also help the endpoint device retrieve files to be restored from multiple snapshots based on the candidate file list and transfer these files to the endpoint device. In other embodiments, restoration module 13 can also restore files in a snapshot to a second endpoint device other than the endpoint device based on the candidate file list.
當然,系統10也可以不設置還原模組13,在響應端點設備的還原請求時,僅將該候選檔案清單發送給該端點設備。端點設備可以對該候選檔案清單記錄的要被還原的候選檔案一一作確認,必要時修改或調整要被還原的候選檔案,以基於確認後的候選檔案進行檔案還原。Of course, the system 10 may also not include the restore module 13. In response to a restore request from an endpoint device, the system 10 may simply send the candidate file list to the endpoint device. The endpoint device may then confirm each candidate file to be restored as recorded in the candidate file list, modify or adjust the candidate files to be restored if necessary, and then perform file restoration based on the confirmed candidate files.
以上對系統10的描述僅為本申請一部分的實施例,本申請實施例不僅限於此。下文介紹的實施例及配合流程圖所描述的實施例仍應視為適用於系統10中操作的實施例。The above description of system 10 is only a part of the embodiment of this application, and the embodiments of this application are not limited thereto. The embodiments described below and the embodiments described in the accompanying flowchart should still be considered as embodiments applicable to the operation of system 10.
圖2顯示根據本申請實施例的基於多個快照進行檔案還原的方法的流程圖。圖2所揭示的檔案還原方法可配合圖1的系統10來實現。FIG2 is a flowchart illustrating a method for restoring a file based on multiple snapshots according to an embodiment of the present application. The file restoration method disclosed in FIG2 can be implemented in conjunction with the system 10 of FIG1 .
如圖2中的步驟S20~S23所示,備份模組11在進行每一次數據備份時,都會進行生成對應一個快照的檔案清單、檢測備份檔案是否為被勒索軟體損毀的可疑檔案、以及在該檔案清單中標記可疑檔案的操作。As shown in steps S20 to S23 in FIG. 2 , the backup module 11 generates a file list corresponding to a snapshot each time a data backup is performed, detects whether the backup file is a suspicious file damaged by ransomware, and marks the suspicious file in the file list.
以兩個數據備份過程(數據備份還存在其他更多的備份過程,而不僅限於此)來說,請一併配合圖3,參閱圖2,在一次時間較早的數據備份過程中,備份單元110接收儲存於端點設備的多個檔案,將其備份成第一快照S1及儲存對應該第一快照S1的第一檔案清單(步驟S20)。如圖3所示,該第一檔案清單記錄了檔案F11、F12、F13、F14。在備份單元110備份該第一快照S1時,檢測單元120檢測每個檔案的檔案格式是否損毀,如果該檔案的檔案格式損毀,則標記單元130在該第一檔案清單中將該檔案標記為可疑檔案(步驟S21)。如圖3所示,在此例中,檔案F11、F12、F13、F14皆為正常檔案,而不為可疑檔案。在一次時間較晚的數據備份過程中,備份單元110接收儲存於同一個端點設備的多個檔案,將其備份成第二快照S2及儲存對應該第二快照S2的第二檔案清單(步驟S22)。如圖3所示,該第二檔案清單記錄了檔案F21、F22、F23、F24。在備份單元110備份該第二快照S2時,檢測單元120檢測每個檔案的檔案格式是否損毀,如果該檔案的檔案格式損毀,則標記單元130在該第二檔案清單中將該檔案標記為可疑檔案(步驟S23)。如圖3所示,在此例中,檔案F22為可疑檔案,F21、F23、F24皆為正常檔案,而不是可疑檔案。Consider two data backup processes (there are many other data backup processes, not just these). Please refer to Figure 2 in conjunction with Figure 3. In an earlier data backup process, backup unit 110 receives multiple files stored on an endpoint device, backs them up as a first snapshot S1, and stores a first file list corresponding to the first snapshot S1 (step S20). As shown in Figure 3, the first file list records files F11, F12, F13, and F14. When backup unit 110 backs up the first snapshot S1, detection unit 120 checks the file format of each file for corruption. If the file format is corrupted, marking unit 130 marks the file as suspicious in the first file list (step S21). As shown in Figure 3, in this example, files F11, F12, F13, and F14 are all normal files, not suspicious files. During a later data backup process, backup unit 110 receives multiple files stored on the same endpoint device, backs them up as a second snapshot S2, and stores a second file list corresponding to this second snapshot S2 (step S22). As shown in Figure 3, this second file list records files F21, F22, F23, and F24. When backup unit 110 backs up the second snapshot S2, detection unit 120 checks whether the file format of each file is corrupted. If the file format is corrupted, marking unit 130 marks the file as a suspicious file in the second file list (step S23). As shown in Figure 3, in this example, file F22 is a suspicious file, while files F21, F23, and F24 are all normal files, not suspicious files.
需注意的是,一個檔案的檔案格式是否損毀可以通過檢測該檔案是否可以以任一對應的軟體應用程式開啟,或該檔案是否可以被任一檔案解析器解析、或檢測該檔案的檔案內容熵值(file content entropy)是否偏高作判斷,或組合上述方式或其它檢測方式。惟,檢測檔案是否損毀的方式,非本發明之重點,僅列出幾項實施例作說明之用,本申請不侷限於此。如果該檔案的檔案格式已損毀,則可認為其可能是被勒索軟體攻擊的檔案,故將其標示為可疑檔案。It should be noted that whether a file's file format is corrupted can be determined by testing whether the file can be opened with any corresponding software application, whether the file can be parsed by any file parser, or by testing whether the file's file content entropy is high, or by a combination of these or other testing methods. However, the method for detecting whether a file is corrupted is not the focus of this invention and is merely a few examples listed for illustrative purposes. This application is not limited thereto. If the file format is corrupted, it can be considered a file that may have been attacked by ransomware and is therefore marked as a suspicious file.
本申請實施例中,在進行每一次數據備份時,掃描每一個備份檔案,以將被勒索軟體損毀的檔案標示為可疑檔案。即便在數據備份時,會比傳統備份動作多花了一點時間來進行可疑檔案的標記,但是這有助於在後續的數據還原過程中,快速地避免將可能被勒索軟體損毀的檔案還原到目標設備上,節省關鍵時刻須等待數據還原的時間。在有些場景下,數據還原存在急迫性,能夠縮短數據還原時間是一大幫助。多花費的備份時間通常在背景下執行,由於用戶在平時對數據備份上的時間要求遠低於被攻擊時對數據還原的時間要求,因此符合普遍的使用情境。In this embodiment, each backup file is scanned during each data backup to mark files damaged by ransomware as suspicious. Although marking suspicious files takes a little longer than traditional backups, it helps to quickly avoid restoring files that may have been damaged by ransomware to the target device during the subsequent data recovery process, saving time waiting for data recovery at critical moments. In some scenarios, data recovery is urgent, and being able to shorten data recovery time is a significant benefit. The extra backup time is usually performed in the background. Since the time users need to back up data in normal times is much less than the time required to restore data in the event of an attack, it is consistent with common usage scenarios.
當系統10從端點設備接收到還原請求(步驟S24)時,表示用戶想要進行數據還原,此時清單生成模組12讀取對應第一快照S1的第一檔案清單和對應第二快照S2的第二檔案清單(步驟S25),並基於該第一檔案清單和該第二檔案清單,生成一候選檔案清單30。針對第二檔案清單中存在的一個被標記為可疑檔案的檔案,清單生成模組12會判斷該檔案在第一檔案清單中是否未被標記為可疑檔案(假如該檔案也存在於第一檔案清單中的話)(步驟S26),如果是,則清單生成模組12將該第二檔案清單中標記為可疑檔案的檔案以該第一檔案清單中對應但未被標記為可疑檔案的檔案取代(步驟S27),據此規則來生成候選檔案清單30(步驟S28)。為更清楚說明本發明之步驟,可以圖3為例,第二快照S2中檔案F22被標記為可疑檔案,而第一快照S1中對應的檔案F12未被標記為可疑檔案,因此第二快照S2的可疑檔案F22將會被第一快照S1的正常檔案F12取代,並記錄在候選檔案清單30中。也就是,如果發現備份時間較晚的第二快照S2中存在一個可能被勒索軟體損毀的可疑檔案(如,檔案F22),那麼清單生成模組12可以從備份時間靠前的快照(如,第一快照S1)中尋找一個該檔案未被損毀的版本(如,檔案F12),並將其記錄到該候選檔案清單30中。When the system 10 receives a restore request from the endpoint device (step S24), indicating that the user wishes to restore data, the list generation module 12 reads the first file list corresponding to the first snapshot S1 and the second file list corresponding to the second snapshot S2 (step S25) and generates a candidate file list 30 based on the first and second file lists. For a file in the second file list that is marked as a suspicious file, the list generation module 12 determines whether the file is not marked as a suspicious file in the first file list (if the file also exists in the first file list) (step S26). If so, the list generation module 12 replaces the file marked as a suspicious file in the second file list with the corresponding file in the first file list that is not marked as a suspicious file (step S27). Based on this rule, the candidate file list 30 is generated (step S28). To more clearly illustrate the steps of the present invention, let's take Figure 3 as an example. In the second snapshot S2, file F22 is marked as a suspicious file, while the corresponding file F12 in the first snapshot S1 is not. Therefore, the suspicious file F22 in the second snapshot S2 will be replaced by the normal file F12 in the first snapshot S1 and recorded in the candidate file list 30. In other words, if a suspicious file (e.g., file F22) that may be corrupted by ransomware is found in the second snapshot S2, which was backed up later, the list generation module 12 can search for an uncorrupted version of the file (e.g., file F12) in an earlier snapshot (e.g., the first snapshot S1) and record it in the candidate file list 30.
步驟S29中,清單生成模組12生成的候選檔案清單30將被提供或發送給端點設備,以響應該還原請求,使得該端點設備可以基於候選檔案清單30來進行檔案還原。具體地,端點設備依據候選檔案清單30記錄的候選檔案,從各個快照(如,第一快照S1和第二快照S2)的實際儲存空間中取回要被還原的檔案,以完成數據還原。必要時,端點設備可以基於候選檔案清單30修改或調整要被還原的候選檔案來作數據還原。In step S29, the candidate file list 30 generated by the list generation module 12 is provided or sent to the endpoint device in response to the restore request, allowing the endpoint device to perform file restoration based on the candidate file list 30. Specifically, the endpoint device retrieves the files to be restored from the actual storage space of each snapshot (e.g., the first snapshot S1 and the second snapshot S2) based on the candidate files recorded in the candidate file list 30 to complete the data restoration. If necessary, the endpoint device can modify or adjust the candidate files to be restored based on the candidate file list 30 to perform data restoration.
為更清楚說明本發明之步驟,可以圖4為例。來源儲存區40附接(attached)於一端點設備上,快照S0為來源儲存區40的一個完整備份,第一快照S1和第二快照S2為分別在第一時間點和第二時間點進行的備份,其儲存包含(但不限於)該完整備份在第一時間點及第二時間點時被修改或新增的檔案。快照S0、S1、S3的實際儲存空間可不同於來源儲存區40。接續上述的例子,第二快照S2中檔案F22被標記為可疑檔案,故候選檔案清單30記錄了第二快照S2的檔案F21、F23、F24以及第一快照S1的檔案F12。來源儲存區40中檔案F01、F02、F03、F04皆為被勒索軟體損毀的檔案,故皆為有還原需求的檔案。候選檔案清單30記錄的檔案皆為「乾淨」(即非損毀)的檔案,故可以依據候選檔案清單30記錄的檔案,從對應的快照中取回相關檔案,來對來源儲存區40被損毀的檔案進行還原。To more clearly illustrate the steps of the present invention, let's use Figure 4 as an example. A source storage area 40 is attached to an endpoint device. Snapshot S0 is a full backup of source storage area 40. First snapshot S1 and second snapshot S2 are backups taken at a first and second time points, respectively, storing, including but not limited to, files modified or newly added to the full backup between the first and second time points. The actual storage space of snapshots S0, S1, and S3 may differ from that of source storage area 40. Continuing with the above example, file F22 in second snapshot S2 is marked as suspicious, so candidate file list 30 records files F21, F23, and F24 from the second snapshot S2 and file F12 from the first snapshot S1. Files F01, F02, F03, and F04 in source storage 40 were all damaged by ransomware and therefore require recovery. The files in candidate file list 30 are all "clean" (i.e., not damaged). Therefore, the damaged files in source storage 40 can be restored by retrieving the relevant files from the corresponding snapshots based on the files in candidate file list 30.
在其他實施例中,上述方法還可包括根據該候選檔案清單30,將快照(如,第一快照S1和第二快照S2)中的檔案還原到端點設備的步驟。具體地,還原模組13可以幫助端點設備依據該候選檔案清單30從多個快照中取回要還原的檔案,並將這些檔案傳送給該端點設備。如此,可達到數據快速恢復或自動恢復的效果。在其他實施例中,上述方法還可包括根據該候選檔案清單30,將快照(如,第一快照S1和第二快照S2)中的檔案還原到該端點設備以外的第二端點設備。具體地,還原模組13可以根據該候選檔案清單30,將快照中的檔案還原到該端點設備以外的第二端點設備。如此,可達到異地還原的效果。異地還原常發生於端點設備在被勒索攻擊後,須先進行資安鑑識(forensics)而不能立即上線運行的情境。In other embodiments, the method may further include restoring files from snapshots (e.g., the first snapshot S1 and the second snapshot S2) to an endpoint device based on the candidate file list 30. Specifically, the restore module 13 may assist the endpoint device in retrieving files to be restored from multiple snapshots based on the candidate file list 30 and transferring these files to the endpoint device. This allows for rapid or automatic data recovery. In other embodiments, the method may further include restoring files from snapshots (e.g., the first snapshot S1 and the second snapshot S2) to a second endpoint device other than the endpoint device based on the candidate file list 30. Specifically, the restore module 13 may restore files from snapshots to a second endpoint device other than the endpoint device based on the candidate file list 30. This allows for remote recovery. Remote recovery often occurs when an endpoint device is attacked by ransomware and needs to undergo forensics before it can be immediately put back online.
在其他實施例中,還原模組13在進行數據還原的過程中,如果從快照取得的備份檔案將覆蓋已被損毀的檔案,則可以將已被損毀的檔案先複製到其他資料夾。例如,該已被損毀的檔案可被複製到一個隔離區中,使該已被損毀的檔案之存取受到限制,為留存該端點設備之檔案被損毀時的現況。另外,將該已被損毀的檔案複製一份到其它資料夾也達到了對其作留存的效果,避免該檔案被誤判為已被損毀而導致數據丟失的情形。在其他實施例中,還原模組13可以將從快照取得的備份檔案放入與已被損毀檔案不同的資料夾中。這樣,可以在覆寫包括已被損毀的檔案的原始資料夾之前,提前檢視檔案還原後的效果是否為所期待的結果。In other embodiments, during the data restoration process, if the backup file obtained from the snapshot will overwrite a damaged file, the restore module 13 can first copy the damaged file to another folder. For example, the damaged file can be copied to a quarantine area to restrict access to the damaged file, preserving the current state of the file on the endpoint device at the time of the file damage. Additionally, copying the damaged file to another folder also achieves the effect of preserving it, preventing the file from being mistakenly identified as damaged and causing data loss. In other embodiments, the restore module 13 may place the backup file obtained from the snapshot into a folder different from the damaged file. In this way, before overwriting the original folder containing the damaged file, it is possible to check in advance whether the effect of the file restoration is the expected result.
本申請實施例的基於多個快照進行檔案還原的方法及系統中, 在進行每一次數據備份時,掃描每一個備份檔案,以將被勒索軟體損毀的檔案標示為可疑檔案。例如,在兩次數據備份過程中,生成可能帶有可疑檔案標記的第一檔案清單及可能帶有可疑檔案標記的第二檔案清單。而後,需要進行數據還原時,讀取該第一檔案清單和該第二檔案清單,將該第二檔案清單中標記為可疑檔案的檔案以該第一檔案清單中對應但未被標記為可疑檔案的檔案取代,以生成一候選檔案清單。而後,可以基於所生成的候選檔案清單進行檔案還原。由於,在數據還原之間事先對可疑檔案作了標記,故可以避免將可能被勒索軟體損毀的檔案還原到目標設備上。再者,由於可以快速整理出一份不包括可疑檔案的候選檔案清單進行數據還原,故大大節省了數據還原所需的時間,甚至是所需要花費的人力。In the method and system for restoring files based on multiple snapshots of the present application, each backup file is scanned during each data backup to identify files damaged by ransomware as suspicious. For example, during two data backups, a first list of files potentially marked as suspicious and a second list of files potentially marked as suspicious are generated. Later, when data restoration is required, the first and second lists are read, and files marked as suspicious in the second list are replaced with corresponding files in the first list that are not marked as suspicious, to generate a candidate list of files. File restoration can then be performed based on this generated candidate list of files. Because suspicious files are marked beforehand during data restoration, files that may have been damaged by ransomware can be avoided from being restored to the target device. Furthermore, by quickly compiling a list of candidate files that exclude suspicious files for data restoration, the time and even manpower required for data restoration can be significantly reduced.
圖5顯示根據本申請實施例的生成候選檔案清單的方法的流程圖。在生成候選檔案清單的過程中,除了可以將第二檔案清單中的可疑檔案以第一檔案清單中正常檔案來一一取代之外,也可以將第二檔案清單中與可疑檔案相關聯的所有檔案視為一個群組,以該群組為基礎來尋找第一檔案清單中對應的未被損毀的群組來進行取代。因此,所述方法可以進一步包括檢測第二檔案清單中被標記為可疑檔案的檔案是否存在相關聯檔案(步驟S50),檢測第一檔案清單中對應的相關聯檔案是否未被標記為可疑檔案(步驟S51)。在第二檔案清單中的可疑檔案存在與其相關聯的檔案且第一檔案清單中也存在對應該相關聯檔案的未被損毀的版本時,可以將第二檔案清單中相關聯檔案以第一檔案清單中對應但未被標記為可疑檔案的相關聯檔案取代,以生成候選檔案清單(步驟S52)。FIG5 is a flowchart of a method for generating a candidate file list according to an embodiment of the present application. During the process of generating the candidate file list, in addition to replacing suspicious files in the second file list with normal files in the first file list, all files associated with the suspicious files in the second file list can also be grouped together, and the corresponding undamaged files in the first file list can be found based on this group to replace the files. Therefore, the method can further include detecting whether a file marked as suspicious in the second file list has any associated files (step S50), and detecting whether the corresponding associated files in the first file list are not marked as suspicious (step S51). When a suspicious file in the second file list has a file associated with it and an undamaged version of the associated file exists in the first file list, the associated file in the second file list can be replaced with the corresponding associated file in the first file list that is not marked as a suspicious file to generate a candidate file list (step S52).
舉例來說,請參閱圖6,第二快照S2中存在可疑檔案F22,且檔案F23為與該可疑檔案F22相關聯的檔案。第二快照S2中的檔案F22和F23可視為一個群組,其對應於第一快照S1中的檔案F12和F13,且檔案F12和F13皆為正常檔案,故可以將第一快照S1中的檔案F12和F13取代第二快照S2中的檔案F22和F23。For example, referring to Figure 6, the second snapshot S2 contains a suspicious file F22, and file F23 is associated with this suspicious file. Files F22 and F23 in the second snapshot S2 can be considered a group, corresponding to files F12 and F13 in the first snapshot S1. Since both files F12 and F13 are normal files, files F12 and F13 in the first snapshot S1 can be replaced with files F22 and F23 in the second snapshot S2.
上述相關聯檔案可以是位於同一資料夾的檔案、相關類型的檔案、相依關係的檔案或在同一時期被修改的檔案,或上述兩者或兩者以上的組合。舉例來說,勒索軟體可能攻擊屬於同一軟體的檔案或系統檔,被勒索軟體損毀的檔案之間可能存在相關或相依關係,而不同快照可能儲存狀態不相容的檔案,因此有時須還原同一快照下儲存的檔案才可確保軟體或系統正常運行。例如,在各式資料庫系統,像MySQL、PostgreSQL或Oracle這樣的資料庫系統中,資料檔案、交易日誌和設定檔案密切相關。僅備份或還原其中一部分而不包括其他部分可能導致不一致或資料遺失。版本控制系統 (Version Control Systems)同樣也有些需求,如Git或Subversion管理包含程式碼、設定檔案和專案歷史記錄的儲存庫。為確保一致性,備份或還原應該包括整個儲存庫,包括元數據和分支的相關檔案。其它如虛擬機,亦有相同需求, 虛擬機器映像包括磁碟檔案、快照和設定檔案。僅備份或還原磁碟映像而不包括相關的設定檔案或快照可能導致在還原虛擬機器到一致狀態時遇到困難。These related files can be files located in the same folder, files of related types, files with dependencies, files modified during the same period, or a combination of two or more of the above. For example, ransomware may attack files belonging to the same software or system files. The files damaged by the ransomware may be related or dependent on each other, and different snapshots may store files in incompatible states. Therefore, it is sometimes necessary to restore files stored in the same snapshot to ensure normal operation of the software or system. For example, in various database systems such as MySQL, PostgreSQL, or Oracle, data files, transaction logs, and configuration files are closely related. Backing up or restoring only part of them without including others may lead to inconsistencies or data loss. Version control systems (VCSs), such as Git or Subversion, also have certain requirements. They manage repositories containing code, configuration files, and project history. To ensure consistency, backups or restores should include the entire repository, including metadata and branch-related files. Other systems, such as virtual machines, have similar requirements. A virtual machine image consists of disk files, snapshots, and configuration files. Backing up or restoring only the disk image without including the associated configuration files or snapshots can lead to difficulties in restoring the virtual machine to a consistent state.
另外,勒索軟體可能攻擊位於同一專案資料夾或相同類型的檔案,將位於同一資料夾或相同類型的檔案一起作還原,可以協助還原商務或辨公作業後的一致性。另外,當被勒索軟體攻擊時,勒索軟體可能在同期間大量修改了檔案,因此在同一時期被修改的檔案可視為關聯檔案,一起記錄到候選檔案清單中進行還原,可提供檔案彼此之間的一致性。Additionally, ransomware may target files located in the same project folder or of the same type. Restoring these files together can help maintain consistency after restoring business or public services. Furthermore, when attacked by ransomware, it may have modified a large number of files during the same period. Therefore, files modified during the same period can be considered related and recorded together in the candidate file list for restoration, ensuring consistency between files.
圖7顯示根據本申請實施例的優化(locally optimized)候選檔案清單的方法的流程圖。要被還原的目標設備可能並非所有檔案都被勒索軟體損毀,且這些未被損毀的檔案相對於快照中儲存的檔案可能是較新的版本,不需要進行還原。因此,所述方法可以進一步包括以步驟S28生成的候選檔案清單檢測端點設備,以檢測該端點設備中對應的檔案之檔案格式是否損毀,若否,由該候選檔案清單中優化掉(optimize out)對應之一或多個檔案(步驟S70)。具體地,可以針對本地端,對候選檔案清單進行優化,以從該候選檔案清單中移除一或多個檔案,其中該一或多個檔案在「本地(local)」端點設備(即,目標設備)中被確定為不可疑的檔案。在對候選檔案清單依據本地端進行優化以得出優化後的候選檔案清單之後,可以基於該優化後的候選檔案清單進行檔案還原(步驟S71)。依據優化後的候選檔案清單來作數據還原,可以大大減少需從各個快照取回的檔案數量,同時盡可能保存較新版本的檔案,進一步提升數據還原的效率。FIG7 is a flowchart of a method for locally optimizing a candidate file list according to an embodiment of the present application. The target device to be restored may not have all files damaged by the ransomware, and these undamaged files may be newer versions than those stored in the snapshot and therefore do not need to be restored. Therefore, the method may further include testing an endpoint device with the candidate file list generated in step S28 to detect whether the file format of corresponding files on the endpoint device is damaged. If not, optimizing one or more corresponding files from the candidate file list (step S70). Specifically, the candidate file list can be optimized locally to remove one or more files from the candidate file list, where these one or more files are determined to be non-suspicious files on the "local" endpoint device (i.e., the target device). After the candidate file list is optimized locally to produce an optimized candidate file list, file restoration can be performed based on the optimized candidate file list (step S71). Restoring data based on the optimized candidate file list can significantly reduce the number of files that need to be retrieved from each snapshot, while preserving newer versions of files as much as possible, further improving data restoration efficiency.
舉例來說,請參閱圖8,目標設備的來源儲存區40中檔案F02、F03、F04為被勒索軟體損毀的檔案。接續前一例子,還原會分別從第一快照S1的檔案F12、第二快照S2的檔案F21、F23、F24來完成候選檔案清單。但由於來源儲存區40中檔案F01為未被損毀的正常檔案,且相較於快照中對應的檔案(如,第二快照S2的檔案F21)是較新或至少是相同的版本,故無需進行還原,可以依此對候選檔案清單依據本地端進行優化,即由候選檔案清單中剔除檔案F01在快照S2中對應的檔案F21。For example, see Figure 8. Files F02, F03, and F04 in the target device's source storage area 40 were damaged by ransomware. Continuing with the previous example, restoration would complete the candidate file list from file F12 in the first snapshot S1 and files F21, F23, and F24 in the second snapshot S2, respectively. However, since file F01 in source storage area 40 is a normal, undamaged file and is newer or at least the same version as the corresponding file in the snapshot (e.g., file F21 in the second snapshot S2), restoration is unnecessary. The candidate file list can be optimized locally based on this, removing file F21, which corresponds to file F01 in snapshot S2, from the candidate file list.
圖9顯示根據本申請實施例的更新候選檔案清單的方法的流程圖。要被還原的目標設備中被勒索軟體損毀的檔案在候選檔案清單中可能找不到對應的、未被損毀的檔案,此時可再引入一或多個備份時間較早的快照之檔案清單,並基於所引入的快照來更新該候選檔案清單,以便能夠從備份時間較早的快照中找到可供還原的檔案。因此,所述方法可以進一步包括若該第二檔案清單中對應的檔案被標記為可疑檔案,接收對應第三快照的第三檔案清單(步驟S91)。該第三檔案清單中未被標記為可疑檔案的檔案可以合併到該候選檔案清單中,以生成更新的候選檔案清單(步驟S92)。具體地,如果某一個檔案在第一檔案清單和第二檔案清單中皆被標示為可疑檔案,則可以從第三檔案清單中尋找該檔案未被損毀的版本,來進行檔案還原。最後,為響應該更新請求,將該更新的候選檔案清單發送至端點設備(即,目標設備)(步驟S93),使得可以基於此更新後的候選檔案清單來進行數據還原。依據更新後的候選檔案清單來作數據還原,可以從備份時間較早的快照中找出可供還原的檔案,大大提高數據還原的成功率。請注意,基於本實施例,可以很容易可延伸至更多更早之前的快照,以盡可能從所有可用的快照中取得最新而乾淨的檔案來生成候選檔案清單,應不視為本發明之限制。FIG9 shows a flowchart of a method for updating a candidate file list according to an embodiment of the present application. Files damaged by ransomware on a target device to be restored may not have corresponding, undamaged files in the candidate file list. In this case, a file list from one or more snapshots with earlier backup times may be imported and, based on the imported snapshots, the candidate file list may be updated to allow files available for restoration to be found from the earlier snapshots. Therefore, the method may further include receiving a third file list corresponding to a third snapshot if the corresponding file in the second file list is marked as suspicious (step S91). Files in the third file list that are not marked as suspicious may be merged into the candidate file list to generate an updated candidate file list (step S92). Specifically, if a file is marked as suspicious in both the first and second file lists, an undamaged version of the file can be searched for in the third file list for file restoration. Finally, in response to the update request, the updated candidate file list is sent to the endpoint device (i.e., the target device) (step S93), allowing data restoration based on this updated candidate file list. Restoring data based on the updated candidate file list allows files available for restoration to be found from snapshots with earlier backup times, significantly improving the success rate of data restoration. Please note that this embodiment can easily be extended to include more and earlier snapshots, so as to obtain the most recent and clean files from all available snapshots to generate the candidate file list, and this should not be considered a limitation of the present invention.
雖然本揭示已用較佳實施例揭露如上,然其並非用以限定本揭示,本揭示所屬技術領域中具有通常知識者在不脫離本揭示之精神和範圍內,當可作各種之更動與潤飾,因此本揭示之保護範圍當視後附之申請專利範圍所界定者為準。Although the present disclosure has been disclosed above using preferred embodiments, they are not intended to limit the present disclosure. Persons skilled in the art to which the present disclosure belongs may make various changes and modifications without departing from the spirit and scope of the present disclosure. Therefore, the scope of protection of the present disclosure shall be determined by the scope of the attached patent application.
10:基於多個快照進行檔案還原的系統 11:備份模組 12:清單生成模組 13:還原模組 30:候選檔案清單 40:來源儲存區 110:備份單元 120:檢測單元 130:標記單元 F01~F04:檔案 F11~F14:檔案 F21~F24:檔案 S0:快照 S1:第一快照 S2:第二快照 S20~S29:步驟 S50~S52:步驟 S70~S71:步驟 S91~S93:步驟10: System for restoring files based on multiple snapshots 11: Backup module 12: List generation module 13: Restoration module 30: Candidate file list 40: Source storage area 110: Backup unit 120: Detection unit 130: Marking unit F01-F04: Files F11-F14: Files F21-F24: Files S0: Snapshot S1: First snapshot S2: Second snapshot S20-S29: Steps S50-S52: Steps S70-S71: Steps S91-S93: Steps
為了更清楚地說明本申請實施例中的技術方案,下面將對實施例描述中所需要使用的圖式作簡單地介紹,顯而易見地,下面描述中的圖式僅僅是本申請的一些實施例,對於所屬技術領域具有通常知識者來講,在不付出創造性勞動的前提下,還可以根據這些圖式獲得其他的圖式。 [圖1]顯示根據本申請實施例的基於多個快照進行檔案還原的系統的方塊圖。 [圖2]顯示根據本申請實施例的基於多個快照進行檔案還原的方法的流程圖。 [圖3]顯示根據本申請實施例的一種候選檔案清單的生成過程的示意圖。 [圖4]顯示根據本申請實施例的一種數據還原過程的示意圖。 [圖5]顯示根據本申請實施例的生成候選檔案清單的方法的流程圖。 [圖6]顯示根據本申請實施例的另一種候選檔案清單的生成過程的示意圖。 [圖7]顯示根據本申請實施例的優化候選檔案清單的方法的流程圖。 [圖8]顯示根據本申請實施例的候選檔案清單的優化過程的示意圖。 [圖9]顯示根據本申請實施例的更新候選檔案清單的方法的流程圖。 To more clearly illustrate the technical solutions in the embodiments of this application, the following briefly introduces the figures used in describing the embodiments. It should be understood that the figures described below represent only some embodiments of this application. Those skilled in the art can derive other figures based on these figures without inventive effort. [Figure 1] shows a block diagram of a system for restoring files based on multiple snapshots in accordance with an embodiment of this application. [Figure 2] shows a flow chart of a method for restoring files based on multiple snapshots in accordance with an embodiment of this application. [Figure 3] shows a schematic diagram of the process for generating a candidate file list in accordance with an embodiment of this application. [Figure 4] shows a schematic diagram of a data restoration process in accordance with an embodiment of this application. [Figure 5] is a flowchart showing a method for generating a candidate file list according to an embodiment of the present application. [Figure 6] is a schematic diagram showing another process for generating a candidate file list according to an embodiment of the present application. [Figure 7] is a flowchart showing a method for optimizing a candidate file list according to an embodiment of the present application. [Figure 8] is a schematic diagram showing a process for optimizing a candidate file list according to an embodiment of the present application. [Figure 9] is a flowchart showing a method for updating a candidate file list according to an embodiment of the present application.
S20~S29:步驟 S20~S29: Steps
Claims (11)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW113123036A TWI890495B (en) | 2024-06-21 | 2024-06-21 | Method and system for file recovery based on multiple snapshots |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW113123036A TWI890495B (en) | 2024-06-21 | 2024-06-21 | Method and system for file recovery based on multiple snapshots |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TWI890495B true TWI890495B (en) | 2025-07-11 |
| TW202601376A TW202601376A (en) | 2026-01-01 |
Family
ID=97228198
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW113123036A TWI890495B (en) | 2024-06-21 | 2024-06-21 | Method and system for file recovery based on multiple snapshots |
Country Status (1)
| Country | Link |
|---|---|
| TW (1) | TWI890495B (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TW201814577A (en) * | 2016-10-06 | 2018-04-16 | 網擎資訊軟體股份有限公司 | Method and system for preventing malicious alteration of data in computer system |
| US20200089884A1 (en) * | 2018-09-17 | 2020-03-19 | Axxana (Israel) Ltd. | Method and apparatus for ransomware detection |
| TW202101216A (en) * | 2019-04-30 | 2021-01-01 | 美商克魯密爾公司 | Change-based restore from a cloud-based data protection service |
| CN114444078A (en) * | 2021-12-29 | 2022-05-06 | 中国福利会国际和平妇幼保健院 | Lesovirus file recovery method and device |
-
2024
- 2024-06-21 TW TW113123036A patent/TWI890495B/en active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TW201814577A (en) * | 2016-10-06 | 2018-04-16 | 網擎資訊軟體股份有限公司 | Method and system for preventing malicious alteration of data in computer system |
| US20200089884A1 (en) * | 2018-09-17 | 2020-03-19 | Axxana (Israel) Ltd. | Method and apparatus for ransomware detection |
| TW202101216A (en) * | 2019-04-30 | 2021-01-01 | 美商克魯密爾公司 | Change-based restore from a cloud-based data protection service |
| CN114444078A (en) * | 2021-12-29 | 2022-05-06 | 中国福利会国际和平妇幼保健院 | Lesovirus file recovery method and device |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11681591B2 (en) | System and method of restoring a clean backup after a malware attack | |
| JP5049341B2 (en) | Combination of virus check and replication filter | |
| US8468604B2 (en) | Method and system for detecting malware | |
| US8255998B2 (en) | Information protection method and system | |
| US7756834B2 (en) | Malware and spyware attack recovery system and method | |
| US8311985B2 (en) | Remote backup and restore system and method | |
| US8793457B2 (en) | Method and system for policy-based secure destruction of data | |
| US20070208918A1 (en) | Method and apparatus for providing virtual machine backup | |
| US20030079158A1 (en) | Secured digital systems and a method and software for operating the same | |
| US6668262B1 (en) | Methods and apparatus for modifying a database | |
| US20120030766A1 (en) | Method and system for defining a safe storage area for use in recovering a computer system | |
| US20240111865A1 (en) | Cyber recovery forensics kit configured to send return malware | |
| EP1915719B1 (en) | Information protection method and system | |
| US8341428B2 (en) | System and method to protect computing systems | |
| US12373299B2 (en) | Just-in-time filesystem-based ransomware backup | |
| US12242609B2 (en) | Exact restoration of a computing system to the state prior to infection | |
| TWI890495B (en) | Method and system for file recovery based on multiple snapshots | |
| TW202601376A (en) | Method and system for file recovery based on multiple snapshots | |
| US20250390396A1 (en) | Method and system for file recovery based on multiple snapshots | |
| US20240346143A1 (en) | Tracking of files required for running malware processes | |
| US12130918B2 (en) | System and method of backup slice control for recovering data archives | |
| JP2019159721A (en) | Storage device, control method, and control program | |
| CN116483284A (en) | Method, device, medium and electronic equipment for reading and writing virtual hard disk | |
| US20250077360A1 (en) | Data recovery method and data recovery system | |
| US12541595B2 (en) | Ransomware detection via detecting system calls pattern in encryption phase |