JPWO2016027641A1 - Vulnerability discovery device, vulnerability discovery method, and vulnerability discovery program - Google Patents
Vulnerability discovery device, vulnerability discovery method, and vulnerability discovery program Download PDFInfo
- 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
Links
Images
Classifications
-
- 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/57—Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
- G06F21/577—Assessing vulnerabilities and evaluating computer system security
-
- 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
- G06F21/562—Static detection
- G06F21/563—Static detection by source code analysis
-
- 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/57—Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/03—Indexing scheme relating to G06F21/50, monitoring users, programs or devices to maintain the integrity of platforms
- G06F2221/033—Test 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.
しかしながら、ソフトウェアのプログラムコードを検査対象として、コードクローンにより脆弱性を発見する技術は存在しなかった。換言すれば、ソフトウェア開発者がコードクローンによりソフトウェアの脆弱性を発見するためには、検査対象のソフトウェアのソースコードを知る必要があった。従って、ソースコードの入手や利用が困難なソフトウェア(例えば、個人所有のソフトウェア、独占排他権の設定されたソフトウェア)に関しては、脆弱性の発見が困難であった。 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.
以下に、本願の開示する脆弱性発見装置、脆弱性発見方法、及び脆弱性発見プログラムの実施例を、図面を参照しながら詳細に説明する。なお、以下の実施例により本願の開示する脆弱性発見装置、脆弱性発見方法、及び脆弱性発見プログラムが限定されるものではない。 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
脆弱性関連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
逆アセンブル部13は、検査対象ソフトウェアS1を逆アセンブルする。正規化処理部14は、脆弱性箇所のプログラムコード12aを脆弱性抽出部12から取得する。正規化処理部14は、検査対象ソフトウェアS1の逆アセンブル結果(アセンブリコード)13aを逆アセンブル部13から取得する。正規化処理部14は、脆弱性箇所のプログラムコード12aと検査対象ソフトウェアS1の逆アセンブル結果13aとを正規化する。
The
マッチング部15は、正規化後の脆弱性箇所のプログラムコード12bと正規化後の検査対象ソフトウェアS1のプログラムコード13bとをマッチング(照合)し、プログラムコード13b中に含まれる、プログラムコード12bのコードクローンを発見する。マッチング部15は、上記マッチングの結果得られたコードクローンの情報を、未知の脆弱性候補として抽出し、脆弱性候補DB16に格納させる。
The matching
次に、脆弱性発見装置10の動作を説明する。
Next, the operation of the
図2は、脆弱性抽出部12の処理を説明するための図である。図2に示す様に、脆弱性抽出部12は、脆弱性関連情報として、例えば、公開されているセキュリティパッチD1、攻撃検証コードD2、共通脆弱性識別子D3を利用し、脆弱性が存在するソフトウェアから、脆弱性箇所のプログラムコードを抽出する。なお、本実施例では、上記脆弱性が存在するソフトウェアは、検査対象ソフトウェアS1とは異なるソフトウェアであるものとするが、これらのソフトウェアは同一であってもよい。また、脆弱性箇所のプログラムコードが抽出される契機は、例えば、上記ソフトウェア中に脆弱性の存在が確認された場合である。
FIG. 2 is a diagram for explaining processing of the
具体的には、脆弱性抽出部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
上述した様に、ソフトウェア開発者が、脆弱性が存在するソフトウェアのソースコードを入手できず、バイナリ形式の実行ファイル(プログラムコード)のみが存在する場合には、図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
なお、脆弱性抽出部12は、コンパイラC1によるコンパイルに際し、コンパイルオプションC11、C12、…を用いてもよい。同様に、脆弱性抽出部12は、コンパイラC2、C3によるコンパイルに際し、コンパイルオプションC21、C22、…と、コンパイルオプションC31、C32、…とをそれぞれ用いてもよい。
The
次に、逆アセンブル部13は、検査対象ソフトウェアS1を読み込み、逆アセンブルされたコードを出力する。正規化処理部14は、マッチング元である脆弱性箇所のプログラムコードと、マッチング先である検査対象ソフトウェアS1の逆アセンブルされたプログラムコードの正規化処理を行い、正規化されたプログラムコードを出力する。
Next, the
図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
より詳細には、ソフトウェアは、コンパイルされた環境(例えば、コンパイラ、コンパイルオプション)によっては、ソースコードが同一でも、生成されるプログラムコードが変化する場合がある。従って、ソースコードレベルでは、検査対象ソフトウェア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
なお、正規化処理では、機械語命令からオペランド部分を除いた情報である縮約命令を用いてもよい。 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
図4は、マッチング部15の処理を説明するための図である。図4に示す様に、マッチング部15は、検査対象ソフトウェアS1の利用するアーキテクチャと実行ファイル形式とを判定し、アーキテクチャと実行ファイル形式とが一致する脆弱性箇所のプログラムコードのみを、マッチング元として選択する。ここで、アーキテクチャは、CPU(Central Processing Unit)が利用する命令セットアーキテクチャであり、例えば“x86”や“ARM”がこれに該当する。また、実行ファイル形式は、ソフトウェアが計算機上において実行可能なファイルのフォーマットであり、例えば“PE”フォーマットや“ELF”フォーマットがこれに該当する。
FIG. 4 is a diagram for explaining the processing of the
例えば、図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
マッチング部15は、上記マッチングに際し、脆弱性箇所のプログラムコード(マッチング元)と、検査対象ソフトウェアS1のプログラムコード(マッチング先)とが、どの程度類似するかを示す類似度を算出するものとしてもよい。この場合、マッチング部15は、マッチングの結果得られた上記類似度が最も高くかつ所定の閾値を超えるプログラムコード部分を、検査対象ソフトウェアS1中のコードクローン部分であると判定する。例えば、マッチング部15は、N-permsを用い、検査対象ソフトウェアS1のプログラムコードのマッチング対象を1行ずつ下方にずらしながら、上記類似度を算出する。具体的には、マッチング部15は、4行中1行が一致した場合には類似度“25%”、10行中1行が一致した場合には類似度“10%”という様に、上記類似度を算出する。そして、マッチング部15は、算出された類似度が最も高い位置にあるプログラムコード部分(図4では“95%”の位置)が、上記閾値(例えば、80〜90%)を超える場合に、該プログラムコード部分をコードクローン部分と判定する。
The matching
なお、上記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
以上説明した様に、脆弱性発見装置10は、脆弱性抽出部12と正規化処理部14とマッチング部15とを有する。脆弱性抽出部12は、ソフトウェアの脆弱性箇所に該当する第1のプログラムコードを抽出する。正規化処理部14は、脆弱性抽出部12により抽出された第1のプログラムコードと、脆弱性箇所の検査対象となるソフトウェアの第2のプログラムコードとに含まれる、コンパイル環境により異なるパラメータを正規化する。マッチング部15は、上記正規化後の第1のプログラムコードと上記正規化後の第2のプログラムコードとをマッチングし、上記第2のプログラムコードの中から、上記第1のプログラムコードと同一または類似のプログラムコードであるコードクローンを、未知の脆弱性候補として検出する。
As described above, the
また、脆弱性発見装置10において、マッチング部15は、上記マッチングに際し、アーキテクチャと実行ファイル形式とが上記検査対象となるソフトウェアと同一である上記正規化後の第1のプログラムコードと、上記正規化後の第2のプログラムコードとをマッチングするものとしてもよい。更に、脆弱性抽出部12は、上記第1のプログラムコードを有するソフトウェアのソースコードをコンパイルし、該コンパイルにより得られたプログラムコードから、上記ソフトウェアの脆弱性箇所に該当する第1のプログラムコードを抽出するものとしてもよい。また、マッチング部15は、上記第1のプログラムコードと上記第2のプログラムコードとの類似度を算出し、上記第2のプログラムコードの中から、上記類似度が最も高くかつ所定値を超えるプログラムコードを、上記同一または類似のプログラムコードとして検出するものとしてもよい。更に、正規化処理部14は、上記パラメータとして、上記第1のプログラムコードと上記第2のプログラムコードとの双方のプログラムコード中に含まれるパラメータの内、コンパイル環境により変化するパラメータを正規化するものとしてもよい。
Further, in the
上述した様に、脆弱性発見装置10は、プログラムコードを直接比較することにより、検査対象ソフトウェアS1のソースコードを用いることなく、検査対象ソフトウェアS1中においてコードクローンにより生成された脆弱性を発見することができる。従って、ソースコードの入手や利用が困難なソフトウェア(例えば、個人所有のソフトウェア、独占排他権の設定されたソフトウェア)においても、脆弱性の発見が可能となる。
As described above, the
(脆弱性発見プログラム)
図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
メモリ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
ここで、図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
なお、脆弱性発見プログラムに係るプログラムモジュール108cやプログラムデータ108dは、ハードディスクドライブ108に記憶される場合に限られず、例えば着脱可能な記憶媒体に記憶され、ディスクドライブ109等を介してCPU102によって読み出されてもよい。あるいは、脆弱性発見プログラムに係るプログラムモジュール108cやプログラムデータ108dは、ネットワーク(LAN(Local Area Network)、WAN(Wide Area Network)等)を介して接続された他のコンピュータに記憶され、ネットワークインタフェース107を介してCPU102によって読み出されてもよい。
Note that the
なお、上記実施例では、逆アセンブル部13は、検査対象ソフトウェアS1を逆アセンブルするものとしたが、検査対象ソフトウェアS1が高級言語で記述されている場合には、逆コンパイルするものとしてもよい。反対に、図2において、コンパイラC1〜C3はアセンブラであってもよく、脆弱性が存在するソフトウェアのソースコードが入手可能な場合に、該ソースコードがアセンブルされるものとしてもよい。
In the above embodiment, the
また、上述した脆弱性発見装置10の各構成要素は、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的態様は、図示のものに限らず、その全部又は一部を、各種の負荷や使用状況等に応じて、任意の単位で機能的又は物理的に分散・統合して構成することもできる。例えば、脆弱性抽出部12と正規化処理部14、逆アセンブル部13と正規化処理部14の少なくとも一方を1つの構成要素として統合してもよい。反対に、マッチング部15に関し、マッチング処理を実行する部分と、コードクローンを検出する部分と、用いるアーキテクチャ及び実行ファイル形式の同一性を判定する部分とに分散してもよい。更に、ハードディスクドライブ108を、脆弱性発見装置10の外部装置として、ネットワークやケーブル経由で接続する様にしてもよい。
Moreover, each component of the
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
100
101b RAM
102 CPU
103 Hard Disk Drive Interface 104
108b
Claims (8)
前記抽出部により抽出された第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のプログラムコードを抽出する抽出工程と、
前記抽出工程にて抽出された第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のプログラムコードと、脆弱性箇所の検査対象となるソフトウェアの第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.
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)
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)
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)
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 |
-
2015
- 2015-07-30 CN CN201580042817.8A patent/CN106575337A/en active Pending
- 2015-07-30 JP JP2016543890A patent/JP6088713B2/en active Active
- 2015-07-30 EP EP15833502.6A patent/EP3159823A4/en not_active Ceased
- 2015-07-30 WO PCT/JP2015/071721 patent/WO2016027641A1/en active Application Filing
- 2015-07-30 US US15/504,116 patent/US10534914B2/en active Active
Patent Citations (3)
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)
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 |