KR101606276B1 - Apparatus and method for setting taint based in control dependency - Google Patents
Apparatus and method for setting taint based in control dependency Download PDFInfo
- Publication number
- KR101606276B1 KR101606276B1 KR1020140119627A KR20140119627A KR101606276B1 KR 101606276 B1 KR101606276 B1 KR 101606276B1 KR 1020140119627 A KR1020140119627 A KR 1020140119627A KR 20140119627 A KR20140119627 A KR 20140119627A KR 101606276 B1 KR101606276 B1 KR 101606276B1
- Authority
- KR
- South Korea
- Prior art keywords
- data
- tent
- temporary
- unit
- tentative
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3604—Software analysis for verifying properties of programs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4494—Execution paradigms, e.g. implementations of programming paradigms data driven
Abstract
제어 의존성에 기초한 테인트 설정 장치 및 방법이 개시된다.
테인트 설정 방법은 프로그램을 구성하는 데이터들 중에서 상시 테인트된 제1 데이터에 의존적인 제2 데이터를 추출하는 단계; 상기 추출한 제2 데이터를 임시 테인트하는 단계; 및 상기 임시 테인트된 제2 데이터가 상기 제1 데이터와 연산되는 지 여부에 따라 상기 임시 테인트된 제2 데이터를 상시 테인트하는 단계를 포함할 수 있다.A tent setting apparatus and method based on control dependency are disclosed.
A step of extracting second data dependent on the first data that is currently tentative among the data constituting the program; Temporary tenting the extracted second data; And temporarily tenneling the temporary tensed second data according to whether the temporary tenned second data is calculated with the first data.
Description
본 발명은 제어 의존성에 기초한 테인트 설정 장치 및 방법에 관한 것으로, 보다 상세하게는 제어 의존성을 기초로 테인트 분석에 사용하는 테인트를 설정하는 장치 및 방법에 관한 것이다. BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a tent setting apparatus and method based on control dependency, and more particularly, to an apparatus and a method for setting a tent used for tent analysis based on control dependency.
동적 테인트 분석은 프로그램에 포함된 데이터 중 적어도 하나를 테인트하고, 데이터의 연산에 따라 테인트를 전파함으로써, 프로그램의 취약점을 분석하고, 테스팅하는 기술이다.Dynamic Taint Analysis is a technology that analyzes and tests vulnerabilities of programs by tiling at least one of the data contained in the program and propagating the taints according to the operation of the data.
그러나, 동적 테인트 분석에는 테인트 되어야 하는 데이터임에도 테인트가 되지 않는 언더 테인팅이 발생할 수 있다. 예를 들어, 테인트된 데이터가 분기문의 조건문으로만 사용되는 경우, 조건문에 포함된 다른 데이터에는 테인트가 전파되지 않으므로, 언더 테인팅이 발생할 수 있다.However, dynamic taint analysis can result in underutting that is not tentative, even though it is the data that needs to be tent- ed. For example, if the tainted data is used only as a branch statement condition, undertining can occur because the tent is not propagated to other data contained in the conditional statement.
종래의 언더 테인팅을 방지하는 방법으로는 DYTAN와 DTA++가 있었다.There are DYTAN and DTA ++ as a way to prevent conventional under-tinting.
이때, DYTAN은 프로그램의 모든 제어 의존성 (Control Dependency)을 판단하여 테인트함으로써, 언더 테인팅을 방지하였다. 그러나, DYTAN은 모든 제어 의존성을 가지는 데이터를 테인트함으로써, 테인트 된 데이터가 과도하게 증가하는 오버 테인팅이 발생하는 한계가 있었다.At this time, DYTAN determines all control dependencies of the program and tries to prevent under-tinting. However, DYTAN has a limitation in that overtining in which the data to be touched increases excessively occurs because the data having all the control dependencies is tied.
또한, DTA++는 해가 단 하나인 분기조건을 가진 분기문의 제어 의존성을 판단하고, 판단 결과에 따라 데이터를 테인트함으로써, 언더 테인팅을 방지하고자 하였다. 그러나, 언더 테인팅은 해가 단 하나인 분기조건을 가지지 않은 분기문에서도 발생할 수 있으므로, DTA++는 언더 테인팅을 완전히 방지할 수는 없었다. In addition, DTA ++ tried to prevent under-tainting by judging the control dependency of a branch with a single branch condition and treading data according to the judgment result. However, DTA ++ could not completely prevent under-tinting, since under-tinting can also occur in branches where the solution does not have a single branch condition.
따라서, 오버테인팅의 발생 없이 언더 테인팅을 방지할 수 있는 방법이 요청되고 있다.Therefore, there is a demand for a method that can prevent under-fitting without occurrence of over-tinning.
본 발명은 분기문 내부의 모든 데이터 중에서 상시 테인트와 산술 연산이 수행되는 데이터만 추출하여 상시 테인트로 추가함으로써, 데이터의 테인트를 최소화하면서 언더 테인팅을 방지하는 장치 및 방법을 제공할 수 있다.The present invention can provide an apparatus and method for preventing under-tainting while minimizing data tent by adding only tentative data and arithmetic operation data to all the data in the branch statement .
본 발명의 일실시예에 따른 테인트 설정 방법은 프로그램을 구성하는 데이터들 중에서 상시 테인트된 제1 데이터에 의존적인 제2 데이터를 추출하는 단계; 상기 추출한 제2 데이터를 임시 테인트하는 단계; 및 상기 임시 테인트된 제2 데이터가 상기 제1 데이터와 연산되는 지 여부에 따라 상기 임시 테인트된 제2 데이터를 상시 테인트하는 단계를 포함할 수 있다.According to another aspect of the present invention, there is provided a method of establishing a timetable, the method comprising: extracting second data dependent on first data that is currently tentative among data constituting a program; Temporary tenting the extracted second data; And temporarily tenneling the temporary tensed second data according to whether the temporary tenned second data is calculated with the first data.
본 발명의 일실시예에 따른 테인트 설정 방법의 제2 데이터를 추출하는 단계는 상기 프로그램에서 분기문의 조건문이 상시 테인트된 제1 데이터를 포함하는 경우, 상기 분기문에 포함된 모든 데이터를 제2 데이터로 추출할 수 있다.The step of extracting the second data of the step setting method according to an embodiment of the present invention may include the step of, when the conditional statement of the branch statement includes the first data that is normally tentatively drawn in the program, 2 data can be extracted.
본 발명의 일실시예에 따른 테인트 설정 방법은 상기 프로그램에서 임시 테인트된 제2 데이터에 기초하여 추가적으로 임시 테인트될 데이터를 결정하는 단계를 더 포함하고, 상기 제2 데이터를 추출하는 단계는 상기 프로그램에서 분기문의 조건문이 상시 테인트된 제1 데이터를 포함하는 경우, 상기 분기문에 포함된 적어도 하나의 데이터를 제2 데이터로 추출할 수 있다.The method of setting a timetable according to an embodiment of the present invention may further include the step of determining data to be additionally temporally tentatively based on second data temporarily tentatively stored in the program, In the program, if the conditional statement of the branch statement includes the first data that is normally tentatively drawn, the at least one data included in the branching statement may be extracted as the second data.
본 발명의 일실시예에 따른 테인트 설정 방법은 상기 임시 테인트된 제2 데이터가 포함된 분기문이 종료될 때까지 제2 데이터에 기초하여 추가적으로 임시 테인트될 데이터가 결정되지 않는 경우, 제2 데이터의 임시 테인트를 해제하는 단계를 더 포함할 수 있다.In the case where data to be additionally temporarily tent is not determined based on the second data until the branch statement including the temporary tent second data is terminated, 2 < / RTI > data. ≪ RTI ID = 0.0 >
본 발명의 일실시예에 따른 테인트 설정 방법은 상기 임시 테인트된 제2 데이터가 포함된 분기문이 종료될 때까지 제2 데이터를 상시 테인트하지 않는 경우, 제2 데이터의 임시 테인트를 해제하는 단계를 더 포함할 수 있다.The method of establishing a task according to an embodiment of the present invention is characterized in that when the second data is not tentently till the end of the branch statement including the temporary tent second data, The step of releasing may include the step of releasing.
본 발명의 일실시예에 따른 테인트 설정 방법의 제2 데이터를 상시 테인트하는 단계는 상기 임시 테인트된 제2 데이터와 상기 제1 데이터 간의 사칙 연산을 포함하는 산술 연산의 수행 여부를 확인할 수 있다.The step of continuously tenting the second data of the tent setting method according to an embodiment of the present invention can check whether or not the arithmetic operation including the arithmetic operation between the temporarily tentative second data and the first data is performed have.
본 발명의 일실시예에 따른 테인트 설정 방법은 프로그램의 분석 대상이 되는 상시 테인트되는 데이터를 식별하는 단계; 및 상기 식별된 상시 테인트된 데이터와 산술 연산 관계에 있는 데이터를 추가적으로 상시 테인트하는 단계를 포함할 수 있다.According to an embodiment of the present invention, there is provided a method of setting a time point, the method comprising: identifying data that is normally tentative to be analyzed; And further additionally < RTI ID = 0.0 > tenting < / RTI > data in an arithmetic operation relationship with the identified normally tethered data.
본 발명의 일실시예에 따른 테인트 설정 방법의 상시 테인트하는 단계는 상기 상시 테인트된 데이터에 의존적인 데이터를 임시 테인트하는 단계; 및 상기 임시 테인트된 데이터가 상기 상시 테인트된 데이터와 산술 연산되는지 여부에 따라 상기 임시 테인트된 데이터를 상시 테인트하는 단계를 포함할 수 있다.The step of regularly tentting the method of establishing a timetable according to an embodiment of the present invention comprises the steps of: temporarily tentatively relocating data depending on the currently timed data; And tentatively stating the temporary tent data according to whether the temporary tent data is arithmetically operated with the currently tentained data.
본 발명의 일실시예에 따른 테인트 설정 방법의 임시 테인트하는 단계는 상기 프로그램에서 분기문의 조건문이 상시 테인트된 데이터를 포함하는 경우, 상기 분기문에 포함된 모든 데이터를 임시 테인트할 수 있다.The temporary tenting step of the tent setting method according to an embodiment of the present invention is a step of temporarily tentting all the data included in the branch statement when the conditional statement of the branch statement includes the data that is normally tentted have.
본 발명의 일실시예에 따른 테인트 설정 장치는 프로그램을 구성하는 데이터들 중에서 상시 테인트된 제1 데이터에 의존적인 제2 데이터를 추출하는 데이터 추출부; 상기 추출한 제2 데이터를 임시 테인트하는 임시 테인트부; 및 상기 임시 테인트된 제2 데이터가 상기 제1 데이터와 연산되는 지 여부에 따라 상기 임시 테인트된 제2 데이터를 상시 테인트하는 상시 테인트부를 포함할 수 있다.A tent setting apparatus according to an embodiment of the present invention includes a data extracting unit for extracting second data that is dependent on first data that is currently tentative among data constituting a program; A temporary tent unit for temporary tenting the extracted second data; And a temporary tent unit for temporarily tentatively performing the temporary tent second data according to whether the temporary tent second data is calculated with the first data.
본 발명의 일실시예에 따른 테인트 설정 장치의 데이터 추출부는 상기 프로그램에서 분기문의 조건문이 상시 테인트된 제1 데이터를 포함하는 경우, 상기 분기문에 포함된 모든 데이터를 제2 데이터로 추출할 수 있다.The data extracting unit of the tent setting apparatus according to an embodiment of the present invention extracts all the data included in the branch statement as the second data when the conditional statement of the branch statement includes the first data that is always tentatively .
본 발명의 일실시예에 따른 테인트 설정 장치의 상시 테인트부는 상기 임시 테인트된 제2 데이터가 포함된 분기문이 종료될 때까지 제2 데이터를 상시 테인트하지 않는 경우, 제2 데이터의 임시 테인트를 해제할 수 있다.The tentative setting unit of the tent setting apparatus according to an embodiment of the present invention may be configured such that when the second tentative data is not tentatively till the branching tent containing the temporarily tentatively set second data ends, The temporary tent can be released.
본 발명의 일실시예에 의하면, 분기문 내부의 모든 데이터 중에서 상시 테인트와 산술 연산이 수행되는 데이터만 추출하여 상시 테인트로 추가함으로써, 데이터의 테인트를 최소화하면서 언더 테인팅을 방지할 수 있다.According to an embodiment of the present invention, only the data that is always tent and all the data for which arithmetic operation is performed are extracted from all the data in the branch statement, and the data is added at all times, thereby minimizing the data tent and preventing under-tinting .
도 1은 본 발명의 일실시예에 따른 테인트 설정 장치를 나타내는 도면이다.
도 2는 본 발명의 일실시예에 따른 테인트 설정 장치의 상시 테인트 추가부를 나타내는 도면이다.
도 3는 본 발명의 일실시예에 따른 테인트를 설정한 코드의 일례이다.
도 4는 본 발명의 일실시예에 따른 테인트 설정 방법을 도시한 플로우차트이다.
도 5는 본 발명의 일실시예에 따른 테인트 설정 방법을 도시한 플로우차트이다.1 is a view showing a tent setting apparatus according to an embodiment of the present invention.
2 is a diagram showing a tent adding unit of the tent setting apparatus according to an embodiment of the present invention.
3 is an example of a code for setting a tent according to an embodiment of the present invention.
4 is a flowchart showing a method of setting a tie according to an embodiment of the present invention.
5 is a flowchart showing a method of setting a tie according to an embodiment of the present invention.
이하, 본 발명의 실시예를 첨부된 도면을 참조하여 상세하게 설명한다. 본 발명의 일실시예에 따른 테인트 설정 방법은 테인트 설정 장치에 의해 수행될 수 있다. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. The method of setting a timetable according to an embodiment of the present invention can be performed by a timetable setting apparatus.
도 1은 본 발명의 일실시예에 따른 테인트 설정 장치를 나타내는 도면이다. 1 is a view showing a tent setting apparatus according to an embodiment of the present invention.
테인트 설정 장치(100)는 동적 테인트 설정 장치가 테인트한 제1 데이터를 기초로 제1 데이터에 의존적인 제2 데이터를 추가로 테인트함으로써, 동적 테인트 분석 과정에서 언더 테인팅을 방지할 수 있다. The
도 1을 참고하면, 본 발명의 일실시예에 따른 테인트 설정 장치(100)는 데이터 식별부(110)와 상시 테인트 추가부(120)를 포함할 수 있다.Referring to FIG. 1, a
데이터 식별부(110)는 프로그램의 분석 대상이 되는 상시 테인트된 데이터를 식별할 수 있다. 이때, 상시 테인트된 데이터는 동적 테인트 설정 장치가 동적 테인트 분석을 위하여 프로그램에서 테인트한 데이터일 수 있다.The
상시 테인트 추가부(120)는 데이터 식별부(110)가 식별한 데이터와 산술 연산 관계에 있는 데이터를 추가적으로 상시 테인트하여 상시 테인트된 데이터를 추가할 수 있다.The always-
구체적으로, 상시 테인트 추가부(120)는 상시 테인트된 데이터에 제어 의존성이 있는 데이터를 임시 테인트할 수 있다. 이때, 상시 테인트된 데이터에 제어 의존성이 있는 데이터는 언더 테인팅을 유발할 가능성이 있는 데이터일 수 있다.More specifically, the normal
그리고, 상시 테인트 추가부(120)는 임시 테인트된 데이터가 상시 테인트된 데이터와 산술 연산이 되는지 여부를 판단할 수 있다. 임시 테인트된 데이터가 상시 테인트된 데이터와 산술 연산이 되는 경우, 임시 테인트된 데이터는 언더 테인팅될 수 있다. 따라서, 상시 테인트 추가부(120)는 임시 테인트된 데이터를 상시 테인트함으로써, 임시 테인트된 데이터가 언더 테인팅되는 것을 방지할 수 있다.The normal
상시 테인트 추가부(120)의 구체적인 구성 및 동작은 이하 도 2를 참조하여 상세히 설명한다.The concrete configuration and operation of the constant
도 2는 본 발명의 일실시예에 따른 테인트 설정 장치의 상시 테인트 추가부를 나타내는 도면이다. 2 is a diagram showing a tent adding unit of the tent setting apparatus according to an embodiment of the present invention.
언더 테인팅은 테인트되어야 하는 데이터가 테인트되지 않아서 발생하는 문제이다. 이때, 언더 테인팅이 발생하는 데이터는 분기문에 포함되고 상시 테인트 되지 않은 데이터 중에서 상시 테인트된 데이터에 제어 의존성이 있으면서, 상시 테인트된 데이터와 연산되는 데이터일 수 있다. 따라서, 상시 테인트 추가부(120)는 분기문 내부의 모든 데이터 중에서 상시 테인트와 산술 연산이 수행되는 데이터만 추출하여 상시 테인트로 추가함으로써, 데이터의 테인트를 최소화하면서 언더 테인팅을 방지할 수 있다.Under-tinting is a problem that occurs because the data that needs to be tinted is not being tinted. At this time, the data in which the under-tinting occurs may be data that is calculated with the tentatively tentative data while having control dependence on the data that is normally tentatively included in the branch tentative data. Therefore, the normal tent adder 120 extracts only the data that is always tent and all the arithmetic operation data among all the data in the branch tent and adds it to the normal tent to thereby minimize the data tent and prevent under-tinting .
도 2를 참고하면, 본 발명의 일실시예에 따른 상시 테인트 추가부(120)는 데이터 추출부(210), 임시 테인트부(220), 테인트 전파부(230), 및 상시 테인트부(240)를 포함할 수 있다.2, the constant
데이터 추출부(210)는 프로그램을 구성하는 데이터들 중에서 상시 테인트된 제1 데이터에 의존적인 제2 데이터를 추출할 수 있다. 이때, 제1 데이터는 데이터 식별부(110)가 식별한 데이터일 수 있다.The
구체적으로, 프로그램에서 분기문의 조건문이 상시 테인트된 제1 데이터를 포함하는 경우, 데이터 추출부(210)는 해당 분기문에 포함된 모든 데이터를 제2 데이터로 추출할 수 있다. Specifically, if the conditional statement of the branch statement includes the first data that is normally tentatively displayed in the program, the
또한, 프로그램에서 분기문의 조건문이 상시 테인트된 제1 데이터를 포함하는 경우, 데이터 추출부(210)는 해당 분기문에 포함된 적어도 하나의 데이터를 제2 데이터로 추출할 수 있다. 이때, 데이터 추출부(210)는 해당 분기문에 포함된 모든 데이터가 아니라 해당 분기문에 포함된 데이터 중에서 일부 데이터를 제2 데이터로 추출하므로, 추출한 데이터 이외에도 제1 데이터에 의존적인 제2 데이터가 존재할 가능성이 있다. 따라서, 상시 테인트 추가부(120)는 테인트 전파부(230)를 포함하여 임시 테인트될 데이터를 추가할 수 있다.In addition, when the program includes the first data that is normally tentained in the branch statement, the
임시 테인트부(220)는 데이터 추출부(210)가 추출한 제2 데이터를 임시 테인트할 수 있다.The
테인트 전파부(230)는 프로그램에서 임시 테인트부(220)가 임시 테인트한 제2 데이터를 전파할 수 있다. 구체적으로, 테인트 전파부(230)는 제2 데이터에 기초하여 추가적으로 임시 테인트될 데이터를 결정할 수 있다. 예를 들어, 프로그램에 a:=b 수식이 포함되어 있고, b가 임시 테인트된 데이터인 경우, 테인트 전파부(230)는 임시 테인트된 b와 연산되는 a를 임시 테인트될 데이터로 결정할 수 있다.The
테인트 전파부(230)는 데이터 추출부(210)가 해당 분기문에 포함된 적어도 하나의 데이터를 제2 데이터로 추출하는 경우에 동작할 수 있다.The
상시 테인트부(240)는 임시 테인트부(220)가 임시 테인트한 제2 데이터가 제1 데이터와 연산되는지 여부에 따라 임시 테인트된 제2 데이터를 상시 테인트할 수 있다. 구체적으로, 상시 테인트부(240)는 임시 테인트된 제2 데이터와 제1 데이터 간의 사칙 연산을 포함하는 산술 연산이 수행되었는지 여부를 확인할 수 있다. 그리고, 임시 테인트된 제2 데이터와 제1 데이터 간에 산술 연산이 수행된 경우, 제2 데이터를 상시 테인트할 수 있다.The
또한, 임시 테인트된 제2 데이터의 유효범위가 종료될 때까지 제2 데이터를 상시 테인트하지 않는 경우, 상시 테인트부(240)는 제2 데이터의 임시 테인트를 해제할 수 있다.In addition, if the second tentative data is not always tentained until the valid range of the second tentative data ends, the
그리고, 테인트 전파부(230)가 임시 테인트된 제2 데이터를 전파하고, 임시 테인트된 제2 데이터의 유효범위가 종료될 때까지 제2 데이터에 기초하여 추가적으로 임시 테인트될 데이터가 결정되지 않는 경우, 상시 테인트부(240)는 제2 데이터의 임시 테인트를 해제할 수 있다.Then, the data to be additionally temporarily tentatively determined based on the second data is determined until the tent
도 3는 본 발명의 일실시예에 따른 테인트를 설정한 코드의 일례이다. 3 is an example of a code for setting a tent according to an embodiment of the present invention.
이때, weightedScoring 변수(310)와 rawScore 변수(320)는 상시 테인트 된 데이터일 수 있다. 또한, 5번째 라인에서 선언 및 초기화되는 score 변수(330)는 지역변수이므로 라인 5에서는 테인트되지 않을 수 있다.At this time, the
도 3을 기초로 언더 테인팅이 발생하는 실시예를 설명한다.An embodiment in which under-fitting occurs based on Fig. 3 will be described.
weightedScoring의 값을 FALSE, rawScore의 값을 380으로 가정하는 경우, 도 3에 도시된 함수는 라인 4, 5, 7, 13, 15, 20이 실행되며, 0을 리턴 값으로 출력할 수 있다. 이때, 라인 13에서 rawScore 변수(320)에 설정된 상기 테인트가 score 변수(330)로 전파될 수 있다. 즉, 상시 테인트된 데이터를 포함하는 명령어는 라인 7, 13, 15이므로, 동적 테인트 설정 장치는 라인 7, 13, 15에 대해 취약점 검사를 수행할 수 있다.Assuming that the value of weightedScoring is FALSE and the value of rawScore is 380, the function shown in FIG. 3 executes
그러나, 공격자가 weightedScoring 변수(310)를 0보다 큰 값으로 변경하는 경우, 도 3에 도시된 함수는 라인 4, 5, 7, 8, 9, 10, 11, 13, 15, 16, 17이 실행되며, 400을 리턴 값으로 출력할 수 있다. 즉, 정상 동작할 경우의 리턴 값인 0과 공격에 따른 리턴 값인 400의 차이가 크므로 공격자는 프로그램의 제어 흐름 변경에 성공했다고 판단할 수 있다. However, if the attacker changes the
이때, 공격자가 weightedScoring 변수(310)을 변경함에 따라 프로그램의 제어 흐름이 변경된 곳은 라인 9의 score += WEIGHT일 수 있다. 따라서, 프로그램의 취약점을 테스트하기 위한 테인트 분석에서 라인 9도 상시 테인트 되어야 한다. At this time, as the attacker changes the
그러나, 라인 9의 score 변수(320)는 지역변수이며 상시 테인트되지 않았으므로, 취약점 검사를 위한 테인트 분석으로는 이 부분을 검증할 수 없는 언더 테인팅이 발생할 수 있다.However, since the
도 3을 기초로 본 발명의 일실시예에 따라 언더 테인팅을 방지하는 실시예를 설명한다.3, an embodiment for preventing under-fitting according to an embodiment of the present invention will be described.
본 발명의 상시 테인트 추가부(120)는 분기문의 조건문이 상시 테인트된 데이터를 포함하는 경우, 해당 분기문에 포함된 모든 데이터를 임시 테인트할 수 있다. 그리고, 임시 테인트된 데이터가 상시 테인트된 데이터와 산술 연산이 되는 경우, 상시 테인트 추가부(120)는 임시 테인트된 데이터를 상시 테인트함으로써, 임시 테인트된 데이터가 언더 테인팅되는 것을 방지할 수 있다.In the case where the conditional statement of the branch statement includes data that is normally tained, the permanent
즉, 라인 7의 분기문의 조건문인 weightedScoring > FALSE가 상시 테인트된 데이터인 weightedScoring 변수(310)를 포함하고 있으므로, 상시 테인트 추가부(120)는 라인 7의 분기 내부에 포함된 모든 데이터를 임시 테인트할 수 있다. 따라서, score 변수(320)도 임시 테인트될 수 있다.That is, since the weighted Scoring> FALSE, which is the conditional statement of the branch statement on the line 7, includes the
다음으로, 상시 테인트 추가부(120)는 임시 테인트된 데이터가 상시 테인트된 데이터와 산술 연산하는지 여부를 확인할 수 있다. 이때, score 변수(320)는 라인 9에서 상시 테인트된 데이터인 rawScore 변수(320)와 산술연산(score += rawScore)될 수 있다. 따라서, 상시 테인트 추가부(120)는 score 변수(320)를 상시 테인트함으로써, score 변수(320)가 테인트 되지 않음에 따른 언더 테인팅이 발생하는 것을 방지할 수 있다.Next, the normal
즉, 종래의 테인트 분석을 이용할 경우, 도 3에서 테인트된 데이터를 포함하는 라인 7, 13, 15, 17만 분석되므로, score 변수(320)가 테인트 되지 않음에 따른 언더 테인팅이 발생할 수 있다. 반면, 본 발명은 프로그램의 제어 흐름을 변경할 수 있는 원인이 되는 라인 9를 추가적으로 테인트할 수 있으므로 언더 테인팅을 방지할 수 있다.That is, when the conventional Tain analysis is used, only the
도 4는 본 발명의 일실시예에 따른 테인트 설정 방법을 도시한 플로우차트이다.4 is a flowchart showing a method of setting a tie according to an embodiment of the present invention.
단계(410)에서 데이터 식별부(110)는 프로그램의 분석 대상이 되는 상시 테인트된 데이터를 식별할 수 있다. In
단계(420)에서 상시 테인트 추가부(120)는 단계(410)에서 식별한 데이터와 산술 연산 관계에 있는 데이터를 추출할 수 있다. 구체적으로, 상시 테인트 추가부(120)는 단계(410)에서 식별한 데이터에 제어 의존성이 있는 데이터를 임시 테인트할 수 있다. 그리고, 상시 테인트 추가부(120)는 임시 테인트된 데이터가 상시 테인트된 데이터와 산술 연산이 되는지 여부를 판단할 수 있다. 또한, 상시 테인트 추가부(120)는 임시 테인트된 데이터 중에서 상시 테인트된 데이터와 산술 연산이 되는 데이터를 추출할 수 있다.In
단계(430)에서 상시 테인트 추가부(120)는 단계(420)에서 추출한 데이터를 상시 테인트하여 상시 테인트된 데이터를 추가할 수 있다.In
도 5는 본 발명의 일실시예에 따른 테인트 설정 방법을 도시한 플로우차트이다. 5 is a flowchart showing a method of setting a tie according to an embodiment of the present invention.
도 5는 본 발명의 일실시예에 따른 상시 테인트 추가부의 동작이며, 단계(510) 내지 단계(540)는 도 5의 단계(420)에 포함될 수 있다.5 is an operation of the constant tent adding unit according to an embodiment of the present invention, and steps 510 to 540 may be included in
단계(510)에서 데이터 추출부(210)는 프로그램을 구성하는 데이터들 중에서 상시 테인트된 제1 데이터에 의존적인 제2 데이터를 추출할 수 있다. 구체적으로, 프로그램에서 분기문의 조건문이 상시 테인트된 제1 데이터를 포함하는 경우, 데이터 추출부(210)는 해당 분기문에 포함된 모든 데이터를 제2 데이터로 추출할 수 있다. In
단계(520)에서 임시 테인트부(220)는 단계(510)에서 추출한 제2 데이터를 임시 테인트할 수 있다.In
단계(530)에서 테인트 전파부(230)는 단계(520)에서 임시 테인트부(220)가 임시 테인트한 제2 데이터를 전파할 수 있다. 구체적으로, 테인트 전파부(230)는 제2 데이터에 기초하여 추가적으로 임시 테인트될 데이터를 결정할 수 있다. 또한, 단계(530)는 단계(510)에서 해당 분기문에 포함된 데이터 중 일부의 데이터를 추출한 경우, 수행될 수 있다. 그리고, 단계(510)에서 해당 분기문에 포함된 모든 데이터를 추출하는 경우, 단계(530)은 생략될 수 있다.In
단계(540)에서 상시 테인트부(240)는 단계(520)에서 임시 테인트된 제2 데이터가 제1 데이터와 산술 연산되는지 여부를 확인할 수 있다. 그리고, 임시 테인트된 제2 데이터와 제1 데이터 간에 산술 연산이 수행된 경우, 상시 테인트부(240)는 단계(550)을 수행할 수 있다. 또한, 임시 테인트된 제2 데이터가 포함된 분기문이 종료될 때까지, 임시 테인트된 제2 데이터와 제1 데이터 간에 산술 연산이 수행된 경우, 상시 테인트부(240)는 단계(560)을 수행할 수 있다.In
단계(550)에서 상시 테인트부(240)는 제1 데이터와 산술 연산되는 제2 데이터를 상시 테인트할 수 있다.In
단계(550)에서 상시 테인트부(240)는 임시 테인트된 제2 데이터가 포함된 분기문이 종료될 때까지, 제1 데이터 간에 산술 연산되지 않은 제2 데이터의 임시 테인트를 해제할 수 있다.The
본 발명은 분기문 내부의 모든 데이터 중에서 상시 테인트와 산술 연산이 수행되는 데이터만 추출하여 상시 테인트로 추가함으로써, 데이터의 테인트를 최소화하면서 언더 테인팅을 방지할 수 있다.In the present invention, only the data which is always tent and arithmetic operation is extracted from all the data in the branch statement, and the data is added at all times, thereby minimizing the data tent and preventing under-tinting.
이상과 같이 본 발명은 비록 한정된 실시예와 도면에 의해 설명되었으나, 본 발명은 상기의 실시예에 한정되는 것은 아니며, 본 발명이 속하는 분야에서 통상의 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능하다.While the invention has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. This is possible.
그러므로, 본 발명의 범위는 설명된 실시예에 국한되어 정해져서는 아니 되며, 후술하는 특허청구범위뿐 아니라 이 특허청구범위와 균등한 것들에 의해 정해져야 한다.Therefore, the scope of the present invention should not be limited to the described embodiments, but should be determined by the equivalents of the claims, as well as the claims.
100: 테인트 설정 장치
110: 데이터 식별부
120: 상시 테인트 추가부100: Tent setting device
110: Data identification unit
120: Continuous tent addition section
Claims (12)
상기 데이터 추출부가 프로그램을 구성하는 데이터들 중에서 상시 테인트된 제1 데이터에 의존적인 제2 데이터를 추출하는 단계;
상기 임시 테인트부가 상기 추출한 제2 데이터를 임시 테인트하는 단계; 및
상기 상시 테인트부는 상기 임시 테인트된 제2 데이터가 언더 테인팅될지 여부를 판단하고, 판단 결과에 따라 상기 임시 테인트된 제2 데이터를 상시 테인트하는 단계
를 포함하는 테인트 설정 방법.A data extracting unit; Temporary tent parts; And a tent setting apparatus including a tentative tent unit, the method comprising:
Extracting second data that is dependent on first data that is currently tentative among data constituting the data extracting unit program;
Temporary tentting the extracted second data by the temporary tent unit; And
Wherein the temporary tent unit judges whether or not the temporary tent second data is to be underlined and tentatively tentatively temporarily stores the temporary tent second data according to a determination result
Wherein the step of setting a tent is performed.
상기 제2 데이터를 추출하는 단계는,
상기 프로그램에서 분기문의 조건문이 상시 테인트된 제1 데이터를 포함하는 경우, 상기 데이터 추출부가 상기 분기문에 포함된 모든 데이터를 제2 데이터로 추출하는 테인트 설정 방법.The method according to claim 1,
Wherein the extracting of the second data comprises:
Wherein the data extraction unit extracts all the data included in the branch statement as the second data when the conditional statement of the branch statement includes the first data that is normally tentatively included in the program.
상기 임시 테인트부가 상기 프로그램에서 임시 테인트된 제2 데이터에 기초하여 추가적으로 임시 테인트될 데이터를 결정하는 단계
를 더 포함하고,
상기 제2 데이터를 추출하는 단계는,
상기 프로그램에서 분기문의 조건문이 상시 테인트된 제1 데이터를 포함하는 경우, 상기 데이터 추출부가 상기 분기문에 포함된 적어도 하나의 데이터를 제2 데이터로 추출하는 테인트 설정 방법.The method according to claim 1,
Wherein the temporary tent unit determines data to be additionally temporally tentatively based on second data temporarily tentative in the program
Further comprising:
Wherein the extracting of the second data comprises:
Wherein the data extracting unit extracts at least one data included in the branch statement as the second data when the conditional statement of the branch statement includes the first data that is normally tentatively included in the program.
상기 임시 테인트된 제2 데이터가 포함된 분기문이 종료될 때까지 제2 데이터에 기초하여 추가적으로 임시 테인트될 데이터가 결정되지 않는 경우, 상기 임시 테인트부가 제2 데이터의 임시 테인트를 해제하는 단계
를 더 포함하는 테인트 설정 방법.The method of claim 3,
If the additional tentative data is not determined based on the second data until the branch statement including the temporarily tentatively-accessed second data is terminated, the temporary tent unit releases the temporary tent of the second data Step
Further comprising the steps of:
상기 임시 테인트된 제2 데이터가 포함된 분기문이 종료될 때까지 제2 데이터를 상시 테인트하지 않는 경우, 상기 임시 테인트부가 제2 데이터의 임시 테인트를 해제하는 단계
를 더 포함하는 테인트 설정 방법.The method according to claim 1,
If the second tentative data is not to be tentatively till the end of the branch tent containing the second tentative data, releasing the temporary tent of the second data
Further comprising the steps of:
상기 제2 데이터를 상시 테인트하는 단계는,
상기 상시 테인트부가 상기 임시 테인트된 제2 데이터와 상기 제1 데이터 간의 사칙 연산을 포함하는 산술 연산의 수행 여부를 확인하는 테인트 설정 방법.The method according to claim 1,
The step of continuously tenting the second data comprises:
Wherein the always-tent unit confirms whether or not to perform an arithmetic operation including an arithmetic operation between the temporary tent second data and the first data.
상기 데이터 식별부가 프로그램의 분석 대상이 되는 상시 테인트되는 데이터를 식별하는 단계; 및
상기 데이터 추가부가 상기 식별된 상시 테인트된 데이터와 산술 연산 관계에 있는 데이터를 추가적으로 상시 테인트하는 단계
를 포함하고,
상기 상시 테인트하는 단계는,
상기 데이터 추가부가 상기 상시 테인트된 데이터에 의존적인 데이터를 임시 테인트하는 단계; 및
상기 데이터 추가부가 상기 임시 테인트된 데이터가 상기 상시 테인트된 데이터와 산술 연산되는지 여부에 따라 상기 임시 테인트된 데이터를 상시 테인트하는 단계
를 포함하는 테인트 설정 방법.A data identification unit; And a data adding unit, the method comprising the steps of:
Identifying data that is always tentative to be analyzed by the data identification application program; And
Wherein the data adding unit further additionally tentently data in an arithmetic operation relationship with the identified normally tethered data
Lt; / RTI >
Wherein the step of continuously tenting comprises:
Temporarily tentting data that is dependent on the currently-tethered data; And
Wherein the data addition unit continually tentresses the temporary tained data according to whether the temporary tained data is arithmetically operated with the currently tained data
Wherein the step of setting a tent is performed.
상기 임시 테인트하는 단계는,
상기 프로그램에서 분기문의 조건문이 상시 테인트된 데이터를 포함하는 경우, 상기 데이터 추가부가 상기 분기문에 포함된 모든 데이터를 임시 테인트하는 테인트 설정 방법.8. The method of claim 7,
The temporary tenting step may include:
Wherein the data adder temporarily tempests all the data included in the branch statement when the conditional statement of the branch statement includes the data that is normally tentative in the program.
상기 추출한 제2 데이터를 임시 테인트하는 임시 테인트부; 및
상기 임시 테인트된 제2 데이터가 언더 테인팅될지 여부를 판단하고, 판단 결과에 따라 상기 임시 테인트된 제2 데이터를 상시 테인트하는 상시 테인트부
를 포함하는 테인트 설정 장치.A data extracting unit for extracting second data that is dependent on the first data that is normally tentative among data constituting the program;
A temporary tent unit for temporary tenting the extracted second data; And
A temporary tent unit for temporarily tentting the temporary data of the second tentative data according to a result of the determination, determining whether the temporary tentative second data is to be undertinted,
The tent setting apparatus comprising:
상기 데이터 추출부는,
상기 프로그램에서 분기문의 조건문이 상시 테인트된 제1 데이터를 포함하는 경우, 상기 분기문에 포함된 모든 데이터를 제2 데이터로 추출하는 테인트 설정 장치.11. The method of claim 10,
The data extracting unit extracts,
Wherein the program extracts all the data included in the branch statement as the second data when the branch statement condition includes the first data that is normally tentatively set in the program.
상기 상시 테인트부는,
상기 임시 테인트된 제2 데이터가 포함된 분기문이 종료될 때까지 제2 데이터를 상시 테인트하지 않는 경우, 제2 데이터의 임시 테인트를 해제하는 테인트 설정 장치.11. The method of claim 10,
Wherein the normally-
And releases the temporary tent of the second data if the second data is not tentently till the end of the branch statement including the temporary tent second data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020140119627A KR101606276B1 (en) | 2014-09-10 | 2014-09-10 | Apparatus and method for setting taint based in control dependency |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020140119627A KR101606276B1 (en) | 2014-09-10 | 2014-09-10 | Apparatus and method for setting taint based in control dependency |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20160030425A KR20160030425A (en) | 2016-03-18 |
KR101606276B1 true KR101606276B1 (en) | 2016-03-24 |
Family
ID=55651617
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020140119627A KR101606276B1 (en) | 2014-09-10 | 2014-09-10 | Apparatus and method for setting taint based in control dependency |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101606276B1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20220097623A (en) | 2020-12-30 | 2022-07-08 | 동국대학교 산학협력단 | Method of providing user interface for editting taint rules for detcting errors in source codes |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110145918A1 (en) | 2009-12-15 | 2011-06-16 | Jaeyeon Jung | Sensitive data tracking using dynamic taint analysis |
-
2014
- 2014-09-10 KR KR1020140119627A patent/KR101606276B1/en not_active IP Right Cessation
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110145918A1 (en) | 2009-12-15 | 2011-06-16 | Jaeyeon Jung | Sensitive data tracking using dynamic taint analysis |
Non-Patent Citations (2)
Title |
---|
JAMES CLUASE, WANCHUN LI AND ALESSANDRO ORSO, DYTAN: A GENERIC DYNAMIC TAINT ANALYSIS FRAMEWORK(2007) |
최영현, ‘테인트 분석 기법을 이용한 동적 바이너리 실행 파일 분석기에 대한 연구’, 성균관 대학교 박사학위논문, 2014.4 |
Also Published As
Publication number | Publication date |
---|---|
KR20160030425A (en) | 2016-03-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10397261B2 (en) | Identifying device, identifying method and identifying program | |
US8424090B2 (en) | Apparatus and method for detecting obfuscated malicious web page | |
US9882926B2 (en) | Detecting stored cross-site scripting vulnerabilities in web applications | |
US9680848B2 (en) | Apparatus, system and method for detecting and preventing malicious scripts using code pattern-based static analysis and API flow-based dynamic analysis | |
US10055590B2 (en) | Rule matching in the presence of languages with no types or as an adjunct to current analyses for security vulnerability analysis | |
US10049210B2 (en) | System and method for detection of omnientrant code segments to identify potential malicious code | |
CN104834837B (en) | A kind of antialiasing method of binary code based on semanteme | |
CN102012988B (en) | Automatic binary unwanted code behavior analysis method | |
Thomas et al. | Stringer: Measuring the importance of static data comparisons to detect backdoors and undocumented functionality | |
US20140150099A1 (en) | Method and device for detecting malicious code on web pages | |
CN105245495A (en) | Similarity match based rapid detection method for malicious shellcode | |
KR101606276B1 (en) | Apparatus and method for setting taint based in control dependency | |
US20080016573A1 (en) | Method for detecting computer viruses | |
CN103390129B (en) | Detect the method and apparatus of security of uniform resource locator | |
US20170068543A1 (en) | Silent mode and resource reassignment in branch prediction logic for branch instructions within a milicode routine | |
CN106709350A (en) | Virus detection method and device | |
CN106127473A (en) | A kind of safe payment method and electronic equipment | |
CN104077528A (en) | Virus detection method and device and terminal | |
US9350723B2 (en) | Determination and classification of defense measures in web applications | |
KR101894894B1 (en) | Apparatus for processing bytecode and operation method thereof | |
CN113901459B (en) | Method and device for discovering vulnerability of binary program in firmware | |
KR20180076550A (en) | Apparatus and method for inter-procedure static analysis | |
CN114637988A (en) | Binary-oriented function level software randomization method | |
CN113886836A (en) | Intelligent contract vulnerability detection method and related equipment | |
CN111131223A (en) | Test method and device for click hijacking |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
LAPS | Lapse due to unpaid annual fee |