KR20190052447A - Apparatus and method for detecting software procedure change operation based on pattern using control flow graph - Google Patents

Apparatus and method for detecting software procedure change operation based on pattern using control flow graph Download PDF

Info

Publication number
KR20190052447A
KR20190052447A KR1020170148140A KR20170148140A KR20190052447A KR 20190052447 A KR20190052447 A KR 20190052447A KR 1020170148140 A KR1020170148140 A KR 1020170148140A KR 20170148140 A KR20170148140 A KR 20170148140A KR 20190052447 A KR20190052447 A KR 20190052447A
Authority
KR
South Korea
Prior art keywords
module
pattern
cfg
procedure change
change operation
Prior art date
Application number
KR1020170148140A
Other languages
Korean (ko)
Other versions
KR102392642B1 (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 KR1020170148140A priority Critical patent/KR102392642B1/en
Publication of KR20190052447A publication Critical patent/KR20190052447A/en
Application granted granted Critical
Publication of KR102392642B1 publication Critical patent/KR102392642B1/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
    • G06F21/562Static detection
    • G06F21/563Static detection by source code analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/14Protecting executable software against software analysis or reverse engineering, e.g. by obfuscation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/566Dynamic detection, i.e. detection performed at run-time, e.g. emulation, suspicious activities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/03Indexing scheme relating to G06F21/50, monitoring users, programs or devices to maintain the integrity of platforms
    • G06F2221/033Test or assess software

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Virology (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention relates to an apparatus for monitoring a software procedure change operation based on a pattern using a control flow graph (CFG), to detect illegal action and abnormal operation with respect to software, and a method thereof. According to one embodiment of the present invention, the apparatus for monitoring a software procedure change operation based on a pattern using a CFG comprises: a logical module flow selection unit for discriminating each module in a CFG for a source code of software in accordance with order relation; a CFG pattern extraction unit for generating and extracting a sequence pattern, a depth pattern, and a range-position pattern through abstraction in accordance with a purging probability of a purging test with respect to each discriminated module and a transition probability distribution of each module; and a dynamic tracking unit using the sequence pattern, the depth pattern, and the range-position pattern to measure or detect an abnormality degree in accordance with procedure change of the source code of the software.

Description

CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 장치 및 그 방법{APPARATUS AND METHOD FOR DETECTING SOFTWARE PROCEDURE CHANGE OPERATION BASED ON PATTERN USING CONTROL FLOW GRAPH}TECHNICAL FIELD [0001] The present invention relates to a pattern-based software procedure change operation monitoring apparatus and a method thereof,

본 발명은 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 장치 및 그 방법에 관한 것으로서, 보다 상세하게는, 소프트웨어의 소스코드로부터 추출된 CFG에 대해 퍼징 기법 및 트라이그램을 통해 추상화한 후 패턴을 학습시켜 소스코드의 비정상도를 측정함으로써, 소프트웨어에 대한 불법행위와 이상동작을 탐지하기 위한, CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 장치 및 그 방법에 관한 것이다.The present invention relates to an apparatus and method for monitoring a pattern-based software procedure change operation using a CFG, and more particularly, to a method and apparatus for abstracting a CFG extracted from a software source code, And more particularly, to a pattern-based software procedure change operation monitoring apparatus and method for detecting illegal and abnormal operation of software by measuring an abnormality of a source code.

기업내 정보 보안은 정보를 여러가지 위협으로부터 보호하는 것을 의미한다. 즉, 정보 보안은 정보의 수집, 가공, 저장, 검색, 송신, 수신 도중에 정보의 훼손, 변조, 유출 등을 방지하기 위한 관리적, 기술적 방법을 의미한다. Information security in the enterprise means protecting information from various threats. In other words, information security means management and technical methods to prevent information from being damaged, altered, or leaked during collection, processing, storage, retrieval, transmission and reception of information.

이러한 정보 보안은 정보를 제공하는 공급자 측면과 사용자 측면에서 이해할 수 있다. 공급자 측면은 내외부의 위협요인들로부터 네트워크, 시스템 등의 하드웨어, 데이터베이스, 통신 및 전산시설 등 정보자산을 안전하게 보호 및 운영하기 위한 일련의 행위를 나타내며, 사용자 측면은 개인 정보 유출, 남용을 방지하기 위한 일련의 행위를 나타낸다.This information security can be understood from the provider side and the user side that provide information. The supplier side represents a series of actions to safely protect and operate information assets such as network, system hardware, database, communication, and computer facilities from internal and external threat factors. The user side is to prevent leakage and abuse of personal information Represents a series of actions.

최근에는 기업 외부에 있는 불특정 해커들에 의한 해킹범죄 뿐만 아니라, 기업 내부에 있는 내부자들(즉, 내부 프로그래머, 위탁/하청 업체 프로그래머 포함)에 대한 해킹범죄까지 정보보안을 위한 감시범위를 확대하고 있다. In recent years, it has expanded the scope of information security monitoring, not only for hacking offenses by unspecified hackers outside the enterprise, but also for hacking crimes against insiders (ie internal programmers, contract / subcontractor programmers) inside the company .

이와 관련된 연구에는 소스코드의 악의적 수정과 프로그램의 이상동작을 감시하는 내용과 관련된 연구가 진행중에 있다.Research related to this is in the process of investigating the malicious modification of the source code and monitoring the abnormal behavior of the program.

소프트웨어 개발 및 운영/유지 보수 과정에서 내부 인력에 의해 발생될 수 있는 소프트웨어의 위험은 크게 3가지일 수 있다. 첫째로, 소스코드 어딘가에 해킹코드(예를 들어, 백도어)를 남기는 위험, 둘째로, 소스코드 변경없이 시스템 설정값을 바꾸어 특정 시점에 다르게 동작하게 하는 위험, 셋째로, 원본 소스코드를 조작하여 핵심 로직의 흐름을 변화시키게 하는 위험일 수 있다.There are three major types of software risks that can be generated by internal personnel during software development and operation / maintenance. First, there is a risk of leaving hacking code (for example, a backdoor) somewhere in the source code; second, the risk of changing the system settings without changing the source code and causing it to behave differently at a particular point in time; It can be a risk to change the flow of logic.

단지 소스코드의 구문(syntax) 혹은 서명(signature)을 기반으로 하여 소스코드를 변경하는 경우에는, 이상 검출(anomaly detection)을 수행하기 위해 구문을 기반으로 하기 때문에 추출 가능 정보가 한정적이다. 그런데, 이상 검출을 수행하기 위해서는 하나의 CFG(Control Flow Graph) 즉, 그래프 형태로 변경하면 그래프 이론(graph theory)를 통해 여러 정보를 추출 할 수 있게 된다.  Extractable information is limited because it is based on syntax to perform anomaly detection when the source code is changed based only on the syntax or signature of the source code. However, in order to perform anomaly detection, it is possible to extract a plurality of information through a graph theory by changing one CFG (Control Flow Graph), that is, into a graph form.

따라서, 내부 인력에 의해 발생될 수 있는 소프트웨어의 위험을 검출하기 위해서는 CFG를 활용한 패턴 기반의 소프트웨어 절차변경을 검출하는 방안이 필요한 실정이다.Therefore, in order to detect the risk of software that can be generated by the internal manpower, it is necessary to detect a pattern-based software procedure change using CFG.

대한민국 등록특허공보 제10-1541603호 (2015.07.28 등록)Korean Registered Patent No. 10-1541603 (Registered on July 28, 2015) 대한민국 등록특허공보 제10-1421136호 (2014.07.14 등록)Korean Registered Patent No. 10-1421136 (Registered on July 14, 2014)

본 발명의 목적은 소프트웨어의 소스코드로부터 추출된 CFG에 대해 퍼징 기법 및 트라이그램을 통해 추상화한 후 패턴을 학습시켜 소스코드의 비정상도를 측정함으로써, 소프트웨어에 대한 불법행위와 이상동작을 탐지하기 위한, CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 장치 및 그 방법을 제공하는데 있다.An object of the present invention is to provide a method and apparatus for abstracting a CFG extracted from a source code of software by abstracting it through a purging technique and a trigram, And a pattern-based software procedure change operation monitoring device using the CFG.

본 발명의 일실시예에 따른 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 장치는, 소프트웨어의 소스코드에 대한 CFG(Control Flow Graph)에서 중요 모듈이 연속되는 선후 관계에 따라 각 모듈을 구분하기 위한 논리적 모듈 흐름 선정부; 상기 구분된 각 모듈에 대한 퍼징 테스트의 퍼징 확률과 각 모듈의 전이 확률 분포에 따른 추상화를 통해 시퀀스(sequence) 패턴, 깊이(depth) 패턴, 범위-위치(range-position) 패턴을 생성 및 추출하기 위한 CFG 패턴 추출부; 및 상기 시퀀스 패턴, 상기 깊이 패턴 및 상기 상기 범위-위치 패턴을 이용하여 상기 소프트웨어의 소스코드의 절차변경에 따른 비정상도를 측정 또는 탐지하기 위한 동적 추적부;를 포함할 수 있다.The pattern-based software procedure change operation monitoring device using the CFG according to an embodiment of the present invention includes a CFG (Control Flow Graph) for the source code of the software, Logical module flow selection; A sequence pattern, a depth pattern, and a range-position pattern are generated and abstracted through an abstraction according to the purging probability of the purging test for each module and the transition probability distribution of each module A CFG pattern extracting unit; And a dynamic tracing unit for measuring or detecting an abnormality in accordance with a procedure change of the source code of the software using the sequence pattern, the depth pattern, and the range-position pattern.

상기 논리적 모듈 흐름 선정부는, 상기 중요 모듈이 연속되는 선후 관계에 따라 논리적 기능 단위로서 퍼스트 모듈과 세컨드 모듈을 구분할 수 있다.The logical module flow selection unit can distinguish the first module and the second module as logical functional units according to the successive relationship of the important modules.

상기 CFG 패턴 추출부는, 상기 퍼스트 모듈과 상기 세컨드 모듈 사이의 모듈들에 대한 퍼징 테스트 수행 결과에 대해 모듈별 전이 확률 분포를 계산함에 따라, 분기 모듈에서 확률이 높은 경로의 모듈을 선택하고, 높은 확률로 같이 실행되는 모듈을 하나로 합치고, 분기 모듈 중 예외처리 및 종료코드가 구현된 모듈을 생략할 수 있다.Wherein the CFG pattern extracting unit selects a module having a high probability in a branching module by calculating a transition probability distribution for each module with respect to a result of performing a purging test on modules between the first module and the second module, And a module in which the exception processing and the termination code are implemented among the branching modules can be omitted.

상기 CFG 패턴 추출부는, 상기 퍼스트 모듈과 상기 세컨드 모듈 사이의 모듈들에 대한 트라이그램(trigram)으로 소정의 노드를 하나의 묶음으로 생성하는 군집화 과정을 수행하고, 모든 트라이그램에 대한 이산 확률 분포를 계산하여 상기 시퀀스 패턴을 생성할 수 있다.The CFG pattern extracting unit performs a clustering process of generating predetermined nodes in a bundle by using a trigram for the modules between the first module and the second module, and calculates a discrete probability distribution for all the trigrams So that the sequence pattern can be generated.

상기 CFG 패턴 추출부는, 여러 소스코드 파일 상에서 상기 퍼스트 모듈과 상기 세컨드 모듈 사이의 CFG상 노드의 수를 나타내는 연결 깊이를 파악하여 상기 깊이 패컨을 생성할 수 있다.The CFG pattern extracting unit may generate depth depth information by grasping a connection depth indicating the number of CFG nodes between the first module and the second module in a plurality of source code files.

상기 CFG 패턴 추출부는, 상기 퍼스트 모듈과 상기 세컨드 모듈에서 공통으로 사용되는 입/출력 파라미터에 대한 변경위치와 변경범위에 대한 학습을 수행하여 상기 범위-위치 패턴을 생성할 수 있다.The CFG pattern extracting unit may generate the range-position pattern by learning about a change position and a change range of input / output parameters commonly used in the first module and the second module.

상기 파라미터는, 배열, 변수, 메모리일 수 있다.The parameter may be an array, a variable, or a memory.

상기 동적 추적부는, 상기 시퀀스 패턴의 비정상도를 수정된 CFG 트라이그램의 이산 확률 분포를 따르는 정도를 측정하여 검출할 수 있다.The dynamic tracking unit may measure the degree of abnormality of the sequence pattern by measuring the degree of following the discrete probability distribution of the corrected CFG trigram.

상기 동적 추적부는, 상기 깊이 패턴의 비정상도를 수정된 CFG의 모듈 간 깊이가 이산 확률 분포를 따르는 정도를 측정하여 검출할 수 있다.The dynamic tracking unit can detect the degree of abnormality of the depth pattern by measuring the degree of the inter-module depth of the modified CFG following the discrete probability distribution.

상기 동적 추적부는, 상기 퍼스트 모듈과 상기 세컨드 모듈에서 공통으로 사용되는 입/출력 파라미터에 대해 입/출력 파라미터들에 대한 유효값을 확인하여 변경위치와 변경범위에 대한 조작을 탐지할 수 있다.The dynamic tracking unit may detect an operation on a change position and a change range by checking valid values of input / output parameters for input / output parameters commonly used in the first module and the second module.

본 발명의 일실시예에 따른 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 방법은, 소프트웨어의 소스코드에 대한 CFG(Control Flow Graph)에서 중요 모듈이 연속되는 선후 관계에 따라 각 모듈을 구분하는 단계; 상기 구분된 각 모듈에 대한 퍼징 테스트의 퍼징 확률과 각 모듈의 전이 확률 분포에 따른 추상화를 통해 시퀀스(sequence) 패턴, 깊이(depth) 패턴, 범위-위치(range-position) 패턴을 생성 및 추출하는 단계; 및 상기 소프트웨어의 소스코드에 대한 수정을 확인함에 따라, 상기 시퀀스 패턴, 상기 깊이 패턴 및 상기 상기 범위-위치 패턴을 이용하여 상기 소프트웨어의 소스코드의 절차변경에 따른 비정상도를 측정 또는 탐지하는 단계;를 포함할 수 있다.The method of monitoring a pattern-based software procedure change operation using a CFG according to an embodiment of the present invention includes a step of classifying each module according to a sequential relation in which a critical module is consecutive in a CFG (Control Flow Graph) ; A sequence pattern, a depth pattern, and a range-position pattern are generated and abstracted through an abstraction according to the purging probability of the purging test for each of the above-identified modules and the transition probability distribution of each module step; And measuring or detecting an abnormality in accordance with a procedure change of the source code of the software using the sequence pattern, the depth pattern, and the range-position pattern as confirming the modification to the source code of the software. . ≪ / RTI >

상기 구분 단계는, 상기 중요 모듈이 연속되는 선후 관계에 따라 논리적 기능 단위로서 퍼스트 모듈과 세컨드 모듈을 구분할 수 있다.In the dividing step, the first module and the second module may be distinguished from each other as a logical functional unit according to the successive relation of the important modules.

상기 생성 및 추출 단계는, 상기 퍼스트 모듈과 상기 세컨드 모듈 사이의 모듈들에 대한 퍼징 테스트 수행 결과에 대해 모듈별 전이 확률 분포를 계산함에 따라, 분기 모듈에서 확률이 높은 경로의 모듈을 선택하고, 높은 확률로 같이 실행되는 모듈을 하나로 합치고, 분기 모듈 중 예외처리 및 종료코드가 구현된 모듈을 생략할 수 있다.Wherein the generating and extracting step calculates a transition probability distribution for each module with respect to a result of performing a purging test on modules between the first module and the second module and selects a module having a higher probability in the branching module, It is possible to combine the modules that are executed together with probability and to omit the module in which the exception processing and termination code of the branch module are implemented.

상기 생성 및 추출 단계는, 상기 퍼스트 모듈과 상기 세컨드 모듈 사이의 모듈들에 대한 트라이그램 방식으로 소정의 노드를 하나의 묶음으로 생성하는 군집화 과정을 수행하고, 모든 트라이그램에 대한 이산 확률 분포를 계산하여 상기 시퀀스 패턴을 생성할 수 있다.The generation and extraction step may include a grouping process of generating predetermined nodes in a bundle in a trigram scheme for the modules between the first module and the second module and calculating a discrete probability distribution for all trigrams Thereby generating the sequence pattern.

상기 생성 및 추출 단계는, 여러 소스코드 파일 상에서 상기 퍼스트 모듈과 상기 세컨드 모듈 사이의 CFG상 노드의 수를 나타내는 연결 깊이를 파악하여 상기 깊이 패컨을 생성할 수 있다.The generating and extracting step may generate the depth packet by detecting a connection depth indicating the number of CFG nodes between the first module and the second module on the plurality of source code files.

상기 생성 및 추출 단계는, 상기 퍼스트 모듈과 상기 세컨드 모듈에서 공통으로 사용되는 입/출력 파라미터에 대한 변경위치와 변경범위에 대한 학습을 수행하여 상기 범위-위치 패턴을 생성할 수 있다.The generating and extracting step may generate the range-position pattern by learning about a change position and a change range of input / output parameters commonly used in the first module and the second module.

상기 측정 또는 탐지 단계는, 상기 시퀀스 패턴의 비정상도를 수정된 CFG 트라이그램의 이산 확률 분포를 따르는 정도를 측정하여 검출할 수 있다.The measuring or detecting step may detect the degree of abnormality of the sequence pattern by measuring the degree of following the discrete probability distribution of the corrected CFG trigram.

상기 측정 또는 탐지 단계는, 상기 깊이 패턴의 비정상도를 수정된 CFG의 모듈 간 깊이가 이산 확률 분포를 따르는 정도를 측정하여 검출할 수 있다.The measurement or detection step may detect the degree of abnormality of the depth pattern by measuring the degree of inter-module depth of the modified CFG following the discrete probability distribution.

상기 측정 또는 탐지 단계는, 상기 퍼스트 모듈과 상기 세컨드 모듈에서 공통으로 사용되는 입/출력 파라미터에 대해 입/출력 파라미터들에 대한 유효값을 확인하여 변경위치와 변경범위에 대한 조작을 탐지할 수 있다.The measurement or detection step may detect an operation on the change position and the change range by checking the valid values for the input / output parameters for the input / output parameters commonly used in the first module and the second module .

본 발명은 소프트웨어의 소스코드로부터 추출된 CFG에 대해 퍼징 기법 및 트라이그램을 통해 추상화한 후 패턴을 학습시켜 소스코드의 비정상도를 측정함으로써, 소프트웨어에 대한 불법행위와 이상동작을 탐지할 수 있다.The present invention can detect illegal behavior and abnormal operation of software by abstracting the CFG extracted from the software source code and abstracting it through the purging technique and the trigram to measure the abnormality of the source code by learning the pattern.

또한, 본 발명은 소프트웨어의 소스코드를 대상으로 프로그래머(위탁/용역직원)의 불법행위를 탐지함으로써, 보안감시에서 제외된 영역까지 감시범위를 확대할 수 있다.In addition, the present invention can extend the scope of the monitoring to the area excluded from the security surveillance by detecting illegal actions of the programmer (contract / service staff) on the source code of the software.

또한, 본 발명은 잘 드러나지 않게 불법의도를 숨기는 행위(예를 들어, 1,000개의 이벤트 중 1개만 불법으로 실행) 또는 일시적으로 소스코드 수정 후 원복(예를 들어, 개찰 1분전에 우회코드 삽입 후 개출 후 바로 코드 원복)을 놓치지 않고 검출 할 수 있기 때문에, 다양한 소스코드 우회방식이나 예외조건을 이용한 악의적 목적 코드를 탐지할 수 있다.Further, the present invention can be applied to a case in which illegal intention is hidden (for example, only one of 1,000 events is illegally executed), or temporarily fixed after the source code is modified (for example, after insertion of a bypass code It is possible to detect a malicious object code using various source code bypassing methods or exceptional conditions.

또한, 본 발명은 패턴을 학습시킬 때, 실제로 운영할 때가가 아닌 테스트 환경(퍼징 기법)에서 학습함으므로써 운영시스템의 부하와 부담(검증되지 않은 코드로 인한 안정성 문제 등)을 최소화 할 수 있다. In addition, the present invention minimizes the load and burden of the operating system (stability problems due to un-validated codes, etc.) by learning patterns in the test environment (purging technique) rather than in actual operation.

또한, 본 발명은 서로 다른 목적의 기술을 상호 보완적으로 적용함으로써 견고하게 불법행위를 감시할 수 있다.In addition, the present invention can firmly monitor illegal activities by applying complementary technologies of different purposes.

도 1은 CFG 유형 예시를 나타낸 도면,
도 2는 소스코드에서 추출된 CFG를 설명하는 도면,
도 3은 본 발명의 일실시예에 따른 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 장치에 대한 도면,
도 4a 및 도 4b는 퍼징 테스트를 통한 퍼징 확률을 추출하는 과정을 설명하는 도면,
도 4c는 전이 확률 계산에 따른 추상화 예시를 나타낸 도면,
도 5는 실제 코드의 CFG 일부를 나타낸 도면,
도 6은 CFG에서 추출된 트라이그램의 이산 확률 분포를 설명하는 도면,
도 7은 CFG에서 중요 모듈 사이의 깊이를 추출하는 과정을 설명하는 도면,
도 8은 입/출력 파라미터의 변경위치와 변경범위를 학습하는 과정을 설명하는 도면,
도 9는 입/출력 파라미터의 변화지점과 변화범위를 학습하는 과정 결과를 나타낸 도면,
도 10은 소프트웨어의 논리적 오류 모니터링 예시를 나타낸 도면이다.
BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 shows a CFG type illustration,
2 is a view for explaining a CFG extracted from a source code,
FIG. 3 is a diagram illustrating a pattern-based software procedure change operation monitoring apparatus using a CFG according to an embodiment of the present invention.
4A and 4B are diagrams illustrating a process of extracting a purging probability through a purging test,
4C is a diagram illustrating an example of abstraction according to transition probability calculation,
5 is a diagram showing a part of a CFG of an actual code,
6 is a view for explaining the discrete probability distribution of trigrams extracted from the CFG,
7 is a view for explaining a process of extracting depths between important modules in a CFG,
8 is a diagram for explaining a process of learning a change position and a change range of input / output parameters,
9 is a diagram showing a process result of learning a change point and a change range of an input / output parameter,
10 is a diagram showing an example of logical error monitoring of software.

이하 본 발명의 바람직한 실시 예를 첨부한 도면을 참조하여 상세히 설명한다. 다만, 하기의 설명 및 첨부된 도면에서 본 발명의 요지를 흐릴 수 있는 공지 기능 또는 구성에 대한 상세한 설명은 생략한다. 또한, 도면 전체에 걸쳐 동일한 구성 요소들은 가능한 한 동일한 도면 부호로 나타내고 있음에 유의하여야 한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following description and the accompanying drawings, detailed description of well-known functions or constructions that may obscure the subject matter of the present invention will be omitted. It should be noted that the same constituent elements are denoted by the same reference numerals as possible throughout the drawings.

이하에서 설명되는 본 명세서 및 청구범위에 사용된 용어나 단어는 통상적이거나 사전적인 의미로 한정해서 해석되어서는 아니 되며, 발명자는 그 자신의 발명을 가장 최선의 방법으로 설명하기 위한 용어로 적절하게 정의할 수 있다는 원칙에 입각하여 본 발명의 기술적 사상에 부합하는 의미와 개념으로 해석되어야만 한다.The terms and words used in the present specification and claims should not be construed in an ordinary or dictionary sense, and the inventor shall properly define the terms of his invention in the best way possible It should be construed as meaning and concept consistent with the technical idea of the present invention.

따라서 본 명세서에 기재된 실시 예와 도면에 도시된 구성은 본 발명의 가장 바람직한 일 실시 예에 불과할 뿐이고, 본 발명의 기술적 사상을 모두 대변하는 것은 아니므로, 본 출원시점에 있어서 이들을 대체할 수 있는 다양한 균등물과 변형 예들이 있을 수 있음을 이해하여야 한다.Therefore, the embodiments described in the present specification and the configurations shown in the drawings are merely the most preferred embodiments of the present invention, and not all of the technical ideas of the present invention are described. Therefore, It is to be understood that equivalents and modifications are possible.

첨부 도면에 있어서 일부 구성요소는 과장되거나 생략되거나 또는 개략적으로 도시되었으며, 각 구성요소의 크기는 실제 크기를 전적으로 반영하는 것이 아니다. 본 발명은 첨부한 도면에 그려진 상대적인 크기나 간격에 의해 제한되어지지 않는다.In the accompanying drawings, some of the elements are exaggerated, omitted or schematically shown, and the size of each element does not entirely reflect the actual size. The invention is not limited by the relative size or spacing depicted in the accompanying drawings.

명세서 전체에서 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있음을 의미한다. 또한, 어떤 부분이 다른 부분과 "연결"되어 있다고 할 때, 이는 "직접적으로 연결"되어 있는 경우뿐 아니라, 그 중간에 다른 소자를 사이에 두고 "전기적으로 연결"되어 있는 경우도 포함한다.When an element is referred to as " including " an element throughout the specification, it is to be understood that the element may include other elements as well, without departing from the spirit or scope of the present invention. Also, 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.

단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The singular expressions include plural expressions unless the context clearly dictates otherwise. It will be understood that terms such as " comprise " or " comprise ", when used in this specification, specify the presence of stated features, integers, , But do not preclude the presence or addition of one or more other features, elements, components, components, or combinations thereof.

또한, 명세서에서 사용되는 "부"라는 용어는 소프트웨어, FPGA 또는 ASIC과 같은 하드웨어 구성요소를 의미하며, "부"는 어떤 역할들을 수행한다. 그렇지만 "부"는 소프트웨어 또는 하드웨어에 한정되는 의미는 아니다. "부"는 어드레싱할 수 있는 저장 매체에 있도록 구성될 수도 있고 하나 또는 그 이상의 프로세서들을 재생시키도록 구성될 수도 있다. 따라서, 일 예로서 "부"는 소프트웨어 구성요소들, 객체지향 소프트웨어 구성요소들, 클래스 구성요소들 및 태스크 구성요소들과 같은 구성요소들과, 프로세스들, 함수들, 속성들, 프로시저들, 서브루틴들, 프로그램 코드의 세그먼트들, 드라이버들, 펌웨어, 마이크로 코드, 회로, 데이터, 데이터베이스, 데이터 구조들, 테이블들, 어레이들 및 변수들을 포함한다. 구성요소들과 "부"들 안에서 제공되는 기능은 더 작은 수의 구성요소들 및 "부"들로 결합되거나 추가적인 구성요소들과 "부"들로 더 분리될 수 있다.Also, as used herein, the term " part " refers to a hardware component such as software, FPGA or ASIC, and " part " However, " part " is not meant to be limited to software or hardware. &Quot; Part " may be configured to reside on an addressable storage medium and may be configured to play back one or more processors. Thus, by way of example, and not limitation, " part (s) " refers to components such as software components, object oriented software components, class components and task components, and processes, Subroutines, segments of program code, drivers, firmware, microcode, circuitry, data, databases, data structures, tables, arrays and variables. The functions provided in the components and " parts " may be combined into a smaller number of components and " parts " or further separated into additional components and " parts ".

아래에서는 첨부한 도면을 참고하여 본 발명의 실시예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily carry out the present invention. 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.

본 발명의 바람직한 실시예를 설명하기에 앞서, CFG(Control Flow Graph)에 대해 설명하기로 한다.Before describing a preferred embodiment of the present invention, a CFG (Control Flow Graph) will be described.

CFG라 함은, 프로그램이 실행 중에 횡단할 수 있는 모든 경로를 그래프 표기법을 통해 노드(node)와 에지(edge)로 나타내는 것을 의미한다. 노드는 원 모양으로, 에지는 선으로 나타낼 수 있다. 이러한 CFG는 자바 언어 또는 C 언어 등 여러 코드에서 생성해낼 수 있는 고유 정보 중 하나로서, 컴파일러 최적화 분야에서 활용된다.CFG means that all paths that a program can traverse during execution are represented by nodes and edges through graphical notation. A node can be represented by a circle, and an edge by a line. This CFG is one of the unique information that can be generated by various codes such as Java language or C language, and is used in the field of compiler optimization.

도 1은 CFG 유형 예시를 나타낸 도면이다. 1 is a diagram showing an example of a CFG type.

도 1을 참조하면, (a)는 if-then-else를 CFG로 표현한 경우를 나타내고, (b)는 while loop을 CFG로 표현한 경우를 나타내며, (c)는 자연적인 루프 2개를 CFG로 표현한 경우(예, while문 안에 if-break)를 나태내고, (d)는 엔트리 포인트 2개를 가진 루프를 CFG로 표현한 경우(예, goto문 안에 while/for문)를 나타낸다.Referring to FIG. 1, (a) represents a case where an if-then-else is represented by a CFG, (b) represents a case where a while loop is represented by a CFG, and (c) (Eg, if-break in a while statement), and (d) represents a loop with two entry points as a CFG (eg, a while / for statement in a goto statement).

도 2는 소스코드에서 추출된 CFG를 설명하는 도면이다. 도 2를 참조하면, 소스코드(1)는 각 행라인(column line)에 노드번호(2)가 부여된다. CFG(3)는 소스코드(1)에서 노드를 추출하여 노드 간의 연결관계를 에지로 표현하여 나타낼 수 있다. 여기서, CFG(3)는 소스코드(1)에서 코드 실행시 어디까지 도달할 수 있는지를 알려준다. 2 is a view for explaining the CFG extracted from the source code. 2, in the source code 1, a node number 2 is assigned to each column line. The CFG (3) extracts nodes from the source code (1) and expresses the connection relationship between the nodes as an edge. Here, the CFG (3) indicates where the source code (1) can reach when executing the code.

도 2의 CFG(3)는 비교적 간단하게 표현된 경우를 나타내지만, 노드의 개수와 노드 간 연결관계를 나타낸 에지의 개수가 많아질수록 방대하고 복잡하다. CFG(3)는 자체적으로 노드의 연결정보(예, 선언문, 분기문, 산술문 등)만을 나타낼 뿐이며, 소스코드 절차변경에 대한 분석 관점에서 의미가 없다.The CFG (3) of FIG. 2 shows a relatively simple case, but the larger the number of edges indicating the number of nodes and the connection relationship between the nodes, the greater the complexity. The CFG (3) itself only represents node connection information (eg, declarations, branch statements, arithmetic statements, etc.) and has no meaning in terms of analysis of source code procedure changes.

이에 따라, 본 발명에서는 추출된 CFG에 대한 퍼징(fuzzing) 기법을 적용하여 다양한 입력변수 생성을 통해 프로그램에서 가능한 모든 전이(transition) 확률을 구하고, 트라이그램(trigram) 기반 CFG 패턴 생성 기법, 시퀀스(sequence) 패턴 기반의 비정상도 탐지 기법, 깊이(depth) 패턴 기반의 비정상도 탐지 기법, 범위-위치(range-position) 기반의 비정상도 탐지 기법을 이용하여 소스코드 절차변경을 검출한다. Accordingly, in the present invention, all possible transition probabilities are obtained by generating various input variables by applying a fuzzing technique to the extracted CFG, and a trigram-based CFG pattern generation technique, a sequence sequence-pattern unsteadiness detection, depth pattern-based anomaly detection, and range-position-based anomaly detection.

이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예를 설명한다.Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings.

도 3은 본 발명의 일실시예에 따른 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 장치에 대한 도면이다.3 is a diagram illustrating a pattern-based software procedure change operation monitoring apparatus using a CFG according to an embodiment of the present invention.

도 3에 도시된 바와 같이, 본 발명의 일실시예에 따른 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 장치(이하 'SW 절차변경 동작 감시 장치'라 함, 100)는, 소프트웨어(software, SW)의 소스코드(sourcecode)에 대한 CFG(Control Flow Graph)를 추출한 후, 추출된 CFG에 대해 퍼징 기법 및 트라이그램에 의한 추상화를 통해 패턴을 생성 및 학습함으로써 소프트웨어의 불법적인 절차변경에 따른 소스코드 비정상도를 측정한다.3, a pattern-based software procedure change operation monitoring apparatus (hereinafter, referred to as 'SW procedure change operation monitor apparatus') 100 using CFG according to an embodiment of the present invention includes software (CFG) for the source code of the CFG, and generates and learns the pattern through the purging technique and the abstract by the trigram for the extracted CFG, thereby generating the source code The abnormality is measured.

이를 위해, SW 절차변경 동작 감시 장치(100)는 논리적 모듈 흐름 선정부(110), CFG 패턴 추출부(120), 동적 추적부(130)를 포함한다.To this end, the SW procedure change operation monitoring apparatus 100 includes a logical module flow selection unit 110, a CFG pattern extraction unit 120, and a dynamic tracking unit 130.

논리적 모듈 흐름 선정부(110)는 소프트웨어의 소스코드에서 중요 모듈을 선정한 후, 각 중요 모듈들이 연속되는 선/후 관계에 따라 퍼스트 모듈(first module)과 세컨드 모듈(second module)을 구분하여 선정한다.The logical module flow selection unit 110 selects an important module from the source code of the software and then selects the first module and the second module separately according to the successive line / .

여기서, '모듈'이라 함은, 여러가지 코드와 함수들로 구성되는 논리적 기능 단위를 말한다. '중요 모듈'은 소스코드의 주요 기능을 구성하는 모듈을 의미한다. 이때, '퍼스트 모듈'은 중요 모듈 중 먼저 실행되는 모듈을 의미하고, '세컨드 모듈'은 중요 모듈 중 퍼스트 모듈 다음에 실행되는 모듈을 의미한다. 따라서, 퍼스트 모듈을 수행한 이후에는 예외없이 세컨드 모듈을 실행하게 된다.Here, 'module' refers to a logical functional unit composed of various codes and functions. 'Important module' means a module that constitutes the main function of the source code. In this case, 'first module' means a module which is executed first among important modules, and 'second module' means a module which is executed after the first module among important modules. Therefore, after executing the first module, the second module is executed without any exception.

그런데, '퍼스트 모듈'과 '세컨드 모듈'은 상대적 개념이다. 예를 들어, 중요 모듈1(입찰)→중요 모듈2(투찰)→중요 모듈3(개찰)→중요 모듈4(예가)에서, 중요 모듈3(개찰)을 퍼스트 모듈로 선정하면, 중요 모듈4(예가)이 세컨드 모듈이 된다. 다시 말해, 첫번째 모듈인 중요 모듈1(입찰)이 퍼스트 모듈이고, 두번째 모듈인 중요 모듈2(투찰)가 세컨드 모듈이 되는 경우와 같이, 퍼스트 모듈과 세컨드 모듈은 절대적 개념이 아니다.However, 'first module' and 'second module' are relative concepts. For example, if you select the important module 3 (wicket) as the first module in the important module 1 (bidding) → important module 2 (tipping) → important module 3 (wicket) → important module 4 Yes) becomes the second module. In other words, the first module and the second module are not absolute concepts, as in the case where the first module, the important module 1 (bidding) is the first module, and the second module, the important module 2 (tentative), becomes the second module.

CFG 패턴 추출부(120)는 소스코드로부터 CFG를 추출한 후, 추출된 CFG의 추상화를 통한 패턴 생성을 통해 시퀀스(sequence), 깊이(depth), 범위-위치(range-position) 패턴을 추출한다. 이 경우, CFG 패턴 추출부(120)는 소스코드에 대한 모델 학습을 수행한다.The CFG pattern extracting unit 120 extracts a CFG from the source code and then extracts a sequence, a depth, and a range-position pattern through pattern generation through abstracting the extracted CFG. In this case, the CFG pattern extracting unit 120 performs model learning on the source code.

우선, 소스코드로부터 추출된 CFG에 대한 추상화에 대해 설명하기로 한다.First, an abstraction of the CFG extracted from the source code will be described.

CFG 패턴 추출부(120)는 퍼징(fuzzing) 테스트를 수행하여 퍼징 확률을 추출한 후, 모듈별 전이 확률 분포에 따라 추상화를 수행한다. 여기서, 퍼징 테스트는 퍼스트 모듈(10)에 입력값을 랜덤하게 생성하여 결과값의 패턴을 추출하는 과정이다.The CFG pattern extracting unit 120 performs a fuzzing test to extract a purging probability, and then performs an abstraction according to a transition probability distribution per module. Here, the purging test is a process of randomly generating an input value in the first module 10 and extracting a pattern of the resultant value.

도 4a 및 도 4b는 퍼징 테스트를 통한 퍼징 확률을 추출하는 과정을 설명하는 도면이고, 도 4c는 전이 확률 계산에 따른 추상화 예시를 나타낸 도면이다.FIGS. 4A and 4B are diagrams for explaining a process of extracting a purging probability through a purging test, and FIG. 4C is a diagram illustrating an example of abstraction according to transition probability calculation.

도 4a를 참조하면, CFG 패턴 추출부(120)는 CFG의 퍼스트 모듈(10)과 세컨드 모듈(20) 사이의 모듈들에 대해 퍼징 테스트를 수행한다. 즉, CFG 패턴 추출부(120)는 퍼스트 모듈(10)에 랜덤 입력값(random input)을 대입하여 결과값의 패턴을 생성한다.Referring to FIG. 4A, the CFG pattern extracting unit 120 performs a purging test on the modules between the first module 10 and the second module 20 of the CFG. That is, the CFG pattern extracting unit 120 substitutes a random input value into the first module 10 to generate a pattern of the resultant value.

도 4b를 참조하면, CFG 패턴 추출부(120)는 CFG의 퍼스트 모듈(10)과 세컨드 모듈(20) 사이의 모듈들에 대한 퍼징 테스트 수행결과에 대해 모듈별 전이(transition) 확률 분포를 계산한다. 이는 퍼스트 모듈(10)에서 세컨드 모듈(20)까지의 확률 학습에 해당된다.Referring to FIG. 4B, the CFG pattern extracting unit 120 calculates a transition probability distribution per module with respect to a result of performing a purging test on the modules between the first module 10 and the second module 20 of the CFG . This corresponds to the probability learning from the first module 10 to the second module 20.

도 4c를 참조하면, CFG 패턴 추출부(120)는 CFG의 퍼스트 모듈(10)과 세컨드 모듈(20) 사이의 모듈들에 대한 시퀀스(sequence)를 추상화하고 요약하기 위해, 전이 확률 분포 계산 결과를 이용하여 분기 모듈에서 확률이 높은 경로의 모듈이 선택되고, 높은 확률로 같이 실행되는 모듈을 하나로 합쳐지며, 분기 모듈 중 예외처리 및 종료코드가 구현된 모듈을 생략하는 과정을 수행한다.4C, the CFG pattern extracting unit 120 extracts a transition probability distribution calculation result to abstract and summarize a sequence of modules between the first module 10 and the second module 20 of the CFG A module having a higher probability is selected from the branch module and a module having the highest probability is combined into one module and the module having the exception processing and termination code of the branch module is omitted.

'추상화 예시 1'을 살펴보면, 분기 모듈에서 확률이 높은 경로의 모듈은 'A→C→E→D→G→M'으로 나타나고, 분기 모듈 E의 경우에 양방향으로 전이 확률이 동일하여 'E→I'로 나타나며, 종료 모듈 M의 경우에 이전에 연결된 모듈이 표시되어 'D→H→M'으로 나타낸다.In the 'abstraction example 1', a module having a high probability in the branch module is represented as 'A → C → E → D → G → M'. In the case of the branch module E, the transition probability in both directions is the same, I ', and in the case of the termination module M, the previously connected module is displayed and is indicated as' D → H → M'.

'추상화 예시 2'를 살펴보면, 분기 모듈 중 높은 확률로 같이 실행되는 모듈 C와 E는 하나로 합쳐지는 경우를 나타낸다.Referring to 'abstraction example 2', modules C and E, which are executed with high probability among the branching modules, are merged into one.

이처럼, CFG 기반의 추상화 과정을 거치는 이유는 도 5와 같이 실제 소스코드의 CFG에서 퍼스트 모듈과 세컨드 모듈 사이에 수 많은 노드들이 존재하여 상당히 복잡한 구조를 가지기 때문에, CFG의 정상 경로와 이상 경로를 추적하기 곤란할 뿐만 아니라 CFG 자체 해석이 곤란하다. 도 5는 실제 코드의 CFG 일부를 나타낸 도면이다. 이에 따라, CFG 패턴 추출부(120)는 패턴 추출 이전에 추상화 과정을 거친 후 패턴 추출 과정을 수행하는 것이 바람직하다.The reason why the CFG-based abstraction process is performed is as follows. As shown in FIG. 5, since there are many nodes between the first module and the second module in the CFG of the actual source code, But it is difficult to interpret CFG itself. 5 is a diagram showing a part of a CFG of an actual code. Accordingly, it is preferable that the CFG pattern extracting unit 120 performs the pattern extraction process after the abstracting process before the pattern extraction.

이하, 시퀀스 패턴, 깊이 패턴 및 범위-위치 패턴에 대한 생성 및 추출 과정(또는, 학습 과정)에 대하여 설명하기로 한다.Hereinafter, the generation process and the extraction process (or learning process) for the sequence pattern, the depth pattern, and the range-position pattern will be described.

먼저, CFG 패턴 추출부(120)는 시퀀스 패턴을 생성 및 추출할 수 있다. First, the CFG pattern extracting unit 120 can generate and extract a sequence pattern.

구체적으로, CFG 패턴 추출부(120)는 추상화된 CFG의 모듈을 트라이그램 방식으로 3개의 노드를 하나의 묶음으로 생성하는 군집화 과정을 수행한다. 이때, CFG 패턴 추출부(120)는 도 6과 같이 군집화 과정을 통해 생성된 트라이그램의 빈도를 측정하고, 이를 이용하여 모든 트라이그램에 대한 이산(discrete) 확률 분포를 계산한다. 도 6은 CFG에서 추출된 트라이그램의 이산 확률 분포를 설명하는 도면이다.Specifically, the CFG pattern extracting unit 120 performs a clustering process of generating three nodes in a bundle by using the trigram method of the abstracted CFG module. At this time, the CFG pattern extracting unit 120 measures the frequency of the trigram generated through the clustering process as shown in FIG. 6, and calculates the discrete probability distribution for all the trigrams using the frequency. 6 is a diagram for explaining the discrete probability distribution of the trigrams extracted from the CFG.

여기서, 추상화된 CFG의 모듈에 대해 트라이그램을 사용하는 이유는 현시점에서 '출발지-중간지점-목적지'의 3가지 방향 정보를 패턴에 포함시키기 위함이다.Here, the reason why the trigram is used for the module of the abstracted CFG is to include three directional information of 'starting point - intermediate point - destination' in the pattern at present.

이와 같이, CFG 패턴 추출부(120)는 중요 모듈이 실행되는 과정(퍼스트 모듈→세컨드 모듈)에서 실행되는 여러 모듈을 트라이그램으로 묶어 트라이그램의 종류, 순서, 빈도, 파라미터의 변화를 파악하여 중요 모듈을 실행하는데 불필요한 행위(모듈)를 구분짓는 패턴을 생성 및 추출한다. As described above, the CFG pattern extracting unit 120 classifies various modules executed in the process of executing the important module (first module → second module) into trigrams to grasp the types, order, frequency, and changes in the parameters of the trigrams Generate and extract patterns that distinguish unnecessary actions (modules) in executing a module.

이를 통해, CFG 패턴 추출부(120)는 퍼스트 모듈과 세컨드 모듈 사이에서 여러 에지를 파악하여 모듈 사이의 시퀀스를 계산하여 모듈 간의 순서 특성을 파악 가능한 시퀀스 패턴을 추출한다. In this way, the CFG pattern extracting unit 120 calculates a sequence between modules by detecting various edges between the first module and the second module, and extracts a sequence pattern capable of grasping the order characteristics between the modules.

한편, 시퀀스 패턴 기반 비정상도는 하기 수학식 1과 같이 수정된 CFG의 모듈 간 트라이그램에서 이산 확률 분포를 따르는 정도에 따라 구해진다.On the other hand, the sequence pattern-based anomaly is obtained according to the degree of following the discrete probability distribution in the inter-module trigram of the CFG modified as shown in Equation (1).

Figure pat00001
Figure pat00001

여기서, '(T1,…, TN)'은 수정된 CFG의 트라이그램을 의미하고, 'P(X)'는 사전에 생성된 이산 확률 분포 함수를 나타낸다.Here, '(T 1 , ..., T N )' denotes the modified trigram of the CFG, and 'P (X)' represents the previously generated discrete probability distribution function.

이처럼, 시퀀스 패턴에 대한 비정상도를 측정하는 것은 다음과 같은 의미가 있다.As described above, the measurement of the abnormality with respect to the sequence pattern has the following meaning.

즉, 시퀀스 패턴은 중요 모듈이 실행되는 과정에서 시행되는 모듈의 종류를 파악 가능하게 함으로써 중요 모듈을 시행하는데 필요하지 않는 행위를 구분할 수 있게 한다.That is, the sequence pattern makes it possible to identify the types of modules to be executed in the course of execution of the important modules, thereby discriminating the actions that are not necessary for the execution of the important modules.

또한, 시퀀스 패턴은 트라이그램을 이용하여 3개의 모듈을 하나로 묶음으로써 모듈 간의 순서 특성을 패턴화할 수 있다.In addition, the sequence pattern can pattern the order characteristics between the modules by bundling the three modules into one using the trigram.

정상적인 노드라 할지라도 모듈 간의 연결 과정에서는, 다른 조작된 입/출력이 포함될 수 있는데, 이런 경우에 규칙 기반(rule-based) 기법을 통해 탐지하기 곤란하지만, 시퀀스 패턴을 통해 비정상도를 탐지할 수 있다.Even in normal nodes, the connection between modules may involve other manipulated inputs / outputs. In such cases, it is difficult to detect through rule-based techniques. However, abnormalities can be detected through sequence patterns. have.

다음으로, CFG 패턴 추출부(120)는 여러 소스코드 파일 상에서 두 중요 모듈 간의 CFG상 노드의 수를 나타내는 깊이 패턴을 추출할 수 있다. 여기서, 깊이(depth)는 퍼스트 모듈과 세컨드 모듈 사이의 연결 깊이를 의미한다.Next, the CFG pattern extracting unit 120 can extract a depth pattern indicating the number of nodes on the CFG between two important modules on various source code files. Here, the depth means the connection depth between the first module and the second module.

이를 위해, CFG 패턴 추출부(120)는 여러 소스코드 파일 상에서 두 중요 모듈을 거치는 노드의 수를 파악하여 중요 모듈 사이의 깊이를 계산한다. 이때, CFG 패턴 추출부(120)는 중요 모듈 사이의 깊이를 테이블로 구성한다.To this end, the CFG pattern extracting unit 120 calculates the depth between the important modules by recognizing the number of nodes passing through two important modules on various source code files. At this time, the CFG pattern extracting unit 120 forms the depth between the important modules as a table.

예를 들어, 도 7을 참조하면, B 파일의 퍼스트 모듈(10)과 세컨드 모듈(20)의 깊이가 '5'인 경우는 '퍼스트 모듈→A→B→C→D→세컨드 모듈'로서 1개이고, B 파일의 퍼스트 모듈(10)과 세컨드 모듈(20)의 깊이가 '4'인 경우는 '퍼스트 모듈→A→B→C→세컨드 모듈'과 '퍼스트 모듈→A→B→A→세컨드 모듈'로서 2개이다. 도 7은 CFG에서 중요 모듈 사이의 깊이를 추출하는 과정을 설명하는 도면이다.For example, referring to FIG. 7, when the depth of the first module 10 and the second module 20 of the B file is '5', the first modules A, B, C, D, A, B, C, and so on, and the first module 10 and the second module 20 of the B file have a depth of '4', the first module A, the second module B, the second module C, Module '. 7 is a view for explaining a process of extracting depths between important modules in a CFG.

마찬가지로, A 파일의 퍼스트 모듈(10)과 세컨드 모듈(20)의 깊이가 '4'인 경우만 4개이고, C 파일의 퍼스트 모듈(10)과 세컨드 모듈(20)의 깊이가 '4'인 경우가 2개이고, 깊이가 '5'인 경우가 2개이다.Similarly, in the case where the depth of the first module 10 and the depth of the second module 20 of the A file is four, and the depth of the first module 10 and the depth of the second module 20 of the C file is four And the depth is " 5 ".

한편, 깊이 패턴 기반 비정상도는 하기 수학식 2와 같이 수정된 CFG의 모듈 간 깊이가 이산 확률 분포를 따르는 정도에 따라 구해진다.On the other hand, the depth pattern-based anomaly is obtained according to the degree of the inter-module depth of the modified CFG following the discrete probability distribution as shown in Equation 2 below.

Figure pat00002
Figure pat00002

여기서, 'D'는 수정된 CFG의 모듈 간 깊이를 의미하고, 'P(X)'는 사전에 생성된 이산 확률 분포 함수를 나타낸다.Here, 'D' denotes the inter-module depth of the modified CFG, and 'P (X)' denotes the previously generated discrete probability distribution function.

이처럼, 깊이 패턴에 대해 비정상도를 측정하는 것은 다음과 같은 의미가 있다.Thus, measuring the anomalies for the depth pattern has the following significance.

즉, CFG상에서 깊이의 길이가 변화했다는 것은 if문과 같은 분기문의 변화가 있었다는 것을 의미한다. 이는 보안절차 우회 등의 문제가 발생할 수 있다는 것을 나타낸다. 이러한 분기문의 변화는 전술한 시퀀스 패턴의 비정상도를 탐지하여 파악될 수 없다.In other words, the change in the length of the depth on the CFG means that there has been a change in the branch, such as an if statement. This indicates that problems such as bypassing the security procedure may occur. Such a change in the branch pattern can not be detected by detecting the abnormality of the above-described sequence pattern.

따라서, 깊이 패턴 기반으로 하여 비정상도를 측정하는 것은 여러 우회 기법에 대한 규칙을 전부 학습시킬 필요 없이 깊이의 패턴 자체를 학습시킴으로써 정의되지 않은 이상행위 역시 탐지하도록 할 수 있다.Therefore, measuring anomalies based on depth patterns can also detect undefined anomalies by learning the depth pattern itself without having to learn all the rules for the various bypass techniques.

이상에서 살펴본 바와 같이, 시퀀스 패턴과 깊이 패턴 기반의 비정상도를 측정하는 것은 이산 확률 분포를 이용하여 절차 변경을 탐지하는 확률 기반의 비정상도 탐지 기법에 해당된다.As described above, the measurement of the sequence pattern and the depth pattern-based abnormality corresponds to the probability-based abnormality detection method that detects the procedure change using the discrete probability distribution.

아울러, CFG 패턴 추출부(120)는 입/출력 파라미터(배열, 변수, 메모리 등)의 변경범위(range)와 변경위치(position)를 학습하고 시스템 운영 단계(Release 단계)에서 중요 모듈의 시작과 종료의 파라미터 패턴 변화를 나타내는 범위-위치 패턴을 추출한다.In addition, the CFG pattern extracting unit 120 learns the range and position of input / output parameters (array, variable, memory, etc.) Extracts a range-position pattern indicating a change in the parameter pattern of the end.

CFG 패턴 추출부(120)는 퍼스트 모듈과 세컨드 모듈에서 공통으로 사용되는 파라미터(배열, 변수, 메모리)에 대해 어느 모듈에서 변경하는지와 변경된 모듈의 변화범위가 어떠한지에 대한 학습을 수행한다. 도 8은 입/출력 파라미터의 변경위치와 변경범위를 학습하는 과정을 설명하는 도면이고, 도 9는 입/출력 파라미터의 변화지점과 변화범위를 학습하는 과정 결과를 나타낸 도면이다.The CFG pattern extracting unit 120 learns which module changes the parameter (array, variable, memory) commonly used in the first module and the second module and how the changed range of the changed module is. FIG. 8 is a view for explaining a process of learning a change position and a change range of input / output parameters, and FIG. 9 is a diagram illustrating a process result of learning a change point and a change range of input / output parameters.

구체적으로, 도 8을 참조하면, CFG 패턴 추출부(120)는 입/출력 파라미터에 대한 학습을 시작하면(S11), 퍼스트 모듈과 세컨드 모듈의 공통 파라미터(예를 들어, 전역 변수[global variable] 등)를 선정한다(S12). 8, when the CFG pattern extracting unit 120 starts learning about the input / output parameters (S11), the CFG pattern extracting unit 120 extracts common parameters (for example, global variables) of the first module and the second module Etc.) (S12).

이후, CFG 패턴 추출부(120)는 퍼스트 모듈에 대한 퍼징 입력을 수행한 후(S13), 다음 모듈을 실행함에 따라 파라미터 변경위치와 변경범위를 파악한다(S14, S15, S17). 이때, 파라미터 변경위치가 확인되면(S15), CFG 패턴 추출부(120)는 해당 모듈을 테이블에 저장하여 패턴화한다(S16).Thereafter, the CFG pattern extracting unit 120 performs purging input for the first module (S13), and recognizes the parameter change position and the change range by executing the next module (S14, S15, S17). At this time, when the parameter changing position is confirmed (S15), the CFG pattern extracting unit 120 stores the corresponding module in a table and patternizes the table (S16).

또한, 파라미터 변경위치가 확인되지 않고(S15), 파라미터 변경범위가 확인되면(S17), CFG 패턴 추출부(120)는 파라미터 변경범위를 조정하여 패턴화한다(S18).If the parameter changing position is not confirmed (S15) and the parameter changing range is confirmed (S17), the CFG pattern extracting unit 120 adjusts the parameter changing range to pattern (S18).

이후, CFG 패턴 추출부(120)는 세컨드 모듈에 도착하는지를 확인함에 따라 S13 단계 또는 S14 단계를 다시 수행한다(S19).Thereafter, the CFG pattern extracting unit 120 performs step S13 or step S14 again (step S19) by checking whether the CFG pattern arrives at the second module.

도 9는 퍼스트 모듈(10)과 세컨드 모듈(20)에서 공통으로 사용되는 파라미터(배열, 변수, 메모리)에 대해 어느 모듈에서 변경하는지와 변경된 모듈의 변화범위가 어떠한지에 대한 학습을 수행하는 경우에 대한 결과를 나타낸다. 여기서, 메모리는 B 모듈과 E 모듈에서 변경되고, 배열은 C 모듈에서 변경되며, 변수는 A 모듈과 B 모듈에서 변경된다. 이는 배열 또는 메모리 참조위치가 엉뚱한 모듈(내부자나 악성코드에 의해 실행)에서 조작되는지를 모니터링한다.9 is a diagram illustrating a case where learning is performed on parameters (array, variable, memory) commonly used in the first module 10 and the second module 20 in which modules are changed and how the changed modules are changed . Here, the memory is changed in the B module and the E module, the arrangement is changed in the C module, and the variables are changed in the A module and the B module. It monitors whether an array or memory reference location is manipulated in the wrong module (executed by an internal or malicious code).

이처럼, 범위-위치 패턴에 대한 비정상도를 탐지하는 것은 다음과 같은 의미가 있다.As such, detecting anomalies for the range-position pattern has the following significance.

알고리즘을 변경하지 않고 입력 파라미터를 적절히 조작하는 경우에는 예상치 못한 결과가 나올 수 있다. If you manipulate the input parameters properly without changing the algorithm, you may get unexpected results.

따라서, 소프트웨어의 절차 변경을 모니터링하기 위해서는 파라미터에 대한 관리가 필요하다. 이는 실시간 모니터링할 때 파라미터의 변경위치와 변경범위가 학습된 바와 다른 경우에 내부자(혹은 악성코드)에 의한 조작 가능성이 있다고 판단하기 위함이다.Therefore, it is necessary to manage parameters in order to monitor software procedure changes. This is to judge that there is possibility of manipulation by the insider (or malicious code) when the change position of the parameter and the range of change are different from the learned in real-time monitoring.

다시 말해, 범위-위치 패턴에 대한 비정상도를 탐지하는 것은 알고리즘 자체에 변화가 없더라도 파라미터의 불법적인 조작을 탐지 및 모니터링하는 의미가 있다.In other words, detecting anomalies for a range-position pattern is meaningful for detecting and monitoring illegal manipulations of parameters, even if the algorithm itself is unchanged.

전술한 바와 같이, CFG 패턴 추출부(120)는 시퀀스 패턴과 깊이 패턴을 추출하여 비정상도를 측정할 수 있을 뿐만 아니라, 범위-위치 패턴에 대한 비정상도를 탐지할 수 있는데, 이들 기법들을 상호 보완적으로 적용할 수 있다.As described above, the CFG pattern extracting unit 120 not only can measure the abnormality by extracting the sequence pattern and the depth pattern, but also can detect the abnormality with respect to the range-position pattern. It is possible to apply it as an application.

다시 도 3으로 돌아와서, 동적 추적부(130)는 소프트웨어의 소스코드에 대해 시퀀스 패턴 또는 깊이 패턴을 기반으로 하여 비정상도를 측정하거나, 소프트웨어의 소스코드에 대해 범위-위치 패턴을 기반으로 하여 비정상도를 탐지함으로써, 소프트웨어 절차변경을 동적으로 검출할 수 있다.3, the dynamic tracking unit 130 may measure abnormality based on the sequence pattern or the depth pattern with respect to the source code of the software, or may measure the abnormality based on the range- The software procedure changes can be detected dynamically.

동적 추적부(130)는 수정된 CFG 트라이그램의 이산 확률 분포를 따르는 정도에 따라 비정상도를 측정하여 시퀀스 패턴의 비정상도를 검출한다.The dynamic tracking unit 130 measures the degree of abnormality according to the degree of discrete probability distribution of the modified CFG trigram to detect the abnormality of the sequence pattern.

또한, 동적 추적부(130)는 수정된 CFG의 모듈 간 깊이가 이산 확률 분포를 따르는 정도에 따라 비정상도를 측정하여 깊이 패턴의 비정상도를 검출한다. 이때, 동적 추적부(130)는 분기문에 의한 알고리즘 구조 변경을 검출하는 깊이 패턴의 비정상도를 검출한다.In addition, the dynamic tracking unit 130 measures the degree of abnormality according to the degree of the inter-module depth of the modified CFG following the discrete probability distribution, and detects the degree of abnormality of the depth pattern. At this time, the dynamic tracking unit 130 detects the degree of abnormality of the depth pattern that detects the change of the algorithm structure by the branch statement.

또한, 동적 추적부(130)는 중요 모듈에서 공통으로 사용되는 파라미터(배열, 변수, 메모리)에 대해 입/출력 파라미터들에 대한 유효값을 확인하여 변경위치와 변경범위에 대한 조작을 탐지한다.Also, the dynamic tracking unit 130 checks the valid values of the input / output parameters for the parameters (array, variable, memory) commonly used in the important module and detects the operation on the changed position and the changed range.

도 10은 소프트웨어의 논리적 오류 모니터링 예시를 나타낸 도면이다.10 is a diagram showing an example of logical error monitoring of software.

SW 절차변경 동작 감시 장치(100)는 복잡한 소스코드를 단순하게 추상화가 가능하기 때문에, 다양한 소프트웨어의 커버리지 검사뿐만 아니라 논리적 오류검출을 위한 안전성 검사 용도로 사용 가능하다. 여기서, 커버리지 검사는 소프트웨어 품질을 검사하는 기법 중 하나로서, 코드의 문법 오류나 사용하지 않은 코드를 발견하는 용도로 활용된다.The SW procedure change operation monitoring apparatus 100 can be used for a security check for logical error detection as well as a coverage check of various software because simple source code can be abstracted. Here, the coverage test is one of techniques for checking the quality of software, and is used to detect grammatical errors or unused codes of codes.

도 10을 참조하면, SW 절차변경 동작 감시 장치(100)는 퍼스트 모듈(10)과 세컨드 모듈(20) 사이의 다양한 케이스에 대하여 논리적 오류를 모니터링하여 정적 및 동적 분석 결과를 나타낼 수 있다.Referring to FIG. 10, the SW procedure change operation monitoring apparatus 100 may monitor logical errors of various cases between the first module 10 and the second module 20 to display static and dynamic analysis results.

도 11은 본 발명의 일실시예에 따른 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 방법에 대한 도면이다.11 is a diagram illustrating a pattern-based software procedure change operation monitoring method using a CFG according to an embodiment of the present invention.

SW 절차변경 동작 감시 장치(100)는 소프트웨어의 소스코드상에서 중요 모듈(즉, 퍼스트 모듈 및 세컨드 모듈)을 선택한다(S101). 이때, SW 절차변경 동작 감시 장치(100)는 중요 모듈 상에서 중요 모듈들이 연속되는 선/후 관계에 따라 퍼스트 모듈과 세컨드 모듈을 설정한다(S102).The SW procedure change operation monitoring apparatus 100 selects the important modules (i.e., the first module and the second module) on the source code of the software (S101). At this time, the SW procedure change operation monitoring apparatus 100 sets up the first module and the second module according to the line / after relation in which the important modules are consecutive on the important module (S102).

이후, SW 절차변경 동작 감시 장치(100)는 소프트웨어의 소스코드로부터 CFG를 추출한 다음에, 추출된 CFG의 추상화를 통해 시퀀스 패턴, 깊이 패턴 및 범위-위치 패턴을 생성 및 추출한다(S103). 이때, SW 절차변경 동작 감시 장치(100)는 소스코드의 수정이 있는지를 확인 한 후(S104), 시퀀스 패턴의 비정상도를 검출하고(S105), 깊이 패턴의 비정상도를 검출하거나(S106), 입/출력 파라미터의 변경위치와 변경범위에 대한 조작을 탐지한다(S107).Then, the SW procedure change operation monitoring apparatus 100 extracts the CFG from the source code of the software, and then generates and extracts the sequence pattern, the depth pattern, and the range-position pattern through the abstracting of the extracted CFG (S103). At this time, the SW procedure change operation monitoring apparatus 100 checks whether there is a modification of the source code (S104), detects an abnormality degree of the sequence pattern (S105), detects an abnormality degree of the depth pattern (S106) An operation on the change position and the change range of the input / output parameters is detected (S107).

일부 실시 예에 의한 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CDROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다.The method according to some embodiments may be implemented in the form of program instructions that can be executed through various computer means and recorded on a computer readable medium. The computer-readable medium may include program instructions, data files, data structures, and the like, alone or in combination. The program instructions recorded on the medium may be those specially designed and constructed for the present invention or may be available to those skilled in the art of computer software. Examples of computer-readable media include magnetic media such as hard disks, floppy disks and magnetic tape, optical media such as CDROMs, DVDs, magneto-optical media such as floptical disks, Magneto-optical media, and hardware devices specifically configured to store and perform program instructions such as ROM, RAM, flash memory, and the like. Examples of program instructions include machine language code such as those produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter or the like.

비록 상기 설명이 다양한 실시예들에 적용되는 본 발명의 신규한 특징들에 초점을 맞추어 설명되었지만, 본 기술 분야에 숙달된 기술을 가진 사람은 본 발명의 범위를 벗어나지 않으면서도 상기 설명된 장치 및 방법의 형태 및 세부 사항에서 다양한 삭제, 대체, 및 변경이 가능함을 이해할 것이다. 따라서, 본 발명의 범위는 상기 설명에서보다는 첨부된 특허청구범위에 의해 정의된다. 특허청구범위의 균등 범위 안의 모든 변형은 본 발명의 범위에 포섭된다.Although the foregoing is directed to novel features of the present invention that are applicable to various embodiments, those skilled in the art will appreciate that the apparatus and method described above, without departing from the scope of the present invention, It will be understood that various deletions, substitutions, and alterations can be made in form and detail without departing from the spirit and scope of the invention. Accordingly, the scope of the present invention is defined by the appended claims rather than the foregoing description. All variations within the scope of the appended claims are embraced within the scope of the present invention.

110 : 논리적 모듈 흐름 선정부
120 : CFG 패턴 추출부
130 : 동적 추적부
110: Logical module flow selection section
120: CFG pattern extracting unit
130: Dynamic tracking unit

Claims (19)

소프트웨어의 소스코드에 대한 CFG(Control Flow Graph)에서 중요 모듈이 연속되는 선후 관계에 따라 각 모듈을 구분하기 위한 논리적 모듈 흐름 선정부;
상기 구분된 각 모듈에 대한 퍼징 테스트의 퍼징 확률과 각 모듈의 전이 확률 분포에 따른 추상화를 통해 시퀀스(sequence) 패턴, 깊이(depth) 패턴, 범위-위치(range-position) 패턴을 생성 및 추출하기 위한 CFG 패턴 추출부; 및
상기 시퀀스 패턴, 상기 깊이 패턴 및 상기 상기 범위-위치 패턴을 이용하여 상기 소프트웨어의 소스코드의 절차변경에 따른 비정상도를 측정 또는 탐지하기 위한 동적 추적부;
를 포함하는 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 장치.
A logical module flow selection module for classifying each module according to a sequential relation of important modules in a CFG (Control Flow Graph) for a software source code;
A sequence pattern, a depth pattern, and a range-position pattern are generated and abstracted through an abstraction according to the purging probability of the purging test for each module and the transition probability distribution of each module A CFG pattern extracting unit; And
A dynamic tracking unit for measuring or detecting an abnormality according to a procedure change of the source code of the software using the sequence pattern, the depth pattern, and the range-position pattern;
A pattern-based software procedure change operation monitoring device using a CFG.
제 1 항에 있어서,
상기 논리적 모듈 흐름 선정부는,
상기 중요 모듈이 연속되는 선후 관계에 따라 논리적 기능 단위로서 퍼스트 모듈과 세컨드 모듈을 구분하는 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 장치.
The method according to claim 1,
Wherein the logical module flow selection unit comprises:
And a CFG for distinguishing the first module and the second module as the logical functional units according to the successive relation of the important modules.
제 2 항에 있어서,
상기 CFG 패턴 추출부는,
상기 퍼스트 모듈과 상기 세컨드 모듈 사이의 모듈들에 대한 퍼징 테스트 수행 결과에 대해 모듈별 전이 확률 분포를 계산함에 따라, 분기 모듈에서 확률이 높은 경로의 모듈을 선택하고, 높은 확률로 같이 실행되는 모듈을 하나로 합치고, 분기 모듈 중 예외처리 및 종료코드가 구현된 모듈을 생략하는 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 장치.
3. The method of claim 2,
Wherein the CFG pattern extracting unit comprises:
A transition probability distribution for each module is calculated with respect to the result of the purging test for the modules between the first module and the second module, a module having a high probability is selected from the branching module, A pattern - based software procedure change operation monitoring device using CFG that omits modules with exception handling and exit code among the branching modules.
제 2 항에 있어서,
상기 CFG 패턴 추출부는,
상기 퍼스트 모듈과 상기 세컨드 모듈 사이의 모듈들에 대한 트라이그램(trigram)으로 소정의 노드를 하나의 묶음으로 생성하는 군집화 과정을 수행하고, 모든 트라이그램에 대한 이산 확률 분포를 계산하여 상기 시퀀스 패턴을 생성하는 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 장치.
3. The method of claim 2,
Wherein the CFG pattern extracting unit comprises:
A clustering process of generating predetermined nodes in a bundle using trigrams of modules between the first module and the second module is performed and a discrete probability distribution for all trigrams is calculated to calculate the sequence pattern Pattern - based software procedure change operation monitoring using CFG generating.
제 2 항에 있어서,
상기 CFG 패턴 추출부는,
여러 소스코드 파일 상에서 상기 퍼스트 모듈과 상기 세컨드 모듈 사이의 CFG상 노드의 수를 나타내는 연결 깊이를 파악하여 상기 깊이 패컨을 생성하는 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 장치.
3. The method of claim 2,
Wherein the CFG pattern extracting unit comprises:
A pattern-based software procedure change operation monitoring apparatus using a CFG that generates depth patterns by grasping connection depths indicating the number of nodes on the CFG between the first module and the second module on various source code files.
제 2 항에 있어서,
상기 CFG 패턴 추출부는,
상기 퍼스트 모듈과 상기 세컨드 모듈에서 공통으로 사용되는 입/출력 파라미터에 대한 변경위치와 변경범위에 대한 학습을 수행하여 상기 범위-위치 패턴을 생성하는 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 장치.
3. The method of claim 2,
Wherein the CFG pattern extracting unit comprises:
And a pattern-based software procedure change operation monitoring unit that uses the CFG to generate the range-position pattern by learning about a change position and a change range of input / output parameters commonly used in the first module and the second module.
제 6 항에 있어서,
상기 파라미터는, 배열, 변수, 메모리인 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 장치.
The method according to claim 6,
The parameter is a pattern-based software procedure change operation monitoring device using an array, a variable, and a CFG that is a memory.
제 4 항에 있어서,
상기 동적 추적부는,
상기 시퀀스 패턴의 비정상도를 수정된 CFG 트라이그램의 이산 확률 분포를 따르는 정도를 측정하여 검출하는 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 장치.
5. The method of claim 4,
Wherein the dynamic tracking unit comprises:
And a pattern-based software procedure change operation monitoring unit that uses CFG to measure the degree of abnormality of the sequence pattern following the discrete probability distribution of the modified CFG trigram.
제 5 항에 있어서,
상기 동적 추적부는,
상기 깊이 패턴의 비정상도를 수정된 CFG의 모듈 간 깊이가 이산 확률 분포를 따르는 정도를 측정하여 검출하는 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 장치.
6. The method of claim 5,
Wherein the dynamic tracking unit comprises:
A pattern-based software procedure change operation monitoring apparatus using a CFG that measures the degree of abnormality of the depth pattern and measures the degree of inter-module depth of a corrected CFG following a discrete probability distribution.
제 6 항에 있어서,
상기 동적 추적부는,
상기 퍼스트 모듈과 상기 세컨드 모듈에서 공통으로 사용되는 입/출력 파라미터에 대해 입/출력 파라미터들에 대한 유효값을 확인하여 변경위치와 변경범위에 대한 조작을 탐지하는 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 장치.
The method according to claim 6,
Wherein the dynamic tracking unit comprises:
A pattern-based software procedure change using a CFG that detects validate values for input / output parameters for input / output parameters commonly used in the first module and the second module and detects an operation on a change location and a change range Motion monitoring device.
소프트웨어의 소스코드에 대한 CFG(Control Flow Graph)에서 중요 모듈이 연속되는 선후 관계에 따라 각 모듈을 구분하는 단계;
상기 구분된 각 모듈에 대한 퍼징 테스트의 퍼징 확률과 각 모듈의 전이 확률 분포에 따른 추상화를 통해 시퀀스(sequence) 패턴, 깊이(depth) 패턴, 범위-위치(range-position) 패턴을 생성 및 추출하는 단계; 및
상기 소프트웨어의 소스코드에 대한 수정을 확인함에 따라, 상기 시퀀스 패턴, 상기 깊이 패턴 및 상기 상기 범위-위치 패턴을 이용하여 상기 소프트웨어의 소스코드의 절차변경에 따른 비정상도를 측정 또는 탐지하는 단계;
를 포함하는 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 방법.
A step of classifying each module according to a sequential relation of successive important modules in a CFG (Control Flow Graph) of a software source code;
A sequence pattern, a depth pattern, and a range-position pattern are generated and abstracted through an abstraction according to the purging probability of the purging test for each of the above-identified modules and the transition probability distribution of each module step; And
Measuring or detecting an abnormality according to a procedure change of the source code of the software using the sequence pattern, the depth pattern, and the range-position pattern as confirming the modification to the source code of the software;
A method for monitoring a pattern-based software procedure change operation using a CFG.
제 11 항에 있어서,
상기 구분 단계는,
상기 중요 모듈이 연속되는 선후 관계에 따라 논리적 기능 단위로서 퍼스트 모듈과 세컨드 모듈을 구분하는 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 방법.
12. The method of claim 11,
Wherein,
A pattern-based software procedure change operation monitoring method using a CFG that distinguishes a first module and a second module as a logical functional unit according to a sequential relation of the important modules.
제 12 항에 있어서,
상기 생성 및 추출 단계는,
상기 퍼스트 모듈과 상기 세컨드 모듈 사이의 모듈들에 대한 퍼징 테스트 수행 결과에 대해 모듈별 전이 확률 분포를 계산함에 따라, 분기 모듈에서 확률이 높은 경로의 모듈을 선택하고, 높은 확률로 같이 실행되는 모듈을 하나로 합치고, 분기 모듈 중 예외처리 및 종료코드가 구현된 모듈을 생략하는 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 방법.
13. The method of claim 12,
Wherein the generating and extracting comprises:
A transition probability distribution for each module is calculated with respect to the result of the purging test for the modules between the first module and the second module, a module having a high probability is selected from the branching module, A pattern-based software procedure change operation monitoring method using a CFG that omits a module having an exception processing and an ending code implemented in a branch module.
제 12 항에 있어서,
상기 생성 및 추출 단계는,
상기 퍼스트 모듈과 상기 세컨드 모듈 사이의 모듈들에 대한 트라이그램 방식으로 소정의 노드를 하나의 묶음으로 생성하는 군집화 과정을 수행하고, 모든 트라이그램에 대한 이산 확률 분포를 계산하여 상기 시퀀스 패턴을 생성하는 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 방법.
13. The method of claim 12,
Wherein the generating and extracting comprises:
A clustering process of generating predetermined nodes in a bundle in a trigram scheme for modules between the first module and the second module is performed and a discrete probability distribution for all trigrams is calculated to generate the sequence pattern Pattern - Based Software Procedure Change Behavior Monitoring Using CFG.
제 12 항에 있어서,
상기 생성 및 추출 단계는,
여러 소스코드 파일 상에서 상기 퍼스트 모듈과 상기 세컨드 모듈 사이의 CFG상 노드의 수를 나타내는 연결 깊이를 파악하여 상기 깊이 패컨을 생성하는 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 방법.
13. The method of claim 12,
Wherein the generating and extracting comprises:
A method of monitoring a pattern-based software procedure change operation using a CFG that grasps connection depths indicating the number of nodes on the CFG between the first module and the second module on various source code files to generate the depth pattern.
제 12 항에 있어서,
상기 생성 및 추출 단계는,
상기 퍼스트 모듈과 상기 세컨드 모듈에서 공통으로 사용되는 입/출력 파라미터에 대한 변경위치와 변경범위에 대한 학습을 수행하여 상기 범위-위치 패턴을 생성하는 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 방법.
13. The method of claim 12,
Wherein the generating and extracting comprises:
Based on the pattern-based software procedure change operation using the CFG to generate the range-position pattern by learning about a change position and a change range of input / output parameters commonly used in the first module and the second module.
제 14 항에 있어서,
상기 측정 또는 탐지 단계는,
상기 시퀀스 패턴의 비정상도를 수정된 CFG 트라이그램의 이산 확률 분포를 따르는 정도를 측정하여 검출하는 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 방법.
15. The method of claim 14,
Wherein the measuring or detecting step comprises:
And a pattern-based software procedure change operation monitoring method using a CFG that measures the degree of abnormality of the sequence pattern following the discrete probability distribution of the modified CFG trigram.
제 15 항에 있어서,
상기 측정 또는 탐지 단계는,
상기 깊이 패턴의 비정상도를 수정된 CFG의 모듈 간 깊이가 이산 확률 분포를 따르는 정도를 측정하여 검출하는 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 방법.
16. The method of claim 15,
Wherein the measuring or detecting step comprises:
A method for monitoring a software procedure change operation based on a pattern using a CFG that measures the extent of inter-module depth of a modified CFG following the discrete probability distribution.
제 16 항에 있어서,
상기 측정 또는 탐지 단계는,
상기 퍼스트 모듈과 상기 세컨드 모듈에서 공통으로 사용되는 입/출력 파라미터에 대해 입/출력 파라미터들에 대한 유효값을 확인하여 변경위치와 변경범위에 대한 조작을 탐지하는 CFG를 이용한 패턴 기반의 소프트웨어 절차변경 동작 감시 방법.
17. The method of claim 16,
Wherein the measuring or detecting step comprises:
A pattern-based software procedure change using a CFG that detects validate values for input / output parameters for input / output parameters commonly used in the first module and the second module and detects an operation on a change location and a change range Motion monitoring method.
KR1020170148140A 2017-11-08 2017-11-08 Apparatus and method for detecting software procedure change operation based on pattern using control flow graph KR102392642B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020170148140A KR102392642B1 (en) 2017-11-08 2017-11-08 Apparatus and method for detecting software procedure change operation based on pattern using control flow graph

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020170148140A KR102392642B1 (en) 2017-11-08 2017-11-08 Apparatus and method for detecting software procedure change operation based on pattern using control flow graph

Publications (2)

Publication Number Publication Date
KR20190052447A true KR20190052447A (en) 2019-05-16
KR102392642B1 KR102392642B1 (en) 2022-04-29

Family

ID=66672289

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020170148140A KR102392642B1 (en) 2017-11-08 2017-11-08 Apparatus and method for detecting software procedure change operation based on pattern using control flow graph

Country Status (1)

Country Link
KR (1) KR102392642B1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006127521A (en) * 2004-10-27 2006-05-18 Lucent Technol Inc Method and apparatus for software integrity protection using timed executable agent
JP2010507165A (en) * 2006-10-19 2010-03-04 チェックマークス リミテッド Detect security vulnerabilities in source code
US7873947B1 (en) * 2005-03-17 2011-01-18 Arun Lakhotia Phylogeny generation
JP4727984B2 (en) * 2002-06-04 2011-07-20 インフィニオン テクノロジーズ アーゲー Program division system, program division method, and program division computer program product having leakage prevention
KR20120039616A (en) * 2009-06-10 2012-04-25 아브 이니티오 테크놀로지 엘엘시 Generating test data
KR101421136B1 (en) 2007-07-10 2014-07-21 더 리젠츠 오브 더 유니버시티 오브 미시건 Method and apparatus for modeling computer program behavior for behavioral detection of malicious program
KR101541603B1 (en) 2013-10-24 2015-08-03 한양대학교 산학협력단 Method and apparatus for determing plagiarism of program using control flow graph

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4727984B2 (en) * 2002-06-04 2011-07-20 インフィニオン テクノロジーズ アーゲー Program division system, program division method, and program division computer program product having leakage prevention
JP2006127521A (en) * 2004-10-27 2006-05-18 Lucent Technol Inc Method and apparatus for software integrity protection using timed executable agent
US7873947B1 (en) * 2005-03-17 2011-01-18 Arun Lakhotia Phylogeny generation
JP2010507165A (en) * 2006-10-19 2010-03-04 チェックマークス リミテッド Detect security vulnerabilities in source code
KR101421136B1 (en) 2007-07-10 2014-07-21 더 리젠츠 오브 더 유니버시티 오브 미시건 Method and apparatus for modeling computer program behavior for behavioral detection of malicious program
KR20120039616A (en) * 2009-06-10 2012-04-25 아브 이니티오 테크놀로지 엘엘시 Generating test data
KR101541603B1 (en) 2013-10-24 2015-08-03 한양대학교 산학협력단 Method and apparatus for determing plagiarism of program using control flow graph

Also Published As

Publication number Publication date
KR102392642B1 (en) 2022-04-29

Similar Documents

Publication Publication Date Title
Cheng et al. Orpheus: Enforcing cyber-physical execution semantics to defend against data-oriented attacks
Yu et al. Deescvhunter: A deep learning-based framework for smart contract vulnerability detection
US9141806B2 (en) Mining source code for violations of programming rules
Ko Execution Monitoring of security-critical programs in a distributed system: a specification-based approach
CN103262088B (en) The method and apparatus of the downgrader code in evaluate application code
CN101779210A (en) Method and apparatus for protection of a program against monitoring flow manipulation and against incorrect program running
Bromander et al. Semantic Cyberthreat Modelling.
Ding et al. VELVET: a noVel Ensemble Learning approach to automatically locate VulnErable sTatements
Xue et al. xfuzz: Machine learning guided cross-contract fuzzing
KR101640479B1 (en) Software vulnerability attack behavior analysis system based on the source code
CN111753306B (en) Intelligent contract vulnerability detection method and device, electronic equipment and storage medium
Sun et al. When gpt meets program analysis: Towards intelligent detection of smart contract logic vulnerabilities in gptscan
Lee et al. INDAGO: A new framework for detecting malicious SDN applications
Nia et al. Detecting new generations of threats using attribute‐based attack graphs
Sun et al. Gptscan: Detecting logic vulnerabilities in smart contracts by combining gpt with program analysis
Murtaza et al. Total ads: Automated software anomaly detection system
Partenza et al. Automatic identification of vulnerable code: Investigations with an ast-based neural network
CN106709335B (en) Vulnerability detection method and device
Sun et al. Dexbert: effective, task-agnostic and fine-grained representation learning of Android bytecode
CN117081818A (en) Attack transaction identification and interception method and system based on intelligent contract firewall
JP7235126B2 (en) BACKDOOR INSPECTION DEVICE, BACKDOOR INSPECTION METHOD, AND PROGRAM
Tamrawi et al. Projected control graph for computing relevant program behaviors
KR20180041386A (en) Apparatus and method for watching illegality using source code modification effect assessment
KR20190052447A (en) Apparatus and method for detecting software procedure change operation based on pattern using control flow graph
CN115310087A (en) Website backdoor detection method and system based on abstract syntax tree

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant