[go: up one dir, main page]

JP2008176352A - Computer program, computer apparatus, and operation control method - Google Patents

Computer program, computer apparatus, and operation control method Download PDF

Info

Publication number
JP2008176352A
JP2008176352A JP2007006505A JP2007006505A JP2008176352A JP 2008176352 A JP2008176352 A JP 2008176352A JP 2007006505 A JP2007006505 A JP 2007006505A JP 2007006505 A JP2007006505 A JP 2007006505A JP 2008176352 A JP2008176352 A JP 2008176352A
Authority
JP
Japan
Prior art keywords
program
function
generated
api
computer
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.)
Pending
Application number
JP2007006505A
Other languages
Japanese (ja)
Inventor
Takahiro Matsuki
隆宏 松木
Junichi Murakami
純一 村上
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
LAC Co Ltd
Original Assignee
LAC Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by LAC Co Ltd filed Critical LAC Co Ltd
Priority to JP2007006505A priority Critical patent/JP2008176352A/en
Publication of JP2008176352A publication Critical patent/JP2008176352A/en
Pending legal-status Critical Current

Links

Images

Abstract

【課題】自身が解析されていると認識することで自プロセスを終了させる機能を有する特定プログラムの活動を抑制する。
【解決手段】コンピュータ10において、カーネルセグメント11に存在する(カーネルモードで動作する)プロセス生成監視部12が、新たなプロセスの生成を監視し、例えば、プロセス14a〜14dが新たに生成されたことを、ユーザモードで動作する監視モジュール生成部13に通知する。すると、監視モジュール生成部13は、プロセス14a〜14dに対して、それぞれ、例えば、特定のAPIの呼び出しを監視して呼び出しがあれば自プロセスを終了させるような処理を行う監視モジュール15a〜15dを注入する。
【選択図】図2
An object of the present invention is to suppress the activity of a specific program having a function of terminating its own process by recognizing that it has been analyzed.
In a computer 10, a process generation monitoring unit 12 existing in a kernel segment 11 (operating in a kernel mode) monitors the generation of a new process. For example, processes 14a to 14d are newly generated. Is notified to the monitoring module generation unit 13 operating in the user mode. Then, the monitoring module generation unit 13 monitors each of the processes 14a to 14d by, for example, monitoring modules 15a to 15d that perform processing such as monitoring a specific API call and terminating the process if there is a call. inject.
[Selection] Figure 2

Description

本発明は、自身が解析されていると認識することで自プロセスを終了させる機能を有する特定プログラムの動作を制御するためのコンピュータプログラム等に関する。   The present invention relates to a computer program or the like for controlling the operation of a specific program having a function of terminating its own process by recognizing that it has been analyzed.

インターネットの普及に伴い、ネットワークを介した悪性プログラムによる被害が急増している。ここで、悪性プログラムは、「マルウェア」とも呼ばれ、ユーザにとって好ましくない動作を行う悪意を持つプログラムのことである。例えば、コンピュータに侵入して破壊活動を行ったり、他のコンピュータへの感染活動を行ったり、情報を外部に漏洩させたりするプログラムがこれに該当し、所謂コンピュータウイルスはその一例である。
コンピュータウイルスのチェックについては、従来から種々の提案がなされている(例えば、特許文献1参照)。この特許文献1では、配信を行う電子メールに対してウイルスパターンデータベースに記録されているウイルスパターンデータに基づいてウイルスの有無を検出している。
With the spread of the Internet, the damage caused by malicious programs via the network is increasing rapidly. Here, the malignant program is also called “malware” and is a malicious program that performs an operation undesirable for the user. For example, a program that intrudes into a computer to perform destructive activities, infects other computers, or leaks information to the outside corresponds to this, and so-called computer viruses are one example.
There have been various proposals for checking computer viruses (see, for example, Patent Document 1). In Patent Document 1, the presence / absence of a virus is detected based on virus pattern data recorded in a virus pattern database for an email to be distributed.

特開2002−368820号公報JP 2002-368820 A

ところで近年、ボットと呼ばれるコンピュータウイルスの一種による被害が急増している。ボットは、ワームと同様にネットワークを介して自己増殖を行う悪性プログラムであるが、外部から制御可能である点が従来のワームと大きく異なる。従来のワームは、プログラムされた通り動作するオートマンである。これに対して、ボットは脆弱なコンピュータに感染した後、C&C(コマンド&コントロール)サーバと呼ばれる制御用サーバに接続し、ボットの管理者(bot-herder)からの指示を待ち受ける。この結果、ボットの自己増殖に伴い、C&Cサーバを中心とするボット感染コンピュータのネットワーク、即ちボットネットが形成されることとなり、ボット管理者はC&Cサーバに対して命令を送信することでボットネットに接続された数千から数万のボットを同時に制御することが可能となっている。   By the way, in recent years, damage caused by a kind of computer virus called bot has been increasing rapidly. A bot is a malicious program that performs self-replication via a network in the same way as a worm, but differs greatly from a conventional worm in that it can be controlled from the outside. A conventional worm is an automan that operates as programmed. On the other hand, after the bot is infected with a vulnerable computer, the bot connects to a control server called a C & C (command & control) server and waits for an instruction from a bot administrator (bot-herder). As a result, a network of bot-infected computers centering on the C & C server, that is, a botnet is formed along with the self-propagation of the bot, and the bot administrator sends an instruction to the C & C server to the botnet. It is possible to simultaneously control thousands to tens of thousands of connected bots.

また、このようなボット流布の背景には、ボット自身がオープンソースの手法により開発されていることが挙げられる。ボットのソースコードはインターネットで広く流通している。従って、誰でもソースコードを入手し改造することで独自のボットを開発することが可能である。このため、一種類のボットに対して数百から数千の亜種が存在することとなる。   Moreover, the background of such bot distribution is that the bot itself has been developed by an open source method. The bot source code is widely distributed on the Internet. Therefore, anyone can develop their own bot by obtaining the source code and modifying it. For this reason, hundreds to thousands of subspecies exist for one kind of bot.

例えば、このボットのように短期間に莫大な数の亜種が出現する悪性プログラムについて、特許文献1にあるようなウイルスパターンデータとの照合だけでは、その活動を抑制できないという問題点があった。   For example, there is a problem that the activity of a malicious program in which a huge number of variants appear in a short time like this bot cannot be suppressed only by matching with virus pattern data as in Patent Document 1. .

本発明は、以上のような技術的課題を解決するためになされたものであって、その目的は、自身が解析されていると認識することで自プロセスを終了させる機能を有する特定プログラムの活動を抑制することにある。   The present invention has been made in order to solve the technical problems as described above, and its purpose is the activity of a specific program having a function of terminating its own process by recognizing that it has been analyzed. It is to suppress.

かかる目的のもと、本発明は、自身が実行されることで生成されたプロセスを自身が解析されていると認識することで終了させる機能を有する特定プログラムについて、この機能を逆用することでその活動を抑制するようにした。即ち、本発明のコンピュータプログラムは、コンピュータに、プログラムが実行されることにより新たなプロセスが生成されたことを、OS(Operating System)の実行モードで検出する機能と、生成されたプロセスに対し、プログラムが解析されていると誤認させるための処理を施すことにより、そのプログラムが特定プログラムであればそのプロセスを終了させる機能とを実現させる。   For this purpose, the present invention reverses this function for a specific program having the function of terminating a process generated by executing itself by recognizing that the process has been analyzed. I tried to suppress that activity. That is, the computer program of the present invention has a function for detecting in the execution mode of the OS (Operating System) that a new process is generated by executing the program on the computer, and for the generated process, By performing a process for misidentifying that the program is analyzed, a function for terminating the process is realized if the program is a specific program.

ここで、終了させる機能では、第一に、生成されたプロセスに対し、プログラムを解析しているデバッガが無いにも関わらず、そのプログラムを解析しているデバッガが有ると誤認させるための処理を施すようにすることが考えられる。
その場合、プログラムを解析しているデバッガが有るかどうかを示す情報を返すAPI(Application Program Interface)をフックし、そのプログラムを解析しているデバッガが有る旨の情報を返す処理を、誤認させるための処理として行うようにしてもよい。
また、プロセスに割り当てられたメモリに展開されたプログラムの実行コードにブレークポイント例外を発生させる命令を含める処理を、誤認させるための処理として行うようにしてもよい。
更に、指定されたファイルが有るかどうかを示す情報を返すAPIをフックし、プログラムが特定のデバッガにより解析されている場合に存在する特定のファイルがそのAPIを呼び出す際に指定されていれば、その特定のファイルが有る旨の情報を返す処理を、誤認させるための処理として行うようにしてもよい。
更にまた、時間に関する値を返すAPIをフックし、前回返した時間に関する値との差が所定値以上になるような時間に関する値を返す処理を、誤認させるための処理として行うようにしてもよい。
Here, in the function to be terminated, first, the process for causing the generated process to misidentify that there is a debugger analyzing the program even though there is no debugger analyzing the program. It is conceivable to apply it.
In such a case, the API (Application Program Interface) that returns information indicating whether or not there is a debugger that analyzes the program is hooked, and the process that returns information that there is a debugger that analyzes the program is misidentified. You may be made to perform as this process.
In addition, a process of including an instruction that generates a breakpoint exception in an execution code of a program expanded in a memory allocated to a process may be performed as a process for misidentification.
Furthermore, if an API that returns information indicating whether or not the specified file exists is hooked and a specific file that exists when the program is analyzed by a specific debugger is specified when the API is called, The process of returning information indicating that the specific file exists may be performed as a process for misidentification.
Furthermore, an API for returning a value related to time may be hooked, and a process for returning a value related to time such that the difference from the value related to time returned previously becomes a predetermined value or more may be performed as a process for misidentification. .

また、終了させる機能では、第二に、生成されたプロセスに対し、プログラムを解析するための仮想マシン環境が無いにも関わらず、そのプログラムを解析するための仮想マシン環境が有ると誤認させるための処理を施すことも考えられる。
その場合、コンピュータのMACアドレスを書き換える処理と、仮想マシン環境を提供するソフトウェアのインストールによって追加される設定データを生成する処理とを、誤認させるための処理として行えばよい。
Secondly, in the function to be terminated, the generated process is mistakenly recognized as having a virtual machine environment for analyzing the program even though there is no virtual machine environment for analyzing the program. It is also conceivable to perform the process.
In that case, the process of rewriting the MAC address of the computer and the process of generating the setting data added by the installation of the software that provides the virtual machine environment may be performed as processes for misidentification.

更に、本発明は、自身が実行されることで生成されたプロセスを自身が解析されていると認識することで終了させる機能を有する特定プログラムについて、この機能を逆用することでその活動を抑制するコンピュータ装置として捉えることもできる。その場合、本発明のコンピュータ装置は、プログラムが実行されることにより新たなプロセスが生成されたことを、OSの実行モードで検出する検出手段と、生成されたプロセスに対し、プログラムが解析されていると誤認させるための処理を施すことにより、そのプログラムが特定プログラムであればそのプロセスを終了させる処理手段とを備えている。   Furthermore, the present invention suppresses the activity by reusing this function for a specific program having the function of terminating the process generated by executing itself by recognizing that the process is being analyzed. It can also be understood as a computer device. In that case, the computer apparatus of the present invention is configured to detect in the OS execution mode that a new process is generated by executing the program, and the program is analyzed with respect to the generated process. And processing means for ending the process if the program is a specific program by performing a process for making it mistaken.

一方、本発明は、自身が実行されることで生成されたプロセスを自身が解析されていると認識することで終了させる機能を有する特定プログラムについて、この機能を逆用することでその活動を抑制する方法として捉えることもできる。その場合、本発明の動作制御方法は、プログラムが実行されることにより新たなプロセスが生成されたことを、OSの実行モードで検出するステップと、生成されたプロセスに対し、プログラムが解析されていると誤認させるための処理を施すことにより、そのプログラムが特定プログラムであればそのプロセスを終了させるステップとを含んでいる。   On the other hand, the present invention suppresses the activity by reusing this function for a specific program having the function of terminating the process generated by executing itself by recognizing that the process is being analyzed. It can also be seen as a way to do it. In this case, the operation control method of the present invention includes a step of detecting in the OS execution mode that a new process has been generated by executing the program, and the program is analyzed with respect to the generated process. If the program is a specific program, a process for terminating the process is included.

本発明によれば、自身が解析されていると認識することで自プロセスを終了させる機能を有する特定プログラムの活動を抑制することができるようになる。   According to the present invention, it is possible to suppress the activity of a specific program having a function of terminating its own process by recognizing that it has been analyzed.

以下、添付図面を参照して、本発明を実施するための最良の形態(以下、「実施の形態」という)について詳細に説明する。
本発明者らは、これまでにボットネット実態調査の一環として、入手したソースコードの一次分析を実施し、ボットには自身に対するデバッガ等による解析動作を妨害する機能(以下、「耐解析機能」という)が備わっていることを確認した。こうした耐解析機能は、ボット自身に対するデバッガのアタッチ等、解析の兆候を検知すると、自プロセスを終了させる仕組みになっており、アンチウイルスベンダ等によるプログラム解析を遅延、困難にさせることが目的と考えられる。
本明細書では、この仕組みを逆用してボット等の耐解析機能を備えた悪性プログラムに解析の兆候を誤認させることで、その動作を停止させる手法を提案する。また、実装したプロトタイプの評価を通じて、提案手法の有効性を示す。
The best mode for carrying out the present invention (hereinafter referred to as “embodiment”) will be described below in detail with reference to the accompanying drawings.
The present inventors have conducted a primary analysis of the obtained source code as part of a botnet fact-finding survey so far, and the bot has a function that interferes with the analysis operation by a debugger or the like (hereinafter referred to as `` analysis resistance function ''). It was confirmed that it was equipped. The anti-analysis function is designed to terminate its own process when it detects signs of analysis, such as attaching a debugger to the bot itself, and its purpose is to delay and make program analysis by anti-virus vendors, etc. It is done.
In this specification, we propose a method to stop this operation by reversing this mechanism and causing a malicious program with anti-analysis function such as a bot to misunderstand the signs of analysis. We also show the effectiveness of the proposed method through evaluation of the implemented prototype.

本発明者らは、代表的なボットであるAgobotのソースコードを詳細に分析した。その結果、Agobotには大きく下記のA、Bの耐解析機能が実装されており、初期化処理時に耐解析機能を利用して自身に対する解析の兆候を確認すること、及び、いずれかの解析の兆候が見られた場合、初期化処理を中断し、自プロセスを終了させることが分かった。また、A、Bの耐解析機能は、それぞれ、A−1〜4、B−1〜2の手法を用いて実現されることも分かった。
A.デバッガの検知
A−1.IsDebuggerPresent APIの利用
A−2.ブレークポイントの検出
A−3.SoftICE(登録商標)の検出
A−4.実行時間の計測
B.仮想環境の検知
B−1.VMware(登録商標)の検知
B−2.Virtual PCの検知
The inventors analyzed the source code of Agobot, which is a typical bot, in detail. As a result, Agobot has the following analysis resistance functions of A and B. Use the analysis resistance function during the initialization process to check the signs of analysis for itself, and If any signs were seen, it was found that the initialization process was interrupted and the process was terminated. It was also found that the analysis resistance functions of A and B are realized by using the methods A-1 to 4 and B-1 to 2, respectively.
A. Detection of debugger A-1. Use of IsDebuggerPresent API A-2. Detection of breakpoint A-3. Detection of SoftICE (registered trademark) A-4. Measurement of execution time Detection of virtual environment B-1. Detection of VMware (registered trademark) B-2. Detection of Virtual PC

まず、Agobotのソースコード分析を通して確認することができた耐解析機能の詳細について述べる。
A.デバッガの検知
A−1.IsDebuggerPresent APIの利用
Windows(登録商標)では、プロセスが生成されるとOSによって自動的にプロセス環境ブロック(PEB:Process Environment Block)が生成される。PEB中には、プロセスに関する様々なパラメータが格納されており、その1つにBeingDebuggedフラグが存在する。BeingDebuggedフラグは、プロセス生成時に偽の値に初期化されるが、DebugActiveProcess API等によりデバッガがアタッチされると真の値に設定される。Windowsの標準APIであるIsDebuggerPresent APIは、このBeingDebuggedフラグの値を読み出すことができ、AgobotではこのAPIを利用してデバッガの有無を検出している。
First, details of the anti-analysis function that could be confirmed through the Agobot source code analysis will be described.
A. Detection of debugger A-1. Use of IsDebuggerPresent API In Windows (registered trademark), when a process is generated, a process environment block (PEB) is automatically generated by the OS. Various parameters relating to the process are stored in the PEB, and a BeingDebugged flag exists in one of them. The BeingDebugged flag is initialized to a false value when a process is generated, but is set to a true value when a debugger is attached by the DebugActiveProcess API or the like. The IsDebuggerPresent API, which is a standard API of Windows, can read the value of this BeingDebugged flag, and Agobot uses this API to detect the presence or absence of a debugger.

A−2.ブレークポイントの検出
デバッガは、プログラムにブレークポイントを設定することで、任意の箇所でプログラムの実行を停止することができる。これは、停止させたいプログラムの実行コード箇所にブレークポイント例外を発生させる機械語命令(INT3命令)を挿入することで実現されている。プログラムがINT3命令を実行すると、ブレークポイント例外が発生し、この例外をCPUがハンドリングする。CPUは、デバッガの有無を確認し、例外が発生したプロセスにデバッガがアタッチされていた場合、処理をデバッガに委ねる。Agobotは、メモリ上に展開された自身の実行コードを定期的にスキャンし、INT3命令の挿入の有無を確認することで、デバッガを検知する。
A-2. Breakpoint detection The debugger can stop program execution at any point by setting a breakpoint in the program. This is realized by inserting a machine language instruction (INT3 instruction) that generates a breakpoint exception at an execution code portion of a program to be stopped. When the program executes the INT3 instruction, a breakpoint exception occurs, and this exception is handled by the CPU. The CPU confirms the presence or absence of the debugger, and when the debugger is attached to the process in which the exception has occurred, the CPU leaves the processing to the debugger. Agobot periodically scans its own execution code expanded on the memory, and detects the debugger by checking whether or not the INT3 instruction is inserted.

A−3.SoftICEの検出
SoftICEは、デバイスドライバ等のデバッガで利用される高性能のカーネルモードデバッガである。SoftICEを、システム上にインストールするとデバッガがカーネルモードにアクセスするための特別な名前空間がNTファイルシステム上に生成される。Agobotは、この名前空間の存在を確認することでシステム上のSoftICEの存在と共に、デバッガの検出を行っている。
A-3. Detection of SoftICE SoftICE is a high-performance kernel mode debugger used in a debugger such as a device driver. Installing SoftICE on the system creates a special namespace on the NT file system for the debugger to access kernel mode. Agobot confirms the existence of this name space to detect the debugger together with the presence of SoftICE on the system.

A−4.実行時間の計測
一般的なデバッガは、前述のように任意の箇所にブレークポイントを設定することでプログラムの処理を自由に中断することができる。また、シングルステップ実行機能を備えたデバッガを利用することで、CPUにおける1命令毎にプログラムの実行を中断することもできる。このようなデバッガを用いた解析が行われていた場合、本来であれば数秒程度で終了する処理の実行に極端に長い時間がかかることとなる。Agobotは、耐解析機能の処理の始めと終わりに現在時刻を取得し、2つの値の差分が設定した閾値(5秒)を超えていた場合、デバッガにより解析が行われていると判断している。
A-4. Measurement of execution time A general debugger can freely interrupt processing of a program by setting a breakpoint at an arbitrary position as described above. In addition, by using a debugger having a single step execution function, the execution of the program can be interrupted for each instruction in the CPU. When analysis using such a debugger has been performed, it takes an extremely long time to execute processing that normally ends in about a few seconds. Agobot obtains the current time at the beginning and end of the analysis-resistant function, and if the difference between the two values exceeds the set threshold (5 seconds), it determines that analysis is being performed by the debugger. Yes.

B.仮想環境の検知
仮想環境の検知は、仮想マシン環境を提供するソフトウェアであるVMwareならびに、Virtual PCの存在検知を目的としている。ここでは、VMwareの検知を中心に述べる。
VMwareにおいて、仮想マシン環境を提供するOSをHostOS、仮想マシン上で稼動するOSをGuestOSと呼ぶ。HostOSとGuestOSは、論理的に分離された環境となるため、GuestOS上で悪性プログラムを実行することで、安全に悪性プログラムの解析を行うことができる。
ところが、このように論理的に分離された環境であるHostOSとGuestOSの間に、VMware Backdoor I/Oと呼ぶ、一部の制御情報を交換するための非公開の機能が存在している。VMware Backdoor I/Oは、特定のI/Oポートに対するin命令を利用することで実現され、その際にCPUのレジスタに任意のコマンド番号を設定することで様々な制御情報を交換することが可能となっている。このVMware Backdoor I/Oにおけるコマンド番号と機能の対応の例を以下に示す。
B. Detection of Virtual Environment The detection of the virtual environment is intended to detect the presence of VMware, which is software that provides a virtual machine environment, and the Virtual PC. Here, the description will focus on VMware detection.
In VMware, an OS that provides a virtual machine environment is called a HostOS, and an OS that runs on a virtual machine is called a GuestOS. Since the HostOS and the GuestOS are in a logically separated environment, the malicious program can be safely analyzed by executing the malicious program on the GuestOS.
However, a secret function for exchanging some control information, called VMware Backdoor I / O, exists between HostOS and GuestOS, which are logically separated environments. VMware Backdoor I / O is realized by using an in command for a specific I / O port, and various control information can be exchanged by setting an arbitrary command number in the CPU register. It has become. An example of the correspondence between command numbers and functions in this VMware Backdoor I / O is shown below.

Figure 2008176352
Figure 2008176352

Agobotは、VMware Backdoor I/OによりVMwareのバージョン情報を取得し、現在自プロセスが実行されている環境がGuestOS内であるかどうかを判定する。   Agobot obtains VMware version information from VMware Backdoor I / O, and determines whether the environment in which the current process is currently executed is in GuestOS.

次に、上記A−1のIsDebuggerPresent APIを利用したデバッガ検知を誤認させる手法の実装と、その有効性について述べる。尚、IsDebuggerPresent APIの手法を選択した理由は、Agobotのソースコード詳細分析により、デバッガ検知手法として他の悪性プログラムにも利用されていると推測できたこと、また逆用のための実装が他のデバッガ検知手法と比べて、比較的容易であろうという判断からである。
IsDebuggerPresent APIは、このAPIを呼び出したプロセスが、その時点においてデバッグされているかどうかを真偽値で返す関数である。本実施の形態では、悪性プログラムがこのAPIを呼び出したときの返り値が、常に真となるような仕組みを実装した。
Next, the implementation of the technique for misidentifying the debugger detection using the IsDebuggerPresent API of A-1 and the effectiveness thereof will be described. The reason for selecting the IsDebuggerPresent API method was that it was speculated that it was also used by other malicious programs as a debugger detection method based on the detailed analysis of the source code of Agobot. This is because it is relatively easy to compare with the debugger detection method.
The IsDebuggerPresent API is a function that returns a true / false value indicating whether or not the process that called this API is being debugged at that time. In this embodiment, a mechanism is implemented in which a return value when a malicious program calls this API is always true.

まず、本実施の形態を適用するのに好適なコンピュータ10のハードウェア構成について説明する。
図1は、このようなコンピュータ10のハードウェア構成の一例を示した図である。
図示するように、コンピュータ10は、演算手段であるCPU(Central Processing Unit)10aと、M/B(マザーボード)チップセット10bを介してCPU10aに接続されたメインメモリ10cと、同じくM/Bチップセット10bを介してCPU10aに接続された表示機構10dとを備える。また、M/Bチップセット10bには、ブリッジ回路10eを介して、ネットワークインターフェイス10fと、磁気ディスク装置(HDD)10gと、音声機構10hと、キーボード/マウス10iと、フレキシブルディスクドライブ10jとが接続されている。
First, a hardware configuration of the computer 10 suitable for applying this embodiment will be described.
FIG. 1 is a diagram showing an example of the hardware configuration of such a computer 10.
As shown in the figure, a computer 10 includes a CPU (Central Processing Unit) 10a which is a calculation means, a main memory 10c connected to the CPU 10a via an M / B (motherboard) chip set 10b, and an M / B chip set. And a display mechanism 10d connected to the CPU 10a via 10b. Further, a network interface 10f, a magnetic disk device (HDD) 10g, an audio mechanism 10h, a keyboard / mouse 10i, and a flexible disk drive 10j are connected to the M / B chip set 10b via a bridge circuit 10e. Has been.

尚、図1において、各構成要素は、バスを介して接続される。例えば、CPU10aとM/Bチップセット10bの間や、M/Bチップセット10bとメインメモリ10cの間は、CPUバスを介して接続される。また、M/Bチップセット10bと表示機構10dとの間は、AGP(Accelerated Graphics Port)を介して接続されてもよいが、表示機構10dがPCI Express対応のビデオカードを含む場合、M/Bチップセット10bとこのビデオカードの間は、PCI Express(PCIe)バスを介して接続される。また、ブリッジ回路10eと接続する場合、ネットワークインターフェイス10fについては、例えば、PCI Expressを用いることができる。また、磁気ディスク装置10gについては、例えば、シリアルATA(AT Attachment)、パラレル転送のATA、PCI(Peripheral Components Interconnect)を用いることができる。更に、キーボード/マウス10i、及び、フレキシブルディスクドライブ10jについては、USB(Universal Serial Bus)を用いることができる。   In FIG. 1, each component is connected via a bus. For example, the CPU 10a and the M / B chip set 10b and the M / B chip set 10b and the main memory 10c are connected via a CPU bus. Further, the M / B chipset 10b and the display mechanism 10d may be connected via an AGP (Accelerated Graphics Port), but if the display mechanism 10d includes a PCI Express compatible video card, the M / B The chip set 10b and the video card are connected via a PCI Express (PCIe) bus. When connecting to the bridge circuit 10e, for example, PCI Express can be used for the network interface 10f. For the magnetic disk device 10g, for example, serial ATA (AT Attachment), parallel transfer ATA, or PCI (Peripheral Components Interconnect) can be used. Furthermore, USB (Universal Serial Bus) can be used for the keyboard / mouse 10i and the flexible disk drive 10j.

次に、本実施の形態におけるデバッガ検知を誤認させる手法の実装について説明する。
本実施の形態では、まず、カーネルモードで動作するデバイスドライバによってプロセス生成を監視し、生成されたプロセスの情報を、ユーザモードで動作するサービスアプリケーションに通知する。次に、生成されたプロセスの情報を受け取ったサービスアプリケーションが偽のIsDebuggerPresent APIの処理を実装したDLL(ダイナミックリンクライブラリ)を悪性プログラムに注入する。尚、ここでは、便宜上「偽の」と表現しているが、実際は、後述するように、IsDebuggerPresent APIが呼ばれた際に、予め用意した別の処理へ向けて実行パスを変更する実装としている。
Next, an implementation of a technique for misidentifying debugger detection in this embodiment will be described.
In the present embodiment, process generation is first monitored by a device driver operating in the kernel mode, and information on the generated process is notified to a service application operating in the user mode. Next, the service application that has received the generated process information injects a DLL (dynamic link library) in which a fake IsDebuggerPresent API process is implemented into a malicious program. In addition, here, it is expressed as “false” for convenience, but actually, as will be described later, when the IsDebuggerPresent API is called, the implementation path is changed to another process prepared in advance. .

図2は、IsDebuggerPresent APIを利用したデバッガ検知を誤認させる際におけるコンピュータ10のソフトウェア構成を模式的に示した図である。
図示するように、カーネルセグメント11には、プロセス生成監視部12として機能するデバイスドライバのコードが格納されている。即ち、プロセス生成監視部12は、カーネルモード(OSの実行モード)で動作するプログラム(システムに常駐するプログラム)である。このプロセス生成監視部12は、新たなプロセスの生成を監視し、プロセスが生成されるとこれを検出する。そして、ユーザモードで動作する監視モジュール生成部13に対し、(1)に示すように、生成されたプロセスの情報を通知する。即ち、本実施の形態では、新たなプロセスが生成されたことをOSの実行モードで検出する検出手段の一例として、プロセス生成監視部12を設けている。
FIG. 2 is a diagram schematically showing a software configuration of the computer 10 when misdetecting debugger detection using the IsDebuggerPresent API.
As shown in the figure, the kernel segment 11 stores a code of a device driver that functions as the process generation monitoring unit 12. That is, the process generation monitoring unit 12 is a program (a program resident in the system) that operates in the kernel mode (OS execution mode). The process generation monitoring unit 12 monitors the generation of a new process and detects when a process is generated. Then, as shown in (1), information on the generated process is notified to the monitoring module generation unit 13 operating in the user mode. That is, in the present embodiment, the process generation monitoring unit 12 is provided as an example of a detection unit that detects in the OS execution mode that a new process has been generated.

一方で、ユーザモードでは、通常、複数のプロセスが実行されている。図には、4つのプロセスを、プロセス14a〜14dとして示している。つまり、これらのプロセスについては、その生成時に、プロセス生成監視部12がプロセスの生成を検出し、既に監視モジュール生成部13に対してプロセスの情報を通知済みである。
このようにプロセスの情報が通知されると、監視モジュール生成部13は、通知されたプロセスに監視モジュールを注入する。即ち、そのプロセスに割り当てられたテキストセグメントに対し、(2)に示すように、監視モジュール15a〜15dを強制的にロードする。ここで、監視モジュールとは、例えば、DLLである。但し、上述したように、IsDebuggerPresent APIが呼び出された際に、予め用意した別の処理が実行されるような仕組みを有するDLLである。即ち、本実施の形態では、プログラムが解析されていると誤認させるための処理を、そのプログラムが実行されることで生成されたプロセスに対して施す処理手段の一例として、監視モジュール生成部13を設けている。
強制ロードの結果、監視モジュール15a〜15dは、(3)に示すように、自プロセスの動作を監視する。そして、IsDebuggerPresent APIが呼び出されると、代替処理が実行され、自プロセスは終了する。
On the other hand, in the user mode, a plurality of processes are usually executed. In the figure, four processes are shown as processes 14a to 14d. That is, for these processes, at the time of generation, the process generation monitoring unit 12 detects the generation of the process and has already notified the monitoring module generation unit 13 of the process information.
When the process information is notified in this way, the monitoring module generation unit 13 injects the monitoring module into the notified process. That is, as shown in (2), the monitoring modules 15a to 15d are forcibly loaded to the text segment assigned to the process. Here, the monitoring module is, for example, a DLL. However, as described above, the DLL has a mechanism such that another process prepared in advance is executed when the IsDebuggerPresent API is called. In other words, in the present embodiment, the monitoring module generation unit 13 is used as an example of a processing unit that performs a process for misidentifying that the program is analyzed on a process generated by executing the program. Provided.
As a result of the forcible load, the monitoring modules 15a to 15d monitor the operation of the own process as shown in (3). Then, when the IsDebuggerPresent API is called, alternative processing is executed, and the own process ends.

次いで、本実施の形態の動作について説明する。
図3は、本実施の形態におけるプロセス生成監視部12と監視モジュール生成部13の動作例を示したシーケンス図である。
まず、プロセス生成監視部12は、システムのシャットダウン等の理由で終了指示があったかどうかを判定し(ステップ101)、終了指示があれば、処理を終了させ、終了指示がなければ、新規プロセスが生成されたかどうかを判定する(ステップ102)。
その結果、新規プロセスが生成されていないと判定されれば、ステップ101に戻るが、新規プロセスが生成されたと判定されれば、監視モジュール生成部13に対し、新規プロセスの生成通知を送信する(ステップ103)。
これにより、監視モジュール生成部13は、新規プロセスの生成通知を受信する(ステップ104)。そして、監視モジュールの注入処理を行う(ステップ105)。
Next, the operation of the present embodiment will be described.
FIG. 3 is a sequence diagram showing an operation example of the process generation monitoring unit 12 and the monitoring module generation unit 13 in the present embodiment.
First, the process generation monitoring unit 12 determines whether or not there has been a termination instruction for reasons such as system shutdown (step 101). If there is a termination instruction, the process is terminated. If there is no termination instruction, a new process is created. It is determined whether it has been done (step 102).
As a result, if it is determined that a new process has not been generated, the process returns to step 101. However, if it is determined that a new process has been generated, a new process generation notification is transmitted to the monitoring module generation unit 13 ( Step 103).
As a result, the monitoring module generation unit 13 receives a new process generation notification (step 104). Then, an injection process of the monitoring module is performed (step 105).

この監視モジュールの注入処理において、本実施の形態では、メモリ上にロードされたフック対象APIの実行コードの先頭を、任意のアドレスへジャンプするコードに書き換え、ジャンプ先にある代替処理を実行させる方式(Detours hook)を利用する。
次に、このときの動作について説明する。
図4は、監視モジュール生成部13による監視モジュール注入処理の動作例を示したフローチャートである。
まず、監視モジュール生成部13は、DLLをメモリにロードする(ステップ201)。次に、代替処理のアドレスを取得する(ステップ202)。ここで、代替処理とは、IsDebuggerPresent APIのようにBeingDebuggedフラグを参照してデバッグされているかどうかを真偽値で返すのではなく、常に真(デバッグされている)を返す処理である。そして、監視モジュール生成部13は、フック対象APIの実行コードの先頭を、ステップ202で取得したアドレスへジャンプするコードに書き換える(ステップ203)。
In this monitoring module injection process, in the present embodiment, the execution code of the hook target API loaded on the memory is rewritten with a code that jumps to an arbitrary address, and the alternative process at the jump destination is executed. Use (Detours hook).
Next, the operation at this time will be described.
FIG. 4 is a flowchart showing an operation example of the monitoring module injection processing by the monitoring module generation unit 13.
First, the monitoring module generation unit 13 loads the DLL into the memory (Step 201). Next, the address of the alternative process is acquired (step 202). Here, the alternative process is a process that always returns true (being debugged) instead of returning whether or not it is debugged with reference to the BeingDebugged flag as in the IsDebuggerPresent API. Then, the monitoring module generation unit 13 rewrites the top of the execution code of the hook target API with a code that jumps to the address acquired in Step 202 (Step 203).

尚、本実施の形態で採用したドライバとサービスアプリケーションを用いる構成は、一般的なウイルス対策ソフトウェアと同様である。しかしながら、悪性プログラム自身の耐解析機能を逆用して、その活動を抑制するという手法は、悪性プログラムの動作パターンを解析し、検出した後に動作停止させるという従来ウイルス対策ソフトウェアとは異なる。現在主流のウイルス検知手法であるシグネチャ方式では対応しきれない多数の亜種が存在する悪性プログラムに対しても、活動抑制の可能性が期待できる。   The configuration using the driver and the service application adopted in the present embodiment is the same as that of general antivirus software. However, the technique of reusing the anti-analysis function of the malicious program itself to suppress its activity is different from the conventional antivirus software that analyzes the operation pattern of the malicious program and stops the operation after detecting it. The possibility of activity suppression can be expected even for malicious programs that have many variants that cannot be handled by the signature method, which is the mainstream virus detection method.

ところで、本実施の形態では、上記のようなAPIフックの手法を採用したが、通常のWindows32ネイティブプログラムに対してAPIの呼び出しをフックし、その処理を変更する手法としては、この他にも幾つかの手法がある。
一般的によく使われる手法に、次のようなものがある。即ち、DLLにフック対象APIの処理を置き換えるコードとSetWindowsHookEx APIを用いたメッセージフックを行うコードとを実装する。そして、フックを制御(開始・終了)する別の実行プログラムを作成し、そのプログラムからAPIフックを行いたい対象プロセスのスレッドIDを指定して、DLLのメッセージフックを行う関数の呼び出しを行う。これにより、対象プロセスに置き換えたいコードを実装したDLLがロードされる。DLLの初期化ルーチンでは、対象プロセスのプロセスメモリ上にあるインポートセクションのIAT(Import Address Table)に格納される正規のAPIの実行アドレスをロードさせたライブラリにある関数のアドレスに書き換える手法(IAT API Hooking)で行われることが多い。しかし、この方法では、悪性プログラムに対してAPIフックを行う場合に2つの問題点が考えられる。
By the way, in the present embodiment, the API hook technique as described above is adopted. However, there are several other techniques for hooking an API call to a normal Windows32 native program and changing its processing. There is such a method.
The following methods are commonly used. That is, a code for replacing the processing of the hook target API and a code for performing a message hook using the SetWindowsHookEx API are implemented in the DLL. Then, another execution program for controlling (starting / ending) the hook is created, and the thread ID of the target process to which the API hook is to be executed is designated from the program, and a function for performing the DLL message hook is called. As a result, the DLL in which the code to be replaced with the target process is loaded. In the DLL initialization routine, the method of rewriting the execution address of the regular API stored in the IAT (Import Address Table) of the import section in the process memory of the target process with the address of the function in the loaded library (IAT API Hooking). However, with this method, two problems can be considered when API hooking is performed on a malicious program.

(1) DLLをロードさせる段階での問題
SetWindowsHookEx APIを用いるメッセージフックでは、対象プログラムによって最初にウィンドウメッセージが処理されるタイミングでフックが開始される。従って、プログラムの開始直後にあるデバッガ検知やGUIを持たないコンソールプログラム(通常起動しただけではウィンドウメッセージが発生しない)では、API呼び出しをフックすることができない。一般的に悪性プログラムはGUIを持つことはあまり無く、またデバッガ検知もプログラム開始直後に行われることが多いため、この手法では効果が得られないと考えられる。更に、悪性プログラムが実行されるタイミングは予測不能であるので、実用的なシステムとして機能させるには、システムに常駐しプロセス生成を監視するプログラムが必要になる。
(1) Problems at the stage of loading DLL
In the message hook using the SetWindowsHookEx API, the hook is started when the window message is first processed by the target program. Therefore, an API call cannot be hooked in a console program that does not have a debugger detection or GUI immediately after the start of the program (a window message is not generated when the program is started normally). In general, malicious programs do not often have a GUI, and debugger detection is often performed immediately after the start of the program, so this method is considered to be ineffective. Furthermore, since the timing at which a malicious program is executed is unpredictable, in order to function as a practical system, a program that resides in the system and monitors process generation is required.

(2) IATの書き換えによるAPIフックの実行の問題
パッカー等のツールにより難読化、圧縮が施された悪性プログラムは、通常のプログラムと異なりインポートセクションにIATが無く、APIのアドレスを動的に取得するものが存在することを分析により確認している。このような悪性プログラムには、IATの書き換えによるAPIフックを行うことができない。
(2) Problem of API hook execution by rewriting IAT A malicious program obfuscated or compressed by tools such as packers does not have an IAT in the import section unlike a normal program, and dynamically acquires the API address. It is confirmed by analysis that there is something to do. Such a malicious program cannot be API hooked by rewriting the IAT.

そこで、本実施の形態では、上記(1)の問題点を解決する方法として、カーネルモードで動作するデバイスドライバとしてのプロセス生成監視部12を設け、これによってプロセス生成を監視する構成を採用した。
また、上記(2)の問題点を解決する方法として、IATの書き換えによるAPIフックではなく、メモリ上にロードされたフック対象APIの実行コードの先頭を任意のアドレスへジャンプするコードに書き換え、ジャンプ先にある代替処理を実行する構成を採用した。
Therefore, in the present embodiment, as a method for solving the problem (1), a process generation monitoring unit 12 as a device driver that operates in the kernel mode is provided, and thereby a process generation is monitored.
Also, as a method for solving the problem (2) above, instead of the API hook by rewriting the IAT, the head of the execution code of the hook target API loaded on the memory is rewritten to a code that jumps to an arbitrary address, and the jump The configuration that executes the alternative process is adopted.

以上述べた実装の評価を、Telecom-ISAC Japanが中心となって運用しているハニーポットSuper-Honeyによって2005年4月から2006年5月までに収集された悪性プログラムの検体を用いて実施したので、以下、この評価の内容について説明する。
まず、評価方法であるが、ドライバ、サービスアプリケーション、DLLから構成されたデバッガ検知逆用システムをVMware上のGuestOSとなるWindows XP SP1上にインストールし、その環境内で悪性プログラムの検体を実行することで有効性を評価した。評価に用いた悪性プログラムの検体は、ハニーポットSuper-Honeyで収集されたハッシュ値の異なる17,257種類である。
有効性の判断は、検体プログラムを実行した結果、指定時間以内にプロセスが終了するかどうか、及び、その終了理由から行った。今回の評価では、10秒間の待機時間を設定した。具体的には、下記の機能(1),(2)を用いて、実行後10秒以内に検体プロセスが終了するかどうかと、10秒以内に終了したプロセスのログファイルを分析し、IsDebuggerPresent APIの後にExitProcess APIを呼び出し終了している検体に対して、本実施の形態の方法が有効であると判断した。
・機能(1):DLLにログ出力処理を実装し、DLLのロード、デバッガ検知のためのIsDebuggerPresent APIのフックの記録を残す。
・機能(2):通常のプログラムが終了時に呼び出すExitProcess APIをフックしてプロセスの終了に関する情報を記録する。
図5に、本実施の形態の手法が有効であると判断したログ出力例を示す。
The implementation described above was evaluated using samples of malignant programs collected from April 2005 to May 2006 by the Honeypot Super-Honey operated mainly by Telecom-ISAC Japan. Therefore, the contents of this evaluation will be described below.
First, as an evaluation method, a debugger detection reverse system composed of drivers, service applications, and DLLs is installed on Windows XP SP1, which is a GuestOS on VMware, and a sample of a malicious program is executed in that environment. The effectiveness was evaluated. The sample of malignant program used for the evaluation was 17,257 different hash values collected by the honeypot Super-Honey.
Judgment of effectiveness was made based on whether or not the process was completed within a specified time as a result of executing the sample program and the reason for the completion. In this evaluation, a waiting time of 10 seconds was set. Specifically, the following functions (1) and (2) are used to analyze whether the sample process is completed within 10 seconds after execution and the log file of the process completed within 10 seconds, and then the IsDebuggerPresent API After that, it was determined that the method of the present embodiment is effective for a sample that has finished calling ExitProcess API.
Function (1): Implements log output processing in DLL, and keeps a record of hooks of IsDebuggerPresent API for DLL loading and debugger detection.
-Function (2): Records information related to process termination by hooking the ExitProcess API called when a normal program terminates.
FIG. 5 shows a log output example in which it is determined that the method of this embodiment is effective.

尚、この評価を行ったときの動作環境は、次の通りである。
・ネットワーク接続は行わない状態とする(VMwareでネットワークインターフェイスを未接続とする)。
・実行されたプログラムがVMware環境内で実行されたことを検知不可にするパッチは適用しない。
・悪性プログラムを1つ実行する毎に、VMwareのスナップショット機能を用いてクリーンな環境に戻す。
The operating environment when this evaluation is performed is as follows.
-Do not connect to the network (make the network interface unconnected with VMware).
-Patches that make it impossible to detect that an executed program has been executed in the VMware environment are not applied.
・ Every time one malicious program is executed, the snapshot function of VMware is used to return to a clean environment.

また、評価結果は、次の通りである。
(1) 捕捉数上位の検体を対象とした場合
インターネット上の脆弱なホストに感染している可能性の高い悪性プログラムへの有効性を評価するため、ハニーポットでの捕捉数が多い上位89番目までの検体を対象とした評価結果は次の通りである。
・37%にあたる33種が10秒以内に終了した。
・IsDebuggerPresent APIを呼び出して終了した検体は無かった。
(2) 全ての捕捉検体を対象とした場合
ハニーポットで捕捉された全ての検体17,257種類に対する評価結果は、次の通りである。
まず、検体実行結果を以下の表に示す。
The evaluation results are as follows.
(1) Targeting the highest number of captured samples In order to evaluate the effectiveness of malicious programs that are likely to be infected with vulnerable hosts on the Internet, the 89th most captured in the honeypot The evaluation results for the samples up to are as follows.
・ Thirty-seven kinds, 37%, were completed within 10 seconds.
-There was no sample that ended by calling the IsDebuggerPresent API.
(2) When all captured samples are targeted The evaluation results for all 17,257 types of samples captured in the honeypot are as follows.
First, the sample execution results are shown in the following table.

Figure 2008176352
Figure 2008176352

また、10秒以内に終了した検体の終了理由の内訳を以下の表に示す。   The breakdown of the reasons for termination of specimens completed within 10 seconds is shown in the following table.

Figure 2008176352
Figure 2008176352

・約37%にあたる6,378種類が単体で実行可能なファイルであり、残りの10,879種類(全体の約63%)はdllやsysファイルといったexe形式でない実行ファイルであった。
・単体で実行できた6,378種類のうち10秒以内に終了した検体は1,320種類存在したが、3,341種類の検体は10秒経過してもプロセスが終了しなかった。
・10秒以内に終了した検体のうち、IsDebuggerPresent APIの呼び出しの後にExitProcess APIを呼び出して終了した検体は101種類存在した。
-Approximately 37% of the 6,378 types are executable files, and the remaining 10,879 types (about 63% of the total) were non-exe executable files such as dll and sys files.
-Of the 6,378 types that could be executed alone, there were 1,320 samples that ended within 10 seconds, but 3,341 types of samples did not end after 10 seconds.
-Among the samples that ended within 10 seconds, there were 101 types of samples that ended after calling the ExitProcess API after calling the IsDebuggerPresent API.

発明者らは、以上述べたような評価結果を踏まえ、次のような考察を行った。
まず、捕捉数上位89番目までの検体を対象とした評価実験から、感染率の高い悪性プログラムは、複数の耐解析機能が実装されている可能性が極めて高いことが類推できる。
また、全ての捕捉検体を対象とした評価実験において、dllやsysファイルといったexe形式でない実行ファイル10,879種類(全体の約63%)の存在は、ハニーポットSuper-Honeyが実行形式のファイルだけではなく、悪性プログラムが自身の部品として利用しているファイルも収集する機能を保有していることに起因する。従って、評価にあたっては、単体で実行できた6,378種類(捕捉総数の約37%)を母数として考察を行なう。
3,341種類(実行可能検体総数の約52%)の検体は10秒経過してもプロセスが終了せず、明らかに効果が無かったといえるが、10秒以内に終了した検体のうち、IsDebuggerPresent APIの呼び出しの後にExitProcess APIを呼び出して終了した検体は101種類(実行可能検体総数の約1.6%)存在し、本実施の形態の手法が有効であると判断できる。更に、この101種類の検体について、ウイルス対策ソフトウェアによる検知名を調査したところ、図6に示す結果が得られたことから、この手法が機能したのは実行可能検体総数の約1.6%で数値そのものは低いが、亜種の非常に多いRBOT、SPYBOT、SDBOT系に対して本手法が有効であった意義は大きいと考える。次に、実行可能であった検体のうち約20%にあたる1,320種類がプロセス開始から10秒以内に終了しているという結果から、VMware等の仮想環境の検知やネットワーク接続状態を検知し、動作を終了していることが考えられ、今回利用したIsDebuggerPresent API以外の耐解析機能を逆用することで、実行可能な悪性プログラムの10〜20%に対して活動抑制の効果を期待できるのではないかと思われる。
The inventors made the following considerations based on the evaluation results as described above.
First, it can be inferred from the evaluation experiment targeting the specimens with the highest number of captures up to the 89th that a malignant program with a high infection rate is very likely to have multiple anti-analysis functions.
In addition, in the evaluation experiments for all the captured specimens, the existence of 10,879 types of executable files that are not exe format such as dlls and sys files (about 63% of the total) is not only the file that the honeypot Super-Honey is an executable format. This is because the malicious program has a function to collect files used as its own parts. Therefore, in the evaluation, 6,378 types (about 37% of the total number of captures) that can be executed alone are considered as parameters.
For 3,341 types (approximately 52% of the total number of executable samples), the process did not end even after 10 seconds, and it was said that the process was clearly ineffective. Of the samples that ended within 10 seconds, the call to IsDebuggerPresent API After that, there are 101 types of samples (about 1.6% of the total number of executable samples) that are terminated by calling the ExitProcess API, and it can be determined that the method of the present embodiment is effective. Furthermore, when the detection names of the 101 types of specimens were investigated by the anti-virus software, the results shown in FIG. 6 were obtained. This technique worked for about 1.6% of the total number of executable specimens. Although the numerical value itself is low, the significance of the effectiveness of the present method for the RBOT, SPYBOT, and SDBOT systems with a large number of variants is considered significant. Next, from the result that 1,320 types, which are about 20% of the executable samples, were completed within 10 seconds from the start of the process, detection of virtual environment such as VMware and network connection status was detected, and the operation was performed. It is thought that it has been terminated, and by using the anti-analysis function other than the IsDebuggerPresent API used this time, it may be possible to expect an activity suppression effect for 10-20% of executable malicious programs Seem.

そこで、次に、IsDebuggerPresent API以外の耐解析機能を逆用する方法について述べる。
A−2.ブレークポイントの検出
この場合、テキストセグメント上のアドレスのうち、悪性プログラムが有するブレークポイント検出ルーチンが読み取ると思われるアドレスに対し、そのアドレスのデータをメモリパッチングでINT3命令(0xCC)に書き換える。これにより、ブレークポイントが設定された状態となるので、テキストセグメント上の自身の実行コードをスキャンする悪性プログラムに対して、デバッグされているとみせかけることができる。
Then, next, the method of reusing the analysis resistance function other than IsDebuggerPresent API is described.
A-2. Breakpoint detection In this case, for the address on the text segment that is supposed to be read by the breakpoint detection routine of the malicious program, the address data is rewritten to the INT3 instruction (0xCC) by memory patching. As a result, since a breakpoint is set, it can be seen that the malicious program that scans its execution code on the text segment is being debugged.

A−3.SoftICEの検出
この場合、CreateFile APIをフックし、その第一引数が“\\.\NTICE”であった場合、戻り値を0xFFFFFFFF(INVALID_HANDLE_VALUE)以外に設定することで、SoftICEでデバッグされているとみせかける。具体的には、CreateFile APIの第一引数が“\\.\NTICE”であれば0xFFFFFFFF以外の値を返す代替処理を予め用意しておき、CreateFile APIの実行コードの先頭を、この代替処理のアドレスへジャンプするコードに書き換える。
ここで、CreateFile APIは、指定されたファイルが有るかどうかを示す情報を返すAPIの一例と考えることができる。
A-3. Detection of SoftICE In this case, if the CreateFile API is hooked and the first argument is "\\. \ NTICE", the return value is set to something other than 0xFFFFFFFF (INVALID_HANDLE_VALUE), so that it is debugged with SoftICE Show off. Specifically, if the first argument of CreateFile API is “\\. \ NTICE”, an alternative process that returns a value other than 0xFFFFFFFF is prepared in advance, and the beginning of the CreateFile API execution code is Rewrite the code to jump to the address.
Here, the CreateFile API can be considered as an example of an API that returns information indicating whether or not a specified file exists.

A−4.実行時間の計測
GetTickCount APIをフックし以下のこと行う。
GetTickCount APIが呼ばれた際、得られた値を記憶する。そして、次に GetTickCountが呼び出された際、得られた値と記憶値(前回の結果)を比較し、差分が5000以上となる値を戻り値として設定することでデバッガによるステップ実行にみせかける。尚、5000という値はAgobotのソース分析によって得られた基準値である。具体的には、GetTickCount APIが前回返した値を参照し、これとの差分が5000以上となる値を返す代替処理を予め用意しておき、GetTickCount APIの実行コードの先頭を、この代替処理のアドレスへジャンプするコードに書き換える。
ここで、GetTickCount APIは、時間に関する値を返すAPIの一例と考えることができる。
尚、上記では、デバッガの検知に関する耐解析機能として、A−1〜4のみを示したが、これ以外の耐解析機能を逆用し、解析されているとみせかける処理を施してもよい。
A-4. Execution time measurement
Hook the GetTickCount API and do the following:
When GetTickCount API is called, the value obtained is stored. Then, when GetTickCount is called next time, the obtained value is compared with the stored value (previous result), and a value with a difference of 5000 or more is set as a return value, thereby making it appear that step execution by the debugger is performed. The value of 5000 is a reference value obtained by Agobot source analysis. Specifically, an alternative process that refers to the previous value returned by the GetTickCount API and returns a value that is 5000 or more of the difference is prepared in advance, and the top of the execution code of the GetTickCount API is set to this alternative process. Rewrite the code to jump to the address.
Here, the GetTickCount API can be considered as an example of an API that returns a value related to time.
In the above description, only A-1 to A-4 are shown as the analysis resistance function related to the detection of the debugger. However, other analysis resistance functions other than this may be reversed to perform processing that makes it appear that analysis is being performed.

更に、仮想環境の検知を誤認させる場合について述べる。ここでは、MACアドレスとレジストリの偽造を行うことによって誤認させる。
B−1.VMwareの場合
MACアドレスの上位3バイトを00-0c-29に変更する。そして、VMware のインストールによって追加される設定データ(例えば、レジストリキー)を追加する。
B−2.Virtual PCの場合
MACアドレスの上位3バイトを00-03-FFに変更する。そして、Virtual PC のインストールによって追加される設定データ(例えば、レジストリキー)を追加する。
Furthermore, a case where the detection of the virtual environment is misidentified will be described. Here, the MAC address and the registry are counterfeited for misidentification.
B-1. For VMware Change the upper 3 bytes of the MAC address to 00-0c-29. Then, setting data (for example, registry key) added by installing VMware is added.
B-2. For Virtual PC Change the upper 3 bytes of the MAC address to 00-03-FF. Then, setting data (for example, a registry key) added by installation of Virtual PC is added.

尚、本実施の形態では、悪性プログラムを対象として、自身が解析されていると誤認させることで活動を抑制することについて述べた。しかしながら、「悪性」かどうかに関わらず、自身が解析されていることを認識すると自プロセスを終了する機能を有する如何なるプログラムに対しても、本手法は適用可能である。   In the present embodiment, it has been described that the activity is suppressed by misidentifying that the malicious program is analyzed. However, this method can be applied to any program having a function of terminating its own process upon recognizing that it has been analyzed regardless of whether it is “malignant” or not.

以上述べたように、本実施の形態では、自身が解析されていると認識することで自プロセスを終了させる機能を有する特定プログラムに対し、その機能を逆用し、解析されていると誤認させるようにした。これにより、その活動を抑制することが可能となった。   As described above, in the present embodiment, by recognizing that the process itself is analyzed, the specific program having the function of terminating the process itself can be reversed and misunderstood as being analyzed. I did it. This made it possible to suppress the activity.

本実施の形態が適用されるコンピュータのハードウェア構成図である。It is a hardware block diagram of the computer to which this Embodiment is applied. 本実施の形態におけるコンピュータのソフトウェア構成を示した図である。It is the figure which showed the software configuration of the computer in this Embodiment. 本実施の形態におけるプロセス生成監視部及び監視モジュール生成部の動作例を示したシーケンス図である。It is the sequence diagram which showed the operation example of the process production | generation monitoring part and monitoring module production | generation part in this Embodiment. 本実施の形態における監視モジュール生成部による監視モジュール注入処理の動作を示したフローチャートである。It is the flowchart which showed the operation | movement of the monitoring module injection | pouring process by the monitoring module production | generation part in this Embodiment. 本実施の形態の評価において、手法が有効であると判断したログ出力例である。This is an example of log output that is determined to be effective in the evaluation of the present embodiment. 本実施の形態の評価において、手法が有効であると判断した検体をウイルス対策ソフトウェアで調査した結果である。In the evaluation of the present embodiment, it is the result of investigating a sample that is determined to be effective by using antivirus software.

符号の説明Explanation of symbols

10…コンピュータ、11…カーネルセグメント、12…プロセス生成監視部、13…監視モジュール生成部、14a〜14d…プロセス、15a〜15d…監視モジュール DESCRIPTION OF SYMBOLS 10 ... Computer, 11 ... Kernel segment, 12 ... Process production | generation monitoring part, 13 ... Monitoring module production | generation part, 14a-14d ... Process, 15a-15d ... Monitoring module

Claims (10)

自身が実行されることで生成されたプロセスを自身が解析されていると認識することで終了させる機能を有する特定プログラムの動作を制御するためのコンピュータプログラムであって、
コンピュータに、
プログラムが実行されることにより新たなプロセスが生成されたことを、OS(Operating System)の実行モードで検出する機能と、
生成された前記プロセスに対し、前記プログラムが解析されていると誤認させるための処理を施すことにより、当該プログラムが前記特定プログラムであれば当該プロセスを終了させる機能と
を実現させるためのコンピュータプログラム。
A computer program for controlling the operation of a specific program having a function of terminating a process generated by executing itself by recognizing that the process is being analyzed,
On the computer,
A function for detecting in the execution mode of the OS (Operating System) that a new process is generated by executing the program;
A computer program for realizing a function of ending the process if the program is the specific program by performing a process for causing the generated process to be misidentified that the program is analyzed.
前記終了させる機能では、生成された前記プロセスに対し、前記プログラムを解析しているデバッガが無いにも関わらず、当該プログラムを解析しているデバッガが有ると誤認させるための処理を施すことを特徴とする請求項1記載のコンピュータプログラム。   The function for terminating is to perform a process for causing the generated process to misidentify that there is a debugger analyzing the program even though there is no debugger analyzing the program. The computer program according to claim 1. 前記終了させる機能では、前記プログラムを解析しているデバッガが有るかどうかを示す情報を返すAPI(Application Program Interface)をフックし、当該プログラムを解析しているデバッガが有る旨の情報を返す処理を、前記誤認させるための処理として行うことを特徴とする請求項2記載のコンピュータプログラム。   In the function to be terminated, a process of hooking an API (Application Program Interface) that returns information indicating whether or not there is a debugger that analyzes the program and returning information that there is a debugger that analyzes the program is performed. The computer program according to claim 2, wherein the computer program is executed as a process for making the user misidentify. 前記終了させる機能では、前記プロセスに割り当てられたメモリに展開された前記プログラムの実行コードにブレークポイント例外を発生させる命令を含める処理を、前記誤認させるための処理として行うことを特徴とする請求項2記載のコンピュータプログラム。   2. The function for terminating, wherein a process of including an instruction for generating a breakpoint exception in an execution code of the program expanded in a memory allocated to the process is performed as the process for causing a misunderstanding. 2. The computer program according to 2. 前記終了させる機能では、指定されたファイルが有るかどうかを示す情報を返すAPIをフックし、前記プログラムが特定のデバッガにより解析されている場合に存在する特定のファイルが当該APIを呼び出す際に指定されていれば、当該特定のファイルが有る旨の情報を返す処理を、前記誤認させるための処理として行うことを特徴とする請求項2記載のコンピュータプログラム。   In the function to be terminated, an API that returns information indicating whether or not a specified file exists is hooked, and a specific file that exists when the program is analyzed by a specific debugger is specified when the API is called. If it is, the computer program of Claim 2 which performs the process which returns the information that the said specific file exists as a process for making it misidentify. 前記終了させる機能では、時間に関する値を返すAPIをフックし、前回返した時間に関する値との差が所定値以上になるような時間に関する値を返す処理を、前記誤認させるための処理として行うことを特徴とする請求項2記載のコンピュータプログラム。   In the function for ending, hooking an API that returns a value related to time, and performing a process of returning a value related to a time such that the difference from the value related to the time returned last time is equal to or greater than a predetermined value is performed as the process for misidentification. The computer program according to claim 2. 前記終了させる機能では、生成された前記プロセスに対し、前記プログラムを解析するための仮想マシン環境が無いにも関わらず、当該プログラムを解析するための仮想マシン環境が有ると誤認させるための処理を施すことを特徴とする請求項1記載のコンピュータプログラム。   In the function to be terminated, processing for causing the generated process to misidentify that there is a virtual machine environment for analyzing the program even though there is no virtual machine environment for analyzing the program. The computer program according to claim 1, wherein the computer program is applied. 前記終了させる機能では、前記コンピュータのMACアドレスを書き換える処理と、前記仮想マシン環境を提供するソフトウェアのインストールによって追加される設定データを生成する処理とを、前記誤認させるための処理として行うことを特徴とする請求項7記載のコンピュータプログラム。   In the function to be terminated, a process of rewriting the MAC address of the computer and a process of generating setting data added by installation of software that provides the virtual machine environment are performed as the process for misidentification. The computer program according to claim 7. 自身が実行されることで生成されたプロセスを自身が解析されていると認識することで終了させる機能を有する特定プログラムの動作を制御するコンピュータ装置であって、
プログラムが実行されることにより新たなプロセスが生成されたことを、OSの実行モードで検出する検出手段と、
生成された前記プロセスに対し、前記プログラムが解析されていると誤認させるための処理を施すことにより、当該プログラムが前記特定プログラムであれば当該プロセスを終了させる処理手段と
を備えたことを特徴とするコンピュータ装置。
A computer device that controls the operation of a specific program having a function of terminating a process generated by executing itself by recognizing that the process is being analyzed,
Detection means for detecting in the execution mode of the OS that a new process has been generated by executing the program;
And a processing means for ending the process if the program is the specific program by performing a process for misidentifying that the program is analyzed with respect to the generated process. Computer equipment to do.
自身が実行されることで生成されたプロセスを自身が解析されていると認識することで終了させる機能を有する特定プログラムの動作を制御する動作制御方法であって、
プログラムが実行されることにより新たなプロセスが生成されたことを、OSの実行モードで検出するステップと、
生成された前記プロセスに対し、前記プログラムが解析されていると誤認させるための処理を施すことにより、当該プログラムが前記特定プログラムであれば当該プロセスを終了させるステップと
を含むことを特徴とする動作制御方法。
An operation control method for controlling the operation of a specific program having a function of terminating a process generated by executing itself by recognizing that the process is being analyzed,
Detecting in the OS execution mode that a new process has been generated by executing the program;
And a step of ending the process if the program is the specific program by performing a process for misidentifying that the program is analyzed with respect to the generated process. Control method.
JP2007006505A 2007-01-16 2007-01-16 Computer program, computer apparatus, and operation control method Pending JP2008176352A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007006505A JP2008176352A (en) 2007-01-16 2007-01-16 Computer program, computer apparatus, and operation control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007006505A JP2008176352A (en) 2007-01-16 2007-01-16 Computer program, computer apparatus, and operation control method

Publications (1)

Publication Number Publication Date
JP2008176352A true JP2008176352A (en) 2008-07-31

Family

ID=39703352

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007006505A Pending JP2008176352A (en) 2007-01-16 2007-01-16 Computer program, computer apparatus, and operation control method

Country Status (1)

Country Link
JP (1) JP2008176352A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010092174A (en) * 2008-10-06 2010-04-22 Nippon Telegr & Teleph Corp <Ntt> Method, device and program for detecting fraudulence, and information processing system
JP2011233125A (en) * 2010-04-28 2011-11-17 Electronics And Telecommunications Research Institute Method and apparatus for handling intelligent bot utilizing camouflage virtual machine information
JP2013137646A (en) * 2011-12-28 2013-07-11 Nec System Technologies Ltd Program protection device, program protection method, and program
JP2014089639A (en) * 2012-10-31 2014-05-15 Shunji Sugaya User terminal, reliability management server, unauthorized remote operation prevention method, and unauthorized remote operation prevention program
JP2017059083A (en) * 2015-09-18 2017-03-23 富士通株式会社 Network protection device, network protection method, and network protection program
JP2017191440A (en) * 2016-04-13 2017-10-19 富士通株式会社 Malware analysis apparatus, malware analysis method, and malware analysis program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004075060A1 (en) * 2003-02-21 2004-09-02 Tabei, Hikaru Computer virus detection device
JP2005165919A (en) * 2003-12-05 2005-06-23 Fuji Xerox Co Ltd Program execution method, program creation method, information processor and program
WO2006012197A2 (en) * 2004-06-29 2006-02-02 Intel Corporation Method of improving computer security through sandboxing
JP2006127035A (en) * 2004-10-27 2006-05-18 Sharp Corp Equipment with communication function

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004075060A1 (en) * 2003-02-21 2004-09-02 Tabei, Hikaru Computer virus detection device
JP2005165919A (en) * 2003-12-05 2005-06-23 Fuji Xerox Co Ltd Program execution method, program creation method, information processor and program
WO2006012197A2 (en) * 2004-06-29 2006-02-02 Intel Corporation Method of improving computer security through sandboxing
JP2006127035A (en) * 2004-10-27 2006-05-18 Sharp Corp Equipment with communication function

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010092174A (en) * 2008-10-06 2010-04-22 Nippon Telegr & Teleph Corp <Ntt> Method, device and program for detecting fraudulence, and information processing system
JP2011233125A (en) * 2010-04-28 2011-11-17 Electronics And Telecommunications Research Institute Method and apparatus for handling intelligent bot utilizing camouflage virtual machine information
US8813226B2 (en) 2010-04-28 2014-08-19 Electronics And Telecommunications Research Institute Defense method and device against intelligent bots using masqueraded virtual machine information
JP2013137646A (en) * 2011-12-28 2013-07-11 Nec System Technologies Ltd Program protection device, program protection method, and program
JP2014089639A (en) * 2012-10-31 2014-05-15 Shunji Sugaya User terminal, reliability management server, unauthorized remote operation prevention method, and unauthorized remote operation prevention program
US9348999B2 (en) 2012-10-31 2016-05-24 Optim Corporation User terminal, reliability management server, and method and program for preventing unauthorized remote operation
JP2017059083A (en) * 2015-09-18 2017-03-23 富士通株式会社 Network protection device, network protection method, and network protection program
US10339314B2 (en) 2015-09-18 2019-07-02 Fujitsu Limited Device, method and storage medium for terminating operation of software that is not successfully verified
JP2017191440A (en) * 2016-04-13 2017-10-19 富士通株式会社 Malware analysis apparatus, malware analysis method, and malware analysis program

Similar Documents

Publication Publication Date Title
JP5908132B2 (en) Apparatus and method for detecting attack using vulnerability of program
Wang et al. Detecting stealth software with strider ghostbuster
CN106462703B (en) Patch file analysis system and analysis method
RU2531861C1 (en) System and method of assessment of harmfullness of code executed in addressing space of confidential process
JP6706273B2 (en) Behavioral Malware Detection Using Interpreted Virtual Machines
US9779240B2 (en) System and method for hypervisor-based security
US9881157B1 (en) Anti-malware systems and methods using hardware-assisted code injection
CN102902919B (en) A kind of identifying processing methods, devices and systems of suspicious operation
RU2530210C2 (en) System and method for detecting malware preventing standard user interaction with operating system interface
US20060294592A1 (en) Automated rootkit detector
US20150067763A1 (en) Hardware and software execution profiling
EP2515250A1 (en) System and method for detection of complex malware
US20130239214A1 (en) Method for detecting and removing malware
US20070180529A1 (en) Bypassing software services to detect malware
JP5326063B1 (en) Malicious shellcode detection apparatus and method using debug events
JP2009129451A (en) Apparatus and method for detecting dynamic link library inserted by malicious code
US8495741B1 (en) Remediating malware infections through obfuscation
JP2010262609A (en) Efficient technique for dynamic analysis of malware
CN105184169A (en) Method for vulnerability detection in Windows operating environment based on instrumentation tool
RU2724790C1 (en) System and method of generating log when executing file with vulnerabilities in virtual machine
JP2008176352A (en) Computer program, computer apparatus, and operation control method
CN105683985A (en) Virtual machine introspection
US20180137274A1 (en) Malware analysis method and storage medium
Xuan et al. Toward revealing kernel malware behavior in virtual execution environments
US7941850B1 (en) Malware removal system and method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100108

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111219

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111227

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20120417