JPWO2016027641A1 - Vulnerability discovery device, vulnerability discovery method, and vulnerability discovery program - Google Patents

Vulnerability discovery device, vulnerability discovery method, and vulnerability discovery program Download PDF

Info

Publication number
JPWO2016027641A1
JPWO2016027641A1 JP2016543890A JP2016543890A JPWO2016027641A1 JP WO2016027641 A1 JPWO2016027641 A1 JP WO2016027641A1 JP 2016543890 A JP2016543890 A JP 2016543890A JP 2016543890 A JP2016543890 A JP 2016543890A JP WO2016027641 A1 JPWO2016027641 A1 JP WO2016027641A1
Authority
JP
Japan
Prior art keywords
program code
vulnerability
software
normalization
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.)
Granted
Application number
JP2016543890A
Other languages
Japanese (ja)
Other versions
JP6088713B2 (en
Inventor
明日香 中島
明日香 中島
誠 岩村
誠 岩村
剛男 針生
剛男 針生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Application granted granted Critical
Publication of JP6088713B2 publication Critical patent/JP6088713B2/en
Publication of JPWO2016027641A1 publication Critical patent/JPWO2016027641A1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/577Assessing vulnerabilities and evaluating computer system security
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/562Static detection
    • G06F21/563Static detection by source code analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/03Indexing scheme relating to G06F21/50, monitoring users, programs or devices to maintain the integrity of platforms
    • G06F2221/033Test or assess software

Abstract

脆弱性発見装置(10)は、脆弱性抽出部(12)と正規化処理部(14)とマッチング部(15)とを有する。脆弱性抽出部(12)は、ソフトウェアの脆弱性箇所に該当する第1のプログラムコードを抽出する。正規化処理部(14)は、脆弱性抽出部(12)により抽出された第1のプログラムコードと、脆弱性箇所の検査対象となるソフトウェアの第2のプログラムコードとに含まれるパラメータを正規化する。マッチング部(15)は、上記正規化後の第1のプログラムコードと上記正規化後の第2のプログラムコードとをマッチングし、上記第2のプログラムコードの中から、上記第1のプログラムコードと同一または類似のプログラムコードを検出する。The vulnerability discovery device (10) includes a vulnerability extraction unit (12), a normalization processing unit (14), and a matching unit (15). The vulnerability extraction unit (12) extracts the first program code corresponding to the vulnerability part of the software. The normalization processing unit (14) normalizes parameters included in the first program code extracted by the vulnerability extraction unit (12) and the second program code of the software to be inspected for the vulnerability portion. To do. A matching unit (15) matches the normalized first program code with the normalized second program code, and selects the first program code from the second program code Detect the same or similar program code.

Description

本発明は、脆弱性発見装置、脆弱性発見方法、及び脆弱性発見プログラムに関する。   The present invention relates to a vulnerability discovery device, a vulnerability discovery method, and a vulnerability discovery program.

従来、サイバー攻撃やマルウェアへの感染の要因の一つとして、ソフトウェアにおける脆弱性の存在が挙げられる。脆弱性とは、ソフトウェア中に存在するバグの内、第三者が悪意のある行為に利用可能なものである。このため、ソフトウェア開発者が、攻撃者よりも早く脆弱性を発見し修正するといった対策が益々重要となりつつある。ソフトウェアを検査し、ソフトウェア中に存在する脆弱性を発見する方法の一つとして、コードクローンを用いた方法がある。コードクローンとは、ソフトウェア中に存在する、類似または一致したプログラムの断片である。コードクローンは、通常、ソフトウェア開発者が特定の機能を実現するため、類似機能をもった他のプログラムのソースコードを、開発中のプログラムにコピー&ペーストすることによって発生する。   Conventionally, one of the causes of cyber attacks and malware infection is the presence of vulnerabilities in software. Vulnerability is a bug that exists in software that can be used by a third party for malicious activities. For this reason, it is becoming increasingly important for software developers to find and fix vulnerabilities faster than attackers. One method for inspecting software and finding vulnerabilities in software is to use a code clone. A code clone is a similar or identical program fragment that is present in the software. A code clone is usually generated by copying and pasting source code of another program having a similar function into a program under development so that a software developer realizes a specific function.

例えば、コピー元のソースコードに脆弱性が発見された場合、ソフトウェア開発者は、コピー元のソースコードを修正するだけでは足りず、コピー先のソースコードも併せて修正しなければならない。しかしながら、コピー元のソースコードに脆弱性が発見されたとしても、開発者が、発見された脆弱性のコードクローンを全て把握していなければ、コードクローンを用いて開発されたソフトウェアの脆弱性を修正することは困難である。コードクローンによる脆弱性発見方法とは、脆弱性が発見された箇所のコードクローンを検査対象ソフトウェアにおいて発見することにより、検査対象ソフトウェアに存在する未知の脆弱性を発見する方法である。   For example, if a vulnerability is found in the source code of the copy source, the software developer need not only correct the source code of the copy source, but must also correct the source code of the copy destination. However, even if vulnerabilities are found in the source code of the copy source, if the developer does not know all the code clones of the discovered vulnerabilities, software vulnerabilities developed using the code clones It is difficult to correct. The vulnerability detection method using a code clone is a method of discovering an unknown vulnerability in the software to be inspected by finding the code clone of the location where the vulnerability is found in the software to be inspected.

例えば、非特許文献1には、ソースコードに含まれるコードクローンの検出技術を、ソフトウェアにおける脆弱性の発見に利用する方法が記載されている。具体的には、かかる方法は、過去に脆弱性が発見されたソフトウェアから脆弱性箇所のソースコードを抽出し、該ソースコードの断片と、検査対象ソフトウェアのソースコードとをマッチングすることにより、検査対象ソフトウェアの内包する脆弱性箇所のコードクローンを発見するものである。一方、非特許文献2には、実行ファイル形式から得られるプログラムコードを対象としたコードクローンの検出技術が記載されている。   For example, Non-Patent Document 1 describes a method of using a code clone detection technique included in source code for finding vulnerabilities in software. Specifically, in this method, the source code of the vulnerability part is extracted from the software for which the vulnerability has been discovered in the past, and the source code fragment and the source code of the software to be inspected are matched to perform the inspection. The code clone of the vulnerable part included in the target software is discovered. On the other hand, Non-Patent Document 2 describes a code clone detection technique for a program code obtained from an executable file format.

J. Jang, A. Agrawal, and D. Brumley, “ReDeBug: Finding Unpatched Code Clones in Entire OS Distributions”, In IEEE Symposium on Security and Privacy, 2012.J. Jang, A. Agrawal, and D. Brumley, “ReDeBug: Finding Unpatched Code Clones in Entire OS Distributions”, In IEEE Symposium on Security and Privacy, 2012. Andreas Saebjoernsen, Jeremiah Willcok, Thomas Panas, Daniel Quinlan, and Zhendong Su, “Detecting Code Clones in Binary Executables”, In Proceedings of ISSTA '09, 2009.Andreas Saebjoernsen, Jeremiah Willcok, Thomas Panas, Daniel Quinlan, and Zhendong Su, “Detecting Code Clones in Binary Executables”, In Proceedings of ISSTA '09, 2009.

しかしながら、ソフトウェアのプログラムコードを検査対象として、コードクローンにより脆弱性を発見する技術は存在しなかった。換言すれば、ソフトウェア開発者がコードクローンによりソフトウェアの脆弱性を発見するためには、検査対象のソフトウェアのソースコードを知る必要があった。従って、ソースコードの入手や利用が困難なソフトウェア(例えば、個人所有のソフトウェア、独占排他権の設定されたソフトウェア)に関しては、脆弱性の発見が困難であった。   However, there has been no technology for discovering vulnerabilities by code clones using software program codes as inspection targets. In other words, in order for software developers to discover software vulnerabilities using code clones, it is necessary to know the source code of the software to be inspected. Therefore, it is difficult to find vulnerabilities for software that makes it difficult to obtain and use the source code (for example, personally owned software, software with exclusive exclusive rights set).

開示の技術は、上記に鑑みてなされたものであって、ソフトウェアの脆弱性を、ソースコードを用いることなく発見することができる脆弱性発見装置、脆弱性発見方法、及び脆弱性発見プログラムを提供することを目的とする。   The disclosed technology has been made in view of the above, and provides a vulnerability detection device, a vulnerability detection method, and a vulnerability detection program that can detect software vulnerabilities without using source code The purpose is to do.

上述した課題を解決し、目的を達成するために、本願の開示する脆弱性発見装置は、一つの態様において、ソフトウェアの脆弱性箇所に該当する第1のプログラムコードを抽出する抽出部と、前記抽出部により抽出された第1のプログラムコードと、脆弱性箇所の検査対象となるソフトウェアの第2のプログラムコードとに含まれるパラメータを正規化する正規化部と、前記正規化後の第1のプログラムコードと前記正規化後の第2のプログラムコードとをマッチングし、前記第2のプログラムコードの中から、前記第1のプログラムコードと同一または類似のプログラムコードを検出する検出部とを有する。   In order to solve the above-described problems and achieve the object, the vulnerability discovery device disclosed in the present application is, in one aspect, an extraction unit that extracts a first program code corresponding to a vulnerability part of software, A normalization unit for normalizing parameters included in the first program code extracted by the extraction unit and the second program code of the software to be inspected for the vulnerability part; and the first after the normalization A detection unit that matches a program code with the second program code after normalization and detects a program code that is the same as or similar to the first program code from the second program code.

また、本願の開示する脆弱性発見方法は、一つの態様において、脆弱性発見装置で実行される脆弱性発見方法であって、ソフトウェアの脆弱性箇所に該当する第1のプログラムコードを抽出する抽出工程と、前記抽出工程にて抽出された第1のプログラムコードと、脆弱性箇所の検査対象となるソフトウェアの第2のプログラムコードとに含まれるパラメータを正規化する正規化工程と、前記正規化後の第1のプログラムコードと前記正規化後の第2のプログラムコードとをマッチングし、前記第2のプログラムコードの中から、前記第1のプログラムコードと同一または類似のプログラムコードを検出する検出工程とを含む。   Further, the vulnerability discovery method disclosed in the present application is, in one aspect, a vulnerability discovery method executed by the vulnerability discovery device, and extracting the first program code corresponding to the vulnerability portion of the software A normalization step of normalizing parameters included in the step, the first program code extracted in the extraction step, and the second program code of the software to be inspected for the vulnerability portion, and the normalization Detection of matching a later first program code with the normalized second program code and detecting a program code identical or similar to the first program code from the second program code Process.

更に、本願の開示する脆弱性発見プログラムは、一つの態様において、ソフトウェアの脆弱性箇所に該当する第1のプログラムコードを抽出する抽出ステップと、前記抽出ステップにて抽出された第1のプログラムコードと、脆弱性箇所の検査対象となるソフトウェアの第2のプログラムコードとに含まれるパラメータを正規化する正規化ステップと、前記正規化後の第1のプログラムコードと前記正規化後の第2のプログラムコードとをマッチングし、前記第2のプログラムコードの中から、前記第1のプログラムコードと同一または類似のプログラムコードを検出する検出ステップとをコンピュータに実行させる。   Furthermore, the vulnerability discovery program disclosed in the present application is, in one aspect, an extraction step of extracting a first program code corresponding to a vulnerability portion of software, and a first program code extracted in the extraction step And a normalization step for normalizing parameters included in the second program code of the software to be inspected for the vulnerability part, the first program code after the normalization, and the second program code after the normalization A program code is matched, and a detection step of detecting a program code identical or similar to the first program code from the second program code is executed by a computer.

本願の開示する脆弱性発見装置、脆弱性発見方法、及び脆弱性発見プログラムは、ソフトウェアの脆弱性を、ソースコードを用いることなく発見することができるという効果を奏する。   The vulnerability discovery device, vulnerability discovery method, and vulnerability discovery program disclosed in the present application have the effect of being able to discover software vulnerabilities without using source code.

図1は、脆弱性発見装置の構成を示すブロック図である。FIG. 1 is a block diagram showing the configuration of the vulnerability detection apparatus. 図2は、脆弱性抽出部の処理を説明するための図である。FIG. 2 is a diagram for explaining processing of the vulnerability extraction unit. 図3は、正規化処理部の処理を説明するための図である。FIG. 3 is a diagram for explaining the processing of the normalization processing unit. 図4は、マッチング部の処理を説明するための図である。FIG. 4 is a diagram for explaining the processing of the matching unit. 図5は、脆弱性発見プログラムによる情報処理がコンピュータを用いて具体的に実現されることを示す図である。FIG. 5 is a diagram illustrating that information processing by the vulnerability discovery program is specifically realized using a computer.

以下に、本願の開示する脆弱性発見装置、脆弱性発見方法、及び脆弱性発見プログラムの実施例を、図面を参照しながら詳細に説明する。なお、以下の実施例により本願の開示する脆弱性発見装置、脆弱性発見方法、及び脆弱性発見プログラムが限定されるものではない。   Hereinafter, embodiments of a vulnerability detection device, a vulnerability detection method, and a vulnerability detection program disclosed in the present application will be described in detail with reference to the drawings. The vulnerability detection device, the vulnerability detection method, and the vulnerability detection program disclosed in the present application are not limited by the following embodiments.

まず、本願の開示する一実施例に係る脆弱性発見装置10の構成を説明する。図1は、脆弱性発見装置10の構成を示すブロック図である。脆弱性発見装置10は、ソフトウェア中のコードクローンを用いて、検査対象となるソフトウェア(以下、「検査対象ソフトウェア」と記す。)の脆弱性を発見する。図1に示す様に、脆弱性発見装置10は、脆弱性関連DB(Data Base)11と脆弱性抽出部12と逆アセンブル部13と正規化処理部14とマッチング部15と脆弱性候補DB16とを有する。これら各構成部分は、一方向又は双方向に、信号やデータの入出力が可能な様に接続されている。   First, the configuration of the vulnerability detection apparatus 10 according to an embodiment disclosed in the present application will be described. FIG. 1 is a block diagram showing the configuration of the vulnerability detection apparatus 10. The vulnerability detection apparatus 10 uses the code clone in the software to detect the vulnerability of the software to be inspected (hereinafter referred to as “inspection target software”). As shown in FIG. 1, the vulnerability discovery device 10 includes a vulnerability related DB (Data Base) 11, a vulnerability extraction unit 12, a disassembly unit 13, a normalization processing unit 14, a matching unit 15, and a vulnerability candidate DB 16. Have Each of these components is connected so that signals and data can be input and output in one direction or in both directions.

脆弱性関連DB11は、脆弱性関連情報を記憶する。脆弱性関連情報は、例えば、後述する攻撃検証コード、共通脆弱性識別子(CVE:Common Vulnerabilities and Exposures)等である。脆弱性抽出部12は、脆弱性関連DB11から脆弱性関連情報を取得し、該脆弱性関連情報を基に、脆弱性が存在するソフトウェアから、その脆弱性の箇所に該当するプログラムコードを抽出する。   The vulnerability related DB 11 stores vulnerability related information. Vulnerability related information is, for example, an attack verification code, a common vulnerability identifier (CVE: Common Vulnerabilities and Exposures), which will be described later. The vulnerability extraction unit 12 acquires vulnerability-related information from the vulnerability-related DB 11, and extracts program code corresponding to the location of the vulnerability from software having the vulnerability based on the vulnerability-related information. .

逆アセンブル部13は、検査対象ソフトウェアS1を逆アセンブルする。正規化処理部14は、脆弱性箇所のプログラムコード12aを脆弱性抽出部12から取得する。正規化処理部14は、検査対象ソフトウェアS1の逆アセンブル結果(アセンブリコード)13aを逆アセンブル部13から取得する。正規化処理部14は、脆弱性箇所のプログラムコード12aと検査対象ソフトウェアS1の逆アセンブル結果13aとを正規化する。   The disassembly unit 13 disassembles the inspection target software S1. The normalization processing unit 14 acquires the program code 12a of the vulnerability part from the vulnerability extraction unit 12. The normalization processing unit 14 acquires the disassembly result (assembly code) 13a of the inspection target software S1 from the disassembly unit 13. The normalization processing unit 14 normalizes the program code 12a of the vulnerable part and the disassembly result 13a of the inspection target software S1.

マッチング部15は、正規化後の脆弱性箇所のプログラムコード12bと正規化後の検査対象ソフトウェアS1のプログラムコード13bとをマッチング(照合)し、プログラムコード13b中に含まれる、プログラムコード12bのコードクローンを発見する。マッチング部15は、上記マッチングの結果得られたコードクローンの情報を、未知の脆弱性候補として抽出し、脆弱性候補DB16に格納させる。   The matching unit 15 matches (collates) the program code 12b of the vulnerability portion after normalization with the program code 13b of the inspection target software S1 after normalization, and the code of the program code 12b included in the program code 13b Discover clones. The matching unit 15 extracts the code clone information obtained as a result of the matching as an unknown vulnerability candidate, and stores it in the vulnerability candidate DB 16.

次に、脆弱性発見装置10の動作を説明する。   Next, the operation of the vulnerability detection apparatus 10 will be described.

図2は、脆弱性抽出部12の処理を説明するための図である。図2に示す様に、脆弱性抽出部12は、脆弱性関連情報として、例えば、公開されているセキュリティパッチD1、攻撃検証コードD2、共通脆弱性識別子D3を利用し、脆弱性が存在するソフトウェアから、脆弱性箇所のプログラムコードを抽出する。なお、本実施例では、上記脆弱性が存在するソフトウェアは、検査対象ソフトウェアS1とは異なるソフトウェアであるものとするが、これらのソフトウェアは同一であってもよい。また、脆弱性箇所のプログラムコードが抽出される契機は、例えば、上記ソフトウェア中に脆弱性の存在が確認された場合である。   FIG. 2 is a diagram for explaining processing of the vulnerability extraction unit 12. As shown in FIG. 2, the vulnerability extraction unit 12 uses, for example, a publicly available security patch D1, attack verification code D2, and common vulnerability identifier D3 as vulnerability-related information, and software with a vulnerability exists. From the above, extract the program code of the vulnerable part. In the present embodiment, the software having the vulnerability is software different from the inspection target software S1, but these software may be the same. Moreover, the opportunity for extracting the program code of the vulnerability portion is, for example, when the existence of the vulnerability is confirmed in the software.

具体的には、脆弱性抽出部12は、脆弱性関連情報の内、セキュリティパッチD1を利用する場合、脆弱性が存在するソフトウェアに対するセキュリティパッチD1の適用範囲の部分を、脆弱性箇所のプログラムコードとして抽出する(E1)。また、脆弱性抽出部12は、脆弱性関連情報の内、攻撃検証コードD2を利用する場合、脆弱性が存在するソフトウェアに対して攻撃検証コードD2を実行し、攻撃の起点となる部分を、脆弱性箇所のプログラムコードとして抽出する(E2)。あるいは、脆弱性抽出部12は、脆弱性関連情報の内、共通脆弱性識別子D3を利用する場合、CVEDB(Common Vulnerabilities and Exposures Data Base)を参照して、脆弱性が発見されたソフトウェアの情報を基に特定された部分を、脆弱性箇所のプログラムコードとして抽出する(E3)。   Specifically, when using the security patch D1 in the vulnerability-related information, the vulnerability extraction unit 12 determines the application range portion of the security patch D1 for the software having the vulnerability as the program code of the vulnerability portion. (E1). Further, when using the attack verification code D2 in the vulnerability related information, the vulnerability extraction unit 12 executes the attack verification code D2 on the software having the vulnerability, Extracted as the program code of the vulnerable part (E2). Alternatively, when using the common vulnerability identifier D3 in the vulnerability related information, the vulnerability extraction unit 12 refers to CVEDB (Common Vulnerabilities and Exposures Data Base) and obtains information on the software in which the vulnerability is found. The part specified on the basis is extracted as the program code of the vulnerable part (E3).

上述した様に、ソフトウェア開発者が、脆弱性が存在するソフトウェアのソースコードを入手できず、バイナリ形式の実行ファイル(プログラムコード)のみが存在する場合には、図2の実線矢印Y1に示す様に、コンパイルが実行されることなく脆弱性箇所のプログラムコードP1が抽出される。これに対し、脆弱性が存在するソフトウェアのソースコードが入手可能な場合には、脆弱性抽出部12は、各種脆弱性関連情報を用いて脆弱性箇所のプログラムコードを抽出する際、各種コンパイラC1〜C3により、上記ソースコードを網羅的にコンパイルする(破線矢印Y2)。その後、脆弱性抽出部12は、各コンパイル後の各ソフトウェアから、脆弱性箇所のプログラムコードP1を抽出する(破線矢印Y3)。   As described above, when the software developer cannot obtain the source code of the software having the vulnerability and only the executable file (program code) in the binary format exists, as shown by the solid arrow Y1 in FIG. In addition, the program code P1 of the vulnerable part is extracted without compiling. On the other hand, when the source code of the software in which the vulnerability exists is available, the vulnerability extraction unit 12 uses various vulnerability-related information to extract the program code of the vulnerability part, and various compilers C1 The above source code is comprehensively compiled by .about.C3 (dashed arrow Y2). After that, the vulnerability extraction unit 12 extracts the program code P1 of the vulnerability part from each compiled software (broken line arrow Y3).

なお、脆弱性抽出部12は、コンパイラC1によるコンパイルに際し、コンパイルオプションC11、C12、…を用いてもよい。同様に、脆弱性抽出部12は、コンパイラC2、C3によるコンパイルに際し、コンパイルオプションC21、C22、…と、コンパイルオプションC31、C32、…とをそれぞれ用いてもよい。   The vulnerability extracting unit 12 may use compile options C11, C12,... When compiling by the compiler C1. Similarly, the vulnerability extraction unit 12 may use the compile options C21, C22,... And the compile options C31, C32,.

次に、逆アセンブル部13は、検査対象ソフトウェアS1を読み込み、逆アセンブルされたコードを出力する。正規化処理部14は、マッチング元である脆弱性箇所のプログラムコードと、マッチング先である検査対象ソフトウェアS1の逆アセンブルされたプログラムコードの正規化処理を行い、正規化されたプログラムコードを出力する。   Next, the disassembly unit 13 reads the inspection target software S1 and outputs the disassembled code. The normalization processing unit 14 performs normalization processing on the program code of the vulnerable part that is the matching source and the disassembled program code of the inspection target software S1 that is the matching destination, and outputs the normalized program code .

図3は、正規化処理部14の処理を説明するための図である。正規化処理とは、ソフトウェアの脆弱性箇所から抽出されたプログラムコードと、検査対象ソフトウェアS1の逆アセンブルにより得られたプログラムコードとの双方のプログラムコード中に含まれる箇所(パラメータ)の内、コンパイル環境により変化する箇所(例えば、レジスタの種類、アクセス先のメモリアドレスの値、即値等の可変パラメータ)を抽象化する処理である。図3に示す様に、正規化処理部14は、上記コンパイル環境により変化する箇所を、その属性だけを表す文字列に変換する。例えば、正規化処理部14は、プログラムコード中の“0x10”、“00402198”、“0040189C”、“ebx,ebx”の各値を、それぞれ“VAL”、“MEM”、“MEM”、“REG,REG”の各文字列に変換することにより抽象化する。これにより、正規化処理部14は、検査対象ソフトウェアS1がコンパイルされた環境に左右されない正確なマッチングを可能とする。   FIG. 3 is a diagram for explaining the processing of the normalization processing unit 14. Normalization processing means compiling among parameters (parameters) included in both the program code extracted from the software vulnerability location and the program code obtained by disassembling the inspection target software S1. This is a process of abstracting a part that changes depending on the environment (for example, a variable type such as a register type, a memory address value to be accessed, and an immediate value). As shown in FIG. 3, the normalization processing unit 14 converts a portion that changes depending on the compilation environment into a character string that represents only the attribute. For example, the normalization processing unit 14 sets the values “0x10”, “00402198”, “0040189C”, “ebx, ebx” in the program code to “VAL”, “MEM”, “MEM”, “REG”, respectively. , "REG" to convert to each character string and abstract. As a result, the normalization processing unit 14 enables accurate matching independent of the environment in which the inspection target software S1 is compiled.

より詳細には、ソフトウェアは、コンパイルされた環境(例えば、コンパイラ、コンパイルオプション)によっては、ソースコードが同一でも、生成されるプログラムコードが変化する場合がある。従って、ソースコードレベルでは、検査対象ソフトウェアS1の中に脆弱性箇所のコードクローンが存在したとしても、コンパイルされた環境によっては、プログラムコードが利用する上記パラメータが変化する場合がある。この場合には、脆弱性発見装置10は、上述した正規化処理を行わなければ、本来はコードクローンであるプログラムコード部分が、別のプログラムコード部分と誤認識されてしまうことがある。その結果、検査対象ソフトウェアS1における脆弱性が看過されてしまう可能性がある。そこで、脆弱性発見装置10は、上述した正規化処理を行うことで、コンパイル環境の変化に対する適応性を高め、ソースコードを利用しないプログラムコードでの正確なコードクローン探索を実現する。   More specifically, depending on the compiled environment (for example, compiler and compile option), the generated program code may change even if the source code is the same. Therefore, at the source code level, even if there is a code clone of the vulnerable part in the inspection target software S1, the parameter used by the program code may change depending on the compiled environment. In this case, if the vulnerability detection apparatus 10 does not perform the above-described normalization process, the program code portion that is originally a code clone may be erroneously recognized as another program code portion. As a result, the vulnerability in the inspection target software S1 may be overlooked. Therefore, the vulnerability detection apparatus 10 performs the above-described normalization process, thereby improving the adaptability to changes in the compilation environment and realizing an accurate code clone search using program code that does not use source code.

なお、正規化処理では、機械語命令からオペランド部分を除いた情報である縮約命令を用いてもよい。   In the normalization process, a contracted instruction that is information obtained by removing the operand part from the machine language instruction may be used.

マッチング部15は、脆弱性箇所のプログラムコードと検査対象ソフトウェアS1のプログラムコードとをマッチングし、該マッチングにより発見されたコードクローンの情報を、未知の脆弱性候補として抽出する。抽出された情報は、脆弱性候補DB16に格納される。なお、マッチング部15により抽出及び格納される情報は、コードクローン自体であってもよいし、コードクローンの属性情報(例えば、位置、サイズ等)であってもよい。   The matching unit 15 matches the program code of the vulnerability portion with the program code of the inspection target software S1, and extracts information of the code clone found by the matching as an unknown vulnerability candidate. The extracted information is stored in the vulnerability candidate DB 16. Note that the information extracted and stored by the matching unit 15 may be the code clone itself or the attribute information (for example, position, size, etc.) of the code clone.

図4は、マッチング部15の処理を説明するための図である。図4に示す様に、マッチング部15は、検査対象ソフトウェアS1の利用するアーキテクチャと実行ファイル形式とを判定し、アーキテクチャと実行ファイル形式とが一致する脆弱性箇所のプログラムコードのみを、マッチング元として選択する。ここで、アーキテクチャは、CPU(Central Processing Unit)が利用する命令セットアーキテクチャであり、例えば“x86”や“ARM”がこれに該当する。また、実行ファイル形式は、ソフトウェアが計算機上において実行可能なファイルのフォーマットであり、例えば“PE”フォーマットや“ELF”フォーマットがこれに該当する。   FIG. 4 is a diagram for explaining the processing of the matching unit 15. As shown in FIG. 4, the matching unit 15 determines the architecture and executable file format used by the software S1 to be inspected, and uses only the program code of the vulnerable part whose architecture and executable file format match as the matching source. select. Here, the architecture is an instruction set architecture used by a CPU (Central Processing Unit), for example, “x86” or “ARM”. The executable file format is a format of a file that can be executed by software on a computer. For example, the “PE” format and the “ELF” format correspond to this.

例えば、図4に示す例では、正規化後の検査対象ソフトウェアS1のプログラムコードの利用するアーキテクチャは“x86”であり、実行ファイル形式は“PE”である。従って、アーキテクチャの異なる“ARM”のプログラムコードP13や実行ファイル形式の異なる“ELF”のプログラムコードP12はマッチング元として選択されず、アーキテクチャ“x86”及び実行ファイル形式“PE”を有するプログラムコードP11が選択されることとなる。これにより、検査対象ソフトウェアS1とは異なる種類のソフトウェアから抽出されたプログラムコードが、マッチングの対象から除外され、マッチング対象のプログラムコードの絞り込みが可能となる。従って、マッチング処理時間の短縮された効率的なマッチングが可能となる。   For example, in the example shown in FIG. 4, the architecture used by the program code of the inspection target software S1 after normalization is “x86”, and the executable file format is “PE”. Therefore, the “ARM” program code P13 having a different architecture and the “ELF” program code P12 having a different execution file format are not selected as matching sources, and the program code P11 having the architecture “x86” and the execution file format “PE” is selected. Will be selected. As a result, the program code extracted from a different type of software from the inspection target software S1 is excluded from the matching target, and the matching target program code can be narrowed down. Therefore, efficient matching with reduced matching processing time is possible.

なお、上述したアーキテクチャと実行ファイル形式との同一性判定は、必ずしも双方一致でなくてもよく、片方のみの一致であってもよい。   It should be noted that the above-described identity determination between the architecture and the executable file format may not necessarily match both, but may match only one of them.

マッチング部15は、アーキテクチャと実行ファイル形式とが検査対象と同一である脆弱性箇所のプログラムコードを選択した後、該脆弱性箇所のプログラムコードを、検査対象ソフトウェアS1のプログラムコードと網羅的にマッチングする。すなわち、マッチング部15は、図4に示す様に、検査対象ソフトウェアS1のプログラムコードの先頭から末尾まで順に、プログラムコードの位置を一命令分ずつ下方にずらしながら、上記マッチングを行う。   The matching unit 15 comprehensively matches the program code of the vulnerability part with the program code of the inspection target software S1 after selecting the program code of the vulnerability part whose architecture and execution file format are the same as the inspection target. To do. That is, as shown in FIG. 4, the matching unit 15 performs the above matching while sequentially shifting the position of the program code by one instruction from the beginning to the end of the program code of the inspection target software S1.

マッチング部15は、上記マッチングに際し、脆弱性箇所のプログラムコード(マッチング元)と、検査対象ソフトウェアS1のプログラムコード(マッチング先)とが、どの程度類似するかを示す類似度を算出するものとしてもよい。この場合、マッチング部15は、マッチングの結果得られた上記類似度が最も高くかつ所定の閾値を超えるプログラムコード部分を、検査対象ソフトウェアS1中のコードクローン部分であると判定する。例えば、マッチング部15は、N-permsを用い、検査対象ソフトウェアS1のプログラムコードのマッチング対象を1行ずつ下方にずらしながら、上記類似度を算出する。具体的には、マッチング部15は、4行中1行が一致した場合には類似度“25%”、10行中1行が一致した場合には類似度“10%”という様に、上記類似度を算出する。そして、マッチング部15は、算出された類似度が最も高い位置にあるプログラムコード部分(図4では“95%”の位置)が、上記閾値(例えば、80〜90%)を超える場合に、該プログラムコード部分をコードクローン部分と判定する。   The matching unit 15 may calculate a degree of similarity indicating how similar the program code (matching source) of the vulnerable part and the program code (matching destination) of the software S1 to be inspected in the above matching. Good. In this case, the matching unit 15 determines that the program code portion having the highest similarity obtained as a result of matching and exceeding a predetermined threshold is the code clone portion in the inspection target software S1. For example, the matching unit 15 uses N-perms to calculate the similarity while shifting the matching target of the program code of the inspection target software S1 downward line by line. Specifically, the matching unit 15 indicates that the similarity is “25%” when one of the four lines matches, and the similarity is “10%” when one of the ten lines matches. Calculate similarity. Then, when the program code portion at the position where the calculated similarity is the highest (the position of “95%” in FIG. 4) exceeds the threshold (for example, 80 to 90%), the matching unit 15 The program code part is determined as the code clone part.

なお、上記N-permsは、順序性をもたないN個の命令別系列を用いた類似度算出技術であるが、文献“Karim, M. E., Walenstein, A., Lakhotia, A., and Parida, L.“Malware Phylogeny Generation using Permutations of Code”. European Research Journal of Computer Virology 1, 1-2 (Nov. 2005) 13--23.”に記載の周知技術であるため、その詳細な説明は省略する。また、上記類似度の条件に関し、最も高くかつ所定の閾値を超えるプログラムコード部分を例示したが、これに限らず、何れか一方を満たすプログラムコード部分、あるいは、類似度が上位3位以内のプログラムコード部分等、他の条件であってもよい。   The N-perms is a similarity calculation technique using a sequence of N instructions without order, but the documents “Karim, ME, Walenstein, A., Lakhotia, A., and Parida, L. “Malware Phylogeny Generation using Permutations of Code”. European Research Journal of Computer Virology 1, 1-2 (Nov. 2005) 13--23. ” . Moreover, although the program code part which is the highest and exceeds a predetermined threshold regarding the above-mentioned similarity condition is illustrated, the present invention is not limited to this. Other conditions such as a code portion may be used.

上述した様に、脆弱性発見装置10は、脆弱性箇所のプログラムコードと、検査対象ソフトウェアS1のプログラムコードとのマッチングに際し、上記類似度を用いることで、コードクローンの誤検出を更に抑制することができる。その結果、脆弱性の発見精度が向上する。   As described above, the vulnerability detection apparatus 10 further suppresses erroneous detection of a code clone by using the similarity when matching the program code of the vulnerability part and the program code of the inspection target software S1. Can do. As a result, vulnerability detection accuracy is improved.

以上説明した様に、脆弱性発見装置10は、脆弱性抽出部12と正規化処理部14とマッチング部15とを有する。脆弱性抽出部12は、ソフトウェアの脆弱性箇所に該当する第1のプログラムコードを抽出する。正規化処理部14は、脆弱性抽出部12により抽出された第1のプログラムコードと、脆弱性箇所の検査対象となるソフトウェアの第2のプログラムコードとに含まれる、コンパイル環境により異なるパラメータを正規化する。マッチング部15は、上記正規化後の第1のプログラムコードと上記正規化後の第2のプログラムコードとをマッチングし、上記第2のプログラムコードの中から、上記第1のプログラムコードと同一または類似のプログラムコードであるコードクローンを、未知の脆弱性候補として検出する。   As described above, the vulnerability detection apparatus 10 includes the vulnerability extraction unit 12, the normalization processing unit 14, and the matching unit 15. The vulnerability extraction unit 12 extracts the first program code corresponding to the vulnerability part of the software. The normalization processing unit 14 normalizes parameters included in the first program code extracted by the vulnerability extraction unit 12 and the second program code of the software to be inspected for the vulnerability part depending on the compilation environment. Turn into. The matching unit 15 matches the first program code after normalization with the second program code after normalization, and is identical to the first program code from the second program codes or Code clones that are similar program codes are detected as unknown vulnerability candidates.

また、脆弱性発見装置10において、マッチング部15は、上記マッチングに際し、アーキテクチャと実行ファイル形式とが上記検査対象となるソフトウェアと同一である上記正規化後の第1のプログラムコードと、上記正規化後の第2のプログラムコードとをマッチングするものとしてもよい。更に、脆弱性抽出部12は、上記第1のプログラムコードを有するソフトウェアのソースコードをコンパイルし、該コンパイルにより得られたプログラムコードから、上記ソフトウェアの脆弱性箇所に該当する第1のプログラムコードを抽出するものとしてもよい。また、マッチング部15は、上記第1のプログラムコードと上記第2のプログラムコードとの類似度を算出し、上記第2のプログラムコードの中から、上記類似度が最も高くかつ所定値を超えるプログラムコードを、上記同一または類似のプログラムコードとして検出するものとしてもよい。更に、正規化処理部14は、上記パラメータとして、上記第1のプログラムコードと上記第2のプログラムコードとの双方のプログラムコード中に含まれるパラメータの内、コンパイル環境により変化するパラメータを正規化するものとしてもよい。   Further, in the vulnerability detection apparatus 10, the matching unit 15 performs the above-described normalization first program code whose architecture and executable file format are the same as the software to be inspected, and the normalization in the matching. It is good also as what matches with the 2nd program code after. Further, the vulnerability extraction unit 12 compiles the source code of the software having the first program code, and obtains the first program code corresponding to the vulnerability part of the software from the program code obtained by the compilation. It may be extracted. The matching unit 15 calculates the similarity between the first program code and the second program code, and the program having the highest similarity and exceeding a predetermined value from the second program code. The code may be detected as the same or similar program code. Further, the normalization processing unit 14 normalizes parameters that vary depending on the compilation environment, among the parameters included in the program codes of both the first program code and the second program code, as the parameters. It may be a thing.

上述した様に、脆弱性発見装置10は、プログラムコードを直接比較することにより、検査対象ソフトウェアS1のソースコードを用いることなく、検査対象ソフトウェアS1中においてコードクローンにより生成された脆弱性を発見することができる。従って、ソースコードの入手や利用が困難なソフトウェア(例えば、個人所有のソフトウェア、独占排他権の設定されたソフトウェア)においても、脆弱性の発見が可能となる。   As described above, the vulnerability detection apparatus 10 directly detects the vulnerability generated by the code clone in the inspection target software S1 by directly comparing the program codes without using the source code of the inspection target software S1. be able to. Therefore, it is possible to find vulnerabilities even in software in which it is difficult to obtain and use the source code (for example, software that is personally owned or software that is set with exclusive exclusive rights).

(脆弱性発見プログラム)
図5は、脆弱性発見プログラムによる情報処理がコンピュータ100を用いて具体的に実現されることを示す図である。図5に示す様に、コンピュータ100は、例えば、メモリ101と、CPU(Central Processing Unit)102と、ハードディスクドライブインタフェース103と、ディスクドライブインタフェース104と、シリアルポートインタフェース105と、ビデオアダプタ106と、ネットワークインタフェース107とを有し、これらの各部はバスBによって接続される。
(Vulnerability discovery program)
FIG. 5 is a diagram illustrating that the information processing by the vulnerability discovery program is specifically realized by using the computer 100. As shown in FIG. 5, a computer 100 includes, for example, a memory 101, a CPU (Central Processing Unit) 102, a hard disk drive interface 103, a disk drive interface 104, a serial port interface 105, a video adapter 106, a network, and the like. These units are connected by a bus B.

メモリ101は、図5に示す様に、ROM(Read Only Memory)101a及びRAM(Random Access Memory)101bを含む。ROM101aは、例えば、BIOS(Basic Input Output System)等のブートプログラムを記憶する。ハードディスクドライブインタフェース103は、図5に示す様に、ハードディスクドライブ108に接続される。ディスクドライブインタフェース104は、図5に示す様に、ディスクドライブ109に接続される。例えば磁気ディスクや光ディスク等の着脱可能な記憶媒体が、ディスクドライブ109に挿入される。シリアルポートインタフェース105は、図5に示す様に、例えばマウス110、キーボード111に接続される。ビデオアダプタ106は、図5に示す様に、例えばディスプレイ112に接続される。   As shown in FIG. 5, the memory 101 includes a ROM (Read Only Memory) 101a and a RAM (Random Access Memory) 101b. The ROM 101a stores a boot program such as BIOS (Basic Input Output System). The hard disk drive interface 103 is connected to the hard disk drive 108 as shown in FIG. The disk drive interface 104 is connected to the disk drive 109 as shown in FIG. For example, a removable storage medium such as a magnetic disk or an optical disk is inserted into the disk drive 109. The serial port interface 105 is connected to a mouse 110 and a keyboard 111, for example, as shown in FIG. The video adapter 106 is connected to a display 112, for example, as shown in FIG.

ここで、図5に示す様に、ハードディスクドライブ108は、例えば、OS(Operating System)108a、アプリケーションプログラム108b、プログラムモジュール108c、プログラムデータ108d、脆弱性関連情報、コードクローン情報(脆弱性候補)を記憶する。すなわち、開示の技術に係る脆弱性発見プログラムは、コンピュータ100によって実行される指令が記述されたプログラムモジュール108cとして、例えばハードディスクドライブ108に記憶される。具体的には、上記実施例で説明した脆弱性抽出部12と、逆アセンブル部13と、正規化処理部14と、マッチング部15との各々と同様の情報処理を実行する各種手順が記述されたプログラムモジュール108cが、ハードディスクドライブ108に記憶される。また、脆弱性発見プログラムによる情報処理に用いられるデータは、プログラムデータ108dとして、例えばハードディスクドライブ108に記憶される。そして、CPU102が、ハードディスクドライブ108に記憶されたプログラムモジュール108cやプログラムデータ108dを必要に応じてRAM101bに読み出し、上記各種手順を実行する。   Here, as shown in FIG. 5, the hard disk drive 108 stores, for example, an OS (Operating System) 108a, an application program 108b, a program module 108c, program data 108d, vulnerability-related information, and code clone information (vulnerability candidates). Remember. That is, the vulnerability discovery program according to the disclosed technique is stored in, for example, the hard disk drive 108 as the program module 108c in which the command executed by the computer 100 is described. Specifically, various procedures for executing information processing similar to each of the vulnerability extracting unit 12, the disassembling unit 13, the normalization processing unit 14, and the matching unit 15 described in the above embodiment are described. The program module 108c is stored in the hard disk drive 108. Further, data used for information processing by the vulnerability discovery program is stored as, for example, the hard disk drive 108 as program data 108d. Then, the CPU 102 reads the program module 108c and the program data 108d stored in the hard disk drive 108 to the RAM 101b as necessary, and executes the above various procedures.

なお、脆弱性発見プログラムに係るプログラムモジュール108cやプログラムデータ108dは、ハードディスクドライブ108に記憶される場合に限られず、例えば着脱可能な記憶媒体に記憶され、ディスクドライブ109等を介してCPU102によって読み出されてもよい。あるいは、脆弱性発見プログラムに係るプログラムモジュール108cやプログラムデータ108dは、ネットワーク(LAN(Local Area Network)、WAN(Wide Area Network)等)を介して接続された他のコンピュータに記憶され、ネットワークインタフェース107を介してCPU102によって読み出されてもよい。   Note that the program module 108c and the program data 108d related to the vulnerability detection program are not limited to being stored in the hard disk drive 108, but are stored in, for example, a removable storage medium and read by the CPU 102 via the disk drive 109 or the like. May be. Alternatively, the program module 108c and the program data 108d related to the vulnerability detection program are stored in another computer connected via a network (LAN (Local Area Network), WAN (Wide Area Network), etc.), and the network interface 107 It may be read by the CPU 102 via

なお、上記実施例では、逆アセンブル部13は、検査対象ソフトウェアS1を逆アセンブルするものとしたが、検査対象ソフトウェアS1が高級言語で記述されている場合には、逆コンパイルするものとしてもよい。反対に、図2において、コンパイラC1〜C3はアセンブラであってもよく、脆弱性が存在するソフトウェアのソースコードが入手可能な場合に、該ソースコードがアセンブルされるものとしてもよい。   In the above embodiment, the disassembly unit 13 disassembles the inspection target software S1. However, when the inspection target software S1 is described in a high-level language, it may be decompiled. On the other hand, in FIG. 2, the compilers C1 to C3 may be assemblers, and may be assembled when the source code of the software having the vulnerability is available.

また、上述した脆弱性発見装置10の各構成要素は、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的態様は、図示のものに限らず、その全部又は一部を、各種の負荷や使用状況等に応じて、任意の単位で機能的又は物理的に分散・統合して構成することもできる。例えば、脆弱性抽出部12と正規化処理部14、逆アセンブル部13と正規化処理部14の少なくとも一方を1つの構成要素として統合してもよい。反対に、マッチング部15に関し、マッチング処理を実行する部分と、コードクローンを検出する部分と、用いるアーキテクチャ及び実行ファイル形式の同一性を判定する部分とに分散してもよい。更に、ハードディスクドライブ108を、脆弱性発見装置10の外部装置として、ネットワークやケーブル経由で接続する様にしてもよい。   Moreover, each component of the vulnerability discovery apparatus 10 mentioned above does not necessarily need to be physically comprised like illustration. That is, the specific mode of distribution / integration of each device is not limited to the illustrated one, and all or a part thereof is functionally or physically distributed in an arbitrary unit according to various loads or usage conditions. -It can also be integrated and configured. For example, at least one of the vulnerability extraction unit 12 and the normalization processing unit 14, the disassembly unit 13 and the normalization processing unit 14 may be integrated as one component. On the contrary, the matching unit 15 may be divided into a part that executes the matching process, a part that detects the code clone, and a part that determines the identity of the architecture and executable file format to be used. Furthermore, the hard disk drive 108 may be connected as an external device of the vulnerability detection apparatus 10 via a network or a cable.

10 脆弱性発見装置
11 脆弱性関連DB
12 脆弱性抽出部
13 逆アセンブル部
14 正規化処理部
15 マッチング部
16 脆弱性候補DB
100 コンピュータ
101 メモリ
101a ROM
101b RAM
102 CPU
103 ハードディスクドライブインタフェース
104 ディスクドライブインタフェース
105 シリアルポートインタフェース
106 ビデオアダプタ
107 ネットワークインタフェース
108 ハードディスクドライブ
108a OS
108b アプリケーションプログラム
108c プログラムモジュール
108d プログラムデータ
109 ディスクドライブ
110 マウス
111 キーボード
112 ディスプレイ
C1、C2、C3 コンパイラ
C11、C12、…、C21、C22、…、C31、C32、… コンパイルオプション
D1 セキュリティパッチ
D2 攻撃検証コード
D3 共通脆弱性識別子
P1 脆弱性箇所のプログラムコード
P11、P12、P13 プログラムコード
S1 検査対象ソフトウェア
10 Vulnerability discovery device 11 Vulnerability related DB
12 Vulnerability Extraction Unit 13 Disassembly Unit 14 Normalization Processing Unit 15 Matching Unit 16 Vulnerability Candidate DB
100 Computer 101 Memory 101a ROM
101b RAM
102 CPU
103 Hard Disk Drive Interface 104 Disk Drive Interface 105 Serial Port Interface 106 Video Adapter 107 Network Interface 108 Hard Disk Drive 108a OS
108b Application program 108c Program module 108d Program data 109 Disk drive 110 Mouse 111 Keyboard 112 Display C1, C2, C3 Compiler C11, C12,..., C21, C22,. D3 Common vulnerability identifier P1 Program code P11, P12, P13 of vulnerability location Program code S1 Software to be inspected

Claims (8)

ソフトウェアの脆弱性箇所に該当する第1のプログラムコードを抽出する抽出部と、
前記抽出部により抽出された第1のプログラムコードと、脆弱性箇所の検査対象となるソフトウェアの第2のプログラムコードとに含まれるパラメータを正規化する正規化部と、
前記正規化後の第1のプログラムコードと前記正規化後の第2のプログラムコードとをマッチングし、前記第2のプログラムコードの中から、前記第1のプログラムコードと同一または類似のプログラムコードを検出する検出部と
を有することを特徴とする脆弱性発見装置。
An extraction unit for extracting the first program code corresponding to the vulnerable part of the software;
A normalization unit that normalizes parameters included in the first program code extracted by the extraction unit and the second program code of the software to be inspected for the vulnerability portion;
The first program code after normalization and the second program code after normalization are matched, and a program code that is the same as or similar to the first program code is selected from the second program code. A vulnerability detection device comprising: a detection unit for detecting.
前記検出部は、アーキテクチャと実行ファイル形式とが前記検査対象となるソフトウェアと同一である前記正規化後の第1のプログラムコードと、前記正規化後の第2のプログラムコードとをマッチングすることを特徴とする請求項1に記載の脆弱性発見装置。   The detection unit matches the first program code after normalization whose architecture and executable file format are the same as the software to be inspected, and the second program code after normalization. The vulnerability detection device according to claim 1, wherein 前記抽出部は、前記第1のプログラムコードを有するソフトウェアのソースコードをコンパイルし、該コンパイルにより得られたプログラムコードから、前記ソフトウェアの脆弱性箇所に該当する第1のプログラムコードを抽出することを特徴とする請求項1に記載の脆弱性発見装置。   The extraction unit compiles the source code of software having the first program code, and extracts the first program code corresponding to the vulnerable part of the software from the program code obtained by the compilation. The vulnerability detection device according to claim 1, wherein 前記検出部は、前記第1のプログラムコードと前記第2のプログラムコードとの類似度を算出し、前記第2のプログラムコードの中から、前記類似度が最も高くかつ所定値を超えるプログラムコードを、前記同一または類似のプログラムコードとして検出することを特徴とする請求項1に記載の脆弱性発見装置。   The detection unit calculates a similarity between the first program code and the second program code, and selects a program code having the highest similarity and exceeding a predetermined value from the second program code. The vulnerability detection device according to claim 1, wherein the vulnerability detection device is detected as the same or similar program code. 前記正規化部は、前記パラメータとして、前記第1のプログラムコードと前記第2のプログラムコードとの双方のプログラムコード中に含まれるパラメータの内、コンパイル環境により変化するパラメータを正規化することを特徴とする請求項1に記載の脆弱性発見装置。   The normalization unit normalizes, as the parameter, a parameter that changes depending on a compile environment among parameters included in both the first program code and the second program code. The vulnerability detection apparatus according to claim 1. 前記抽出部は、公開されている脆弱性情報から、脆弱性に対するセキュリティパッチの適用範囲、脆弱性に対する攻撃の起点となる部分、および、共通脆弱性識別子に対応する脆弱性箇所の少なくともいずれかを、前記第1のプログラムコードとして抽出することを特徴とする請求項1または請求項3に記載の脆弱性発見装置。   The extraction unit extracts at least one of the application range of the security patch for the vulnerability, the part serving as the starting point of the attack against the vulnerability, and the vulnerability part corresponding to the common vulnerability identifier from the disclosed vulnerability information. The vulnerability detection apparatus according to claim 1, wherein the vulnerability detection apparatus is extracted as the first program code. 脆弱性発見装置で実行される脆弱性発見方法であって、
ソフトウェアの脆弱性箇所に該当する第1のプログラムコードを抽出する抽出工程と、
前記抽出工程にて抽出された第1のプログラムコードと、脆弱性箇所の検査対象となるソフトウェアの第2のプログラムコードとに含まれるパラメータを正規化する正規化工程と、
前記正規化後の第1のプログラムコードと前記正規化後の第2のプログラムコードとをマッチングし、前記第2のプログラムコードの中から、前記第1のプログラムコードと同一または類似のプログラムコードを検出する検出工程と
を含むことを特徴とする脆弱性発見方法。
A vulnerability detection method executed by a vulnerability detection device,
An extraction step for extracting the first program code corresponding to the vulnerable part of the software;
A normalization step of normalizing parameters included in the first program code extracted in the extraction step and the second program code of the software to be inspected for the vulnerability portion;
The first program code after normalization and the second program code after normalization are matched, and a program code that is the same as or similar to the first program code is selected from the second program code. And a detection step for detecting the vulnerability detection method.
ソフトウェアの脆弱性箇所に該当する第1のプログラムコードを抽出する抽出ステップと、
前記抽出ステップにて抽出された第1のプログラムコードと、脆弱性箇所の検査対象となるソフトウェアの第2のプログラムコードとに含まれるパラメータを正規化する正規化ステップと、
前記正規化後の第1のプログラムコードと前記正規化後の第2のプログラムコードとをマッチングし、前記第2のプログラムコードの中から、前記第1のプログラムコードと同一または類似のプログラムコードを検出する検出ステップと
をコンピュータに実行させるための脆弱性発見プログラム。
An extraction step for extracting the first program code corresponding to the vulnerable part of the software;
A normalization step of normalizing parameters included in the first program code extracted in the extraction step and the second program code of the software to be inspected for the vulnerability part;
The first program code after normalization and the second program code after normalization are matched, and a program code that is the same as or similar to the first program code is selected from the second program code. A vulnerability detection program for causing a computer to execute a detection step to detect.
JP2016543890A 2014-08-20 2015-07-30 Vulnerability discovery device, vulnerability discovery method, and vulnerability discovery program Active JP6088713B2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2014167678 2014-08-20
JP2014167678 2014-08-20
PCT/JP2015/071721 WO2016027641A1 (en) 2014-08-20 2015-07-30 Vulnerability detection device, vulnerability detection method, and vulnerability detection program

Publications (2)

Publication Number Publication Date
JP6088713B2 JP6088713B2 (en) 2017-03-01
JPWO2016027641A1 true JPWO2016027641A1 (en) 2017-04-27

Family

ID=55350587

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016543890A Active JP6088713B2 (en) 2014-08-20 2015-07-30 Vulnerability discovery device, vulnerability discovery method, and vulnerability discovery program

Country Status (5)

Country Link
US (1) US10534914B2 (en)
EP (1) EP3159823A4 (en)
JP (1) JP6088713B2 (en)
CN (1) CN106575337A (en)
WO (1) WO2016027641A1 (en)

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017061270A1 (en) * 2015-10-09 2017-04-13 日本電信電話株式会社 Vulnerability discovering device, vulnerability discovering method, and vulnerability discovering program
US9965633B2 (en) * 2015-12-29 2018-05-08 Sap Se Using code similarities for improving auditing and fixing of SAST-discovered code vulnerabilities
US20190391806A1 (en) * 2016-12-19 2019-12-26 Nippon Telegraph And Telephone Corporation Determination apparatus, determination method, and determination program
US10783247B1 (en) * 2017-02-21 2020-09-22 Triad National Security, Llc Software classification using phylogenetic techniques
WO2018230194A1 (en) * 2017-06-14 2018-12-20 日本電信電話株式会社 Identification assistance device, identification assistance method, and identification assistance program
US10909243B2 (en) * 2017-06-29 2021-02-02 AVAST Software s.r.o. Normalizing entry point instructions in executable program files
US11443046B2 (en) * 2017-08-14 2022-09-13 Onapsis, Inc. Entry point finder
CN108052344A (en) * 2017-12-11 2018-05-18 北京奇虎科技有限公司 A kind of kernel difference detecting method and device
KR102505127B1 (en) * 2018-05-30 2023-03-02 삼성전자주식회사 Electronic device for detecting vulnerability of software and operation method thereof
US10592677B2 (en) * 2018-05-30 2020-03-17 Paypal, Inc. Systems and methods for patching vulnerabilities
US11106791B2 (en) 2018-10-01 2021-08-31 Blackberry Limited Determining security risks in binary software code based on network addresses
US10984102B2 (en) * 2018-10-01 2021-04-20 Blackberry Limited Determining security risks in binary software code
US11347850B2 (en) 2018-10-01 2022-05-31 Blackberry Limited Analyzing binary software code
US11475135B2 (en) 2018-11-30 2022-10-18 Target Brands, Inc. Orchestration of vulnerability scanning and issue tracking for version control technology
CN110309655B (en) * 2019-07-05 2021-08-17 武汉绿色网络信息服务有限责任公司 Method and device for detecting safety in APP updating process
US11514171B2 (en) * 2019-10-29 2022-11-29 Dell Products L.P. Code vulnerability detection and remediation
US20230064102A1 (en) * 2020-02-05 2023-03-02 Nec Corporation Analysis system, method, and program
KR102308477B1 (en) * 2020-12-07 2021-10-06 주식회사 샌즈랩 Method for Generating Information of Malware Which Describes the Attack Charateristics of the Malware
CN113468525B (en) * 2021-05-24 2023-06-27 中国科学院信息工程研究所 Similar vulnerability detection method and device for binary program
US20230315843A1 (en) * 2022-03-29 2023-10-05 Dazz, Inc. Systems and methods for cybersecurity alert deduplication, grouping, and prioritization

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009098851A (en) * 2007-10-16 2009-05-07 Mitsubishi Electric Corp System for detecting invalid code
US20130185798A1 (en) * 2012-01-13 2013-07-18 Accessdata Group, Llc Identifying software execution behavior
US20130227693A1 (en) * 2012-02-24 2013-08-29 David Bryan Dewey Software module object analysis

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6282698B1 (en) * 1998-02-09 2001-08-28 Lucent Technologies Inc. Detecting similarities in Java sources from bytecodes
US20100011441A1 (en) * 2007-05-01 2010-01-14 Mihai Christodorescu System for malware normalization and detection
KR100916329B1 (en) 2007-11-01 2009-09-11 한국전자통신연구원 Device and Method for Inspecting Vulnerability of Software
US20090313700A1 (en) * 2008-06-11 2009-12-17 Jefferson Horne Method and system for generating malware definitions using a comparison of normalized assembly code
US9141806B2 (en) * 2010-08-24 2015-09-22 Checkmarx Ltd. Mining source code for violations of programming rules
TWI515598B (en) * 2013-08-23 2016-01-01 國立交通大學 Method of generating distillation malware program, method of detecting malware program and system thereof
TWI553503B (en) * 2014-02-27 2016-10-11 國立交通大學 Method of generating in-kernel hook point candidates to detect rootkits and system thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009098851A (en) * 2007-10-16 2009-05-07 Mitsubishi Electric Corp System for detecting invalid code
US20130185798A1 (en) * 2012-01-13 2013-07-18 Accessdata Group, Llc Identifying software execution behavior
US20130227693A1 (en) * 2012-02-24 2013-08-29 David Bryan Dewey Software module object analysis

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Q. ZHANG ET AL.: "MetaAware: Identifying Metamorphic Malware", PROCEEDINGS OF TWENTY-THIRD ANNUAL COMPUTER SECURITY APPLICATIONS CONFERENCE (ACSAC 2007), JPN6015041836, 2007, pages 411 - 420, XP031197914, ISSN: 0003445412 *
S. DING ET AL.: "Identifying buffer overflow vulnerabilities based on binary code", PROCEEDINGS OF 2011 IEEE INTERNATIONAL CONFERENCE ON COMPUTER SCIENCE AND AUTOMATION ENGINEERING (CS, vol. 4, JPN6015041837, 2011, pages 738 - 742, XP031894528, ISSN: 0003483258, DOI: 10.1109/CSAE.2011.5952950 *
于競, 他: "AndroidにおけるWebViewの脆弱性を利用した攻撃を防止するアクセス制御方式の提案", 情報処理学会研究報告, vol. Vol.2013-CSEC-60, No.4, JPN6015041834, 15 April 2013 (2013-04-15), JP, pages 1 - 7, ISSN: 0003445411 *

Also Published As

Publication number Publication date
CN106575337A (en) 2017-04-19
WO2016027641A1 (en) 2016-02-25
US20170286692A1 (en) 2017-10-05
JP6088713B2 (en) 2017-03-01
EP3159823A4 (en) 2018-01-03
EP3159823A1 (en) 2017-04-26
US10534914B2 (en) 2020-01-14

Similar Documents

Publication Publication Date Title
JP6088713B2 (en) Vulnerability discovery device, vulnerability discovery method, and vulnerability discovery program
JP6503084B2 (en) Vulnerability detection device, vulnerability detection method, and vulnerability detection program
US10339315B2 (en) Apparatus and method for detecting malicious mobile app
US9015814B1 (en) System and methods for detecting harmful files of different formats
US20170372068A1 (en) Method to identify known compilers functions, libraries and objects inside files and data items containing an executable code
US10397261B2 (en) Identifying device, identifying method and identifying program
US8782791B2 (en) Computer virus detection systems and methods
US20090133125A1 (en) Method and apparatus for malware detection
US11048798B2 (en) Method for detecting libraries in program binaries
US20160196427A1 (en) System and Method for Detecting Branch Oriented Programming Anomalies
US20160292450A1 (en) System and method for controlling access of machine code to operating system resources
JP6000465B2 (en) Process inspection apparatus, process inspection program, and process inspection method
WO2020108357A1 (en) Program classification model training method, program classification method, and device
US9367686B1 (en) System and method for antivirus checking of native images of software assemblies
Osorio et al. Segmented sandboxing-a novel approach to malware polymorphism detection
US11366902B2 (en) System and method of detecting malicious files based on file fragments
KR101908517B1 (en) Method for malware detection and unpack of malware using string and code signature
US10909243B2 (en) Normalizing entry point instructions in executable program files
EP3767510A1 (en) System and method of detecting malicious files based on file fragments
WO2022230074A1 (en) Detection device, detection method, and detection program
Lin et al. FSmell: Recognizing Inline Function in Binary Code
KR20220162352A (en) Shellcode detection device for non-executable data, and method thereof
US20160321454A1 (en) Binary component extraction and embedding

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20161129

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170117

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20170131

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170203

R150 Certificate of patent or registration of utility model

Ref document number: 6088713

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150