KR20170140049A - Method for detecting webshell, server and computer readable medium - Google Patents

Method for detecting webshell, server and computer readable medium Download PDF

Info

Publication number
KR20170140049A
KR20170140049A KR1020160096922A KR20160096922A KR20170140049A KR 20170140049 A KR20170140049 A KR 20170140049A KR 1020160096922 A KR1020160096922 A KR 1020160096922A KR 20160096922 A KR20160096922 A KR 20160096922A KR 20170140049 A KR20170140049 A KR 20170140049A
Authority
KR
South Korea
Prior art keywords
file
web
webshell
server
executing
Prior art date
Application number
KR1020160096922A
Other languages
Korean (ko)
Inventor
정준영
Original Assignee
주식회사 케이티
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 주식회사 케이티 filed Critical 주식회사 케이티
Publication of KR20170140049A publication Critical patent/KR20170140049A/en

Links

Images

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/168Details of user interfaces specifically adapted to file systems, e.g. browsing and visualisation, 2d or 3d GUIs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1734Details of monitoring file system events, e.g. by the use of hooks, filter drivers, logs
    • G06F17/30126
    • G06F17/30144
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention detects whether a webshell pattern exists in a source code of a file transmitted to a web server, and detects a webshell by executing the corresponding file in a suitable virtual browser environment when the webshell pattern is detected. A method for detecting a webshell performed in a webshell detecting server comprises the following steps of: monitoring network traffic of the web server; receiving the file transmitted to the web server among the network traffic; detecting whether the webshell pattern exists in the source code of the received file; executing the file when the webshell pattern is detected; and outputting an execution response code of the file and an execution screen of the file.

Description

웹쉘을 탐지하는 방법, 서버 및 컴퓨터 판독가능 매체{METHOD FOR DETECTING WEBSHELL, SERVER AND COMPUTER READABLE MEDIUM}METHOD FOR DETECTING WEBSHELL, SERVER AND COMPUTER READABLE MEDIUM,

본 발명은 웹쉘을 탐지하는 방법, 서버 및 컴퓨터 판독가능 매체에 관한 것이다. The present invention relates to a method, server and computer readable medium for detecting a web shell.

웹쉘(Webshell)은 해커가 원격에서 웹서버를 대상으로 명령을 실행할 수 있도록 작성한 asp, jsp, php 파일 등의 웹 스크립트(Web Script) 파일을 말한다. 해커는 웹서버의 취약점을 이용하여 웹서버에 웹쉘을 업로드한 후, 해당 웹쉘을 실행함으로써 대상 서버의 정보를 열람하거나, 웹 페이지 소스 코드를 열람 및 변조할 수 있다. Webshell is a web script file, such as an asp, jsp, or php file, created by a hacker to remotely execute commands against a web server. A hacker can use the vulnerability of a web server to upload a web shell to a web server, execute the corresponding web shell, browse the information of the target server, or browse and modify the web page source code.

종래의 웹쉘 탐지 방법에는 서버 기반 웹쉘 탐지 방법과 네트워크 기반 웹쉘 탐지 방법이 존재한다. 서버 기반 웹쉘 탐지 방법은 웹쉘 에이전트를 웹 서버에 설치하고, 웹 루트/업로드 디렉토리를 탐지 디렉토리로 설정한 후, 웹루트/업로드 디렉토리에 신규 파일이 업로드되거나 변경되면 웹쉘 에이전트에서 웹쉘 패턴을 검출하는 방법이다. 네트워크 기반 웹쉘 탐지 방법은 DPI(Deep Packet Inspection) 기능을 이용하여 IPS(Intrusion Prevention System)/ IDS(Intrusion Detection System)/WAF(Web Application Firewall)와 같은 네트워크 단의 방어 수단에서 네트워크 상에 전달되는 패킷을 분석함으로써 웹쉘 패턴을 탐지하는 방법이다. A conventional web shell detection method includes a server based web shell detection method and a network based web shell detection method. Server-based web shell detection method is to detect WebShell pattern in web shell agent when new file is uploaded or changed in web root / upload directory after installing web shell agent on web server, setting web root / upload directory as detection directory to be. The network-based Web shell detection method uses a DPI (Deep Packet Inspection) function to detect a packet transmitted on the network from a defensive means at the network end such as Intrusion Prevention System (IPS) / Intrusion Detection System (IDS) / Web Application Firewall (WAF) To detect WebShell patterns.

하지만, 웹쉘 패턴이 일반적인 소스 코드와 명확하게 구분되어 있지 않기 때문에, 종래의 서버 기반 웹쉘 탐지 방법은 오탐율이 상당히 높은 문제점이 있었다. 예를 들면, 일반적인 개발에 사용되는 디렉토리 정보를 읽는 소스 코드 readdir이 웹쉘 탐지의 패턴으로도 탐지될 수 있었다. However, since the Webshell pattern is not clearly distinguished from the general source code, the conventional server-based Webshell detection method has a problem that the false rate is extremely high. For example, the source code readdir, which reads directory information used in common development, could be detected in a pattern of Web shell detection.

따라서, 종래의 서버 기반 웹쉘 탐지 방법은 웹쉘 패턴으로 인한 이벤트가 발생하면, 관리자가 소스 코드를 직접 확인하여 웹쉘 여부를 분석할 필요가 있고, 이에 따라 웹쉘 탐지 및 대응에 많은 시간이 소요되는 문제점이 있었다. Accordingly, in the conventional server-based web shell detection method, when an event occurs due to a web shell pattern, an administrator must directly check the source code to analyze whether the web shell is present, there was.

네트워크 기반 웹쉘 탐지 방법은 네트워크 패킷 단위로 웹쉘 여부를 분석 및 탐지하기 때문에 웹쉘로 인한 사고 발생시 웹쉘에 대한 신속한 대응이 어려운 문제점이 있었다. Since the network-based Web shell detection method analyzes and detects the web-shell status in units of network packets, it is difficult to promptly respond to the web-shell in the event of an incident caused by the web-shell.

선행 기술인 한국등록특허 제10-1068931호에는 웹서버에 의해 실행되는 웹 프로그램의 소스 코드에서 웹쉘 프로그램과 관련된 코드의 존재 유무를 탐지하고, 웹쉘 탐지 결과를 분석하여 웹쉘 탐지 결과 정보를 관리자에게 제공하는 구성이 개시되어 있다. Korean Patent No. 10-1068931 discloses a method of detecting presence or absence of a code related to a WebShell program in the source code of a Web program executed by a Web server and analyzing the result of the WebShell detection to provide the WebShell detection result information to the administrator .

웹서버로 전송되는 파일의 소스 코드에 웹쉘 패턴이 존재하는지 검출하고, 웹쉘 패턴이 검출된 경우 해당 파일을 적합한 가상 브라우져 환경에서 실행하여 웹쉘을 탐지하고자 한다. 또한, 실행된 파일의 실행 응답 코드 및 파일의 실행 화면을 출력하거나 관리자의 디바이스에게 전송하고자 한다. We detect if a WebShell pattern exists in the source code of a file transmitted to the Web server. If a WebShell pattern is detected, we want to detect the WebShell by executing the file in a suitable virtual browser environment. It also outputs the execution response code of the executed file and the execution screen of the file or transmits it to the manager's device.

다만, 본 실시예가 이루고자 하는 기술적 과제는 상기된 바와 같은 기술적 과제들로 한정되지 않으며, 또 다른 기술적 과제들이 존재할 수 있다. It is to be understood, however, that the technical scope of the present invention is not limited to the above-described technical problems, and other technical problems may exist.

상술한 기술적 과제를 달성하기 위한 기술적 수단으로서, 본 발명의 제 1 측면에 따른 웹쉘 탐지 서버에서 수행되는 웹쉘 탐지 방법은 웹서버의 네트워크 트래픽을 모니터링하는 단계; 상기 네트워크 트래픽 중 상기 웹서버에 전송되는 파일을 수신하는 단계; 상기 수신한 파일의 소스 코드에 웹쉘 패턴이 존재하는지 검출하는 단계; 상기 웹쉘 패턴이 검출된 경우, 상기 파일을 실행하는 단계; 및 상기 파일의 실행 응답 코드 및 상기 파일의 실행 화면을 출력하는 단계를 포함할 수 있다. 상기 파일은 HTTP(hypertext transfer protocol) 또는 HTTPS(hypertext transfer protocol over secure sockets layer) 트래픽 중 서버 사이드 스크립트 언어로 작성된 파일일 수 있다. 상기 파일의 실행 응답 코드는 상기 요청에 대한 HTML(hypertext markup language) 응답 코드일 수 있다. 상기 파일의 실행 화면은 상기 요청에 대한 HTML 응답의 브라우저 UI 화면일 수 있다. According to another aspect of the present invention, there is provided a web shell detection method, including: monitoring network traffic of a web server; Receiving a file transmitted to the web server among the network traffic; Detecting whether a WebShell pattern exists in the source code of the received file; Executing the file if the web shell pattern is detected; And outputting an execution response code of the file and an execution screen of the file. The file may be a hypertext transfer protocol (HTTP) or a hypertext transfer protocol over secure sockets layer (HTTPS) traffic file written in a server side script language. The execution response code of the file may be a hypertext markup language (HTML) response code for the request. The execution screen of the file may be a browser UI screen of the HTML response to the request.

상기 파일을 실행하는 단계는 복수의 가상 브라우져 중 상기 파일의 실행이 가능한 가상 브라우져 환경에서 상기 파일을 실행하는 단계일 수 있다. The step of executing the file may be a step of executing the file in a virtual browser environment in which the file can be executed among a plurality of virtual browsers.

상기 파일의 실행이 가능한 가상 브라우져 환경에서 상기 파일을 실행하는 단계는 상기 파일의 확장자를 확인하는 단계 및 상기 확장자에 기초하여 상기 파일의 개발 언어에 해당하는 가상 환경 웹루트 디렉토리로 상기 파일을 복사하는 단계를 포함할 수 있다. 상기 파일의 실행이 가능한 가상 브라우져 환경에서 상기 파일을 실행하는 단계는 상기 파일의 실행이 가능한 가상 브라우져로 상기 가상 환경 웹루트 디렉토리로 복사된 파일을 요청하여 실행하는 단계를 더 포함할 수 있다. The step of executing the file in a virtual browser environment capable of executing the file includes the steps of checking the extension of the file and copying the file to the virtual environment web root directory corresponding to the development language of the file based on the extension Step < / RTI > The step of executing the file in the virtual browser environment capable of executing the file may further include the step of requesting and executing the file copied to the virtual environment web root directory in the virtual browser capable of executing the file.

상기 파일의 실행 응답 코드 및 상기 파일의 실행 화면을 관리자의 디바이스로 전송하는 단계를 더 포함할 수 있다. And transmitting an execution response code of the file and an execution screen of the file to a device of an administrator.

본 발명의 제 2 측면에 따른 웹쉘 탐지 서버는 웹서버의 네트워크 트래픽을 모니터링하는 네트워크 트래픽 분석부; 상기 네트워크 트래픽 중 상기 웹서버에 전송되는 파일을 저장하는 저장부; 상기 수신한 파일의 소스 코드에 웹쉘 패턴이 존재하는지 검출하는 웹쉘 패턴 분석부; 상기 웹쉘 패턴이 검출된 경우, 상기 파일을 실행하는 행위 기반 분석부; 및 상기 파일의 실행 응답 코드 및 상기 파일의 실행 화면을 출력하는 출력부를 포함할 수 있다. 상기 파일은 HTTP 또는 HTTPS 트래픽 중 서버 사이드 스크립트 언어로 작성된 파일일 수 있다. 상기 파일의 실행 응답 코드는 상기 요청에 대한 HTML 응답 코드일 수 있다. 상기 파일의 실행 화면은 상기 요청에 대한 HTML 응답의 브라우저 UI 화면일 수 있다 A web shell detection server according to a second aspect of the present invention includes: a network traffic analyzing unit for monitoring network traffic of a web server; A storage unit for storing a file transmitted to the web server among the network traffic; A WebShell pattern analyzer for detecting whether a WebShell pattern exists in a source code of the received file; An action-based analysis unit for executing the file when the WebShell pattern is detected; And an output unit for outputting an execution response code of the file and an execution screen of the file. The file may be a file written in the server side script language among HTTP or HTTPS traffic. The execution response code of the file may be an HTML response code for the request. The executable file of the file may be a browser UI screen of the HTML response to the request

상기 행위 기반 분석부는 복수의 가상 브라우져를 포함하고, 상기 복수의 가상 브라우져 중 상기 파일의 실행이 가능한 가상 브라우져에서 상기 파일을 실행할 수 있다. 상기 행위 기반 분석부는 상기 파일의 확장자를 확인하는 확장자 검출부를 더 포함할 수 있다. 상기 행위 기반 분석부는 상기 확장자에 기초하여 상기 파일의 개발 언어에 해당하는 가상 환경 웹루트 디렉토리로 상기 파일을 복사할 수 있다. 상기 행위 기반 분석부는 상기 파일의 실행이 가능한 가상 브라우져로 상기 가상 환경 웹루트 디렉토리로 복사된 파일을 요청하여 실행할 수 있다. The behavior-based analysis unit may include a plurality of virtual browsers, and may execute the file in a virtual browser capable of executing the file among the plurality of virtual browsers. The behavior-based analysis unit may further include an extension detection unit for checking an extension of the file. The behavior-based analysis unit may copy the file to a virtual environment web root directory corresponding to a development language of the file based on the extension. The behavior-based analysis unit may request and execute a file copied to the virtual environment web root directory with a virtual browser capable of executing the file.

상기 파일의 실행 응답 코드 및 상기 파일의 실행 화면을 관리자의 디바이스로 전송하는 전송부를 더 포함할 수 있다. And an execution response code of the file and an execution screen of the file to a device of an administrator.

본 발명의 제 3 측면에 따른 컴퓨팅 장치에 의해 실행될 때, 상기 컴퓨팅 장치가 상기 네트워크 트래픽 중 상기 웹서버에 전송되는 파일을 수신하고, 상기 수신한 파일의 소스 코드에 웹쉘 패턴이 존재하는지 검출하고, 상기 웹쉘 패턴이 검출된 경우, 상기 파일을 실행하고, 상기 파일의 실행 응답 코드 및 상기 파일의 실행 화면을 출력하도록 하는 컴퓨터 판독가능 매체를 제공할 수 있다.When executed by the computing device according to the third aspect of the present invention, the computing device receives a file transmitted to the web server among the network traffic, detects whether a WebShell pattern exists in the source code of the received file, And when the WebShell pattern is detected, executing the file, and outputting an execution response code of the file and an execution screen of the file.

상술한 과제 해결 수단은 단지 예시적인 것으로서, 본 발명을 제한하려는 의도로 해석되지 않아야 한다. 상술한 예시적인 실시예 외에도, 도면 및 발명의 상세한 설명에 기재된 추가적인 실시예가 존재할 수 있다.The above-described task solution is merely exemplary and should not be construed as limiting the present invention. In addition to the exemplary embodiments described above, there may be additional embodiments described in the drawings and the detailed description of the invention.

전술한 본 발명의 과제 해결 수단 중 어느 하나에 의하면, 웹쉘 패턴이 검출된 파일의 실행에 적합한 다양한 가상 브라우져 환경을 제공할 수 있다. 또한, 웹쉘 패턴이 검출된 파일을 가상 브라우져 환경에서 실행시켜 실행 결과에 대한 파일의 실행 응답 코드 및 파일의 실행 화면을 관리자의 디바이스로 제공하기 때문에 웹쉘로 인한 사고 발생시, 관리자에 의한 웹쉘에 대한 신속한 대응이 가능할 수 있고, 웹쉘 탐지를 위한 별도의 관리 인력이 필요하지 않기 때문에 인건비도 절감할 수 있다. According to any one of the above-mentioned tasks, it is possible to provide various virtual browser environments suitable for execution of a file in which a WebShell pattern is detected. In addition, since the file in which the WebShell pattern is detected is executed in the virtual browser environment, the execution response code of the file and the execution screen of the file are provided to the device of the manager in response to the execution result. Therefore, And can save labor costs because there is no need for a separate management staff to detect Web shells.

도 1은 본 발명의 일 실시예에 따른, 웹쉘 탐지 시스템의 구성도이다.
도 2는 본 발명의 일 실시예에 따른, 도 1에 도시된 웹쉘 탐지 서버의 블록도이다.
도 3은 본 발명의 일 실시예에 따른, 웹쉘 패턴이 검출된 파일의 실행 방법을 설명하기 위한 도면이다.
도 4는 본 발명의 일 실시예에 따른, 파일의 실행 응답 코드 및 파일의 실행 화면을 설명하기 위한 도면이다.
도 5는 본 발명의 일 실시예에 따른, 웹쉘 탐지 서버에 의해 웹쉘을 탐지하는 방법을 나타낸 동작 흐름도이다.
도 6은 본 발명의 일 실시예에 따른, 웹쉘 패턴이 검출된 파일의 실행 방법을 나타낸 동작 흐름도이다.
도 7은 본 발명의 일 실시예에 따른, 컴퓨팅 장치에 의해 실행되는 웹쉘을 탐지하는 방법을 나타낸 동작 흐름도이다.
1 is a configuration diagram of a web shell detection system according to an embodiment of the present invention.
2 is a block diagram of the WebShell detection server shown in FIG. 1, in accordance with an embodiment of the present invention.
3 is a view for explaining a method of executing a file in which a web shell pattern is detected according to an embodiment of the present invention.
4 is a diagram for explaining an execution response code of a file and an execution screen of a file according to an embodiment of the present invention.
5 is a flowchart illustrating a method of detecting a web shell by a web shell detection server according to an exemplary embodiment of the present invention.
6 is an operation flowchart illustrating a method of executing a file in which a WebShell pattern is detected according to an embodiment of the present invention.
7 is an operational flow diagram illustrating a method for detecting a WebShell executed by a computing device, in accordance with an embodiment of the present invention.

아래에서는 첨부한 도면을 참조하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 본 발명의 실시예를 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다. Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings, which will be readily apparent to those skilled in the art. The present invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. In order to clearly illustrate the present invention, parts not related to the description are omitted, and similar parts are denoted by like reference characters throughout the specification.

명세서 전체에서, 어떤 부분이 다른 부분과 "연결"되어 있다고 할 때, 이는 "직접적으로 연결"되어 있는 경우뿐 아니라, 그 중간에 다른 소자를 사이에 두고 "전기적으로 연결"되어 있는 경우도 포함한다. 또한 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다. Throughout the specification, when a part is referred to as being "connected" to another part, it includes not only "directly connected" but also "electrically connected" with another part in between . Also, when an element is referred to as "comprising ", it means that it can include other elements as well, without departing from the other elements unless specifically stated otherwise.

본 명세서에 있어서 '부(部)'란, 하드웨어에 의해 실현되는 유닛(unit), 소프트웨어에 의해 실현되는 유닛, 양방을 이용하여 실현되는 유닛을 포함한다. 또한, 1 개의 유닛이 2 개 이상의 하드웨어를 이용하여 실현되어도 되고, 2 개 이상의 유닛이 1 개의 하드웨어에 의해 실현되어도 된다. In this specification, the term " part " includes a unit realized by hardware, a unit realized by software, and a unit realized by using both. Further, one unit may be implemented using two or more hardware, or two or more units may be implemented by one hardware.

본 명세서에 있어서 단말 또는 디바이스가 수행하는 것으로 기술된 동작이나 기능 중 일부는 해당 단말 또는 디바이스와 연결된 서버에서 대신 수행될 수도 있다. 이와 마찬가지로, 서버가 수행하는 것으로 기술된 동작이나 기능 중 일부도 해당 서버와 연결된 단말 또는 디바이스에서 수행될 수도 있다. In this specification, some of the operations or functions described as being performed by the terminal or the device may be performed in the server connected to the terminal or the device instead. Similarly, some of the operations or functions described as being performed by the server may also be performed on a terminal or device connected to the server.

이하, 첨부된 구성도 또는 처리 흐름도를 참고하여, 본 발명의 실시를 위한 구체적인 내용을 설명하도록 한다. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings.

도 1은 본 발명의 일 실시예에 따른, 웹쉘 탐지 시스템의 구성도이다. 1 is a configuration diagram of a web shell detection system according to an embodiment of the present invention.

도 1을 참조하면, 웹쉘 탐지 시스템은 임의의 디바이스(100), 웹서버(110), 웹쉘 탐지 서버(120) 및 관리자의 디바이스(130)를 포함할 수 있다. 다만, 이러한 도 1의 웹쉘 탐지 시스템은 본 발명의 일 실시예에 불과하므로 도 1을 통해 본 발명이 한정 해석되는 것은 아니며, 본 발명의 다양한 실시예들에 따라 도 1과 다르게 구성될 수도 있다. 1, a web shell detection system may include any device 100, a web server 110, a web shell detection server 120, and a manager's device 130. However, since the web shell detection system of FIG. 1 is only an embodiment of the present invention, the present invention is not limited to FIG. 1 and may be configured differently from FIG. 1 according to various embodiments of the present invention.

일반적으로, 도 1의 웹쉘 탐지 시스템의 각 구성요소들은 네트워크(미도시)를 통해 연결된다. 네트워크는 단말들 및 서버들과 같은 각각의 노드 상호 간에 정보 교환이 가능한 연결 구조를 의미하는 것으로, 이러한 네트워크의 일 예는, Wi-Fi, 블루투스(Bluetooth), 인터넷(Internet), LAN(Local Area Network), Wireless LAN(Wireless Local Area Network), WAN(Wide Area Network), PAN(Personal Area Network), 3G, 4G, 5G, LTE 등이 포함되나 이에 한정되지는 않는다.Generally, the components of the web shell detection system of FIG. 1 are connected through a network (not shown). A network refers to a connection structure in which information can be exchanged between nodes such as terminals and servers. An example of such a network is Wi-Fi, Bluetooth, Internet, LAN Network, wireless LAN, WAN, PAN, 3G, 4G, 5G, LTE, and the like.

웹쉘 탐지 서버(120)는 웹서버(110)로 전송되는 복수의 파일에 대하여 웹쉘 탐지를 수행할 수 있다. 웹쉘 탐지 서버(120)는 웹서버(110)의 네트워크 트래픽을 통해 임의의 디바이스(100)로부터 웹서버(110)에 전송되는 파일이 있는지를 실시간으로 모니터링하고, 웹서버(110)로 전송되는 파일이 있는 경우, 해당 파일에 웹쉘 패턴이 존재하는지 검출할 수 있다.The web shell detection server 120 can perform web shell detection on a plurality of files transmitted to the web server 110. [ The web shell detection server 120 monitors in real time whether there is a file transmitted from the arbitrary device 100 to the web server 110 through the network traffic of the web server 110, , It is possible to detect whether there is a WebShell pattern in the file.

웹쉘 탐지 서버(120)는 파일에 웹쉘 패턴이 검출되면, 해당 파일의 확장자에 적합한 가상 브라우저 환경에서 파일을 실행하여 파일의 실행 응답 코드 및 파일의 실행 화면을 출력하거나 관리자의 디바이스(130)로 파일의 실행 응답 코드 및 파일의 실행 화면을 전송할 수 있다.When the web shell pattern is detected in the file, the web shell detection server 120 executes the file in the virtual browser environment suitable for the extension of the file, outputs the execution response code of the file and the execution screen of the file, The execution response code of the file and the execution screen of the file.

이하에서는 도 1의 웹쉘 탐지 시스템의 각 구성요소의 동작에 대해 보다 구체적으로 설명한다.Hereinafter, the operation of each component of the web shell detection system of FIG. 1 will be described in more detail.

도 2는 본 발명의 일 실시예에 따른, 도 1에 도시된 웹쉘 탐지 서버(120)의 블록도이다.FIG. 2 is a block diagram of the WebShell detection server 120 shown in FIG. 1, according to one embodiment of the present invention.

도 2를 참조하면, 웹쉘 탐지 서버(120)는 네트워크 트래픽 분석부(200), 저장부(210), 웹쉘 패턴 분석부(220), 행위 기반 분석부(230), 확장자 검출부(240), 출력부(250), 전송부(260) 및 DB(270)를 포함할 수 있다. 다만, 도 2에 도시된 웹쉘 탐지 서버(120)는 본 발명의 하나의 구현 예에 불과하며, 도 2에 도시된 구성요소들을 기초로 하여 여러 가지 변형이 가능하다.2, the web shell detection server 120 includes a network traffic analysis unit 200, a storage unit 210, a webshell pattern analysis unit 220, an behavior based analysis unit 230, an extension detection unit 240, A transmitter 250, a transmitter 260, and a DB 270. However, the web shell detection server 120 shown in FIG. 2 is only one embodiment of the present invention, and various modifications are possible based on the components shown in FIG.

네트워크 트래픽 분석부(200)는 웹서버(110)의 네트워크 트래픽을 모니터링할 수 있다. 예를 들면, 네트워크 트래픽 분석부(200)는 웹서버(110)에서 처리되는 웹 응용 프로그램 파일, 웹 컨텐츠 파일 등과 같은 파일이 웹서버(110)로 전송되는지 여부를 주기적으로 모니터링할 수 있다.The network traffic analyzing unit 200 may monitor the network traffic of the web server 110. For example, the network traffic analyzing unit 200 may periodically monitor whether a file such as a web application file, a web contents file, and the like processed by the web server 110 is transmitted to the web server 110.

저장부(210)는 네트워크 트래픽 중 웹서버(110)로 전송되는 파일을 저장할 수 있다. 여기서, 파일은 HTTP(hypertext transfer protocol) 또는 HTTPS(hypertext transfer protocol over secure sockets layer) 트래픽 중 서버 사이드 스크립트 언어로 작성된 파일일 수 있다. 파일은 예를 들면, 자바 스크립트, PHP, ASP 등과 같은 다양한 프로그램 언어의 문서로 작성된 파일일 수 있다. The storage unit 210 may store a file transmitted to the web server 110 among the network traffic. Here, the file may be a file written in a server-side scripting language among hypertext transfer protocol (HTTP) or hypertext transfer protocol over secure sockets layer (HTTPS) traffic. The file may be a document written in various programming languages such as, for example, JavaScript, PHP, ASP, and the like.

웹쉘 패턴 분석부(220)는 수신한 파일의 소스 코드에 웹쉘 패턴이 존재하는지 검출할 수 있다. 예를 들면, 웹쉘 패턴 분석부(220)는 기설정된 복수개의 웹쉘 패턴을 포함하는 웹쉘 패턴 리스트를 이용하여 파일의 소스 코드에서 웹쉘 패턴을 검출할 수 있다.The WebShell pattern analyzer 220 can detect whether a WebShell pattern exists in the source code of the received file. For example, the WebShell pattern analyzer 220 may detect a WebShell pattern in a source code of a file using a WebShell pattern list including a plurality of predetermined WebShell patterns.

행위 기반 분석부(230)는 파일에서 웹쉘 패턴이 검출된 경우, 해당 파일을 실행할 수 있다. 구체적으로, 행위 기반 분석부(230)는 복수의 가상 브라우져를 포함하고 있을 수 있다. 행위 기반 분석부(230)는 복수의 가상 브라우져 중 웹쉘 패턴이 검출된 파일의 실행이 가능한 가상 브라우져를 선택할 수 있다. 여기서, 복수의 가상 브라우져는 복수의 웹 스크립트 파일(예컨대, asp, jsp, php 파일 등) 각각이 실행 가능하도록 구성된 브라우저로서 복수의 웹 스크립트 파일 각각에 일대일 대응될 수 있다. 행위 기반 분석부(230)는 선택된 가상 브라우저 환경에서 파일을 실행할 수 있다.The behavior-based analysis unit 230 can execute the corresponding file when the WebShell pattern is detected in the file. Specifically, the behavior-based analysis unit 230 may include a plurality of virtual browsers. The behavior-based analysis unit 230 can select a virtual browser capable of executing a file in which a WebShell pattern is detected among a plurality of virtual browsers. Here, the plurality of virtual browsers may be one-to-one correspondence to each of the plurality of web script files as a browser configured to be able to execute each of a plurality of web script files (for example, asp, jsp, php file, etc.). The behavior based analysis unit 230 may execute the file in the selected virtual browser environment.

잠시 도 3을 참조하여 가상 브라우저 상에서 파일을 실행하는 방법을 설명하기로 한다. 도 3은 본 발명의 일 실시예에 따른, 웹쉘 패턴이 검출된 파일의 실행 방법을 설명하기 위한 도면이다. A method of executing a file on a virtual browser will be described with reference to FIG. 3 for a while. 3 is a view for explaining a method of executing a file in which a web shell pattern is detected according to an embodiment of the present invention.

도 3을 참조하면, 행위 기반 분석부(230)는 웹쉘 패턴이 검출된 파일(300)의 분석을 위해 해당 파일(300)이 실행 가능한 가상 브라우져 환경을 복수의 가상 브라우져(320)에서 선택할 수 있다. 3, the behavior-based analysis unit 230 can select a virtual browser environment in which a corresponding file 300 can be executed from among a plurality of virtual browsers 320 for analysis of a file 300 in which a WebShell pattern is detected .

행위 기반 분석부(230)는 웹쉘 패턴이 검출된 파일(300)의 확장자를 확인하여 확장자에 대응하는 가상 브라우져를 선택할 수 있다.The behavior-based analysis unit 230 can check the extension of the file 300 in which the WebShell pattern is detected and select a virtual browser corresponding to the extension.

예를 들면, 웹쉘 패턴이 검출된 파일(300)의 확장자가 asp인 경우, 행위 기반 분석부(230)는 ASP 가상 브라우져를 선택하여 ASP 가상 브라우져 환경에서 웹쉘 패턴이 검출된 파일(300)을 실행할 수 있다.For example, if the extension of the file 300 in which the WebShell pattern is detected is asp, the behavior-based analysis unit 230 selects the ASP virtual browser to execute the file 300 in which the WebShell pattern is detected in the ASP virtual browser environment .

다른 예를 들면, 웹쉘 패턴이 검출된 파일(300)의 확장자가 php인 경우, 행위 기반 분석부(230)는 PHP 가상 브라우져 환경에서 웹쉘 패턴이 검출된 파일(300)을 실행할 수 있다.In another example, when the extension of the file 300 in which the WebShell pattern is detected is php, the behavior-based analysis unit 230 may execute the file 300 in which the WebShell pattern is detected in the PHP virtual browser environment.

다시 도 2를 참조하면, 행위 기반 분석부(230)는 웹쉘 패턴이 검출된 파일의 확장자를 검출하는 확장자 검출부(240)를 포함할 수 있다.Referring again to FIG. 2, the behavior-based analysis unit 230 may include an extension detection unit 240 for detecting an extension of a file in which a WebShell pattern is detected.

행위 기반 분석부(230)는 웹쉘 패턴이 검출된 파일의 확장자에 기초하여 해당 파일의 개발 언어에 해당하는 가상 환경 웹루트 디렉토리로 해당 파일을 복사 또는 이동시킬 수 있다.The behavior-based analysis unit 230 may copy or move the file to the virtual environment web root directory corresponding to the development language of the file based on the extension of the file in which the WebShell pattern is detected.

예를 들면, 행위 기반 분석부(230)는 웹쉘 패턴이 검출된 파일의 확장자가 jsp인 경우, jsp에 해당하는 가상 환경 웹루트 디렉토리로 해당 파일을 복사 또는 이동시킬 수 있다.For example, if the extension of the file in which the WebShell pattern is detected is jsp, the behavior-based analysis unit 230 may copy or move the file to the virtual environment web root directory corresponding to jsp.

행위 기반 분석부(230)는 가상 환경 웹루트 디렉토리로 복사된 파일을 선택된 가상 브라우져로 실행할 수 있다. 예를 들면, 행위 기반 분석부(230)는 jsp에 해당하는 가상 환경 웹루트 디렉토리에 복사된 파일을 JSP 가상 브라우져 환경에서 실행할 수 있다. The behavior-based analysis unit 230 may execute a file copied to the virtual environment web root directory as a selected virtual browser. For example, the behavior-based analysis unit 230 can execute a file copied to a virtual environment web root directory corresponding to jsp in a JSP virtual browser environment.

출력부(250)는 파일의 실행 응답 코드 및 파일의 실행 화면을 출력할 수 있다. 여기서, 파일의 실행 응답 코드 및 파일의 실행 화면을 도 4를 참조하여 설명하기로 한다.The output unit 250 can output an execution response code of the file and an execution screen of the file. Here, the execution response code of the file and the execution screen of the file will be described with reference to FIG.

도 4는 본 발명의 일 실시예에 따른, 파일의 실행 응답 코드 및 파일의 실행 화면을 설명하기 위한 도면이다.4 is a diagram for explaining an execution response code of a file and an execution screen of a file according to an embodiment of the present invention.

도 4를 참조하면, 출력부(250)는 파일의 실행 결과로서 웹쉘 탐지 화면(401), 파일의 실행 응답 코드(403) 및 가상 브라우져 상에서 출력된 파일의 실행 화면(405)을 출력할 수 있다. 웹쉘 탐지 화면(401)은 웹쉘 탐지 상세 내역을 포함하고, 파일의 실행 응답 코드(403)는 복수의 가상 브라우져 중 파일의 실행이 가능한 가상 브라우져로의 가상 환경 웹루트 디렉토리로 복사된 파일 요청에 대한 HTML(hypertext markup language) 응답 코드이고, 파일의 실행 화면(405)은 해당 요청에 대한 HTML 응답의 브라우저 UI 화면일 수 있다.4, the output unit 250 may output the web shell detection screen 401, the file execution response code 403, and the execution screen 405 of the file output on the virtual browser as the execution result of the file . The web shell detection screen 401 includes Web shell detection details, and the execution response code 403 of the file includes information on a file request copied to the virtual environment web root directory to a virtual browser capable of executing a file among a plurality of virtual browsers (Hypertext markup language) response code, and the execution screen 405 of the file may be a browser UI screen of an HTML response to the request.

다시 도 2를 참조하면, 전송부(260)는 파일의 실행 응답 코드 및 파일의 실행 화면을 관리자의 디바이스(130)로 전송할 수 있다. 전송부(260)는 탐지된 웹쉘에 대한 소스 코드를 포함하는 웹쉘 탐지 상세 내역을 추가적으로 관리자의 디바이스(130)에게 전송할 수 있다.Referring again to FIG. 2, the transmitting unit 260 can transmit an execution response code of a file and an execution screen of a file to the manager's device 130. FIG. The sender 260 may further send the web shell detection details including the source code for the detected web shell to the device 130 of the administrator.

DB(270)는 웹쉘 탐지 서버(120) 내부의 각 구성요소들 간에 입력 및 출력되는 데이터를 저장하고, 웹쉘 탐지 서버(120)와 웹쉘 탐지 서버(120) 외부의 구성요소들간에 입력 및 출력되는 데이터를 저장한다. 이러한 DB(270)의 일 예에는 웹쉘 탐지 서버(120) 내부 또는 외부에 존재하는 하드디스크드라이브, ROM(Read Only Memory), RAM(Random Access Memory), 플래쉬메모리 및 메모리카드 등이 포함된다.The DB 270 stores data input and output between the components of the web shell detection server 120 and outputs the input and output data to and from components outside the web shell detection server 120 and the web shell detection server 120 And stores the data. One example of such a DB 270 includes a hard disk drive, a ROM (Read Only Memory), a RAM (Random Access Memory), a flash memory, a memory card, and the like, which are located inside or outside the Web Shell detection server 120.

한편, 당업자라면, 네트워크 트래픽 분석부(200), 저장부(210), 웹쉘 패턴 분석부(220), 행위 기반 분석부(230), 확장자 검출부(240), 출력부(250), 전송부(260) 및 DB(270) 각각이 분리되어 구현되거나, 이 중 하나 이상이 통합되어 구현될 수 있음을 충분히 이해할 것이다. Those skilled in the art will appreciate that the network traffic analysis unit 200, the storage unit 210, the WebShell pattern analysis unit 220, the behavior based analysis unit 230, the extension detection unit 240, the output unit 250, 260 and DB 270 may be separately implemented, or at least one of them may be implemented as an integrated system.

도 5는 본 발명의 일 실시예에 따른, 웹쉘 탐지 서버(120)에 의해 웹쉘을 탐지하는 방법을 나타낸 동작 흐름도이다.5 is an operational flow diagram illustrating a method for detecting a web shell by a web shell detection server 120, in accordance with an embodiment of the present invention.

도 5에 도시된 실시예에 따른 웹쉘 탐지 방법은 도 1 내지 도 4에 도시된 실시예에 따른 웹쉘 탐지 서버(120)에서 시계열적으로 처리되는 단계들을 포함한다. 따라서, 이하 생략된 내용이라고 하더라도 도 1 내지 도 4의 쉘 탐지 서버(120)에 관하여 기술된 내용은 도 5에 도시된 실시예에 따른 웹쉘 탐지 방법에도 적용될 수 있다. The web shell detection method according to the embodiment shown in FIG. 5 includes steps that are processed in a time-series manner in the web shell detection server 120 according to the embodiment shown in FIG. 1 to FIG. Therefore, even if omitted below, the contents of the shell detection server 120 of FIGS. 1 to 4 can be applied to the web shell detection method according to the embodiment shown in FIG.

도 5를 참조하면, 단계 S501에서 웹쉘 탐지 서버(120)는 웹서버(110)의 네트워크 트래픽을 모니터링할 수 있다. Referring to FIG. 5, in step S501, the web shell detection server 120 may monitor network traffic of the web server 110. FIG.

단계 S503에서 웹쉘 탐지 서버(120)는 네트워크 트래픽 중 웹서버(110)로 전송되는 파일을 수신할 수 있다. 여기서, 파일은 HTTP 또는 HTTPS 트래픽 중 서버 사이드 스크립트 언어로 작성된 파일일 수 있다. In step S503, the WebShell detection server 120 may receive a file transmitted to the web server 110 among the network traffic. Here, the file may be a file written in a server-side scripting language of HTTP or HTTPS traffic.

단계 S505에서 웹쉘 탐지 서버(120)는 수신한 파일의 소스 코드에 웹쉘 패턴이 존재하는지 검출할 수 있다. In step S505, the WebShell detection server 120 may detect whether a WebShell pattern exists in the source code of the received file.

단계 S507에서 웹쉘 탐지 서버(120)는 웹쉘 패턴이 검출된 경우, 파일을 실행할 수 있다. In step S507, the WebShell detection server 120 can execute the file when the WebShell pattern is detected.

단계 S509에서 웹쉘 탐지 서버(120)는 파일의 실행의 결과로서, 파일의 실행 응답 코드 및 파일의 실행 화면을 출력할 수 있다. In step S509, the WebShell detection server 120 may output an execution response code of the file and an execution screen of the file as a result of execution of the file.

도 5에는 도시되지 않았으나, 단계 S507에서 웹쉘 탐지 서버(120)는 복수의 가상 브라우져 중 파일의 실행이 가능한 가상 브라우져 환경에서 파일을 실행할 수 있다. Although not shown in FIG. 5, in step S507, the WebShell detection server 120 may execute a file in a virtual browser environment capable of executing a file among a plurality of virtual browsers.

도 5에는 도시되지 않았으나, 단계 S509 이후에 웹쉘 탐지 서버(120)는 파일의 실행 응답 코드 및 파일의 실행 화면을 관리자의 디바이스(130)로 전송할 수 있다. Although not shown in FIG. 5, after step S509, the WebShell detection server 120 may transmit an execution response code of a file and an execution screen of a file to the manager's device 130. FIG.

상술한 설명에서, 단계 S501 내지 S509는 본 발명의 구현예에 따라서, 추가적인 단계들로 더 분할되거나, 더 적은 단계들로 조합될 수 있다. 또한, 일부 단계는 필요에 따라 생략될 수도 있고, 단계 간의 순서가 변경될 수도 있다. In the above description, steps S501 to S509 may be further divided into additional steps or combined into fewer steps, according to an embodiment of the present invention. Also, some of the steps may be omitted as necessary, and the order between the steps may be changed.

도 6은 본 발명의 일 실시예에 따른, 웹쉘 패턴이 검출된 파일의 실행 방법을 나타낸 동작 흐름도이다.6 is an operation flowchart illustrating a method of executing a file in which a WebShell pattern is detected according to an embodiment of the present invention.

도 6에 도시된 실시예에 따른 파일 실행 방법은 도 1 내지 도 5에 도시된 실시예에 따른 웹쉘 탐지 서버(120)에서 시계열적으로 처리되는 단계들을 포함한다. 따라서, 이하 생략된 내용이라고 하더라도 도 1 내지 도 5의 웹쉘 탐지 서버(120)에 관하여 기술된 내용은 도 6에 도시된 실시예에 따른 파일 실행 방법에도 적용될 수 있다. The file execution method according to the embodiment shown in FIG. 6 includes steps that are performed in a time-series manner in the WebShell detection server 120 according to the embodiment shown in FIGS. 1 to 5. Therefore, even if omitted below, the contents described with respect to the WebShell detection server 120 of FIGS. 1 to 5 can also be applied to the file execution method according to the embodiment shown in FIG.

도 6을 참조하면, 단계 S601에서 웹쉘 탐지 서버(120)는 웹쉘 패턴이 검출된 파일의 확장자를 확인할 수 있다. Referring to FIG. 6, in step S601, the WebShell detection server 120 can confirm the extension of the file in which the WebShell pattern is detected.

단계 S603에서 웹쉘 탐지 서버(120)는 파일의 확장자에 기초하여 파일의 개발 언어에 해당하는 가상 환경 웹루트 디렉토리로 파일을 복사 또는 이동시킬 수 있다. In step S603, the web shell detection server 120 may copy or move the file to the virtual environment web root directory corresponding to the development language of the file, based on the file extension.

단계 S605에서 웹쉘 탐지 서버(120)는 파일의 실행이 가능한 가상 브라우져로 가상 환경 웹루트 디렉토리로 복사된 파일을 요청하여 실행할 수 있다. In step S605, the web shell detection server 120 can request and execute a file copied to the virtual environment web root directory in a virtual browser capable of executing a file.

단계 S607에서 웹쉘 탐지 서버(120)는 파일의 실행 결과로서, 파일의 실행 응답 코드 및 파일의 실행 화면을 출력할 수 있다. 여기서, 파일의 실행 응답 코드는 요청(가상 브라우져로의 가상 환경 웹루트 디렉토리로 복사된 파일 요청)에 대한 HTML 응답 코드이고, 파일의 실행 화면은 요청에 대한 HTML 응답의 브라우저 UI 화면일 수 있다. In step S607, the web shell detection server 120 can output the execution response code of the file and the execution screen of the file as the execution result of the file. Here, the execution response code of the file is the HTML response code for the request (the file request copied to the virtual environment web root directory to the virtual browser), and the execution screen of the file may be the browser UI screen of the HTML response to the request.

상술한 설명에서, 단계 S601 내지 S607은 본 발명의 구현예에 따라서, 추가적인 단계들로 더 분할되거나, 더 적은 단계들로 조합될 수 있다. 또한, 일부 단계는 필요에 따라 생략될 수도 있고, 단계 간의 순서가 변경될 수도 있다. In the above description, steps S601 to S607 may be further divided into additional steps, or combined into fewer steps, according to an embodiment of the present invention. Also, some of the steps may be omitted as necessary, and the order between the steps may be changed.

도 7은 본 발명의 일 실시예에 따른, 컴퓨팅 장치에 의해 실행되는 웹쉘을 탐지하는 방법을 나타낸 동작 흐름도이다.7 is an operational flow diagram illustrating a method for detecting a WebShell executed by a computing device, in accordance with an embodiment of the present invention.

도 7에 도시된 실시예에 따른 웹쉘 탐지 방법은 도 1 내지 도 6에 도시된 실시예에 따른 웹쉘 탐지 서버(120)에서 시계열적으로 처리되는 단계들을 포함한다. 따라서, 이하 생략된 내용이라고 하더라도 도 1 내지 도 6의 웹쉘 탐지 서버(120)에 관하여 기술된 내용은 도 7에 도시된 실시예에 따른 웹쉘 탐지 방법에도 적용될 수 있다. The web shell detection method according to the embodiment shown in FIG. 7 includes the steps of time series processing in the web shell detection server 120 according to the embodiment shown in FIGS. 1 to 6. Therefore, even if omitted below, the contents described with respect to the WebShell detection server 120 of FIGS. 1 to 6 may be applied to the WebShell detection method according to the embodiment shown in FIG.

도 7을 참조하면, 단계 S701에서 컴퓨팅 장치는 네트워크 트래픽 중 웹서버(110)에 전송되는 파일을 수신하여 저장하도록 하는 명령어를 실행할 수 있다. Referring to FIG. 7, in step S701, the computing device may execute an instruction to receive and store a file transmitted to the web server 110 among network traffic.

단계 S703에서 컴퓨팅 장치는 웹서버(110)로 전송되는 파일이 수신된 경우, 수신한 파일의 소스 코드에 웹쉘 패턴이 존재하는지 검출하도록 하는 명령어를 실행할 수 있다. In step S703, when the file transmitted to the web server 110 is received, the computing device may execute an instruction to detect whether a WebShell pattern exists in the source code of the received file.

단계 S705에서 컴퓨팅 장치는 웹쉘 패턴이 검출된 경우, 파일의 실행이 가능한 가상 브라우져 환경에서 파일을 실행하도록 하는 명령어를 실행할 수 있다.In step S705, if the WebShell pattern is detected, the computing device may execute an instruction to cause the file to be executed in a virtual browser environment capable of executing the file.

단계 S707에서 컴퓨팅 장치는 파일의 실행 결과로서, 파일의 실행 응답 코드 및 파일의 실행 화면을 출력하도록 하는 명령어를 실행할 수 있다.In step S707, the computing device may execute a command to output, as the execution result of the file, the execution response code of the file and the execution screen of the file.

단계 S709에서 컴퓨팅 장치는 파일의 실행 응답 코드 및 상기 파일의 실행 화면을 관리자의 디바이스(130)로 전송하도록 하는 명령어를 실행할 수 있다.In step S709, the computing device may execute a command to transfer the execution response code of the file and the executable image of the file to the manager's device 130. [

상술한 설명에서, 단계 S701 내지 S709는 본 발명의 구현예에 따라서, 추가적인 단계들로 더 분할되거나, 더 적은 단계들로 조합될 수 있다. 또한, 일부 단계는 필요에 따라 생략될 수도 있고, 단계 간의 순서가 변경될 수도 있다. In the above description, steps S701 to S709 may be further divided into further steps or combined into fewer steps, according to an embodiment of the present invention. Also, some of the steps may be omitted as necessary, and the order between the steps may be changed.

본 발명의 일 실시예는 컴퓨터에 의해 실행되는 프로그램 모듈과 같은 컴퓨터에 의해 실행 가능한 명령어를 포함하는 기록 매체의 형태로도 구현될 수 있다. 컴퓨터 판독 가능 매체는 컴퓨터에 의해 액세스될 수 있는 임의의 가용 매체일 수 있고, 휘발성 및 비휘발성 매체, 분리형 및 비분리형 매체를 모두 포함한다. 또한, 컴퓨터 판독가능 매체는 컴퓨터 저장 매체 및 통신 매체를 모두 포함할 수 있다. 컴퓨터 저장 매체는 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈 또는 기타 데이터와 같은 정보의 저장을 위한 임의의 방법 또는 기술로 구현된 휘발성 및 비휘발성, 분리형 및 비분리형 매체를 모두 포함한다. 통신 매체는 전형적으로 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈, 또는 반송파와 같은 변조된 데이터 신호의 기타 데이터, 또는 기타 전송 메커니즘을 포함하며, 임의의 정보 전달 매체를 포함한다. One embodiment of the present invention may also be embodied in the form of a recording medium including instructions executable by a computer, such as program modules, being executed by a computer. Computer readable media can be any available media that can be accessed by a computer and includes both volatile and nonvolatile media, removable and non-removable media. In addition, the computer-readable medium may include both computer storage media and communication media. Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Communication media typically includes any information delivery media, including computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave, or other transport mechanism.

전술한 본 발명의 설명은 예시를 위한 것이며, 본 발명이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명의 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 쉽게 변형이 가능하다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. 예를 들어, 단일형으로 설명되어 있는 각 구성 요소는 분산되어 실시될 수도 있으며, 마찬가지로 분산된 것으로 설명되어 있는 구성 요소들도 결합된 형태로 실시될 수 있다. It will be understood by those skilled in the art that the foregoing description of the present invention is for illustrative purposes only and that those of ordinary skill in the art can readily understand that various changes and modifications may be made without departing from the spirit or essential characteristics of the present invention. will be. It is therefore to be understood that the above-described embodiments are illustrative in all aspects and not restrictive. For example, each component described as a single entity may be distributed and implemented, and components described as being distributed may also be implemented in a combined form.

본 발명의 범위는 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다. It is intended that the present invention covers the modifications and variations of this invention provided they come within the scope of the appended claims and their equivalents. .

100: 임의의 디바이스
110: 웹서버
120: 웹쉘 탐지 서버
130: 관리자의 디바이스
140: 파일
200: 네트워크 트래픽 분석부
210: 저장부
220: 웹쉘 패턴 분석부
230: 행위 기반 분석부
240: 확장자 검출부
250: 출력부
260: 전송부
100: any device
110: Web server
120: Web Shell detection server
130: Manager's device
140: File
200: network traffic analysis unit
210:
220: web shell pattern analysis unit
230: Behavior Based Analysis Unit
240: extension detector
250: Output section
260:

Claims (18)

웹쉘 탐지 서버에서 수행되는 웹쉘 탐지 방법에 있어서,
웹서버의 네트워크 트래픽을 모니터링하는 단계;
상기 네트워크 트래픽 중 상기 웹서버에 전송되는 파일을 수신하는 단계;
상기 수신한 파일의 소스 코드에 웹쉘 패턴이 존재하는지 검출하는 단계;
상기 웹쉘 패턴이 검출된 경우, 상기 파일을 실행하는 단계; 및
상기 파일의 실행 응답 코드 및 상기 파일의 실행 화면을 출력하는 단계
를 포함하는 것인, 웹쉘 탐지 방법.
A web shell detection method performed by a web shell detection server,
Monitoring network traffic of the web server;
Receiving a file transmitted to the web server among the network traffic;
Detecting whether a WebShell pattern exists in the source code of the received file;
Executing the file if the web shell pattern is detected; And
Outputting an execution response code of the file and an execution screen of the file
The web shell detection method comprising:
제 1 항에 있어서,
상기 파일은 HTTP(hypertext transfer protocol) 또는 HTTPS(hypertext transfer protocol over secure sockets layer) 트래픽 중 서버 사이드 스크립트 언어로 작성된 파일인 것인, 웹쉘 탐지 방법.
The method according to claim 1,
Wherein the file is a file written in a server-side scripting language of hypertext transfer protocol (HTTP) or hypertext transfer protocol over secure sockets layer (HTTPS) traffic.
제 1 항에 있어서,
상기 파일을 실행하는 단계는,
복수의 가상 브라우져 중 상기 파일의 실행이 가능한 가상 브라우져 환경에서 상기 파일을 실행하는 단계인 것인, 웹쉘 탐지 방법.
The method according to claim 1,
Wherein the step of executing the file comprises:
And executing the file in a virtual browser environment capable of executing the file among a plurality of virtual browsers.
제 3 항에 있어서,
상기 파일의 실행이 가능한 가상 브라우져 환경에서 상기 파일을 실행하는 단계는
상기 파일의 확장자를 확인하는 단계; 및
상기 확장자에 기초하여 상기 파일의 개발 언어에 해당하는 가상 환경 웹루트 디렉토리로 상기 파일을 복사하는 단계
를 포함하는 것인, 웹쉘 탐지 방법.
The method of claim 3,
The step of executing the file in a virtual browser environment capable of executing the file
Confirming an extension of the file; And
Copying the file to a virtual environment web root directory corresponding to a development language of the file based on the extension
The web shell detection method comprising:
제 4 항에 있어서,
상기 파일의 실행이 가능한 가상 브라우져 환경에서 상기 파일을 실행하는 단계는
상기 파일의 실행이 가능한 가상 브라우져로 상기 가상 환경 웹루트 디렉토리로 복사된 파일을 요청하여 실행하는 단계
를 더 포함하는 것인, 웹쉘 탐지 방법.
5. The method of claim 4,
The step of executing the file in a virtual browser environment capable of executing the file
Requesting and executing a file copied to the virtual environment web root directory in a virtual browser capable of executing the file
The web shell detection method further comprising:
제 5 항에 있어서,
상기 파일의 실행 응답 코드는 상기 요청에 대한 HTML(hypertext markup language) 응답 코드인 것인, 웹쉘 탐지 방법.
6. The method of claim 5,
Wherein the execution response code of the file is a hypertext markup language (HTML) response code for the request.
제 5 항에 있어서,
상기 파일의 실행 화면은 상기 요청에 대한 HTML 응답의 브라우저 UI 화면인 것인, 웹쉘 탐지 방법.
6. The method of claim 5,
Wherein the executable file of the file is a browser UI screen of an HTML response to the request.
제 1 항에 있어서,
상기 파일의 실행 응답 코드 및 상기 파일의 실행 화면을 관리자의 디바이스로 전송하는 단계
를 더 포함하는 것인, 웹쉘 탐지 방법.
The method according to claim 1,
Transmitting an execution response code of the file and an execution screen of the file to a device of an administrator
The web shell detection method further comprising:
웹쉘 탐지 서버에 있어서,
웹서버의 네트워크 트래픽을 모니터링하는 네트워크 트래픽 분석부;
상기 네트워크 트래픽 중 상기 웹서버에 전송되는 파일을 저장하는 저장부;
상기 수신한 파일의 소스 코드에 웹쉘 패턴이 존재하는지 검출하는 웹쉘 패턴 분석부;
상기 웹쉘 패턴이 검출된 경우, 상기 파일을 실행하는 행위 기반 분석부; 및
상기 파일의 실행 응답 코드 및 상기 파일의 실행 화면을 출력하는 출력부
를 포함하는 것인, 웹쉘 탐지 서버.
In a web shell detection server,
A network traffic analyzing unit for monitoring network traffic of the web server;
A storage unit for storing a file transmitted to the web server among the network traffic;
A WebShell pattern analyzer for detecting whether a WebShell pattern exists in a source code of the received file;
An action-based analysis unit for executing the file when the WebShell pattern is detected; And
An output response unit for outputting an execution response code of the file and an execution screen of the file,
The web shell detection server comprising:
제 9 항에 있어서,
상기 파일은 HTTP(hypertext transfer protocol) 또는 HTTPS(hypertext transfer protocol over secure sockets layer) 트래픽 중 서버 사이드 스크립트 언어로 작성된 파일인 것인, 웹쉘 탐지 서버.
10. The method of claim 9,
Wherein the file is a file written in a server side script language of HTTP (hypertext transfer protocol) or HTTPS (hypertext transfer protocol over secure sockets layer) traffic.
제 9 항에 있어서,
상기 행위 기반 분석부는
복수의 가상 브라우져를 포함하고,
상기 복수의 가상 브라우져 중 상기 파일의 실행이 가능한 가상 브라우져에서 상기 파일을 실행하는 것인, 웹쉘 탐지 서버.
10. The method of claim 9,
The behavior-based analysis unit
A plurality of virtual browsers,
Wherein the server executes the file in a virtual browser capable of executing the file among the plurality of virtual browsers.
제 11 항에 있어서,
상기 행위 기반 분석부는
상기 파일의 확장자를 확인하는 확장자 검출부
를 더 포함하는 것인, 웹쉘 탐지 서버.
12. The method of claim 11,
The behavior-based analysis unit
An extension detecting unit for checking an extension of the file,
Further comprising: a Web Shell detection server.
제 12 항에 있어서,
상기 행위 기반 분석부는
상기 확장자에 기초하여 상기 파일의 개발 언어에 해당하는 가상 환경 웹루트 디렉토리로 상기 파일을 복사하는 것인, 웹쉘 탐지 서버.
13. The method of claim 12,
The behavior-based analysis unit
And copying the file to a virtual environment web root directory corresponding to a development language of the file based on the extension.
제 13 항에 있어서,
상기 행위 기반 분석부는
상기 파일의 실행이 가능한 가상 브라우져로 상기 가상 환경 웹루트 디렉토리로 복사된 파일을 요청하여 실행하는 것인, 웹쉘 탐지 서버.
14. The method of claim 13,
The behavior-based analysis unit
And requests and executes a file copied to the virtual environment web root directory in a virtual browser capable of executing the file.
제 14 항에 있어서,
상기 파일의 실행 응답 코드는 상기 요청에 대한 HTML(hypertext markup language) 응답 코드인 것인, 웹쉘 탐지 서버.
15. The method of claim 14,
Wherein the execution response code of the file is a hypertext markup language (HTML) response code for the request.
제 14 항에 있어서,
상기 파일의 실행 화면은 상기 요청에 대한 HTML 응답의 브라우저 UI 화면인 것인, 웹쉘 탐지 서버.
15. The method of claim 14,
Wherein the executable file of the file is a browser UI screen of an HTML response to the request.
제 9 항에 있어서,
상기 파일의 실행 응답 코드 및 상기 파일의 실행 화면을 관리자의 디바이스로 전송하는 전송부
를 더 포함하는 것인, 웹쉘 탐지 서버.
10. The method of claim 9,
An execution response code of the file and an execution screen of the file to the device of the administrator
Further comprising: a Web Shell detection server.
웹쉘을 탐지하는 명령어들의 시퀀스를 포함하는 컴퓨터 판독가능 매체로서,
컴퓨팅 장치에 의해 실행될 때,
상기 컴퓨팅 장치가,
상기 네트워크 트래픽 중 웹서버에 전송되는 파일을 수신하고,
상기 수신한 파일의 소스 코드에 웹쉘 패턴이 존재하는지 검출하고,
상기 웹쉘 패턴이 검출된 경우, 상기 파일을 실행하고,
상기 파일의 실행 응답 코드 및 상기 파일의 실행 화면을 출력하도록 하는, 컴퓨터 판독가능 매체.
A computer readable medium comprising a sequence of instructions for detecting a web shell,
When executed by a computing device,
The computing device comprising:
Receiving a file transmitted to the web server among the network traffic,
Detecting whether a WebShell pattern exists in a source code of the received file,
Executing the file when the WebShell pattern is detected,
The execution response code of the file, and the execution image of the file.
KR1020160096922A 2016-06-10 2016-07-29 Method for detecting webshell, server and computer readable medium KR20170140049A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020160072451 2016-06-10
KR20160072451 2016-06-10

Publications (1)

Publication Number Publication Date
KR20170140049A true KR20170140049A (en) 2017-12-20

Family

ID=60931587

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020160096922A KR20170140049A (en) 2016-06-10 2016-07-29 Method for detecting webshell, server and computer readable medium

Country Status (1)

Country Link
KR (1) KR20170140049A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109905385A (en) * 2019-02-19 2019-06-18 中国银行股份有限公司 A kind of webshell detection method, apparatus and system
CN110198291A (en) * 2018-03-15 2019-09-03 腾讯科技(深圳)有限公司 A kind of webpage back door detection method, device, terminal and storage medium
CN110855661A (en) * 2019-11-11 2020-02-28 杭州安恒信息技术股份有限公司 WebShell detection method, device, equipment and medium
CN114697049A (en) * 2020-12-14 2022-07-01 中国科学院计算机网络信息中心 WebShell detection method and device

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110198291A (en) * 2018-03-15 2019-09-03 腾讯科技(深圳)有限公司 A kind of webpage back door detection method, device, terminal and storage medium
CN110198291B (en) * 2018-03-15 2022-02-18 腾讯科技(深圳)有限公司 Webpage backdoor detection method, device, terminal and storage medium
CN109905385A (en) * 2019-02-19 2019-06-18 中国银行股份有限公司 A kind of webshell detection method, apparatus and system
CN109905385B (en) * 2019-02-19 2021-08-20 中国银行股份有限公司 Webshell detection method, device and system
CN110855661A (en) * 2019-11-11 2020-02-28 杭州安恒信息技术股份有限公司 WebShell detection method, device, equipment and medium
CN110855661B (en) * 2019-11-11 2022-05-13 杭州安恒信息技术股份有限公司 WebShell detection method, device, equipment and medium
CN114697049A (en) * 2020-12-14 2022-07-01 中国科学院计算机网络信息中心 WebShell detection method and device
CN114697049B (en) * 2020-12-14 2024-04-12 中国科学院计算机网络信息中心 WebShell detection method and device

Similar Documents

Publication Publication Date Title
US10445502B1 (en) Susceptible environment detection system
US10681006B2 (en) Application-context-aware firewall
US9294541B2 (en) Method and system for correlation of session activities to a browser window in a client-server enviroment
KR101672791B1 (en) Method and system for detection of vulnerability on html5 mobile web application
US20200204571A1 (en) Malware detection in network traffic time series
KR20170140049A (en) Method for detecting webshell, server and computer readable medium
US20140289366A1 (en) Service providing method and system for instance hosting
US8904492B2 (en) Method of controlling information processing system, computer-readable recording medium storing program for controlling apparatus
KR20160148544A (en) Adjustment of protection based on prediction and warning of malware-prone activity
US8949709B2 (en) Instructing web clients to ignore scripts in specified portions of web pages
US20220050902A1 (en) Opentelemetry security extensions
US20220027456A1 (en) Rasp-based implementation using a security manager
US11233867B2 (en) On-demand push notification mechanism
US20210226990A1 (en) Automatic detection and prevention of injection attacks
CN104834588B (en) The method and apparatus for detecting resident formula cross site scripting loophole
US8935784B1 (en) Protecting subscribers of web feeds from malware attacks
US20170177866A1 (en) Method and apparatus for detecting exploits
CN108810163B (en) Self-signed SSL certificate processing system and method
US11729145B2 (en) User interface for web server risk awareness
CN108259416A (en) Detect the method and relevant device of malicious web pages
KR101885615B1 (en) Method for generating attack character string and apparatus for the same
US10491654B2 (en) Communicating with a remote service through a hypertext transfer protocol (HTTP) session
Rivera et al. Industrial IoT security monitoring and test on Fed4Fire+ platforms
US20230409662A1 (en) Dynamic web content management system
KR102156600B1 (en) System and method for creating association between packets collected in network and processes in endpoint computing device