TW201443683A - Apparatus and method for searching and deleting macro virus - Google Patents

Apparatus and method for searching and deleting macro virus Download PDF

Info

Publication number
TW201443683A
TW201443683A TW102146233A TW102146233A TW201443683A TW 201443683 A TW201443683 A TW 201443683A TW 102146233 A TW102146233 A TW 102146233A TW 102146233 A TW102146233 A TW 102146233A TW 201443683 A TW201443683 A TW 201443683A
Authority
TW
Taiwan
Prior art keywords
macro
document
virus
macro virus
determining
Prior art date
Application number
TW102146233A
Other languages
Chinese (zh)
Inventor
Jing-Bing Cui
Original Assignee
Tencent Tech Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Tech Shenzhen Co Ltd filed Critical Tencent Tech Shenzhen Co Ltd
Publication of TW201443683A publication Critical patent/TW201443683A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/568Computer malware detection or handling, e.g. anti-virus arrangements eliminating virus, restoring damaged files

Abstract

An apparatus and method for searching and deleting a macro virus are provided. The method includes steps of obtaining a data stream of a file to be inspected; determining whether a macro identifier exists in the data stream to determine whether a further search of macro virus is performed; determining whether the file is a file containing a macro virus when the macro identifier existing in the data stream is determined; and transforming the file containing the macro virus to a nontoxic file. The method is provided for only searching and deleting the macro virus written in a macro code of a computer document to improve efficiency for searching macro virus. Meanwhile, the method includes deleting the macro virus written in the computer document to preserve the original computer document and avoid losing any information.

Description

一種巨集病毒查殺的方法和裝置 Method and device for killing macro virus

本發明涉及資料安全技術領域,具體涉及一種巨集病毒查殺的方法和裝置。 The invention relates to the technical field of data security, and in particular relates to a method and a device for detecting and killing a macro virus.

隨著電腦的普及和移動網際網路的發展,網路資訊時代已經來臨。病毒作為資訊的一種形式,具有繁殖、感染、破壞等特性,威脅著使用者的資訊安全。電腦文檔,即WORD,EXCEL等文字編輯軟體產生的檔案,被人們廣泛使用,而巨集病毒作為專用於破壞電腦文檔資訊安全的新型病毒,逐漸走進人們的視線。其中,使用巨集語言編寫的巨集病毒主要作用於電腦文檔的巨集代碼中,威脅著電腦文檔的安全。 With the popularity of computers and the development of mobile internet, the era of network information has arrived. As a form of information, viruses have the characteristics of reproduction, infection and destruction, which threaten the information security of users. Computer documents, such as WORD, EXCEL and other text editing software files, are widely used by people, and the macro virus as a new virus dedicated to destroying the security of computer documents, gradually entered the people's sight. Among them, the macro virus written in the macro language mainly acts on the macro code of the computer document, which threatens the security of the computer document.

習知技術中,透過對電腦文檔的全文檢索搜尋,查詢巨集病毒的存在,首先,獲取巨集病毒的特徵代碼,其次,用獲取的巨集病毒特徵代碼與電腦文檔的全部代碼進行匹配,直到找到與該特徵代碼相同的程式碼片段,即可以認為該電腦文檔感染了巨集病毒。同時,在確定了電腦文檔已經感染巨集病毒的情況下,只是簡單的將被感染的電腦文檔刪除。 In the prior art, through the full-text search and search of computer documents, the existence of the macro virus is searched, firstly, the feature code of the macro virus is obtained, and secondly, the acquired macro virus feature code is matched with all the codes of the computer document. Until the same code segment is found, the computer file can be considered to be infected with a macro virus. At the same time, in the case that it is determined that the computer document has been infected with the macro virus, it is simply to delete the infected computer document.

現有技術的全文檢索搜尋巨集病毒的方法,忽略了巨集病毒只作用於電腦文檔的巨集代碼中的特性,無針對性的巨集病毒搜索方法,盲目擴大了搜索範圍,無疑大大降低了巨集病毒的搜索效率。同時,刪除被感染的電腦文檔容易造成資訊的丟失。 The prior art full-text search for the macro virus method ignores the characteristics of the macro virus only acting on the macro code of the computer document, and the untargeted macro virus search method blindly expands the search scope, which undoubtedly greatly reduces the The search efficiency of macro viruses. At the same time, deleting infected computer files is likely to cause loss of information.

本發明提供了一種巨集病毒查殺的方法和裝置,只針對電腦文檔的巨集代碼部分進行巨集病毒的查殺,大大提高巨集病毒的搜索效率。同時,將被感染的電腦文檔中的巨集病毒資訊刪除,使得電腦文檔中的原資訊被完好保存,防止資訊的丟失。 The invention provides a method and a device for killing a macro virus, and only performs macrovirus detection and killing on a macro code part of a computer document, thereby greatly improving the search efficiency of the macro virus. At the same time, the macro virus information in the infected computer file is deleted, so that the original information in the computer document is saved intact to prevent the loss of information.

本發明提供一種巨集病毒查殺的方法,包括:獲取待查文檔的數據流;在所述數據流中存在巨集標識的情況下,判斷所述待查文檔是否為巨集病毒文檔,如果是,則將所述巨集病毒文檔轉化成無毒文檔。 The present invention provides a method for detecting and killing a macro virus, comprising: obtaining a data stream of a document to be inspected; and if there is a macro identifier in the data stream, determining whether the document to be inspected is a macro virus document, if Yes, the macro virus document is converted into a non-toxic document.

進一步地,所述判斷所述待查文檔是否為巨集病毒文檔之前,還包括:預設巨集病毒特徵組,所述巨集病毒特徵組包括至少一個巨集病毒特徵。 Further, before determining whether the to-be-checked document is a macro virus document, the method further includes: a preset macro virus feature set, where the macro virus feature set includes at least one macro virus feature.

進一步地,所述判斷所述待查文檔是否為巨集病毒文檔,包括:判斷所述待查文檔是否包括所述巨集病毒特徵組中的任一巨集病毒特徵。 Further, the determining whether the to-be-checked document is a macro-virus document comprises: determining whether the to-be-checked document includes any macro-virus feature in the macro-virus feature set.

進一步地,所述判斷所述待查文檔是否包括所述巨集病毒特徵組中的任一巨集病毒特徵,包括:在所述待查文檔包括巨集子流的情況下,判斷所述巨集子流中是否包括所述巨集病毒特徵組中的任一巨集病毒特徵;在所述待查文檔不包括巨集子流或者所述巨集子流中不包括所述巨集病毒特徵組中的任一巨集病毒特徵的情況下,判斷所述待查文檔是否包括腳本流,如果是,則判斷所述腳本流是否包括所述巨集病毒特徵組中的任一巨集病毒特徵;或者,在所述待查文檔包括腳本流的情況下,判斷所述腳本流中是否包括所述巨集病毒特徵組中的任一巨集病毒特徵;在所述待查文檔不包括腳本流或者所述腳本流中不包括所述巨集病毒特徵組中的任一巨集病毒特徵的情況下,判斷所述待查文檔是否包括巨集子流,如果是,則判斷所述巨集子流是否包括所述巨集病毒特徵組中的任一巨集病毒 特徵。 Further, the determining whether the to-be-checked document includes any macro-virus feature in the macro-virus feature group includes: determining, in the case that the to-be-checked document includes a macro-sub-flow, determining the giant Whether the feature of any macro virus in the macro virus feature group is included in the set substream; and the feature of the macro virus is not included in the document to be checked that does not include the macro substream or the macro substream In the case of any macro virus feature in the group, determining whether the document to be checked includes a script stream, and if so, determining whether the script stream includes any macro virus feature in the macro virus feature group Or determining, in the case that the to-be-checked document includes a script stream, whether the macro-virus feature in the macro-virus feature group is included in the script stream; and the script file is not included in the to-be-checked document. Or if the script stream does not include any macro virus feature in the macro virus feature group, determining whether the to-be-checked document includes a macro substream, and if yes, determining the macro set Whether the stream includes the macro Toxicity feature set either a macro virus feature.

進一步地,所述方法還包括:在所述數據流中不存在巨集標識的情況下,將所述待查文檔確定為無毒文檔。 Further, the method further includes: determining that the to-be-checked document is a non-toxic document if there is no macro identifier in the data stream.

進一步地,所述將所述巨集病毒文檔轉化成無毒文檔,包括:刪除所述巨集病毒文檔中的巨集資訊,所述巨集資訊包括巨集子流和\或腳本流,以及刪除所述巨集病毒文檔中的巨集標識;將所述巨集病毒文檔確定為無毒文檔。 Further, the converting the macro virus document into a non-toxic document comprises: deleting macro information in the macro virus document, the macro information including a macro sub-flow and a script stream, and deleting a macro identifier in the macro virus document; determining the macro virus document as a non-toxic document.

本發明還提供一種巨集病毒查殺的裝置,所述裝置包括:第一獲取模組,用於獲取待查文檔的數據流;第一判斷模組,用於在所述數據流中存在巨集標識的情況下,判斷所述待查文檔是否為巨集病毒文檔;轉化模組,用於在所述第一判斷模組的結果為是時,將所述巨集病毒文檔轉化成無毒文檔。 The present invention also provides a device for detecting a macro virus, the device comprising: a first obtaining module, configured to acquire a data stream of the document to be inspected; and a first determining module, configured to exist in the data stream In the case of the set identifier, determining whether the to-be-checked document is a macro virus document; and converting a module, configured to convert the macro virus document into a non-toxic document when the result of the first determining module is yes .

進一步地,所述裝置還包括:預設模組,用於預設巨集病毒特徵組,所述巨集病毒特徵組包括至少一個巨集病毒特徵。 Further, the device further includes: a preset module, configured to preset a macro virus feature set, wherein the macro virus feature set includes at least one macro virus feature.

進一步地,所述第一判斷模組具體用於:在所述數據流中存在巨集標識的情況下,判斷所述待查文檔是否包括所述巨集病毒特徵組中的任一巨集病毒特徵。 Further, the first determining module is specifically configured to: if the macro identifier exists in the data stream, determine whether the to-be-checked document includes any macro virus in the macro virus feature group feature.

進一步地,所述第一判斷模組,包括:第一判斷子模組,用於在所述待查文檔包括巨集子流的情況下,判斷所述巨集子流中是否包括所述巨集病毒特徵組中的任一巨集病毒特徵;第二判斷子模組,用於在所述待查文檔不包括巨集子流或者所述巨集子流中不包括所述巨集病毒特徵組中的任一巨集病毒特徵的情況下,判斷所述待查文檔是否包括腳本流;第三判斷子模組,用於在所述第二判斷子模組的結果為是時,判斷所述腳本流是否包括所述巨集病毒特徵組中的任一巨集病毒特徵;或者,第四判斷子模組,用於在所述待查文檔包括腳本流的情況下,判斷所述腳本流中是否包括所述巨集病毒特徵組中的任一巨集病毒特徵;第五判斷子模組, 用於在所述待查文檔不包括腳本流或者所述腳本流中不包括所述巨集病毒特徵組中的任一巨集病毒特徵的情況下,判斷所述待查文檔是否包括巨集子流;第六判斷子模組,用於在所述第五判斷子模組的結果為是時,判斷所述巨集子流是否包括所述巨集病毒特徵組中的任一巨集病毒特徵。 Further, the first determining module includes: a first determining submodule, configured to determine whether the macro is included in the macro substream if the to-be-checked document includes a macro substream Collecting any macro virus feature in the virus feature group; the second determining sub-module is configured to not include the macro virus feature in the document to be inspected that does not include the macro substream or the macro substream In the case of any macro virus feature in the group, it is determined whether the document to be inspected includes a script stream; and the third determining sub-module is configured to determine, when the result of the second determining sub-module is YES, Whether the script stream includes any of the macro virus signatures in the macro virus feature group; or the fourth judging submodule, configured to determine the script stream if the to-be-checked document includes a script stream Whether it includes any macro virus feature in the macro virus feature set; the fifth determining sub-module, And determining, in the case that the to-be-checked document does not include a script stream, or the script stream does not include any macro virus feature in the macro virus feature group, determining whether the to-be-checked document includes a macro set a sixth determining sub-module, configured to determine, when the result of the fifth determining sub-module is YES, whether the macro sub-stream includes any macro-virus feature in the macro-virus feature set .

進一步地,所述裝置還包括:確定模組,用於在所述數據流中不存在巨集標識的情況下,將所述待查文檔確定為無毒文檔。 Further, the device further includes: a determining module, configured to determine the to-be-checked document as a non-toxic document if there is no macro identifier in the data stream.

進一步地,所述轉化模組,包括:第一刪除子模組,用於刪除所述巨集病毒文檔中的巨集資訊,所述巨集資訊包括巨集子流和\或腳本流;第二刪除子模組,用於刪除所述巨集病毒文檔中的巨集標識;確定子模組,用於將所述巨集病毒文檔確定為無毒文檔。 Further, the conversion module includes: a first deletion submodule, configured to delete macro information in the macro virus document, where the macro information includes a macro substream and a script stream; The second deletion sub-module is configured to delete the macro identifier in the macro virus document, and the determining sub-module is configured to determine the macro virus document as a non-toxic document.

本發明首先獲取待查文檔的數據流,其次,透過判斷獲取的數據流中是否存在巨集標識,確定是否進一步搜索巨集病毒,在數據流中存在巨集標識的情況下,判斷所述待查文檔是否為巨集病毒文檔,最後,將巨集病毒文檔轉化成無毒文檔。本發明只針對電腦文檔的巨集代碼部分進行巨集病毒的查殺,大大提高巨集病毒的搜索效率。同時,將被感染的電腦文檔中的巨集病毒資訊刪除,使得原電腦文檔中的資訊被完好保存,防止資訊的丟失。 The present invention firstly obtains a data stream of the document to be inspected, and secondly, determines whether there is a macro identifier in the obtained data stream, and determines whether to further search for the macro virus, and if there is a macro identifier in the data stream, determining the waiting Check if the document is a macro virus document, and finally, convert the macro virus document into a non-toxic document. The invention only performs macrovirus detection and killing on the macro code part of the computer document, and greatly improves the search efficiency of the macro virus. At the same time, the macro virus information in the infected computer file is deleted, so that the information in the original computer document is saved intact to prevent the loss of information.

進一步的,在數據流中不存在巨集標識的情況下,可以確定待查文檔為無毒文檔,與現有技術中透過搜索全文確定無病毒碼代碼的方法確定無毒文檔的方法相比,本發明提高了確定電腦文檔無巨集病毒的效率。 Further, in the case that the macro identifier does not exist in the data stream, it may be determined that the to-be-checked document is a non-toxic document, and the present invention is improved compared with the method for determining a non-toxic document by searching the full-text to determine the virus-free code by searching the full text in the prior art. Determine the efficiency of computer files without macro viruses.

進一步的,本發明首先判斷待查文檔中是否包括巨集子流和\或腳本流,其次針對巨集子流和\或腳本流進行病毒碼的匹配的方法,確定巨集病毒文檔,與現有技術相比,本發明針對巨集子流和\或腳本流搜索巨集病毒的方法更有針對性,同時也提高了搜索巨集病毒的效率。 Further, the present invention first determines whether a macro substream and a script stream are included in the document to be checked, and secondly, a method for matching the virus code by the macro substream and the script stream, and determining the macro virus document and the existing Compared with the technology, the present invention is more targeted to the macro substream and/or the script stream to search for the macro virus, and also improves the efficiency of the search macro virus.

更進一步的,本發明透過將巨集病毒文檔中巨集資訊和巨集 標識刪除的方法,實現了巨集病毒文檔轉化為無毒文檔,與現有技術的直接刪除巨集病毒文檔的方法相比,本發明有效防止了原文檔資訊的丟失。 Further, the present invention transmits macro information and macros in a macro virus document. The method for identifying the deletion realizes the conversion of the macro virus document into a non-toxic document, and the invention effectively prevents the loss of the original document information compared with the prior art method for directly deleting the macro virus document.

101~103‧‧‧圖1的方法流程步驟 101~103‧‧‧ Method flow steps of Figure 1.

201~203‧‧‧圖2的方法流程步驟 201~203‧‧‧ Method flow steps of Figure 2

301~306‧‧‧圖3的方法流程步驟 301~306‧‧‧ Method flow steps of Figure 3

401~404‧‧‧圖4的方法流程步驟 401~404‧‧‧ Method flow steps in Figure 4

501~504‧‧‧圖5的方法流程步驟 501~504‧‧‧ Method flow steps in Figure 5

601‧‧‧第一獲取模組 601‧‧‧First acquisition module

602‧‧‧第一判斷模組 602‧‧‧First judgment module

603‧‧‧轉化模組 603‧‧‧Transformation Module

701‧‧‧第一判斷子模組 701‧‧‧First judgment sub-module

702‧‧‧第二判斷子模組 702‧‧‧Second judgment sub-module

703‧‧‧第三判斷子模組 703‧‧‧ third judgment sub-module

801‧‧‧第四判斷子模組 801‧‧‧ fourth judgment sub-module

802‧‧‧第五判斷子模組 802‧‧‧ fifth judgment sub-module

803‧‧‧第六判斷子模組 803‧‧‧ sixth judgment sub-module

910‧‧‧無線電頻率(Radio Frequency,RF)電路 910‧‧‧Radio Frequency (RF) Circuit

920‧‧‧記憶體 920‧‧‧ memory

930‧‧‧輸入單元 930‧‧‧Input unit

931‧‧‧觸控面板 931‧‧‧Touch panel

932‧‧‧輸入裝置 932‧‧‧ input device

940‧‧‧顯示單元 940‧‧‧Display unit

941‧‧‧顯示面板 941‧‧‧ display panel

950‧‧‧感測器 950‧‧‧ sensor

960‧‧‧音訊電路 960‧‧‧Optical circuit

961‧‧‧揚聲器 961‧‧‧Speaker

962‧‧‧傳聲器 962‧‧‧Microphone

970‧‧‧無線保真(wireless fidelity,WiFi)模組 970‧‧‧Wireless fidelity (WiFi) module

980‧‧‧處理器 980‧‧‧ processor

990‧‧‧電源 990‧‧‧Power supply

為了更清楚地說明本申請實施例中的技術方案,下面將對實施例描述中所需要使用的附圖作簡單地介紹,顯而易見地,下面描述中的附圖僅僅是本申請的一些實施例,對於本領域普通技術人員來講,在不付出創造性勞動性的前提下,還可以根據這些附圖獲得其他的附圖。 In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present application. Other drawings may also be obtained from those of ordinary skill in the art in view of the drawings.

圖1為本發明之一實施例之巨集病毒查殺的方法流程圖;圖2為本發明之另一實施例之將巨集病毒文檔轉化成無毒文檔的方法流程圖;圖3為本發明之另一實施例之巨集病毒查殺的方法流程圖;圖4為本發明之另一實施例之判斷待查文檔是否包括巨集病毒特徵組中的任一巨集病毒特徵的方法之一的流程圖;圖5為本發明之另一實施例之判斷待查文檔是否包括巨集病毒特徵組中的任一巨集病毒特徵的方法之一的流程圖;圖6為本發明之另一實施例之巨集病毒查殺的裝置結構圖;圖7為本發明之另一實施例之所述第一判斷模組602的結構圖;圖8為本發明之另一實施例之所述第一判斷模組602的結構圖之一;圖9為本發明之另一實施例所提供的終端結構示意圖。 1 is a flow chart of a method for detecting a macro virus in an embodiment of the present invention; FIG. 2 is a flowchart of a method for converting a macro virus document into a non-toxic document according to another embodiment of the present invention; A flow chart of a method for detecting a macro virus in another embodiment of the present invention; FIG. 4 is a method for determining whether a document to be inspected includes any macro virus feature in a macro virus feature group according to another embodiment of the present invention; FIG. 5 is a flowchart of one of the methods for determining whether a document to be inspected includes any macro virus feature in a macro virus feature group according to another embodiment of the present invention; FIG. 6 is another flowchart of the present invention; FIG. 7 is a structural diagram of the first judging module 602 according to another embodiment of the present invention; FIG. 8 is a structural diagram of another embodiment of the present invention; One of the structural diagrams of the judging module 602; FIG. 9 is a schematic structural diagram of a terminal according to another embodiment of the present invention.

下面將結合本申請實施例中的附圖,對本申請實施例中的技術方案進行清楚、完整地描述,顯然,所描述的實施例僅僅是本申請一部分實施例,而不是全部的實施例。基於本申請中的實施例,本領域普通技術人員在沒有做出創造性勞動前提下所獲得的所有其他實施例,都屬於本 申請保護的範圍。 The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the drawings in the embodiments of the present application. It is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts are The scope of application for protection.

本發明所提供的各個實施例,係針對現有技術中巨集病毒的搜索效率低以及直接刪除感染巨集病毒的文檔導致的造成資訊丟失的問題,提出透過獲取待查文檔的數據流判斷待查文檔中是否包括巨集標識,進而確定待查文檔中是否包括巨集病毒。最終,在待查文檔中包括巨集病毒的情況下,透過刪除待查文檔中的巨集資訊達到巨集病毒查殺的目的,從而提高巨集病毒的搜索效率,也解決了查殺巨集病毒過程中的文檔資訊丟失的問題。 The embodiments provided by the present invention are directed to the problem of information loss caused by the low search efficiency of the macro virus in the prior art and the deletion of the document directly infected with the macro virus, and it is proposed to determine the data flow by acquiring the document to be checked. Whether the macro identifier is included in the document to determine whether the macro virus is included in the document to be checked. Finally, in the case that the document to be checked includes a macro virus, the macro information is deleted by deleting the macro information in the document to be checked, thereby improving the search efficiency of the macro virus and solving the killing macro. The problem of missing document information in the virus process.

圖1為本發明之一實施例之巨集病毒查殺的方法流程圖。請參照圖1。本實施例之巨集病毒查殺的方法流程包括: 1 is a flow chart of a method for killing a macro virus according to an embodiment of the present invention. Please refer to Figure 1. The method flow of the macro virus detection and killing in this embodiment includes:

步驟101:獲取待查文檔的數據流。本實施例中,在對待查文檔進行巨集病毒的查殺之前,首先將待查文檔解析成數據流的形式。其中,數據流為存儲待查文檔中的原始資料的結構。 Step 101: Acquire a data stream of the document to be inspected. In this embodiment, before the macrovirus is checked for the document to be inspected, the document to be inspected is first parsed into a form of the data stream. The data stream is a structure for storing the original data in the document to be inspected.

步驟102:在所述數據流中存在巨集標識的情況下,判斷所述待查文檔是否為巨集病毒文檔,如果是,則進入步驟103。如果否,結束流程。本實施例中,首先判斷獲取的數據流中是否存在巨集標識,如果存在,則繼續判斷待查文檔是否為巨集病毒文檔,其中,在該待查文檔為巨集病毒文檔的情況下,進入步驟103。如果數據流中不存在巨集標識,則說明該待查文檔為無毒文檔,也就是說,待查文檔中不存在巨集標識,即證明該待查文檔中沒有巨集病毒。其中,巨集標識用於標識待查文檔中是否存在可執行的巨集代碼,也就是說,如果待查文檔中不存在巨集標識,待查文檔中也就不存在可執行的巨集代碼,由於巨集病毒也是由巨集代碼編寫而成的,所以,可以理解為,不存在巨集標識的待查文檔也就不存在可執行的巨集病毒,對於不可執行的巨集病毒,其對待查文檔是沒有破壞作用的。 Step 102: If there is a macro identifier in the data stream, determine whether the to-be-checked document is a macro virus document, and if yes, proceed to step 103. If no, the process ends. In this embodiment, it is first determined whether there is a macro identifier in the acquired data stream, and if yes, proceed to determine whether the to-be-checked document is a macro virus document, wherein, in the case that the to-be-checked document is a macro virus document, Go to step 103. If the macro identifier does not exist in the data stream, the document to be inspected is a non-toxic document, that is, the macro identifier does not exist in the document to be inspected, that is, there is no macro virus in the document to be inspected. The macro identifier is used to identify whether there is an executable macro code in the document to be checked, that is, if there is no macro identifier in the document to be checked, there is no executable macro code in the document to be checked. Since the macro virus is also written by the macro code, it can be understood that there is no executable macro virus in the document to be inspected without the macro identifier, and for the non-executable macro virus, There is no damaging effect on the documentation.

步驟103:將所述巨集病毒文檔轉化成無毒文檔。本實施例中,確定該待查文檔為巨集病毒文檔後,將該巨集病毒文檔轉化成無毒文檔。其中, 巨集病毒文檔表示感染巨集病毒的文檔,無毒文檔表示未感染巨集病毒的文檔。 Step 103: Convert the macro virus document into a non-toxic document. In this embodiment, after determining that the to-be-checked document is a macro virus document, the macro virus document is converted into a non-toxic document. among them, A macro virus document represents a document that infects a macro virus, and a non-toxic document represents a document that is not infected with a macro virus.

圖2為本發明之另一實施例之將巨集病毒文檔轉化成無毒文檔的方法流程圖。參考圖2。本實施例之將巨集病毒文檔轉化成無毒文檔的方法流程包括:步驟201:刪除所述巨集病毒文檔中的巨集資訊,所述巨集資訊包括巨集子流和\或腳本流。本實施例中,在待查文檔被確定為巨集病毒文檔後,刪除巨集病毒文檔中的巨集資訊,巨集資訊包括巨集子流和\或腳本流。其中巨集子流可以透過數據流中的子流屬性目錄獲取,其中,子流屬性目錄用於存儲數據流包含的各個子流的屬性,由於巨集子流具有特定的屬性,可以根據巨集子流的屬性在子流屬性目錄中查詢數據流中是否存在巨集子流,值得注意的是,數據流包括巨集子流,而腳本流可以透過腳本流的名稱獲取。 2 is a flow chart of a method for converting a macro virus document into a non-toxic document according to another embodiment of the present invention. Refer to Figure 2. The method for converting a macro virus document into a non-toxic document in this embodiment includes: Step 201: deleting macro information in the macro virus document, where the macro information includes a macro sub-flow and a script stream. In this embodiment, after the to-be-checked document is determined to be a macro virus document, the macro information in the macro virus document is deleted, and the macro information includes a macro sub-flow and a script stream. The macro substream can be obtained through a subflow attribute directory in the data stream, wherein the substream attribute directory is used to store attributes of each substream included in the data stream, and the macro substream has a specific attribute, which can be based on the macro The attributes of the subflow query the substream attribute directory for the existence of a macro subflow in the data stream. It is worth noting that the data stream includes a macro subflow, and the script stream can be obtained by the name of the script stream.

於實際操作中,判斷巨集病毒文檔中是否包括巨集子流和\或腳本流,如果存在則將其刪除。具體的,可以首先判斷巨集病毒文檔中是否包括巨集子流,如果存在,將巨集子流刪除,其次,判斷巨集病毒文檔中是否包括腳本流,如果存在,將腳本流也刪除;也可以,首先判斷腳本流是否存在,其次判斷巨集子流是否存在,並將巨集子流和腳本流刪除;還可以同時判斷巨集子流和腳本流是否存在於待查文檔中,如果存在,將存在的巨集子流和\或腳本流刪除。值得注意的是,巨集子流和腳本流的判斷順序不受限制,同時巨集子流和腳本流的判斷過程不會相互影響。 In actual operation, it is determined whether the macro sub-flow and the \ or script stream are included in the macro virus document, and if it exists, it is deleted. Specifically, it may first determine whether the macro sub-flow is included in the macro virus document, and if yes, delete the macro sub-stream, and secondly, determine whether the script stream is included in the macro virus document, and if so, delete the script stream; Alternatively, it is first determined whether the script stream exists, secondly, whether the macro substream exists, and deleting the macro substream and the script stream; and simultaneously determining whether the macro subflow and the script stream exist in the to-be-checked document, if Exist, delete the existing macro subflow and \ or script stream. It is worth noting that the order of judging the macro subflow and the script stream is not limited, and the judging process of the macro subflow and the script stream does not affect each other.

圖2的方法還包括步驟202:刪除所述巨集病毒文檔中的巨集標識。本實施例中,在待查文檔被確定為巨集病毒文檔後,將巨集病毒文檔中的巨集標識刪除。在確定待查文檔為巨集病毒文檔的情況下,刪除巨集標識,以去除巨集病毒代碼的執行條件。值得注意的是,步驟201和步驟202的執行順序不受限制,也可以同時執行步驟201和步驟202。 The method of FIG. 2 further includes the step 202 of deleting the macro identifier in the macro virus document. In this embodiment, after the to-be-checked document is determined to be a macro virus document, the macro identifier in the macro virus document is deleted. In the case where it is determined that the document to be inspected is a macro virus document, the macro identifier is deleted to remove the execution condition of the macro virus code. It should be noted that the order of execution of steps 201 and 202 is not limited, and steps 201 and 202 may be performed simultaneously.

圖2的方法還包括步驟203:將所述巨集病毒文檔確定為無 毒文檔。本實施例中,將刪除巨集資訊和巨集標識的巨集病毒檔確定為無毒檔,可以理解為,在感染巨集病毒的待查文檔中的巨集資訊和巨集標識被刪除後,該感染巨集病毒的待查文檔中的巨集病毒已被殺,也就是說,此時的待查文檔中不存在巨集病毒,同時可以正常執行。 The method of FIG. 2 further includes step 203: determining the macro virus document as none Poison document. In this embodiment, the macro virus file that deletes the macro information and the macro identifier is determined to be a non-toxic file, and it can be understood that after the macro information and the macro identifier in the to-be-checked file of the infected macro virus are deleted, The macro virus in the pending document of the infected macro virus has been killed, that is, the macro virus does not exist in the document to be checked at this time, and can be executed normally.

本實施例中,首先獲取待查文檔的數據流,其次,透過判斷獲取的數據流中是否存在巨集標識,確定是否進一步搜索巨集病毒,在數據流中存在巨集標識的情況下,判斷所述待查文檔是否為巨集病毒文檔,最後,將巨集病毒文檔轉化成無毒文檔。本發明只針對電腦文檔的巨集代碼部分進行巨集病毒的查殺,大大提高巨集病毒的搜索效率。同時,將被感染的電腦文檔中的巨集病毒資訊刪除,使得原電腦文檔中的資訊被完好保存,防止資訊的丟失。 In this embodiment, the data stream of the document to be inspected is first obtained, and secondly, whether the macro virus identifier exists in the data stream obtained by determining whether the macro virus is further searched, and if there is a macro identifier in the data stream, the judging is performed. Whether the document to be checked is a macro virus document, and finally, the macro virus document is converted into a non-toxic document. The invention only performs macrovirus detection and killing on the macro code part of the computer document, and greatly improves the search efficiency of the macro virus. At the same time, the macro virus information in the infected computer file is deleted, so that the information in the original computer document is saved intact to prevent the loss of information.

進一步的,在數據流中不存在巨集標識的情況下,可以確定待查文檔為無毒文檔,與現有技術中透過搜索全文確定無病毒碼代碼的方法確定無毒文檔的方法相比,本發明提高了確定電腦文檔無巨集病毒的效率。 Further, in the case that the macro identifier does not exist in the data stream, it may be determined that the to-be-checked document is a non-toxic document, and the present invention is improved compared with the method for determining a non-toxic document by searching the full-text to determine the virus-free code by searching the full text in the prior art. Determine the efficiency of computer files without macro viruses.

圖3為本發明之另一實施例之巨集病毒查殺的方法流程圖。參考圖3。本實施例所提供的巨集病毒查殺的方法流程包括: FIG. 3 is a flowchart of a method for killing a macro virus according to another embodiment of the present invention. Refer to Figure 3. The method flow of the macro virus detection and killing provided by this embodiment includes:

步驟301:預設巨集病毒特徵組,所述巨集病毒特徵組包括至少一個巨集病毒特徵。本實施例中,預先設定巨集病毒特徵組,其中,巨集病毒特徵組包括至少一個巨集病毒特徵,巨集病毒特徵表示巨集病毒區別於其它類型病毒的特徵,同時巨集病毒種類也較多,不同種類的巨集病毒的特徵也不同。也就是說,根據巨集病毒特徵能確定一種類型的巨集病毒。 Step 301: Predetermine a macro virus feature set, where the macro virus feature set includes at least one macro virus feature. In this embodiment, the macro virus feature set is preset, wherein the macro virus feature set includes at least one macro virus feature, and the macro virus feature indicates that the macro virus is different from other types of viruses, and the macro virus type is also More, different types of macro viruses have different characteristics. That is to say, one type of macro virus can be determined according to the characteristics of the macro virus.

步驟302、獲取待查文檔的數據流。本實施例中的步驟302與實施例一中的步驟101相同,在此不再贅述。 Step 302: Obtain a data stream of the document to be inspected. Step 302 in this embodiment is the same as step 101 in the first embodiment, and details are not described herein again.

步驟303:判斷所述數據流中是否存在巨集標識,如果否,則進入步驟304,如果是,則進入步驟305。本實施例中,首先判斷獲取的數據流中是 否包括巨集標識,如果是,進入步驟304,否則,進入步驟305。其中,查詢巨集標識的方式不受本實施例的限制。一般情況下,巨集標識位於待查文檔的前部,所以,查詢巨集標識一般只需要遍歷到待查文檔的前部即可獲得,不需要如現有技術遍歷全文的方法。 Step 303: Determine whether there is a macro identifier in the data stream. If not, proceed to step 304. If yes, proceed to step 305. In this embodiment, first determining that the acquired data stream is If the macro flag is included, if yes, go to step 304, otherwise, go to step 305. The manner of querying the macro identifier is not limited by this embodiment. In general, the macro identifier is located at the front of the document to be inquired. Therefore, the query macro identifier generally only needs to be traversed to the front of the document to be inspected, and does not need to traverse the full text method as in the prior art.

步驟304:將所述待查文檔確定為無毒文檔。本實施例中,在獲取的數據流中不存在巨集標識的情況下,可以將待查文檔確定為無毒文檔。可以理解為,待查文檔中不存在巨集標識,則證明該待查文檔中沒有巨集病毒,事實上是不存在對待查文檔造成破壞性的可執行巨集病毒。 Step 304: Determine the to-be-checked document as a non-toxic document. In this embodiment, if the macro identifier does not exist in the acquired data stream, the to-be-checked document may be determined as a non-toxic document. It can be understood that if there is no macro identifier in the document to be checked, it proves that there is no macro virus in the document to be inspected, and in fact there is no executable macro virus that is destructive to the document.

步驟305:判斷所述待查文檔是否包括所述巨集病毒特徵組中的任一巨集病毒特徵,如果是,則進入步驟306。如果否,結束流程。本實施例中,在確定待查文檔中包括巨集標識後,判斷該待查文檔是否包括巨集病毒特徵組中的任一巨集病毒特徵,如果是,則進入步驟306。 Step 305: Determine whether the document to be inspected includes any macro virus feature in the macro virus feature group, and if yes, proceed to step 306. If no, the process ends. In this embodiment, after determining that the macro identifier is included in the to-be-checked document, it is determined whether the to-be-checked document includes any macro virus signature in the macro virus signature group, and if yes, proceed to step 306.

步驟306:將所述巨集病毒文檔轉化成無毒文檔。本實施例中的步驟306與實施例一中的步驟103相同,此處同樣不再贅述。 Step 306: Convert the macro virus document into a non-toxic document. Step 306 in this embodiment is the same as step 103 in the first embodiment, and details are not described herein again.

圖4為本發明之另一實施例之判斷待查文檔是否包括巨集病毒特徵組中的任一巨集病毒特徵的方法之一的流程圖。請參照圖4。本實施例之判斷待查文檔是否包括巨集病毒特徵組中的任一巨集病毒特徵的方法包括: 4 is a flow chart of one of methods for determining whether a document to be inspected includes any macro virus feature in a macro virus feature set according to another embodiment of the present invention. Please refer to Figure 4. The method for determining whether the document to be checked includes any macro virus feature in the macro virus feature group in the embodiment includes:

步驟401:判斷所述待查文檔是否包括巨集子流,如果是,則進入步驟402,如果否,則進入步驟403。本實施例中,在待查文檔包括巨集子流時,進入步驟402;否則,在待查文檔中不包括巨集子流時,進入步驟403。實際操作中,數據流包括巨集子流,數據流中存在包含各個子流屬性的目錄,由於巨集子流具有特定的屬性,所以,透過查詢數據流中的屬性目錄可以查詢該待查文檔中是否包括巨集子流。具體的,對於如何查詢待查文檔中是否包括巨集子流的過程不受本實施例的限制。 Step 401: Determine whether the document to be checked includes a macro substream, if yes, proceed to step 402, and if no, proceed to step 403. In this embodiment, when the to-be-checked document includes the macro substream, the process proceeds to step 402; otherwise, if the macro substream is not included in the to-be-checked document, the process proceeds to step 403. In actual operation, the data stream includes a macro substream, and a directory containing the attributes of each substream exists in the data stream. Since the macro substream has a specific attribute, the document to be inquired can be queried by querying the attribute directory in the data stream. Whether the macro substream is included. Specifically, the process of how to query whether a macro substream is included in the to-be-checked document is not limited by this embodiment.

步驟402:判斷所述巨集子流中是否包括所述巨集病毒特徵組中的任一 巨集病毒特徵,如果否,則進入步驟403。本實施例中,在待查文檔中包括巨集子流的情況下,判斷巨集子流中是否包括巨集病毒特徵組中的任一巨集病毒特徵,其中巨集病毒特徵可以包含一段特定的巨集病毒代碼。如果巨集子流中包括巨集病毒特徵組中的任一巨集病毒特徵,則進入步驟306,否則,進入步驟403。 Step 402: Determine whether any one of the macro virus feature groups is included in the macro current stream The macro virus feature, if no, proceeds to step 403. In this embodiment, if the macro substream is included in the to-be-checked document, it is determined whether any macro virus feature in the macro virus feature group is included in the macro substream, wherein the macro virus feature may include a specific one. The macro virus code. If any of the macro virus features in the macro virus feature set is included in the macro substream, then step 306 is entered, otherwise, step 403 is entered.

步驟403:判斷所述待查文檔是否包括腳本流,如果是,則進入步驟404。本實施例中,在待查文檔不包括巨集子流或者巨集子流中不包括巨集病毒特徵組中的任一巨集病毒特徵的情況下,判斷該待查文檔是否包括腳本流,如果是,則進入步驟306,如果否,則證明該待查文檔為無毒文檔。實際操作中,腳本流具有特定的名稱,例如_VBA_PROJECT_CUR,可以透過查詢腳本流名稱確定該待查文檔是否包括腳本流。具體的,對於如何查詢待查文檔中是否包括腳本流的過程不受本實施例的限制。 Step 403: Determine whether the document to be checked includes a script stream, and if yes, proceed to step 404. In this embodiment, if the to-be-checked document does not include the macro substream or the macro substream does not include any macro virus feature in the macro virus feature group, determining whether the to-be-checked document includes the script stream, If yes, go to step 306, if no, prove that the document to be checked is a non-toxic document. In practice, the script stream has a specific name, such as _VBA_PROJECT_CUR, and the query script stream name can be used to determine whether the document to be checked includes a script stream. Specifically, the process of querying whether the script stream is included in the to-be-checked document is not limited by the embodiment.

步驟404:判斷所述腳本流是否包括所述巨集病毒特徵組中的任一巨集病毒特徵。本實施例中,在待查文檔中包括腳本流的情況下,判斷腳本流中是否包括巨集病毒特徵組中的任一巨集病毒特徵,如果包括,則進入步驟306,否則,證明該待查文檔為無毒文檔。實際操作中,將腳本流中的代碼與巨集病毒特徵組中的巨集病毒特徵進行匹配,在腳本流中存在任一巨集病毒特徵的情況下,該待查文檔為巨集病毒文檔,否則,該待查文檔為無毒文檔。 Step 404: Determine whether the script stream includes any macro virus feature in the macro virus feature set. In this embodiment, if the script stream is included in the document to be checked, it is determined whether the macro virus feature in the macro virus feature group is included in the script stream. If yes, the process proceeds to step 306; otherwise, the process is confirmed. Check the document for a non-toxic document. In actual operation, the code in the script stream is matched with the macro virus feature in the macro virus feature group. If there is any macro virus feature in the script stream, the to-be-checked document is a macro virus document. Otherwise, the document to be checked is a non-toxic document.

圖5為本發明之另一實施例之判斷待查文檔是否包括巨集病毒特徵組中的任一巨集病毒特徵的方法之一的流程圖。請參考圖5。本實施例之判斷待查文檔是否包括巨集病毒特徵組中的任一巨集病毒特徵的方法包括: FIG. 5 is a flowchart of one of methods for determining whether a document to be inspected includes any macro virus feature in a macro virus feature set according to another embodiment of the present invention. Please refer to Figure 5. The method for determining whether the document to be checked includes any macro virus feature in the macro virus feature group in the embodiment includes:

步驟501:判斷所述待查文檔是否包括腳本流,如果是,則進入步驟502,如果否,則進入步驟503。 Step 501: Determine whether the document to be checked includes a script stream. If yes, go to step 502. If no, go to step 503.

步驟502:判斷所述腳本流中是否包括所述巨集病毒特徵組中的任一巨 集病毒特徵,如果否,則進入步驟503,如果腳本流中包括巨集病毒特徵組中的任一巨集病毒特徵,則進入步驟306; Step 502: Determine whether the script stream includes any one of the macro virus feature groups. Set the virus feature, if not, proceed to step 503, if the script stream includes any macro virus feature in the macro virus feature group, proceed to step 306;

步驟503:判斷所述待查文檔是否包括巨集子流,如果是,則進入步驟504,如果否,則結束流程; Step 503: Determine whether the document to be checked includes a macro substream, if yes, proceed to step 504, and if no, end the process;

步驟504:判斷所述巨集子流是否包括所述巨集病毒特徵組中的任一巨集病毒特徵。上述判斷待查文檔是否包括巨集病毒特徵組中的任一巨集病毒特徵的方法與圖4的方法的區別僅在於,先判斷待查文檔包括腳本流,還是先判斷待查文檔包括巨集子流。所以,具體步驟與圖4中的步驟描述相似,在此不再贅述。 Step 504: Determine whether the macro substream includes any macro virus feature in the macro virus feature set. The method for determining whether the document to be checked includes any macro virus feature in the macro virus feature group is different from the method of FIG. 4 only in determining whether the document to be inquired includes a script stream or whether the document to be checked includes a macro. Subflow. Therefore, the specific steps are similar to the description of the steps in FIG. 4, and details are not described herein again.

本實施例中,預先設置巨集病毒特徵組,包括至少一個巨集病毒特徵,其次,透過判斷獲取的數據流中是否存在巨集標識,確定是否進一步搜索巨集病毒,在數據流中存在巨集標識的情況下,判斷所述待查文檔是否包括巨集子流和腳本流,進而判斷巨集子流、腳本流中是否包含巨集病毒特徵組中的任一巨集病毒特徵,進而確定待查文檔為巨集病毒文檔或者無毒文檔。與現有技術相比,本實施例中針對巨集子流和\或腳本流進行病毒碼的匹配方法更有針對性,提高了搜索巨集病毒的效率。 In this embodiment, the macro virus feature set is preset, including at least one macro virus feature, and secondly, by determining whether there is a macro identifier in the obtained data stream, determining whether to further search for the macro virus, there is a huge in the data flow. In the case of the set identifier, determining whether the to-be-checked document includes a macro sub-flow and a script stream, and further determining whether the macro sub-flow and the script stream include any macro-virus feature in the macro-virus feature group, thereby determining The document to be checked is a macro virus document or a non-toxic document. Compared with the prior art, the method for matching the virus code for the macro substream and the script stream is more targeted in this embodiment, and the efficiency of searching for the macro virus is improved.

本發明另提供一實施例,將從巨集病毒查殺裝置的角度進行描述,上述巨集病毒查殺的裝置具體可以集成在用戶端中。上述用戶端可以裝載在終端中,上述終端具體可以為智慧手機、平板電腦、電子書閱讀器、MP3(Moving Picture Experts Group Audio Layer III,動態影像專家壓縮標準音頻層面3)播放機、MP4(Moving Picture Experts Group Audio Layer IV,動態影像專家壓縮標準音頻層面3)播放機、膝上型可攜式電腦和桌上型電腦等等。 The present invention further provides an embodiment, which is described from the perspective of a macro virus killing device, and the device for killing the macro virus may be integrated into the user end. The user terminal can be loaded in the terminal, and the terminal can be a smart phone, a tablet computer, an e-book reader, a MP3 (Moving Picture Experts Group Audio Layer III) player, and an MP4 (Moving). Picture Experts Group Audio Layer IV, motion imaging experts compress standard audio layers 3) players, laptops, laptops and desktops.

圖6為本發明之另一實施例之巨集病毒查殺的裝置結構圖。請參考圖6。本實施例所提供之巨集病毒查殺的裝置結構包括:第一獲取模組601,用於獲取待查文檔的數據流;第一判斷模組602,用於在所述 數據流中存在巨集標識的情況下,判斷所述待查文檔是否為巨集病毒文檔;轉化模組603,用於在第一判斷模組602的結果為是時,將巨集病毒文檔轉化成無毒文檔。所述第一判斷模組602,具體用於在所述數據流中存在巨集標識的情況下,判斷所述待查文檔是否包括所述巨集病毒特徵組中的任一巨集病毒特徵。 FIG. 6 is a structural diagram of a device for killing a macro virus according to another embodiment of the present invention. Please refer to Figure 6. The device structure of the macro virus detection and killing provided in this embodiment includes: a first obtaining module 601, configured to acquire a data stream of the document to be inspected; and a first determining module 602, configured to In the case that there is a macro identifier in the data stream, it is determined whether the to-be-checked document is a macro virus document; and the conversion module 603 is configured to convert the macro virus document when the result of the first determining module 602 is YES. Become a non-toxic document. The first determining module 602 is specifically configured to: if the macro identifier exists in the data stream, determine whether the to-be-checked document includes any macro virus feature in the macro virus feature set.

圖7為本發明之另一實施例之所述第一判斷模組602的結構圖。請參考圖7。上述第一判斷模組602的結構具體可以包括:第一判斷子模組701,用於在所述待查文檔包括巨集子流的情況下,判斷所述巨集子流中是否包括所述巨集病毒特徵組中的任一巨集病毒特徵;第二判斷子模組702,用於在所述待查文檔不包括巨集子流或者所述巨集子流中不包括所述巨集病毒特徵組中的任一巨集病毒特徵的情況下,判斷所述待查文檔是否包括腳本流;以及第三判斷子模組703,用於在所述第二判斷子模組的結果為是時,判斷所述腳本流是否包括所述巨集病毒特徵組中的任一巨集病毒特徵。 FIG. 7 is a structural diagram of the first determining module 602 according to another embodiment of the present invention. Please refer to Figure 7. The first determining module 602 may specifically include: a first determining sub-module 701, configured to determine, in the case where the to-be-checked document includes a macro substream, whether the macro substream includes the a macro virus signature of the macro virus signature group; the second judging submodule 702, configured to not include the macro in the to-be-checked document that does not include the macro substream or the macro substream In the case of any macro virus feature in the virus feature group, determining whether the to-be-checked document includes a script stream; and the third determining sub-module 703, the result of the second determining sub-module being And determining whether the script stream includes any macro virus feature in the macro virus feature set.

圖8為本發明之另一實施例之所述第一判斷模組602的結構圖之一。請參考圖8。上述第一判斷模組602的結構具體可以包括:第四判斷子模組801,用於在所述待查文檔包括腳本流的情況下,判斷所述腳本流中是否包括所述巨集病毒特徵組中的任一巨集病毒特徵;第五判斷子模組802,用於在所述待查文檔不包括腳本流或者所述腳本流中不包括所述巨集病毒特徵組中的任一巨集病毒特徵的情況下,判斷所述待查文檔是否包括巨集子流。第六判斷子模組803,用於在所述第五判斷子模組的結果為是時,判斷所述巨集子流是否包括所述巨集病毒特徵組中的任一巨集病毒特徵。 FIG. 8 is a structural diagram of the first determining module 602 according to another embodiment of the present invention. Please refer to Figure 8. The structure of the foregoing first determining module 602 may specifically include: a fourth determining sub-module 801, configured to determine whether the macro virus feature is included in the script stream if the to-be-checked document includes a script stream Any macro virus feature in the group; the fifth determining sub-module 802, configured to not include any one of the macro virus feature groups in the document to be inspected that does not include a script stream or the script stream In the case of collecting virus signatures, it is determined whether the to-be-checked document includes a macro substream. The sixth determining submodule 803 is configured to determine, when the result of the fifth determining submodule is YES, whether the macro substream includes any macro virus feature in the macro virus feature set.

此外,上述轉化模組603,可以包括:第一刪除子模組,用於刪除所述巨集病毒文檔中的巨集資訊,所述巨集資訊包括巨集子流和\或腳本流;第二刪除子模組,用於刪除所述巨集病毒文檔中的巨集標識;確 定子模組,用於將所述巨集病毒文檔確定為無毒文檔。 In addition, the foregoing conversion module 603 may include: a first deletion sub-module, configured to delete macro information in the macro virus document, where the macro information includes a macro sub-flow and a script flow; Second deleting the sub-module, used to delete the macro identifier in the macro virus document; a stator module for determining the macro virus document as a non-toxic document.

此外,上述裝置還可以包括:預設模組,用於預設巨集病毒特徵組,所述巨集病毒特徵組包括至少一個巨集病毒特徵;以及確定模組,用於在所述數據流中不存在巨集標識的情況下,將所述待查文檔確定為無毒文檔。 In addition, the foregoing apparatus may further include: a preset module, configured to preset a macro virus feature set, the macro virus feature set includes at least one macro virus feature; and a determining module, configured to be in the data flow In the case where there is no macro identifier, the to-be-checked document is determined to be a non-toxic document.

本發明之另一實施例還提供了一種終端,如圖9所示,為了便於說明,僅示出了與本發明實施例相關的部分,具體技術細節未揭示的,請參照本發明實施例方法部分。上述終端可以包括手機、平板電腦、PDA(Personal Digital Assistant,個入數位助理)、POS(Point of Sales,銷售終端)、車載電腦等任意終端設備。圖9的實施例係以終端為手機來作為解說範例。 Another embodiment of the present invention further provides a terminal. As shown in FIG. 9 , for the convenience of description, only parts related to the embodiment of the present invention are shown. If the specific technical details are not disclosed, please refer to the method of the embodiment of the present invention. section. The terminal may include any terminal device such as a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), and a car computer. The embodiment of FIG. 9 uses the terminal as a mobile phone as an illustrative example.

圖9示出的是與本發明之另一實施例所提供的終端相關的手機的部分結構的框圖。請參考圖9。上述手機包括:無線電頻率(Radio Frequency,RF)電路910、記憶體920、輸入單元930、顯示單元940、感測器950、音訊電路960、無線保真(wireless fidelity,WiFi)模組970、處理器980、以及電源990等部件。本領域技術人員可以理解,圖9中示出的手機結構並不構成對手機的限定,可以包括比圖示更多或更少的部件,或者組合某些部件,或者不同的部件佈置。下面結合圖9對手機的各個構成部件進行具體的介紹。 Figure 9 is a block diagram showing a portion of the structure of a handset associated with a terminal provided by another embodiment of the present invention. Please refer to Figure 9. The mobile phone includes: a radio frequency (RF) circuit 910, a memory 920, an input unit 930, a display unit 940, a sensor 950, an audio circuit 960, a wireless fidelity (WiFi) module 970, and processing. Device 980, and components such as power supply 990. It will be understood by those skilled in the art that the structure of the handset shown in FIG. 9 does not constitute a limitation to the handset, and may include more or less components than those illustrated, or some components may be combined, or different components may be arranged. The components of the mobile phone will be specifically described below with reference to FIG.

RF電路910可用於收發資訊或通話過程中,對於信號的接收和發送,特別地,將基地台的下行資訊接收後,給處理器980處理;另外,將設計上行的資料發送給基地台。通常,RF電路包括但不限於天線、至少一個放大器、收發信機、耦合器、低雜訊放大器(Low Noise Amplifier,LNA)、雙工器等。此外,RF電路910還可以透過無線通訊與網路和其他設備通信。上述無線通訊可以使用任一通信標準或協定,包括但不限於全球移動通訊系統(Global System of Mobile communication,GSM)、通用分 組無線服務(General Packet Radio Service,GPRS)、碼分多址(Code Division Multiple Access,CDMA)、寬頻碼分多址(Wideband Code Division Multiple Access,WCDMA)、長期演進(Long Term Evolution,LTE))、電子郵件、短消息服務(Short Messaging Service,SMS)等。 The RF circuit 910 can be used for transmitting and receiving information or during a call. For receiving and transmitting signals, in particular, after receiving the downlink information of the base station, the processor 980 processes the data. In addition, the uplink data is sent to the base station. Generally, RF circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuit 910 can also communicate with the network and other devices via wireless communication. The above wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), universal points. General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE) , email, Short Messaging Service (SMS), etc.

記憶體920可用於存儲軟體程式以及模組,處理器980透過運行存儲在記憶體920的軟體程式以及模組,從而執行手機的各種功能應用以及資料處理。記憶體920可主要包括存儲程式區和存儲資料區,其中,存儲程式區可存儲作業系統、至少一個功能所需的應用程式(比如聲音播放功能、圖像播放功能等)等;存儲資料區可存儲根據手機的使用所創建的資料(比如音訊資料、電話本等)等。此外,記憶體920可以包括高速隨機存取記憶體,還可以包括非揮發性記憶體,例如至少一個磁碟記憶體件、快閃記憶體元件、或其他揮發性固態記憶體元件。 The memory 920 can be used to store software programs and modules. The processor 980 executes various software applications and data processing of the mobile phone by running software programs and modules stored in the memory 920. The memory 920 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.); and the storage data area may be Stores data created based on the use of the phone (such as audio data, phone book, etc.). In addition, memory 920 can include high speed random access memory, and can also include non-volatile memory, such as at least one disk memory component, flash memory component, or other volatile solid state memory component.

輸入單元930可用於接收輸入的數位或字元資訊,以及產生與手機900的用戶設置以及功能控制有關的鍵信號輸入。具體地,輸入單元930可包括觸控面板931以及其他輸入裝置932。觸控面板931,也稱為觸控式螢幕,可收集用戶在其上或附近的觸摸操作(比如用戶使用手指、觸筆等任何適合的物體或附件在觸控面板931上或在觸控面板931附近的操作),並根據預先設定的程式驅動相應的連接裝置。可選的,觸控面板931可包括觸摸檢測裝置和觸摸控制器兩個部分。其中,觸摸檢測裝置檢測使用者的觸摸方位,並檢測觸摸操作帶來的信號,將信號傳送給觸摸控制器;觸摸控制器從觸摸檢測裝置上接收觸摸資訊,並將它轉換成觸點座標,再送給處理器980,並能接收處理器980發來的命令並加以執行。此外,可以採用電阻式、電容式、紅外線以及表面聲波等多種類型實現觸控面板931。除了觸控面板931,輸入單元930還可以包括其他輸入裝置932。具體地,其他輸入裝置932可以包括但不限於物理鍵盤、功能鍵(比如音量控制按鍵、開關按鍵等)、軌跡球、滑鼠、操作杆等中的一種或多種。 The input unit 930 can be configured to receive input digit or character information and to generate key signal inputs related to user settings and function control of the handset 900. Specifically, the input unit 930 may include a touch panel 931 and other input devices 932. The touch panel 931, also referred to as a touch screen, can collect touch operations on or near the user (such as a user using a finger, a stylus, or the like on the touch panel 931 or on the touch panel. Operation near 931), and drive the corresponding connection device according to a preset program. Optionally, the touch panel 931 can include two parts: a touch detection device and a touch controller. Wherein, the touch detection device detects the touch orientation of the user, detects a signal brought by the touch operation, and transmits a signal to the touch controller; the touch controller receives the touch information from the touch detection device and converts it into a contact coordinate, The processor 980 is again sent and can receive commands from the processor 980 and execute them. In addition, the touch panel 931 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 931, the input unit 930 may also include other input devices 932. Specifically, other input devices 932 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.

顯示單元940可用於顯示由使用者輸入的資訊或提供給使用者的資訊以及手機的各種功能表。顯示單元940可包括顯示面板941,可選的,可以採用液晶顯示器(Liquid Crystal Display,LCD)、有機發光二極體(Organic Light-Emitting Diode,OLED)等形式來配置顯示面板941。進一步的,觸控面板931可覆蓋顯示面板941,當觸控面板931檢測到在其上或附近的觸摸操作後,傳送給處理器980以確定觸摸事件的類型,隨後處理器980根據觸摸事件的類型在顯示面板941上提供相應的視覺輸出。雖然在圖9中,觸控面板931與顯示面板941是作為兩個獨立的部件來實現手機的輸入和輸入功能,但是在某些實施例中,可以將觸控面板931與顯示面板941集成而實現手機的輸入和輸出功能。 The display unit 940 can be used to display information input by the user or information provided to the user and various function tables of the mobile phone. The display unit 940 can include a display panel 941. Alternatively, the display panel 941 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. Further, the touch panel 931 can cover the display panel 941. When the touch panel 931 detects a touch operation on or near the touch panel 931, the touch panel 931 transmits to the processor 980 to determine the type of the touch event, and then the processor 980 according to the touch event. The type provides a corresponding visual output on display panel 941. Although the touch panel 931 and the display panel 941 are used as two independent components to implement the input and input functions of the mobile phone in FIG. 9, in some embodiments, the touch panel 931 and the display panel 941 may be integrated. Realize the input and output functions of the phone.

手機900還可包括至少一種感測器950,比如光感測器、運動感測器以及其他感測器。具體地,光感測器可包括環境光感測器及接近感測器,其中,環境光感測器可根據環境光線的明暗來調節顯示面板941的亮度,接近感測器可在手機移動到耳邊時,關閉顯示面板941和/或背光。作為運動感測器的一種,加速計感測器可檢測各個方向上(一般為三軸)加速度的大小,靜止時可檢測出重力的大小及方向,可用於識別手機姿態的應用(比如橫豎屏切換、相關遊戲、磁力計姿態校準)、振動識別相關功能(比如計步器、敲擊)等;至於手機還可配置的陀螺儀、氣壓計、濕度計、溫度計、紅外線感測器等其他感測器,在此不再贅述。 The handset 900 can also include at least one sensor 950, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 941 according to the brightness of the ambient light, and the proximity sensor may move to the mobile phone to When the ear is closed, the display panel 941 and/or the backlight are turned off. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is still, it can detect the magnitude and direction of gravity. It can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen). Switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. The detector will not be described here.

音訊電路960、揚聲器961,傳聲器962可提供用戶與手機之間的音訊介面。音訊電路960可將接收到的音訊資料轉換後的電信號,傳輸到揚聲器961,由揚聲器961轉換為聲音信號輸出;另一方面,傳聲器962將收集的聲音信號轉換為電信號,由音訊電路960接收後轉換為音訊資料,再將音訊資料輸出處理器980處理後,經RF電路910以發送給比如另一手機,或者將音訊資料輸出至記憶體920以便進一步處理。 The audio circuit 960, the speaker 961, and the microphone 962 can provide an audio interface between the user and the mobile phone. The audio circuit 960 can transmit the received electrical signal converted to the audio data to the speaker 961, and is converted into a sound signal output by the speaker 961. On the other hand, the microphone 962 converts the collected sound signal into an electrical signal, and the audio circuit 960 is used by the audio circuit 960. After receiving, the data is converted into audio data, and then processed by the audio data output processor 980, sent to the mobile phone 910 via the RF circuit 910, or output to the memory 920 for further processing.

WiFi屬於短距離無線傳輸技術,手機透過WiFi模組970可 以說明使用者收發電子郵件、流覽網頁和訪問流式媒體等,它為用戶提供了無線的寬頻互聯網訪問。雖然圖9示出了WiFi模組970,但是可以理解的是,其並不屬於手機900的必須構成,完全可以根據需要在不改變發明的本質的範圍內而省略。 WiFi is a short-range wireless transmission technology, and the mobile phone can be accessed through the WiFi module 970. To illustrate the user's ability to send and receive email, browse web pages, and access streaming media, it provides users with wireless broadband Internet access. Although FIG. 9 shows the WiFi module 970, it can be understood that it does not belong to the essential configuration of the mobile phone 900, and may be omitted as needed within the scope of not changing the essence of the invention.

處理器980是手機的控制中心,利用各種介面和線路連接整個手機的各個部分,透過運行或執行存儲在記憶體920內的軟體程式和/或模組,以及調用存儲在記憶體920內的資料,執行手機的各種功能和處理資料,從而對手機進行整體監控。可選的,處理器980可包括一個或多個處理單元;優選的,處理器980可集成應用處理器和調製解調處理器,其中,應用處理器主要處理作業系統、使用者介面和應用程式等,調製解調處理器主要處理無線通訊。可以理解的是,上述調製解調處理器也可以不集成到處理器980中。 The processor 980 is a control center of the mobile phone, and connects various parts of the entire mobile phone by using various interfaces and lines, by running or executing software programs and/or modules stored in the memory 920, and calling data stored in the memory 920. The mobile phone's various functions and processing data are implemented to monitor the mobile phone as a whole. Optionally, the processor 980 may include one or more processing units; preferably, the processor 980 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, the user interface, and the application. Etc. The modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 980.

手機900還包括給各個部件供電的電源990(比如電池),優選的,電源可以透過電源管理系統與處理器980邏輯相連,從而透過電源管理系統實現管理充電、放電、以及功耗管理等功能。 The mobile phone 900 also includes a power source 990 (such as a battery) for powering various components. Preferably, the power source can be logically coupled to the processor 980 through a power management system to manage functions such as charging, discharging, and power management through the power management system.

儘管未示出,手機900還可以包括攝像頭、藍牙模組等,在此不再贅述。具體在本實施例中,終端中的處理器980會按照如下的指令,將一個或一個以上的應用程式的進程對應的可執行檔載入到記憶體920中,並由處理器980來運行存儲在記憶體920中的應用程式,從而實現各種功能:獲取待查文檔的數據流;在所述數據流中存在巨集標識的情況下,判斷所述待查文檔是否為巨集病毒文檔,如果是,則將所述巨集病毒文檔轉化成無毒文檔。 Although not shown, the mobile phone 900 may further include a camera, a Bluetooth module, and the like, and details are not described herein. Specifically, in this embodiment, the processor 980 in the terminal loads the executable file corresponding to the process of one or more application programs into the memory 920 according to the following instruction, and runs the storage by the processor 980. An application in the memory 920, thereby implementing various functions: obtaining a data stream of the document to be inspected; and if there is a macro identifier in the data stream, determining whether the document to be inspected is a macro virus document, if Yes, the macro virus document is converted into a non-toxic document.

進一步地,所述判斷所述待查文檔是否為巨集病毒文檔之前,還包括:預設巨集病毒特徵組,所述巨集病毒特徵組包括至少一個巨集病毒特徵。 Further, before determining whether the to-be-checked document is a macro virus document, the method further includes: a preset macro virus feature set, where the macro virus feature set includes at least one macro virus feature.

進一步地,所述判斷所述待查文檔是否為巨集病毒文檔,包 括:判斷所述待查文檔是否包括所述巨集病毒特徵組中的任一巨集病毒特徵。 Further, the determining whether the to-be-checked document is a macro virus document, the package And including: determining whether the document to be inspected includes any macro virus feature in the macro virus feature set.

進一步地,所述判斷所述待查文檔是否包括所述巨集病毒特徵組中的任一巨集病毒特徵,包括:在所述待查文檔包括巨集子流的情況下,判斷所述巨集子流中是否包括所述巨集病毒特徵組中的任一巨集病毒特徵;在所述待查文檔不包括巨集子流或者所述巨集子流中不包括所述巨集病毒特徵組中的任一巨集病毒特徵的情況下,判斷所述待查文檔是否包括腳本流,如果是,則判斷所述腳本流是否包括所述巨集病毒特徵組中的任一巨集病毒特徵;或者,在所述待查文檔包括腳本流的情況下,判斷所述腳本流中是否包括所述巨集病毒特徵組中的任一巨集病毒特徵;在所述待查文檔不包括腳本流或者所述腳本流中不包括所述巨集病毒特徵組中的任一巨集病毒特徵的情況下,判斷所述待查文檔是否包括巨集子流,如果是,則判斷所述巨集子流是否包括所述巨集病毒特徵組中的任一巨集病毒特徵。 Further, the determining whether the to-be-checked document includes any macro-virus feature in the macro-virus feature group includes: determining, in the case that the to-be-checked document includes a macro-sub-flow, determining the giant Whether the feature of any macro virus in the macro virus feature group is included in the set substream; and the feature of the macro virus is not included in the document to be checked that does not include the macro substream or the macro substream In the case of any macro virus feature in the group, determining whether the document to be checked includes a script stream, and if so, determining whether the script stream includes any macro virus feature in the macro virus feature group Or determining, in the case that the to-be-checked document includes a script stream, whether the macro-virus feature in the macro-virus feature group is included in the script stream; and the script file is not included in the to-be-checked document. Or if the script stream does not include any macro virus feature in the macro virus feature group, determining whether the to-be-checked document includes a macro substream, and if yes, determining the macro set Whether the stream includes the macro Toxicity characteristics of any group wherein a macro virus.

進一步地,所述方法還包括:在所述數據流中不存在巨集標識的情況下,將所述待查文檔確定為無毒文檔。 Further, the method further includes: determining that the to-be-checked document is a non-toxic document if there is no macro identifier in the data stream.

進一步地,所述將所述巨集病毒文檔轉化成無毒文檔,包括:刪除所述巨集病毒文檔中的巨集資訊,所述巨集資訊包括巨集子流和\或腳本流,以及刪除所述巨集病毒文檔中的巨集標識;將所述巨集病毒文檔確定為無毒文檔。 Further, the converting the macro virus document into a non-toxic document comprises: deleting macro information in the macro virus document, the macro information including a macro sub-flow and a script stream, and deleting a macro identifier in the macro virus document; determining the macro virus document as a non-toxic document.

本實施例中,獲取待查文檔的數據流後,透過判斷獲取的數據流中是否存在巨集標識,確定是否進一步搜索巨集病毒,在數據流中存在巨集標識的情況下,判斷所述待查文檔是否為巨集病毒文檔,當確定待查文檔為巨集病毒文檔後,將巨集病毒文檔轉化成無毒文檔。本實施例只針對電腦文檔的巨集代碼部分進行巨集病毒的查殺,大大提高巨集病毒的搜索效率。同時,將被感染的電腦文檔中的巨集病毒資訊刪除,使得原電 腦文檔中的資訊被完好保存,防止資訊的丟失。 In this embodiment, after obtaining the data stream of the document to be inspected, determining whether there is a macro identifier in the obtained data stream, determining whether to further search for the macro virus, and if there is a macro identifier in the data stream, determining the Whether the document to be checked is a macro virus document, and when it is determined that the document to be checked is a macro virus document, the macro virus document is converted into a non-toxic document. In this embodiment, the macro virus is only checked and killed for the macro code part of the computer document, and the search efficiency of the macro virus is greatly improved. At the same time, the macro virus information in the infected computer file is deleted, so that the original electricity The information in the brain document is kept intact to prevent loss of information.

進一步的,在數據流中不存在巨集標識的情況下,可以確定待查文檔為無毒文檔,與現有技術中透過搜索全文確定無病毒碼代碼的方法確定無毒文檔的方法相比,本發明提高了確定電腦文檔無巨集病毒的效率。 Further, in the case that the macro identifier does not exist in the data stream, it may be determined that the to-be-checked document is a non-toxic document, and the present invention is improved compared with the method for determining a non-toxic document by searching the full-text to determine the virus-free code by searching the full text in the prior art. Determine the efficiency of computer files without macro viruses.

進一步的,本發明首先判斷待查文檔中是否包括巨集子流和\或腳本流,其次針對巨集子流和\或腳本流進行病毒碼的匹配的方法,確定巨集病毒文檔,與現有技術相比,本發明針對巨集子流和\或腳本流搜索巨集病毒的方法更有針對性,同時也提高了搜索巨集病毒的效率。 Further, the present invention first determines whether a macro substream and a script stream are included in the document to be checked, and secondly, a method for matching the virus code by the macro substream and the script stream, and determining the macro virus document and the existing Compared with the technology, the present invention is more targeted to the macro substream and/or the script stream to search for the macro virus, and also improves the efficiency of the search macro virus.

更進一步的,本發明透過將巨集病毒文檔中巨集資訊和巨集標識刪除的方法,實現了巨集病毒文檔轉化為無毒文檔,與現有技術的直接刪除巨集病毒文檔的方法相比,本發明有效防止了原文檔資訊的丟失。 Further, the present invention realizes the conversion of the macro virus document into a non-toxic document by deleting the macro information and the macro identifier in the macro virus document, compared with the prior art method for directly deleting the macro virus document. The invention effectively prevents the loss of the original document information.

需要說明的是,本說明書中各個實施例採用遞進的方式描述,每個實施例重點說明的都是與其他實施例的不同之處,各個實施例之間相同相似部分互相參見即可。對於實施例公開的系統或裝置而言,由於其與實施例公開的方法相對應,所以描述的比較簡單,相關之處參見方法部分說明即可。 It should be noted that the various embodiments in the present specification are described in a progressive manner, and each embodiment focuses on differences from other embodiments, and the same similar parts between the various embodiments may be referred to each other. For the system or device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

對於裝置實施例而言,由於其基本對應於方法實施例,所以相關之處參見方法實施例的部分說明即可。以上所描述的裝置實施例僅僅是示意性的,其中所述作為分離部件說明的單元可以是或者也可以不是物理上分開的,作為單元顯示的部件可以是或者也可以不是物理單元,即可以位於一個地方,或者也可以分佈到多個網路單元上。可以根據實際的需要選擇其中的部分或者全部模組來實現本實施例方案的目的。本領域普通技術人員在不付出創造性勞動的情況下,即可以理解並實施。 For the device embodiment, since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment. The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without any creative effort.

需要說明的是,在本文中,諸如第一和第二等之類的關係術語僅僅用來將一個實體或者操作與另一個實體或操作區分開來,而不一定 要求或者暗示這些實體或操作之間存在任何這種實際的關係或者順序。而且,術語“包括”、“包含”或者其任何其他變體意在涵蓋非排他性的包含,從而使得包括一系列要素的過程、方法、物品或者設備不僅包括那些要素,而且還包括沒有明確列出的其他要素,或者是還包括為這種過程、方法、物品或者設備所固有的要素。在沒有更多限制的情況下,由語句“包括一個......”限定的要素,並不排除在包括所述要素的過程、方法、物品或者設備中還存在另外的相同要素。 It should be noted that, in this context, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and not necessarily It is required or implied that there is any such actual relationship or order between these entities or operations. Furthermore, the term "comprises" or "comprises" or "comprises" or any other variations thereof is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device that comprises a plurality of elements includes not only those elements but also Other elements, or elements that are inherent to such a process, method, item, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.

以上對本發明實施例所提供的巨集病毒查殺的方法和裝置進行了詳細介紹,本文中應用了具體個例對本發明的原理及實施方式進行了闡述,以上實施例的說明只是用於幫助理解本發明的方法及其核心思想;同時,對於本領域的一般技術人員,依據本發明的思想,在具體實施方式及應用範圍上均會有改變之處,綜上所述,本說明書內容不應理解為對本發明的限制。 The method and apparatus for detecting and killing a macro virus provided by the embodiments of the present invention are described in detail. The principles and implementation manners of the present invention are described in the following. The description of the above embodiments is only used to help understanding. The method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and the scope of application. It is understood to be a limitation of the invention.

101~103‧‧‧圖1的方法流程步驟 101~103‧‧‧ Method flow steps of Figure 1.

Claims (12)

一種巨集病毒查殺的方法,包括:獲取一待查文檔的一數據流;以及在該數據流中存在一巨集標識的情況下,判斷該待查文檔是否為一巨集病毒文檔,如果是,則將該巨集病毒文檔轉化成一無毒文檔。 A method for detecting a macro virus includes: acquiring a data stream of a document to be inspected; and determining whether the document to be inspected is a macro virus document if a macro identifier exists in the data stream; Yes, the macro virus document is converted into a non-toxic document. 如申請專利範圍第1項所述之巨集病毒查殺的方法,其中判斷該待查文檔是否為該巨集病毒文檔之前,還包括:預設一巨集病毒特徵組,其中該巨集病毒特徵組包括至少一個巨集病毒特徵。 The method for detecting a macro virus according to the first aspect of the patent application, wherein determining whether the document to be inspected is the macro virus document further comprises: presetting a macro virus characteristic group, wherein the macro virus The feature set includes at least one macro virus signature. 如申請專利範圍第2項所述之巨集病毒查殺的方法,其中判斷該待查文檔是否為該巨集病毒文檔,包括:判斷該待查文檔是否包括該巨集病毒特徵組中的任一該巨集病毒特徵。 The method for detecting a macro virus as described in claim 2, wherein determining whether the document to be inspected is the macro virus file comprises: determining whether the document to be inspected includes any of the macro virus feature groups One of the macro virus features. 如申請專利範圍第3項所述之巨集病毒查殺的方法,其中判斷該待查文檔是否包括該巨集病毒特徵組中的任一該巨集病毒特徵,包括:在該待查文檔包括一巨集子流的情況下,判斷一巨集子流中是否包括該巨集病毒特徵組中的任一該巨集病毒特徵;在該待查文檔不包括該巨集子流或者該巨集子流中不包括該巨集病毒特徵組中的任一該巨集病毒特徵的情況下,判斷該待查文檔是否包括一腳本流,如果是,則判斷該腳本流是否包括該巨集病毒特徵組中的任一該巨集病毒特徵;或者,在該待查文檔包括腳本流的情況下,判斷該腳本流中是否包括該巨集病毒特徵組中的任一該巨集病毒特徵;以及 在該待查文檔不包括該腳本流或者該腳本流中不包括該巨集病毒特徵組中的任一該巨集病毒特徵的情況下,判斷該待查文檔是否包括該巨集子流,如果是,則判斷該巨集子流是否包括該巨集病毒特徵組中的任一該巨集病毒特徵。 The method for detecting a macro virus as described in claim 3, wherein determining whether the document to be inspected includes any of the macro virus features in the macro virus feature group comprises: including, in the document to be inspected In the case of a macro substream, it is determined whether a macro virus signature is included in the macro current stream, and the macro virus stream or the macro is not included in the to-be-checked document. If the sub-flow does not include any of the macro virus features in the macro virus feature group, determine whether the to-be-checked document includes a script stream, and if yes, determine whether the script stream includes the macro virus feature. Any of the macro virus features in the group; or, if the document to be checked includes a script stream, determining whether the macro virus feature of the macro virus feature group is included in the script stream; If the document to be inspected does not include the script stream or the script stream does not include any of the macro virus signatures in the macro virus feature group, determine whether the to-be-checked document includes the macro substream, and if If yes, it is determined whether the macro substream includes any of the macro virus features in the macro virus feature set. 如申請專利範圍第1項所述之巨集病毒查殺的方法,還包括:在該數據流中不存在該巨集標識的情況下,將該待查文檔確定為該無毒文檔。 The method for detecting a macro virus according to the first aspect of the patent application, further comprising: determining, in the case where the macro identifier does not exist in the data stream, determining the to-be-checked document as the non-toxic document. 如申請專利範圍第1項所述之巨集病毒查殺的方法,其中將該巨集病毒文檔轉化成該無毒文檔,包括:刪除該巨集病毒文檔中的一巨集資訊,該巨集資訊包括一巨集子流和\或一腳本流,以及刪除該巨集病毒文檔中的該巨集標識;以及將該巨集病毒文檔確定為該無毒文檔。 The method for detecting a macro virus according to claim 1, wherein the macro virus document is converted into the non-toxic document, including: deleting a macro information in the macro virus document, the macro information Include a macro substream and/or a script stream, and delete the macro identifier in the macro virus document; and determine the macro virus document as the non-toxic document. 一種巨集病毒查殺的裝置,包括:一第一獲取模組,用於獲取一待查文檔的一數據流;一第一判斷模組,用於在該數據流中存在一巨集標識的情況下,判斷該待查文檔是否為一巨集病毒文檔;以及一轉化模組,用於在該第一判斷模組的一結果為是時,將該巨集病毒文檔轉化成一無毒文檔。 An apparatus for detecting and killing a macro virus includes: a first acquiring module, configured to acquire a data stream of a document to be inspected; and a first determining module, configured to have a macro identifier in the data stream In the case, it is determined whether the document to be inspected is a macro virus document; and a conversion module is configured to convert the macro virus document into a non-toxic document when a result of the first determining module is YES. 如申請專利範圍第7項所述之巨集病毒查殺的裝置,還包括:一預設模組,用於預設一巨集病毒特徵組,該巨集病毒特徵組包括至少一個巨集病毒特徵。 The device for detecting a macro virus according to the seventh aspect of the patent application, further comprising: a preset module, configured to preset a macro virus feature set, wherein the macro virus feature group includes at least one macro virus feature. 如申請專利範圍第8項所述之巨集病毒查殺的裝置,其中該第一判斷模組具體用於:在該數據流中存在該巨集標識的情況下,判斷該待查文檔是否包括該巨集病毒特徵組中的任一該巨集病毒特徵。 The apparatus for detecting a macro virus according to the eighth aspect of the patent application, wherein the first determining module is specifically configured to: if the macro identifier exists in the data stream, determine whether the to-be-checked document includes Any of the macro virus signatures in the macrovirus signature set. 如申請專利範圍第9項所述之巨集病毒查殺的裝置,其中該第一判斷模組包括:一第一判斷子模組,用於在該待查文檔包括一巨集子流的情況下,判斷一巨集子流中是否包括該巨集病毒特徵組中的任一該巨集病毒特徵;一第二判斷子模組,用於在該待查文檔不包括該巨集子流或者該巨集子流中不包括該巨集病毒特徵組中的任一該巨集病毒特徵的情況下,判斷該待查文檔是否包括一腳本流;一第三判斷子模組,用於在該第二判斷子模組的一結果為是時,判斷該腳本流是否包括該巨集病毒特徵組中的任一巨集病毒特徵;或者,一第四判斷子模組,用於在該待查文檔包括該腳本流的情況下,判斷該腳本流中是否包括該巨集病毒特徵組中的任一該巨集病毒特徵;一第五判斷子模組,用於在該待查文檔不包括該腳本流或者該腳本流中不包括該巨集病毒特徵組中的任一該巨集病毒特徵的情況下,判斷該待查文檔是否包括該巨集子流;以及一第六判斷子模組,用於在該第五判斷子模組的一結果為是時,判斷該巨集子流是否包括該巨集病毒特徵組中的任一該巨集病毒特徵。 The device for detecting a macro virus according to claim 9 , wherein the first determining module comprises: a first determining submodule, wherein the document to be checked includes a macro substream And determining, in a macro current stream, whether the macro virus feature is included in the macro virus feature group; and a second determining submodule, configured to not include the macro current stream in the to-be-checked document or If the macro-sub-stream does not include any of the macro-virus features in the macro-virus feature group, determining whether the to-be-checked document includes a script stream; and a third determining sub-module for When a result of the second determining sub-module is YES, determining whether the script stream includes any macro virus feature in the macro virus feature group; or a fourth determining sub-module for checking If the document includes the script stream, determining whether the macro virus feature is included in the macro virus feature group in the script stream; and a fifth determining sub-module for not including the document in the to-be-checked document The script stream or the script stream does not include the macro virus signature group In the case of any of the macro virus features, determining whether the document to be inspected includes the macro substream; and a sixth judging module for using a result of the fifth judging submodule And determining whether the macro substream includes any of the macro virus features in the macro virus feature set. 如申請專利範圍第7項所述之巨集病毒查殺的裝置,還包括:一確定模組,用於在該數據流中不存在該巨集標識的情況下,將該待查文檔確定為該無毒文檔。 The device for detecting a macro virus according to the seventh aspect of the patent application, further comprising: a determining module, configured to determine the document to be checked as if the macro identifier does not exist in the data stream This non-toxic document. 如申請專利範圍第7項所述之巨集病毒查殺的裝置,其中該轉化模組包括:一第一刪除子模組,用於刪除該巨集病毒文檔中的一巨集資訊,該巨集資訊包括一巨集子流和\或一腳本流;一第二刪除子模組,用於刪除該巨集病毒文檔中的該巨集標識;以及一確定子模組,用於將該巨集病毒文檔確定為該無毒文檔。 The apparatus for detecting a macro virus according to the seventh aspect of the patent application, wherein the conversion module comprises: a first deletion sub-module, configured to delete a macro information in the macro virus document, the giant The set information includes a macro substream and/or a script stream; a second delete submodule for deleting the macro identifier in the macro virus document; and a determining submodule for the giant The set virus document is determined to be the non-toxic document.
TW102146233A 2013-05-13 2013-12-13 Apparatus and method for searching and deleting macro virus TW201443683A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310175309.XA CN103246847B (en) 2013-05-13 2013-05-13 A kind of method and apparatus of macrovirus killing

Publications (1)

Publication Number Publication Date
TW201443683A true TW201443683A (en) 2014-11-16

Family

ID=48926361

Family Applications (1)

Application Number Title Priority Date Filing Date
TW102146233A TW201443683A (en) 2013-05-13 2013-12-13 Apparatus and method for searching and deleting macro virus

Country Status (3)

Country Link
CN (1) CN103246847B (en)
TW (1) TW201443683A (en)
WO (1) WO2014183434A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103246847B (en) * 2013-05-13 2016-03-23 腾讯科技(深圳)有限公司 A kind of method and apparatus of macrovirus killing
CN105488410A (en) * 2015-05-19 2016-04-13 哈尔滨安天科技股份有限公司 Detection method and system of excel macro sheet virus
CN107025407A (en) * 2017-03-22 2017-08-08 国家计算机网络与信息安全管理中心 The malicious code detecting method and system of a kind of office document files
CN109033831A (en) * 2018-06-22 2018-12-18 珠海市君天电子科技有限公司 A kind of method for detecting virus, device, electronic equipment and storage medium
CN111191233A (en) * 2019-07-31 2020-05-22 腾讯科技(深圳)有限公司 Macro virus processing method, macro virus processing device and storage medium
CN111400707A (en) * 2020-03-10 2020-07-10 深信服科技股份有限公司 File macro virus detection method, device, equipment and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5951698A (en) * 1996-10-02 1999-09-14 Trend Micro, Incorporated System, apparatus and method for the detection and removal of viruses in macros
US6577920B1 (en) * 1998-10-02 2003-06-10 Data Fellows Oyj Computer virus screening
US6697950B1 (en) * 1999-12-22 2004-02-24 Networks Associates Technology, Inc. Method and apparatus for detecting a macro computer virus using static analysis
US7210041B1 (en) * 2001-04-30 2007-04-24 Mcafee, Inc. System and method for identifying a macro virus family using a macro virus definitions database
CN101547126B (en) * 2008-03-27 2011-10-12 北京启明星辰信息技术股份有限公司 Network virus detecting method based on network data streams and device thereof
CN102694801B (en) * 2012-05-21 2015-08-05 华为技术有限公司 Method for detecting virus, device and firewall box
CN102841999B (en) * 2012-07-16 2016-12-21 北京奇虎科技有限公司 A kind of file method and a device for detecting macro virus
CN103246847B (en) * 2013-05-13 2016-03-23 腾讯科技(深圳)有限公司 A kind of method and apparatus of macrovirus killing

Also Published As

Publication number Publication date
CN103246847B (en) 2016-03-23
WO2014183434A1 (en) 2014-11-20
CN103246847A (en) 2013-08-14

Similar Documents

Publication Publication Date Title
US9800609B2 (en) Method, device and system for detecting malware in a mobile terminal
CN108364644A (en) A kind of voice interactive method, terminal and computer-readable medium
CN107329985B (en) Page collection method and device and mobile terminal
TW201443683A (en) Apparatus and method for searching and deleting macro virus
WO2015043361A1 (en) Methods, devices, and systems for completing communication between terminals
US20150169874A1 (en) Method, device, and system for identifying script virus
TWI519999B (en) Method and device for optimizing operating environment of terminal
US10956653B2 (en) Method and apparatus for displaying page and a computer storage medium
CN104217172B (en) Privacy content inspection method and device
CN106709346A (en) File processing method and device
CN108595218A (en) A kind of method and apparatus of loading system dynamic base
CN106921791A (en) The storage and inspection method of a kind of multimedia file, device and mobile terminal
WO2019071424A1 (en) Application function control method and terminal
CN106502824A (en) Data back up method and Cloud Server
WO2014166266A1 (en) File scanning method and system, client and server
US20160308879A1 (en) Application-Based Service Providing Method, Apparatus, and System
CN104424203B (en) Photo in mobile device shares state inspection method and system
CN106709340A (en) Virus killing method and device
CN106708555A (en) Method and device for loading plug-ins
CN106954211A (en) A kind of key wiring method and mobile terminal
WO2015067206A1 (en) File searching method and terminal
CN104376235A (en) Archived file package signing method and device
WO2014201839A1 (en) Method and device for searching for parent virus
CN104424321A (en) File directory obtainment method and file directory obtainment device
CN104134044B (en) A kind of detection method, device and system of Information Security