JPWO2016030927A1 - Process analysis apparatus, process analysis method, and process analysis program - Google Patents
Process analysis apparatus, process analysis method, and process analysis program Download PDFInfo
- Publication number
- JPWO2016030927A1 JPWO2016030927A1 JP2016545089A JP2016545089A JPWO2016030927A1 JP WO2016030927 A1 JPWO2016030927 A1 JP WO2016030927A1 JP 2016545089 A JP2016545089 A JP 2016545089A JP 2016545089 A JP2016545089 A JP 2016545089A JP WO2016030927 A1 JPWO2016030927 A1 JP WO2016030927A1
- Authority
- JP
- Japan
- Prior art keywords
- block
- information
- input
- unit
- output
- 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/55—Detecting local intrusion or implementing counter-measures
- G06F21/56—Computer malware detection or handling, e.g. anti-virus arrangements
- G06F21/567—Computer malware detection or handling, e.g. anti-virus arrangements using dedicated hardware
-
- 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
-
- 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/566—Dynamic detection, i.e. detection performed at run-time, e.g. emulation, suspicious activities
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Virology (AREA)
- Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Debugging And Monitoring (AREA)
- Stored Programmes (AREA)
Abstract
本発明は、情報処理装置で実行されるプロセスを解析して、プロセスの中で利用されている暗号関数や復号関数などの暗号ロジックを抽出するプロセス解析装置に関する。プロセス解析装置は、解析対象のプロセスの実行トレースを取得する実行トレース取得部と、実行トレースからループ構造を示す処理単位であるブロックを抽出するブロック抽出部と、ブロックから、入力情報と出力情報とを含むブロック情報を抽出するブロック情報抽出部と、ブロック情報の入力情報または出力情報を用いてブロックの入出力関係の特徴を判定する特徴判定情報を生成し、この特徴判定情報を利用してブロックの入出力関係を解析し、暗号関数または復号関数の入出力関係の特徴を示すブロックを暗号ロジックと判定するブロック情報解析部とを備える。The present invention relates to a process analysis apparatus that analyzes a process executed by an information processing apparatus and extracts cryptographic logic such as an encryption function and a decryption function used in the process. The process analysis apparatus includes an execution trace acquisition unit that acquires an execution trace of a process to be analyzed, a block extraction unit that extracts a block that is a processing unit indicating a loop structure from the execution trace, and input information and output information from the block. A block information extraction unit for extracting block information including the block information, and feature determination information for determining the feature of the input / output relationship of the block using the input information or output information of the block information, and using the feature determination information to generate a block A block information analyzing unit that analyzes the input / output relationship of the encryption function and determines the block indicating the characteristics of the input / output relationship of the encryption function or the decryption function as the encryption logic.
Description
本発明は、情報処理装置で実行されるプロセスを解析して、プロセスの中で利用されている暗号関数や復号関数などの暗号ロジックを抽出するプロセス解析装置に関する。 The present invention relates to a process analysis apparatus that analyzes a process executed by an information processing apparatus and extracts cryptographic logic such as an encryption function and a decryption function used in the process.
近年、新しいセキュリティ脅威として、特定の組織をねらい、執拗に攻撃を行なうAdvanced Persistent Threat (APT)と呼ばれる「標的型攻撃」が顕在化している。APTでは、メールによって標的とする組織の端末にマルウェアを感染させ、感染したマルウェアが外部の攻撃者のサーバと通信を行ない、新しい攻撃プログラムのダウンロードや組織システム内の機密情報の送信を行なう。このようなセキュリティインシデントの発生を早期に検出し被害の拡大を防ぐために、ネットワーク機器の様々なログを監視し不審な兆候の検出を行なうSecurity Operation Center (SOC)サービスが必要とされる。一方、インシデントの発生が判明した場合、組織は、インシデントの原因や被害の調査、対応策の検討、サービスの復旧、再発防止策の実施などのインシデントレスポンスを行なわなければならない。さらに、組織の顧客やビジネスパートナーによっては、組織は、機密情報の何が漏えいし、何が漏えいしなかったのかを、明確にする必要がある。 In recent years, as a new security threat, a “targeted attack” called Advanced Persistent Threat (APT), which attacks persistently with a specific organization, has become apparent. In APT, malware is infected to a target organization terminal by mail, and the infected malware communicates with an external attacker's server to download a new attack program and transmit confidential information in the organization system. In order to detect the occurrence of such security incidents at an early stage and prevent the spread of damage, a Security Operation Center (SOC) service that monitors various logs of network devices and detects suspicious signs is required. On the other hand, when the occurrence of an incident is found, the organization must perform an incident response such as investigation of the cause and damage of the incident, examination of countermeasures, restoration of services, and implementation of measures for preventing recurrence. In addition, depending on the organization's customers and business partners, the organization needs to clarify what has been leaked and what has not been leaked.
組織がインシデントの原因や被害の調査を行なうにあたり、パソコン、サーバ、ネットワーク機器などが生成したログやネットワーク上で記録されたパケットを解析し、マルウェアの侵入経路、感染端末、アクセスした情報、攻撃者からの命令、外部に送信した情報などを調査するネットワークフォレンジックが重要な役割を担う。ところが、昨今のマルウェアは、暗号技術を活用して通信を秘匿する。そのため、組織がネットワークフォレンジックを行なったとしても、攻撃者から送られる命令が何であり、どのような情報が外部に送信されたのかを追跡することが困難となっている。 When an organization investigates the cause or damage of an incident, it analyzes logs generated by computers, servers, network devices, etc. and packets recorded on the network to find malware intrusion routes, infected terminals, information accessed, attackers Network forensics, which investigates commands from the Internet and information sent to the outside, plays an important role. However, recent malware uses encryption technology to conceal communication. For this reason, even if the organization performs network forensics, it is difficult to track what commands are sent from the attacker and what information is sent to the outside.
この問題に対応するためには、マルウェアが通信の秘匿に利用した暗号ロジックと鍵を見つけ、暗号化された通信を復号する必要がある。一般に、この作業はマルウェアのプログラムのバイナリを解析する必要がある。従来の暗号ロジック抽出手法の多くは、例えば、特許文献1に開示されているマルウェア解析システムのように、マルウェアを実行した際の実行トレースから、暗号ロジックによく見られる特徴を探すことで、暗号ロジックと鍵の特定を行なう。また、マルウェアのプログラムのバイナリを解析する技術としては、非特許文献1〜9に開示されている技術が知られている。
In order to cope with this problem, it is necessary to find the encryption logic and key used by the malware to conceal the communication, and to decrypt the encrypted communication. In general, this task requires analyzing the malware program binaries. Many of the conventional cryptographic logic extraction methods, such as the malware analysis system disclosed in
特許文献1に代表される従来技術では、暗号ロジックの候補として多くの無関係なロジックが抽出される。マルウェア解析者は、手作業で無関係なロジックを除外しなければならず、多大な手間暇を要するという課題がある。そのため、無関係なロジックの抽出を抑えた、精度の高い暗号ロジック抽出手法が必要となる。
In the prior art represented by
この発明は上記のような課題を解決するためになされたもので、ファイルや通信を暗号化するマルウェアが利用する暗号ロジックの特徴を基にしてマルウェアの実行トレースを解析することにより、マルウェアが用いる暗号ロジックを、精度良く特定することを目的とする。 The present invention has been made to solve the above problems, and is used by malware by analyzing execution traces of malware based on the characteristics of cryptographic logic used by malware that encrypts files and communications. The purpose is to specify the cryptographic logic with high accuracy.
上記で述べた課題を解決するため、本発明のプロセス解析装置は、解析対象のプロセスの実行トレースを取得する実行トレース取得部と、前記実行トレースからループ構造を示す処理単位であるブロックを抽出するブロック抽出部と、前記ブロックから、入力情報と出力情報とを含むブロック情報を抽出するブロック情報抽出部と、前記ブロック情報の前記入力情報または前記出力情報を用いて前記ブロックの入出力関係の特徴を判定する特徴判定情報を生成し、この特徴判定情報を利用して前記ブロックの入出力関係を解析し、暗号関数または復号関数の入出力関係の特徴を示すブロックを暗号ロジックと判定するブロック情報解析部とを備える。 In order to solve the problems described above, the process analysis apparatus of the present invention extracts an execution trace acquisition unit that acquires an execution trace of a process to be analyzed, and a block that is a processing unit indicating a loop structure from the execution trace. A block extraction unit, a block information extraction unit that extracts block information including input information and output information from the block, and features of input / output relationships of the blocks using the input information or the output information of the block information Block information that generates feature determination information for determining the block, analyzes the input / output relationship of the block using the feature determination information, and determines a block indicating the feature of the input / output relationship of the encryption function or the decryption function as encryption logic And an analysis unit.
本発明によれば、実行トレースから抽出したブロックの入出力関係の特徴を判定する特徴判定情報を生成し、この特徴判定情報を利用してブロックの入出力関係を解析し、暗号関数または復号関数の入出力関係の特徴を示すブロックを暗号ロジックと判定することにより、マルウェアが用いる暗号ロジックを、精度良く特定することができるという効果がある。 According to the present invention, the feature determination information for determining the feature of the input / output relationship of the block extracted from the execution trace is generated, the input / output relationship of the block is analyzed using this feature determination information, and the encryption function or the decryption function By determining the block showing the characteristics of the input / output relationship as the encryption logic, there is an effect that the encryption logic used by the malware can be specified with high accuracy.
実施の形態1.
図1は、実施の形態1に係るプロセス解析装置の一構成例を示す構成図である。
図1において、プロセス解析装置100は、実行トレース取得部110、ブロック抽出部120、ブロック情報抽出部130、ブロック情報解析部140、及び、解析結果出力部150を備える。
FIG. 1 is a configuration diagram illustrating a configuration example of a process analysis apparatus according to the first embodiment.
1, the
プロセス解析装置100は、マルウェアのプログラムのバイナリを解析するための機器であり、例えば、CPU(Central Processing Unit)がバスを介して、ROM、RAM、通信ボード、ディスプレイ、キーボード、マウス、磁気ディスク装置などのハードウェアデバイスと接続されたコンピュータにより、プロセス解析装置100を構成する。また、プロセス解析装置100では、CPU上に仮想マシンを備え、マルウェアのプログラムを実行できる実行環境を備えている。
The
実行トレース取得部110は、仮想マシンの実行環境上で、解析対象の実行ファイル101を実行し、実行した処理のログ情報である実行トレース102と、実行したプロセスに関する各種情報であるプロセス情報103を取得する。
The execution
ブロック抽出部120は、実行トレース取得部110により取得した実行トレース102から、プログラムを構成する基本的な構成要素であるブロックを抽出し、抽出した複数のブロックのリストであるブロックリスト104を出力する。また、ブロック抽出部120は、実行トレース102の各行から、後述するブロック情報解析処理に必要な情報を抽出して、定義リスト105を出力する。
The
ブロック情報抽出部130は、実行トレース102とブロックリスト104と定義リスト105から、ブロックで実行される入出力情報を含むブロック情報を抽出し、ブロック情報リスト106を出力する。
The block
ブロック情報解析部140は、ブロック情報抽出部130が出力したブロック情報リスト106を用いて、解析対象ブロックが暗号ロジックか否かを解析し、解析結果リスト107を出力する。
The block
解析結果出力部150は、ブロック情報解析部140が解析した解析結果リスト107の内容を、例えばディスプレイに出力して解析者に表示する。
The analysis
次に、プロセス解析装置100のプロセス解析処理を、図2のフローチャートを用いて説明する。
図2は、実施の形態1に係るプロセス解析装置のプロセス解析処理の流れを示すフローチャートである。Next, the process analysis processing of the
FIG. 2 is a flowchart showing a flow of process analysis processing of the process analysis apparatus according to the first embodiment.
まず、ステップS110において、実行トレース取得部110は、仮想マシンなどの解析環境上で、解析対象の実行ファイル101のプログラムを実行する。実行トレース取得部110は、実行したプログラムのプロセスを監視し、同プロセスの実行トレース102を記録する。実行トレース102により記録する情報は、例えば、以下のような情報を記録する。
・実行した命令のアドレス
・実行した命令のアドレス(オペコード、オペランド)
・アクセスされたレジスタとその値
・アクセスされたメモリのアドレス、その値、そのモード(READ/WRITE)First, in step S110, the execution
-Address of executed instruction-Address of executed instruction (opcode, operand)
・ Accessed register and its value ・ Accessed memory address, its value, its mode (READ / WRITE)
実行トレースを取得する方法としては、例えば、非特許文献7に記載されているPinなどのDynamic Instrumentation Toolを用いる方法や、非特許文献8に記載されているTEMUのようなエミュレータを用いる方法がある。実行トレース取得部110では、これらの既存の方法を基に、実行トレースを取得する。
As a method for acquiring an execution trace, for example, there is a method using a Dynamic Instrumentation Tool such as Pin described in
また、実行トレース取得部110は、実行トレース102の取得と同時に、実行トレース102を取得したプロセスがロードしているDLLや関数についての情報をプロセス情報103として抽出する。プロセス情報103には、例えば、以下のような情報が記録される。
・プロセスのベースアドレス
・プロセスがロードしているDLLの名前、アドレス、サイズ
・DLLがエクスポートしているAPIの名前、アドレス
なお、プロセス情報103の分かりやすい実例としては、メモリにロードされているプロセスのPEヘッダである。In addition, the execution
-Base address of the process-Name, address, and size of the DLL loaded by the process-Name and address of the API exported by the DLL As an easy-to-understand example of the
次に、ステップS120において、ブロック抽出部120は、実行トレース102から、プログラムを構成する基本的な構成要素であるブロックを抽出する。ここでいうブロックとは、関数、ループ、連結したループなどであり、それらを表現するために必要な、以下の情報を持つ。
・ブロックID
・ブロックの種類
・ブロックの開始アドレス
・ブロックの終了アドレス
・ブロック内の命令列(プロセスのメモリイメージから取得)
ブロック抽出部120は、抽出した複数のブロックについて上記のブロックの情報を、ブロックリスト104として管理する。Next, in step S120, the
・ Block ID
-Block type-Block start address-Block end address-Instruction sequence in the block (taken from the memory image of the process)
The
以下、ブロックを表現する各情報について説明する。
ブロックIDは、ブロックリストにおいて一意となる値を設定する。ブロックの種類とは、ブロックを構成する最も外側のロジック(関数、ループ、連結したループ)を設定する。ブロックの開始アドレスとは、プロセスが利用するメモリ上の何番地目からブロックが開始しているかを示す。ブロックの終了アドレスとは、プロセスが利用するメモリ上の何番地目でブロックが終了しているかを示す。ブロック内の命令列とは、プロセスが利用するメモリ上で、開始アドレスと終了アドレスの範囲に存在する命令シーケンスである。Hereinafter, each piece of information representing a block will be described.
The block ID is set to a unique value in the block list. As the block type, the outermost logic (function, loop, connected loop) constituting the block is set. The block start address indicates from which address on the memory used by the process the block starts. The block end address indicates the address on the memory used by the process at which the block ends. The instruction sequence in the block is an instruction sequence existing in the range of the start address and the end address on the memory used by the process.
ブロック抽出部120は、callなどの関数呼出命令と、retなどのリターン命令の関係を実行トレース102上で追跡することにより、関数を特定する。また、ブロック抽出部120は、命令パターンの繰返しや後方ジャンプ(Backward Jump)を実行トレース上で追跡することにより、ループを特定する。また、ブロック抽出部120は、ループ間の入出力関係を実行トレース上で追跡することにより、連結したループを特定する。なお、ブロックリスト104の抽出に関しては、例えば、非特許文献5、6、9に開示されている技術を活用することができる。
The
さらに、ステップS120では、後述のステップで必要な情報として、定義リスト105を作成する。
図3は、定義リスト105の一例を示す図である。
図3に示すように、定義リスト105は、ブロック抽出部120が実行トレース102を1行ずつ読んでいく中で、以下の情報を記録したテーブルである。
・実行トレースの行番号
・同行で実行された命令があるアドレス
・同行で変更された記憶領域(レジスタ、メモリ)
・新しい値
・値のサイズFurther, in step S120, a
FIG. 3 is a diagram illustrating an example of the
As shown in FIG. 3, the
-Line number of the execution trace-Address where the instruction executed on the same line is located-Storage area (register, memory) changed on the same line
New value / value size
次に、ステップS130において、ブロック情報抽出部130は、実行トレース102とブロック(ブロックリスト104、定義リスト105)から、ブロック情報を抽出し、ブロック情報リスト106を出力する。ここでいうブロック情報リスト106には、以下に示す情報を持つブロック情報が要素として登録される。
・ブロックID
・入力情報
・出力情報
・コンテキストNext, in step S130, the block
・ Block ID
・ Input information ・ Output information ・ Context
以下、ブロック情報を表現する各情報について説明する。
ブロックIDとは、ブロックリスト104に登録されているブロックと対応づけるための情報である。
入力情報とは、実行トレース102において、以下の条件を満たす情報である。
・ブロックの実行前に定義される情報
・ブロックの実行中において、上書きされる前に、読まれる情報
出力情報とは、実行トレース102において、以下の条件を満たす情報である。
・記憶領域(レジスタ、メモリ)において、ブロック実行中、同記憶領域に最後に書き込まれた情報
コンテキストとは、ブロックが実行トレース102において、どのタイミングで実行されているかを表わすための情報である。Hereinafter, each piece of information representing block information will be described.
The block ID is information for associating with a block registered in the
Input information is information that satisfies the following conditions in the
Information defined before execution of block Information read before being overwritten during execution of block Output information is information that satisfies the following conditions in the
In the storage area (register, memory), the information context last written in the storage area during execution of the block is information for indicating when the block is executed in the
以下、入力情報、出力情報、コンテキストの抽出処理の詳細を説明する。 The details of the input information, output information, and context extraction processing will be described below.
まず、入力情報の抽出は、次のように行なう。
ブロック情報抽出部130は、実行トレース102を1行ずつ解析する。注目している実行トレース102の命令アドレスが、ブロックリスト104に登録されている、いずれかのブロックB1の開始アドレスと終了アドレスの範囲に含まれているとする。ブロック情報抽出部130は、実行トレース102をさらに解析し、ブロックB1の範囲にあるアドレスXで命令が実行され、同命令によって、ある記憶領域がREADされているとする。そして、ブロック情報抽出部130は、定義リスト105を解析し、ブロックB1の範囲内かつアドレスXよりも前に実行された命令によって、同記憶領域がWRITEされていないかを確認する。WRITEされていない場合、同記憶領域を入力情報とする。First, input information is extracted as follows.
The block
なお、実行トレース102上、隣接するメモリ領域が同じアドレスの同じ命令によってREADされている場合、同メモリ領域はバッファとしてアクセスされている可能性が高いため、同メモリ領域をまとめて入力情報とする。すなわち、入力情報としては、同メモリ領域の先頭アドレス、サイズ、格納されているバイト列、から構成される。また、入力情報の種類として、『バッファ』であることも記録する。また、同じアドレスの命令によってREADされているが、値がカウントアップまたはカウントダウンしている入力情報については、入力情報の種類を『カウンタ』とする。ループの中でループの終了条件に使われている入力情報や、カウンタの初期値に使われている入力情報の種類を、『終了条件』とする。
If the adjacent memory area is read by the same instruction at the same address on the
次に、出力情報の抽出は、次のように行なう。
ブロック情報抽出部130が、あるブロックB1の実行トレース102を解析しているとする。ブロック情報抽出部130は、実行トレース102をさらに解析し、トレースがブロックB1の範囲を超えたとする。このとき、ブロック情報抽出部130は、定義リスト105を解析することで、同ブロックの範囲で実行された命令によってWRITEされた情報を出力情報とする。また、同じ記憶領域に複数回WRITEが行なわれている場合は、実行トレース102の行番号が大きいもの、すなわち、最新のものを出力情報とする。Next, output information is extracted as follows.
It is assumed that the block
なお、入力情報と同様に、実行トレース102上、隣接するメモリ領域が同じアドレスの同じ命令によってWRITEされている場合、バッファとしてアクセスされている可能性が高いため、同メモリ領域をまとめて出力情報とする。すなわち、出力情報としては同メモリ領域の先頭アドレス、サイズ、格納されているバイト列、から構成される。また、出力情報の種類として、『バッファ』であることも記録する。また、同じアドレスの命令によってWRITEされているが、値がカウントアップまたはカウントダウンしている出力情報については、出力情報の種類を『カウンタ』とする。ループの中でループの終了条件に使われている出力情報や、カウンタの初期値に使われている出力情報の種類を、『終了条件』とする。
As in the case of input information, if adjacent memory areas on the
次に、入力情報と出力情報を格納するデータ形式を説明する。
図4は、入力情報と出力情報を格納するデータ形式の一例を説明する図である。
図4において、入力情報と出力情報に関する情報は、記憶領域(開始アドレス)、値(バイト列)、サイズ(バイト)、情報の種類が格納されている。Next, a data format for storing input information and output information will be described.
FIG. 4 is a diagram for explaining an example of a data format for storing input information and output information.
In FIG. 4, information relating to input information and output information includes a storage area (start address), a value (byte string), a size (byte), and a type of information.
次に、コンテキストの抽出は、次のように行なう。
コンテキストは、ブロックの呼び出し関係(入れ子関係)を表現するためのものである。例えば、B1、B2、B3、B4、B5、B6、B7、B8をブロックとする。このとき、B1の実行終了後にB2が実行され、B2の中でB3とB4が実行され、B2の実行終了後にB5が実行されるとする。さらに、B5の中でB6が実行され、B6の中で、B7が実行されるとする。そして、B7、B6の実行終了後、B8が実行されるとする。Next, context extraction is performed as follows.
The context is for expressing the calling relationship (nesting relationship) of blocks. For example, B1, B2, B3, B4, B5, B6, B7, and B8 are blocks. At this time, B2 is executed after the execution of B1, B3 and B4 are executed in B2, and B5 is executed after the execution of B2. Furthermore, B6 is executed in B5, and B7 is executed in B6. Then, B8 is executed after the execution of B7 and B6 is completed.
上記で述べたブロックの呼び出し関係の場合、B1、B2、B5、B8のコンテキストを、それぞれ1、2、3、4と表現する。また、B2の中で実行されるB3、B4のコンテキストを、それぞれ2.1、2.2と表現する。同様に、B5の中で実行されるB6のコンテキストを3.1と表現する。さらに、B6の中で実行されるB7のコンテキストを3.1.1と表現する。このようにコンテキストを表現することにより、同じブロック(同じブロックID)の呼び出しであっても、呼び出し場所に応じて区別することができる。 In the case of the block calling relationship described above, the contexts of B1, B2, B5, and B8 are expressed as 1, 2, 3, and 4, respectively. The contexts B3 and B4 executed in B2 are expressed as 2.1 and 2.2, respectively. Similarly, the context of B6 executed in B5 is expressed as 3.1. Further, the context of B7 executed in B6 is expressed as 3.1.1. By expressing the context in this way, even calls of the same block (same block ID) can be distinguished according to the call location.
なお、コンテキストの表現形式は、ブロックの呼び出し関係(入れ子関係)を表現できる表現形式であればどのような表現形式でも構わない。 Note that the expression format of the context may be any expression format as long as it can express the calling relationship (nesting relationship) of the blocks.
また、ブロック情報抽出部130は、実行トレース102を解析していく中で、ブロックが終了したのか、それともブロックの中で新しくブロックが呼ばれたかのかは、次のように判断する。
・あるブロックの実行トレース102を解析している最中に、関数呼び出し(例えばcallやenter)以外の命令(例えばjmp、jne、ret)でブロックの範囲外へジャンプする場合、同ブロックの終了を意味する。
・あるブロックの実行トレース102を解析している最中に、関数呼び出し(例えばcallやenter)命令でブロックの範囲外へジャンプする場合、同ブロックは終了せず、同ブロックの中で新たにブロックが呼び出されたものとする。
・あるブロックの実行トレース102を解析している最中に、上記以外のケースで、実行トレース102がブロックの範囲を超えた場合、同ブロックの終了を意味する。In addition, while analyzing the
When the
-While the
-While analyzing the
次に、図2のフローチャートの説明に戻る。
ステップS140において、ブロック情報解析部140は、ブロック情報リスト106のブロック情報を解析し、暗号ロジックを特定する。ブロック情報の解析では、ブロック情報解析部140は、ブロック情報の入力情報または出力情報を用いて、ブロックの入出力関係の特徴を判定する特徴判定情報を生成し、この特徴判定情報を利用してブロックの入出力関係を解析し、暗号関数または復号関数の入出力関係の特徴を示すブロックを暗号ロジックと判定する。ブロック情報解析部140が生成する特徴判定情報と、特徴判定情報を利用した暗号ロジックの判定方法は、後述する実施例1〜実施例4で詳細に説明する。ブロック情報解析部140は、ブロック情報を解析した結果、暗号ロジックの判定結果を含む解析結果リスト107を出力する。Next, the description returns to the flowchart of FIG.
In step S140, the block
最後に、ステップS150において、解析結果出力部150は、ブロックリスト104、ブロック情報リスト106、解析結果リスト107を基に、解析結果を整理して、以下の情報を出力する。
・暗号ロジックの開始アドレス
・入力情報(記憶領域、値、サイズ)
・出力情報(記憶領域、値、サイズ)
・復号ロジックの開始アドレスFinally, in step S150, the analysis
・ Cryptographic logic start address ・ Input information (storage area, value, size)
-Output information (storage area, value, size)
・ Decryption logic start address
以上のように、本実施の形態1の発明では、実行トレースから抽出したブロックの入出力関係の特徴を判定する特徴判定情報を生成し、この特徴判定情報を利用してブロックの入出力関係を解析し、暗号関数または復号関数の入出力関係の特徴を示すブロックを暗号ロジックと判定することにより、マルウェアが用いる暗号ロジックを、精度良く特定することができるという効果がある。 As described above, in the first embodiment of the present invention, the feature determination information for determining the feature of the input / output relationship of the block extracted from the execution trace is generated, and the input / output relationship of the block is determined using this feature determination information. By analyzing and determining the block showing the characteristics of the input / output relationship of the encryption function or the decryption function as the encryption logic, there is an effect that the encryption logic used by the malware can be specified with high accuracy.
次に、本実施の形態1を具体的に実現する実施例1〜実施例4について、以下に説明する。 Next, Examples 1 to 4 that specifically realize the first embodiment will be described below.
実施例1.
暗号関数の入力は、通常、平文である。一方、暗号関数の出力は、ランダムなバイト列である。そのため、暗号関数の入力には印刷可能文字列の割合が多く、出力には印刷可能文字列の割合が少ないという特徴が見られる。
図5は、暗号関数の入出力情報が含む印刷可能文字列の特徴を示す図である。
図5では、入力される「こんにちは」が印刷可能文字列であり、また、出力される情報の内、「唖」が印刷可能文字列であり、「・」が印刷不可能な文字列を示している。実施例1では、このような暗号関数の入出力情報が含む印刷可能文字列の特徴を特徴判定情報に利用して、暗号ロジックを特定する実施例を説明する。Example 1.
The input of the cryptographic function is usually plain text. On the other hand, the output of the cryptographic function is a random byte sequence. Therefore, there is a feature that the ratio of the printable character string is large in the input of the encryption function and the ratio of the printable character string is small in the output.
FIG. 5 is a diagram showing the characteristics of the printable character string included in the input / output information of the cryptographic function.
In Figure 5, a printable character string "Hello" is input, also, among the information output, "mute" is printable string, "-" indicates a character string non-printable ing. In the first embodiment, a description will be given of an embodiment in which the encryption logic is specified by using the feature of the printable character string included in the input / output information of the encryption function as the feature determination information.
図6は、実施例1に係るプロセス解析装置の一構成例を示す構成図である。
図6において、ブロック情報解析部140は、文字列割合判定部160、文字コード判定アルゴリズムデータベース(データベースは、以下DBと記載する)161、文字コード表DB162を備える。ブロック情報解析部140は、ブロック情報リスト106が入力され、文字列割合判定処理を行なって、解析結果リスト107を出力する。また、文字列割合判定部160は、ブロック情報解析部140から入力されたブロック情報の入力情報に対して、印刷可能文字列割合を判定して暗号ロジックを特定し、特定した暗号ロジックを含む暗号ロジックリスト1(163)をブロック情報解析部140に出力する。FIG. 6 is a configuration diagram illustrating a configuration example of the process analysis apparatus according to the first embodiment.
6, the block
なお、文字列割合判定部160、文字コード判定アルゴリズムDB161、文字コード表DB162は、ブロック情報解析部140の内部に備える構成としても良い。
The character string
次に、実施例1の文字列割合判定処理の流れを、図7を参照して説明する。
図7は、実施例1に係る文字列割合判定部160の文字列割合判定処理の流れを示すフローチャートである。Next, the flow of character string ratio determination processing according to the first embodiment will be described with reference to FIG.
FIG. 7 is a flowchart illustrating the flow of the character string ratio determination process of the character string
まず、ステップS1601において、文字列割合判定部160は、暗号ロジックリスト1(163)を初期化する。暗号ロジックリスト1(163)は、文字列割合判定部160で暗号ロジックの候補と判定されたブロック情報を格納するブロック情報リスト106である。
First, in step S1601, the character string
次に、ステップS1602において、文字列割合判定部160は、ブロック情報リスト106に次の要素(ブロック情報)があるかを確認する。次の要素のブロック情報が無ければ、Noの分岐に進み、処理を終了する。一方、次の要素のブロック情報があれば、ステップS1603において、次の要素Biを選ぶ。
Next, in step S1602, the character string
次に、ステップS1604において、文字列割合判定部160は、ブロック情報の入力情報の印刷可能文字列の割合を判定する。ここで印刷可能文字列とは、改行復帰文字、または空文字(ヌル文字)で終わるc個の文字の連鎖からなる印刷可能な文字列のことである。文字列割合判定部160は、情報の種類に「バッファ」が設定されている入力情報に対して、値に設定されているバイト列の文字コード判定を行なう。この文字コード判定では、文字コード判定アルゴリズムDB161に登録されているアルゴリズムを用いて、文字コード判定を実行する。文字コードが判定できれば、文字コード表DB162から対応する文字コード表を取得し、印刷可能な文字を確認することができる。
図8は、文字コード表DB162に格納された文字コード表の例を示す図である。
図8では、文字「あ」から文字「ぱ」に対して、文字コードが対応付けられて格納された例を示している。In step S1604, the character string
FIG. 8 is a diagram illustrating an example of a character code table stored in the character
FIG. 8 shows an example in which character codes are stored in association with characters “A” to “Pa”.
文字列割合判定部160は、入力情報のバイト列から得られた印刷可能文字列の文字列長の総和を、同バイト列長で割ることで、印刷可能文字列割合を算出する。なお、文字列長は、マルチバイト文字を2バイトとして計算する。
The character string
次に、ステップS1605において、文字列割合判定部160は、ブロック情報の出力情報の印刷可能文字列の割合を判定する。ここでの処理手順はステップS1604と同様である。
In step S <b> 1605, the character string
次に、ステップS1606において、文字列割合判定部160は、入力と出力の印刷可能文字列の割合の差分として、入力の印刷可能文字列割合−出力の印刷文字列割合を計算する。
In step S <b> 1606, the character string
次に、ステップS1607において、文字列割合判定部160は、ステップS1606で計算した差分が、閾値θ以上であれば、暗号ロジックリスト1(163)に、同ブロック情報Biを追加する。なお、上記のc、及びθは、調整可能なパラメータである。
In step S1607, if the difference calculated in step S1606 is greater than or equal to the threshold θ, the character string
なお、ステップS1604において、入力情報のファイルタイプ検査を行うことも可能である。入力がWORDやPDFなどの既知のファイル形式のファイルであれば、そのファイル形式に従ってテキスト情報を抽出し、同テキスト情報に対してのみ印刷可能文字列割合を計算する。こうすることで、WORDやPDFなどのテキストを特別な形式でエンコードするタイプのファイルが入力情報であったとしても、適切に入力情報の印刷可能文字列割合を計算することができる。ファイルタイプ検査は既知のツールを利用することが可能である。 In step S1604, it is possible to perform a file type inspection of input information. If the input is a file of a known file format such as WORD or PDF, text information is extracted according to the file format, and a printable character string ratio is calculated only for the text information. By doing this, even if a file of a type that encodes text such as WORD or PDF in a special format is input information, the ratio of printable character strings of the input information can be calculated appropriately. The file type check can use a known tool.
実施例2.
マルウェアなどの不正プログラムは、暗号化されたデータを印刷可能なデータにエンコード(例えばBase64エンコード)してから、インターネット上に送信することがある。
図9は、マルウェアの暗号関数の使い方の一例(その1)を示す図である。
図9では、マルウェアが、暗号関数によりメッセージを暗号化した暗号文を、Base64エンコードしてから、HTTP送信によりインターネット上に送信している例を示している。そこで、あるブロックの出力情報を、既知のデコーダ(例えばBase64デコーダ)を用いてデコードを行ない、デコードに成功した場合、デコードした値と等しい出力情報を持っているブロックを、暗号ロジックの候補とすることができる。実施例2では、このような暗号関数の入出力情報が含むエンコードの特徴を特徴判定情報に利用して、暗号ロジックを特定する実施例を説明する。Example 2
In some cases, a malicious program such as malware encodes encrypted data into printable data (for example, Base64 encoding) and then transmits the data to the Internet.
FIG. 9 is a diagram illustrating an example (part 1) of how to use a cryptographic function of malware.
FIG. 9 shows an example in which the malware encrypts a ciphertext obtained by encrypting a message with a cryptographic function and then transmits it on the Internet by HTTP transmission. Therefore, when the output information of a certain block is decoded using a known decoder (for example, a Base64 decoder) and decoding is successful, a block having output information equal to the decoded value is set as a candidate for the encryption logic. be able to. In the second embodiment, a description will be given of an embodiment in which the encryption logic is specified by using the feature of the encoding included in the input / output information of the encryption function as the feature determination information.
図10は、実施例2に係るプロセス解析装置の一構成例を示す構成図である。
図10において、ブロック情報解析部140は、データデコード部170、エンコード/デコードアルゴリズムDB171を備える。ブロック情報解析部140は、ブロック情報リスト106が入力され、デコード判定処理を行なって、解析結果リスト107を出力する。また、データデコード部170は、ブロック情報解析部140から入力されたブロック情報の出力情報に対してデコードを行ない、デコードに成功した場合、デコードした値と等しい出力情報を持っているブロックを、暗号ロジックの候補とし、候補とした暗号ロジックを含む暗号ロジックリスト2(172)をブロック情報解析部140に出力する。FIG. 10 is a configuration diagram illustrating a configuration example of the process analysis apparatus according to the second embodiment.
In FIG. 10, the block
なお、データデコード部170とエンコード/デコードアルゴリズムDB171は、ブロック情報解析部140の内部に備える構成としても良い。
The
次に、実施例2のデコード判定処理の流れを、図11を参照して説明する。
図11は、実施例2に係るデータデコード部170のデコード判定処理の流れを示すフローチャートである。Next, the flow of decoding determination processing according to the second embodiment will be described with reference to FIG.
FIG. 11 is a flowchart illustrating the flow of the decoding determination process of the
まず、ステップS1701において、データデコード部170は、暗号ロジックリスト2(172)を初期化する。暗号ロジックリスト2(172)は、データデコード部170で暗号ロジックの候補と判定されたブロック情報を格納するブロック情報リスト106である。
First, in step S1701, the
次に、ステップS1702において、データデコード部170は、ブロック情報リスト106に次の要素(ブロック情報)があるかを確認する。次の要素のブロック情報が無ければ、Noの分岐に進み、処理を終了する。一方、次の要素のブロック情報があれば、ステップS1703において、次の要素Biを選ぶ。
Next, in step S <b> 1702, the
次に、ステップS1704において、データデコード部170は、既知のデコードアルゴリズムを適用して、ブロック情報の出力情報をデコードする。既知のデコードアルゴリズムは、エンコード/デコードアルゴリズムDB171に格納されている。データデコード部170は、情報の種類が「バッファ」となっている出力情報に対して、デコードを行なう。
Next, in step S1704, the
次に、ステップS1705において、データデコード部170は、デコードに成功したか否かを判定する。データデコード部170は、エンコード/デコードアルゴリズムDB171に格納されているいずれかのデコードアルゴリズムでデコードに成功した場合、同デコード結果を保持して、Yesの分岐によりステップS1707に進む。
In step S1705, the
次に、ステップS1707において、データデコード部170は、ステップS1705で保持したデコード結果と一致する出力情報を持つブロックを、ブロック情報リスト106から探す。なお、処理の効率化のために、ブロックBiのコンテキストより古いコンテキストのブロックに限定して検索対象としても良い。データデコード部170は、ブロック情報リスト106を検索した結果、デコード結果と一致する出力情報を持つブロックBj(i≠j)を発見した場合、ステップS1708において、ブロックBjのブロック情報を、暗号ロジック候補リスト2(172)に追加する。
In
実施例3.
マルウェアなどの不正プログラムは、データを暗号化する前に、同データを圧縮することがある。
図12は、マルウェアの暗号関数の使い方の一例(その2)を示す図である。
図12では、マルウェアが、メッセージが暗号関数に入力される前に、メッセージを圧縮関数により圧縮し、この圧縮データを暗号関数により暗号化した暗号文を、HTTP送信によりインターネット上に送信している例を示している。そこで、あるブロックの入力情報を、既知の解凍アルゴリズム(例えばzip、lzh)で解凍を試み、解凍に成功した場合、同ブロックを暗号ロジックの候補とすることができる。実施例3では、このような暗号関数の入出力情報が含む圧縮処理の特徴を特徴判定情報に利用して、暗号ロジックを特定する実施例を説明する。Example 3 FIG.
A malicious program such as malware may compress the data before encrypting the data.
FIG. 12 is a diagram illustrating an example (part 2) of how to use a cryptographic function of malware.
In FIG. 12, before the message is input to the encryption function, the malware compresses the message with the compression function, and transmits the ciphertext obtained by encrypting the compressed data with the encryption function to the Internet by HTTP transmission. An example is shown. Therefore, when the input information of a certain block is decompressed with a known decompression algorithm (for example, zip, lzh), and the decompression is successful, the block can be made a candidate for the encryption logic. In the third embodiment, a description will be given of an embodiment in which cryptographic logic is specified by using the characteristics of compression processing included in the input / output information of the cryptographic function as feature determination information.
図13は、実施例3に係るプロセス解析装置の一構成例を示す構成図である。
図13において、ブロック情報解析部140は、データ解凍部180、圧縮/解凍アルゴリズムDB181を備える。ブロック情報解析部140は、ブロック情報リスト106が入力され、データ解凍判定処理を行なって、解析結果リスト107を出力する。また、データ解凍部180は、ブロック情報解析部140から入力されたブロック情報の入力情報に対して解凍を行ない、解凍に成功した場合、同ブロックを、暗号ロジックの候補とし、候補とした暗号ロジックを含む暗号ロジックリスト3(182)をブロック情報解析部140に出力する。FIG. 13 is a configuration diagram illustrating a configuration example of the process analysis apparatus according to the third embodiment.
In FIG. 13, the block
なお、データ解凍部180と圧縮/解凍アルゴリズムDB181は、ブロック情報解析部140の内部に備える構成としても良い。
The
次に、実施例3のデータ解凍判定処理の流れを、図14を参照して説明する。
図14は、実施例3に係るデータ解凍部180のデータ解凍判定処理の流れを示すフローチャートである。Next, the flow of data decompression determination processing according to the third embodiment will be described with reference to FIG.
FIG. 14 is a flowchart illustrating the flow of the data decompression determination process of the
まず、ステップS1801において、データ解凍部180は、暗号ロジックリスト3(182)を初期化する。暗号ロジックリスト3(182)は、データ解凍部180で暗号ロジックの候補と判定されたブロック情報を格納するブロック情報リスト106である。
First, in step S1801, the
次に、ステップS1802において、データ解凍部180は、ブロック情報リスト106に次の要素(ブロック情報)があるかを確認する。次の要素のブロック情報が無ければ、Noの分岐に進み、処理を終了する。一方、次の要素のブロック情報があれば、ステップS1803において、次の要素Biを選ぶ。
Next, in step S1802, the
次に、ステップS1804において、データ解凍部180は、既知の解凍アルゴリズムを適用して、ブロック情報の入力情報を解凍する。既知の解凍アルゴリズムは、圧縮/解凍デコードアルゴリズムDB181に格納されている。データ解凍部180は、情報の種類が「バッファ」となっている入力情報に対して、解凍を行なう。
In step S1804, the
次に、ステップS1805において、データ解凍部180は、解凍に成功したか否かを判定する。データ解凍部180は、圧縮/解凍デコードアルゴリズムDB181に格納されているいずれかの解凍アルゴリズムで解凍に成功した場合、Yesの分岐によりステップS1806に進む。
In step S1805, the
次に、ステップS1806において、データ解凍部180は、ブロックBjのブロック情報を、暗号ロジック候補リスト3(182)に追加する。
Next, in step S1806, the
実施例4.
暗号の基本定義より、あるメッセージ(平文)をある鍵によって暗号化して得られる暗号文を、同じ鍵で復号すると元のメッセージが得られることは自明である。すなわち、暗号関数、復号関数、鍵、平文を、それぞれEnc、Dec、k、mとした場合、m = Dec(k、Enc(k、m))が成立する。
図15は、暗号の基本定義を説明する図である。
図15では、平文「こんにちは」をある鍵によって暗号化して、暗号文「・・・唖・」を得た場合、同じ鍵で暗号文「・・・唖・」を復号して、元のメッセージの平文「こんにちは」が得られることを示している。
このような暗号の基本定義に従えば、あるブロックfの出力の一部(暗号文と想定)を、別のブロックgの入力の一部としてgの処理を実行し、gの出力がfの入力(平文と想定)と一致すれば、fは暗号関数、gは復号関数である可能性が高い。そこで、あるブロックのペアを選び、これらのブロックの入力情報と出力情報に対して、上記の暗号の基本定義を利用した処理を行なえば、同ブロックのペアを暗号ロジックの候補とすることができる。実施例4では、このような暗号の基本定義による入出力情報の特徴を特徴判定情報に利用して、暗号の基本定義の関係が成立するブロックのペアを見つけ出すことにより、暗号ロジックを特定する実施例を説明する。Example 4
From the basic definition of encryption, it is obvious that the original message can be obtained by decrypting the ciphertext obtained by encrypting a certain message (plaintext) with a certain key with the same key. That is, if the encryption function, the decryption function, the key, and the plaintext are Enc, Dec, k, and m, respectively, m = Dec (k, Enc (k, m)) is established.
FIG. 15 is a diagram for explaining the basic definition of encryption.
In FIG. 15, encrypted by the key with the plain text "Hello", if you give the ciphertext "... dumb,", to decrypt the ciphertext "... dumb," in the same key, the original message It shows that the plain text "Hello" is obtained.
According to such a basic definition of encryption, a part of the output of a certain block f (assumed to be a ciphertext) is processed as part of the input of another block g, and the output of g is f. If it matches the input (assuming plaintext), it is highly possible that f is an encryption function and g is a decryption function. Therefore, if a pair of blocks is selected, and the input information and output information of these blocks are processed using the above basic definition of encryption, the pair of blocks can be made a candidate for the encryption logic. . In the fourth embodiment, an encryption logic is specified by finding a pair of blocks in which the relationship of the basic definition of the encryption is established by using the feature of the input / output information based on the basic definition of the encryption as the feature determination information. An example will be described.
図16は、実施例4に係るプロセス解析装置の一構成例を示す構成図である。
図16において、ブロック情報解析部140は、仮想実行部190を備える。
ブロック情報解析部140は、ブロック情報リスト106が入力され、仮想実行判定処理を行なって、解析結果リスト107を出力する。また、仮想実行部190は、ブロック情報解析部140から入力されたブロック情報の入力情報と出力情報を利用して、ブロックのペアに対して、暗号の基本定義を利用した仮想実行を行ない、仮想実行に成功した場合、同ブロックのペアを暗号/復号関数ペアの候補とし、候補とした暗号/復号関数ペアを含む暗号/復号関数ペアリスト191をブロック情報解析部140に出力する。FIG. 16 is a configuration diagram illustrating a configuration example of a process analysis apparatus according to the fourth embodiment.
In FIG. 16, the block
The block
なお、仮想実行部190は、ブロック情報解析部140の内部に備える構成としても良い。
The
次に、実施例4の仮想実行判定処理の流れを、図17を参照して説明する。
図17は、実施例4に係る仮想実行部190の仮想実行判定処理の流れを示すフローチャートである。Next, the flow of the virtual execution determination process according to the fourth embodiment will be described with reference to FIG.
FIG. 17 is a flowchart illustrating the flow of the virtual execution determination process of the
まず、ステップS1901において、仮想実行部190は、既に抽出済みの暗号ロジック候補をマージして、暗号ロジックリスト4を作成する。既に抽出済みの暗号ロジック候補としては、例えば、実施例1〜実施例3で判定した暗号ロジック候補である暗号ロジックリスト1〜3を用いる。なお、暗号ロジックリスト4を作成する際、重複した暗号ロジック候補がある場合は、1つにまとめる。
First, in step S1901, the
次に、ステップS1902において、仮想実行部190は、解析結果リスト107を初期化する。解析結果リスト107は、仮想実行部190で暗号ロジックと復号ロジックのペアと判定されたブロック情報のペアからなるリストである。
Next, in step S1902, the
次に、ステップS1903において、仮想実行部190は、暗号ロジックリスト4に次の要素(ブロック情報)があるかを確認する。次の要素のブロック情報が無ければ、Noの分岐に進み、処理を終了する。一方、次の要素のブロック情報があれば、ステップS1904において、次の要素Biを選ぶ。
Next, in step S1903, the
次に、ステップS1905において、仮想実行部190は、次の要素Biの出力情報を利用して、暗号の基本定義を利用した仮想実行解析を行なう。仮想実行解析の処理の詳細は、後述する。
Next, in step S1905, the
次に、ステップS1906において、仮想実行部190は、仮想実行解析結果がNullか否かを判定する。仮想実行解析結果がNullでなければ、Noの分岐によりステップS1907に進む。
Next, in step S1906, the
次に、ステップS1907において、仮想実行部190は、仮想実行解析結果を解析結果リスト107に登録する。
In step S 1907, the
次に、ステップS1905の仮想実行解析の流れを、図18と図19を参照して詳細に説明する。
図18は、実施例4に係る仮想実行部190の仮想実行解析の流れ(前半)を示すフローチャートである。
図19は、実施例4に係る仮想実行部190の仮想実行解析の流れ(後半)を示すフローチャートである。Next, the flow of the virtual execution analysis in step S1905 will be described in detail with reference to FIGS.
FIG. 18 is a flowchart illustrating the flow (first half) of the virtual execution analysis of the
FIG. 19 is a flowchart illustrating the flow (second half) of the virtual execution analysis of the
ステップS1905の仮想実行解析は、仮想実行部190に対して、引数としてブロック情報Biと解析対象の実行ファイルが与えられる。
In the virtual execution analysis in step S1905, block information Bi and an execution file to be analyzed are given as arguments to the
まず、ステップS201において、仮想実行部190は、暗号/復号関数ペアリストを初期化する。
次に、ステップS202において、仮想実行部190は、解析対象の実行ファイル101を仮想環境上で実行してプロセスを起動し、一定期間経過後、同プロセスをサスペンドする。
次に、ステップS203において、仮想実行部190は、同プロセスのスナップショットを作成する。これをスナップショット1と呼ぶ。First, in step S201, the
Next, in step S202, the
Next, in step S203, the
次に、ステップS204において、仮想実行部190は、ブロック情報リスト106に次の要素(ブロック情報)があるかを確認する。次の要素のブロック情報が無ければ、Noの分岐に進み、ステップS222において、暗号/復号関数ペアリストを返し、処理を終了する。一方、次の要素のブロック情報があれば、ステップS205において、次の要素Bjを選ぶ。なお、ブロックBiとブロックBjのコンテキストを確認し、入れ子の関係になっていないブロックBjを選択することも可能である。
Next, in step S <b> 204, the
次に、ステップS206において、仮想実行部190は、プロセスのスナップショット1をリストアする。
次に、ステップS207において、仮想実行部190は、ブロックBjを構成する命令列をプロセスにインジェクトする。具体的には、ブロック情報BjのブロックIDに対応する要素を、ブロックリスト104から検索し、ブロックの命令列と開始アドレスを取得する。そして、同プロセスの同開始アドレスから同命令列をインジェクトする。
次に、ステップS208において、仮想実行部190は、同プロセスのスナップショットを作成する。これをスナップショット2と呼ぶ。
次に、ステップS209において、仮想実行部190は、Bjの入力情報を取得する。Next, in step S206, the
Next, in step S207, the
Next, in step S208, the
Next, in step S209, the
次に、ステップS210において、仮想実行部190は、Bjの入力情報とBiの出力情報とから、入力スナップショットIssを生成する。入力スナップショットとは、実行するブロックの入力となる情報である。入力スナップショットIssの生成は、次のようにして行なう。ブロックBiはn個の出力情報を持っているとし、O = {O1〜On}で表わす。一方、ブロックBjはm個の入力情報を持っているとし、I = {I1〜Im}で表わす。Oi∈Oとし、Iのj番目の要素をOiに入れ替えた入力情報をIssとする。入れ替える情報は、入出力情報の種類が「バッファ」のもの同士とする。その他にもサイズが近い情報同士を優先的に選択し、入れ替えることも可能である。入れ替えは、値とサイズに対して行なう。また、同じIssが2度生成されることはないように入れ替えを行なう。
Next, in step S210, the
次に、ステップS211において、仮想実行部190は、新しいIssが生成されたか判定する。新しいIssが生成されない場合、Noの分岐に進み、ステップS204を実行する。一方、新しいIssが生成された場合、ステップS212に処理が進み、仮想実行部190は、プロセスのスナップショット2をリストアし、ステップS213において、Issを同プロセスに反映させる。Issの反映では、Issにある全ての入力情報の値を、適切な記憶領域(レジスタ、メモリ)に設定する。
Next, in step S211, the
次に、ステップS214において、仮想実行部190は、Instruction Registerに、インジェクトした命令列の先頭アドレスをセットし、ステップS215において、プロセスをレジュームする。
Next, in step S214, the
次に、ステップS216において、仮想実行部190は、プロセスの実行アドレスを監視し、実行アドレスがブロックBjの範囲を超えるかどうかを確認する。
次に、ステップS217において、仮想実行部190は、ブロックの実行が終了したか否かを判定する。仮想実行部190は、監視している実行アドレスがブロックBjの範囲を超えた場合、ブロックBjの実行が終了したと判定し、ステップS218において、プロセスをサスペンドする。Next, in step S216, the
Next, in step S217, the
次に、ステップS219において、仮想実行部190は、実行されたブロックBjの出力情報とブロックBiの入力情報とを比較する。ブロックBjを実行して得られる出力情報は、ブロックBjの出力情報の開始アドレスを基に、サスペンド中のプロセスのメモリから抽出する。
Next, in step S219, the
次に、ステップS220において、仮想実行部190は、ブロックBjの出力情報とブロックBiの入力情報とが一致するかを判定し、一致する場合、Yesの分岐によりステップS221に進み、ブロックBiとブロックBjを暗号ロジックと復号ロジックのペアとして、暗号/復号関数ペアリストに登録する。
Next, in step S220, the
なおステップS207において、ブロックの命令列をインジェクトするのではなく、ブロックの開始アドレスまでプロセスを実行してもよい。その場合、ステップS214において同ステップの処理は行わず、ステップS215においてプロセスをレジュームするだけで良い。 In step S207, the process may be executed up to the start address of the block instead of injecting the instruction sequence of the block. In that case, the process of the same step is not performed in step S214, and it is only necessary to resume the process in step S215.
以上のように、実施例1〜実施例4の発明では、実行トレースから抽出したブロックの入出力関係の特徴を判定する特徴判定情報を生成し、この特徴判定情報を利用してブロックの入出力関係を解析し、暗号関数または復号関数の入出力関係の特徴を示すブロックを暗号ロジックと判定することにより、マルウェアが用いる暗号ロジックを、精度良く特定することができるという効果がある。 As described above, in the inventions according to the first to fourth embodiments, the feature determination information for determining the feature of the input / output relationship of the block extracted from the execution trace is generated, and the input / output of the block using the feature determination information. By analyzing the relationship and determining the block indicating the characteristics of the input / output relationship of the encryption function or the decryption function as the encryption logic, there is an effect that the encryption logic used by the malware can be specified with high accuracy.
100 プロセス解析装置、101 実行ファイル、102 実行トレース、103 プロセス情報、104 ブロックリスト、105 定義リスト、106 ブロック情報リスト、107 解析結果リスト、110 実行トレース取得部、120 ブロック抽出部、130 ブロック情報抽出部、140 ブロック情報解析部、150 解析結果出力部、160 文字列割合判定部、161 文字コード判定アルゴリズムDB、162 文字コード表DB、163 暗号ロジックリスト1、170 データデコード部、171 エンコード/デコードアルゴリズムDB、172 暗号ロジックリスト2、180 データ解凍部、181 圧縮/解凍アルゴリズムDB、182 暗号ロジックリスト3、190 仮想実行部、191 暗号/復号関数ペアリスト。
100 process analysis device, 101 execution file, 102 execution trace, 103 process information, 104 block list, 105 definition list, 106 block information list, 107 analysis result list, 110 execution trace acquisition unit, 120 block extraction unit, 130 block information extraction Section, 140 block information analysis section, 150 analysis result output section, 160 character string ratio determination section, 161 character code determination algorithm DB, 162 character code table DB, 163
Claims (7)
前記実行トレースからループ構造を示す処理単位であるブロックを抽出するブロック抽出部と、
前記ブロックから、入力情報と出力情報とを含むブロック情報を抽出するブロック情報抽出部と、
前記ブロック情報の前記入力情報または前記出力情報を用いて前記ブロックの入出力関係の特徴を判定する特徴判定情報を生成し、この特徴判定情報を利用して前記ブロックの入出力関係を解析し、暗号関数または復号関数の入出力関係の特徴を示すブロックを暗号ロジックと判定するブロック情報解析部と
を備えるプロセス解析装置。An execution trace acquisition unit that acquires an execution trace of the process to be analyzed;
A block extraction unit for extracting a block which is a processing unit indicating a loop structure from the execution trace;
A block information extraction unit that extracts block information including input information and output information from the block;
Generate feature determination information for determining features of the input / output relationship of the block using the input information or the output information of the block information, and analyze the input / output relationship of the block using the feature determination information, A process analysis apparatus comprising: a block information analysis unit that determines a block indicating characteristics of an input / output relationship of an encryption function or a decryption function as encryption logic.
前記ブロック情報解析部は、前記特徴判定情報として、前記文字列割合判定部により判定された前記入力情報の第1の印刷可能文字列割合と前記出力情報の第2の印刷可能文字列割合との差分を算出し、この差分が予め定められた閾値以上の場合に、前記ブロックを暗号ロジックと判定する請求項1記載のプロセス解析装置。A character string ratio determining unit that determines a printable character string ratio that is a ratio of printable character strings included in the input information or the output information of the block information;
The block information analysis unit includes, as the feature determination information, a first printable character string ratio of the input information determined by the character string ratio determination unit and a second printable character string ratio of the output information. The process analysis apparatus according to claim 1, wherein a difference is calculated, and when the difference is equal to or greater than a predetermined threshold, the block is determined to be cryptographic logic.
前記ブロック情報解析部は、前記特徴判定情報として、前記データデコード部により前記ブロック情報の前記出力情報をデコードしたデコード結果を生成し、このデコード結果と一致する前記出力情報を持つ前記ブロックを暗号ロジックと判定する請求項1記載のプロセス解析装置。A data decoding unit for decoding the output information of the block information;
The block information analysis unit generates a decoding result obtained by decoding the output information of the block information by the data decoding unit as the feature determination information, and the block having the output information that matches the decoding result is converted into a cryptographic logic The process analysis apparatus according to claim 1, wherein
前記ブロック情報解析部は、前記特徴判定情報として、前記データ解凍部により前記ブロック情報の前記出力情報を解凍したデコード結果を生成し、このデコード結果と一致する前記出力情報を持つ前記ブロックを暗号ロジックと判定する請求項1記載のプロセス解析装置。A data decompression unit for decompressing the output information of the block information;
The block information analysis unit generates a decoding result obtained by decompressing the output information of the block information by the data decompression unit as the feature determination information, and the block having the output information that matches the decoding result is converted into a cryptographic logic. The process analysis apparatus according to claim 1, wherein
前記ブロック情報解析部は、前記特徴判定情報として、前記仮想実行部により前記他のブロックの処理を実行した実行結果を生成し、この実行結果と一致する前記入力情報を持つ前記ブロックを暗号ロジックと判定する請求項1記載のプロセス解析装置。A virtual execution unit that inputs the output information of the block information to another block and executes processing of the other block;
The block information analysis unit generates an execution result obtained by executing the processing of the other block by the virtual execution unit as the feature determination information, and the block having the input information that matches the execution result is defined as a cryptographic logic. The process analysis apparatus according to claim 1 for determining.
実行トレース取得部が、解析対象のプロセスの実行トレースを取得する実行トレース取得ステップと、
ブロック抽出部が、前記実行トレースからループ構造を示す処理単位であるブロックを抽出するブロック抽出ステップと、
ブロック情報抽出部が、前記ブロックから、入力情報と出力情報とを含むブロック情報を抽出するブロック情報抽出ステップと、
ブロック情報解析部が、前記ブロック情報の前記入力情報または前記出力情報を用いて前記ブロックの入出力関係の特徴を判定する特徴判定情報を生成し、この特徴判定情報を利用して前記ブロックの入出力関係を解析し、暗号関数または復号関数の入出力関係の特徴を示すブロックを暗号ロジックと判定するブロック情報解析ステップと
を備えるプロセス解析方法。A process analysis method of a process analysis apparatus that analyzes a process to be analyzed and determines cryptographic logic,
An execution trace acquisition step in which an execution trace acquisition unit acquires an execution trace of the process to be analyzed;
A block extraction step for extracting a block which is a processing unit indicating a loop structure from the execution trace;
A block information extraction step for extracting block information including input information and output information from the block;
A block information analysis unit generates feature determination information for determining features of the input / output relationship of the block using the input information or the output information of the block information, and uses the feature determination information to input the block. A process analysis method comprising: a block information analysis step that analyzes an output relationship and determines a block indicating a characteristic of an input / output relationship of a cryptographic function or a decryption function as a cryptographic logic.
解析対象のプロセスの実行トレースを取得する実行トレース取得ステップと、
前記実行トレースからループ構造を示す処理単位であるブロックを抽出するブロック抽出ステップと、
前記ブロックから、入力情報と出力情報とを含むブロック情報を抽出するブロック情報抽出ステップと、
前記ブロック情報の前記入力情報または前記出力情報を用いて前記ブロックの入出力関係の特徴を判定する特徴判定情報を生成し、この特徴判定情報を利用して前記ブロックの入出力関係を解析し、暗号関数または復号関数の入出力関係の特徴を示すブロックを暗号ロジックと判定するブロック情報解析ステップと
を実行させるためのプロセス解析プログラム。On the computer,
An execution trace acquisition step for acquiring an execution trace of the process to be analyzed;
A block extraction step of extracting a block which is a processing unit indicating a loop structure from the execution trace;
A block information extraction step for extracting block information including input information and output information from the block;
Generate feature determination information for determining features of the input / output relationship of the block using the input information or the output information of the block information, and analyze the input / output relationship of the block using the feature determination information, A process analysis program for executing a block information analysis step for determining a block indicating a characteristic of an input / output relationship of an encryption function or a decryption function as encryption logic.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2014/004417 WO2016030927A1 (en) | 2014-08-28 | 2014-08-28 | Process analysis device, process analysis method, and process analysis program |
Publications (2)
Publication Number | Publication Date |
---|---|
JPWO2016030927A1 true JPWO2016030927A1 (en) | 2017-04-27 |
JP6246377B2 JP6246377B2 (en) | 2017-12-13 |
Family
ID=55398876
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016545089A Expired - Fee Related JP6246377B2 (en) | 2014-08-28 | 2014-08-28 | Process analysis apparatus, process analysis method, and process analysis program |
Country Status (4)
Country | Link |
---|---|
US (1) | US10325094B2 (en) |
JP (1) | JP6246377B2 (en) |
CN (1) | CN106664201A (en) |
WO (1) | WO2016030927A1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10050798B2 (en) * | 2015-02-06 | 2018-08-14 | Mitsubishi Electric Corporation | Cryptographic block identification apparatus, cryptographic block identification method, and non-transitory computer readable recording medium storing cryptographic block identification program |
US20190121968A1 (en) * | 2016-06-16 | 2019-04-25 | Mitsubishi Electric Corporation | Key generation source identification device, key generation source identification method, and computer readable medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100235913A1 (en) * | 2009-03-12 | 2010-09-16 | Microsoft Corporation | Proactive Exploit Detection |
JP2013114637A (en) * | 2011-12-01 | 2013-06-10 | Mitsubishi Electric Corp | Malware analyzing system |
Family Cites Families (35)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3746098B2 (en) | 1996-02-28 | 2006-02-15 | 株式会社日立製作所 | Data encryption device |
US8661539B2 (en) * | 2000-07-10 | 2014-02-25 | Oracle International Corporation | Intrusion threat detection |
US7093239B1 (en) * | 2000-07-14 | 2006-08-15 | Internet Security Systems, Inc. | Computer immune system and method for detecting unwanted code in a computer system |
US20070192863A1 (en) * | 2005-07-01 | 2007-08-16 | Harsh Kapoor | Systems and methods for processing data flows |
US6792543B2 (en) * | 2001-08-01 | 2004-09-14 | Networks Associates Technology, Inc. | Virus scanning on thin client devices using programmable assembly language |
US7861303B2 (en) * | 2001-08-01 | 2010-12-28 | Mcafee, Inc. | Malware scanning wireless service agent system and method |
JP2003114616A (en) | 2001-10-03 | 2003-04-18 | Mitsubishi Electric Corp | Key search device |
US8027473B2 (en) * | 2003-01-13 | 2011-09-27 | Conexant Systems, Inc. | System and method for improved data protection in PONs |
JP2008503011A (en) * | 2004-06-08 | 2008-01-31 | ダートデバイセズ コーポレーション | Architecture device and method for device team recruitment and content rendition for universal device interoperability platform |
JP2007334536A (en) | 2006-06-14 | 2007-12-27 | Securebrain Corp | Behavior analysis system for malware |
US20080126766A1 (en) * | 2006-11-03 | 2008-05-29 | Saurabh Chheda | Securing microprocessors against information leakage and physical tampering |
US9015301B2 (en) * | 2007-01-05 | 2015-04-21 | Digital Doors, Inc. | Information infrastructure management tools with extractor, secure storage, content analysis and classification and method therefor |
JP5083760B2 (en) | 2007-08-03 | 2012-11-28 | 独立行政法人情報通信研究機構 | Malware similarity inspection method and apparatus |
JP4755658B2 (en) | 2008-01-30 | 2011-08-24 | 日本電信電話株式会社 | Analysis system, analysis method and analysis program |
JP5009244B2 (en) | 2008-07-07 | 2012-08-22 | 日本電信電話株式会社 | Malware detection system, malware detection method, and malware detection program |
JP2010235911A (en) * | 2009-03-11 | 2010-10-21 | Konica Minolta Ij Technologies Inc | Active energy ray curable ink-jet ink, ink-jet recording method, and printed matter |
WO2010105210A2 (en) * | 2009-03-12 | 2010-09-16 | Comsys Communication & Signal Processing Ltd. | Vehicle integrated communications system |
US9197736B2 (en) * | 2009-12-31 | 2015-11-24 | Digimarc Corporation | Intuitive computing methods and systems |
US8464345B2 (en) | 2010-04-28 | 2013-06-11 | Symantec Corporation | Behavioral signature generation using clustering |
JP5499976B2 (en) | 2010-07-29 | 2014-05-21 | 富士通株式会社 | Encryption key analysis method, encryption key analysis device, and encryption key analysis program |
AU2011293160B2 (en) * | 2010-08-26 | 2015-04-09 | Verisign, Inc. | Method and system for automatic detection and analysis of malware |
JP2012083849A (en) | 2010-10-07 | 2012-04-26 | Hitachi Ltd | Malware detector, and method and program for the same |
JP5437977B2 (en) | 2010-11-10 | 2014-03-12 | 日本電信電話株式会社 | Analysis system, analysis apparatus, analysis method, and analysis program |
US8621620B2 (en) * | 2011-03-29 | 2013-12-31 | Mcafee, Inc. | System and method for protecting and securing storage devices using below-operating system trapping |
JP5687593B2 (en) | 2011-10-06 | 2015-03-18 | 日本電信電話株式会社 | Analysis device, analysis method, and analysis program |
JP5732372B2 (en) | 2011-10-27 | 2015-06-10 | Kddi株式会社 | Software detection rule generation device, software detection rule generation method, and software detection rule generation program |
JP2013109553A (en) | 2011-11-21 | 2013-06-06 | Hitachi Ltd | Program white list distribution device and method |
US9659173B2 (en) | 2012-01-31 | 2017-05-23 | International Business Machines Corporation | Method for detecting a malware |
JP6277137B2 (en) * | 2012-02-17 | 2018-02-07 | ヴェンコア ラブズ、インク.Vencore Labs, Inc. | Method and system for packet acquisition, analysis and intrusion detection in field area networks |
US9245120B2 (en) * | 2012-07-13 | 2016-01-26 | Cisco Technologies, Inc. | Method and apparatus for retroactively detecting malicious or otherwise undesirable software as well as clean software through intelligent rescanning |
CN103902895B (en) * | 2012-12-24 | 2017-07-07 | 腾讯科技(深圳)有限公司 | Botnet control protocol method for digging and device |
CN103905391B (en) * | 2012-12-26 | 2018-01-30 | 腾讯科技(深圳)有限公司 | Botnet order and the acquisition methods and device of control protocol |
CN103914652B (en) * | 2013-01-09 | 2018-05-22 | 腾讯科技(深圳)有限公司 | The recognition methods of rogue program control instruction and device |
CN103902911B (en) * | 2014-04-16 | 2016-09-14 | 南京大学 | A kind of malware detection methods based on program structure feature |
CN103914657B (en) * | 2014-04-16 | 2016-10-19 | 南京大学 | A kind of malware detection methods based on Function feature |
-
2014
- 2014-08-28 JP JP2016545089A patent/JP6246377B2/en not_active Expired - Fee Related
- 2014-08-28 US US15/500,476 patent/US10325094B2/en not_active Expired - Fee Related
- 2014-08-28 WO PCT/JP2014/004417 patent/WO2016030927A1/en active Application Filing
- 2014-08-28 CN CN201480081225.2A patent/CN106664201A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100235913A1 (en) * | 2009-03-12 | 2010-09-16 | Microsoft Corporation | Proactive Exploit Detection |
JP2013114637A (en) * | 2011-12-01 | 2013-06-10 | Mitsubishi Electric Corp | Malware analyzing system |
Non-Patent Citations (1)
Title |
---|
神保千晶,他: "CPUエミュレータとDynamic Binary Instrumentationの併用によるシェルコ", 電子情報通信学会技術研究報告, vol. 110, no. 266, JPN6014047183, 29 October 2010 (2010-10-29), JP, pages 59 - 64, ISSN: 0003636033 * |
Also Published As
Publication number | Publication date |
---|---|
US20170337378A1 (en) | 2017-11-23 |
US10325094B2 (en) | 2019-06-18 |
JP6246377B2 (en) | 2017-12-13 |
WO2016030927A1 (en) | 2016-03-03 |
CN106664201A (en) | 2017-05-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10915659B2 (en) | Privacy detection of a mobile application program | |
Poudyal et al. | A framework for analyzing ransomware using machine learning | |
Chowdhury et al. | Malware analysis and detection using data mining and machine learning classification | |
US10678921B2 (en) | Detecting malware with hash-based fingerprints | |
US10152591B2 (en) | Protecting against malware variants using reconstructed code of malware | |
Rahimian et al. | On the reverse engineering of the citadel botnet | |
CN111163095B (en) | Network attack analysis method, network attack analysis device, computing device, and medium | |
Ullah et al. | Modified decision tree technique for ransomware detection at runtime through API calls | |
CN111163094B (en) | Network attack detection method, network attack detection device, electronic device, and medium | |
Marastoni et al. | Groupdroid: Automatically grouping mobile malware by extracting code similarities | |
Bakour et al. | The android malware static analysis: techniques, limitations, and open challenges | |
Akram et al. | DroidMD: an efficient and scalable android malware detection approach at source code level | |
JP6246377B2 (en) | Process analysis apparatus, process analysis method, and process analysis program | |
WO2020168614A1 (en) | Method for fast and smart comparison and security inspection of mobile malware big data | |
Rafiq et al. | AndroMalPack: enhancing the ML-based malware classification by detection and removal of repacked apps for Android systems | |
Yang et al. | Detecting android malware with intensive feature engineering | |
KR101557455B1 (en) | Application Code Analysis Apparatus and Method For Code Analysis Using The Same | |
Odebade et al. | Mitigating anti-forensics in the cloud via resource-based privacy preserving activity attribution | |
Kucuk et al. | BigBing: Privacy-Preserving Cloud-Based Malware Classification Service. | |
CN114595483B (en) | Secure multi-party computing method and device, electronic equipment and storage medium | |
Hindarto et al. | Android-manifest extraction and labeling method for malware compilation and dataset creation. | |
US20220172647A1 (en) | System and method for processing boolean and garbled circuits in memory-limited environments | |
Bokolo et al. | Hybrid analysis based cross inspection framework for android malware detection | |
Sun et al. | An active android application repacking detection approach | |
Daniel et al. | A Panoramic View of Cyber Attack Detection and Prevention Using Machine Learning and Deep Learning Approaches |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20170905 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20170929 |
|
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: 20171017 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20171114 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6246377 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |