KR101926142B1 - Apparatus and method for analyzing programs - Google Patents

Apparatus and method for analyzing programs Download PDF

Info

Publication number
KR101926142B1
KR101926142B1 KR1020160091480A KR20160091480A KR101926142B1 KR 101926142 B1 KR101926142 B1 KR 101926142B1 KR 1020160091480 A KR1020160091480 A KR 1020160091480A KR 20160091480 A KR20160091480 A KR 20160091480A KR 101926142 B1 KR101926142 B1 KR 101926142B1
Authority
KR
South Korea
Prior art keywords
wrapper
analysis
analyzer
application
rule
Prior art date
Application number
KR1020160091480A
Other languages
Korean (ko)
Other versions
KR20180009582A (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 KR1020160091480A priority Critical patent/KR101926142B1/en
Publication of KR20180009582A publication Critical patent/KR20180009582A/en
Application granted granted Critical
Publication of KR101926142B1 publication Critical patent/KR101926142B1/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/566Dynamic detection, i.e. detection performed at run-time, e.g. emulation, suspicious activities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/567Computer malware detection or handling, e.g. anti-virus arrangements using dedicated hardware
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data

Abstract

애플리케이션에 대해 동적 분석을 수행하고 메소드 호출 그래프를 추출하는 제1 분석기, 상기 메소드 호출 그래프로부터 소스 래퍼 및 싱크 래퍼를 추출하는 래퍼 추출기, 및 상기 소스 래퍼 및 싱크 래퍼에 대한 정보를 활용해 애플리케이션의 소스 코드 분석에 적용할 분석 규칙을 확장하는 제2 분석기를 포함하는 프로그램 분석 장치가 개시된다. 본 프로그램 분석 장치에 따르면, 기존의 정적 분석을 통해서는 검출할 수 없었던 보안 취약점을 보완할 수 있다. A wrapper extractor for extracting a source wrapper and a sink wrapper from the method call graph, and a wrapper extractor for extracting a method call graph from the source wrapper and the sink wrapper, A program analyzing apparatus is disclosed that includes a second analyzer that extends analysis rules to be applied to code analysis. According to the program analyzing apparatus, it is possible to compensate for a security vulnerability that could not be detected through the conventional static analysis.

Description

프로그램 분석 장치 및 방법{APPARATUS AND METHOD FOR ANALYZING PROGRAMS}[0001] APPARATUS AND METHOD FOR ANALYZING PROGRAMS [0002]

본 발명은 프로그램 분석 장치 및 방법에 관한 것으로, 더욱 상세하게는 프로그램에 대한 동적 분석 결과를 정적 분석에 활용하는 프로그램 분석 장치 및 방법에 관한 것이다.The present invention relates to a program analyzing apparatus and method, and more particularly, to a program analyzing apparatus and method using a dynamic analysis result on a program for static analysis.

악성코드 분석 또는 취약점 분석을 위해서는 별도의 분석 프로그램을 실행시켜 그 결과 또는 그 과정을 확인한다. 이러한 악성코드 또는 취약점 분석은 크게 정적 분석과 동적 분석으로 구분될 수 있는데, 정적 분석은 프로그램 코드를 있는 그대로 분석하는 것이고, 동적 분석은 코드를 일부 실행시키거나 코드 실행 도중에 코드를 분석하는 과정을 의미한다. For malicious code analysis or vulnerability analysis, execute a separate analysis program to check the result or the process. Such malicious code or vulnerability analysis can be roughly divided into static analysis and dynamic analysis. Static analysis is the analysis of the program code as it is, and dynamic analysis is the process of executing the code partially or analyzing the code during the execution of the code do.

동적 코드 분석 기법은 메모리 관리, 스레드(thread) 버그 탐지, 힙/스택 오버런 탐지 및 프로그램 프로파일링 등 다양한 목적으로 활용되고 있다. 이러한 코드 분석 기법은 목적 및 구현 방식에 따라 에뮬레이터, 프로세스 레벨 동적 코드 분석기 등 다양한 형태로 제공되고 있다.Dynamic code analysis techniques are used for various purposes such as memory management, thread bug detection, heap / stack overrun detection, and program profiling. These code analysis methods are provided in various forms such as an emulator and a process level dynamic code analyzer depending on the purpose and implementation method.

정적 분석의 경우에는 디버깅 검출이나 가상환경 검출 등으로 분석을 방해하는 경우에는 대응할 수 있으나, 코드 변형이나 실행 압축된 경우, 암호화된 경우 등에는 보호 전 코드를 복원해야 한다. 한편, 실행압축이나 코드 변형 문제로 인해 동적 분석을 수행하는 경우에는, 코드를 실행해 복원 코드를 만들어 코드를 확인하고, 악의적 기능을 확인하거나 취약점을 분석하기 위해 추가적으로 실행하여 그 결과 및 코드를 보고 판단하게 된다.In the case of static analysis, it is possible to cope with the case of obstructing the analysis by the detection of the debugging or the virtual environment, but in the case of code modification, execution compression, encryption, etc., the pre-protection code must be restored. On the other hand, when performing dynamic analysis due to execution compression or code modification problems, execute code to create a restoration code, check the code, check malicious function or execute additional execution to analyze the vulnerability and report the result and code .

즉, 분석을 방해할 목적으로 실행 압축되었거나 암호화된 경우, 디버깅 감지 코드 등이 포함된 코드의 경우 등에는 분석을 방해하는 코드를 별도로 분석해야 하고, 소스 코드가 없이 실행 모듈이나 바이트 코드만 존재하는 경우에 대해서는 정적 분석을 수행할 수 없다. In other words, code that interferes with the analysis must be analyzed separately in the case of codes including debugging detection codes and the like in the case where execution is compressed or encrypted for the purpose of disturbing the analysis, and only the execution module or the bytecode You can not perform static analysis for cases.

이러한 기존의 정적 분석 기법은 소스(Source)에서 생성된 위험한 데이터가 싱크(Sink)로 전달되는 경우를 검출한다. 하지만, 기존의 분석 방식은 소스 혹은 싱크 API를 감싸고 있는 래퍼 API가 사용되는 경우, 해당 API 내에서 소스 혹은 싱크 API가 호출되는 정보를 알 수 없어 취약점 검출이 어렵다는 문제가 있다. This conventional static analysis technique detects the case where the dangerous data generated in the source is transmitted to the sink. However, in the existing analysis method, when the wrapper API which surrounds the source or sink API is used, there is a problem that it is difficult to detect the vulnerability because the source or sink API is not known in the API.

상기와 같은 문제점을 해결하기 위한 본 발명의 목적은, 동적 분석 결과를 정적 분석에 활용하는 프로그램 분석 장치를 제공하는 데 있다.SUMMARY OF THE INVENTION An object of the present invention is to provide a program analyzing apparatus that utilizes dynamic analysis results for static analysis.

상기와 같은 문제점을 해결하기 위한 본 발명의 다른 목적은, 동적 분석 결과를 정적 분석에 활용하는 프로그램 분석 방법을 제공하는 데 있다.Another object of the present invention is to provide a method of analyzing a program that utilizes a dynamic analysis result in static analysis.

상기 목적을 달성하기 위한 본 발명의 일 실시예에 따른 프로그램 분석 장치는, 애플리케이션에 대해 동적 분석을 수행하고 메소드 호출 그래프를 추출하는 제1 분석기, 상기 메소드 호출 그래프로부터 소스 래퍼 및 싱크 래퍼를 추출하는 래퍼 추출기, 및 상기 소스 래퍼 및 싱크 래퍼에 대한 정보를 활용해 애플리케이션의 소스 코드 분석에 적용할 분석 규칙을 확장하는 제2 분석기를 포함한다. According to an aspect of the present invention, there is provided a program analyzing apparatus including a first analyzer for performing a dynamic analysis on an application and extracting a method call graph, a source analyzing unit extracting a source wrapper and a sink wrapper from the method call graph A wrapper extractor, and a second analyzer that utilizes information about the source wrapper and the sink wrapper to extend an analysis rule to be applied to source code analysis of the application.

상기 소스 코드 분석에 적용할 분석 규칙의 바람직한 실시예는 태인트(Taint) 규칙이다. A preferred embodiment of the analysis rule to be applied to the source code analysis is a Taint rule.

상기 제2 분석기는 확장된 분석 규칙을 적용해 상기 애플리케이션으로부터 위험 데이터를 검출할 수 있다. The second analyzer may apply the extended analysis rules to detect risk data from the application.

바람직하게는, 상기 제1 분석기는 동적 분석기이고, 상기 제2 분석기는 정적 분석기이다. Advantageously, said first analyzer is a dynamic analyzer and said second analyzer is a static analyzer.

상기 제2 분석기는, 입력된 애플리케이션의 소스 코드를 분석하여 분석 정보를 생성하는 코드 분석부, 상기 소스 래퍼 및 싱크 래퍼에 대한 정보를 이용해 상기 태인트 규칙을 확장하는 태인트 규칙 확장부를 포함할 수 있다. The second analyzer may include a code analyzing unit for analyzing a source code of the input application and generating analysis information, and a text rule expanding unit for expanding the text rule using information about the source wrapper and the sync wrapper have.

상기 코드 분석부는, 상기 태인트 규칙 확장부로부터 제공되는 분석 규칙에 따라 소스 코드를 분석하고 위험 데이터를 검출할 수 있다. The code analyzing unit may analyze the source code according to an analysis rule provided from the text rule expanding unit and may detect dangerous data.

상기 목적을 달성하기 위한 본 발명의 다른 실시예에 따른 프로그램 분석 장치는, 애플리케이션에 대해 동적 분석을 수행하고 메소드 호출 그래프를 추출하는 제1 분석기, 상기 메소드 호출 그래프로부터 소스 래퍼 및 싱크 래퍼를 추출하는 서버, 및 상기 소스 래퍼 및 싱크 래퍼에 대한 정보를 활용해 애플리케이션의 소스 코드 분석에 적용할 분석 규칙을 확장하여 위험데이터를 검출하는 제2 분석기를 포함하며 상기 분석 규칙은 태인트 규칙인 것을 특징으로 한다. According to another aspect of the present invention, there is provided a program analyzing apparatus including a first analyzer for performing a dynamic analysis on an application and extracting a method call graph, a source analyzing unit extracting a source wrapper and a sink wrapper from the method call graph And a second analyzer for extracting risk data by extending an analysis rule to be applied to source code analysis of an application using information on the source wrapper and the sink wrapper, wherein the analysis rule is a taught rule do.

본 발명의 다른 목적을 달성하기 위한 본 발명의 일 실시예에 따른 프로그램 분석 방법은, 애플리케이션에 대해 동적 분석을 수행하고 메소드 호출 그래프를 추출하는 단계, 상기 메소드 호출 그래프로부터 소스 래퍼 및 싱크 래퍼를 추출하는 단계, 및 상기 소스 래퍼 및 싱크 래퍼에 대한 정보를 활용해 애플리케이션의 소스 코드 분석에 적용할 분석 규칙을 확장하는 단계를 포함한다.According to another aspect of the present invention, there is provided a method for analyzing a program, the method comprising: performing a dynamic analysis on an application and extracting a method call graph; extracting a source wrapper and a sink wrapper from the method call graph; And extending the analysis rules to be applied to source code analysis of the application utilizing the information about the source wrapper and the sink wrapper.

상기 프로그램 분석 방법은, 확장된 분석 규칙을 적용해 상기 애플리케이션으로부터 위험 데이터를 검출하는 단계를 더 포함할 수 있으며, 입력된 애플리케이션의 소스 코드를 분석하여 분석 정보를 생성하는 단계 또한 더 포함할 수 있다. The program analysis method may further include detecting risk data from the application by applying an extended analysis rule, and may further include analyzing a source code of the input application to generate analysis information .

상기와 같은 본 발명의 실시예에 따르면, 기존의 정적 분석을 통해서는 검출이 어려웠던 래퍼 API가 애플리케이션에 사용되는 경우도 추가로 검출 가능하게 됨으로써, 정적 분석 방법의 보안 취약점을 보완할 수 있다.According to the embodiment of the present invention as described above, even when the wrapper API, which has been difficult to detect through the existing static analysis, is used for the application, it is possible to further detect the security vulnerability of the static analysis method.

도 1은 본 발명의 일 실시예에 따른 프로그램 분석 장치의 블록 구성도이다.
도 2은 본 발명의 다른 실시예에 따른 프로그램 분석 장치 및 그 구성요소 간에 이루어지는 프로그램 분석 흐름을 나타낸 도면이다.
도 3은 본 발명의 일 실시예에 따른 래퍼 추출의 개념을 나타내는 개념도이다.
도 4는 본 발명의 일 실시예에 따른 정적 분석기의 상세 블록 구성도이다.
도 5는 본 발명의 일 실시예에 따른 프로그램 분석 방법의 동작 흐름도이다.
1 is a block diagram of a program analyzing apparatus according to an embodiment of the present invention.
2 is a diagram illustrating a program analysis flow between a program analysis apparatus and its components according to another embodiment of the present invention.
3 is a conceptual diagram showing the concept of wrapper extraction according to an embodiment of the present invention.
4 is a detailed block diagram of a static analyzer according to an embodiment of the present invention.
5 is a flowchart illustrating a method of analyzing a program according to an exemplary embodiment of the present invention.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다. While the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail. It should be understood, however, that the invention is not intended to be limited to the particular embodiments, but includes all modifications, equivalents, and alternatives falling within the spirit and scope of the invention. Like reference numerals are used for like elements in describing each drawing.

제1, 제2, A, B 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. "및/또는"이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다. The terms first, second, A, B, etc. may be used to describe various elements, but the elements should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, the first component may be referred to as a second component, and similarly, the second component may also be referred to as a first component. The term "and / or" includes any combination of a plurality of related listed items or any of a plurality of related listed items.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. It is to be understood that when an element is referred to as being "connected" or "connected" to another element, it may be directly connected or connected to the other element, . On the other hand, when an element is referred to as being "directly connected" or "directly connected" to another element, it should be understood that there are no other elements in between.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used in this application is used only to describe a specific embodiment and is not intended to limit the invention. The singular expressions include plural expressions unless the context clearly dictates otherwise. In the present application, the terms "comprises" or "having" and the like are used to specify that there is a feature, a number, a step, an operation, an element, a component or a combination thereof described in the specification, But do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, or combinations thereof.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥 상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in commonly used dictionaries are to be interpreted as having a meaning consistent with the contextual meaning of the related art and are to be interpreted as either ideal or overly formal in the sense of the present application Do not.

이하, 본 발명에 따른 바람직한 실시예를 첨부된 도면을 참조하여 상세하게 설명한다. Hereinafter, preferred embodiments according to the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명의 일 실시예에 따른 프로그램 분석 장치의 블록 구성도이다. 1 is a block diagram of a program analyzing apparatus according to an embodiment of the present invention.

도 1에 도시된 바와 같이 본 발명의 일 실시예에 따른 프로그램 분석 장치는 동적 분석기(100), 서버(200), 정적 분석기(300)를 포함하여 구성될 수 있다. As shown in FIG. 1, the program analyzing apparatus according to an embodiment of the present invention may include a dynamic analyzer 100, a server 200, and a static analyzer 300.

동적 분석기(100)는 동작중인 분석 대상 프로그램에 영향을 미치지 않으면서 분석 대상 프로그램의 실행을 추적하고 디버깅하거나 프로파일링할 수 있는 분석 기법을 활용해 프로그램을 분석한다. 본 발명에 따른 동적 분석기(100)는 이러한 프로그램의 동적 분석 과정에서 도출되는 메소드 호출 그래프를 서버(200)로 제공한다.The dynamic analyzer 100 analyzes the program using an analysis technique that can track, debug, or profile the execution of the analyzed program without affecting the program being analyzed. The dynamic analyzer 100 according to the present invention provides a method call graph derived from the dynamic analysis of such a program to the server 200.

서버(200)는 동적 분석기(100) 및 정적 분석기(300)를 중개하며, 동적 분석기(100)로부터 수신한 메소드 호출 그래프로부터 래퍼 정보를 추출한다. 서버(200)는 또한, 정적 분석기(300)로부터 래퍼 정보 요청이 있는 경우 래퍼 정보를 정적 분석기(300)로 제공한다. The server 200 mediates the dynamic analyzer 100 and the static analyzer 300 and extracts the wrapper information from the method call graph received from the dynamic analyzer 100. The server 200 also provides wrapper information to the static analyzer 300 when there is a wrapper information request from the static analyzer 300.

정적 분석기(300)는 정적 프로그램 분석(Static Code Analysis)을 이용해 컴퓨터 소프트웨어를 분석한다. 정적 분석은 소프트웨어를 직접 실행하지 않고 개발중인 소프트웨어의 소스 코드를 대상으로 분석을 수행한다. Static analyzer 300 analyzes the computer software using Static Code Analysis. Static analysis performs analysis on the source code of the software being developed without directly executing the software.

여기서, 정적 분석은 정적 프로그램 분석을 사람의 손이 아닌 소프트웨어를 이용하여 자동적으로 수행하도록 개발된 프로그램이다. 일반적으로 소스 코드의 크기는 매우 방대하며, 사람의 손으로 일일이 정적 프로그램 분석을 수행하는 것은 거의 불가능하므로 이러한 분석을 자동화하여 수행하도록 도와준다. 정적 분석 도구는 종류에 따라 소스 코드에서 다양한 종류의 결함이나 취약점을 검출할 수 있으며, 분석을 통해 검출된 결함을 사용자에게 제공한다.Here, static analysis is a program developed to automatically perform static program analysis using software rather than human hands. Generally, the size of the source code is very large, and it is almost impossible to perform static program analysis with the human hand. Static analysis tools can detect various kinds of defects or vulnerabilities in the source code according to the type, and provide detected defects to users through analysis.

정적 분석기(300)에 의해 수행되는 분석에 따르면 래퍼 API(Application Program Interface)가 사용된 프로그램에 대해 위험 데이터 검출이 어렵다. 따라서, 본 발명에 따른 정적 분석기(300)는 서버(200)로부터 수신한 정보를 이용하여 정적 분석 기법을 변형시켜 분석을 수행한다. According to the analysis performed by the static analyzer 300, it is difficult to detect dangerous data for a program using a wrapper API (Application Program Interface). Therefore, the static analyzer 300 according to the present invention performs analysis by modifying the static analysis technique using the information received from the server 200. FIG.

여기서, API는 응용 프로그램이 운영체제나 데이터베이스 관리 시스템과 같은 시스템 프로그램과 통신할 때 사용되는 언어나 메시지 형식을 가지며, 프로그램 내에서 실행을 위해 특정 서브루틴에 연결을 제공하는 함수를 호출하는 것으로 구현된다. 그러므로 하나의 API는 함수의 호출에 의해 요청되는 작업을 수행하기 위해 이미 존재하거나 또는 연결되어야 하는 몇 개의 프로그램 모듈이나 루틴을 가진다. Here, an API is implemented by calling a function that has a language or message format used when an application communicates with a system program, such as an operating system or a database management system, and provides a connection to a particular subroutine for execution within the program . Therefore, an API has several program modules or routines that already exist or must be connected to perform the task requested by the function call.

도 2은 본 발명의 다른 실시예에 따른 프로그램 분석 장치 및 그 구성요소 간에 이루어지는 프로그램 분석 흐름을 나타낸 도면이다. 2 is a diagram illustrating a program analysis flow between a program analysis apparatus and its components according to another embodiment of the present invention.

도 2에 도시된 바와 같이 본 발명의 다른 실시예에 따른 프로그램 분석 장치는 제1 분석기(100), 서버(200), 제2 분석기(300)를 포함하여 구성될 수 있다. As shown in FIG. 2, the program analyzing apparatus according to another embodiment of the present invention may include a first analyzer 100, a server 200, and a second analyzer 300.

제 1 분석기(100)는 실행 중인 애플리케이션을 분석하여 메소드 호출 그래프를 생성한다. The first analyzer 100 analyzes the running application and generates a method call graph.

제1 분석기(100)의 바람직한 실시예로는 동적 분석기를 들 수 있겠으나 본 발명에 따른 제1 분석기(100)의 형태가 동적 분석기로 한정되는 것은 아니다. 제1 분석기(100)는 동적 분석을 수행하는 도중 웹 애플리케이션에서 메소드 호출 정보를 수집하여 호출 그래프 형태의 정보를 생성한다.A preferred embodiment of the first analyzer 100 is a dynamic analyzer, but the form of the first analyzer 100 according to the present invention is not limited to a dynamic analyzer. The first analyzer 100 collects method call information from the web application during dynamic analysis, and generates information in the form of a call graph.

애플리케이션은 그 프로그램의 수행에 필요한 여러가지 함수/메소드들을 포함하는데, 그 중 분석하고자 하는 함수/메소드가 있으면, 이 함수/메소드는 여러가지 명령어(instruction)들로 구성되어 있다. 함수/메소드 실행시에, 이들 명령어들을 일정한 갯수씩 묶은 페이지 단위로 시스템 메모리로 로딩되어 함수가 실행된다. 즉, 먼저 제1페이지를 시스템 메모리에 로딩하여 실행한 후, 다음 페이지인 제2페이지를 시스템 메모리에 로딩하여 실행하는 방식으로 함수/메소드가 실행된다.The application contains various functions / methods needed to execute the program. If there is a function / method to analyze, the function / method consists of various instructions. When a function / method is executed, the function is loaded into the system memory in units of pages grouped by a certain number of these instructions. That is, the function / method is executed in such a manner that the first page is first loaded into the system memory and executed, and then the second page, which is the next page, is loaded into the system memory and executed.

이렇듯 애플리케이션이 실행되는 동안 애플리케이션의 프로파일링을 위하여 이용되는 개요를 나타내기 위해 메소드 호출 그래프가 사용된다. 프로파일링은 애플리케이션의 동작을 이해하고 애플리케이션 및 애플리케이션들의 소스들에서의 오류를 검출하고, 애플리케이션의 성능을 분석하는 데 필요하다. The method call graph is used to indicate the outline used to profile the application while the application is running. Profiling is required to understand the behavior of an application and to detect errors in the applications and their sources, and to analyze the performance of the application.

메소드 호출 그래프는 메소드 간의 호출 관계를 표현한 그래프이다. 각 메소드들은 하나의 노드(Node)로 표현되고, 메소드 A가 메소드 B를 호출하는 코드를 갖고 있을 때 B에서 A 방향으로 연결된 엣지(Edge)를 생성함으로써 방향성을 갖는 그래프가 생성된다. The method call graph is a graph representing the call relations between methods. Each method is represented by a single node. When method A has code that calls method B, a directional graph is created by creating an edge connected in direction A in B.

제1 분석기(100)에 의해 생성된 메소드 호출 그래프는 서버(200)로 전달되며, 서버(200)는 사전에 등록된 소스 및 싱크 API 정보를 이용하여 래퍼를 추출한다.The method call graph generated by the first analyzer 100 is transmitted to the server 200. The server 200 extracts the wrapper using the previously registered source and sink API information.

본 발명의 일 실시예에 따른 서버(200)는 래퍼 추출부(210)를 포함한다. 래퍼 추출부(210)는 제공된 소스 및 싱크 API정보를 이용해 메소드 호출 그래프를 분석하여 소스 API 또는 싱크 API를 감싸고 있는 래퍼에 대한 정보를 추출한다. The server 200 according to an embodiment of the present invention includes a wrapper extracting unit 210. The wrapper extracting unit 210 analyzes the method call graph using the provided source and sink API information to extract information about a wrapper surrounding the source API or the sink API.

한편, 도 2에 도시된 본 발명의 실시예에서는 래퍼 추출부(210)가 서버(200) 내에 포함된 것으로 도시되어 있으나, 래퍼 추출부(210)가 제1 분석기(100) 또는 제2 분석기(300) 내에 위치하도록 구성될 수 있으며 이 경우 본 발명에 따른 프로그램 분석 장치는 별도의 서버를 필요로 하지 않을 수 있다.2, the wrapper extracting unit 210 is included in the server 200. However, when the wrapper extracting unit 210 extracts the wrapper from the first analyzer 100 or the second analyzer 100, 300, and in this case, the program analyzing apparatus according to the present invention may not require a separate server.

래퍼 추출부(210)에 의해 추출된 래퍼 정보는 제2 분석기(300)로 전달되며, 제2 분석기(300)는 래퍼 정보를 이용하여 기존의 태인트 규칙을 확장한다. The wrapper information extracted by the wrapper extracting unit 210 is transmitted to the second analyzer 300, and the second analyzer 300 expands the existing tag rule using the wrapper information.

제2 분석기(300)의 바람직한 실시예로는 정적 분석기를 들 수 있겠으나 본 발명에 따른 제2 분석기(300)의 형태가 정적 분석기로 한정되는 것은 아니다. A preferred embodiment of the second analyzer 300 is a static analyzer, but the form of the second analyzer 300 according to the present invention is not limited to a static analyzer.

제2 분석기(300)는 정적 프로그램 분석(Static Code Analysis)을 이용해 컴퓨터 소프트웨어를 분석한다. 정적 분석은 소프트웨어를 직접 실행하지 않고 개발중인 소프트웨어의 소스 코드를 대상으로 분석을 수행한다.The second analyzer 300 analyzes the computer software using Static Code Analysis. Static analysis performs analysis on the source code of the software being developed without directly executing the software.

정적 분석 도구(Static Analysis Tool)는 정적 프로그램 분석을 사람의 손이 아닌 소프트웨어를 이용하여 자동적으로 수행하도록 개발된 프로그램이다. 일반적으로 소스 코드의 크기는 매우 방대하며, 사람의 손으로 일일이 정적 프로그램 분석을 수행하는 것은 거의 불가능하므로 이러한 분석을 자동화하여 수행하도록 도와준다. 정적 분석 도구는 종류에 따라 소스 코드에서 다양한 종류의 결함이나 취약점을 검출할 수 있으며, 분석을 통해 검출된 결함을 사용자에게 제공한다.Static Analysis Tool (Static Analysis Tool) is a program developed to automatically perform static program analysis using software rather than human hands. Generally, the size of the source code is very large, and it is almost impossible to perform static program analysis with the human hand. Static analysis tools can detect various kinds of defects or vulnerabilities in the source code according to the type, and provide detected defects to users through analysis.

도 3은 본 발명의 일 실시예에 따른 래퍼 추출의 개념을 나타내는 개념도이다. 3 is a conceptual diagram showing the concept of wrapper extraction according to an embodiment of the present invention.

도 3에서는 메소드 호출 그래프(40)의 형태를 확인할 수 있다. 도 3에 나타낸 바와 같이 각 메소드들은 하나의 노드(Node)로 표현되어 있으며, 메소드 A가 메소드 B를 호출하는 코드를 갖고 있을 때 B에서 A 방향으로 연결된 엣지(Edge)로 그 방향성이 표시되어 있다. In FIG. 3, the type of the method call graph 40 can be confirmed. As shown in FIG. 3, each of the methods is represented by one node. When the method A has a code for calling the method B, the direction is displayed at an edge connected to the direction A in the direction B .

래퍼는 래퍼 형식에 해당하는 원시 형식의 인스턴스 변수가 들어있는 객체로 정의할 수 있으며, 연결관계를 활용하여 메소드를 한 겹 더 래핑한 형태라고 할 수 있다.A wrapper can be defined as an object that contains an instance variable of a primitive type corresponding to a wrapper type, and it can be said that the method is wrapped one layer by using the connection relation.

즉, 도 3에 도시된 바와 같이 싱크 래퍼로부터 래퍼를 벗겨내면 싱크 메소드를 얻을 수 있으며 그 과정에서 싱크 래퍼에 대한 정보를 정보를 획득할 수 있다. 마찬가지로, 소스 래퍼로부터 래퍼를 벗겨내면 소스 메소드를 얻을 수 있으며, 그 과정에서 소스 래퍼에 대한 정보를 획득 가능하게 된다.That is, if the wrapper is peeled off from the sync wrapper as shown in FIG. 3, the sync method can be obtained, and information on the sync wrapper can be obtained in the process. Similarly, if the wrapper is stripped from the source wrapper, the source method can be obtained, and information on the source wrapper can be obtained in the process.

도 4는 본 발명의 일 실시예에 따른 정적 분석기의 상세 블록 구성도이다. 4 is a detailed block diagram of a static analyzer according to an embodiment of the present invention.

본 발명의 일 실시예에 따른 정적 분석기(300)는 애플리케이션 내에 포함된 싱크에 대한 정보를 도출하며, 프로그램 정보, 즉 프로그램 소스코드(혹은 실행 코드)를 입력받아 정적 분석 정보를 생성한다.The static analyzer 300 according to an exemplary embodiment of the present invention derives information about the sink included in the application, and receives the program information, that is, the program source code (or execution code), and generates static analysis information.

본 발명의 일 실시예에 따른 정적 분석기(300)는 코드 분석부(310), 래퍼정보 요청부(320), 래퍼정보 수신부(330), 및 태인트 규칙 확장부(340)를 포함하여 구성될 수 있다. The static analyzer 300 according to an exemplary embodiment of the present invention includes a code analyzer 310, a wrapper information requestor 320, a wrapper information receiver 330, and a taste rule extender 340 .

도 4의 실시예는 래퍼정보 추출이 서버(200)에 의해 이루어지는 경우를 도시하고 있으며, 앞서 설명한 바와 같이 래퍼 추출은 제1 분석기(100) 또는 제2 분석기(300)에 의해 수행될 수 있다.The embodiment of FIG. 4 shows a case where the wrapper information extraction is performed by the server 200, and the wrapper extraction may be performed by the first analyzer 100 or the second analyzer 300 as described above.

코드 분석부(310)는 입력된 애플리케이션의 소스 코드를 분석하여 분석 정보를 생성한다. 여기서, 분석 정보는 소스코드를 분석하여 도출되는 애플리케이션의 동작 흐름 그래프(Control Flow Graph), 사용되는 변수정보, 이벤트 정보, 권한 관련 설정 정보 등을 포함한다. 분석정보는 정보 도출 및 전송에 관련된 권한 목록 등을 포함한다. The code analysis unit 310 analyzes the source code of the input application and generates analysis information. Here, the analysis information includes a control flow graph of an application derived by analyzing the source code, variable information to be used, event information, permission-related setting information, and the like. The analysis information includes a list of rights related to information derivation and transmission.

코드 분석부(310)는 해당 애플리케이션이 래퍼 API를 사용하는 것으로 판단한 경우, 래퍼정보 요청부(320)로 이를 통지한다. When determining that the application uses the wrapper API, the code analyzer 310 notifies the wrapper information requesting unit 320 of the use of the wrapper API.

래퍼정보 요청부(320)는 코드 분석부(310)의 통지를 수신하여 애플리케이션과 관련한 래퍼 정보, 즉 소스 래퍼 및 싱크 정보를 서버(200)로 요청한다.The wrapper information requesting unit 320 receives the notification from the code analyzing unit 310 and requests the server 200 for wrapper information related to the application, that is, source wrapper and sink information.

래퍼정보 수신부(330)는 서버(200)에 의해 추출된 소스 래퍼 및 싱크 래퍼 정보를 수신한다.The wrapper information receiving unit 330 receives the source wrapper and the sink wrapper information extracted by the server 200.

태인트 규칙 확장부(340)는 래퍼정보 수신부(330)를 통해 전달 받은 소스 래퍼 및 싱크 래퍼를 이용하여 태인트 규칙을 확장한다. 태인트 분석은 정보 플로우 분석 기법으로, 예를 들어, 실행되는 동안 프로그램에 의해 조작된 데이터의 각 바이트의 소스를 추적하고 신뢰할 없는, 즉 오염된 데이터로 포인터를 덮어쓰는 공격을 감지한다.The text rule extension unit 340 expands the text rule using the source wrapper and the sync wrapper that are received through the wrapper information receiving unit 330. Taunt analysis is an information flow analysis technique that, for example, tracks the source of each byte of data manipulated by the program during execution and detects an attack that overwrites the pointer with untrusted, contaminating data.

태인트 규칙 확장부(340)를 통해 확장된 태인트 규칙은 다시 코드 분석부(310)로 제공되며, 코드 분석부(310)에서는 확장된 태인트 규칙을 활용해 래퍼 API가 사용된 애플리케이션의 소스 코드에 대해 정적 분석을 수행한다.The text rule extended through the text rule extension unit 340 is provided to the code analysis unit 310. The code analysis unit 310 uses the extended text rule to determine the source of the application in which the wrapper API is used Perform static analysis on your code.

본 발명에 따른 코드 분석부(310)는 또한, 구문 분석, 결함 검출, 수정예시 생성, 분석결과 전달의 기능을 수행할 수 있다. 구체적으로, 코드 분석부(310)는 구문 분석 기능을 통해 입력받은 소스 코드로부터 분석에 필요한 각종 정보들을 추출하고 정제한다. 여기서, 분석에 필요한 정보는, 예를 들어, 추상 구문 트리나 소스 코드의 라인 수, 위치 정보 등이 될 수 있다. The code analyzer 310 according to the present invention can also perform functions of syntax analysis, defect detection, generation of modification examples, and transmission of analysis results. Specifically, the code analyzer 310 extracts and refines various information necessary for analysis from the input source code through the syntax analysis function. Here, the information necessary for analysis may be, for example, an abstract syntax tree or the number of lines of source code, position information, and the like.

코드 분석부(310)는 또한, 구문 분석을 통해 정제된, 분석에 필요한 정보들을 토대로 소스 코드에서 문제가 될 수 있는 결함 정보를 검출한다. 결함 정보는 예를 들어, 결함이 실제 발생한 소스 코드의 파일명, 라인과 같은 위치 정보와 결함의 종류, 실제 결함의 원인이 된 부분, 결함이 발생하게 된 소스 코드의 흐름과 같은 실제 결함 정보 등으로 구성될 수 있다. The code analyzer 310 also detects defect information that may be a problem in the source code based on the information necessary for analysis, which is refined through syntax analysis. The defect information includes, for example, a file name of a source code in which a defect actually occurs, position information such as a line and a kind of defect, a part causing actual defect, and actual defect information such as a flow of a source code in which a defect occurs Lt; / RTI >

도 5는 본 발명의 일 실시예에 따른 프로그램 분석 방법의 동작 흐름도이다.5 is a flowchart illustrating a method of analyzing a program according to an exemplary embodiment of the present invention.

본 발명의 일 실시예에 따른 프로그램 분석 방법은 동적 분석 결과를 정적 분석에 활용하는 분석 방법으로, 크게 제1 분석기(100) 및 제2 분석기(300)를 그 동작 주체로 하여 수행될 수 있다. The program analysis method according to an embodiment of the present invention is an analysis method that utilizes the dynamic analysis result for static analysis and can be largely performed by using the first analyzer 100 and the second analyzer 300 as its operation main body.

제1 분석기의 바람직한 실시예로는 동적 분석기를 들 수 있으며, 제2 분석기의 바람직한 실시예로는 정적 분석기를 들 수 있다. A preferred embodiment of the first analyzer is a dynamic analyzer, and a preferred embodiment of the second analyzer is a static analyzer.

또한, 도 5의 실시예는 래퍼정보 추출이 제1 분석기(100)에 의해 이루어지는 경우의 실시예를 설명하며, 앞서 설명한 바와 같이 래퍼 추출은 서버(200)에 의해 수행될 수도 있고 제2 분석기(300) 에 의해 수행될 수도 있다.5 also illustrates an embodiment in which the wrapper information extraction is performed by the first analyzer 100. As described above, the wrapper extraction may be performed by the server 200 and the second analyzer 300). ≪ / RTI >

본 발명에 따른 프로그램 분석 방법에서는 애플리케이션의 소스 코드에 대한 정적 분석 수행 단계(S5101), 그리고 애플리케이션에 대한 동적 분석 수행 단계(S5201)와 메소드 호출 그래프 획득 단계(S5202)가 선행된다. In the program analysis method according to the present invention, a static analysis execution step (S5101) on the source code of the application, a dynamic analysis execution step (S5201), and a method call graph acquisition step (S5202) are preceded.

S5101단계, 그리고 S5201 및 S5202 단계 간에는 선후가 정해질 필요가 없으나, 제2 분석기(300)에 의해 래퍼 정보가 요청되기 전 S5201 및 S5202 단계가 완료되는 것이 바람직하다.It is preferable that S5201 and S5202 are completed before the wrapper information is requested by the second analyzer 300, although it is not necessary to determine the next between S5201 and S5201 and S5201 and S5202.

제2 분석기(300)로부터 래퍼 정보를 요청 받은 제1 분석기(100)는 메소드 호출 그래프로부터 래퍼 정보를 추출하여 회신한다(S5203, S5210). 도 5에서는 메소드 호출 그래프로부터 래퍼 정보를 추출하는 단계(S5203)가 제1 분석기(100)에 의해 수행되는 것으로 도시되었으나, 앞서 본 발명의 일 실시예를 통해 살펴본 바와 같이 래퍼 정보의 추출은 별도의 서버에 의해 구현될 수 있다. The first analyzer 100 receiving the wrapper information from the second analyzer 300 extracts the wrapper information from the method call graph and returns it (S5203, S5210). Although FIG. 5 shows that the step of extracting wrapper information from the method call graph (S5203) is performed by the first analyzer 100, as described above with reference to the embodiment of the present invention, It can be implemented by the server.

또한, 도 5의 S5120 및 S5203 단계를 통해 나타난 바와 같이 래퍼 정보를 요청받아 래퍼 정보를 추출할 수도 있지만, 제1 분석기 및 서버에 의해 미리 래퍼 정보가 추출, 준비되어 있다가 제2 분석기로부터 요청이 있는 경우 곧바로 래퍼 정보를 전달하는 동작 흐름 또한 가능하다 할 것이다. 즉, S5120 단계가 S5203 단계 이후에 수행되는 것 또한 가능하다. Also, the wrapper information may be extracted by requesting the wrapper information as shown in steps S5120 and S5203 of FIG. 5. However, if the wrapper information is extracted and prepared in advance by the first analyzer and the server, If there is, the flow of operation to transmit wrapper information is also possible. That is, it is also possible that the step S5120 is performed after the step S5203.

제2 분석기(300)가 래퍼 정보를 수신하면(S5102), 이를 활용해 태인트 규칙을 확장하고(S5103), 확장 태인트 규칙을 활용해 위험 데이터를 검출한다(S5104).When the second analyzer 300 receives the wrapper information (S5102), the second rule analyzer 300 expands the text rule using the extracted text rule (S5103), and detects the danger data using the extended text rule (S5104).

살펴본 바와 같이 본 발명에 따른 프로그램 분석 방법은, 애플리케이션에 대해 동적 분석을 수행하여 메소드 호출 그래프를 추출하며, 추출된 메소드 호출 그래프로부터 소스 래퍼 및 싱크 래퍼를 추출하고, 소스 래퍼 및 싱크 래퍼에 대한 정보를 활용해 애플리케이션의 소스 코드 분석에 적용할 분석 규칙을 확장하여 정적 분석에 적용함으로써, 기존의 정적 분석을 통해서는 검출이 어려웠던 래퍼 API가 사용되는 경우 또한 검출할 수 있다는 장점을 가진다. As described above, the program analyzing method according to the present invention includes: analyzing an application to extract a method call graph, extracting a source wrapper and a sink wrapper from the extracted method call graph, and analyzing information about a source wrapper and a sink wrapper It is possible to detect the case where the wrapper API, which is difficult to detect through the existing static analysis, is used by applying the analysis rule applied to the source code analysis of the application to the static analysis.

본 발명의 실시예에 따른 프로그램 분석 방법의 동작은 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 프로그램 또는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의해 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어 분산방식으로 컴퓨터로 읽을 수 있는 프로그램 또는 코드가 저장되고 실행될 수 있다. The operation of the program analysis method according to the embodiment of the present invention can be implemented as a computer-readable program or code on a computer-readable recording medium. A computer-readable recording medium includes all kinds of recording apparatuses in which data that can be read by a computer system is stored. The computer-readable recording medium may also be distributed and distributed in a networked computer system so that a computer-readable program or code can be stored and executed in a distributed manner.

또한, 컴퓨터가 읽을 수 있는 기록매체는 롬(rom), 램(ram), 플래시 메모리(flash memory) 등과 같이 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치를 포함할 수 있다. 프로그램 명령은 컴파일러(compiler)에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터(interpreter) 등을 사용해서 컴퓨터에 의해 실행될 수 있는 고급 언어 코드를 포함할 수 있다.Also, the computer-readable recording medium may include a hardware device specially configured to store and execute program instructions, such as a ROM, a RAM, a flash memory, and the like. Program instructions may include machine language code such as those produced by a compiler, as well as high-level language code that may be executed by a computer using an interpreter or the like.

상기에서는 본 발명의 바람직한 실시예를 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다. It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit or scope of the present invention as defined by the following claims It can be understood that

100: 제1 분석기, 동적 분석기 200: 서버
210: 래퍼 추출부 300: 제2 분석기, 정적 분석기
310: 코드 분석부 320: 래퍼정보 요청부
330: 래퍼정보 수신부 340: 태인트 규칙 확장부
40: 메소드 호출 그래프
100: first analyzer, dynamic analyzer 200: server
210: Wrapper extraction unit 300: Second analyzer, static analyzer
310: Code analysis unit 320: Wrapper information request unit
330: Wrapper information receiving unit 340:
40: Method call graph

Claims (12)

애플리케이션에 대해 동적 분석을 수행하고 메소드 호출 그래프를 추출하는 제1 분석기;
상기 메소드 호출 그래프로부터 소스 래퍼 및 싱크 래퍼에 대한 정보를 추출하는 래퍼 추출기; 및
상기 소스 래퍼 및 싱크 래퍼에 대한 정보를 활용해 애플리케이션의 소스 코드 분석에 적용할 분석 규칙을 확장하는 제2 분석기를 포함하고,
상기 제2 분석기는,
입력된 애플리케이션의 소스 코드를 분석하여 분석 정보를 생성하고, 상기 분석 정보에 기초하여 래퍼 API(Application Program Interface)를 사용한 애플리케이션이 존재하는지 판단하는 코드 분석부; 및
상기 래퍼 API를 사용한 애플리케이션이 존재하는 경우, 상기 소스 래퍼 및 싱크 래퍼에 대한 정보를 이용해 태인트 규칙을 확장하는 태인트 규칙 확장부를 포함하고,
상기 코드 분석부는, 상기 태인트 규칙 확장부로부터 제공되는 확장된 태인트 규칙에 따라 상기 래퍼 API를 사용한 애플리케이션의 소스 코드에 대해 정적 분석을 수행하여 위험 데이터를 검출하는, 프로그램 분석 장치.
A first analyzer for performing dynamic analysis for the application and extracting a method call graph;
A wrapper extractor for extracting information about a source wrapper and a sink wrapper from the method call graph; And
And a second analyzer that utilizes information about the source wrapper and the sink wrapper to extend an analysis rule to be applied to source code analysis of the application,
Wherein the second analyzer comprises:
A code analyzer for analyzing a source code of an input application to generate analysis information and determining whether an application using a wrapper API (Application Program Interface) exists based on the analysis information; And
And a text rule expanding unit for expanding the text rule using information about the source wrapper and the sync wrapper when an application using the wrapper API exists,
Wherein the code analyzing unit performs a static analysis on the source code of the application using the wrapper API according to the extended text rule provided from the text rule extending unit to detect the dangerous data.
청구항 1에 있어서,
상기 소스 코드 분석에 적용할 분석 규칙은 태인트(Taint) 규칙인, 프로그램 분석 장치.
The method according to claim 1,
Wherein the analysis rule to be applied to the source code analysis is a Taint rule.
청구항 1에 있어서,
상기 제2 분석기는 확장된 분석 규칙을 적용해 상기 애플리케이션으로부터 위험 데이터를 검출하는, 프로그램 분석 장치.
The method according to claim 1,
And the second analyzer applies the extended analysis rules to detect risk data from the application.
청구항 1에 있어서,
상기 제1 분석기는 동적 분석기인, 프로그램 분석 장치.
The method according to claim 1,
Wherein the first analyzer is a dynamic analyzer.
청구항 1에 있어서,
상기 제2 분석기는 정적 분석기인, 프로그램 분석 장치.
The method according to claim 1,
Wherein the second analyzer is a static analyzer.
삭제delete 청구항 1에 있어서,
상기 코드 분석부는,
외부의 입력 값에 의해서 유발되는 공격을 검출하는 테인트 규칙을 상기 태인트 규칙 확장부에 추가하여 소스 코드를 분석하고 위험 데이터를 검출하는, 프로그램 분석 장치.
The method according to claim 1,
The code analyzing unit,
And adding a taint rule for detecting an attack caused by an external input value to the text rule extending unit to analyze the source code and detect the dangerous data.
애플리케이션에 대해 동적 분석을 수행하고 메소드 호출 그래프를 추출하는 단계;
상기 메소드 호출 그래프로부터 소스 래퍼 및 싱크 래퍼를 추출하는 단계;
입력된 애플리케이션의 소스 코드를 분석하여 분석 정보를 생성하고, 상기 분석 정보에 기초하여 래퍼 API(Application Program Interface)를 사용한 애플리케이션이 존재하는지 판단하는 단계;
기 래퍼 API를 사용한 애플리케이션이 존재하는 경우, 상기 소스 래퍼 및 싱크 래퍼에 대한 정보를 활용해 애플리케이션의 소스 코드 분석에 적용할 분석 규칙을 확장하는 단계; 및
상기 확장된 태인트 규칙에 따라 상기 래퍼 API를 사용한 애플리케이션의 소스 코드에 대해 정적 분석을 수행하여 위험 데이터를 검출하는 단계;를 포함하는, 프로그램 분석 방법.
Performing dynamic analysis on an application and extracting a method call graph;
Extracting a source wrapper and a sink wrapper from the method call graph;
Analyzing the source code of the input application to generate analysis information, and determining whether an application using a wrapper API (Application Program Interface) exists based on the analysis information;
Extending an analysis rule to be applied to source code analysis of an application utilizing information on the source wrapper and the sink wrapper when an application using the wrapper API exists; And
And performing a static analysis on the source code of the application using the wrapper API according to the extended text rule to detect the dangerous data.
청구항 8에 있어서,
상기 소스 코드 분석에 적용할 분석 규칙은 태인트(Taint) 규칙인, 프로그램 분석 방법.
The method of claim 8,
Wherein the analysis rule to be applied to the source code analysis is a Taint rule.
청구항 8에 있어서,
상기 위험 데이터를 검출하는 단계에서,
외부의 입력 값에 의해서 유발되는 공격을 검출하는 테인트 규칙을 태인트 규칙 확장부에 추가하여 소스 코드를 분석하고 위험 데이터를 검출하는, 프로그램 분석 방법.
The method of claim 8,
In the step of detecting the risk data,
A program analyzing method for analyzing a source code and detecting dangerous data by adding a taint rule for detecting an attack caused by an external input value to a taint rule extension unit.
삭제delete 삭제delete
KR1020160091480A 2016-07-19 2016-07-19 Apparatus and method for analyzing programs KR101926142B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020160091480A KR101926142B1 (en) 2016-07-19 2016-07-19 Apparatus and method for analyzing programs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020160091480A KR101926142B1 (en) 2016-07-19 2016-07-19 Apparatus and method for analyzing programs

Publications (2)

Publication Number Publication Date
KR20180009582A KR20180009582A (en) 2018-01-29
KR101926142B1 true KR101926142B1 (en) 2018-12-07

Family

ID=61028286

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020160091480A KR101926142B1 (en) 2016-07-19 2016-07-19 Apparatus and method for analyzing programs

Country Status (1)

Country Link
KR (1) KR101926142B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102314829B1 (en) 2021-01-29 2021-10-18 숭실대학교산학협력단 Method for evaluating risk of data leakage in application, recording medium and device for performing the method
US11928220B2 (en) 2021-01-29 2024-03-12 Foundation Of Soongsil University-Industry Cooperation Method for evaluating risk of data leakage in application, recording medium and device for performing the method

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102217092B1 (en) * 2019-04-22 2021-02-19 주식회사 폴소프트 Method and apparatus for providing quality information of application
KR102416292B1 (en) 2021-01-29 2022-07-01 숭실대학교 산학협력단 Dynamic analysis method for android applications, recording medium and device for performing the method
KR102519639B1 (en) * 2021-06-30 2023-04-06 삼성에스디에스 주식회사 Method for providing code inspection interface, and apparatus implementing the same method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102314829B1 (en) 2021-01-29 2021-10-18 숭실대학교산학협력단 Method for evaluating risk of data leakage in application, recording medium and device for performing the method
US11928220B2 (en) 2021-01-29 2024-03-12 Foundation Of Soongsil University-Industry Cooperation Method for evaluating risk of data leakage in application, recording medium and device for performing the method

Also Published As

Publication number Publication date
KR20180009582A (en) 2018-01-29

Similar Documents

Publication Publication Date Title
KR101926142B1 (en) Apparatus and method for analyzing programs
US10878086B2 (en) Dynamic code extraction-based automatic anti analysis evasion and code logic analysis apparatus
Bergeron et al. Static analysis of binary code to isolate malicious behaviors
KR102415971B1 (en) Apparatus and Method for Recognizing Vicious Mobile App
US20170316202A1 (en) Rasp for scripting languages
KR101886203B1 (en) Apparatus and method for analyzing programs
KR101861341B1 (en) Deobfuscation apparatus of application code and method of deobfuscating application code using the same
US20150302191A1 (en) Program execution apparatus and program analysis apparatus
TWI541669B (en) Detection systems and methods for static detection applications, and computer program products
US11019096B2 (en) Combining apparatus, combining method, and combining program
CN109101815B (en) Malicious software detection method and related equipment
KR102317833B1 (en) method for machine LEARNING of MALWARE DETECTING MODEL AND METHOD FOR detecting Malware USING THE SAME
US10073973B2 (en) Process testing apparatus, computer-readable medium, and process testing method
Cho et al. Anti-debugging scheme for protecting mobile apps on android platform
US20180218154A1 (en) Analysis device, analysis method, and analysis program
CN115168847A (en) Application patch generation method and device, computer equipment and readable storage medium
KR101428915B1 (en) Feedback based application rewriting framework method and system for android security
CN110941534A (en) Method and system for detecting third-party code call of web application
KR101557455B1 (en) Application Code Analysis Apparatus and Method For Code Analysis Using The Same
CN111291377A (en) Application vulnerability detection method and system
KR101842263B1 (en) Method and apparatus for preventing reverse engineering
KR101724412B1 (en) Apparatus for analysis application using expansion code and method usnig the same
KR101824699B1 (en) Apparatus and method for analyzing android application, and computer-readable medium storing program for method thereof
CN110298146B (en) Application processing and running method and device
KR101573871B1 (en) Device and method of analyzing information drain of application

Legal Events

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