KR20220145580A - Security Managing Method For Industrial Control System To Detect DLL Injection - Google Patents

Security Managing Method For Industrial Control System To Detect DLL Injection Download PDF

Info

Publication number
KR20220145580A
KR20220145580A KR1020210052328A KR20210052328A KR20220145580A KR 20220145580 A KR20220145580 A KR 20220145580A KR 1020210052328 A KR1020210052328 A KR 1020210052328A KR 20210052328 A KR20210052328 A KR 20210052328A KR 20220145580 A KR20220145580 A KR 20220145580A
Authority
KR
South Korea
Prior art keywords
dll
injection
industrial control
control system
attack
Prior art date
Application number
KR1020210052328A
Other languages
Korean (ko)
Other versions
KR102545488B1 (en
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 명지대학교 산학협력단
Priority to KR1020210052328A priority Critical patent/KR102545488B1/en
Publication of KR20220145580A publication Critical patent/KR20220145580A/en
Application granted granted Critical
Publication of KR102545488B1 publication Critical patent/KR102545488B1/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
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • 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/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • G06F21/53Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow by executing in a restricted environment, e.g. sandbox or secure virtual machine
    • 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/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/73Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information by creating or determining hardware identification, e.g. serial numbers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Virology (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention relates to a security management method of an industrial control system for detecting DLL injection, comprising the steps of: activating a security mode for detecting DLL injection in order to defend against a DLL injection attack to interfere with the control logic of an industrial control system; monitoring the call status of a DLL load API function generated in a process to be protected using inline hooking, and identifying a caller who called the DLL load API function; and if a malicious DLL injection attack attempt is determined based on the identified caller, recognizing the same as a cyberattack using DLL injection and suspending the DLL load API function call. Therefore, provided is a security management method of an industrial control system for detecting DLL injection, wherein the security level of an industrial control system can be improved.

Description

DLL 인젝션을 탐지하는 산업제어시스템의 보안 관리 방법{Security Managing Method For Industrial Control System To Detect DLL Injection}Security Managing Method For Industrial Control System To Detect DLL Injection

본 발명은 전력 시스템을 포함한 대규모 산업 시설에서 채택하고 있는 산업제어시스템(ICS)을 대상으로 하는 사이버 공격의 하나로서 제어 로직에 간섭하기 위한 DLL 인젝션이라는 공격 기법을 사전 탐지하여 차단하는 DLL 인젝션을 탐지하는 산업제어시스템의 보안 관리 방법에 관한 것이다.The present invention detects DLL injection that detects and blocks an attack technique called DLL injection for interfering with control logic in advance as one of cyber attacks targeting industrial control systems (ICS) adopted in large-scale industrial facilities including power systems. It relates to a security management method of an industrial control system.

산업제어시스템(ICS)은 전기, 물 및 폐수, 석유 및 천연 가스, 화학, 제약, 펄프 및 제지, 식품 및 음료, 개별 품목의 제조업(자동차, 항공우주 및 내구재 등에 다양한 유형으로 적용되고 있으며, 산업 부문 및 주요기반 시설에서 찾을 수 있는 감시 제어 및 데이터 수집(SCADA) 시스템, 분산제어시스템(DCS) 및 프로그래머블 로직 컨트롤러(PLC)와 같은 기타 제어시스템 구성 등 여러 유형의 제어시스템을 포함하는 개념이다.Industrial Control System (ICS) is applied in various types to electricity, water and wastewater, petroleum and natural gas, chemical, pharmaceutical, pulp and paper, food and beverage, manufacturing of individual items (automobile, aerospace and durable goods, etc.) The concept encompasses several types of control systems, including supervisory control and data acquisition (SCADA) systems, distributed control systems (DCS), and other control system configurations such as programmable logic controllers (PLCs) that can be found in departments and critical infrastructure.

산업제어시스템(ICS)을 대상으로 하는 사이버 공격은 나날이 증가하고 있다. 악의적인 사이버 공격은 해당 프로세스를 이용한 정당한 사용자의 제어명령을 공격자가 감시하거나 조작할 수 있고, 해당 프로세스에게 인가된 접근 권한을 공격자가 악용할 수 있다. 이러한 사이버 공격 사례의 하나는 인터넷 뱅킹 프로그램의 프로세스에 공격자가 악성 DLL을 삽입하여 금융거래 처리 로직을 모니터링하여 인터넷 뱅킹 사용자가 입력한 거래 정보를 외부로 유출시키게 된다, 다른 예로서 우라늄 농축 시설을 공격한 Stuxnet이나 전력망의 동기위상기(synchrophasor) 기반 실시간 제어 시스템을 공격한 Black Energy 3와 같은 악성코드들은 SCADA 시스템을 공격하여 해커가 산업 시설의 제어 권한을 탈취하는 실제의 공격이 발생하였다. Cyber attacks targeting industrial control systems (ICS) are increasing day by day. In a malicious cyber attack, an attacker can monitor or manipulate the control command of a legitimate user using the process, and the attacker can abuse the access right granted to the process. One of these cyber attack cases is that the attacker inserts a malicious DLL into the process of the Internet banking program to monitor the financial transaction processing logic and leak the transaction information entered by the Internet banking user. Another example is to attack a uranium enrichment facility. Malware such as Stuxnet or Black Energy 3, which attacked a real-time control system based on a synchrophasor of a power grid, attacked the SCADA system, resulting in an actual attack in which hackers took control of industrial facilities.

그러나 산업제어시스템(ICS)의 보안과 관련하여 기존에 발표된 연구들과 국제 표준들(예: 변전소 자동화 시스템(SAS)에서의 IEC 61850)은 네트워크 통신 관점에서의 보안이나 망 분리와 같은 기초적인 보안 원칙을 논의하는 수준에 머물러 있어, 이러한 방식으로 컴퓨터 시스템 자체를 공략(exploit)하는 현실 세계의 복잡한 공격 방식에 미흡하고 취약하다는 지적이 제기되어 왔다.However, existing studies and international standards related to the security of industrial control systems (ICS) (eg, IEC 61850 in substation automation systems (SAS)) are It has been pointed out that it is insufficient and vulnerable to the complex attack method in the real world that exploits the computer system itself in this way by staying at the level of discussing security principles.

[문헌1] 한국공개특허 제10-2019-0001325호(2019.01.04. 공개)[Document 1] Korean Patent Publication No. 10-2019-0001325 (published on 01.04. 2019) [문헌2] 한국등록특허 제10-2139140호(2020.07.23. 등록)[Document 2] Korean Patent No. 10-2139140 (Registered on July 23, 2020)

없음doesn't exist

전력 시스템을 포함한 대규모 산업 시설들에서 채택하고 있는 산업제어시스템의 사이버 공격 사례에서 DLL 인젝션이라는 공격 기법이 활용되고 있다. 예를 들어 악성코드가 Microsoft Windows 기반의 SCADA 제어 시스템의 제어 로직에 간섭하기 위해 DLL 인젝션이라 불리는 공격 기법을 활용하고 있다. 이에 따라 산업제어시스템의 호스트 시스템 측면에서 보안 위협을 완화(mitigation) 하기 위한 방안이 절실히 요구되고 있다.An attack technique called DLL injection is used in the case of a cyber attack on the industrial control system adopted by large-scale industrial facilities including power systems. For example, malicious code uses an attack technique called DLL injection to interfere with the control logic of the Microsoft Windows-based SCADA control system. Accordingly, there is an urgent need for a method for mitigating security threats from the host system side of the industrial control system.

본 발명의 목적은 인라인 후킹을 통해 DLL 로직 API 함수를 감시하고, DLL 인젝션 공격 시도를 사전에 탐지함으로써 산업제어시스템의 보안 수준을 향상할 수 있는 DLL 인젝션을 탐지하는 산업제어시스템의 보안 관리 방법을 제공함에 있다.An object of the present invention is to provide a security management method of an industrial control system that monitors DLL logic API functions through inline hooking and detects DLL injection that can improve the security level of the industrial control system by detecting DLL injection attack attempts in advance. is in providing.

본 연구는 한국전력공사의 2018년 착수 기초연구개발 과제 연구비에 의해 지원되었음.(과제번호 : R18XA01)This research was supported by the research grant for the basic research and development project initiated in 2018 by Korea Electric Power Corporation. (Project No.: R18XA01)

상기 목적을 달성하기 위한 본 발명에 따른 DLL 인젝션을 탐지하는 산업제어시스템의 보안 관리 방법은, (a) 산업제어시스템의 제어 로직에 간섭하기 위한 DLL 인젝션 공격을 방어하기 위하여 DLL 인젝션 탐지를 위한 보안 모드를 활성화하는 단계; (b) 인라인 후킹을 이용하여 보호 대상의 프로세스에서 발생되는 DLL 로드 API 함수의 호출 상태를 감시하고, DLL 로드 API 함수를 호출한 호출주체를 식별하는 단계; 및 (c) 상기 (b) 단계에서 식별된 호출주체에 기초하여 악의적인 DLL 인젝션 공격 시도로 판단되면 DLL 인젝션을 이용한 사이버 공격으로 인식하여 DLL 로드 API 함수 호출을 보류하는 단계;를 포함하는 것을 특징으로 한다.The security management method of the industrial control system for detecting DLL injection according to the present invention for achieving the above object is (a) security for DLL injection detection in order to prevent a DLL injection attack for interfering with the control logic of the industrial control system activating the mode; (b) monitoring a call state of a DLL load API function occurring in a process to be protected using inline hooking, and identifying a caller who called the DLL load API function; and (c) when it is determined that a malicious DLL injection attack attempt is attempted based on the caller identified in step (b), recognizing it as a cyber attack using DLL injection and suspending the DLL load API function call; do it with

또한, 상기 (b) 단계는 DLL 로드 API 함수 호출시 프로세스 메모리의 스택 영역에 저장된 복귀 주소를 수집하고, 수집된 복귀 주소와 프로세스 메모리에 할당된 메모리 주소를 비교하여 호출주체를 식별하는 것을 특징으로 한다.In addition, the step (b) collects the return address stored in the stack area of the process memory when the DLL load API function is called, and identifies the call subject by comparing the collected return address with the memory address allocated to the process memory. do.

또한, 상기 (c) 단계에서 악의적인 DLL 인젝션 공격 시도는 원격 스레드를 이용한 공격 시도, APC 호출을 이용한 공격 시도, 및 윈도우 훅을 이용한 공격 시도 중 어느 하나인 것을 특징으로 한다.In addition, the malicious DLL injection attack attempt in step (c) is characterized in that it is any one of an attack attempt using a remote thread, an attack attempt using an APC call, and an attack attempt using a window hook.

본 발명은 DLL 로드 API 함수를 호출한 복귀 주소를 수집하여 호출주체를 식별함으로써 악의적인 DLL 인젝션 공격 기법을 사전 탐지하여 차단할 수 있어 산업제어시스템의 보안 수준을 향상시킬 수 있다.The present invention can detect and block malicious DLL injection attack techniques in advance by identifying the caller by collecting the return address that called the DLL load API function, thereby improving the security level of the industrial control system.

도 1은 Microsoft Windows 시스템에서 임의의 DLL이 로드되는 과정을 간략히 나타낸 도면,
도 2는 정상적인 DLL 로드 시도를 설명하기 위한 도면,
도 3은 악의적인 DLL 인젝션을 이용한 DLL 로드 시도를 설명하기 위한 도면,
도 4는 정상적인 Win32 API의 호출 과정을 나타내는 도면,
도 5는 인라인 후킹된 Win32 API의 호출 과정을 나타내는 도면,
도 6은 본 발명의 실시예에 따른 DLL 인젝션 탐지부가 보호 대상의 프로세스 메모리에서 DLL 인젝션을 시도하는 DLL 로드 API 함수의 호출주체를 탐지하는 동작을 설명하기 위한 도면,
도 7은 윈도우 응용프로그램의 함수 호출 직후 스택 영역에 저장된 호출주체의 복귀 주소(return address)를 설명하기 위한 도면,
도 8은 실시예에 따른 DLL 인젝션을 탐지하는 산업제어시스템의 보안 관리 방법을 설명하기 위한 흐름도이다.
1 is a diagram schematically showing the process of loading an arbitrary DLL in a Microsoft Windows system;
2 is a diagram for explaining a normal DLL loading attempt;
3 is a diagram for explaining an attempt to load a DLL using malicious DLL injection;
4 is a diagram showing a normal Win32 API calling process;
5 is a diagram showing a calling process of an inline hooked Win32 API;
6 is a view for explaining the operation of the DLL injection detection unit detecting the call subject of the DLL load API function that attempts DLL injection in the process memory to be protected according to an embodiment of the present invention;
7 is a view for explaining the return address of the call subject stored in the stack area immediately after the function call of the window application program;
8 is a flowchart illustrating a security management method of an industrial control system for detecting DLL injection according to an embodiment.

이하 첨부한 도면을 참조하여 본 발명의 실시예를 설명함으로써 본 발명을 설명한다. 각 도면에 제시된 동일한 참조부호는 동일한 부재를 나타낸다. 또한 본 발명을 설명함에 있어, 관련된 공지 기능 또는 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략할 것이다. 또한 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다.Hereinafter, the present invention will be described by describing embodiments of the present invention with reference to the accompanying drawings. Like reference numerals in each figure indicate like elements. Also, in describing the present invention, if it is determined that a detailed description of a related known function or configuration may unnecessarily obscure the gist of the present invention, the detailed description thereof will be omitted. Also, when a part "includes" a certain component, it means that other components may be further included, rather than excluding other components, unless otherwise stated.

DLL(Dynamic Link Library)은 Microsoft Windows에서 공유 라이브러리(shared library) 개념에 해당하는 실행 파일로서, 다른 프로그램에서 사용할 수 있는 함수를 엑스포트(export)하고, 이를 다른 프로그램에서 DLL을 로드한 뒤 호출하여 사용할 수 있다.A DLL (Dynamic Link Library) is an executable file that corresponds to the concept of a shared library in Microsoft Windows. It exports functions that can be used by other programs, loads them in other programs, and calls them. can

도 1에 도시된 바와 같이, Microsoft Windows 시스템에서 임의의 DLL이 로드되는 과정은 DLL 로드 API 함수 호출 명령에 따라 PE 로더가 DLL을 MMF(메모리 맵 파일)로 로드하고(S10)(S20), 이후 로드된 DLL의 DllMain 콜백 함수가 호출된다(S30). 이와 같이 임의의 프로세스에서 DLL이 로드되면 로드된 DLL의 DllMain 함수가 해당 프로세스의 문맥(context) 안에서 불리게 된다. 이는 DLL 삽입(DLL Injection)이라 불리는 코드 삽입(Code Injection) 기법의 배경이 되는 내용으로, DLL 삽입은 공격자가 어떤 방식으로든 원하는 DLL을 목표로 하는 프로세스에 로드시켜 해당 프로세스의 문맥에서 임의의 동작을 수행하는 것을 목표로 하는 공격 기법이다. 예를 들어 SCADA 시스템을 대상으로 하는 악성코드들은 SCADA 시스템의 핵심 제어 로직에 간섭하기 위한 과정에서 DLL 삽입 기술을 이용하는 공격 시도가 계속되고 있다.As shown in Fig. 1, in the process of loading an arbitrary DLL in the Microsoft Windows system, the PE loader loads the DLL as an MMF (memory map file) according to the DLL load API function call command (S10) (S20), and then The DllMain callback function of the loaded DLL is called (S30). As such, when a DLL is loaded in an arbitrary process, the DllMain function of the loaded DLL is called within the context of the process. This is the background of the code injection technique called DLL injection. DLL injection allows an attacker to load a desired DLL into a target process in any way and cause arbitrary actions in the context of the process. It is an attack technique that aims to perform. For example, malicious codes targeting SCADA systems continue to attempt attacks using DLL injection technology in the process of interfering with the core control logic of the SCADA system.

정상적인 DLL 로드를 시도하는 하나의 사례는 도 2 (a)와 같이 프로그램 시작시 DLL 로드 API 함수를 호출하는 정적 로드(static load), 다른 사례는 도 2 (b)와 같이 프로그램의 코드 영역에서 프로그램 실행 도중에 DLL 로드 API 함수를 호출하는 동적 로드(dynamic load)로 구분할 수 있다.One case of trying to load a normal DLL is static load that calls a DLL load API function at the start of the program as shown in Fig. 2 (a), and the other case is a program in the code area of the program as shown in Fig. 2 (b). It can be divided into dynamic load, which calls the DLL load API function during execution.

한편, 악의적으로 DLL 인젝션을 이용한 DLL 로드를 시도하는 하나의 사례는 도 3 (a)와 같이 원격 스레드(remote thread)를 생성하는 공격 시도이고, 다른 사례는 도 3 (b)와 같이 윈도우 훅(windows Hook) 설치에 의한 공격 시도이며, 또 다른 사례는 도 3 (c)와 같이 APC(Asynchronous procedure call) 호출 설정에 의한 공격 시도로 구분할 수 있다.On the other hand, one case of maliciously attempting to load a DLL using DLL injection is an attack attempt to create a remote thread as shown in Fig. 3 (a), and another case is a window hook ( It is an attack attempt by installing windows hook), and another case can be divided into an attack attempt by setting an Asynchronous procedure call (APC) call as shown in FIG. 3 ( c ).

도 4를 참고하여, 프로세스 메모리(100)의 메모리 구조는 프로세스에 로드된 *.exe 확장자를 가진 실행파일과 *.dll 확장자를 가진 라이브러리 모듈을 위해 할당된 영역, 메모리 매핑된 파일(memory-mapped file, MMF) 영역, 그리고 유저를 위한 사적 영역(private region) 등으로 할당된다. Referring to FIG. 4 , the memory structure of the process memory 100 is an executable file with an *.exe extension loaded into the process, an area allocated for a library module with a *.dll extension, and a memory-mapped file (memory-mapped file). file, MMF) area, and a private area for users.

악의적인 공격 시도의 사례들(도 3 (a)(b)(c))은 실행 시간(run-time)에서 발생되며, 표1과 같이 DLL 로드 API 함수를 호출하는 호출주체(caller)가 각각 다르다. 이 호출주체(caller)는 프로세스 메모리(100)에 할당된 스택 영역의 정보를 체크하여 확인할 수 있다. 도 2 (b) 역시 프로그램 실행 도중에 발생되는 상황이지만, 호출주체(caller)가 프로세스 메모리(100)의 코드 영역에 위치하기 때문에 악의적인 공격 시도의 사례와 구분할 수 있다.Examples of malicious attack attempts (Fig. 3 (a)(b)(c)) occur at run-time, and as shown in Table 1, the caller calling the DLL load API function different. The caller may check the information of the stack area allocated to the process memory 100 to confirm it. 2 (b) is also a situation that occurs during program execution, but since the caller is located in the code area of the process memory 100, it can be distinguished from the case of a malicious attack attempt.

Remote ThreadRemote Thread Windows HookWindows Hooks APCAPC 호출주체(caller)caller kernel32.dllkernel32.dll user32.dlluser32.dll ntdll.dllntdll.dll
Disassembly
(Win 10)

Disassembly
(Win 10)

CALL [756A1F88]
CALL ESI
PUSH EAX

CALL [756A1F88]
CALL ESI
PUSH EAX

PUSH DWORD [EDI+IC]
CALL [768E4308
MOV ESI, EAX]

PUSH DWORD [EDI+IC]
CALL [768E4308
MOV ESI, EAX]

MOV ECX, [EBP+8]
CALL [EBP+8]
MOV DWORD [EBP-4], -2

MOV ECX, [EBP+8]
CALL [EBP+8]
MOV DWORD [EBP-4], -2

실시예는 DLL 인젝션 탐지부(200)가 DLL 인젝션을 이용한 악의적인 공격 시도를 사전에 탐지한다. DLL 인젝션 탐지부(200)는 보호 대상의 프로세스 메모리(100)에서 DLL 인젝션을 시도하는 DLL 로드 API 함수의 호출주체(caller)를 식별함으로써 실행 시간(run-time)에서의 악의적인 DLL 인젝션 공격 시도를 탐지할 수 있다. 이를 상세히 설명한다. In the embodiment, the DLL injection detection unit 200 detects a malicious attack attempt using DLL injection in advance. The DLL injection detection unit 200 attempts a malicious DLL injection attack at run-time by identifying a caller of the DLL load API function that attempts DLL injection in the protected process memory 100 . can be detected. This will be described in detail.

도 5에서 정상적인 Win32 API의 호출 과정은 User Application의 API 함수 호출에 따라 실제 함수(INSTR)가 즉각적으로 실행되지만, 도 6에서 인라인 후킹된 Win32 API의 호출 과정은 실제 함수(INSTR)를 호출하기 전에 Detour Function을 이용하여 특정 함수로 바꿔치기하거나 호출 자체를 막을 수 있다. 이 인라인 후킹을 적용하여 DLL 인젝션 탐지부(200)는 보호 대상의 프로세스에서 발생되는 DLL 로드 API 함수의 호출 상태를 감시한다. In the normal Win32 API calling process in FIG. 5, the actual function (INSTR) is immediately executed according to the user application's API function call, but the inline hooked Win32 API calling process in FIG. 6 is performed before the actual function (INSTR) is called Using Detour Function, you can replace with a specific function or block the call itself. By applying this inline hooking, the DLL injection detection unit 200 monitors the call state of the DLL load API function generated in the process to be protected.

도 7을 참고하여 IA-32 아키텍처에서 동작하는 윈도우 응용프로그램의 함수 호출 직후 스택 영역에 호출주체의 복귀 주소(return address)가 저장된다. 스택 영역에 호출주체의 복귀 주소 정보를 포함하므로, DLL 인젝션 탐지부(200)는 이 복귀 주소 정보에 기초하여 함수를 호출한 호출주체(caller)의 메모리 주소를 취득하고, 취득한 메모리 주소에 따라 호출주체(caller)를 식별할 수 있다. 임의의 호출주체(caller)의 메모리 주소를 알고 있으면 해당 메모리 주소가 속한 메모리 영역의 종류는 정보는 VirtualQuery/VirtualQueryEx 라는 API 함수를 이용하여 취득할 수 있다. 여기서 해당 메모리 주소가 어떤 모듈의 메모리 영역에 속한 경우, 처음으로 프로세스에 로드된 모듈의 메모리 주소 범위는 변하지 않으므로 메모리 주소의 비교를 통하여 해당 모듈이 악의적인 공격을 시도하는 호출주체인지 인식할 수 있다. 예를 들어 user32.dll 이라는 모듈이 메모리 주소(0x76000000 ~ 0x76FFFFFF)에 로드되어 있는 경우, 스택 영역의 복귀 주소를 통해 알아낸 호출 주체의 메모리 주소가 해당 메모리 주소 범위를 비교하여 호출 주체가 user32.dll 인지를 식별할 수 있다.Referring to FIG. 7 , the return address of the call subject is stored in the stack area immediately after the function call of the window application operating in the IA-32 architecture. Since the stack area includes the call subject's return address information, the DLL injection detection unit 200 acquires the memory address of the caller who called the function based on the return address information, and calls it according to the acquired memory address. The caller can be identified. If the memory address of an arbitrary caller is known, the type of memory area to which the memory address belongs can be obtained by using the API function called VirtualQuery/VirtualQueryEx. Here, if the memory address belongs to the memory area of a certain module, the memory address range of the module loaded into the process for the first time does not change, so it can be recognized whether the module is the caller attempting a malicious attack through the memory address comparison. . For example, if a module called user32.dll is loaded at a memory address (0x760000 ~ 0x76FFFFFF), the memory address of the caller found through the return address of the stack area compares the memory address range, cognition can be identified.

이와 같이 본 발명은 DLL 인젝션의 공격 기법을 방어하기 위하여 인라인 후킹을 통한 DLL 로직 API 함수를 감시하고, DLL 인젝션 공격 시도를 사전에 탐지한다. As described above, the present invention monitors DLL logic API functions through inline hooking in order to defend against an attack technique of DLL injection, and detects DLL injection attack attempts in advance.

이하, 실시예에 따른 DLL 인젝션을 탐지하는 산업제어시스템의 보안 관리 방법을 상세히 설명한다. Hereinafter, a security management method of an industrial control system for detecting DLL injection according to an embodiment will be described in detail.

먼저, 산업제어시스템에 대해 DLL 인젝션 탐지를 위한 보안 모드를 활성화한다(S100). 이에 따라 DLL 인젝션 탐지부(200)는 인라인 후킹을 이용하여 보호 대상의 프로세스에서 발생되는 DLL 로드 API 함수의 호출 상태를 감시한다. 이 때 DLL 로드 API 함수 호출시 DLL 인젝션 탐지부(200)는 프로세스 메모리(100)의 스택 영역에서 복귀 주소(return address)를 수집하고, 수집된 복귀 주소와 프로세스 메모리에 할당된 메모리 주소를 비교하여 호출주체(caller)를 식별한다(S110).First, a security mode for detecting DLL injection is activated for the industrial control system (S100). Accordingly, the DLL injection detection unit 200 monitors the call state of the DLL load API function generated in the process to be protected by using inline hooking. At this time, when the DLL load API function is called, the DLL injection detection unit 200 collects a return address from the stack area of the process memory 100 and compares the collected return address with the memory address allocated to the process memory. The caller is identified (S110).

그런 다음 DLL 인젝션 탐지부(200)는 호출주체(caller)가 원격 스레드를 이용한 공격 시도인지 판단하거나(S120), 호출주체(caller)가 APC 호출을 이용한 공격 시도인지 판단하거나(S130), 호출주체(caller)가 윈도우 훅을 이용한 공격 시도인지 판단한다(S140). Then, the DLL injection detection unit 200 determines whether the caller is an attack attempt using a remote thread (S120), or whether the caller is an attack attempt using an APC call (S130), or the caller It is determined whether the caller is an attack attempt using a window hook (S140).

단계 S120에서 호출주체(caller)가 원격 스레드를 이용한 공격 시도이고, 단계 S130에서 호출주체(caller)가 APC 호출을 이용한 공격 시도, 단계 S140에서 윈도우 훅을 이용한 공격 시도인 것으로 판단되면 DLL 인젝션 탐지부(200)는 DLL 인젝션을 이용한 사이버 공격으로 인식하여 DLL 로드 API 함수 호출을 보류한다(S150).If it is determined that the caller is an attack attempt using a remote thread in step S120, the caller is an attack attempt using an APC call in step S130, and an attack attempt using a window hook in step S140, DLL injection detection unit 200 suspends the DLL load API function call by recognizing it as a cyber attack using DLL injection (S150).

한편 단계 S120, 단계 S130, 및 단계 S140 중 어느 하나의 공격 시도에 해당하지 않으면 정상으로 인식하여 DLL 로드 API 함수를 호출한다(S160).On the other hand, if it does not correspond to any one of the attack attempts of steps S120, S130, and S140, it is recognized as normal and the DLL load API function is called (S160).

전술한 본 발명의 설명은 예시를 위한 것이며, 본 발명이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명의 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 쉽게 변형이 가능하다는 것을 이해할 수 있을 것이다.The foregoing description of the present invention is for illustration, and those of ordinary skill in the art to which the present invention pertains can understand that it can be easily modified into other specific forms without changing the technical spirit or essential features of the present invention. will be.

100 : 프로세스 메모리
200 : DLL 인젝션 탐지부
100: process memory
200: DLL injection detection unit

Claims (3)

(a) 산업제어시스템의 제어 로직에 간섭하기 위한 DLL 인젝션 공격을 방어하기 위하여 DLL 인젝션 탐지를 위한 보안 모드를 활성화하는 단계;
(b) 인라인 후킹을 이용하여 보호 대상의 프로세스에서 발생되는 DLL 로드 API 함수의 호출 상태를 감시하고, DLL 로드 API 함수를 호출한 호출주체를 식별하는 단계; 및
(c) 상기 (b) 단계에서 식별된 호출주체에 기초하여 악의적인 DLL 인젝션 공격 시도로 판단되면 DLL 인젝션을 이용한 사이버 공격으로 인식하여 DLL 로드 API 함수 호출을 보류하는 단계;를 포함하는 것을 특징으로 하는 DLL 인젝션을 탐지하는 산업제어시스템의 보안 관리 방법.
(a) activating a security mode for DLL injection detection in order to prevent a DLL injection attack for interfering with the control logic of the industrial control system;
(b) monitoring a call state of a DLL load API function occurring in a process to be protected using inline hooking, and identifying a caller who called the DLL load API function; and
(c) if it is determined as a malicious DLL injection attack attempt based on the call subject identified in step (b), recognizing it as a cyber attack using DLL injection and suspending the DLL load API function call; characterized in that it comprises; A security management method for industrial control systems that detects DLL injection.
제1항에 있어서,
상기 (b) 단계는 DLL 로드 API 함수 호출시 프로세스 메모리의 스택 영역에 저장된 복귀 주소를 수집하고, 수집된 복귀 주소와 프로세스 메모리에 할당된 메모리 주소를 비교하여 호출주체를 식별하는 것을 특징으로 하는 DLL 인젝션을 탐지하는 산업제어시스템의 보안 관리 방법.
According to claim 1,
The step (b) collects the return address stored in the stack area of the process memory when the DLL load API function is called, and compares the collected return address with the memory address allocated to the process memory to identify the caller. A security management method of an industrial control system that detects injection.
제1항에 있어서,
상기 (c) 단계에서 악의적인 DLL 인젝션 공격 시도는 원격 스레드를 이용한 공격 시도, APC 호출을 이용한 공격 시도, 및 윈도우 훅을 이용한 공격 시도 중 어느 하나인 것을 특징으로 하는 DLL 인젝션을 탐지하는 산업제어시스템의 보안 관리 방법.

According to claim 1,
An industrial control system for detecting DLL injection, characterized in that the malicious DLL injection attack attempt in step (c) is any one of an attack attempt using a remote thread, an attack attempt using an APC call, and an attack attempt using a window hook of security management methods.

KR1020210052328A 2021-04-22 2021-04-22 Security Managing Method For Industrial Control System To Detect DLL Injection KR102545488B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020210052328A KR102545488B1 (en) 2021-04-22 2021-04-22 Security Managing Method For Industrial Control System To Detect DLL Injection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210052328A KR102545488B1 (en) 2021-04-22 2021-04-22 Security Managing Method For Industrial Control System To Detect DLL Injection

Publications (2)

Publication Number Publication Date
KR20220145580A true KR20220145580A (en) 2022-10-31
KR102545488B1 KR102545488B1 (en) 2023-06-20

Family

ID=83803193

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210052328A KR102545488B1 (en) 2021-04-22 2021-04-22 Security Managing Method For Industrial Control System To Detect DLL Injection

Country Status (1)

Country Link
KR (1) KR102545488B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116800511A (en) * 2023-07-06 2023-09-22 广东网安科技有限公司 Industrial control system network safety protection capability checking and evaluating system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110084775A (en) * 2010-01-18 2011-07-26 삼성전자주식회사 Computer system and method for preventing dynamic link library injection attack
KR101445634B1 (en) * 2014-01-27 2014-10-06 주식회사 이글루시큐리티 Device and Method for detecting vulnerability attack in any program
KR20190001325A (en) 2017-06-27 2019-01-04 (주)이공감 Ics module and industrial control system having ics module
KR102139140B1 (en) 2020-04-27 2020-07-30 (주) 앤앤에스피 A tag data profiling system for private Industrial Control System protocol

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110084775A (en) * 2010-01-18 2011-07-26 삼성전자주식회사 Computer system and method for preventing dynamic link library injection attack
KR101445634B1 (en) * 2014-01-27 2014-10-06 주식회사 이글루시큐리티 Device and Method for detecting vulnerability attack in any program
KR20190001325A (en) 2017-06-27 2019-01-04 (주)이공감 Ics module and industrial control system having ics module
KR102139140B1 (en) 2020-04-27 2020-07-30 (주) 앤앤에스피 A tag data profiling system for private Industrial Control System protocol

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Amit Klein and Itzik Kotler, "Process Injection Techniques - Gotta Catch Them All", Black Hat USA 2019(2019.08.)* *
Junwon Kim et al., "Research on PEB-LDR Data Analysis Technique for DLL Injection Detection on ICS Engineering Workstation"(2020.12.)* *
없음

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116800511A (en) * 2023-07-06 2023-09-22 广东网安科技有限公司 Industrial control system network safety protection capability checking and evaluating system
CN116800511B (en) * 2023-07-06 2024-04-02 释空(上海)品牌策划有限公司 Industrial control system network safety protection capability checking and evaluating system

Also Published As

Publication number Publication date
KR102545488B1 (en) 2023-06-20

Similar Documents

Publication Publication Date Title
CN106991324B (en) Malicious code tracking and identifying method based on memory protection type monitoring
CN102902919B (en) A kind of identifying processing methods, devices and systems of suspicious operation
KR101265173B1 (en) Apparatus and method for inspecting non-portable executable files
US10310992B1 (en) Mitigation of cyber attacks by pointer obfuscation
AU2006210698B2 (en) Intrusion detection for computer programs
US7665139B1 (en) Method and apparatus to detect and prevent malicious changes to tokens
US7631356B2 (en) System and method for foreign code detection
CN104217157B (en) A kind of anti-Application way of leak and system
CN107690645A (en) Use the behavior malware detection of interpreter virtual machine
Fisk Cyber security, building automation, and the intelligent building
CN101013461A (en) Method of computer protection based on program behavior analysis
CN108388793B (en) Virtual machine escape protection method based on active defense
CN102208002A (en) Novel computer virus scanning and killing device
KR102545488B1 (en) Security Managing Method For Industrial Control System To Detect DLL Injection
US20100313209A1 (en) System and method for preventing drm client crash using process separate execution
CN109791588B (en) Mitigating malicious actions associated with graphical user interface elements
CN100520797C (en) Apparatus and method for preventing virus dynamic state attack program
CN110717181A (en) Non-control data attack detection method and device based on novel program dependency graph
KR100666562B1 (en) Method for protecting kernel driver and process
CN1743992A (en) Computer operating system safety protecting method
CN106682512B (en) Method, device and system for preventing program from being modified
KR101438979B1 (en) Method and system for checking software
US11899797B2 (en) System and method for detecting and for alerting of exploits in computerized systems
CN112597492B (en) Binary executable file modification monitoring method based on Windows kernel
CN115238323A (en) Server USB interface safety design method, computer equipment and storage medium

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant