CN104580203A - Website malicious program detection method and device - Google Patents
Website malicious program detection method and device Download PDFInfo
- Publication number
- CN104580203A CN104580203A CN201410856928.XA CN201410856928A CN104580203A CN 104580203 A CN104580203 A CN 104580203A CN 201410856928 A CN201410856928 A CN 201410856928A CN 104580203 A CN104580203 A CN 104580203A
- Authority
- CN
- China
- Prior art keywords
- malicious code
- code
- malicious
- suspected
- website
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/14—Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
- H04L63/1441—Countermeasures against malicious traffic
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/55—Detecting local intrusion or implementing counter-measures
- G06F21/56—Computer malware detection or handling, e.g. anti-virus arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/14—Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
- H04L63/1408—Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
- H04L63/1416—Event detection, e.g. attack signature detection
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computing Systems (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Virology (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Description
技术领域technical field
本发明涉及网络安全技术领域,具体而言,涉及一种的网站恶意程序检测方法、一种的网站恶意程序检测装置、一种网站恶意代码判断方法以及一种网站恶意代码判断装置。The present invention relates to the technical field of network security, in particular, to a method for detecting malicious website programs, a device for detecting malicious website programs, a method for judging malicious codes for websites, and a device for judging malicious codes for websites.
背景技术Background technique
在网络日益发达的今天,网络安全问题已经成为各个网站和用户的关注点。现有的网络安全检测技术,一般是针对用户终端,例如PC、平板电脑、智能手机、智能电视等个人设备的安全检测,并且检测的对象一般也只是针对设备中的文件。Today, as the network is increasingly developed, network security issues have become the focus of various websites and users. Existing network security detection technologies are generally aimed at user terminals, such as personal devices such as PCs, tablet computers, smart phones, and smart TVs, and the detection objects are generally only files in the devices.
虽然上述检测技术能够使得用户终端得到一定的安全保障,但是却无法检测网站存在的安全隐患。黑客除了会恶意攻击用户终端外,还会对各个网站的服务器进行攻击,主要是通过向网站的网页文件中植入恶意代码,例如植入后门程序,或通过恶意代码盗取固有后门程序的进入方式,从而通过后门绕过网站的安全性控制,进而获取访问网站数据的权限,对网站访问用户乃至网站管理者造成极大的安全隐患。Although the above-mentioned detection technology can make the user terminal obtain a certain security guarantee, it cannot detect potential security risks existing in the website. In addition to maliciously attacking user terminals, hackers will also attack the servers of various websites, mainly by implanting malicious codes into the webpage files of the websites, such as implanting backdoor programs, or stealing the entry of inherent backdoor programs through malicious codes. In this way, the security control of the website can be bypassed through the back door, and then the authority to access the website data can be obtained, which will cause great security risks to the website access users and even the website administrator.
发明内容Contents of the invention
本发明所要解决的技术问题是,如何检测网站的网页文件中是否存在恶意代码,从而提示网站的管理者进行相应处理,以保证网站的安全性。The technical problem to be solved by the present invention is how to detect whether there is malicious code in the webpage file of the website, so as to prompt the administrator of the website to deal with it accordingly, so as to ensure the security of the website.
为此目的,本发明提出了一种网站恶意程序检测方法,包括:For this purpose, the present invention proposes a kind of website malicious program detection method, comprises:
获取目标网站的网页文件;Obtain the webpage files of the target website;
根据恶意程序特征库对所述网页文件中的源代码进行检测,识别出所述网页文件中的疑似恶意代码;Detecting the source code in the webpage file according to the malicious program feature library, and identifying the suspected malicious code in the webpage file;
将所述疑似恶意代码和/或网页文件传输至预设服务器,以使所述预设服务器判断所述疑似恶意代码是否为恶意代码;transmitting the suspected malicious code and/or webpage file to a preset server, so that the preset server can determine whether the suspected malicious code is malicious code;
获取所述预设服务器返回的疑似恶意代码判断结果。Obtain the judgment result of the suspected malicious code returned by the preset server.
优选地,还包括:Preferably, it also includes:
根据所述判断结果生成提示信息,以提示所述目标网站是否包含存在恶意代码的网页文件。Prompt information is generated according to the judgment result to prompt whether the target website contains webpage files with malicious codes.
优选地,若判定所述疑似恶意代码为恶意代码,则所述方法还包括:Preferably, if it is determined that the suspected malicious code is malicious code, the method further includes:
根据接收到的第一指令将所述恶意代码添加至白名单,以使被添加至白名单的恶意代码在再次检测源代码时被识别为非恶意代码;Adding the malicious code to the whitelist according to the received first instruction, so that the malicious code added to the whitelist is identified as non-malicious code when the source code is detected again;
或or
根据接收到的第二指令将所述恶意代码添加至黑名单,以使被添加至黑名单的代码在再次检测源代码时被识别为恶意代码。The malicious code is added to the blacklist according to the received second instruction, so that the code added to the blacklist is identified as malicious code when the source code is detected again.
优选地,所述识别出所述网页文件中的疑似恶意代码还包括:Preferably, the identifying suspected malicious code in the webpage file also includes:
查询访问所述疑似恶意代码并将所述疑似恶意代码添加至白名单的用户数目,若所述用户数目大于预设数目,则将所述疑似恶意代码判定为非恶意代码进行提示。Query the number of users who access the suspected malicious code and add the suspected malicious code to the white list, and if the number of users is greater than the preset number, determine the suspected malicious code as non-malicious code and prompt.
本发明还提出了一种网站恶意代码判断方法,包括:The present invention also proposes a method for judging website malicious codes, including:
获取终端判定的疑似恶意代码和/或来自所述终端的网页文件中的疑似恶意代码;Obtaining the suspected malicious code determined by the terminal and/or the suspected malicious code in the webpage file from the terminal;
通过多个引擎分别对所述疑似恶意代码进行检测,根据每个引擎的检测结果判断所述疑似恶意代码是否为恶意代码;The suspected malicious code is detected by multiple engines, and whether the suspected malicious code is malicious code is judged according to the detection result of each engine;
将疑似恶意代码判断结果发送至所述终端。Sending the judgment result of the suspected malicious code to the terminal.
本发明还提出一种网站恶意程序检测装置,包括:The present invention also proposes a website malicious program detection device, comprising:
文件获取单元,用于获取目标网站的网页文件;a file obtaining unit, configured to obtain a web page file of a target website;
识别单元,用于根据恶意程序特征库对所述网页文件中的源代码进行检测,识别出所述网页文件中的疑似恶意代码;An identification unit, configured to detect the source code in the webpage file according to the malicious program feature library, and identify the suspected malicious code in the webpage file;
传输单元,用于将所述疑似恶意代码和/或网页文件传输至服务器,以使所述预设服务器检测所述疑似恶意代码是否为恶意代码;a transmission unit, configured to transmit the suspected malicious code and/or webpage file to a server, so that the preset server can detect whether the suspected malicious code is malicious code;
结果获取单元,用于获取所述预设服务器返回的疑似恶意代码检测结果。The result obtaining unit is configured to obtain the suspected malicious code detection result returned by the preset server.
优选地,还包括:Preferably, it also includes:
提示单元,用于根据所述判断结果生成提示信息,以提示所述目标网站是否包含存在恶意代码的网页文件。A prompting unit, configured to generate prompt information according to the judgment result, so as to prompt whether the target website contains webpage files with malicious codes.
优选地,还包括:Preferably, it also includes:
添加单元,在所述疑似恶意代码为恶意代码的情况下,根据接收到的第一指令将所述恶意代码添加至白名单,以使被添加至白名单的代码在再次检测源代码时被识别为非恶意代码;Adding unit, if the suspected malicious code is malicious code, add the malicious code to the white list according to the received first instruction, so that the code added to the white list can be identified when the source code is detected again is non-malicious code;
或or
在所述疑似恶意代码为恶意代码的情况下,根据接收到的第二指令将所述恶意代码添加至黑名单,以使被添加至黑名单的代码在再次检测源代码时被识别为恶意代码。In the case that the suspected malicious code is malicious code, add the malicious code to the blacklist according to the received second instruction, so that the code added to the blacklist is identified as malicious code when the source code is detected again .
优选地,还包括:Preferably, it also includes:
查询单元,用于查询所述疑似恶意代码被特定用户访问的次数,若被所述特定用户访问的次数大于预设次数,则将所述疑似恶意代码判定为非恶意代码进行提示。The query unit is configured to query the number of times the suspected malicious code has been accessed by a specific user, and if the number of times the suspected malicious code has been accessed by the specific user is greater than a preset number of times, then determine the suspected malicious code as non-malicious code and give a prompt.
本发明还除了一种网站恶意代码判断装置,包括:In addition to a website malicious code judging device, the present invention includes:
代码获取单元,用于获取终端判定的疑似恶意代码和/或来自所述终端的网页文件中的疑似恶意代码;a code acquiring unit, configured to acquire the suspected malicious code determined by the terminal and/or the suspected malicious code in the webpage file from the terminal;
检测单元,用于通过多个引擎分别对所述疑似恶意代码进行检测,根据每个引擎的检测结果判断所述疑似恶意代码是否为恶意代码;A detection unit, configured to detect the suspected malicious code through multiple engines, and judge whether the suspected malicious code is malicious code according to the detection results of each engine;
发送单元,用于将疑似恶意代码判断结果发送至所述终端。A sending unit, configured to send the judgment result of the suspected malicious code to the terminal.
根据上述技术方案,至少能够实现以下技术效果:According to the above technical solution, at least the following technical effects can be achieved:
1、通过疑似恶意代码和恶意代码的逐层检测,可以准确地检测出网页文件中是否存在恶意代码,进而为网站的安全性提供准确的提示;1. Through the layer-by-layer detection of suspected malicious code and malicious code, it can accurately detect whether there is malicious code in the web page file, and then provide accurate tips for the security of the website;
2、能够根据接收到的指令为恶意代码添加不同的标识,将恶意代码添加至白名单或黑名单,从而在再次检测源代码时,无需对添加标识的代码进行再次匹配,即可快速确定代码的类型,进而进行提示;2. Able to add different identifications to malicious codes according to the received instructions, and add malicious codes to the whitelist or blacklist, so that when the source code is detected again, the code can be quickly determined without matching the code with the added identification again type, and then prompt;
3、通过多个引擎综合检测恶意代码,可以更加全面且准确的判断疑似恶意代码是否为恶意代码,从而得到更加准确的判断结果进行提示。3. By comprehensively detecting malicious codes through multiple engines, it is possible to judge more comprehensively and accurately whether the suspected malicious codes are malicious codes, so as to obtain more accurate judgment results for prompting.
附图说明Description of drawings
通过参考附图会更加清楚的理解本发明的特征和优点,附图是示意性的而不应理解为对本发明进行任何限制,在附图中:The features and advantages of the present invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the invention in any way. In the accompanying drawings:
图1示出了根据本发明一个实施例的网站恶意程序检测方法的示意流程图;FIG. 1 shows a schematic flowchart of a method for detecting malicious programs on a website according to an embodiment of the present invention;
图2示出了根据本发明一个实施例的网站恶意代码判断方法的示意流程图;FIG. 2 shows a schematic flowchart of a method for judging malicious code of a website according to an embodiment of the present invention;
图3示出了根据本发明一个实施例的网站恶意程序检测装置的示意框图;Fig. 3 shows a schematic block diagram of a website malicious program detection device according to an embodiment of the present invention;
图4示出了根据本发明一个实施例的网站恶意代码判断装置的示意框图;FIG. 4 shows a schematic block diagram of a website malicious code judging device according to an embodiment of the present invention;
图5示出了根据本发明一个实施例的网站恶意程序检测装置和网站恶意代码判断装置的交互示意图。Fig. 5 shows a schematic diagram of interaction between a website malicious program detection device and a website malicious code judgment device according to an embodiment of the present invention.
具体实施方式Detailed ways
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能解释为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals designate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary only for explaining the present invention and should not be construed as limiting the present invention.
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本发明的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。应该理解,当我们称元件被“连接”或“耦接”到另一元件时,它可以直接连接或耦接到其他元件,或者也可以存在中间元件。此外,这里使用的“连接”或“耦接”可以包括无线连接或无线耦接。这里使用的措辞“和/或”包括一个或更多个相关联的列出项的全部或任一单元和全部组合。Those skilled in the art will understand that unless otherwise stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the word "comprising" used in the description of the present invention refers to the presence of said features, integers, steps, operations, elements and/or components, but does not exclude the presence or addition of one or more other features, Integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Additionally, "connected" or "coupled" as used herein may include wireless connection or wireless coupling. The expression "and/or" used herein includes all or any elements and all combinations of one or more associated listed items.
本技术领域技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语),具有与本发明所属领域中的普通技术人员的一般理解相同的意义。还应该理解的是,诸如通用字典中定义的那些术语,应该被理解为具有与现有技术的上下文中的意义一致的意义,并且除非像这里一样被特定定义,否则不会用理想化或过于正式的含义来解释。Those skilled in the art can understand that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art to which this invention belongs. It should also be understood that terms, such as those defined in commonly used dictionaries, should be understood to have meanings consistent with their meaning in the context of the prior art, and unless specifically defined as herein, are not intended to be idealized or overly Formal meaning to explain.
本技术领域技术人员可以理解,这里所使用的“终端”、“终端设备”既包括无线信号接收器的设备,其仅具备无发射能力的无线信号接收器的设备,又包括接收和发射硬件的设备,其具有能够在双向通信链路上,执行双向通信的接收和发射硬件的设备。这种设备可以包括:蜂窝或其他通信设备,其具有单线路显示器或多线路显示器或没有多线路显示器的蜂窝或其他通信设备;PCS(PersonalCommunications Service,个人通信系统),其可以组合语音、数据处理、传真和/或数据通信能力;PDA(Personal Digital Assistant,个人数字助理),其可以包括射频接收器、寻呼机、互联网/内联网访问、网络浏览器、记事本、日历和/或GPS(Global Positioning System,全球定位系统)接收器;常规膝上型和/或掌上型计算机或其他设备,其具有和/或包括射频接收器的常规膝上型和/或掌上型计算机或其他设备。这里所使用的“终端”、“终端设备”可以是便携式、可运输、安装在交通工具(航空、海运和/或陆地)中的,或者适合于和/或配置为在本地运行,和/或以分布形式,运行在地球和/或空间的任何其他位置运行。这里所使用的“终端”、“终端设备”还可以是通信终端、上网终端、音乐/视频播放终端,例如可以是PDA、MID(Mobile InternetDevice,移动互联网设备)和/或具有音乐/视频播放功能的移动电话,也可以是智能电视、机顶盒等设备。Those skilled in the art can understand that the "terminal" and "terminal equipment" used here not only include wireless signal receiver equipment, which only has wireless signal receiver equipment without transmission capabilities, but also include receiving and transmitting hardware. A device having receiving and transmitting hardware capable of performing bi-directional communication over a bi-directional communication link. Such equipment may include: cellular or other communication equipment, which has a single-line display or a multi-line display or a cellular or other communication equipment without a multi-line display; PCS (Personal Communications Service, personal communication system), which can combine voice, data processing , fax and/or data communication capabilities; PDA (Personal Digital Assistant, personal digital assistant), which may include radio frequency receivers, pagers, Internet/Intranet access, web browsers, notepads, calendars and/or GPS (Global Positioning System, Global Positioning System) receiver; a conventional laptop and/or palmtop computer or other device having and/or including a radio frequency receiver. As used herein, a "terminal", "terminal device" may be portable, transportable, installed in a vehicle (air, sea, and/or land), or adapted and/or configured to operate locally, and/or In distributed form, the operation operates at any other location on Earth and/or in space. The "terminal" and "terminal equipment" used here can also be communication terminals, Internet terminals, music/video playback terminals, such as PDA, MID (Mobile Internet Device, mobile Internet device) and/or have music/video playback functions mobile phones, smart TVs, set-top boxes and other devices.
本技术领域技术人员可以理解,这里所使用的服务器、云端、远端网络设备等概念,具有等同效果,其包括但不限于计算机、网络主机、单个网络服务器、多个网络服务器集或多个服务器构成的云。在此,云由基于云计算(Cloud Computing)的大量计算机或网络服务器构成,其中,云计算是分布式计算的一种,由一群松散耦合的计算机集组成的一个超级虚拟计算机。本发明的实施例中,远端网络设备、终端设备与WNS服务器之间可通过任何通信方式实现通信,包括但不限于,基于3GPP、LTE、WIMAX的移动通信、基于TCP/IP、UDP协议的计算机网络通信以及基于蓝牙、红外传输标准的近距无线传输方式。Those skilled in the art can understand that the concepts of server, cloud, and remote network equipment used here have equivalent effects, including but not limited to computers, network hosts, single network servers, multiple network server sets, or multiple servers. Composed of clouds. Here, the cloud is composed of a large number of computers or network servers based on cloud computing (Cloud Computing), where cloud computing is a type of distributed computing, a super virtual computer composed of a group of loosely coupled computer sets. In the embodiment of the present invention, the communication between the remote network equipment, the terminal equipment and the WNS server can be realized through any communication method, including but not limited to, mobile communication based on 3GPP, LTE, WIMAX, based on TCP/IP, UDP protocol Computer network communication and short-distance wireless transmission methods based on Bluetooth and infrared transmission standards.
本领域技术人员应当理解,本发明所称的“应用”、“应用程序”、“应用软件”以及类似表述的概念,是业内技术人员所公知的相同概念,是指由一系列计算机指令及相关数据资源有机构造的适于电子运行的计算机软件。除非特别指定,这种命名本身不受编程语言种类、级别,也不受其赖以运行的操作系统或平台所限制。理所当然地,此类概念也不受任何形式的终端所限制。Those skilled in the art should understand that the concepts of "application", "application program", "application software" and similar expressions referred to in the present invention are the same concepts well known to those skilled in the art, and refer to a series of computer instructions and related Computer software that is organically constructed from data resources and suitable for electronic operation. Unless otherwise specified, this naming itself is not limited by the type of programming language, level, or the operating system or platform on which it runs. Naturally, such concepts are also not limited by any form of terminal.
如图1所示,根据本发明一个实施例的网站恶意程序检测方法包括:As shown in Figure 1, the website malicious program detection method according to one embodiment of the present invention includes:
S1,获取目标网站的网页文件;S1, obtaining a webpage file of a target website;
获取操作可以由用户(例如网站管理员)通过图形用户界面完成,图形用户界面中除了包括可供用户指定的目标网站,还可以为用户提供具体网站中待检测的网页文件,使得用户可以根据需要选择相应的网站,以及具体的网页文件,更进一步地,还可以为用户提供具体的检测区域、检测位置、检测路径等,例如用户可以通过用户图形界面指定对目标网站的服务器中全盘文件进行检测,也可以指定仅检测备份区域的文件,亦或仅对某个文件进行检测,从而实现针对性地检测。The acquisition operation can be completed by the user (such as a website administrator) through a graphical user interface. In addition to including the target website that can be specified by the user, the graphical user interface can also provide the user with the webpage files to be detected in the specific website, so that the user can according to the needs. Select the corresponding website and specific webpage files, and further, provide users with specific detection areas, detection locations, detection paths, etc., for example, users can specify to detect all files in the server of the target website through the user graphical interface , you can also specify to detect only files in the backup area, or only detect a certain file, so as to achieve targeted detection.
S2,根据恶意程序特征库对网页文件中的源代码进行检测,识别出网页文件中的疑似恶意代码;S2, detecting the source code in the webpage file according to the malicious program feature library, and identifying the suspected malicious code in the webpage file;
恶意代码的添加,主要是针对网页文件的源代码进行的,例如黑客在网站植入后门(当然,恶意代码包括并不仅限于后门,还可以是木马等电脑病毒)时,利用欺骗的手段,向网站管理员发送电子邮件或者文件,当管理员打开或运行该邮件或文件时,邮件或文件中的程序就会修改网页文件中的源代码,从而在网站的服务器上创建一个后门。The addition of malicious codes is mainly aimed at the source code of webpage files. For example, when hackers implant backdoors in websites (of course, malicious codes include and are not limited to backdoors, they can also be computer viruses such as Trojan horses), they use deception to send The website administrator sends an email or file. When the administrator opens or runs the email or file, the program in the email or file will modify the source code in the web page file, thus creating a backdoor on the website server.
对网页文件的源代码进行检测,可以从恶意程序特征库中提取恶意程序模板对网页文件中的源代码进行匹配,将匹配度大于预设匹配值的代码判定为疑似恶意代码。To detect the source code of the webpage file, the malicious program template can be extracted from the malicious program feature library to match the source code in the webpage file, and the code whose matching degree is greater than the preset matching value is judged as suspected malicious code.
S3,将疑似恶意代码和/或网页文件传输至预设服务器,以使预设服务器判断疑似恶意代码是否为恶意代码;S3, transmitting the suspected malicious code and/or webpage file to a preset server, so that the preset server can determine whether the suspected malicious code is malicious code;
优选地,预设服务器可以是云端服务器,其运算处理能力较强,并可包含多个引擎对疑似恶意代码进行检测,一方面能够减少网站所在服务器的运算处理压力,另一方面能够提高恶意代码的判断准确度。Preferably, the preset server can be a cloud server, which has strong computing and processing capabilities, and can contain multiple engines to detect suspected malicious codes. On the one hand, it can reduce the computing and processing pressure of the server where the website is located, and on the other hand, it can improve accuracy of judgment.
预设服务器除了能够判断疑似恶意代码是否为恶意代码,还可以直接对接收到的网页文件进行检测,识别其中的疑似恶意代码,从而完全执行恶意代码判断的全部操作,进一步减少网站所在服务器的运算处理压力。In addition to being able to judge whether the suspected malicious code is malicious code, the preset server can also directly detect the received webpage files and identify the suspected malicious code, so as to completely execute all operations of malicious code judgment and further reduce the calculation of the server where the website is located Deal with stress.
S4,获取预设服务器返回的疑似恶意代码判断结果。S4. Obtain the judgment result of the suspected malicious code returned by the preset server.
优选地,除了返回判断结果,还可以生成相应的提示信息并返回。Preferably, in addition to returning the judgment result, corresponding prompt information may also be generated and returned.
优选地,还包括:Preferably, it also includes:
根据判断结果生成提示信息,以提示目标网站是否包含存在恶意代码的网页文件。Prompt information is generated according to the judgment result to prompt whether the target website contains webpage files with malicious codes.
提示信息与判断结果相关,例如判定网页文件中存在多处恶意代码,则提示存在恶意代码,且安全系数很低,并标明恶意代码,若判定网页文件中存在一处恶意代码,则提示存在恶意代码,且安全系数较低,并标明恶意代码。当然,提示信息除了包含上述提示内容,还可以包含其他内容,例如提示恶意代码的具体数目,以及恶意代码的具体内容等。The prompt information is related to the judgment result. For example, if it is determined that there are multiple malicious codes in the webpage file, it will prompt that there is malicious code, and the safety factor is very low, and mark the malicious code. If it is determined that there is one malicious code in the webpage file, it will prompt that there is malicious code. Code, and the safety factor is low, and malicious code is marked. Of course, besides the above prompt content, the prompt information may also contain other content, such as the specific number of malicious codes and the specific content of malicious codes.
优选地,若判定疑似恶意代码为恶意代码,则方法还包括:Preferably, if it is determined that the suspected malicious code is malicious code, the method also includes:
根据接收到的第一指令将恶意代码添加至白名单,以使被添加至白名单的代码在再次检测源代码时被识别为非恶意代码;adding the malicious code to the whitelist according to the received first instruction, so that the code added to the whitelist is identified as non-malicious code when the source code is detected again;
或or
根据接收到的第二指令将恶意代码添加至黑名单,以使被添加至黑名单的代码在再次检测源代码时被识别为恶意代码。The malicious code is added to the blacklist according to the received second instruction, so that the code added to the blacklist is identified as malicious code when the source code is detected again.
作为一个示例,恶意代码包括但不限于后门程序,而后门程序主要分为两种,一种是网站管理员在网站开发过程中引入的,网站管理员可以通过这些后门对网站进行测试或者修改程序中的缺陷(以下简称为第一种后门程序),另一种是攻击者通过非法途径植入网站的(以下简称为第二种后门程序)。As an example, malicious code includes but is not limited to backdoor programs, and backdoor programs are mainly divided into two types, one is introduced by the website administrator during the website development process, and the website administrator can test the website or modify the program through these backdoors (hereinafter referred to as the first type of backdoor program), and the other is implanted into the website by attackers through illegal means (hereinafter referred to as the second type of backdoor program).
上述两种后门程序,在检测过程中并无实质差异,所以都会被判定为恶意代码,但是对于第一种后门程序,由于是网站管理员引入的,当被判定为恶意代码提示时,所以网站管理员能够对其进行识别,从而将其添加至白名单,当再次对网页源代码进行检测时,对于白名单中的代码可判定其为网站管理员引入的后门程序,从而直接跳过该段代码,无需对其进行进一步检测。对于第二种后门程序,当被判定为恶意代码提示时,网站管理员可以为其添加至黑名单,当再次对网页源代码进行检测时,对于黑名单中的代码可判定其为恶意的后门程序,从而直接对其进行提示,无需对其进行进一步检测。The above two backdoor programs have no substantial difference in the detection process, so they will be judged as malicious codes, but for the first backdoor program, since it was introduced by the website administrator, when it is judged as malicious code prompt, the website The administrator can identify it and add it to the whitelist. When the source code of the webpage is detected again, it can be determined that the code in the whitelist is a backdoor program introduced by the website administrator, so this section can be skipped directly code without further instrumentation. For the second type of backdoor program, when it is judged as a malicious code prompt, the website administrator can add it to the blacklist, and when the source code of the webpage is detected again, the code in the blacklist can be judged as a malicious backdoor program, prompting it directly without further inspection of it.
通过上述两种标识操作,都可以减少对网页文件源代码的重复检测,从而减少资源消耗,并且可以快速判定网页文件中的恶意代码类型,进行快速且准确地提示。Through the above two identification operations, repeated detection of the source code of the webpage file can be reduced, thereby reducing resource consumption, and the type of malicious code in the webpage file can be quickly determined and quickly and accurately prompted.
优选地,识别出网页文件中的疑似恶意代码还包括:Preferably, identifying the suspected malicious code in the webpage file also includes:
查询访问疑似恶意代码并将疑似恶意代码添加至白名单的用户数目,若用户数目大于预设数目,则将疑似恶意代码判定为非恶意代码进行提示。Query the number of users who access the suspected malicious code and add the suspected malicious code to the white list. If the number of users is greater than the preset number, the suspected malicious code is judged as non-malicious code and prompted.
当超过预设数目的用户将疑似恶意代码添加至白名单时,则可以初步判定该疑似恶意代码的可信度较高,将该疑似恶意代码作为非恶意代码提示给网站管理员进行具体判别,以减少上传至预设服务器进行进一步检测的过程,提高疑似恶意代码的检测效率。When more than the preset number of users add the suspected malicious code to the white list, it can be preliminarily determined that the suspected malicious code has a high degree of credibility, and the suspected malicious code will be presented as non-malicious code to the website administrator for specific identification. In order to reduce the process of uploading to the preset server for further detection, improve the detection efficiency of suspected malicious code.
优选地,当某段疑似恶意代码被网站管理员访问的次数大于预设次数,则可以初步判定其为网站管理员引入的,用于通过其进行测试或者修改程序中的缺陷,然后对初步判定结果进行提示,以减少上传至预设服务器进行进一步检测的过程,提高疑似恶意代码的检测效率。Preferably, when a certain section of suspected malicious code is accessed by the website administrator more than the preset number of times, it can be preliminarily determined that it was introduced by the website administrator, and used for testing or modifying defects in the program through it, and then the preliminary determination The result will be prompted to reduce the process of uploading to the preset server for further detection and improve the detection efficiency of suspected malicious code.
进一步地,本发明还提出的一种恶意程序删除方法,可以针对检测到的恶意程序进行有效删除。例如对于网页图片中存在的恶意程序,可以通过获取网页文件中的图片,检测图片中是否嵌入恶意程序,如果图片中存在恶意程序,则获取图片中恶意程序的位置,并利用填充字符对恶意程序进行替换,从而,及时检测出网站中图片的恶意程序,可对其进行有效的处理,不仅减少了给网站带来的危害的几率,同时提高了网站的安全等级。Furthermore, the present invention also proposes a malicious program deletion method, which can effectively delete detected malicious programs. For example, for a malicious program in a web page image, it is possible to detect whether a malicious program is embedded in the image by obtaining the image in the web page file. Replacement, so that the malicious program of the picture in the website is detected in time, and it can be effectively processed, which not only reduces the probability of harm to the website, but also improves the security level of the website.
为了更好地理解与应用上述删除方法,本发明针对网页中JPEG格式图片进行检测以及查杀恶意程序的具体问题进行示例,但本发明不仅局限以下示例。In order to better understand and apply the above-mentioned deletion method, the present invention gives an example for the specific problems of detecting JPEG format pictures in webpages and checking and killing malicious programs, but the present invention is not limited to the following examples.
JPEG图像漏洞主要涉及操作系统中一个名为GdiPlus.dll的文件,由于众多软件都调用了这个动态链接库处理JPEG图片,使得该漏洞的涉及面非常广。例如,Windows XP SP1、MS Office、QQ2004等。入侵者可以将恶意程序通过这个漏洞原理来插入到图片中,这样存在此漏洞的恶意程序会无条件运行图片中的恶意程序,从而控制受影响的系统。The JPEG image vulnerability mainly involves a file named GdiPlus.dll in the operating system. Since many software calls this dynamic link library to process JPEG images, the vulnerability involves a very wide range. For example, Windows XP SP1, MS Office, QQ2004, etc. Intruders can insert malicious programs into pictures through this vulnerability principle, so that malicious programs with this vulnerability will run the malicious programs in the picture unconditionally, thereby controlling the affected system.
从上述所述的JPEG图像的漏洞原理,我们可以看出该漏洞使入侵者的入侵手法有了很大的发挥余地,例如,入侵者可以在图片中插入木马后门等恶意程序,使浏览者在打开图片的同时木马后门等恶意程序已悄悄运行,或者在图片中插入一些第三方连接程序,将修改过的图片作为类似木马服务器进行设置,连接这个图片即可连接后门等恶意程序。From the above-mentioned vulnerability principle of JPEG images, we can see that this vulnerability allows intruders a lot of room for intrusion. While opening the picture, malicious programs such as Trojan horse and backdoor have been running quietly, or insert some third-party connection programs into the picture, and set the modified picture as a Trojan-like server, and connect this picture to connect to backdoor and other malicious programs.
具体地,将木马后门等恶意程序插入到图片中,这样浏览者只要一打开含有图片的网页、邮件等,就会自动打开图片,同时也就运行了木马后门等恶意程序,这是最典型的漏洞利用方法。例如,利用一款工具:JPEG Downloader,它能有效地帮我们将木马文件等恶意程序插入到指定图片文件中,打开它,在Downloader file一栏中填写即将插入的木马等恶意程序的下载地址,填写完毕,双击“make”按钮即可,这样在同目录下即可生成一个图片文件,只不过这是插入了木马等恶意程序代码的。Specifically, malicious programs such as Trojan horse backdoors are inserted into pictures, so that as soon as a viewer opens a webpage or email containing pictures, the pictures will be opened automatically, and malicious programs such as Trojan horse backdoors will also be run at the same time. This is the most typical Exploit method. For example, use a tool: JPEG Downloader, which can effectively help us insert Trojan horse files and other malicious programs into the specified image file, open it, fill in the download address of the Trojan horse and other malicious programs to be inserted in the Downloader file column, After filling in, double-click the "make" button, so that a picture file can be generated in the same directory, but this is inserted with malicious program codes such as Trojan horses.
进一步地,上述图片文件表面上和寻常图片文件看起来相同,但是一旦打开它,那么就会自动下载并运行先前指定好的木马等恶意程序,且唯一表面上不同的是打开图片不能正常显示,而是以包括但不限于一个红色的X号的显示方式进行显示。Furthermore, the above-mentioned picture file looks the same as the ordinary picture file on the surface, but once it is opened, it will automatically download and run malicious programs such as Trojan horses specified previously, and the only apparent difference is that the picture cannot be displayed normally when opened, Instead, it is displayed in a display manner including but not limited to a red X.
更进一步地,由于JPEG图像漏洞主要涉及操作系统中一个名为GdiPlus.dll的文件,而众多软件都调用了这个动态链接库处理JPEG图片,使得该漏洞的涉及面非常广,所以针对JPEG图像漏洞如何进行后门等恶意程序的查杀,本发明提出了一种网站防护方法。Furthermore, because the JPEG image vulnerability mainly involves a file named GdiPlus.dll in the operating system, and many software calls this dynamic link library to process JPEG images, the vulnerability involves a very wide range, so the JPEG image vulnerability How to check and kill malicious programs such as backdoors, the invention proposes a website protection method.
具体地,对网站的网站日志文件通过CDN(Content DeliveryNetwork,内容分发网络)记录,并进行分析,识别出网站的日志文件中的每条日志数据并进行进一步分析。其中,网站的日志数据包括:host、时间、IP地址、URL(Uniform Resource Location,统一资源定位符)、网页参数等信息,可将检测网站的日志数据的网页参数提取出来,获取网页文件。Specifically, the website log files of the website are recorded and analyzed through a CDN (Content Delivery Network, Content Delivery Network), and each piece of log data in the website log files is identified and further analyzed. Wherein, the log data of the website includes information such as: host, time, IP address, URL (Uniform Resource Location, Uniform Resource Locator), web page parameters, etc., and the web page parameters of the log data of the detected website can be extracted to obtain web page files.
进一步地,将网页文件与预先存储在数据库中的网页文件进行比对。具体地,统计网站每个网页的访问频度,即一段时间内的访问量PV,将访问频度低于预设访问频度阈值的网页文件识别为可疑网页文件,其中,访问频度异常权值与网页文件的访问频度成反比,即访问频度越小,访问频度异常权值越大,反之,访问频度越大,则访问频度异常权值越小;和/或统计网站每个网页的访问来源数,将访问来源数低于预设访问来源数阈值的网页文件识别为可疑网页文件,其中,访问来源异常权值与网页文件的访问来源数成反比,即访问来源数越小,访问来源异常权值越大,反之,访问来源数越大,则访问来源异常权值越小;和/或分时段统计网站每个网页的访问量,将分时段访问量超出预设分时段访问量阈值的次数大于规定次数的网页文件识别为可疑文件,并计算可疑网页文件的分时段访问异常权值。Further, the webpage file is compared with the webpage file pre-stored in the database. Specifically, the visit frequency of each webpage of the website is counted, that is, the visit volume PV within a period of time, and the webpage files whose visit frequency is lower than the preset visit frequency threshold are identified as suspicious webpage files. The value is inversely proportional to the access frequency of the web page file, that is, the smaller the access frequency, the greater the abnormal weight of the access frequency, conversely, the greater the frequency of access, the smaller the abnormal weight of the access frequency; and/or statistical website The number of access sources of each web page identifies a web page file whose number of access sources is lower than the preset threshold of the number of access sources as a suspicious web page file. The smaller the value, the greater the abnormal weight of the access source. On the contrary, the larger the number of access sources, the smaller the abnormal weight of the access source; and/or counting the visits of each web page of the website by time period, and the number of visits by time period exceeds the preset A webpage file whose number of time-segmented access volume thresholds is greater than a specified number of times is identified as a suspicious file, and the time-segmented access abnormal weight of the suspicious webpage file is calculated.
例如,按照一定时间段对网页日志进行分析,例如,按照天来进行分析,一般所有文件的访问量和高峰期是有明显规律的,如果是用户访问的话,就会按照时间有坡度的升降,如果是机器自动访问,则文件的访问会有固定的时间点,只有后门文件、木马、病毒等恶意程序的访问是无序的。因此,可以通过分时段地统计访问量来检测,根据实际应用情形设置分时段阈值,对于分时段访问量超出分时段阈值的次数大于规定次数的网页文件,可将其识别为可疑网页文件。例如,分为12个时段,每个时段设置不同的分时段阈值,规定超过分时段阈值的次数应该小于3次,当网页文件有超过3个时段的访问量超出对应时段的分时段阈值时,则将上述网页识别为可疑网页。For example, analyze webpage logs according to a certain period of time. For example, analyze according to the day. Generally, the number of visits and peak periods of all files have obvious rules. If they are accessed by users, they will rise and fall according to the time. If the machine accesses automatically, the file access will have a fixed time point, and only the access of backdoor files, Trojan horses, viruses and other malicious programs is disordered. Therefore, it can be detected by counting the visits by time period, and setting the period-by-period threshold according to the actual application situation. For webpage files whose visits by time period exceed the time-period threshold for more than the specified number of times, it can be identified as a suspicious webpage file. For example, it is divided into 12 periods, each period is set with a different period threshold, and it is stipulated that the number of times exceeding the period threshold should be less than 3 times. Then identify the above-mentioned webpage as a suspicious webpage.
进一步地,将可疑网页文件与预先存储在数据库中的网页文件进行比对,若网页文件中的图片与预先存储在数据库中的图片不同,则获取网页中的图片,由此,提高了获取网页文件中图片的高效性与准确性。Further, the suspicious webpage file is compared with the webpage file pre-stored in the database, if the picture in the webpage file is different from the picture pre-stored in the database, the picture in the webpage is obtained, thereby improving the speed of obtaining the webpage. Efficiency and accuracy of images in files.
进一步地,检测图片中是否嵌入恶意程序。具体地,加载恶意程序规则库;使用规则库中的规则对图片进行匹配。由此,提高了获取图片中嵌入恶意程序的准确性。Further, it is detected whether a malicious program is embedded in the picture. Specifically, a malicious program rule base is loaded; and the pictures are matched using the rules in the rule base. As a result, the accuracy of acquiring malicious programs embedded in pictures is improved.
进一步地,获取网页中的图片属性信息;根据图片属性信息中的图片创建时间和/或图片权限,确定图片的属性异常度;将属性异常度大于预设异常度阈值的图片判断为嵌入恶意程序的图片。Further, the image attribute information in the web page is obtained; according to the image creation time and/or image authority in the image attribute information, the attribute abnormality degree of the image is determined; the image whose attribute abnormality degree is greater than the preset abnormality threshold value is judged as an embedded malicious program picture of.
更进一步地,根据图片属性信息中的图片创建时间和/或图片权限,确定图片的属性异常度,进一步包括:根据图片创建时间确定图片的属性异常度为:计算图片的创建时间与同网页中其他图片的时间的离散度,确定时间离散度大于预设离散度阈值的图片,并为其赋予创建时间异常权值。其中,时间离散度的计算方法包括但不限于以下方式:Furthermore, according to the picture creation time and/or picture authority in the picture attribute information, determining the attribute abnormality degree of the picture further includes: determining the picture attribute abnormality degree according to the picture creation time is: calculating the difference between the picture creation time and the same web page Time dispersion of other pictures, determining pictures whose time dispersion is greater than a preset dispersion threshold, and assigning creation time exception weights to them. Among them, the calculation method of time dispersion includes but not limited to the following methods:
获取同目录下所有图片的创建时间,按照时间先后排序,计算每个图片的时间离散度。离散度可以采用极差、距离均差的平方和、方差或标准差等数学方法进行计算,由此,提高了获取图片的时间离散度的多样性与准确性。例如,以极差的方式进行计算,可以为:Get the creation time of all pictures in the same directory, sort them according to time, and calculate the time dispersion of each picture. The dispersion can be calculated by using mathematical methods such as the range, the sum of squares of the average distance difference, the variance or the standard deviation, thereby improving the diversity and accuracy of the time dispersion of the acquired pictures. For example, to do calculations in a poor way, it could be:
当前图片的时间离散度=当前图片的创建时间-同目录下最先创建的图片的创建时间。例如,当前图片的创建时间为某一天的10:30,而同目录下最先创建的图片的创建时间是同一天的10:28,则此时当前图片的时间离散度为2分钟。Time dispersion of the current picture = creation time of the current picture - creation time of the first created picture in the same directory. For example, if the creation time of the current picture is 10:30 of a certain day, and the creation time of the first created picture in the same directory is 10:28 of the same day, then the time dispersion of the current picture at this time is 2 minutes.
判断每个图片的时间离散度是否超过预设离散度阈值,确定时间离散度大于预设离散度阈值的图片,并为其赋予创建时间异常权值。例如,预设离散度值为5,则认为上述例子中的当前图片为正常图片,否则为异常图片。Judging whether the time dispersion of each picture exceeds a preset dispersion threshold, determining pictures whose time dispersion is greater than the preset dispersion threshold, and assigning creation time exception weights to them. For example, if the preset dispersion value is 5, the current picture in the above example is considered to be a normal picture, otherwise it is an abnormal picture.
更进一步地,根据图片权限确定图片属性异常度为:判断图片权限是否为默认权限,如果不是,则为图片赋予权限异常权值;根据创建时间异常权值和/或权限异常权值确定图片的属性异常度。即可以理解为判断图片的权限是否为默认权限,如果发现图片权限不是默认权限,则赋予一个常数作为权限异常权值。例如,在linux下,图片的默认权限通常为0744。Furthermore, determining the abnormality degree of the picture attribute according to the picture permission is: judging whether the picture permission is the default permission, if not, giving the picture an abnormal permission weight; determining the abnormal weight of the picture according to the creation time abnormal weight and/or the permission abnormal weight attribute abnormality. That is, it can be understood as judging whether the permission of the picture is the default permission. If it is found that the permission of the picture is not the default permission, a constant is assigned as the abnormal permission weight. For example, under linux, the default permissions for pictures are usually 0744.
更进一步地,如果图片中存在恶意程序,则获取图片中恶意程序的位置,并利用填充字符对恶意程序进行替换。其中,填充字符包括:字母安全字符,例如,a-z或者A-Z、数字安全字符和/或空白占位符。由此,提高了填充字符的多样性与选择性。Furthermore, if there is a malicious program in the picture, the position of the malicious program in the picture is obtained, and the malicious program is replaced with a padding character. Wherein, the padding characters include: alphanumeric safe characters, for example, a-z or A-Z, numeric safe characters and/or blank placeholders. Thus, the diversity and selectivity of the filling characters are improved.
根据本发明提出的恶意程序删除方法,通过获取网页文件中的图片,检测图片中是否嵌入恶意程序,如果图片中存在恶意程序,则获取图片中恶意程序的位置,并利用填充字符对恶意程序进行替换,从而,及时检测出网站中图片的恶意程序,可对其进行有效的处理,不仅减少了给网站带来的危害的几率,同时提高了网站的安全等级。According to the malicious program deletion method proposed by the present invention, by obtaining the picture in the webpage file, it is detected whether a malicious program is embedded in the picture, if there is a malicious program in the picture, the position of the malicious program in the picture is obtained, and the malicious program is deleted by using the filling characters Replacement, so that the malicious program of the picture in the website is detected in time, and it can be effectively processed, which not only reduces the probability of harm to the website, but also improves the security level of the website.
如图2所示,根据本发明一个实施例的网站恶意代码判断方法,包括:As shown in Figure 2, the method for judging malicious code of a website according to one embodiment of the present invention includes:
S1’,获取终端判定的疑似恶意代码和/或来自终端的网页文件中的疑似恶意代码;S1', obtaining the suspected malicious code determined by the terminal and/or the suspected malicious code in the webpage file from the terminal;
S2’,通过多个引擎分别对疑似恶意代码进行检测,根据每个引擎的检测结果判断疑似恶意代码是否为恶意代码;S2', using multiple engines to detect the suspected malicious code, and judge whether the suspected malicious code is malicious code according to the detection results of each engine;
S3’,将疑似恶意代码判断结果发送至终端。S3', sending the judgment result of the suspected malicious code to the terminal.
由于不同引擎对于疑似恶意代码的检测方式不同,判定的结果也存在差异,因此可以对每个引擎的判定结构取交集,例如获取到三段疑似恶意代码,Since different engines have different detection methods for suspected malicious code, the judgment results are also different. Therefore, the judgment structure of each engine can be intersected. For example, three pieces of suspected malicious code are obtained,
第一引擎对于三段疑似恶意代码的检测结果为:非恶意代码、恶意代码、恶意代码;The detection results of the first engine for the three suspected malicious codes are: non-malicious code, malicious code, malicious code;
第二引擎对于三段疑似恶意代码的检测结果为:非恶意代码、恶意代码、恶意代码;The detection results of the second engine for the three suspected malicious codes are: non-malicious code, malicious code, malicious code;
第三引擎对于三段疑似恶意代码的检测结果为:非恶意代码、恶意代码、非恶意代码,The detection results of the third engine for the three suspected malicious codes are: non-malicious code, malicious code, non-malicious code,
那么三个引擎的判定结果取交集可以得到三段疑似恶意代码的检测结果为:非恶意代码、恶意代码、恶意代码,也就是说,针对一段疑似恶意代码,当多个引擎都检测其为非恶意代码时,那么就判定其为非恶意代码,当多个引擎中至少一个检测其为恶意代码时,那么就判定其为恶意代码,从而提高对于疑似恶意代码判定的准确度。Then the intersection of the judgment results of the three engines can get the detection results of three suspected malicious codes: non-malicious code, malicious code, and malicious code. That is to say, for a suspected malicious code, when multiple engines detect it as non-malicious Malicious code, it is judged as non-malicious code, and when at least one of the multiple engines detects it as malicious code, it is judged as malicious code, thereby improving the accuracy of judging suspected malicious code.
如图3所示,根据本发明一个实施例的网站恶意程序检测装置10包括:As shown in FIG. 3, the website malicious program detection device 10 according to one embodiment of the present invention includes:
文件获取单元11,用于获取目标网站的网页文件;A file obtaining unit 11, configured to obtain the web page file of the target website;
识别单元12,用于根据恶意程序特征库对网页文件中的源代码进行检测,识别出网页文件中的疑似恶意代码;Identification unit 12, for detecting the source code in the webpage file according to the malicious program feature library, and identifying the suspected malicious code in the webpage file;
传输单元13,用于将疑似恶意代码和/或网页文件传输至服务器,以使预设服务器检测疑似恶意代码是否为恶意代码;The transmission unit 13 is configured to transmit the suspected malicious code and/or webpage file to the server, so that the preset server detects whether the suspected malicious code is malicious code;
结果获取单元14,用于获取预设服务器返回的疑似恶意代码检测结果。The result obtaining unit 14 is configured to obtain the suspected malicious code detection result returned by the preset server.
优选地,还包括:Preferably, it also includes:
提示单元15,用于根据判断结果生成提示信息,以提示目标网站是否包含存在恶意代码的网页文件。The prompting unit 15 is configured to generate prompt information according to the judgment result, so as to prompt whether the target website contains webpage files with malicious codes.
优选地,还包括:Preferably, it also includes:
标识单元16,在疑似恶意代码为恶意代码的情况下,根据接收到的第一指令为恶意代码添加第一标识,以使被添加第一标识的恶意代码在再次检测源代码时被识别为非恶意代码;The identification unit 16, in the case that the suspected malicious code is malicious code, adds a first identification to the malicious code according to the received first instruction, so that the malicious code to which the first identification is added is identified as a non-identical code when the source code is detected again. Malicious code;
或or
在疑似恶意代码为恶意代码的情况下,根据接收到的第二指令为恶意代码添加第二标识,以使被添加第二标识的恶意代码在再次检测源代码时被识别为恶意代码。In the case that the suspected malicious code is malicious code, add a second identifier to the malicious code according to the received second instruction, so that the malicious code to which the second identifier is added is identified as malicious code when the source code is detected again.
优选地,还包括:Preferably, it also includes:
查询单元17,用于查询疑似恶意代码被特定用户访问的次数,若被特定用户访问的次数大于预设次数,则将疑似恶意代码判定为非恶意代码进行提示。The query unit 17 is configured to query the number of times the suspected malicious code is accessed by a specific user, and if the number of times the suspected malicious code is accessed by a specific user is greater than a preset number of times, the suspected malicious code is determined to be non-malicious code and prompted.
如图4所示,根据本发明一个实施例的网站恶意代码判断装置20包括:As shown in Figure 4, the website malicious code judging device 20 according to one embodiment of the present invention includes:
代码获取单元21,用于获取终端判定的疑似恶意代码和/或来自终端的网页文件中的疑似恶意代码;The code obtaining unit 21 is used to obtain the suspected malicious code determined by the terminal and/or the suspected malicious code in the webpage file from the terminal;
检测单元22,用于通过多个引擎分别对疑似恶意代码进行检测,根据每个引擎的检测结果判断疑似恶意代码是否为恶意代码;The detection unit 22 is used to detect the suspected malicious code through multiple engines, and judge whether the suspected malicious code is malicious code according to the detection results of each engine;
发送单元23,用于将疑似恶意代码判断结果发送至终端。The sending unit 23 is configured to send the judgment result of the suspected malicious code to the terminal.
网站恶意程序检测装置10和网站恶意代码判断装置20的交互过程如图5所示,其中,网站恶意程序检测装置10包括但不仅限于网站的本地服务器,网站恶意代码判断装置20包括但不仅限于云端服务器,本地服务器对于网页文件中的源代码进行初步检测,云端服务器则对疑似恶意代码进行精确检测,一方面提高检测结果的准确度,另一方面降低本地服务器的运算压力,提高代码检测的整体速度。The interaction process between the malicious website program detection device 10 and the malicious website code judgment device 20 is shown in Figure 5, wherein the malicious website program detection device 10 includes but not limited to the local server of the website, and the malicious website code judgment device 20 includes but not limited to the cloud server. Server, the local server conducts preliminary detection of the source code in the webpage file, and the cloud server conducts precise detection of the suspected malicious code. On the one hand, it improves the accuracy of the detection results, on the other hand, it reduces the computing pressure on the local server, and improves the overall performance of code detection. speed.
综上所述,本发明通过对网页文件中的源代码进行检测,并通过预设服务器对疑似恶意代码进行检测,可以快速且准确地检测出目标网站中存在的恶意代码,从而减少网站被恶意攻击的概率,提高网站的安全性。To sum up, the present invention detects the source code in the webpage file and detects the suspected malicious code through the preset server, so that the malicious code existing in the target website can be detected quickly and accurately, thereby reducing the risk of malicious codes on the website. The probability of attack and improve the security of the website.
应当注意,在此提供的算法和公式不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示例一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。It should be noted that the algorithms and formulas presented herein are not inherently related to any particular computer, virtual system, or other device. Various general systems can also be used with the examples based here. The structure required to construct such a system is apparent from the above description. Furthermore, the present invention is not specific to any particular programming language. It should be understood that various programming languages can be used to implement the content of the present invention described herein, and the above description of specific languages is for disclosing the best mode of the present invention.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.
类似地,应当理解,为了精简本发明并帮助理解本发明各个方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法和装置解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如权利要求书所反映,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, in order to streamline the present invention and to facilitate an understanding of one or more of its various aspects, various features of the invention are sometimes grouped together into a single embodiment , figure, or description of it. This disclosed method and apparatus, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method or method so disclosed may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。Furthermore, those skilled in the art will understand that although some embodiments described herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. and form different embodiments.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的网站安全检测设备中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components in the website security detection device according to the embodiment of the present invention. The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.
以上所述仅是本发明的部分实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above descriptions are only part of the embodiments of the present invention. It should be pointed out that those skilled in the art can make some improvements and modifications without departing from the principles of the present invention. It should be regarded as the protection scope of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410856928.XA CN104580203A (en) | 2014-12-31 | 2014-12-31 | Website malicious program detection method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410856928.XA CN104580203A (en) | 2014-12-31 | 2014-12-31 | Website malicious program detection method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104580203A true CN104580203A (en) | 2015-04-29 |
Family
ID=53095384
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410856928.XA Pending CN104580203A (en) | 2014-12-31 | 2014-12-31 | Website malicious program detection method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104580203A (en) |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105262739A (en) * | 2015-09-25 | 2016-01-20 | 上海斐讯数据通信技术有限公司 | Security defense method, terminal, server, and system |
CN105653942A (en) * | 2015-07-31 | 2016-06-08 | 哈尔滨安天科技股份有限公司 | Detection method and apparatus for picture backdoor |
CN106295333A (en) * | 2015-05-27 | 2017-01-04 | 安恒通(北京)科技有限公司 | For detecting the method and system of malicious code |
CN107070913A (en) * | 2017-04-07 | 2017-08-18 | 杭州安恒信息技术有限公司 | A kind of detection and means of defence and system based on webshell attacks |
CN108549813A (en) * | 2018-03-02 | 2018-09-18 | 彭根 | Method of discrimination, device and pocessor and storage media |
CN109104429A (en) * | 2018-09-05 | 2018-12-28 | 广东石油化工学院 | A kind of detection method for network fraud information |
CN110443050A (en) * | 2019-07-26 | 2019-11-12 | 武汉天喻软件股份有限公司 | A kind of processing method and system of forgery process in file transparent encrypting and deciphering system |
CN111027065A (en) * | 2019-10-28 | 2020-04-17 | 哈尔滨安天科技集团股份有限公司 | Lesovirus identification method and device, electronic equipment and storage medium |
CN111259985A (en) * | 2020-02-19 | 2020-06-09 | 腾讯科技(深圳)有限公司 | Classification model training method and device based on business safety and storage medium |
CN111740999A (en) * | 2020-06-22 | 2020-10-02 | 杭州安恒信息技术股份有限公司 | A DDOS attack identification method, system and related device |
CN113067796A (en) * | 2020-01-02 | 2021-07-02 | 深信服科技股份有限公司 | Hidden page detection method, device, equipment and storage medium |
CN113792294A (en) * | 2021-11-15 | 2021-12-14 | 北京升鑫网络科技有限公司 | Malicious class detection method, system, device, equipment and medium |
CN113806131A (en) * | 2021-09-23 | 2021-12-17 | 深圳市元征软件开发有限公司 | Access control method and device for fault code library, electronic equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102891861A (en) * | 2012-10-29 | 2013-01-23 | 珠海市君天电子科技有限公司 | Client-based phishing website detecting method and device |
CN103593613A (en) * | 2013-11-26 | 2014-02-19 | 北京网秦天下科技有限公司 | Method, terminal, server and system for computer virus detection |
CN104077396A (en) * | 2014-07-01 | 2014-10-01 | 清华大学深圳研究生院 | Method and device for detecting phishing website |
-
2014
- 2014-12-31 CN CN201410856928.XA patent/CN104580203A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102891861A (en) * | 2012-10-29 | 2013-01-23 | 珠海市君天电子科技有限公司 | Client-based phishing website detecting method and device |
CN103593613A (en) * | 2013-11-26 | 2014-02-19 | 北京网秦天下科技有限公司 | Method, terminal, server and system for computer virus detection |
CN104077396A (en) * | 2014-07-01 | 2014-10-01 | 清华大学深圳研究生院 | Method and device for detecting phishing website |
Cited By (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10511617B2 (en) | 2015-05-27 | 2019-12-17 | Iyuntian Co., Ltd. | Method and system for detecting malicious code |
CN106295333A (en) * | 2015-05-27 | 2017-01-04 | 安恒通(北京)科技有限公司 | For detecting the method and system of malicious code |
CN106295333B (en) * | 2015-05-27 | 2018-08-17 | 安一恒通(北京)科技有限公司 | method and system for detecting malicious code |
CN105653942A (en) * | 2015-07-31 | 2016-06-08 | 哈尔滨安天科技股份有限公司 | Detection method and apparatus for picture backdoor |
CN105262739A (en) * | 2015-09-25 | 2016-01-20 | 上海斐讯数据通信技术有限公司 | Security defense method, terminal, server, and system |
CN107070913A (en) * | 2017-04-07 | 2017-08-18 | 杭州安恒信息技术有限公司 | A kind of detection and means of defence and system based on webshell attacks |
CN107070913B (en) * | 2017-04-07 | 2020-04-28 | 杭州安恒信息技术股份有限公司 | A detection and protection method and system based on webshell attack |
CN108549813A (en) * | 2018-03-02 | 2018-09-18 | 彭根 | Method of discrimination, device and pocessor and storage media |
CN109104429B (en) * | 2018-09-05 | 2021-09-28 | 广东石油化工学院 | Detection method for phishing information |
CN109104429A (en) * | 2018-09-05 | 2018-12-28 | 广东石油化工学院 | A kind of detection method for network fraud information |
CN110443050A (en) * | 2019-07-26 | 2019-11-12 | 武汉天喻软件股份有限公司 | A kind of processing method and system of forgery process in file transparent encrypting and deciphering system |
CN110443050B (en) * | 2019-07-26 | 2021-02-09 | 武汉天喻软件股份有限公司 | Method and system for processing counterfeit process in file transparent encryption and decryption system |
CN111027065A (en) * | 2019-10-28 | 2020-04-17 | 哈尔滨安天科技集团股份有限公司 | Lesovirus identification method and device, electronic equipment and storage medium |
CN111027065B (en) * | 2019-10-28 | 2023-09-08 | 安天科技集团股份有限公司 | Leucavirus identification method and device, electronic equipment and storage medium |
CN113067796A (en) * | 2020-01-02 | 2021-07-02 | 深信服科技股份有限公司 | Hidden page detection method, device, equipment and storage medium |
CN111259985A (en) * | 2020-02-19 | 2020-06-09 | 腾讯科技(深圳)有限公司 | Classification model training method and device based on business safety and storage medium |
CN111259985B (en) * | 2020-02-19 | 2023-06-30 | 腾讯云计算(长沙)有限责任公司 | Classification model training method and device based on business safety and storage medium |
CN111740999A (en) * | 2020-06-22 | 2020-10-02 | 杭州安恒信息技术股份有限公司 | A DDOS attack identification method, system and related device |
CN113806131A (en) * | 2021-09-23 | 2021-12-17 | 深圳市元征软件开发有限公司 | Access control method and device for fault code library, electronic equipment and storage medium |
CN113792294A (en) * | 2021-11-15 | 2021-12-14 | 北京升鑫网络科技有限公司 | Malicious class detection method, system, device, equipment and medium |
CN113792294B (en) * | 2021-11-15 | 2022-03-08 | 北京升鑫网络科技有限公司 | Malicious class detection method, system, device, equipment and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104580203A (en) | Website malicious program detection method and device | |
US11968225B2 (en) | Attack path and graph creation based on user and system profiling | |
US10902117B1 (en) | Framework for classifying an object as malicious with machine learning for deploying updated predictive models | |
US10164993B2 (en) | Distributed split browser content inspection and analysis | |
KR101574652B1 (en) | Sytem and method for mobile incident analysis | |
US10904286B1 (en) | Detection of phishing attacks using similarity analysis | |
US8505102B1 (en) | Detecting undesirable content | |
WO2017101865A1 (en) | Data processing method and device | |
US9973531B1 (en) | Shellcode detection | |
CN105631359B (en) | A kind of control method and device of web page operation | |
WO2018086544A1 (en) | Security protection method and device, and computer storage medium | |
US20140096246A1 (en) | Protecting users from undesirable content | |
US9681304B2 (en) | Network and data security testing with mobile devices | |
CN102882875B (en) | Active defense method and device | |
CN103473501B (en) | A malware tracking method based on cloud security | |
CN107612924A (en) | Attacker's localization method and device based on wireless network invasion | |
CN108183900A (en) | A kind of method, server, client and system for digging the detection of ore deposit script | |
CN107465702A (en) | Method for early warning and device based on wireless network invasion | |
CN107566401A (en) | The means of defence and device of virtualized environment | |
CN107509200A (en) | Equipment localization method and device based on wireless network invasion | |
US10474810B2 (en) | Controlling access to web resources | |
CN102857519B (en) | Active defensive system | |
CN104580200B (en) | A kind of website protection method and device | |
US12008105B2 (en) | Protected QR code scanner using operational system override | |
CN107517226A (en) | Alarm method and device based on wireless network intrusion |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C41 | Transfer of patent application or patent right or utility model | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20161227 Address after: 100015 Chaoyang District Road, Jiuxianqiao, No. 10, building No. 3, floor 15, floor 17, 1701-26, Applicant after: BEIJING QI'ANXIN SCIENCE & TECHNOLOGY CO., LTD. Address before: 100088 Beijing city Xicheng District xinjiekouwai Street 28, block D room 112 (Desheng Park) Applicant before: Beijing Qihoo Technology Co., Ltd. Applicant before: Qizhi Software (Beijing) Co., Ltd. |
|
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20150429 |