KR101479516B1 - Source code security weakness detection apparatus and method - Google Patents
Source code security weakness detection apparatus and method Download PDFInfo
- Publication number
- KR101479516B1 KR101479516B1 KR1020140026284A KR20140026284A KR101479516B1 KR 101479516 B1 KR101479516 B1 KR 101479516B1 KR 1020140026284 A KR1020140026284 A KR 1020140026284A KR 20140026284 A KR20140026284 A KR 20140026284A KR 101479516 B1 KR101479516 B1 KR 101479516B1
- Authority
- KR
- South Korea
- Prior art keywords
- instruction
- security
- command
- source code
- program
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 48
- 238000000034 method Methods 0.000 title claims abstract description 15
- 238000012790 confirmation Methods 0.000 claims description 3
- 239000000284 extract Substances 0.000 description 10
- 238000012795 verification Methods 0.000 description 6
- 238000012986 modification Methods 0.000 description 4
- 230000004048 modification Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/362—Debugging of software
- G06F11/3624—Debugging of software by performing operations on the source code, e.g. via a compiler
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/55—Detecting local intrusion or implementing counter-measures
- G06F21/56—Computer malware detection or handling, e.g. anti-virus arrangements
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- Virology (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Quality & Reliability (AREA)
- Debugging And Monitoring (AREA)
Abstract
소스코드(source code) 보안 약점 탐지 장치 및 방법이 개시된다. 본 발명의 실시예들은 프로그램의 소스코드 내에 존재하는 보안 약점을 정확하게 탐지하고, 그에 대한 결과를 프로그램 개발자에게 제공해 줌으로써, 프로그램 개발자가 소스코드 내에 존재하는 보안 약점을 손쉽게 교정할 수 있도록 지원할 수 있다.A source code security weakness detection apparatus and method are disclosed. Embodiments of the present invention can accurately detect security weaknesses present in the source code of a program and provide the results to the program developer so that a program developer can easily correct security weaknesses in the source code.
Description
본 발명의 실시예들은 프로그램의 소스코드(source code) 상에 내재하는 보안상 취약한 부분을 탐지하여 해당 부분에 대한 탐지 결과를 사용자에게 제공하는 기법에 대한 것이다.Embodiments of the present invention are directed to a technique for detecting a vulnerable portion inherent in a source code of a program and providing a detection result to the user.
최근, 데스크탑 PC, 스마트폰, 태블릿 PC 등과 같이, 마이크로 프로세서가 내장된 다양한 기기가 보급됨에 따라, 이러한 기기들에서 사용할 수 있는 다양한 종류의 프로그램들이 등장하고 있다.[0002] Recently, various kinds of programs that can be used in these devices are emerging as a variety of devices including a microprocessor such as a desktop PC, a smart phone, and a tablet PC are popularized.
아울러, 최근에는 프로그램 제작을 위한 다양한 프로그래밍 언어들도 등장함에 따라, 프로그램 개발자의 선택폭이 증가하게 되었고, 이로 인해, 프로그램의 양적 증가뿐만 아니라 질적 수준까지 높아지고 있다.In addition, since various programming languages for program production have recently appeared, the choice of program developers has been increased, and the quality of the program has been increasing not only in quantity but also in quantity.
보통, 프로그램들은 컴퓨터 프로그램을 기록하고 있는 텍스트 파일인 소스코드(source code)로 제작되어 있고, 프로그램 개발자들은 소정의 프로그램 동작 알고리즘을 자신이 선택한 프로그래밍 언어에 따른 소스코드로 표현함으로써 프로그램을 개발할 수 있다.Normally, programs are made of source code which is a text file in which a computer program is recorded, and program developers can develop a program by expressing a predetermined program operation algorithm in source code according to a programming language selected by the user .
일반적으로 프로그램 개발자들은 프로그램을 개발하면서, 자신이 작성한 소스코드에 오류가 없는지 여부를 확인하는 과정을 수행함으로써, 소스코드의 오류를 수정해 가고, 이렇게 소스코드의 오류를 수정해 가는 작업을 통해 완성도가 높은 프로그램을 개발하려고 노력한다.In general, program developers are developing a program to check whether there is an error in their source code, correct errors in the source code, and correct errors in the source code. We try to develop high-quality programs.
하지만, 최근에는 정보의 노출 등 보안 이슈가 강화되고 있다는 점에서 프로그램 개발자들은 프로그램을 개발할 때, 단순히 소스코드의 오류여부만을 체크하는 것이 아니라, 자신이 작성한 소스코드 내에 보안상 약점으로 작용할 수 있는 부분이 있는지 여부를 확인해야 할 필요성이 증대되고 있다.However, in recent years, security issues such as information disclosure have been strengthened. Therefore, when developing a program, program developers do not merely check whether the source code is erroneous, There is an increasing need to identify whether or not there is.
예컨대, 프로그램의 소스코드 내에서 사용되는 특정 명령어가 소정의 데이터를 변수로 참조할 때, 상기 특정 명령어는 해당 프로그램이 구동되는 시스템이 아닌 외부의 시스템으로부터 유입된 외부 데이터를 변수로 참조할 경우, 상기 특정 명령어의 실행에 따라 시스템 내의 주요 정보가 손쉽게 노출될 수 있는 특징을 갖는 명령어임에도 불구하고, 상기 소스코드 내에서 상기 특정 명령어가 외부 데이터를 참조하도록 작성되어 있다면, 해당 프로그램은 보안상 취약점을 갖는 프로그램이기 때문에 상기 프로그램의 사용자에게 큰 피해를 입힐 수 있다.For example, when a specific instruction used in the source code of a program refers to predetermined data as a variable, the specific instruction refers to external data, which is input from an external system other than the system on which the program is driven, as a variable, If the specific instruction is written in the source code so as to refer to external data in spite of the fact that the main information in the system can be easily exposed according to the execution of the specific instruction, The user of the program can be seriously damaged.
따라서, 프로그램의 소스코드 내에 존재하는 보안 약점을 정확하게 탐지하고, 그에 대한 결과를 프로그램 개발자에게 제공해 줌으로써, 프로그램 개발자가 소스코드 내에 존재하는 보안 약점을 제거할 수 있도록 지원하는 기법에 대한 연구가 필요하다.Therefore, it is necessary to study a technique for supporting the program developer to remove the security weakness in the source code by accurately detecting the security weakness in the source code of the program and providing the result to the program developer .
본 발명의 실시예들은 프로그램의 소스코드(source code) 내에 존재하는 보안 약점을 정확하게 탐지하고, 그에 대한 결과를 프로그램 개발자에게 제공해 줌으로써, 프로그램 개발자가 소스코드 내에 존재하는 보안 약점을 손쉽게 교정할 수 있도록 지원하고자 한다.Embodiments of the present invention allow a program developer to easily correct security weaknesses present in the source code by accurately detecting security weaknesses present in the source code of the program and providing the results to the program developer I want to support.
본 발명의 일실시예에 따른 소스코드(source code) 보안 약점 탐지 장치는 제1 프로그래밍 언어에 기초한 프로그램 소스코드에서 사용 가능한 복수의 명령어들 각각에 대해, 보안 약점으로 미리 지정된 참조 데이터에 대한 속성 정보가 저장되어 있는 보안 약점 데이터베이스, 상기 제1 프로그래밍 언어를 기반으로 제작된 제1 프로그램에 대한 보안 약점 탐지 명령이 입력되면, 상기 제1 프로그램의 소스코드 상에 포함되어 있는 적어도 하나의 명령어 각각이 변수로 참조하는 참조 데이터의 속성 정보를 확인하는 속성 정보 확인부, 상기 보안 약점 데이터베이스를 참조하여 상기 적어도 하나의 명령어 중 상기 보안 약점으로 미리 지정된 속성 정보를 갖는 참조 데이터를 변수로 참조하는 적어도 하나의 제1 명령어를 추출하는 명령어 추출부 및 상기 제1 프로그램의 소스코드로부터 상기 적어도 하나의 제1 명령어가 기록되어 있는 라인(line)에 대한 위치 정보를 추출하여 상기 적어도 하나의 제1 명령어가 기록되어 있는 라인에 대한 위치 정보를 보안 약점 탐지 결과로 디스플레이하는 보안 약점 디스플레이부를 포함한다.A source code security weakness detection device according to an embodiment of the present invention may include attribute information for reference data previously designated as a security weakness for each of a plurality of instructions available in the program source code based on the first programming language A weak weak point database in which at least one instruction contained in the source code of the first program is inputted, and a weak weak point detection instruction for the first program prepared based on the first programming language, A security weak point database, and a security weak point database, the security weak point database including at least one item of reference data having reference attribute data designated in advance as the security weak point, 1 < / RTI > Extracting positional information of a line on which the at least one first instruction is written from the source code of the graphic and displaying positional information of the line on which the at least one first instruction is recorded as a result of weakness detection And a security weakness display unit.
또한, 본 발명의 일실시예에 따른 소스코드 보안 약점 탐지 방법은 제1 프로그래밍 언어에 기초한 프로그램 소스코드에서 사용 가능한 복수의 명령어들 각각에 대해, 보안 약점으로 미리 지정된 참조 데이터에 대한 속성 정보가 저장되어 있는 보안 약점 데이터베이스를 유지하는 단계, 상기 제1 프로그래밍 언어를 기반으로 제작된 제1 프로그램에 대한 보안 약점 탐지 명령이 입력되면, 상기 제1 프로그램의 소스코드 상에 포함되어 있는 적어도 하나의 명령어 각각이 변수로 참조하는 참조 데이터의 속성 정보를 확인하는 단계, 상기 보안 약점 데이터베이스를 참조하여 상기 적어도 하나의 명령어 중 상기 보안 약점으로 미리 지정된 속성 정보를 갖는 참조 데이터를 변수로 참조하는 적어도 하나의 제1 명령어를 추출하는 단계 및 상기 제1 프로그램의 소스코드로부터 상기 적어도 하나의 제1 명령어가 기록되어 있는 라인에 대한 위치 정보를 추출하여 상기 적어도 하나의 제1 명령어가 기록되어 있는 라인에 대한 위치 정보를 보안 약점 탐지 결과로 디스플레이하는 단계를 포함한다.Also, the method for detecting a source code security weakness according to an embodiment of the present invention is characterized in that, for each of a plurality of commands available in the program source code based on the first programming language, attribute information for reference data previously designated as a security weak point is stored The method comprising the steps of: maintaining a security vulnerability database in which the first vulnerability is detected, when the security weakness detection command for the first program based on the first programming language is input, Identifying at least one of the at least one of the at least one instruction as the variable with reference to the reference data having the attribute information pre-specified as the weak point, with reference to the security weakness database, A step of extracting a command and a step of extracting Extracting position information on a line on which the at least one first command is recorded from the scan code and displaying position information on the line on which the at least one first command is recorded as a result of detecting the weakness .
본 발명의 실시예들은 프로그램의 소스코드(source code) 내에 존재하는 보안 약점을 정확하게 탐지하고, 그에 대한 결과를 프로그램 개발자에게 제공해 줌으로써, 프로그램 개발자가 소스코드 내에 존재하는 보안 약점을 손쉽게 교정할 수 있도록 지원할 수 있다.Embodiments of the present invention allow a program developer to easily correct security weaknesses present in the source code by accurately detecting security weaknesses present in the source code of the program and providing the results to the program developer .
또한, 본 발명의 실시예들은 개발자가 소스코드 내의 일정 부분에 대해 보안 약점으로 탐지되지 않도록 지정하면, 추후 보안 약점 탐지 과정을 재수행할 때, 개발자에 의해 지정된 부분이 더 이상 보안 약점으로 탐지되지 않도록 함으로써, 개발자가 반복적인 보안 약점 검증과정을 수행할 때, 소스코드 내에 존재하는 보안 약점을 손쉽게 파악 및 교정할 수 있도록 지원할 수 있고, 이와 동시에 보안 약점 탐지 과정에 발생할 수 있는 오탐지의 가능성을 줄일 수 있다.In the embodiments of the present invention, when a developer designates that a certain portion of the source code is not detected as a security weakness, when the security weakness detection process is re-executed in the future, the portion designated by the developer is no longer detected as a security weakness Thereby enabling the developer to easily grasp and correct security weaknesses present in the source code when performing a repeated security weakness verification process and at the same time reduce the possibility of false positives that may occur during the security weakness detection process .
도 1은 본 발명의 일실시예에 따른 소스코드(source code) 보안 약점 탐지 장치의 구조를 도시한 도면이다.
도 2는 본 발명의 일실시예에 따른 소스코드 보안 약점 탐지 방법을 도시한 순서도이다.1 is a diagram illustrating a structure of a source code security weakness detection apparatus according to an embodiment of the present invention.
2 is a flowchart illustrating a source code security weakness detection method according to an 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.
어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. 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, embodiments according to the present invention will be described in detail with reference to the accompanying drawings.
도 1은 본 발명의 일실시예에 따른 소스코드(source code) 보안 약점 탐지 장치의 구조를 도시한 도면이다.1 is a diagram illustrating a structure of a source code security weakness detection apparatus according to an embodiment of the present invention.
도 1을 참조하면, 본 발명의 일실시예에 따른 소스코드 보안 약점 탐지 장치(110)는 보안 약점 데이터베이스(111), 속성 정보 확인부(112), 명령어 추출부(113) 및 보안 약점 디스플레이부(114)를 포함한다.1, a source code security
보안 약점 데이터베이스(111)에는 제1 프로그래밍 언어에 기초한 프로그램 소스코드에서 사용 가능한 복수의 명령어들 각각에 대해, 보안 약점으로 미리 지정된 참조 데이터에 대한 속성 정보가 저장되어 있다.The
예컨대, 상기 제1 프로그래밍 언어가 '자바(Java)'라는 프로그래밍 언어라고 가정하면, 보안 약점 데이터베이스(111)에는 하기의 표 1과 같은 형태로 '자바'기반의 프로그래밍 언어에 기초한 프로그램 소스코드에서 사용할 수 있는 복수의 명령어들 각각에 대해, 각 명령어들이 참조 데이터를 변수로 참조할 경우, 보안상 약점으로 적용될 수 있을 것으로 판단되는 참조 데이터에 대한 속성 정보가 개발자에 의해 미리 지정되어 있을 수 있다.
For example, assuming that the first programming language is a programming language called Java, the
null 속성
…External Data Properties
null property
...
속성 2
…Attribute 1
Attribute 2
...
속성 정보 확인부(112)는 상기 제1 프로그래밍 언어를 기반으로 제작된 제1 프로그램에 대한 보안 약점 탐지 명령이 입력되면, 상기 제1 프로그램의 소스코드 상에 포함되어 있는 적어도 하나의 명령어 각각이 변수로 참조하는 참조 데이터의 속성 정보를 확인한다.When the security weak point detection command for the first program produced on the basis of the first programming language is input, the attribute
명령어 추출부(113)는 보안 약점 데이터베이스(111)를 참조하여 상기 적어도 하나의 명령어 중 상기 보안 약점으로 미리 지정된 속성 정보를 갖는 참조 데이터를 변수로 참조하는 적어도 하나의 제1 명령어를 추출한다.The
보안 약점 디스플레이부(114)는 상기 제1 프로그램의 소스코드로부터 상기 적어도 하나의 제1 명령어가 기록되어 있는 라인(line)에 대한 위치 정보를 추출하여 상기 적어도 하나의 제1 명령어가 기록되어 있는 라인에 대한 위치 정보를 보안 약점 탐지 결과로 디스플레이한다.The security weak
이하에서는 본 발명의 일실시예에 따른 소스코드 보안 약점 탐지 장치(110)의 동작에 대해 예를 들어 상세히 설명하기로 한다.Hereinafter, the operation of the source code security
먼저, 보안 약점 데이터베이스(111) 상에는 상기 표 1과 같은 형태로 정보가 저장되어 있고, 프로그램 개발자는 '자바' 기반의 프로그래밍 언어를 이용하여 하기의 표 2에서 나타낸 프로그램 소스코드로 구성된 제1 프로그램을 개발한다고 가정한다.
First, information is stored in the
if(name != null)
{
File file = new File("/usr/local/download/" + name);
if (file != null)
}String name = request.getProperty ("filename");
if (name! = null)
{
File file = new File ("/ usr / local / download /" + name);
if (file! = null)
}
관련하여, 상기 표 2에서 나타낸 프로그램의 소스코드는 소정의 클라이언트 단말이 "http://www.softforum.com/download.do?filename=report.hwp"라는 형태의 URL에 접속한 후 서버에 대해 "report.hwp"라는 파일에 대한 다운로드를 요청한다고 할 때, 상기 서버가 상기 클라이언트 단말에 대해 "report.hwp"라는 파일을 전송해 주기 위해 "report.hwp"라는 파일을 읽어오도록 제어하는 소스코드의 일부분이다.In connection with the source code of the program shown in Table 2, a predetermined client terminal accesses a URL of the form "http://www.softforum.com/download.do?filename=report.hwp" the server requests the download of the file "report.hwp ", the source code for controlling the server to read the file" report.hwp " .
상기 제1 프로그램에 대한 개발자가 상기 표 2와 같은 소스코드를 작성한 후 상기 제1 프로그램에 대한 보안 약점 탐지 명령을 인가하면, 속성 정보 확인부(112)는 상기 제1 프로그램의 소스코드 상에 포함되어 있는 적어도 하나의 명령어 각각이 변수로 참조하는 참조 데이터의 속성 정보를 확인할 수 있다.If the developer of the first program generates the source code as shown in Table 2 and then applies the security weakness detection command to the first program, the attribute
그리고 나서, 명령어 추출부(113)는 보안 약점 데이터베이스(111)를 참조하여 상기 적어도 하나의 명령어 중 상기 보안 약점으로 미리 지정된 속성 정보를 갖는 참조 데이터를 변수로 참조하는 적어도 하나의 제1 명령어를 추출할 수 있다.Then, the
상기 표 2에서 나타낸 소스코드 상에서는 "request.getProperty("filename")"라는 명령어를 통해 "name"이라는 변수에 외부의 클라이언트 단말이 다운로드를 요청하는 파일인 "filename"이 지정되고, 이로 인해, "name"이라는 변수에 외부 데이터 속성이 부여된 후 상기 서버가 "new File("/usr/local/download/" + name)"이라는 명령어를 통해 외부 데이터 속성을 갖는 "name"이라는 데이터를 변수로 참조하여 상기 클라이언트 단말이 다운로드를 요청하는 파일을 읽어오도록 되어 있다는 점에서, 명령어 추출부(113)는 보안 약점 데이터베이스(111) 상에 "new File()"이라는 명령어에 대해 "외부 데이터 속성"이라는 속성 정보가 보안 약점으로 지정되어 있기 때문에 상기 표 2에서 나타낸 소스코드 상에 존재하는 명령어들 중 "new File("/usr/local/download/" + name)"이라는 명령어를 보안 약점에 해당되는 명령어로 추출할 수 있다.In the source code shown in Table 2, "filename", which is a file for requesting download from an external client terminal, is specified to a variable "name" through a command "request.getProperty (" filename ")" name "is assigned to a variable named" name "and then the server refers to the data" name "having an external data attribute as a variable through the command" new File ("/ usr / local / download /" + name) , The
그리고 나서, 보안 약점 디스플레이부(114)는 상기 제1 프로그램의 소스코드로부터 상기 추출된 "new File("/usr/local/download/" + name)"이라는 명령어가 기록되어 있는 라인에 대한 위치 정보를 추출하여 상기 추출된 라인에 대한 위치 정보를 보안 약점 탐지 결과로 디스플레이할 수 있다.Then, the security weak
관련하여, 보안 약점 디스플레이부(114)는 하기의 표 3과 같이, 상기 제1 프로그램의 소스코드가 표시되는 화면 상에서 "new File("/usr/local/download/" + name)"이라는 명령어가 기록되어 있는 라인을 굵게 표시하면서, 해당 라인을 기울임체로 변경하는 등의 방식으로 표시함으로써, 상기 제1 프로그램의 개발자가 보안 약점 탐지 결과를 쉽게 확인할 수 있도록 보조할 수 있다.
The security weak
if(name != null)
{
File file = new File ("/ usr / local / download /" + name );
if (file != null)
}String name = request.getProperty ("filename");
if (name! = null)
{
File file = new File ("/ usr / local / download /" + name );
if (file! = null)
}
이때, 본 발명의 일실시예에 따르면, 소스코드 보안 약점 탐지 장치(110)는 보안 약점 예외 지정부(115)를 더 포함할 수 있다.In this case, according to an embodiment of the present invention, the source code security
보안 약점 예외 지정부(115)는 상기 적어도 하나의 제1 명령어 중 적어도 하나의 제2 명령어에 대한 보안 약점 예외 지정 명령이 입력되면, 보안 약점 데이터베이스(111) 상에서 상기 적어도 하나의 제2 명령어에 대해 보안 약점으로 미리 지정되어 있는 속성 정보 중 상기 적어도 하나의 제2 명령어가 변수로 참조하는 참조 데이터의 속성 정보에 대해 보안 약점 예외 지정을 수행한다.The security weakness
이때, 본 발명의 일실시예에 따르면, 속성 정보 확인부(112)는 상기 보안 약점 예외 지정이 수행된 이후, 상기 제1 프로그램에 대한 보안 약점 탐지 명령이 재입력되면, 상기 적어도 하나의 명령어 각각이 변수로 참조하는 참조 데이터의 속성 정보를 재확인할 수 있다.According to an embodiment of the present invention, after the security weakness exception is designated, the attribute
그리고, 명령어 추출부(113)는 보안 약점 데이터베이스(111)를 참조하여 상기 적어도 하나의 명령어 중 상기 적어도 하나의 제1 명령어로부터 상기 보안 약점 예외 지정이 수행된 상기 적어도 하나의 제2 명령어가 제외된 적어도 하나의 제3 명령어를 추출할 수 있고, 보안 약점 디스플레이부(114)는 상기 제1 프로그램의 소스코드로부터 상기 적어도 하나의 제3 명령어가 기록되어 있는 라인에 대한 위치 정보를 추출하여 상기 적어도 하나의 제3 명령어가 기록되어 있는 라인에 대한 위치 정보를 보안 약점 탐지 결과로 디스플레이할 수 있다.The
앞서, 상기 표 2를 이용한 실시예에서 보안 약점 디스플레이부(114)가 표 3과 같은 화면을 표시함으로써, 상기 제1 프로그램의 개발자는 상기 제1 프로그램의 소스코드에서 "new File("/usr/local/download/" + name)"이라는 명령어가 기록되어 있는 라인이 보안 약점임을 확인할 수 있었다.In the embodiment using Table 2, the security weak
이로부터 상기 제1 프로그램의 개발자는 소스코드의 수정을 통해 "new File()"이라는 명령어가 변수로 참조하는 데이터를 외부 데이터가 아닌 시스템 내부의 데이터로 변경할 수도 있지만, 상기 제1 프로그램의 소스코드는 외부의 클라이언트 단말이 요청하는 파일에 대한 다운로드를 지원하기 위한 소스코드라는 점에서 상기 개발자는 "new File()"이라는 명령어가 변수로 참조하는 데이터의 속성 자체를 변경할 수 없을 것이다.From this, the developer of the first program can change the data referred to by the variable "new File () " as a variable through data in the system instead of the external data through modification of the source code. Is a source code for supporting downloading of a file requested by an external client terminal, the developer will not be able to change the attribute of the data referenced by the variable " new File () "
따라서, 상기 개발자는 서버가 외부의 클라이언트 단말이 요청하는 파일에 대한 다운로드를 정상적으로 지원하도록 하면서, 상기 클라이언트 단말의 비정상적 접근으로 인해 다운로드되면 안 되는 파일이 상기 클라이언트 단말에 다운로드되는 것을 막기 위해, 하기의 표 4와 같이, 상기 제1 프로그램의 소스코드 상에 특정 외부 데이터의 다운로드를 막기 위한 소정의 코드를 추가로 작성할 수 있을 것이다.
Therefore, in order for the server to normally support the download of the file requested by the external client terminal while preventing the download of the file that should not be downloaded due to the abnormal access of the client terminal to the client terminal, As shown in Table 4, a predetermined code for preventing downloading of specific external data on the source code of the first program may be additionally created.
if(name != null)
{
name = name.replaceAll("/", "").replaceAll(".", "");
File file = new File("/usr/local/download/" + name);
if (file != null)
}String name = request.getProperty ("filename");
if (name! = null)
{
name = name.replaceAll ("/", "") .replaceAll (".", "");
File file = new File ("/ usr / local / download /" + name);
if (file! = null)
}
상기 표 4에서 나타낸 소스코드는 외부의 클라이언트 단말이 "http://www.softforum.com/download.do?filename=../../../password.hwp"라는 형태의 URL에 접속한 후 서버에 대해 상위 디렉토리에 저장되어 있는 "password.hwp"라는 파일에 대한 다운로드를 요청한다고 할 때, 상기 서버가 파일 이름으로 지정된 "../../../password.hwp" 중에서 특수문자인 "../../../"를 모두 삭제함으로써, 상위 디렉토리에 저장되어 있는 "password.hwp"라는 파일이 상기 클라이언트 단말로 다운로드되는 것을 막으면서, 일반적인 파일의 다운로드는 지원 가능하도록 제어하는 소스코드이다.The source code shown in Table 4 is obtained when an external client terminal accesses a URL of the form "http://www.softforum.com/download.do?filename=../../../password.hwp"Quot; password.hwp "stored in the parent directory with respect to the server, the server sends a special character" ../../../password.hwp " Quot; password.hwp "stored in the upper directory is prevented from being downloaded to the client terminal by deleting all" ../../../ " Source code.
이렇게, 상기 제1 프로그램의 개발자가 상기 표 4와 같이 소스코드를 작성하게 되면, 상기 제1 프로그램에서의 보안 약점이 해소된 것임에도 불구하고, 앞서, 소스코드 보안 약점을 탐지하는 과정이 다시 수행되게 된다면, "new File("/usr/local/download/" + name)"이라는 명령어가 기록되어 있는 라인이 다시 보안 약점으로 탐지될 수 있을 것이다.Thus, if the developer of the first program writes the source code as shown in Table 4, the process of detecting the source code security weakness is performed again even though the security weakness in the first program is solved The line with the command "new File (/ usr / local / download /" + name) "will be detected again as a security weakness.
따라서, 상기 개발자는 "new File("/usr/local/download/" + name)"이라는 명령어가 기록되어 있는 라인이 보안 약점으로 탐지되지 않도록 하기 위해 앞서, 보안 약점으로 탐지되었던 "new File("/usr/local/download/" + name)"이라는 명령어에 대해 보안 약점 예외 지정 명령을 입력할 수 있고, 이때, 보안 약점 예외 지정부(115)는 보안 약점 데이터베이스(111) 상에서 "new File()"이라는 명령어에 대해 보안 약점으로 미리 지정되어 있는 속성 정보 중 상기 제1 프로그램의 소스코드 상에서 "new File("/usr/local/download/" + name)"이라는 명령어를 통해 참조되는 변수 "name"의 속성 정보인 "외부 데이터 속성"이라는 속성 정보에 대해 보안 약점 예외 지정을 수행할 수 있다.Therefore, in order to prevent a line containing the command "new File (/ usr / local / download /" + name) "from being detected as a security weakness, the security weak point
이렇게, 상기 보안 약점 예외 지정이 수행된 이후, 상기 제1 프로그램에 대한 보안 약점 탐지 명령이 재입력되면, 속성 정보 확인부(112)는 상기 제1 프로그램의 소스코드 상에 포함되어 있는 적어도 하나의 명령어 각각이 변수로 참조하는 참조 데이터의 속성 정보를 확인할 수 있고, 명령어 추출부(113)는 보안 약점 데이터베이스(111)를 참조하여 상기 적어도 하나의 명령어 중 보안 약점에 해당되는 명령어로 "new File("/usr/local/download/" + name)"이라는 명령어를 추출해야 하지만, 보안 약점 데이터베이스(111) 상에 "new File()"이라는 명령어에 대해 변수 "name"의 속성 정보인 "외부 데이터 속성"에 대한 속성 정보가 보안 약점 예외로 지정되어 있기 때문에 명령어 추출부(113)는 "new File("/usr/local/download/" + name)"이라는 명령어를 보안 약점으로 추출하지 않을 수 있다.When the security weakness detection command for the first program is re-inputted after the security weakness exception designation is performed, the attribute
이로 인해, 보안 약점 디스플레이부(114)는 상기 제1 프로그램의 소스코드 중 "new File("/usr/local/download/" + name)"이라는 명령어가 기록되어 있는 라인에 대한 위치 정보를 더 이상 보안 약점 탐지 결과로 디스플레이하지 않을 수 있다.Therefore, the security
본 발명의 일실시예에 따르면, 소스코드 보안 약점 탐지 장치(110)는 명령어 선택부(116)를 더 포함할 수 있다.According to an embodiment of the present invention, the source code security
명령어 선택부(116) 상기 적어도 하나의 제3 명령어가 추출되면, 상기 적어도 하나의 제3 명령어 중, 상기 적어도 하나의 제2 명령어가 적용되는 소스코드 상의 동일 스코프(scope) 내에서 상기 적어도 하나의 제2 명령어가 변수로 참조하는 참조 데이터와 동일한 데이터를 변수로 참조하는 명령어가 제외된 적어도 하나의 제4 명령어를 선택한다.An instruction selector (116), wherein when said at least one third instruction is extracted, said at least one third instruction, in the same scope on the source code to which said at least one second instruction is applied, And selects at least one fourth instruction from which the instruction referring to the same data as the reference data referenced by the second instruction as a variable is excluded.
이때, 보안 약점 디스플레이부(114)는 상기 제1 프로그램의 소스코드로부터 상기 적어도 하나의 제4 명령어가 기록되어 있는 라인에 대한 위치 정보를 추출하여 상기 적어도 하나의 제4 명령어가 기록되어 있는 라인에 대한 위치 정보를 보안 약점 탐지 결과로 디스플레이할 수 있다.At this time, the security weak
예컨대, 상기 표 4에서 나타낸 소스코드 중 하기의 표 5와 같이 "new File("/usr/local/download/" + name)"이라는 명령어 이외에 별도의 "명령어 2"라고 하는 명령어와 "명령어 1"이라는 명령어가 추가로 존재하고, 상기 "명령어 2"가 "name"이라는 변수를 참조 데이터로 이용하고 있고, 상기 "명령어 1"이 "속성 1"에 해당되는 속성 정보를 갖는 참조 데이터를 변수로 이용하고 있다고 가정하자.
For example, in addition to the command "new File (/ usr / local / download /" + name) ", a separate command " command 2 "Quot; command 2 "is used as reference data, and the" instruction 1 "uses the reference data having the attribute information corresponding to the" attribute 1 " .
if(name != null)
{
name = name.replaceAll("/", "").replaceAll(".", "");
File file = new File("/usr/local/download/" + name);
if (file != null)
명령어 2(name);
}
…
명령어 1(속성 1을 갖는 데이터)String name = request.getProperty ("filename");
if (name! = null)
{
name = name.replaceAll ("/", "") .replaceAll (".", "");
File file = new File ("/ usr / local / download /" + name);
if (file! = null)
Command 2 (name);
}
...
Command 1 (data with attribute 1)
상기 표 5와 같이 소스코드가 구성되어 있고, 여기서, 개발자가 "new File("/usr/local/download/" + name)"이라는 명령어에 대해서만 보안 약점 예외 지정을 수행한 후 보안 약점 탐지 명령을 입력하면, 먼저, 속성 정보 확인부(112)는 상기 제1 프로그램의 소스코드 상에 포함되어 있는 적어도 하나의 명령어 각각이 변수로 참조하는 참조 데이터의 속성 정보를 확인할 수 있다.The source code is configured as shown in Table 5. Here, the developer performs security weak point detection only for the command "new File (/ usr / local / download /" + name) The attribute
그리고, 명령어 추출부(113)는 보안 약점 데이터베이스(111)를 참조하여 상기 적어도 하나의 명령어 중 보안 약점에 해당되는 명령어로 우선 "new File("/usr/local/download/" + name)"과 "명령어 2" 및 "명령어 1"을 확인할 수 있고, 보안 약점 데이터베이스(111) 상에 "new File()"이라는 명령어는 "외부 데이터 속성"에 대한 속성 정보가 보안 약점 예외로 지정되어 있기 때문에 명령어 추출부(113)는 "new File("/usr/local/download/" + name)"과 "명령어 2" 및 "명령어 1" 중 최종적으로 "명령어 2"와 "명령어 1"만을 보안 약점으로 추출해 낼 수 있다.Then, the
이렇게, "명령어 2"와 "명령어 1"이 보안 약점으로 추출되었지만, "명령어 2"는 상기 표 5에서 나타낸 소스코드 상에서 "{"와 "}"를 통해 보안 약점 예외로 지정된 "new File("/usr/local/download/" + name)"과 동일한 스코프 내에서 적용되는 명령어이고, "명령어 2"가 변수로 참조하는 참조 데이터 또한 보안 약점 예외로 지정된 "new File("/usr/local/download/" + name)"이 변수로 참조하는 참조 데이터와 동일하다 점에서 "명령어 2"를 "new File("/usr/local/download/" + name)"과 별도로 분리하여 적용되는 명령어로 볼 수 없기 때문에 명령어 선택부(116)는 앞서 보안 약점으로 추출된 "명령어 2"와 "명령어 1" 중 "명령어 2"가 제외된 "명령어 1"만을 보안 약점에 해당되는 명령어로 최종 선택할 수 있다.In this way, "Command 2" and "Command 1" are extracted as security weaknesses, and "Command 2" is the "New File (" / usr / local / download "/ usr / local / download /" + name) "and reference data referenced by" command 2 " / usr / local / download / "+ name)", which is the same as the reference data referenced by this variable. , The
이렇게, "명령어 1"이 보안 약점으로 최종 선택되면, 보안 약점 디스플레이부(114)는 상기 제1 프로그램의 소스코드로부터 상기 "명령어 1"이 기록되어 있는 라인에 대한 위치 정보를 추출하여 상기 "명령어 1"이 기록되어 있는 라인에 대한 위치 정보를 보안 약점 탐지 결과로 디스플레이할 수 있다.When the " command 1 "is finally selected as a security weak point, the security weak
도 2는 본 발명의 일실시예에 따른 소스코드 보안 약점 탐지 방법을 도시한 순서도이다.2 is a flowchart illustrating a source code security weakness detection method according to an embodiment of the present invention.
단계(S210)에서는 제1 프로그래밍 언어에 기초한 프로그램 소스코드에서 사용 가능한 복수의 명령어들 각각에 대해, 보안 약점으로 미리 지정된 참조 데이터에 대한 속성 정보가 저장되어 있는 보안 약점 데이터베이스를 유지한다.In step S210, for each of a plurality of instructions usable in the program source code based on the first programming language, a security weakness database in which attribute information on reference data previously designated as a security weak point is stored.
단계(S220)에서는 상기 제1 프로그래밍 언어를 기반으로 제작된 제1 프로그램에 대한 보안 약점 탐지 명령이 입력되면, 상기 제1 프로그램의 소스코드 상에 포함되어 있는 적어도 하나의 명령어 각각이 변수로 참조하는 참조 데이터의 속성 정보를 확인한다.In step S220, when a security weak point detection command for the first program produced on the basis of the first programming language is inputted, each of at least one command included in the source code of the first program is referred to as a variable Check the attribute information of the reference data.
단계(S230)에서는 상기 보안 약점 데이터베이스를 참조하여 상기 적어도 하나의 명령어 중 상기 보안 약점으로 미리 지정된 속성 정보를 갖는 참조 데이터를 변수로 참조하는 적어도 하나의 제1 명령어를 추출한다.In step S230, the at least one first instruction referring to the reference data having the attribute information previously designated as the weak point among the at least one instruction is referred to as a variable by referring to the weak point database.
단계(S240)에서는 상기 제1 프로그램의 소스코드로부터 상기 적어도 하나의 제1 명령어가 기록되어 있는 라인에 대한 위치 정보를 추출하여 상기 적어도 하나의 제1 명령어가 기록되어 있는 라인에 대한 위치 정보를 보안 약점 탐지 결과로 디스플레이한다.In step S240, location information on the line on which the at least one first command is written is extracted from the source code of the first program, and position information on the line on which the at least one first command is recorded is secured Displayed as weakness detection result.
이때, 본 발명의 일실시예에 따르면, 상기 소스코드 보안 약점 탐지 방법은 단계(S240)이후에 상기 적어도 하나의 제1 명령어 중 적어도 하나의 제2 명령어에 대한 보안 약점 예외 지정 명령이 입력되면, 상기 보안 약점 데이터베이스 상에서 상기 적어도 하나의 제2 명령어에 대해 보안 약점으로 미리 지정되어 있는 속성 정보 중 상기 적어도 하나의 제2 명령어가 변수로 참조하는 참조 데이터의 속성 정보에 대해 보안 약점 예외 지정을 수행하는 단계를 더 포함할 수 있다.According to an embodiment of the present invention, when the security weakness exception designation command for at least one of the at least one first command is input after step S240, A security weakness exception designation is performed on attribute information of reference data referred to as a variable by the at least one second instruction among attribute information previously designated as a security weakness for the at least one second instruction on the security weakness database Step < / RTI >
또한, 본 발명의 일실시예에 따르면, 상기 소스코드 보안 약점 탐지 방법은 상기 보안 약점 예외 지정이 수행된 이후, 상기 제1 프로그램에 대한 보안 약점 탐지 명령이 재입력되면, 상기 적어도 하나의 명령어 각각이 변수로 참조하는 참조 데이터의 속성 정보를 재확인하는 단계, 상기 보안 약점 데이터베이스를 참조하여 상기 적어도 하나의 명령어 중 상기 적어도 하나의 제1 명령어로부터 상기 보안 약점 예외 지정이 수행된 상기 적어도 하나의 제2 명령어가 제외된 적어도 하나의 제3 명령어를 추출하는 단계 및 상기 제1 프로그램의 소스코드로부터 상기 적어도 하나의 제3 명령어가 기록되어 있는 라인에 대한 위치 정보를 추출하여 상기 적어도 하나의 제3 명령어가 기록되어 있는 라인에 대한 위치 정보를 보안 약점 탐지 결과로 디스플레이하는 단계를 더 포함할 수 있다.According to an embodiment of the present invention, when the security weak point detection command for the first program is re-inputted after the security weak point exception is specified, the source code security weak point detection method further comprises: Redefining attribute information of the reference data referenced by the variable; referring to the security weakness database to determine whether the security weakness exception specification is performed from the at least one first instruction of the at least one instruction, Extracting from the source code of the first program at least one third instruction from which the at least one third instruction is excluded and extracting position information for the line in which the at least one third instruction is recorded, The position information of the recorded line is displayed as the result of security weakness detection. And the like.
이때, 본 발명의 일실시예에 따르면, 상기 소스코드 보안 약점 탐지 방법은 상기 적어도 하나의 제3 명령어가 추출되면, 상기 적어도 하나의 제3 명령어 중, 상기 적어도 하나의 제2 명령어가 적용되는 소스코드 상의 동일 스코프 내에서 상기 적어도 하나의 제2 명령어가 변수로 참조하는 참조 데이터와 동일한 데이터를 변수로 참조하는 명령어가 제외된 적어도 하나의 제4 명령어를 선택하는 단계 및 상기 제1 프로그램의 소스코드로부터 상기 적어도 하나의 제4 명령어가 기록되어 있는 라인에 대한 위치 정보를 추출하여 상기 적어도 하나의 제4 명령어가 기록되어 있는 라인에 대한 위치 정보를 보안 약점 탐지 결과로 디스플레이하는 단계를 더 포함할 수 있다.According to an embodiment of the present invention, when the at least one third instruction is extracted, the source code security weak point detection method may further include, when the at least one third instruction is extracted, Selecting at least one fourth instruction in the same scope on the code from which the instruction referring to the same data as the reference data referenced by the at least one second instruction as a variable is excluded; Further comprising the step of extracting positional information on a line on which the at least one fourth command is written and displaying positional information on the line on which the at least one fourth command is written as a result of detecting weakness have.
이상, 도 2를 참조하여 본 발명의 일실시예에 따른 소스코드 보안 약점 탐지 방법에 대해 설명하였다. 여기서, 본 발명의 일실시예에 따른 소스코드 보안 약점 탐지 방법은 도 1을 이용하여 설명한 소스코드 보안 약점 탐지 장치(110)의 동작에 대한 구성과 대응될 수 있으므로, 이에 대한 보다 상세한 설명은 생략하기로 한다.The method for detecting a source code security weakness according to an embodiment of the present invention has been described above with reference to FIG. Here, the source code security weakness detection method according to an embodiment of the present invention can correspond to the configuration of the operation of the source code security
본 발명의 일실시예에 따른 소스코드 보안 약점 탐지 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 본 발명의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The source code security weakness detection method according to an embodiment of the present invention may be implemented in the form of a program command which can be executed through various computer means and recorded in 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 CD-ROMs and DVDs; magnetic media such as floppy disks; Magneto-optical media, and hardware devices specifically configured to store and execute 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. The hardware devices described above may be configured to operate as one or more software modules to perform the operations of the present invention, and vice versa.
이상과 같이 본 발명에서는 구체적인 구성 요소 등과 같은 특정 사항들과 한정된 실시예 및 도면에 의해 설명되었으나 이는 본 발명의 보다 전반적인 이해를 돕기 위해서 제공된 것일 뿐, 본 발명은 상기의 실시예에 한정되는 것은 아니며, 본 발명이 속하는 분야에서 통상적인 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능하다. As described above, the present invention has been described with reference to particular embodiments, such as specific elements, and specific embodiments and drawings. However, it should be understood that the present invention is not limited to the above- And various modifications and changes may be made thereto by those skilled in the art to which the present invention pertains.
따라서, 본 발명의 사상은 설명된 실시예에 국한되어 정해져서는 아니되며, 후술하는 특허청구범위뿐 아니라 이 특허청구범위와 균등하거나 등가적 변형이 있는 모든 것들은 본 발명 사상의 범주에 속한다고 할 것이다.Accordingly, the spirit of the present invention should not be construed as being limited to the embodiments described, and all of the equivalents or equivalents of the claims, as well as the following claims, belong to the scope of the present invention .
110: 소스코드(source code) 보안 약점 탐지 장치
111: 보안 약점 데이터베이스 112: 속성 정보 확인부
113: 명령어 추출부 114: 보안 약점 디스플레이부
115: 보안 약점 예외 지정부 116: 명령어 선택부110: Source code security weakness detection
111: Security weak point database 112: Property information verification unit
113: command extracting unit 114: security weak point display unit
115: Security weakness exception specification part 116: Command selection part
Claims (9)
상기 제1 프로그래밍 언어를 기반으로 제작된 제1 프로그램에 대한 보안 약점 탐지 명령이 입력되면, 상기 제1 프로그램의 소스코드 상에 포함되어 있는 적어도 하나의 명령어 각각이 변수로 참조하는 참조 데이터의 속성 정보를 확인하는 속성 정보 확인부;
상기 보안 약점 데이터베이스를 참조하여 상기 적어도 하나의 명령어 중 상기 보안 약점으로 미리 지정된 속성 정보를 갖는 참조 데이터를 변수로 참조하는 적어도 하나의 제1 명령어를 추출하는 명령어 추출부;
상기 제1 프로그램의 소스코드로부터 상기 적어도 하나의 제1 명령어가 기록되어 있는 라인(line)에 대한 위치 정보를 추출하여 상기 적어도 하나의 제1 명령어가 기록되어 있는 라인에 대한 위치 정보를 보안 약점 탐지 결과로 디스플레이하는 보안 약점 디스플레이부; 및
상기 적어도 하나의 제1 명령어 중 적어도 하나의 제2 명령어에 대한 보안 약점 예외 지정 명령이 입력되면, 상기 보안 약점 데이터베이스 상에서 상기 적어도 하나의 제2 명령어에 대해 보안 약점으로 미리 지정되어 있는 속성 정보 중 상기 적어도 하나의 제2 명령어가 변수로 참조하는 참조 데이터의 속성 정보에 대해 보안 약점 예외 지정을 수행하는 보안 약점 예외 지정부
를 포함하고,
상기 속성 정보 확인부는
상기 보안 약점 예외 지정이 수행된 이후, 상기 제1 프로그램에 대한 보안 약점 탐지 명령이 재입력되면, 상기 적어도 하나의 명령어 각각이 변수로 참조하는 참조 데이터의 속성 정보를 재확인하고,
상기 명령어 추출부는
상기 보안 약점 데이터베이스를 참조하여 상기 적어도 하나의 명령어 중 상기 적어도 하나의 제1 명령어로부터 상기 보안 약점 예외 지정이 수행된 상기 적어도 하나의 제2 명령어가 제외된 적어도 하나의 제3 명령어를 추출하며,
상기 보안 약점 디스플레이부는
상기 제1 프로그램의 소스코드로부터 상기 적어도 하나의 제3 명령어가 기록되어 있는 라인에 대한 위치 정보를 추출하여 상기 적어도 하나의 제3 명령어가 기록되어 있는 라인에 대한 위치 정보를 보안 약점 탐지 결과로 디스플레이하는 소스코드 보안 약점 탐지 장치.A security weakness database in which attribute information for reference data previously designated as a security weakness is stored for each of a plurality of instructions usable in program source code based on a first programming language;
When a security weak point detection command for a first program produced on the basis of the first programming language is inputted, each of at least one instruction included in the source code of the first program is used as attribute information An attribute information confirmation unit for confirming the attribute information;
A command extracting unit for extracting at least one first instruction referring to the security weakness database as a variable, with reference data having attribute information previously designated as the security weak point among the at least one instruction;
Extracting positional information on a line on which the at least one first command is written from the source code of the first program to detect positional information on the line on which the at least one first command is recorded, A security weakness display unit displaying the result; And
Wherein when a security weakness exception designation command for at least one of the at least one first command is input, the security weakness database designates, as the security weak point for the at least one second command, A security weak point exception specifying unit for designating a security weak point exception to attribute information of reference data referenced by at least one second instruction word as a variable;
Lt; / RTI >
The attribute information checking unit
When the security weak point detection instruction for the first program is re-input after the security weak point exception designation is performed, the at least one instruction word reaffirms attribute information of the reference data referred to as a variable,
The instruction extracting unit
Extracting at least one third instruction from the at least one first instruction among the at least one instruction, excluding the at least one second instruction for which the security weakness exception is specified, by referring to the security weakness database,
The security vulnerability display unit
Extracting positional information on a line on which the at least one third instruction is written from the source code of the first program and displaying positional information on the line on which the at least one third instruction is written as a result of detecting a weakness Source code security weakness detection device.
상기 적어도 하나의 제3 명령어가 추출되면, 상기 적어도 하나의 제3 명령어 중, 상기 적어도 하나의 제2 명령어가 적용되는 소스코드 상의 동일 스코프(scope) 내에서 상기 적어도 하나의 제2 명령어가 변수로 참조하는 참조 데이터와 동일한 데이터를 변수로 참조하는 명령어가 제외된 적어도 하나의 제4 명령어를 선택하는 명령어 선택부
를 더 포함하고,
상기 보안 약점 디스플레이부는
상기 제1 프로그램의 소스코드로부터 상기 적어도 하나의 제4 명령어가 기록되어 있는 라인에 대한 위치 정보를 추출하여 상기 적어도 하나의 제4 명령어가 기록되어 있는 라인에 대한 위치 정보를 보안 약점 탐지 결과로 디스플레이하는 소스코드 보안 약점 탐지 장치.The method according to claim 1,
If the at least one third instruction is extracted, the at least one second instruction in the same scope on the source code to which the at least one second instruction is applied is a variable And selects at least one fourth instruction from which the instruction for referring to the same data as reference data as a variable is excluded,
Further comprising:
The security vulnerability display unit
Extracting positional information on a line on which the at least one fourth command is written from the source code of the first program and displaying positional information on the line on which the at least one fourth command is written as a result of weakness detection Source code security weakness detection device.
상기 제1 프로그래밍 언어를 기반으로 제작된 제1 프로그램에 대한 보안 약점 탐지 명령이 입력되면, 상기 제1 프로그램의 소스코드 상에 포함되어 있는 적어도 하나의 명령어 각각이 변수로 참조하는 참조 데이터의 속성 정보를 확인하는 단계;
상기 보안 약점 데이터베이스를 참조하여 상기 적어도 하나의 명령어 중 상기 보안 약점으로 미리 지정된 속성 정보를 갖는 참조 데이터를 변수로 참조하는 적어도 하나의 제1 명령어를 추출하는 단계;
상기 제1 프로그램의 소스코드로부터 상기 적어도 하나의 제1 명령어가 기록되어 있는 라인(line)에 대한 위치 정보를 추출하여 상기 적어도 하나의 제1 명령어가 기록되어 있는 라인에 대한 위치 정보를 보안 약점 탐지 결과로 디스플레이하는 단계;
상기 적어도 하나의 제1 명령어 중 적어도 하나의 제2 명령어에 대한 보안 약점 예외 지정 명령이 입력되면, 상기 보안 약점 데이터베이스 상에서 상기 적어도 하나의 제2 명령어에 대해 보안 약점으로 미리 지정되어 있는 속성 정보 중 상기 적어도 하나의 제2 명령어가 변수로 참조하는 참조 데이터의 속성 정보에 대해 보안 약점 예외 지정을 수행하는 단계;
상기 보안 약점 예외 지정이 수행된 이후, 상기 제1 프로그램에 대한 보안 약점 탐지 명령이 재입력되면, 상기 적어도 하나의 명령어 각각이 변수로 참조하는 참조 데이터의 속성 정보를 재확인하는 단계;
상기 보안 약점 데이터베이스를 참조하여 상기 적어도 하나의 명령어 중 상기 적어도 하나의 제1 명령어로부터 상기 보안 약점 예외 지정이 수행된 상기 적어도 하나의 제2 명령어가 제외된 적어도 하나의 제3 명령어를 추출하는 단계; 및
상기 제1 프로그램의 소스코드로부터 상기 적어도 하나의 제3 명령어가 기록되어 있는 라인에 대한 위치 정보를 추출하여 상기 적어도 하나의 제3 명령어가 기록되어 있는 라인에 대한 위치 정보를 보안 약점 탐지 결과로 디스플레이하는 단계
를 포함하는 소스코드 보안 약점 탐지 방법.Maintaining a security weakness database in which, for each of a plurality of instructions available in program source code based on a first programming language, attribute information for reference data previously designated as a security weakness is stored;
When a security weak point detection command for a first program produced on the basis of the first programming language is inputted, each of at least one instruction included in the source code of the first program is used as attribute information ;
Extracting at least one first instruction referring to the security weakness database as a variable with reference data having attribute information previously designated as the security weakness among the at least one instruction;
Extracting positional information on a line on which the at least one first command is written from the source code of the first program to detect positional information on the line on which the at least one first command is recorded, Displaying as a result;
Wherein when a security weakness exception designation command for at least one of the at least one first command is input, the security weakness database designates, as the security weak point for the at least one second command, Performing security weakness exception designation on attribute information of reference data that at least one second instruction refers to as a variable;
Reconfiguring attribute information of reference data referred to as a variable by each of the at least one instruction when the security weak point detection instruction for the first program is re-inputted after the security weak point exception specification is performed;
Extracting at least one third instruction from the at least one first instruction among the at least one instruction, the at least one second instruction having the security weakness exception designation removed, by referring to the security weakness database; And
Extracting positional information on a line on which the at least one third instruction is written from the source code of the first program and displaying positional information on the line on which the at least one third instruction is written as a result of detecting a weakness Step
A source code security weakness detection method.
상기 적어도 하나의 제3 명령어가 추출되면, 상기 적어도 하나의 제3 명령어 중, 상기 적어도 하나의 제2 명령어가 적용되는 소스코드 상의 동일 스코프(scope) 내에서 상기 적어도 하나의 제2 명령어가 변수로 참조하는 참조 데이터와 동일한 데이터를 변수로 참조하는 명령어가 제외된 적어도 하나의 제4 명령어를 선택하는 단계; 및
상기 제1 프로그램의 소스코드로부터 상기 적어도 하나의 제4 명령어가 기록되어 있는 라인에 대한 위치 정보를 추출하여 상기 적어도 하나의 제4 명령어가 기록되어 있는 라인에 대한 위치 정보를 보안 약점 탐지 결과로 디스플레이하는 단계
를 더 포함하는 소스코드 보안 약점 탐지 방법.6. The method of claim 5,
If the at least one third instruction is extracted, the at least one second instruction in the same scope on the source code to which the at least one second instruction is applied is a variable Selecting at least one fourth instruction excluding an instruction referring to the same data as reference data to be referred as a variable; And
Extracting positional information on a line on which the at least one fourth command is written from the source code of the first program and displaying positional information on the line on which the at least one fourth command is written as a result of weakness detection Step
The method comprising the steps of:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020140026284A KR101479516B1 (en) | 2014-03-05 | 2014-03-05 | Source code security weakness detection apparatus and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020140026284A KR101479516B1 (en) | 2014-03-05 | 2014-03-05 | Source code security weakness detection apparatus and method |
Publications (1)
Publication Number | Publication Date |
---|---|
KR101479516B1 true KR101479516B1 (en) | 2015-01-07 |
Family
ID=52587982
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020140026284A Expired - Fee Related KR101479516B1 (en) | 2014-03-05 | 2014-03-05 | Source code security weakness detection apparatus and method |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101479516B1 (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101563494B1 (en) * | 2015-05-28 | 2015-10-27 | 소프트포럼 주식회사 | Real-time source code security weaknesses detection apparatus and method according to the file changes |
KR101640479B1 (en) * | 2015-08-28 | 2016-07-18 | (주)엔키소프트 | Software vulnerability attack behavior analysis system based on the source code |
WO2017176086A1 (en) * | 2016-04-08 | 2017-10-12 | ㈜투비소프트 | Script-based application development method |
KR20200008799A (en) | 2018-07-17 | 2020-01-29 | 단국대학교 산학협력단 | System and Method for Supporting Secure Programming for PLC based on Coding Rule |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20040096238A (en) * | 2003-05-07 | 2004-11-16 | 삼성전자주식회사 | Method And System for Checking Exception of API on Source Code Level |
KR20060072353A (en) * | 2004-12-23 | 2006-06-28 | 한국전자통신연구원 | Source Code Analysis Device and Method for Web Application Vulnerability through Parameter State Tracking |
KR20080096518A (en) * | 2006-01-25 | 2008-10-30 | 마이크로소프트 코포레이션 | Computer implemented methods, computer program products, and computing systems that facilitate assessment of the risks associated with executing interpretable code |
KR20140005978A (en) * | 2011-01-28 | 2014-01-15 | 에이알엠 리미티드 | Controlling generation of debug exceptions |
-
2014
- 2014-03-05 KR KR1020140026284A patent/KR101479516B1/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20040096238A (en) * | 2003-05-07 | 2004-11-16 | 삼성전자주식회사 | Method And System for Checking Exception of API on Source Code Level |
KR20060072353A (en) * | 2004-12-23 | 2006-06-28 | 한국전자통신연구원 | Source Code Analysis Device and Method for Web Application Vulnerability through Parameter State Tracking |
KR20080096518A (en) * | 2006-01-25 | 2008-10-30 | 마이크로소프트 코포레이션 | Computer implemented methods, computer program products, and computing systems that facilitate assessment of the risks associated with executing interpretable code |
KR20140005978A (en) * | 2011-01-28 | 2014-01-15 | 에이알엠 리미티드 | Controlling generation of debug exceptions |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101563494B1 (en) * | 2015-05-28 | 2015-10-27 | 소프트포럼 주식회사 | Real-time source code security weaknesses detection apparatus and method according to the file changes |
KR101640479B1 (en) * | 2015-08-28 | 2016-07-18 | (주)엔키소프트 | Software vulnerability attack behavior analysis system based on the source code |
WO2017039136A1 (en) * | 2015-08-28 | 2017-03-09 | (주)엔키소프트 | System for analyzing attack action for vulnerable point of source code-based software |
WO2017176086A1 (en) * | 2016-04-08 | 2017-10-12 | ㈜투비소프트 | Script-based application development method |
KR20200008799A (en) | 2018-07-17 | 2020-01-29 | 단국대학교 산학협력단 | System and Method for Supporting Secure Programming for PLC based on Coding Rule |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9098636B2 (en) | White-box testing systems and/or methods in web applications | |
US9734214B2 (en) | Metadata-based test data generation | |
JP4667386B2 (en) | Business model diagram creation support program, business model diagram creation support method, and business model diagram creation support device | |
US8484638B2 (en) | Infrastructure for the automation of the assembly of schema maintenance scripts | |
US8533664B2 (en) | Method and system to automatically generate GUI object addressing queries | |
US9342538B2 (en) | Electronic device and database accessing method | |
CN109634587B (en) | Method and equipment for generating warehousing script and warehousing data | |
US9189462B2 (en) | Bidirectional text checker | |
US11256912B2 (en) | Electronic form identification using spatial information | |
KR101479516B1 (en) | Source code security weakness detection apparatus and method | |
KR20190095099A (en) | Transaction system error detection method, apparatus, storage medium and computer device | |
US20140019849A1 (en) | Extensible Content Focus Mode | |
US20200225916A1 (en) | Method and system for configuring processes of software applications using activity fragments | |
US11106571B2 (en) | Identification of input object in a graphical user interface | |
US9442719B2 (en) | Regression alerts | |
KR101563494B1 (en) | Real-time source code security weaknesses detection apparatus and method according to the file changes | |
US7814334B2 (en) | Method and apparatus for changing and adding activation keys for functions of digital content without having to change and recompile the digital content | |
KR102635847B1 (en) | Apparatus and method for application test automation | |
KR101534493B1 (en) | Source code security weakness detection apparatus and method based on structure conversion | |
CN109460236B (en) | Program version construction and checking method and system | |
KR101946904B1 (en) | Source code security weakness detection and automatic fix support apparatus, and operating method thereof | |
WO2023026467A1 (en) | Computer program, server device, terminal device, and method | |
JP2012173745A (en) | Database analysis device and database analysis program | |
CN113254011B (en) | Dynamic interface configuration method and electronic government affair system | |
US20170083297A1 (en) | Online discussing system with compiling program function and method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PA0109 | Patent application |
Patent event code: PA01091R01D Comment text: Patent Application Patent event date: 20140305 |
|
PA0201 | Request for examination | ||
PA0302 | Request for accelerated examination |
Patent event date: 20140424 Patent event code: PA03022R01D Comment text: Request for Accelerated Examination Patent event date: 20140305 Patent event code: PA03021R01I Comment text: Patent Application |
|
PE0902 | Notice of grounds for rejection |
Comment text: Notification of reason for refusal Patent event date: 20140829 Patent event code: PE09021S01D |
|
E701 | Decision to grant or registration of patent right | ||
PE0701 | Decision of registration |
Patent event code: PE07011S01D Comment text: Decision to Grant Registration Patent event date: 20141215 |
|
GRNT | Written decision to grant | ||
PR0701 | Registration of establishment |
Comment text: Registration of Establishment Patent event date: 20141230 Patent event code: PR07011E01D |
|
PR1002 | Payment of registration fee |
Payment date: 20141230 End annual number: 3 Start annual number: 1 |
|
PG1601 | Publication of registration | ||
FPAY | Annual fee payment |
Payment date: 20171201 Year of fee payment: 4 |
|
PR1001 | Payment of annual fee |
Payment date: 20171201 Start annual number: 4 End annual number: 4 |
|
FPAY | Annual fee payment |
Payment date: 20181204 Year of fee payment: 5 |
|
PR1001 | Payment of annual fee |
Payment date: 20181204 Start annual number: 5 End annual number: 5 |
|
PC1903 | Unpaid annual fee |
Termination category: Default of registration fee Termination date: 20201010 |