[go: up one dir, main page]

KR102545488B1 - 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
KR102545488B1
KR102545488B1 KR1020210052328A KR20210052328A KR102545488B1 KR 102545488 B1 KR102545488 B1 KR 102545488B1 KR 1020210052328 A KR1020210052328 A KR 1020210052328A KR 20210052328 A KR20210052328 A KR 20210052328A KR 102545488 B1 KR102545488 B1 KR 102545488B1
Authority
KR
South Korea
Prior art keywords
dll
injection
dll injection
attack
industrial control
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.)
Active
Application number
KR1020210052328A
Other languages
Korean (ko)
Other versions
KR20220145580A (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
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; 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

DLL 인젝션을 탐지하는 산업제어시스템의 보안 관리 방법으로서, 산업제어시스템의 제어 로직에 간섭하기 위한 DLL 인젝션 공격을 방어하기 위하여 DLL 인젝션 탐지를 위한 보안 모드를 활성화하는 단계, 인라인 후킹을 이용하여 보호 대상의 프로세스에서 발생되는 DLL 로드 API 함수의 호출 상태를 감시하고 DLL 로드 API 함수를 호출한 호출주체를 식별하는 단계, 및 식별된 호출주체에 기초하여 악의적인 DLL 인젝션 공격 시도로 판단되면 DLL 인젝션을 이용한 사이버 공격으로 인식하여 DLL 로드 API 함수 호출을 보류하는 단계를 포함하는 것을 특징으로 한다.As a security management method for an industrial control system that detects DLL injection, the step 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, a protected target using inline hooking Monitoring the call status of the DLL load API function generated in the process of identifying the caller who called the DLL load API function, and based on the identified caller, if it is determined to be a malicious DLL injection attack attempt, using the DLL injection Recognizing it as a cyber attack and suspending the DLL load API function call.

Description

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

본 발명은 전력 시스템을 포함한 대규모 산업 시설에서 채택하고 있는 산업제어시스템(ICS)을 대상으로 하는 사이버 공격의 하나로서 제어 로직에 간섭하기 위한 DLL 인젝션이라는 공격 기법을 사전 탐지하여 차단하는 DLL 인젝션을 탐지하는 산업제어시스템의 보안 관리 방법에 관한 것이다.The present invention detects DLL injection, which pre-detects and blocks an attack technique called DLL injection to interfere with control logic, 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 for an industrial control system.

산업제어시스템(ICS)은 전기, 물 및 폐수, 석유 및 천연 가스, 화학, 제약, 펄프 및 제지, 식품 및 음료, 개별 품목의 제조업(자동차, 항공우주 및 내구재 등에 다양한 유형으로 적용되고 있으며, 산업 부문 및 주요기반 시설에서 찾을 수 있는 감시 제어 및 데이터 수집(SCADA) 시스템, 분산제어시스템(DCS) 및 프로그래머블 로직 컨트롤러(PLC)와 같은 기타 제어시스템 구성 등 여러 유형의 제어시스템을 포함하는 개념이다.Industrial control systems (ICS) are applied in various types to electricity, water and wastewater, petroleum and natural gas, chemicals, pharmaceuticals, pulp and paper, food and beverage, and manufacturing of individual items (automobiles, aerospace and durable goods, etc.). It is a concept that 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 sectors 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 control commands of legitimate users using the process, and the attacker can abuse the access rights granted to the process. In one of these cyberattack cases, an attacker inserts a malicious DLL into the Internet banking program process, monitors the financial transaction processing logic, and leaks the transaction information entered by the Internet banking user to the outside. Another example is attacking a uranium enrichment facility. Malicious codes such as Black Energy 3, which attacked a Stuxnet or a power grid's synchrophasor-based real-time control system, attacked SCADA systems, resulting in actual attacks in which hackers seized control of industrial facilities.

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

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

없음doesn't exist

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

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

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

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

또한, 상기 (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 caller 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 Windows hook.

본 발명은 DLL 로드 API 함수를 호출한 복귀 주소를 수집하여 호출주체를 식별함으로써 악의적인 DLL 인젝션 공격 기법을 사전 탐지하여 차단할 수 있어 산업제어시스템의 보안 수준을 향상시킬 수 있다.The present invention can detect and block malicious DLL injection attack techniques in advance by collecting the return address that called the DLL load API function and identifying the calling subject, 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 briefly showing the process of loading an arbitrary DLL in a Microsoft Windows system;
2 is a diagram for explaining a normal DLL load 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 process of calling an inline-hooked Win32 API;
6 is a diagram for explaining an operation of detecting a caller of a DLL load API function that a DLL injection detection unit attempts DLL injection in a process memory to be protected according to an embodiment of the present invention;
7 is a diagram for explaining a return address of a calling subject stored in a stack area immediately after calling a function of a 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. In addition, in describing the present invention, if it is determined that a detailed description of a related known function or configuration may unnecessarily obscure the subject matter of the present invention, the detailed description will be omitted. In addition, when a certain component is said to "include", this means that it may further include other components without excluding other components unless otherwise stated.

DLL(Dynamic Link Library)은 Microsoft Windows에서 공유 라이브러리(shared library) 개념에 해당하는 실행 파일로서, 다른 프로그램에서 사용할 수 있는 함수를 엑스포트(export)하고, 이를 다른 프로그램에서 DLL을 로드한 뒤 호출하여 사용할 수 있다.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 in other programs, and calls them after loading the DLL in other programs to use 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 into 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). In this way, 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 a code injection technique called DLL Injection, in which an attacker somehow loads a desired DLL into a targeting process and performs arbitrary actions in the context of that process. It is an attack technique that aims to perform. For example, malicious codes targeting SCADA systems continue to attack using DLL injection technology in the process of interfering with the core control logic of SCADA systems.

정상적인 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 the DLL load API function when the program starts as shown in FIG. It can be classified as 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 trying 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 Windows hook (as shown in FIG. 3 (b)) Windows Hook) installation, and another case can be classified as an attack attempt by APC (Asynchronous Procedure Call) call setup as shown in FIG. 3 (c).

도 6을 참고하여, 프로세스 메모리(100)의 메모리 구조는 프로세스에 로드된 *.exe 확장자를 가진 실행파일과 *.dll 확장자를 가진 라이브러리 모듈을 위해 할당된 영역, 메모리 매핑된 파일(memory-mapped file, MMF) 영역, 그리고 유저를 위한 사적 영역(private region) 등으로 할당된다. Referring to FIG. 6 , the memory structure of the process memory 100 includes an area allocated for an executable file having an *.exe extension and a library module having a *.dll extension loaded in the process, and a memory-mapped file (memory-mapped file). It is allocated to file, MMF) area, and 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. This caller can be confirmed by checking the information of the stack area allocated to the process memory 100 . 2 (b) also occurs during program execution, but since the caller is located in the code area of the process memory 100, it can be distinguished from a malicious attack attempt.

Remote ThreadRemote Thread Windows HookWindows Hooks APCAPC 호출주체(caller)caller kernel32.dllkernel32.dll user32.dlluser32.dll ntdll.dllntdll.
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 malicious attack attempts using DLL injection in advance. The DLL injection detection unit 200 attempts a malicious DLL injection attack at run-time by identifying the caller of the DLL load API function that attempts DLL injection in the protected process memory 100. can detect This will be explained in detail.

도 4에서 정상적인 Win32 API의 호출 과정은 User Application의 API 함수 호출에 따라 실제 함수(INSTR)가 즉각적으로 실행되지만, 도 5에서 인라인 후킹된 Win32 API의 호출 과정은 실제 함수(INSTR)를 호출하기 전에 Detour Function을 이용하여 특정 함수로 바꿔치기하거나 호출 자체를 막을 수 있다. 이 인라인 후킹을 적용하여 DLL 인젝션 탐지부(200)는 보호 대상의 프로세스에서 발생되는 DLL 로드 API 함수의 호출 상태를 감시한다. In the normal Win32 API calling process in FIG. 4, the actual function (INSTR) is immediately executed according to the API function call of the user application, but in the inline hooked Win32 API calling process in FIG. 5, before the actual function (INSTR) is called. You can use the Detour Function to replace 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 calling subject is stored in the stack area immediately after the function call of the Windows application program operating in the IA-32 architecture. Since the stack area includes the return address information of the calling subject, the DLL injection detection unit 200 obtains the memory address of the calling subject (caller) based on this return address information, and makes a call according to the obtained memory address. The subject (caller) can be identified. If the memory address of an arbitrary caller is known, information on the type of memory area to which the memory address belongs can be acquired using API functions 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 is possible to recognize whether the corresponding module is the caller attempting a malicious attack through comparison of memory addresses. . For example, if a module called user32.dll is loaded at a memory address (0x76000000 ~ 0x76FFFFFF), the memory address of the calling subject found through the return address of the stack area compares the memory address range, and the calling subject is user32.dll cognition can be identified.

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

이하, 실시예에 따른 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 DLL injection detection 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 using inline hooking. At this time, when the DLL load API function is called, the DLL injection detection unit 200 collects return addresses from the stack area of the process memory 100 and compares the collected return addresses with the memory addresses allocated to the process memory. A caller is identified (S110).

그런 다음 DLL 인젝션 탐지부(200)는 호출주체(caller)가 원격 스레드를 이용한 공격 시도인지 판단하거나(S120), 호출주체(caller)가 APC 호출을 이용한 공격 시도인지 판단하거나(S130), 호출주체(caller)가 윈도우 훅을 이용한 공격 시도인지 판단한다(S140). Then, the DLL injection detection unit 200 determines whether the caller attempts an attack using a remote thread (S120), determines whether the caller attempts an attack using an APC call (S130), or determines whether the caller attempts an attack using an APC call (S130). It is determined whether (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, an attack attempt using an APC call in step S130, and an attack attempt using a Windows hook in step S140, DLL injection detection unit In step 200, calling a DLL load API function is suspended by recognizing it as a cyber attack using DLL injection (S150).

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

전술한 본 발명의 설명은 예시를 위한 것이며, 본 발명이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명의 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 쉽게 변형이 가능하다는 것을 이해할 수 있을 것이다.The above description of the present invention is for illustrative purposes, and those skilled in the art 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 인젝션 탐지부(200)가 인라인 후킹을 이용하여 보호 대상의 프로세스에서 발생되는 DLL 로드 API 함수의 호출 상태를 감시하고, DLL 로드 API 함수 호출시 프로세스 메모리(100)의 스택 영역에 저장된 복귀 주소를 수집하고, 수집된 복귀 주소와 프로세스 메모리에 할당된 메모리 주소를 비교하여 DLL 로드 API 함수를 호출한 호출주체를 식별하는 단계; 및
(c) 상기 (b) 단계에서 식별된 호출주체에 기초하여 악의적인 DLL 인젝션 공격 시도로 판단되면 DLL 인젝션을 이용한 사이버 공격으로 인식하여 DLL 로드 API 함수 호출을 보류하는 단계;를 포함하는 것을 특징으로 하는 DLL 인젝션을 탐지하는 산업제어시스템의 보안 관리 방법.
(a) activating a security mode for DLL injection detection to prevent DLL injection attacks for interfering with the control logic of the industrial control system;
(b) The DLL injection detection unit 200 monitors the call state of the DLL load API function generated in the process to be protected using inline hooking, and when the DLL load API function is called, stored in the stack area of the process memory 100 Collecting the return address and comparing the collected return address with the memory address allocated to the process memory to identify the caller who called the DLL load API function; and
(c) recognizing it as a cyberattack using DLL injection and suspending the DLL load API function call if it is determined that the malicious DLL injection attack is attempted based on the calling subject identified in step (b); A security management method for industrial control systems that detects DLL injection.
삭제delete 제1항에 있어서,
상기 (c) 단계에서 악의적인 DLL 인젝션 공격 시도는 원격 스레드를 이용한 공격 시도, APC 호출을 이용한 공격 시도, 및 윈도우 훅을 이용한 공격 시도 중 어느 하나인 것을 특징으로 하는 DLL 인젝션을 탐지하는 산업제어시스템의 보안 관리 방법.

According to claim 1,
In step (c), the malicious DLL injection attack attempt is any one of an attack attempt using a remote thread, an attack attempt using an APC call, and an attack attempt using a Windows hook Industrial control system for detecting DLL injection security management method.

KR1020210052328A 2021-04-22 2021-04-22 Security Managing Method For Industrial Control System To Detect DLL Injection Active 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 KR20220145580A (en) 2022-10-31
KR102545488B1 true KR102545488B1 (en) 2023-06-20

Family

ID=83803193

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210052328A Active 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)

Families Citing this family (1)

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

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101445634B1 (en) * 2014-01-27 2014-10-06 주식회사 이글루시큐리티 Device and Method for detecting vulnerability attack in any program

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101671795B1 (en) * 2010-01-18 2016-11-03 삼성전자주식회사 Computer system and method for preventing dynamic link library injection attack
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 (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101445634B1 (en) * 2014-01-27 2014-10-06 주식회사 이글루시큐리티 Device and Method for detecting vulnerability attack in any program

Non-Patent Citations (2)

* 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.)*

Also Published As

Publication number Publication date
KR20220145580A (en) 2022-10-31

Similar Documents

Publication Publication Date Title
Sembiring Stuxnet threat analysis in SCADA (supervisory control and data acquisition) and PLC (programmable logic controller) systems
CN106991324B (en) Malicious code tracking and identifying method based on memory protection type monitoring
US10310992B1 (en) Mitigation of cyber attacks by pointer obfuscation
AU2006210698B2 (en) Intrusion detection for computer programs
US7673137B2 (en) System and method for the managed security control of processes on a computer system
KR101265173B1 (en) Apparatus and method for inspecting non-portable executable files
US9659173B2 (en) Method for detecting a malware
US9183377B1 (en) Unauthorized account monitoring system and method
CN104217157B (en) A kind of anti-Application way of leak and system
US8397292B2 (en) Method and device for online secure logging-on
Fisk Cyber security, building automation, and the intelligent building
US7665139B1 (en) Method and apparatus to detect and prevent malicious changes to tokens
WO2006110426A2 (en) System and method for foreign code detection
CN101013461A (en) Method of computer protection based on program behavior analysis
CN111191243A (en) Vulnerability detection method and device and storage medium
KR102545488B1 (en) Security Managing Method For Industrial Control System To Detect DLL Injection
CN112202704A (en) Block chain intelligent contract safety protection system
CN111259392B (en) A method and device for intercepting malicious software based on kernel module
KR101503827B1 (en) A detect system against malicious processes by using the full path of access files
KR101438979B1 (en) Method and system for checking software
CN101178761A (en) Apparatus and method for preventing virus dynamic state attack program
CN114969672B (en) Safety protection method, device and system for industrial control host and storage medium
KR100666562B1 (en) How to Protect Kernel Drivers and Processes
Grizzard et al. Re-establishing trust in compromised systems: recovering from rootkits that trojan the system call table
CN106599684A (en) Detection method and system of entity file-free malicious code

Legal Events

Date Code Title Description
PA0109 Patent application

Patent event code: PA01091R01D

Comment text: Patent Application

Patent event date: 20210422

PA0201 Request for examination
PE0902 Notice of grounds for rejection

Comment text: Notification of reason for refusal

Patent event date: 20220828

Patent event code: PE09021S01D

PG1501 Laying open of application
E701 Decision to grant or registration of patent right
PE0701 Decision of registration

Patent event code: PE07011S01D

Comment text: Decision to Grant Registration

Patent event date: 20230524

GRNT Written decision to grant
PR0701 Registration of establishment

Comment text: Registration of Establishment

Patent event date: 20230615

Patent event code: PR07011E01D

PR1002 Payment of registration fee

Payment date: 20230615

End annual number: 3

Start annual number: 1

PG1601 Publication of registration