JPWO2004075060A1 - Computer virus judgment method - Google Patents

Computer virus judgment method Download PDF

Info

Publication number
JPWO2004075060A1
JPWO2004075060A1 JP2005502696A JP2005502696A JPWO2004075060A1 JP WO2004075060 A1 JPWO2004075060 A1 JP WO2004075060A1 JP 2005502696 A JP2005502696 A JP 2005502696A JP 2005502696 A JP2005502696 A JP 2005502696A JP WO2004075060 A1 JPWO2004075060 A1 JP WO2004075060A1
Authority
JP
Japan
Prior art keywords
breakpoint
application program
program
computer virus
execution
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
JP2005502696A
Other languages
Japanese (ja)
Inventor
浩二 田部井
浩二 田部井
Original Assignee
田部井 光
田部井 光
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 田部井 光, 田部井 光 filed Critical 田部井 光
Publication of JPWO2004075060A1 publication Critical patent/JPWO2004075060A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/566Dynamic detection, i.e. detection performed at run-time, e.g. emulation, suspicious activities

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Virology (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本発明は、悪意のあるプログラムやコンピュータウィルスが実行されることによるデータ改ざん、情報漏洩などのリスクからコンピュータを保護することに関する。コンピュータウィルスなどの検出技術としては、従来、パターンマッチングを用いる技術が主流である。一方、本発明においては、アプリケーションプログラムの実行中の振る舞いをチェックすることにより、コンピュータウィルスなど、悪意のあるプログラムの検出を行なう。すなわち、コンピュータ上で新規に生成されたプロセスや実行中のプロセスにアタッチを行ない、ブレークポイントを設定し、コンピュータに重要な変更を加えることができるシステムコールの呼び出しを監視することにより、監視対象プロセスの振る舞いと、過去のコンピュータウィルスの特徴的な振る舞いを比較する。The present invention relates to protecting a computer from risks such as data falsification and information leakage due to execution of a malicious program or computer virus. Conventionally, as a technique for detecting a computer virus or the like, a technique using pattern matching has been the mainstream. On the other hand, in the present invention, a malicious program such as a computer virus is detected by checking the behavior during execution of the application program. In other words, monitored processes can be monitored by attaching to newly created or running processes on the computer, setting breakpoints, and monitoring system calls that can make significant changes to the computer. Compare the behavior of the computer with the characteristic behavior of past computer viruses.

Description

この発明は、電子メール、WEB、ピア・ツー・ピアのファイル交換ソフトウェア等により、インターネットなどコンピュータの外部から導入されるなどして実行可能となったプログラムの実行をモニタリングして、コンピュータウィルスの振る舞い、若しくは、コンピュータウィルスに類似した振る舞いを検出し、プログラムの実行停止等の対応をすることに関する。  The present invention monitors the execution of a program that can be executed by e-mail, WEB, peer-to-peer file exchange software, etc. that is executed from outside the computer, such as the Internet, and the behavior of a computer virus. Or, it relates to detecting a behavior similar to a computer virus and taking measures such as stopping execution of a program.

現在、コンピュータウィルス(以下、単に「ウィルス」という場合がある。)の検出技術は、パターンマッチングを用いるものが主流である。この技術は、例えば、特開2003−216444、特開2002−196942、WO 02/086717 A1などにより開示されている。パターンマッチングは、コンピュータのメモリや、ハードディスク上のファイルに着目し、過去に発見されたウィルスの特徴的なシグネチャと比較してウィルスを検出する。パターンマッチングは誤検出が少ない技術であるが、既知のウィルスしか検出できない。
現在、一日に、約10〜20種類の新しいウィルスが見つかっている。一般ユーザが使用するコンピュータが、そのような新しいウィルスを検出し、対処することができるようにするためには、頻繁にアップデートされるウィルス・シグネチャ・ファイルを速やかにアンチウィルス会社から入手して、コンピュータにインストールしなければいけない。ところで、新しいウィルスは、過去のウィルスをほんの少し変えたものが多い。このため、実際のウィルスの振る舞いは、どれも非常に似ているという特徴がある。それにもかかわらず、ウィルスのプログラムという情報としてのパターンは異なるので、ウィルスが発見されるごとに、ウィルス・シグネチャ・ファイルをインストールする必要がある。
ウィルスの検出技術には、パターンマッチングの他に、ヒューリスティックスキャンがある。ヒューリスティックスキャンは、擬似的にコードを実行し、ウィルスに似た挙動をしないかを、エミュレーションに基づいて判断を行なう。しかし、実行ファイルのインストラクションを全てエミュレーションできるとは限らない。また、プログラムサイズが大きく、又は/及び、複雑に暗号化されたウィルスのエミュレーションには、非常に時間がかかる。
Currently, the mainstream of detection techniques for computer viruses (hereinafter sometimes simply referred to as “viruses”) uses pattern matching. This technique is disclosed in, for example, Japanese Patent Application Laid-Open No. 2003-216444, Japanese Patent Application Laid-Open No. 2002-196942, and WO 02/087717 A1. Pattern matching focuses on a file on a computer memory or hard disk, and detects a virus by comparing it with a signature signature of a virus found in the past. Pattern matching is a technique with few false detections, but only known viruses can be detected.
Currently, about 10 to 20 kinds of new viruses are found in one day. In order for computers used by regular users to be able to detect and deal with such new viruses, obtain frequently updated virus signature files from anti-virus companies promptly, Must be installed on the computer. By the way, there are many new viruses that have changed the past viruses a little. For this reason, the actual behavior of viruses is very similar. Nevertheless, the information pattern of virus programs is different, so each time a virus is found, a virus signature file must be installed.
Virus detection technology includes heuristic scanning in addition to pattern matching. In the heuristic scan, a pseudo code is executed to determine whether or not a behavior similar to a virus is performed based on emulation. However, not all executable file instructions can be emulated. Also, it takes a very long time to emulate a virus with a large program size and / or complicated encryption.

本発明では、コンピュータ上で、新規にプロセスを生成するか、または実行中のプロセスにアタッチ(Attach)して、プロセスを監視対象とし、コンピュータに重要な変更を加えることができるシステムコールなどの呼び出しを監視することで、振る舞いを監視する。そして、監視対象であるプロセスの振る舞いと、過去のコンピュータウィルスの特徴的な振る舞いと、を比較する。ウィルスの特徴的な振る舞いが検出されると、監視対象であるプロセスを中止できるように、ユーザに通知などをする。ここで、監視対象プロセスは、主に、インターネットに接続するプロセスを指す。
図1は、コンピュータでのプロセスの実行を概念的に説明する図である。上位の層にアプリケーション101、102、電子メールソフトウェア103、WEBブラウザ104が動作する。このうち、アプリケーション102、電子メールソフトウェア103、WEBブラウザ104が、インターネットに接続などして、コンピュータの外部からプログラムを導入するプログラムを実行するプロセスであるとする。本発明では、それらのプロセスと、システムコールAPI層105と、の間に、本発明によるセキュリティ層を設ける。このセキュリティ層は、システムコールの呼び出しを監視する層である。
システムコールAPI層105の下には、オペレーティングシステム(以下では、「OS」と略記する場合がある。)を実現するカーネル層106があり、その下層に、デバイスドライバ/ハードウェア107の層がある。
通常のコンピュータにおけるOSにおいては、カーネルモードと、ユーザモードと、に分かれて処理が行なわれる。システムコールAPI層105より上の部分108は、ユーザモードで処理が行なわれる部分であり、システムコールAPI層105より下の部分109は、カーネルモードで処理が行なわれる部分である。
ユーザモードで実行するプロセスは、個別のコンテキストと、仮想アドレス空間を持っている。そのため、同じユーザモードで実行するプロセス同士が、他のプロセスのメモリをアクセスできないようになっている。
本発明は、アプリケーションプログラムの実行に際して設定するべきブレークポイントの位置と、そのアプリケーションプログラムの実行がそのブレークポイントに到達したときに、そのアプリケーションプログラムのスタックの内容に基づいて、そのアプリケーションプログラムがコンピュータウィルス性を有するかどうかを判断する判断プログラムとを関連付けて保持し、アプリケーションプログラムにブレークポイントを設定し、アプリケーションプログラムの実行がブレークポイントに到達した時には、そのブレークポイントの位置と関連付けて保持された判断プログラムを実行するコンピュータウィルス検出装置を提供する。
また、コンピュータウィルス検出装置は、アプリケーションプログラムを保持し、保持されたアプリケーションプログラムを実行するときに、ブレークポイントをアプリケーションプログラムに設定するようになっていてもよい。
また、ブレークポイントの位置は、システムコールAPI関数に基づいて定められていてもよい。このようにすることにより、図1のセキュリティ層が実現される。
また、アプリケーションプログラムの実行が、ブレークポイントに到達したときには、システムコールAPI関数の引数を検査してもよい。
さらに、システムコールAPI関数が、システムリソースを変更するものである場合には、システムコールの実行の前に、コンピュータウィルス検出装置がシステムリソースの複製が生成されるようになっていてもよい。
また、コンピュータウィルス検出装置は、アプリケーションプログラムがコンピュータウィルス性を有すると判断された際には、システムコールAPI関数の実行を阻止するようになっていてもよい。
また、システムコールAPI関数が通信を行なうものである場合には、コンピュータウィルス検出装置は、その通信を失敗させるよう外部の通信機器(例えば、ルータ)に命令を出力するようになっていてもよい。
また、アプリケーションプログラムがコンピュータウィルス性を有するかどうかは、アプリケーションプログラムが到達したブレークポイントの履歴に基づいて判断されるようになっていてもよい。
また、本発明において、アプリケーションプログラムは、Java(登録商標)などの言語で記述されたプログラムを実行するためのバーチャルマシンであってもよい。また、そのバーチャルマシンは、携帯電話で動作するものであってもよい。
WINDOWS(登録商標)を含めたOSにおいては、プロセスの振る舞いをコントロールする方法として、カーネルドライバを書き、システムコールをフックする方法がある(例えば、コンピュータアソシエイツ社のeTrust Access Control “Soft hook”で用いられている方法)。一方、本発明によるプロセスの振る舞いの監視は、デバッガというソフトウェア開発で使われる機能を使用して行なわれる。
本発明における振る舞いの監視は、全てユーザモード、つまりアプリケーション層で行なわれるという特徴を有する。これにより、カーネルドライバを用いる場合にしばしば引き起こされるシステムダウンなどの致命的なエラーの発生が無い。
以下では、本発明の理解を助けるために、従来におけるデバッガの機能について概説を行なう。
図2は、アプリケーションプログラムを実行するプロセス201と、デバッガ202と、の関係を例示する。(1)まず、デバッガ202が、プロセス201にアタッチする。アタッチにより、プロセス201とデバッガ202との関係がOSにより管理されるようになる。すなわち、OSは、デバッガ202にプロセス201を関連付け、例えば、プロセス201の状態に変化が発生すると、デバッガ202に通知が行なわれるようになる。(2)次に、デバッガ202は、プロセス201にブレークポイントを設定する。「ブレークポイント」は、プロセス201のプログラムカウンタが所定の値になった場合に、CPUの実行を停止させるメモリアドレスを示す。そのようなメモリアドレスを指定することを、ブレークポイントの設定という。ブレークポイントの設定を行なう方法としては、ブレークポイントが示すメモリアドレス値をCPUに設定したり、ブレークポイントのプログラムカウンタ値が示すメモリアドレスの命令を特殊な命令に置換したりすることにより実現される(例えば、Jonathan B.Rosenberg著、″How Debuggers Work、Algorithms,Data Structures, and Architecture″、Wiley Computer Publishing、1997年参照。)。その後、プロセス201が実行を開始し、ブレークポイントに到達すると、(2)実行が停止したことがOSに通知される。この通知は、プロセス201が行なうというよりも、プロセスの実行がブレークポイントに到達することによりCPUに割り込みが発生し、その割り込みを処理するための処理ルーチンにより行なわれる。なお、処理ルーチンは、OSの初期化などにより適宜設定されている。OSが通知を受けると、(4)デバッガ202に通知が行き、デバッガ202はプロセス201の実行がブレークポイントに到達したことを知る。その後、デバッガ202の利用者の操作により、(5)プロセス201のデバッグの操作が行なわれる。デバッグ操作の代表的なものとしては、プロセスのスタックの内容を読み、関数や手続きが呼ばれたシーケンスを調べたり、引数や変数の値などを調べたりする。
なお、ブレークポイントはプロセスごとに設定されるものである。したがって、「アプリケーションプログラムを実行するプロセスにブレークポイントを設定する」という記述が正確であるが、記述が長くなるので、以降では、アプリケーションプログラムと、アプリケーションプログラムを実行するプロセスと、を同一視して、「アプリケーションプログラムにブレークポイントを設定する」などと記述する場合がある。
図3は、従来技術において、高級言語での関数や手続きの呼び出しがどのようにコンパイルされるかを例示する。高級言語において、符号301に示すような「f(引数1,引数2,…,引数n);」という関数ないし手続き(以後、「関数」と省略する。)の呼び出しが記述されているとする。これをコンパイルすると、符号302に示すようなマシンインストラクションに変換される。すなわち、push命令により引数をスタックに積み、最後に、「call f」により、fを呼び出す。多くのCPUでは、call fのような、関数を呼び出すマシンインストラクションの実行により、呼び出された関数の処理から戻る際にプログラムカウンタへ設定される値がスタックに積まれる。
図4は、関数fのコンパイル結果を例示する。fの呼び出しが行なわれると、まず、「push fp」というマシンインストラクションにより、fの呼び出しの前のフレームポインタ(fp)の値がスタックに積まれる。「フレームポインタ」は、関数呼び出しのためのスタックの部分を示すためのCPUのレジスタである。フレームポインタは、後述するように、関数の呼び出し列(コールシーケンス)を得るために重要な役割をする。次に、「move sp→fp」によりスタックポインタ(sp)の値をフレームポインタ(fp)にセットする。これにより、現在呼び出されているfのスタックの部分をフレームポインタ(fp)が指すようになる。その後、fの処理が行なわれる。fの呼び出しから復帰する際には、「pop fp」により、fの呼び出しの前のフレームポインタ(fp)の値が設定され、「ret」により、fの呼び出しから復帰する。例えば、スタックに積まれているプログラムカウンタの値が、プログラムカウンタに設定される。
図5は、スタックに値が積まれた状態を例示する。スタック501の一番上の部分に積まれている値(すなわち、スタックの一番上の部分に格納されている値)が、現在実行中の関数に係るものであり、エリア501の部分には、引数の値が積まれている。エリア503には、関数呼び出し後のプログラムカウンタが積まれている。エリア504には、関数呼び出し前のフレームポインタ(fp)の値が積まれている。エリア505には、関数の中で定義されている自動変数の値などが格納されている。フレームポインタ(fp)は、エリア504の上部を指しており、エリア504に積まれている値は、前の関数呼び出しの時にスタック501に積まれたフレームポインタ(fp)が格納されている位置の上を指している。したがって、フレームポインタの値をたどることにより、どのような呼び出し列を経て、関数が呼び出されたかを知ることができる。また、スタックに積まれたプログラムカウンタの値を調べることにより、関数がプログラムのどの位置から呼ばれたかを知ることができる。また、スタックに積まれた引数を調べることにより、関数にどのような値が与えられたかを知ることができる。
本発明に係るコンピュータウィルス検出装置は、このようなデバッガの機能を利用することにより、プロセスの振る舞いを監視する。ただし、従来技術におけるデバッガにおいては、人間がデバッガを操作してデバッグ対象のプロセスを調査するのに対して、本発明に係るコンピュータウィルス検出装置によるプロセスの振る舞いの監視は、自動的に行なわれる。
また、本発明は、商用ソフトウェアにまつわる課題を解決するものである。以下、スパイウェアを例に用いて説明する。スパイウェアは、インターネット経由でその作成者または発信者に情報を送信するアプリケーションプログラムである。スパイウェアは、バックドア・ウィルスと似た振る舞いをする。悪質なスパイウェアは、ユーザ情報や、キーストロークを盗み、特定の通信チャネルを通して、他のマシンへ情報を送信する。
しかし、アンチウィルス企業の多くは、そのポリシーとしてスパイウェアなどの商用ソフトウェアを検出しない。ハードディスクを破棄する際に使用するデータを消去する商用ソフトウェアがあり、それが友人から電子メールとして送られてくるかも知れないからである。ユーザの意図通りにデータを消去するプログラムは、アンチウィルスでは検出しない。
したがって、プログラムを実行した結果が、コンピュータや、ユーザのビジネスにインパクトを与えるものであっても、現在のアンチウィルス技術では、それらの脅威を完全に防ぐことは不可能である。
現在のウィルスは、わずかにLinux(登録商標)で活動するものがあるが、圧倒的にWINDOWS(登録商標)で活動する。その一つの原因として、WINDOWS(登録商標)を使うほとんどの人々は、アドミニストレータ権限をログオン・ユーザに加えていることが挙げられる。アドミニストレータ権限は、アプリケーションをインストールする際に必要だが、UNIX(登録商標)のようにシステム管理者のために一時的に、root(特権ユーザ)になる習慣がWINDOWS(登録商標)にはない。WINDOWS(登録商標)では、アドミニストレータのような特権ユーザのまま、メールで送られてきた不審なファイルがしばしば実行される。
アドミニストレータ権限は、システムの全ての資源にアクセスできる。つまりはシステムが稼動するために必要な重要なファイルを改ざんできる。こういった環境で、ウィルスを実行すると、コンピュータの重要なファイルが改ざんされ、さらにはインターネットを通して、世界中のコンピュータがウィルスに感染することがある。プログラムの実行環境は、ユーザのためにもっと適切に保護されるべきである。
In the present invention, a process such as a system call that can create a new process on a computer or attach to a running process (Attach) to monitor the process and make important changes to the computer By monitoring the behavior. Then, the behavior of the process to be monitored is compared with the characteristic behavior of past computer viruses. When the characteristic behavior of the virus is detected, the user is notified so that the process to be monitored can be stopped. Here, the monitoring target process mainly refers to a process connected to the Internet.
FIG. 1 is a diagram conceptually illustrating the execution of a process in a computer. Applications 101 and 102, e-mail software 103, and WEB browser 104 operate in the upper layer. Of these, it is assumed that the application 102, the e-mail software 103, and the WEB browser 104 are processes for executing a program for introducing a program from outside the computer by connecting to the Internet. In the present invention, a security layer according to the present invention is provided between these processes and the system call API layer 105. This security layer is a layer that monitors the invocation of system calls.
Below the system call API layer 105 is a kernel layer 106 that implements an operating system (hereinafter sometimes abbreviated as “OS”), and below that is a device driver / hardware 107 layer. .
In an OS in a normal computer, processing is performed separately in a kernel mode and a user mode. A portion 108 above the system call API layer 105 is a portion where processing is performed in the user mode, and a portion 109 below the system call API layer 105 is a portion where processing is performed in the kernel mode.
A process executing in user mode has a separate context and a virtual address space. Therefore, processes executed in the same user mode cannot access the memory of other processes.
The present invention is based on the position of a breakpoint to be set when executing an application program, and when the execution of the application program reaches the breakpoint, the application program is stored in a computer virus based on the contents of the stack of the application program. And a determination program that determines whether or not it has a function. When a breakpoint is set in the application program and the execution of the application program reaches the breakpoint, the determination is held in association with the position of the breakpoint. A computer virus detection apparatus for executing a program is provided.
The computer virus detection apparatus may hold an application program and set a breakpoint in the application program when the held application program is executed.
The position of the breakpoint may be determined based on the system call API function. By doing so, the security layer of FIG. 1 is realized.
Further, when the execution of the application program reaches a breakpoint, the argument of the system call API function may be checked.
Further, when the system call API function changes the system resource, the computer virus detection device may generate a copy of the system resource before executing the system call.
Further, the computer virus detection device may be configured to prevent the execution of the system call API function when it is determined that the application program has a computer virus property.
Further, when the system call API function performs communication, the computer virus detection apparatus may output a command to an external communication device (for example, a router) so as to cause the communication to fail. .
Further, whether or not the application program has a computer virus property may be determined based on a history of breakpoints reached by the application program.
In the present invention, the application program may be a virtual machine for executing a program written in a language such as Java (registered trademark). Further, the virtual machine may operate on a mobile phone.
In an OS including WINDOWS (registered trademark), as a method of controlling the behavior of a process, there is a method of writing a kernel driver and hooking a system call (for example, used in eTrust Access Control “Soft hook” of Computer Associates, Inc.). Method). On the other hand, the monitoring of the behavior of the process according to the present invention is performed by using a function used in software development called a debugger.
The behavior monitoring in the present invention is characterized in that it is all performed in the user mode, that is, the application layer. As a result, there is no occurrence of a fatal error such as a system down often caused when a kernel driver is used.
In the following, in order to help understanding of the present invention, the function of a conventional debugger will be outlined.
FIG. 2 illustrates the relationship between the process 201 for executing the application program and the debugger 202. (1) First, the debugger 202 attaches to the process 201. By the attachment, the relationship between the process 201 and the debugger 202 is managed by the OS. That is, the OS associates the process 201 with the debugger 202. For example, when a change occurs in the state of the process 201, the debugger 202 is notified. (2) Next, the debugger 202 sets a breakpoint in the process 201. “Breakpoint” indicates a memory address at which execution of the CPU is stopped when the program counter of the process 201 reaches a predetermined value. Designating such a memory address is called setting a breakpoint. A method for setting a breakpoint is realized by setting the memory address value indicated by the breakpoint in the CPU or by replacing the instruction at the memory address indicated by the program counter value of the breakpoint with a special instruction. (See, for example, Jonathan B. Rosenberg, "How Debuggers Work, Algorithms, Data Structures, and Architecture", Wiley Computer Publishing, 1997). Thereafter, when the process 201 starts execution and reaches a breakpoint, (2) the OS is notified that execution has stopped. This notification is performed not by the process 201 but by a processing routine for processing the interrupt when the execution of the process reaches a breakpoint and the CPU is interrupted. Note that the processing routine is appropriately set by initializing the OS or the like. When the OS receives the notification, (4) the debugger 202 is notified, and the debugger 202 knows that the execution of the process 201 has reached a breakpoint. Thereafter, (5) debug operation of the process 201 is performed by the operation of the user of the debugger 202. As a typical debugging operation, the contents of the process stack are read, the sequence in which functions and procedures are called, and the values of arguments and variables are examined.
Breakpoints are set for each process. Therefore, the description “set a breakpoint in the process that executes the application program” is accurate, but the description becomes longer. Therefore, in the following, the application program and the process that executes the application program are regarded as the same. , “Set breakpoint in application program”, etc.
FIG. 3 illustrates how function and procedure calls in high-level languages are compiled in the prior art. In a high-level language, it is assumed that a function or procedure called “f (argument 1, argument 2,..., Argument n); . When this is compiled, it is converted into a machine instruction as indicated by reference numeral 302. That is, the argument is loaded on the stack by the push instruction, and finally f is called by “call f”. In many CPUs, when a machine instruction that calls a function such as call f is executed, a value set in the program counter is loaded on the stack when returning from the processing of the called function.
FIG. 4 illustrates the compilation result of the function f. When f is called, first, the value of the frame pointer (fp) before the call of f is put on the stack by a machine instruction “push fp”. The “frame pointer” is a CPU register for indicating a portion of the stack for function calls. As will be described later, the frame pointer plays an important role in obtaining a function call sequence (call sequence). Next, the value of the stack pointer (sp) is set to the frame pointer (fp) by “move sp → fp”. As a result, the frame pointer (fp) points to the stack portion of f currently being called. Thereafter, the process f is performed. When returning from the call to f, the value of the frame pointer (fp) before the call to f is set by “pop fp”, and the process returns from the call to f by “ret”. For example, the value of the program counter stacked on the stack is set in the program counter.
FIG. 5 illustrates a state in which values are stacked on the stack. The value stacked in the top part of the stack 501 (that is, the value stored in the top part of the stack) relates to the function currently being executed. , The argument values are stacked. In area 503, a program counter after the function call is stacked. The area 504 is loaded with the value of the frame pointer (fp) before the function call. An area 505 stores the values of automatic variables defined in the function. The frame pointer (fp) points to the upper part of the area 504, and the value accumulated in the area 504 is the position where the frame pointer (fp) accumulated in the stack 501 at the previous function call is stored. Pointing up. Therefore, by following the value of the frame pointer, it is possible to know through which call sequence the function is called. Further, by checking the value of the program counter loaded on the stack, it is possible to know from where in the program the function is called. In addition, it is possible to know what value is given to the function by examining the arguments stacked on the stack.
The computer virus detection apparatus according to the present invention monitors the behavior of a process by using such a debugger function. However, in the debugger in the prior art, a human operates the debugger to investigate the process to be debugged, whereas the process behavior monitoring by the computer virus detection apparatus according to the present invention is automatically performed.
The present invention also solves the problems associated with commercial software. Hereinafter, description will be made using spyware as an example. Spyware is an application program that sends information to its creator or caller over the Internet. Spyware behaves like a backdoor virus. Malicious spyware steals user information and keystrokes and sends information to other machines through a specific communication channel.
However, many anti-virus companies do not detect commercial software such as spyware as their policy. This is because there is commercial software that erases the data used to destroy the hard disk, which may be sent as an email from a friend. Anti-virus does not detect programs that erase data as intended by the user.
Therefore, even if the result of executing the program has an impact on a computer or a user's business, it is impossible to completely prevent these threats with the current anti-virus technology.
Some of the current viruses are active on Linux (registered trademark), but they are predominantly active on WINDOWS (registered trademark). One reason for this is that most people using WINDOWS® have added administrator rights to the logged-on user. Administrator authority is necessary when installing an application, but WINDOWS (registered trademark) does not have the custom of temporarily becoming a root (privileged user) for a system administrator like UNIX (registered trademark). In WINDOWS (registered trademark), a suspicious file sent by e-mail is often executed as a privileged user such as an administrator.
Administrator privileges have access to all resources of the system. In other words, you can tamper with important files necessary for the system to work. If a virus is executed in such an environment, important files on the computer may be altered, and computers around the world may be infected with the virus through the Internet. The execution environment of the program should be better protected for the user.

図1は、従来技術における、コンピュータでのプロセスの実行を概念的に説明する図である。
図2は、従来技術における、アプリケーションプログラムを実行するプロセスと、デバッガと、の関係を例示する。
図3は、従来技術において、高級言語での関数や手続きの呼び出しがどのようにコンパイルされるかを例示する。
図4は、従来技術における関数のコンパイル結果を例示する。
図5は、従来技術において、スタックに値が積まれた状態を例示する。
図6は、従来技術において、仮想プロセス空間にDLLファイルがマッピングされた状態を例示する。
図7は、従来技術におけるプロセスの仮想メモリ空間を示す。
図8は、本発明における処理のフローチャートを例示する。
図9は、本発明の実施形態1に係るコンピュータウィルス検出装置の機能ブロック図を例示する。
図10は、ブレークポイント情報が保持されている状態の一例を示す。
図11は、アプリケーションプログラムごとにブレークポイント情報が提供されている様子を例示する。
図12は、コンピュータウィルス検出装置の処理のフローチャートを例示する。
図13は、本発明の実施形態2に係るコンピュータウィルス検出装置による表示画面を例示する。
図14は、本発明の実施形態2に係るコンピュータウィルス検出装置の機能ブロック図を例示する。
図15は、コンピュータウィルス検出装置の処理のフローチャートを例示する。
図16は、本発明の実施形態3におけるブレークポイント情報を例示する。
図17は、コンピュータウィルス検出装置の処理のフローチャートを例示する。
図18は、本発明の実施形態7に係るコンピュータウィルス検出装置の機能ブロック図を例示する。
図19は、コンピュータウィルス検出装置の処理のフローチャートを例示する。
図20は、本発明の実施形態8の概要を例示する。
図21は、本発明の実施形態8に係るコンピュータウィルス検出装置の機能ブロック図を例示する。
図22は、通信阻止命令の一例を示す。
図23は、コンピュータウィルス検出装置の処理のフローチャートを例示する。
図24は、本発明の実施形態8に係る通信機器の機能ブロック図を例示する。
図25は、通信機器の処理のフローチャートである。
図26は、本発明の実施形態9に係るコンピュータウィルス検出装置の機能ブロック図を例示する。
図27は、コンピュータウィルス検出装置の処理のフローチャートを例示する。
図28は、本発明の実施形態10に係るコンピュータウィルス検出装置の使用の形態を例示する。
図29は、本発明の実施形態11に係るコンピュータウィルス検出装置の使用の形態を例示する。
FIG. 1 is a diagram conceptually illustrating execution of a process on a computer in the prior art.
FIG. 2 illustrates the relationship between a process for executing an application program and a debugger in the prior art.
FIG. 3 illustrates how function and procedure calls in high-level languages are compiled in the prior art.
FIG. 4 illustrates the result of function compilation in the prior art.
FIG. 5 illustrates a state in which values are stacked on the stack in the prior art.
FIG. 6 illustrates a state in which a DLL file is mapped in the virtual process space in the prior art.
FIG. 7 shows a virtual memory space of a process in the prior art.
FIG. 8 illustrates a flowchart of processing in the present invention.
FIG. 9 illustrates a functional block diagram of the computer virus detection apparatus according to the first embodiment of the present invention.
FIG. 10 shows an example of a state in which breakpoint information is held.
FIG. 11 illustrates a state in which breakpoint information is provided for each application program.
FIG. 12 illustrates a flowchart of processing of the computer virus detection apparatus.
FIG. 13 illustrates a display screen by the computer virus detection apparatus according to the second embodiment of the present invention.
FIG. 14 illustrates a functional block diagram of a computer virus detection apparatus according to the second embodiment of the present invention.
FIG. 15 illustrates a flowchart of processing of the computer virus detection apparatus.
FIG. 16 illustrates breakpoint information according to the third embodiment of the present invention.
FIG. 17 illustrates a flowchart of processing of the computer virus detection apparatus.
FIG. 18 illustrates a functional block diagram of a computer virus detection device according to the seventh embodiment of the present invention.
FIG. 19 illustrates a flowchart of processing of the computer virus detection apparatus.
FIG. 20 illustrates an overview of the eighth embodiment of the present invention.
FIG. 21 illustrates a functional block diagram of a computer virus detection device according to the eighth embodiment of the present invention.
FIG. 22 shows an example of a communication blocking command.
FIG. 23 illustrates a flowchart of processing of the computer virus detection apparatus.
FIG. 24 illustrates a functional block diagram of a communication device according to the eighth embodiment of the present invention.
FIG. 25 is a flowchart of processing of the communication device.
FIG. 26 illustrates a functional block diagram of a computer virus detection device according to the ninth embodiment of the present invention.
FIG. 27 illustrates a flowchart of processing of the computer virus detection apparatus.
FIG. 28 illustrates a usage pattern of the computer virus detection device according to the tenth embodiment of the present invention.
FIG. 29 illustrates a usage pattern of the computer virus detection device according to the eleventh embodiment of the present invention.

以下、本発明を実施するための最良の形態について、図を用いて実施形態として説明する。なお、本発明は、これら実施形態に何ら限定されるものではなく、その要旨を逸脱しない範囲において、種々なる態様で実施し得る。
(本発明の概要)
本発明は、プログラムの振る舞いに着目し、プログラムがウィルスかどうかを判断する。本発明を具現化したプロセスと、監視対象のプロセスは、デバッガ(Debugger)と、デバッギ(Debuggee)の関係に類似した関係を持つ。デバッガは、本発明を具現化したプロセスに対応し、デバッギは、監視対象のプロセスに対応する。
デバッグされるプロセスをデバッギという。本発明は、監視対象プロセスをデバッギとして実行する。実行中のプロセスを監視する場合には、実行中のプロセスにアタッチする。
本発明を具現化するプロセスは、監視対象プロセスの振る舞いをチェックするため、システムに重要な変更を加えるシステムコール(またはAPI関数)にブレークポイント(Breakpoints)を設定する。
ブレークポイントは、Intel(登録商標)CPUの場合には、Int3のハードウェア割り込みインストラクションを、ブレークポイントが示すメモリアドレスに配置することにより実現できる。プロセスの実行がブレークポイントに到達すると、そのプロセスの実行は停止し、本発明に係るコンピュータウィルス検出装置が、そのプロセスのスタックの内容などを調査して、監視対象のプロセスの振る舞いと、過去のコンピュータウィルスの特徴的な振る舞いを比較する。
ウィルスの特徴的な振る舞いとしては、以下のものを挙げることができる。
・自分自身をシステムフォルダにコピーする。
・ネットワークで共有されたディレクトリを探す。そして、自分自身をコピーする。
・メールのアドレス帳にアクセスし、ウィルスを添付したメールを大量に送信する。
・ファイル交換ソフトウェアがインストールされていれば、それを使って自分自身をばらまく。
・重要なシステムファイルを消す。または改ざんする。
・再起動しても、自分自身が実行されるように、システムを変更する。
本発明は、監視対象プロセスのAPI呼び出しを過去のコンピュータウィルスの振る舞いなどと比較し、監視対象プロセスの停止や、ユーザへの警告を発する。
以下、WINDOWS(登録商標)を例に具体的に述べる。WINDOWS(登録商標)では、ファイルやディレクトリを操作するAPIは、KERNEL32.DLLというファイルに含まれている。レジストリに関連するAPIは、ADVAPI32.DLLに含まれている。ネットワークの共有ドライブを操作するAPIは、MPR.DLLに含まれている。以下、これらをDLLファイルと呼ぶ。
監視対象のプロセスがどのAPIを呼び出そうとしているか判断する方法を以下に述べる。監視対象プロセスが実行を開始するときに、DLLファイルは、仮想プロセス空間にマッピングされる。
図6は、仮想プロセス空間601に、Kernel32.Dll、MRP.Dll、Advapi32.Dllがマッピングされた状態を例示する。このようにマッピングが行なわれることにより、監視対象プロセスは、例えば、Advapi32.Dllで定義されているRegCreateKeyExなどの関数を呼び出すことができる。
図7は、プロセスの仮想メモリ空間を示す。仮想メモリ空間700は、メモリアドレスの小さい方から、インストラクションの部分701、ヒープの部分702、DLLファイルがマッピングされる部分703、スタックの部分704を有する。部分703は、ヒープの部分702とスタックの部分704との間に位置し、DLLファイルがマッピングされる。すなわち、部分703のメモリアドレスに対して参照を行なうと、ファイルとして格納されているDLLファイルの内容が得られる。
DLLファイルのマップアドレス(DLLファイルが仮想メモリ空間へマッピングされた部分の最初のアドレス)は、イメージベースと呼ばれ、各DLLでユニークに、他と重複しないよう決められている。
例えば、レジストリを操作するRegOpenKeyExAというAPIは、ADVAPI32.DLLに含まれている。
RegOpenKeyExAのアドレスを、「ADVAPI32.DLLのイメージベース」+「RegOpenKeyExAのRVA」により求める。なお、「RVA」とは、Relative Virtual Addressの略である。すなわち、DLLファイルの中に、APIの定義が現れる相対的な位置である。
アドレスが求められたら、デバッガ用APIなどを使用してブレークポイントを設定する。
監視対象プロセスの実行が、ブレークポイントにヒットしたら、APIの引数などを解析する。
監視対象プロセスが、レジストリやシステムファイルに変更を加えるAPIを呼び出した場合、このステップで、バックアップを作成する。
ウィルスの特徴を検出したらプロセスの停止、またはユーザにレポートする。検出しなければ処理を続ける。
具体例を説明する。多くのWINDOWS(登録商標)ウィルスは実行すると再起動時に、システムに常駐するために、以下のレジストリへ値を追加する。
HKEY_LOCAL_ACHINE¥SOFTWARE¥MICROSOFT¥Windows¥CurrentVersion¥Run
参考として、このキーに値を追加するメジャーなウィルスを以下に挙げる。
NIMDA,LOVELATTER,TROJ_MATRIX,W32_MAGISTR,TROJ_HYBRIS,WORM_KLEZ,WORM_BUGBEAR,WORM_BADTRANS,JS_EXCEPTION,WORM_LIRBA
メールで受け取った不明なプログラムがシステムに常駐する必要はないと考えられる。
上記レジストリを追加するには、次の2ステップのAPI呼び出しが必要である。
RegCreateKeyExA … Runの下に新しいキーを作る。
RegSetValueExA … 値をセットする。
上の2つのAPIは、ADVAPI32.DLLに含まれている。ここでは、ADVAPI32.DLLのイメージベースが0x77D80000であるとする。数字の0xは、16進数であることを示す。また、RegCreateKeyExAのRVAが0x29427、RegSetValueExAのRVAが0x2C58Dであるとする。
RegCreateKeyExAのアドレスは、
0x77D80000+0x29427=0x77DA9427
RegSetValueExAのアドレスは、
0x77D80000+0x2C58D=0x77DAC58D
で求められる。これらは仮想アドレス空間であるから同時に複数のプロセスが実行されていても、同じ仮想アドレスでDLLファイルがマップされる。
アドレスを求めたら、それらへブレークポイントを設定する。
もし、監視対象のプロセスが、WINDOWS(登録商標)起動時に自動実行するプログラムであれば、RegCreateKeyExAのブレークポイントがヒットする。次にスタックを解析する。C言語などのコンパイラでは、スタックを介して引数が受け渡されるようなマシンインストラクションが生成されるためである。
80000002 0041f028 ADVAPI32!RegCreateKeyExA
例えば、上記の数値が得られたとする。RegCreateKeyExAを呼ぶ際には、2番目の引数はレジストリの位置である。この例では、メモリアドレス41f028へレジストリの位置が入っている。そこで、メモリアドレス41f028をチェックする。
>41f028
41f028 SOFTWARE¥Microso
41f038 ft¥Windows¥Curre
41f048 ntVersion¥Run¥Vi
41f058 rus
APIと引数から、監視プロセスは、Runの下にVirusというキーを作ろうとしていることが分かる。
プログラム実行前の状態に復帰する場合には、Virusキーを削除すればよい。そこで、システムコールの実行の前にレジストリなどのシステムリソースの変更の履歴や、システムリソースの複製、などを保持するようにしてもよい。
同様に、プログラムの振る舞いを把握するために必要なAPIをチェックし、その呼び出しの傾向を解析する。
呼び出しを監視するAPIと、引数の対応(以下これを検出ルールと呼ぶ)は、ハードコーディングではなく、検出ルールを記したファイルを外部、例えばインターネットから読み込むことで追加、変更できることが望ましい。
この方法では、ファイルをスキャンするオーバーヘッドは、一切無い。ウィルスの特徴的な振る舞いを検出したら、監視対象のプロセスをユーザの意思により、中止させられるように、ダイアログボックス等を表示するのが好適である。
または、プログラムを中止せずに、続けて実行する。フローチャートを図8に例示する。
(実施形態1)
本発明の実施形態1として、ブレークポイント位置情報と、アプリケーションプログラムがそのブレークポイント位置情報で示すブレークポイントに到達した場合に実行する判断プログラムと、を関連付けて保持し、ブレークポイントをアプリケーションプログラムに設定して、判断プログラムを実行するコンピュータウィルス検出装置について説明する。
(実施形態1:構成)
図9は、本実施形態に係るコンピュータウィルス検出装置の機能ブロック図を例示する。コンピュータウィルス検出装置900は、ブレークポイント情報保持部901と、ブレークポイント設定部902と、判断プログラム実行部903と、を有する。
なお、以下の説明から明らかになるように、これらの部を有するコンピュータウィルス検出装置は、コンピュータで動作するプログラムとして実現が可能である。したがって、図9は、そのようなプログラムのモジュール構成を示す図であると解釈することもできる。すなわち、そのようなプログラムは、ブレークポイント情報保持部をプログラムにより実現するプレークポイント情報保持ステップと、ブレークポイント設定部をプログラムにより実現するブレークポイント設定ステップと、判断プログラム実行部をプログラムにより実現する判断プログラム実行ステップと、をコンピュータに実行させるためのプログラムである。
「ブレークポイント情報保持部」901は、ブレークポイント情報を保持する。例えば、ハードディスクや半導体メモリなどに、ブレークポイント情報を保持する。「ブレークポイント情報」とは、ブレークポイント位置情報と、判断プログラムと、を含む情報である。「含む」とあるので、ブレークポイント情報の成分は、ブレークポイント位置情報と判断プログラムとに限られない場合がある。
「ブレークポイント位置情報」とは、アプリケーションプログラムの実行に際して設定するべきブレークポイントの位置を示す情報である。ブレークポイントの位置は、例えば、アプリケーションプログラムのメモリアドレスによって示される。また、アプリケーションプログラムが呼び出す関数、手続き、メソッド(以下、「関数など」という。)の名前によっても示される場合がある。
「判断プログラム」とは、そのアプリケーションプログラムの実行が前記ブレークポイントに到達したときに、そのアプリケーションプログラムの実行で参照されるスタックの内容に基づいて、そのアプリケーションプログラムがコンピュータウィルス性を有するかどうかの判断を行なうためのプログラムである。「そのアプリケーションプログラム」とは、後で説明されるブレークポイント設定部902によりブレークポイント位置情報で示される位置にブレークポイントが設定されるアプリケーションプログラムを意味する。「前記ブレークポイント」とは、ブレークポイント位置情報が示す位置に設定されたブレークポイントを意味する。
「アプリケーションプログラムがコンピュータウィルス性を有する」場合とは、アプリケーションプログラム自身がコンピュータウィルスである場合のみならず、アプリケーションプログラムがコンピュータウィルスに感染した場合、アプリケーションプログラムのバグやセキュリティホールなどが利用されて設計時には想定されていなかった動作をする場合、などを含む。例えば、ウェブサーバプログラムのバグを利用して、悪意を持った人間が、通常の操作では得ることができないファイルの内容を得るなどの動作をする場合である。
そのアプリケーションプログラムの実行で参照されるスタックの内容に基づいて、そのアプリケーションプログラムがコンピュータウィルス性を有するかどうかの判断を行なう方法としては、種々のものがある。例えば、そのアプリケーションプログラムの実行で参照されるスタックを、スタックの上部からフレームポインタをたどってスタックの下部までたどることができるかどうかを判断する。コンピュータウィルスの中には、スタックの内容を破壊することにより、アプリケーションプログラムが正常に動作するならば呼び出さない態様でシステムコールなどを呼び出す。そこで、スタックの内容が破壊されていないかどうかを判断する。その判断の一つとして、フレームポインタをたどり、プログラムの実行において最初に呼ばれる関数など(例えば、_startupという名前の関数など)の呼び出しまでたどることができるかどうかにより、アプリケーションプログラムがコンピュータウィルス性を有するかどうかの判断を行なう。
また、アプリケーションプログラムが、ブレークポイントに到達した際、どのような関数などの呼び出し系列を経て到達したかを調べることで、コンピュータウィルス性を有するかどうかの判断を行なってもよい。もし、想定されない関数などの呼び出しの系列の後にブレークポイントに到達している場合には、コンピュータウィルス性を有することが疑われる。
また、ブレークポイントが設定された関数などの引数を調べることにより、アプリケーションプログラムがコンピュータウィルス性を有するかどうかを判断してもよい。例えば、電子メールを用いて他のコンピュータに自らを感染させるコンピュータウィルスは、電子メールアドレスを取得するために電子メールアドレスのアドレス帳をアクセスする。そこで、アドレス帳へのアクセスを行なうための引数が指定されているかどうかに基づいて、判断を行なうようになっていてもよい。
なお、多くの場合、コンピュータウィルス検出装置を実現するプログラムを実行するプロセスと、アプリケーションプログラムを実行するプロセスとは、異なるプロセスであり、通常は、コンピュータウィルス検出装置を実現するプログラムが、アプリケーションプログラムを実行するプロセスのメモリ空間の内容、特にスタックの内容を読むことはできない。しかし、オペレーティングシステムは、特定の関係にあるプロセス間であれば、あるプロセスが他のプロセスのメモリ空間やレジスタの内容を読んだり、変更したりすることを許可する機能を有しているのが通常である。ここでいう「特定の関係」の例としては、親子関係や、同じユーザが実行しているプロセスであり、他のプロセスに対して所定のシステムコール(例えば、attachなど)を実行したという関係、などがある。したがって、コンピュータウィルス検出装置をプログラムにより実現する場合には、そのプログラムを実行するプロセスと、アプリケーションプログラムを実行するプロセスと、は特定の関係になっている必要がある。
なお、ほとんどのオペレーティングシステムでは、他のプロセスのメモリ空間やレジスタの内容を読んだり、変更したりするためのシステムコールが提供されている。あるいは、/dev/procというスペシャルデバイスを用いて、他のプロセスのメモリ空間やレジスタの内容を読んだり、変更したりすることができるようになっている場合もある。
判断プログラムは、例えば、インタープリタによって実行されるものであってもよい。例えば、判断プログラムがLisp、Perl、Rubyなどの言語により記述されていてもよい。また、判断プログラムは、コンピュータが直接実行できるマシンインストラクションの列からなっていてもよい。この場合には、コンピュータウィルス検出装置を実現するプログラムの一部として、判断プログラムが組み込まれていてもよい。あるいは、判断プログラムが、例えば、動的ライブラリなどとして、動的にコンピュータウィルス検出装置を実現するプログラムにロードされるようになっていてもよい。なお、判断プログラムが、インタープリタで実行されるものであったり、動的にロードされるものであったりする場合には、判断プログラムを差し替えることが容易に行なえる。
図10は、ブレークポイント情報がブレークポイント情報保持部901により保持されている状態の一例を示す。図10(a)においては、ブレークポイント情報がテーブルに保持されている。列1001には、ブレークポイント位置情報が格納され、列1002には、判断プログラムが格納される。図10(b)は、判断プログラムへのポインタがテーブルに格納されている状態の一例を示す。そのポインタは、コンピュータウィルス検出装置を実現するプログラムを実行するプロセスのメモリ空間内部における特定の場所を指す。
図11は、アプリケーションプログラムごとにブレークポイント情報が提供されている様子を例示する。ブレークポイント情報保持部901は、このように、アプリケーションプログラムごとにブレークポイント情報を保持していてもよい。
「ブレークポイント設定部」902は、アプリケーションプログラムに、ブレークポイント情報保持部901で保持されたブレークポイント情報に基づいて、ブレークポイント情報を設定する。すなわち、ブレークポイント情報に含まれるブレークポイント位置情報が示す位置にブレークポイントを設定する。この設定は、オペレーティングシステムが提供するシステムコールやスペシャルデバイスを用いて行なう。「基づいて」とは、例えば、ブレークポイント位置情報が関数などの名前を用いて表現されている場合には、関数などの名前から、その関数などのアドレスを得ることを意味する。関数などの名前と、そのアドレスと、の対応付けは、アプリケーションプログラムのシンボルテーブルを読むことなどによって得ることができる。
「判断プログラム実行部」903は、前記アプリケーションプログラムの実行が、ブレークポイント設定部902で設定されたブレークポイントに到達したとき、前記ブレークポイント情報に含まれる判断プログラムを実行する。「前記アプリケーションプログラム」とは、ブレークポイント設定部902によりブレークポイントが設定されたアプリケーションプログラムである。コンピュータウィルス検出装置は、ブレークポイントが設定されたアプリケーションプログラムの実行がブレークポイントに到達するまで待つことを行なう。このためには、例えば、waitシステムコールが呼び出される。アプリケーションプログラムの実行がブレークポイントに到達すると、(1)waitシステムコールからコンピュータウィルス検出装置の処理が再開し、(2)どのブレークポイントに到達したかを判断し、(3)判断プログラム実行部903に、判断プログラムを実行させる。アプリケーションプログラムがどのブレークポイントに到達したかを判断するには、アプリケーションプログラムを実行するプロセスのレジスタに保持されているプログラムカウンタの値を取得することにより判断する。
(実施形態1:処理)
図12は、コンピュータウィルス検出装置の処理のフローチャートを例示する。
ステップS1201において、ブレークポイント位置情報が示す位置に、ブレークポイントを、アプリケーションプログラムに設定する。例えば、この処理はブレークポイント設定部902により行なわれる。
ステップS1202において、アプリケーションプログラムの実行が、ブレークポイントに到達するまで待つ。この処理は、例えば、waitシステムコールを実行することにより、実現される。
ステップS1203において、アプリケーションプログラムの実行が到達したブレークポイントに対応する判断プログラムを実行する。例えば、この処理は判断プログラム実行部903により行なう。
ステップS1204において、処理を終了するかどうかを判断する。例えば、ステップS1203における判断プログラムの実行により、アプリケーションプログラムがコンピュータウィルス性を有すると判断された場合には、処理を終了する。もし、処理を終了しないと判断された場合には、ステップS1205へ処理を移行する。
ステップS1205において、アプリケーションプログラムの実行を続ける。アプリケーションプログラムがブレークポイントに到達すると、アプリケーションプログラムの実行が停止するので、停止したところから処理を再開させる。例えば、アプリケーションプログラムを実行するプロセスにシグナル(例えば、SIG_CONT)を送る。その後、ステップS1202へ処理を移行する。
なお、コンピュータウィルス検出装置は、ブレークポイント情報保持ステップと、ブレークポイント設定ステップと、判断プログラム実行ステップと、を含むコンピュータウィルス検出方法を使用するための装置と考えることができる。「ブレークポイント情報保持ステップ」は、ブレークポイント情報を保持するステップであり、「ブレークポイント設定ステップ」は、アプリケーションプログラムに、ブレークポイント情報保持ステップで保持されたブレークポイント情報に基づいて、ブレークポイントを設定するステップであり、「判断プログラム実行ステップ」とは、アプリケーションプログラムの実行が、ブレークポイント設定ステップで設定されたブレークポイントに到達したとき、ブレークポイント情報に含まれる判断プログラムを実行するステップである。すなわち、ブレークポイント情報保持ステップは、ブレークポイント情報保持部を動作するステップであり、ブレークポイント設定ステップは、ブレークポイント設定部を動作するステップであり、判断プログラム実行ステップは判断プログラム実行部を実行するステップである。なお、本発明に係るコンピュータウィルス検出方法の使用は、本発明に係るコンピュータウィルス検出装置に限定されることはない。
(実施形態1:主な効果)
本実施形態により、オペレーティングシステムのカーネル内部に修正を加えることなく、アプリケーションプログラムを実行するプロセスの振る舞いを、コンピュータウィルス検出装置により監視することができるので、システムダウンの発生を回避することが可能となる。また、コンピュータウィルスの振る舞いは非常に似ている場合が多いので、従来のアンチウィルスソフトウェアにおいて必要であった、パターンファイルを最新のものに更新し続けることの必要性が低くなったり、パターンファイルの更新が不要となったりする。
(実施形態2)
本発明の実施形態2として、アプリケーションプログラムを保持するコンピュータウィルス検出装置を説明する。
図13は、本実施形態に係るコンピュータウィルス検出装置による表示画面を例示する。ウィンドウ1301は、本実施形態に係るコンピュータウィルス検出装置が表示するウィンドウである。そのウィンドウのサブウィンドウ1302に、アプリケーションプログラムのアイコンが表示されている。必要に応じて、ウィンドウ1301の外に表示されているアイコン(例えば、アイコン1304)をドラッグして、サブウィンドウ1302の内部に移動させることができる。サブウィンドウ1302の内部に表示されたアイコン(例えば、アイコン1303)をダブルクリックなどすることにより、アプリケーションプログラムを実行するプロセスが、コンピュータウィルス検出装置を実行するプロセスの子プロセスとして生成され、その振る舞いが監視される。
(実施形態2:構成)
図14は、本実施形態に係るコンピュータウィルス検出装置の機能ブロック図を例示する。コンピュータウィルス検出装置1400は、ブレークポイント情報保持部901と、ブレークポイント設定部902と、判断プログラム実行部903と、アプリケーションプログラム保持部1401と、プログラム実行開始部1402と、ブレークポイント設定命令部1403と、を有する。
したがって、本実施形態に係るコンピュータウィルス検出装置は、実施形態1に係るコンピュータウィルス検出装置が、さらに、アプリケーションプログラム保持部1401と、プログラム実行開始部1402と、ブレークポイント設定命令部1403と、を有する構成となっている。なお、本明細書においては、同じ定義が適用される部には、できるだけ同じ符号を割り当てることにする。なお、同じ符号が割り当てられていることは、実際の製造などにおいて、同一の構成などになることを意味するものではない。
「アプリケーションプログラム保持部」1401は、アプリケーションプログラムを保持する。保持には、種々の形態がある。例えば、アプリケーションプログラム全体を格納する形態がある。また、アプリケーションプログラムが格納されている場所、例えばファイルシステムにおけるパスなどで表現される、を格納する形態もあり得る。
「プログラム実行開始部」1402は、アプリケーションプログラム保持部1401で保持されたアプリケーションプログラムの実行を開始する。例えば、コンピュータウィルス検出装置を実現するプログラムを実行するプロセスの子プロセスとして、アプリケーションプログラムの実行を開始する。
「ブレークポイント設定命令部」1403は、プログラム実行開始部1402で実行が開始されるアプリケーションプログラムに対して、ブレークポイント設定部902に、ブレークポイントの設定を命令する。例えば、ブレークポイント設定部902を実現する関数などの呼び出しを行なう。
(実施形態2:処理)
図15は、本実施形態に係るコンピュータウィルス検出装置の処理のフローチャートを例示する。
ステップS1501において、アプリケーションプログラムを保持する。この処理は、アプリケーションプログラム保持部1401により行なわれる。例えば、図13において、アイコン1304をサブウィンドウ1302の内部にドラッグされたことを検出し、アイコン1304が表わすアプリケーションプログラムを保持する。
ステップS1502において、アプリケーションプログラムが選択されるまで待つ。例えば、図13において、サブウィンドウ1302の内部のアイコンがダブルクリックされるまで待つ。
ステップS1503において、ブレークポイント位置情報が示す位置に、ブレークポイントを、選択されたアプリケーションに設定することを命ずる。この処理は、ブレークポイント設定命令部1403により行なわれる。
ステップS1504において、ブレークポイントの設定の完了を待つ。例えば、ブレークポイント設定部902を実現する関数などの呼び出しから戻るまで待つ。
ステップS1505において、選択されたアプリケーションプログラムを実行する。より正確に述べると、選択されたアプリケーションプログラムを実行するためのプロセスを実行させる。ステップS1505の後は、図12のフローチャートのステップS1202、ステップS1203、ステップS1204、ステップS1205を実行することとなる。最近のオペレーティングシステムにおいては、一つのプロセスの中で複数のスレッドを並列/平行に動作させることが可能となっている。そこで、ステップS1202、ステップS1203、ステップS1204、ステップS1205の実行は、図15のフローチャートを実行するスレッドとは別のスレッドにより行なわれてもよい。
ステップS1506により、処理を終了するかどうかを判断する。例えば、コンピュータウィルス検出装置の操作者が、終了ボタンを押したかどうかにより判断する。もし、終了でなければ、ステップS1502へ戻る。
(実施形態2:主な効果)
本実施形態により、振る舞いを監視するべきアプリケーションプログラムを実行するプロセスを容易に生成することが可能となる。また、コンピュータウィルスを外部から導入する虞が無いアプリケーションプログラムは、監視の対象としないようにすることができるので、ブレークポイントの設定により、そのようなアプリケーションプログラムを実行するスピードを低下させることがない。
(実施形態3)
本発明の実施形態3として、システムコールAPI関数にブレークポイントを設定し、プロセスの振る舞いを監視するコンピュータウィルス検出装置について説明する。
(実施形態3:構成)
本実施形態に係るコンピュータウィルス検出装置は、実施形態1又は2のコンピュータウィルス検出装置のブレークポイント情報保持部901が保持するブレークポイント情報を、アプリケーションプログラムのシステムコールAPI関数に基づいて定められるようにしたものである。
「システムコールAPI関数」とは、システムコールを呼び出すためのライブラリ関数などを意味する。そのようなライブラリ関数などは、通常は、システムコールに対する引数をスタックに積み、トラップ命令を実行するようになっている。トラップ命令の実行により、オペレーティングシステムによりCPUに設定された割り込みルーチンが起動され、オペレーティングシステム内部の処理が開始される。スタックに引数を積み、トラップ命令を実行する処理を、直接に高級言語で表現することは困難であるので、そのような処理を行なうライブラリ関数などが用意されている。
図16は、本実施形態におけるブレークポイント情報を例示する。図16において、RegCreateKeyExAがシステムコールAPI関数の名前となっている。したがって、ブレークポイント設定部がブレークポイントを設定する場合には、システムコールAPI関数の名前をアドレスに変換する必要がある。その変換の処理については、概要の項で説明した通りである。
(実施形態3:主な効果)
コンピュータウィルスは、システムコールAPI関数を用いて、自身をコンピュータに感染させることが多いので、システムコールAPI関数の呼び出しを検出して、アプリケーションプログラムがコンピュータウィルス性を有するかどうかを判断することで、少ないブレークポイントの設定で的確に判断することが可能となる。
(実施形態4)
本発明の実施形態4として、システムコールAPI関数の引数の検査に基づいて、判断を行なうコンピュータウィルス検出装置について説明する。
(実施形態4:構成)
本実施形態に係るコンピュータウィルス検出装置は、実施形態3に係るコンピュータウィルス検出装置において、判断プログラムに、システムコール検査プログラムを含ませた構成となっている。「システムコール検査プログラム」とは、そのアプリケーションプログラムが呼び出すシステムコールAPI関数の引数の検査に基づいて、そのアプリケーションプログラムがコンピュータウィルス性を有するかどうかの判断をするためのプログラムである。「そのアプリケーションプログラム」とは、ブレークポイント設定部902によりプレークポイントが設定されたアプリケーションプログラムを意味する。
したがって、本実施形態においては、アプリケーションプログラムの実行がブレークポイントに到達すると、アプリケーションプログラムのシステムコールAPI関数の引数が検査されることになる。この検査の結果に基づいて、アプリケーションプログラムがコンピュータウィルス性を有するかどうかが判断される。
なお、本実施形態において、引数が検査されるシステムコールAPI関数は、ブレークポイントが設定されたものに限定はされない。例えば、アプリケーションプログラムのマシンインストラクションを全て調べて、全てのシステムコールAPI関数の引数が検査されるようになっていてもよい。また、到達したブレークポイントでのシステムコールAPI関数の引数を記憶しておき、後にブレークポイントに到達したときに、記憶されたシステムコールAPI関数に引数を検査するようになっていてもよい。
(実施形態4:主な効果)
本実施形態では、システムコールAPI関数の引数の検査に基づいて、コンピュータウィルス性が判断されるので、より的確に判断を行なうことが可能となる。
(実施形態5)
本発明の実施形態5として、到達したブレークポイントにおけるシステムコールAPI関数の引数を検査するコンピュータウィルス検出装置について説明する。
(実施形態5:構成)
本実施形態に係るコンピュータウィルス検出装置は、実施形態4に係るコンピュータウィルス検出装置において、システムコール検査プログラムによって検査される引数を、ブレークポイント情報保持部901が保持するブレークポイント位置情報で定められるシステムコールAPI関数の引数としたものである。
例えば、図16に例示されるように、RegCreateKeyExAというシステムコールAPI関数にブレークポイントが設定され、アプリケーションプログラムの実行がそのブレークポイントに到達した場合には、システムコール検査プログラムは、そのRegCreateKeyExAの引数を検査する。その検査の例は、本発明の概要の項で述べたとおりである。
(実施形態5:主な効果)
本実施形態により、呼び出されたシステムコールAPI関数の引数の検査に基づいてコンピュータウィルス性の判断がされるので、より的確に判断を行なえる。
(実施形態6)
本発明の実施形態6として、システムリソースを変更するシステムコールAPI関数が呼ばれた場合、変更されるシステムリソースの複製を生成するコンピュータウィルス検出装置について説明する。
(実施形態6:構成)
本実施形態に係るコンピュータウィルス検出装置は、実施形態4または5のコンピュータウィルス検出装置において、判断プログラムに、複製作成プログラムを含ませた構成となっている。「複製作成プログラム」は、そのアプリケーションプログラムのシステムコールAPI関数によりシステムリソースが変更される場合に、その変更されるシステムリソースの複製を生成する。「そのアプリケーションプログラム」とは、ブレークポイント設定部902によりブレークポイントの設定が行なわれたアプリケーションプログラムである。
したがって、本実施形態においては、ブレークポイント位置情報は、システムリソースを変更するシステムコールAPI関数の位置を示すこととなる。ここでいうシステムリソースとは、例えば、レジストリ、ファイルなど、コンピュータが使用するリソースのうち、複製が可能なリソースを意味する。
例えば、レジストリを変更するシステムコールAPI関数にブレークポイントを設定しておき、アプリケーションプログラムの実行が、そのブレークポイントに到達した場合には、レジストリの複製をする複製作成プログラムが実行される。複製が作成されると、システムコールによりレジストリの変更が行なわれる。レジストリの複製するにあったては、レジストリ全体を複製してもよいし、変更される部分だけを複製してもよい。レジストリの変更される部分は、システムコールAPI関数の引数により判断することができる。
なお、本実施形態において、複製作成プログラムの実行は、アプリケーションプログラムがコンピュータウィルス性を有すると判断される場合に行なうようにしてもよい。これにより、作成される複製の量を減らすことができる。
(実施形態6:処理)
図17は、本実施形態に係るコンピュータウィルス検出装置の処理のフローチャートを例示する。
ステップS1701において、ブレークポイント位置情報が示す位置に、ブレークポイントをアプリケーションプログラムに設定する。
ステップS1702において、アプリケーションプログラムの実行がブレークポイントに到達するまで待つ。
ステップS1703において、判断プログラムを実行する。
ステップS1704において、判断プログラムの実行の結果が、アプリケーションプログラムがコンピュータウィルス性を有するものであるかどうかを判定する。もし、コンピュータウィルス性を有するものであれば、ステップS1705へ処理を移行させ、そうでなければ、ステップS1707へ処理をスキップさせる。
ステップS1705において、アプリケーションプログラムがシステムリソースを変更しようとしているかどうかを判定する。この判定は、到達したブレークポイントに係るシステムコールAPI関数の種類、その引数を調べることにより行なうことができる。もし、システムリソースを変更しようとしている場合には、ステップS1706へ処理を移行させ、そうでなければ、ステップS1707へ処理をスキップさせる。
ステップS1706において、複製作成プログラムにより、システムリソースの複製を作成する。
ステップS1707において、全体の処理を終了するかどうかを判断する。もし、終了しないと判断されると、ステップS1708へ処理を移行させる。
ステップS1708において、アプリケーションプログラムの実行を続け、ステップS1702へ処理を移行させる。もし、アプリケーションプログラムがコンピュータウィルスであり、システムリソースが不正なものに変更されても、ステップS1706で作成された複製によりシステムを復元することができる。
(実施形態6:主な効果)
本実施形態においては、変更されるシステムリソースの複製が作成されるので、アプリケーションプログラムがコンピュータウィルスでありコンピュータが感染したとしても、システムリソースの複製を用いてシステムの復旧が可能となる。
(実施形態7)
本発明の実施形態7として、アプリケーションプログラムがコンピュータウィルス性を有すると判断された場合に、システムコールAPI関数の実行をさせないコンピュータウィルス検出装置について説明する。
(実施形態7:構成)
図18は、本実施形態に係るコンピュータウィルス検出装置の機能ブロック図を例示する。本実施形態に係るコンピュータウィルス検出装置の構成は、実施形態1から6のいずれかのコンピュータウィルス検出装置が、実行阻止部を有する構成となっている。したがって、例えば、コンピュータウィルス検出装置1800は、ブレークポイント情報保持部901と、ブレークポイント設定部902と、判断プログラム実行部903と、実行阻止部1801と、を有する。コンピュータウィルス検出装置1800は、このほかに、アプリケーションプログラム保持部、プログラム実行開始部、ブレークポイント設定命令部を有していてもよい。
「実行阻止部」1801は、判断プログラム実行部903による判断の結果、判断の対象となったアプリケーションプログラムがコンピュータウィルス性を有すると判断された場合に、アプリケーションプログラムのシステムコールAPI関数の実行をさせないための部である。
スタックの使用が図5に例示されたものである場合には、実行阻止部1801は、フレームポインタ(fp)の値を用いて、部分504に格納されている関数呼び出し前のフレームポインタの値を取得してフレームポインタ(fp)に設定し、プログラムカウンタの値を部分503に格納されている値にして、システムコールAPI関数の実行をさせないようにする。
(実施形態7:処理)
図19は、本実施形態に係るコンピュータウィルス検出装置の処理のフローチャートを例示する。
ステップS1901において、ブレークポイント位置情報が示す位置に、ブレークポイントを、アプリケーションプログラムに設定する。
ステップS1902において、アプリケーションプログラムの実行がブレークポイントに到達するまで待つ。
ステップS1903において、判断プログラムを実行する。
ステップS1904において、判断プログラムの結果、アプリケーションプログラムがコンピュータウィルス性を有するかどうかを判定する。もし、コンピュータウィルス性を有するのであれば、ステップS1905へ処理を移行させ、そうでなければ、ステップS1906へ処理をスキップさせる。
ステップS1905において、システムコールAPI関数の実行をさせないようにする。この処理において、実行阻止部1801を用いる。
ステップS1906において、全体の処理を終了させるかどうかを判断する。もし、終了させないのであれば、ステップS1907へ処理を移行させる。
ステップS1907において、アプリケーションプログラムの実行を続ける。その後、ステップS1902へ処理を移行させる。
(実施形態7:主な効果)
本実施形態においては、危険なシステムコールの実行が阻止されるので、例えば、特定のワードプロセッサのマクロプログラムがコンピュータウィルス性を有する場合に、ワードプロセッサの機能を停止させることなく、危険なマクロプログラムの実行を阻止することが可能となり、危険なシステムコールの実行を阻止しつつ、アプリケーションプログラムの実行を継続することができる。
(実施形態8)
本発明の実施形態8として、コンピュータウィルス性を有するアプリケーションプログラムの通信を阻止するコンピュータウィルス検出装置と、通信機器と、について説明する。
図20は、本実施形態の概要を例示する。コンピュータ2001が、通信機器2002を介して外部の通信網2003に接続されている。通信機器2002の代表的な例としては、ルータがある。コンピュータ2001の内部では、アプリケーションプログラムを実行するプロセス2004と、コンピュータウィルス検出装置を実現するプロセス2005が動作し、プロセス2005は、プロセス2004の振る舞いを監視している。もし、プロセス2004が実行するアプリケーションプログラムがコンピュータウィルス性を有し、外部に対して通信2006を行なおうとしたとする。この場合、プロセス2005は、プロセス2004が外部に対して有害な通信を行なうとしているとみなして、その有害な通信を阻止するために、通信機器2002に対して通信阻止命令2007を出力する。通信機器2002は、通信阻止命令2007に基づいて、プロセス2004が行なおうとする通信のパケットを中継しないなどして、通信を阻止する。
(実施形態8:コンピュータウィルス検出装置の構成)
図21は、本実施形態に係るコンピュータウィルス検出装置の機能ブロック図を例示する。本実施形態に係るコンピュータウィルス検出装置の構成は、実施形態1ないし7のいずれか一におけるコンピュータウィルス検出装置が、通信阻止命令出力部を有する構成となっている。例えば、コンピュータウィルス検出装置2100は、ブレークポイント情報保持部901と、ブレークポイント設定部902と、判断プログラム実行部903と、通信阻止命令出力部2101と、を有する。
「通信阻止命令出力部」2101は、判断プログラム実行部903による判断の結果、判断の対象となったアプリケーションプログラムがコンピュータウィルス性を有すると判断された場合、そのアプリケーションプログラムが通信システムコールAPI関数を実行するときに、通信阻止命令を出力する。「通信阻止命令」とは、外部の通信機器に対して、アプリケーションプログラムが実行する通信システムコールAPI関数による通信を失敗させるための命令である。
例えば、コンピュータウィルス性を持つと判断されたアプリケーションプログラムが、コンピュータの外部に対してデータを送信しようとしたり、コンピュータの外部からデータを受信しようとしたりするために、通信のためのシステムコールAPI関数を実行すると、外部の通信機器、例えばルータ、に対して、その通信を失敗させる命令が出力される。
図22は、通信阻止命令の一例を示す。この例では、通信阻止命令はXMLなどの構造化文書として記述されている。図22は、例えば図20において、コンピュータ2001のIPアドレスが192.168.193.063であり、プロセス2004が、IPアドレスが10.139.210.254であり、ポートが25番である通信を行なおうとした場合に出力される通信阻止命令を示している。このような通信阻止命令は、例えば、SOAP(Simple Object Access Protocol)により、このような通信阻止命令が外部の通信機器に出力されるようになっていてもよい。
(実施形態8:コンピュータウィルス検出装置の処理)
図23は、本実施形態に係るコンピュータウィルス検出装置の処理のフローチャートを例示する。
ステップS2301において、ブレークポイント位置情報が示す位置に、ブレークポイントを、アプリケーションプログラムに設定する。
ステップS2302において、アプリケーションプログラムの実行がブレークポイントに到達するまで待つ。
ステップS2303において判断プログラムを実行する。
ステップS2304において、アプリケーションプログラムが、コンピュータウィルス性を有するかどうかの判定を行なう。もし、コンピュータウィルス性を有すると判定されると、ステップS2305へ処理を移行させ、そうでなければ、ステップS2307へ処理をスキップする。
ステップS2305において、到達したブレークポイントが通信システムコールAPI関数かどうかを判断する。もし、通信システムコールAPI関数であれば、処理をステップS2306へ移行させ、そうでなければ、ステップS2307へ処理をスキップさせる。
ステップS2306において、外部の通信機器に通信阻止命令を出力する。この処理は、通信阻止命令出力部2101により行なわれる。
ステップS2307において、全体の処理を終了するかどうか判定する。もし、終了しないのであれば、処理をステップS2308へ移行させる。
ステップS2308において、アプリケーションプログラムの実行を続ける。もし、実行が続いて、有害な通信が行なわれたとしても、ステップS2306において出力された通信阻止命令により、通信が阻止されることになる。
(実施形態8:通信機器の構成)
図24は、本実施形態に係る通信機器の機能ブロック図を例示する。通信機器2400は、通信阻止命令受信部2401と、通信阻止部2402と、を有する。
「通信阻止命令受信部」2401は、通信阻止命令を受信する。通信阻止命令は、例えば、通信阻止命令出力部2101により出力されるものであり、XMLで記述された場合には、図22に例示したものとなる。通信阻止命令を受信するためのポートを用意しておき、通信阻止命令受信部2401は、このポートに通信阻止命令が送信されるまで待つ。また、必要に応じて、通信阻止命令を出力したプログラムが正当なプログラムであることを認証するための処理を行なってもよい。
「通信阻止部」2402は、通信阻止命令受信部2401で受信された通信阻止命令に基づいて、通信を阻止する。例えば、通信阻止命令が図22に示すものである場合、192.169.193.063のIPアドレスから、10.139.210.254のIPアドレスのコンピュータの25番ポートへ行く通信パケットの中継をしないなどの処理を行なう。
(実施形態8:通信機器の処理)
図25は、本実施形態に係る通信機器の処理のフローチャートである。通信機器は、このフローチャートにより示される処理を繰り返し実行する。
ステップS2501において、通信阻止命令が受信されるまで待つ。この処理は、通信阻止命令受信部2401により行なう。
ステップS2502において、通信阻止命令に基づいて通信を阻止する。この処理は、通信阻止部2402により行なう。
(実施形態8:主な効果)
本実施形態によれば、いわゆるスパイウェアなどのプログラムがコンピュータのデータを外部に送信することを防止することが可能となる。また、電子メールを介して感染が広がるコンピュータウィルスが送信する電子メールの送信を阻止することが可能となる。
(実施形態9)
本発明の実施形態9として、アプリケーションプログラムが到達したブレークポイントの履歴に基づいて、アプリケーションプログラムがコンピュータウィルス性を有するかどうか判断するコンピュータウィルス検出装置について説明する。
(実施形態9:構成)
図26は、本実施形態に係るコンピュータウィルス検出装置の機能ブロック図を例示する。コンピュータウィルス検出装置2600は、ブレークポイント情報保持部901と、ブレークポイント設定部902と、判断プログラム実行部903と、履歴保持部2601と、を有する。したがって、図26に機能ブロック図が例示されたコンピュータウィルス検出装置は、実施形態1に係るコンピュータウィルス検出装置が履歴保持部2601を有する構成となっている。なお、本実施形態に係るコンピュータウィルス検出装置は、他の実施形態、すなわち、実施形態2から実施形態8のいずれか一に係るコンピュータウィルス検出装置が、履歴保持部2601を有するものであってもよい。
「履歴保持部」2601は、ブレークポイント設定部902で設定されたブレークポイントに前記アプリケーションプログラムが到達した履歴を保持する。「前記アプリケーションプログラム」とは、ブレークポイント設定部902によりブレークポイントが設定されたアプリケーションプログラムを意味する。
したがって、本実施形態においては、アプリケーションプログラムの実行がブレークポイントに到達すると、例えば、どのブレークポイントに到達したか、その日時、ブレークポイントがシステムコールAPI関数であれば、その引数、などを履歴として追加する。この処理は、判断プログラムが行なってもよいし、あるいは、判断プログラムに含まれるプログラムや、コンピュータウィルス検出装置2600の部によって行なわれてもよい。なお、履歴保持部2601が複数のアプリケーションプログラムが到達したブレークポイントの履歴を保持する場合には、アプリケーションプログラムを識別する識別情報も履歴として追加されるのが好ましい。
本実施形態においては、判断プログラムは、履歴検査プログラムを有する。「履歴検査プログラム」とは、履歴保持部2601で保持された履歴に基づいて、そのアプリケーションプログラムがコンピュータウィルス性を有するかどうかを判断する。
例えば、いわゆるデーモンプログラムと呼ばれるアプリケーションプログラムがある。デーモンプログラムは、コンピュータ内部に常駐して、要求が受信できるのを待ち、その要求に対してサービスを提供するアプリケーションプログラムである。このようなデーモンプログラムが提供するサービスの内容は定型化されており、したがって、デーモンプログラムの動作はほぼ一定である。例えば、デーモンプログラムのうち、ウェブページの送信要求に対して、要求されたウェブページを返信するアプリケーションプログラム(例えば、Apacheと名前が付けられたプログラムが有名である)は、特定のポートに要求が送信されるのを待ち、要求されたウェブページを格納するファイルをオープンし、そのファイルに対してreadを行ない、readの結果を返信し、ファイルをクローズして、ログファイルに書き込む、という処理を繰り返し行なう。また、オープンするべきファイルの場所は、特定のディレクトリ下であるという特性を持つ。したがって、このような一定の処理から逸脱した処理を行なうと、そのデーモンプログラムがコンピュータウィルスやワームに感染した可能性が高い。本実施形態では、このようにして、アプリケーションプログラムがコンピュータウィルス性を有するかどうかを判断する。
より具体的な例としては、ブレークポイントごとに、到達した回数を記録しておき、これまで到達したことがないブレークポイントに到達したならば、アプリケーションプログラムがコンピュータウィルス性を有すると判断する。あるいは、ブレークポイントの位置がシステムコールAPI関数である場合には、履歴に基づいて、その引数の規則を抽出し、その規則に合致しない引数が与えられた場合には、アプリケーションプログラムがコンピュータウィルス性を有すると判断する。例えば、ファイルをオープンする際に指定されるファイルのパスに関する規則を、ワイルドカードや正規表現として抽出し、そのワイルドカードや正規表現に適合しないパスのファイルをオープンしようとした場合には、アプリケーションプログラムがコンピュータウィルス性を有すると判断する。
なお、本実施形態は、デーモンプログラムにのみ適用できるのみならず、他のアプリケーションプログラムにも適用が可能である。例えば、一般人によるワードプロセッサなどの使用は定型的なものである。そこで、定型的な使用で呼び出されるシステムコール以外が呼び出されると、そのワードプロセッサがコンピュータウィルス性を有すると判断されるようになっていてもよい。ワードプロセッサを例に用いたが、表計算プログラム、プレゼンテーションプログラム、メーラ、ブラウザなどのアプリケーションプログラムにも適用ができる。
(実施形態9:処理)
図27は、本実施形態に係るコンピュータウィルス検出装置の処理のフローチャートを例示する。
ステップS2701において、ブレークポイント位置情報が示す位置に、ブレークポイントを、アプリケーションプログラムに設定する。
ステップS2702において、アプリケーションプログラムの実行がブレークポイントに到達するまで待つ。
ステップS2703において、ブレークポイントに到達した履歴を追加する。
ステップS2704において、判断プログラムを実行する。ここで、履歴検査プログラムも実行されることになる。
ステップS2705において、終了するべきかどうかを判定する。もし、終了しないのであれば、ステップS2706へ処理を移行させる。
ステップS2706において、アプリケーションプログラムの実行を続ける。その後、ステップS2702に処理を移行させる。
なお、ステップS2703の処理は、判断プログラムを実行した後で行なわれるようになっていてもよい。
(実施形態9:主な効果)
本実施形態によれば、アプリケーションプログラムの動作がこれまでと異なる傾向を示すかどうかに基づいて、コンピュータウィルス性を判断するので、一定の動作を繰り返し行なうデーモンプログラムなどの振る舞いの監視に有用である。また、正常な動作の履歴があればコンピュータウィルス性の判断が行なえるので、判断プログラムの作成が容易となる。
(実施形態10)
本発明の実施形態10として、アプリケーションプログラムがバーチャルマシンであるコンピュータウィルス検出装置について説明する。
(実施形態10:構成)
図28は、本実施形態に係るコンピュータウィルス検出装置の使用の形態を例示する。コンピュータ2801の内部で、コンピュータウィルス検出装置2802とバーチャルマシン2803が動作している。コンピュータウィルス検出装置2802は、実施形態1ないし9のいずれか一のコンピュータウィルス検出装置を実現するプログラムである。コンピュータウィルス検出装置2802は、バーチャルマシン2803にブレークポイントを設定し、振る舞いを監視する。
「バーチャルマシン」とは、他のプログラム2805を実行するアプリケーションプログラムである。通常は、他のプログラム2805は、想定されたアーキテクチャのコンピュータのマシンインストラクションで記述される。代表的な例としては、Java(登録商標)で記述され、コンパイルされたプログラムを実行するものがある。Java(登録商標)のプログラムは、インターネットからダウンロードされることが想定されているので、多くの場合、その出所/素性が不明であり、危険なプログラムである場合がある。そこで、例えば、Java(登録商標)のバーチャルマシンは、実行するプログラムがOSへのAPI(2804)を自由に使ってコンピュータのリソースにアクセスすることを制限するように設計されている。しかし、バーチャルマシンのバグを利用して、バーチャルマシン上で動くプログラム2805がコンピュータのリソースに自由にアクセスする場合がある。
そこで、本実施形態のコンピュータウィルス検出装置2802が、バーチャルマシン2803にブレークポイントを設定して、バーチャルマシン2803の振る舞いを検出し、バーチャルマシン2803がコンピュータウィルス性を有するプログラムを実行していないかどうかを判断する。なお、本実施形態においては、バーチャルマシンがコンピュータウィルス性を有するとは、コンピュータウィルス性を有するプログラムをバーチャルマシンが実行することをも意味するものとする。
(実施形態10:主な効果)
本実施形態により、バーチャルマシンのバグなどを利用するプログラムの実行を阻止することができる。
(実施形態11)
本発明の実施形態11として、実施形態10におけるコンピュータを携帯電話とした実施形態について説明する。
(実施形態11:構成)
図29は、本実施形態に係るコンピュータウィルス検出装置の使用の形態を例示する。図28のコンピュータ2801が携帯電話2901に置き換わっている。
(実施形態11:主な効果)
携帯電話の高機能化にはめざましいものがある。例えば、インターネット用のブラウザは言うに及ばず、Java(登録商標)のバーチャルマシンも携帯電話の内部で動作するようになっている。また、従来はパーソナルコンピュータで動作していたオペレーティングシステムが携帯電話の内部でも動作するようになってきており、携帯電話で動作するプログラムが複雑化している。
しかし、携帯電話の販売が開始された後に、バグやセキュリティホールが見つかる場合がある。一方、携帯電話はパーソナルコンピュータ以上の台数が市場に出回り、携帯端末の回収にはコストがかかるうえ、時間も要する。このため、携帯電話で動作するバーチャルマシンなどのバグやセキュリティホールを悪用したコンピュータウィルスが作成されると、その感染規模は予想もつかないこととなり、社会的な影響が大きい。例えば、バーチャルマシンのバグなどを利用して、あらゆる携帯電話のアドレス帳のデータが収集され、プライバシ情報の漏洩につながる。
そこで、本発明のコンピュータウィルス検出装置を実現するプログラムを、携帯電話の内部で動作させておき、バーチャルマシンにブレークポイントを設定して振る舞いを検出することにより、バグやセキュリティホールなどを悪用したコンピュータウィルスの動作を未然に防ぐことが可能となる。
Hereinafter, the best mode for carrying out the present invention will be described as an embodiment with reference to the drawings. Note that the present invention is not limited to these embodiments, and can be implemented in various modes without departing from the spirit of the present invention.
(Outline of the present invention)
The present invention focuses on the behavior of the program and determines whether the program is a virus. A process embodying the present invention and a process to be monitored have a relationship similar to that of a debugger and a debuggee. The debugger corresponds to the process embodying the present invention, and the debug corresponds to the process to be monitored.
The debugged process is called debuggee. The present invention executes the monitored process as a debuggee. When monitoring a running process, attach to the running process.
The process embodying the present invention sets breakpoints in system calls (or API functions) that make significant changes to the system in order to check the behavior of the monitored process.
In the case of an Intel (registered trademark) CPU, a breakpoint can be realized by placing a hardware interrupt instruction of Int3 at a memory address indicated by the breakpoint. When the execution of the process reaches a breakpoint, the execution of the process stops, and the computer virus detection apparatus according to the present invention investigates the contents of the stack of the process, and the behavior of the process to be monitored and the past Compare the characteristic behavior of computer viruses.
The following are examples of characteristic behavior of viruses.
• Copy yourself to the system folder.
• Look for directories shared on the network. Then copy yourself.
・ Access the mail address book and send a large number of mails with viruses attached.
・ If file exchange software is installed, use it to distribute yourself.
-Delete important system files. Or tamper.
-Change the system so that it will run on reboot.
The present invention compares the API call of the monitoring target process with the past behavior of a computer virus, etc., and stops the monitoring target process or issues a warning to the user.
Hereinafter, WINDOWS (registered trademark) will be specifically described as an example. In WINDOWS (registered trademark), an API for manipulating files and directories is KERNEL32. It is included in a file called DLL. The API related to the registry is ADVAPI32. Included in the DLL. An API for operating a network shared drive is MPR. Included in the DLL. Hereinafter, these are called DLL files.
A method for determining which API the monitored process is trying to call will be described below. When the monitored process starts executing, the DLL file is mapped to the virtual process space.
FIG. 6 shows that the virtual process space 601 includes Kernel32. Dll, MRP. Dll, Advapi32. The state where Dll was mapped is illustrated. By performing the mapping in this manner, the monitoring target process is, for example, Adobe32. Functions such as RegCreateKeyEx defined in Dll can be called.
FIG. 7 shows the virtual memory space of the process. The virtual memory space 700 has an instruction part 701, a heap part 702, a DLL part 703 to which a DLL file is mapped, and a stack part 704 from the smallest memory address. The portion 703 is located between the heap portion 702 and the stack portion 704, and the DLL file is mapped to the portion 703. That is, when a reference is made to the memory address of the portion 703, the contents of the DLL file stored as a file are obtained.
The map address of the DLL file (the first address of the part where the DLL file is mapped to the virtual memory space) is called an image base, and is uniquely determined in each DLL so as not to overlap with the others.
For example, an API called RegOpenKeyExA that operates the registry is ADVAPI32. Included in the DLL.
The address of RegOpenKeyExA is obtained by “ADVAPI32.DLL image base” + “RegOpenKeyExA RVA”. Note that “RVA” is an abbreviation for “relative virtual address”. That is, it is a relative position where the API definition appears in the DLL file.
When the address is obtained, a breakpoint is set using a debugger API or the like.
When the execution of the monitored process hits a breakpoint, the API argument is analyzed.
If the monitored process calls an API that changes the registry or system file, a backup is created in this step.
If virus characteristics are detected, stop the process or report to the user. If not detected, processing continues.
A specific example will be described. Many WINDOWS® viruses add a value to the following registry to run and resident in the system upon restart:
HKEY_LOCAL_ACHINE \ SOFTWARE \ MICROSOFT \ Windows \ CurrentVersion \ Run
For reference, here are some major viruses that add values to this key:
NIMDA, LOVELATERTER, TROJ_MATRIX, W32_MAGISTR, TROJ_HYBRIS, WORM_KLEZ, WORM_BUGBEAR, WORM_BADTRANS, JS_EXCEPTION, WORM_LIRBA
An unknown program received by e-mail may not need to reside in the system.
To add the registry, the following two-step API call is required.
RegCreateKeyExA ... Creates a new key under Run.
RegSetValueExA ... Set the value.
The top two APIs are ADVAPI32. Included in the DLL. Here, ADVAPI32. Assume that the image base of the DLL is 0x77D80000. The number 0x indicates a hexadecimal number. Further, it is assumed that the RVA of RegCreateKeyExA is 0x29427 and the RVA of RegSetValueExA is 0x2C58D.
The address of RegCreateKeyExA is
0x77D80000 + 0x29427 = 0x77DA9427
The address of RegSetValueExA is
0x77D80000 + 0x2C58D = 0x77DAC58D
Is required. Since these are virtual address spaces, the DLL file is mapped with the same virtual address even if a plurality of processes are executed simultaneously.
When asked for addresses, set breakpoints on them.
If the process to be monitored is a program that is automatically executed when WINDOWS (registered trademark) is activated, a break point of RegCreateKeyExA is hit. Next, analyze the stack. This is because a compiler such as C language generates machine instructions that pass arguments through the stack.
80000002 0041f028 ADVAPI32! RegCreateKeyExA
For example, assume that the above numerical values are obtained. When calling RegCreateKeyExA, the second argument is the location of the registry. In this example, the location of the registry is stored in the memory address 41f028. Therefore, the memory address 41f028 is checked.
> 41f028
41f028 SOFTWARE \ Microsoft
41f038 ft \ Windows \ Cure
41f048 ntVersion \ Run \ Vi
41f058 rus
From the API and arguments, it can be seen that the monitoring process is trying to create a key called Virus under Run.
In order to return to the state before the program execution, the Virus key may be deleted. Therefore, a history of changes in system resources such as a registry, a copy of system resources, and the like may be held before execution of a system call.
Similarly, API necessary for grasping the behavior of the program is checked, and the tendency of the call is analyzed.
It is desirable that the correspondence between the API for monitoring the call and the argument (hereinafter referred to as a detection rule) can be added or changed by reading a file describing the detection rule from the outside, for example, the Internet, instead of hard coding.
With this method, there is no overhead of scanning the file. When the characteristic behavior of the virus is detected, it is preferable to display a dialog box or the like so that the process to be monitored can be stopped by the user's intention.
Or, continue without executing the program. A flowchart is illustrated in FIG.
(Embodiment 1)
As Embodiment 1 of the present invention, breakpoint position information and a determination program to be executed when an application program reaches a breakpoint indicated by the breakpoint position information are stored in association with each other, and the breakpoint is set in the application program A computer virus detection apparatus that executes a determination program will be described.
(Embodiment 1: Configuration)
FIG. 9 illustrates a functional block diagram of the computer virus detection device according to the present embodiment. The computer virus detection apparatus 900 includes a breakpoint information holding unit 901, a breakpoint setting unit 902, and a determination program execution unit 903.
As will become clear from the following description, a computer virus detection apparatus having these units can be realized as a program that runs on a computer. Therefore, FIG. 9 can also be interpreted as a diagram showing the module configuration of such a program. That is, such a program includes a breakpoint information holding step for realizing a breakpoint information holding unit by a program, a breakpoint setting step for realizing a breakpoint setting unit by a program, and a determination for realizing a judgment program execution unit by a program. A program for causing a computer to execute a program execution step.
A “breakpoint information holding unit” 901 holds breakpoint information. For example, breakpoint information is held in a hard disk or semiconductor memory. “Breakpoint information” is information including breakpoint position information and a determination program. Since “includes”, the components of the breakpoint information may not be limited to the breakpoint position information and the determination program.
“Breakpoint position information” is information indicating the position of a breakpoint to be set when the application program is executed. The position of the breakpoint is indicated by, for example, a memory address of the application program. It may also be indicated by the name of a function, procedure, or method (hereinafter referred to as “function or the like”) that is called by the application program.
The “determination program” means whether or not the application program has a computer virus property based on the contents of the stack referred to in the execution of the application program when the execution of the application program reaches the breakpoint. This is a program for making a decision. “The application program” means an application program in which a breakpoint is set at a position indicated by breakpoint position information by a breakpoint setting unit 902 described later. The “breakpoint” means a breakpoint set at a position indicated by breakpoint position information.
"Application program has computer virus" is designed not only when the application program itself is a computer virus, but also when the application program is infected with a computer virus, using bugs or security holes in the application program In some cases, such as when the operation is not expected. For example, there is a case where a malicious person performs an operation such as obtaining the contents of a file that cannot be obtained by a normal operation using a bug of the web server program.
There are various methods for determining whether or not the application program has a computer virus property based on the contents of the stack referred to when the application program is executed. For example, it is determined whether or not the stack referred to in the execution of the application program can be traced from the top of the stack to the bottom of the stack by following the frame pointer. Some computer viruses call system calls and the like in such a manner that they are not called if the application program operates normally by destroying the contents of the stack. Therefore, it is determined whether or not the contents of the stack are destroyed. One of the judgments is that the application program has a computer virus property depending on whether it can follow the frame pointer and call up to a function called first in the execution of the program (for example, a function named _startup). Judge whether or not.
In addition, when the application program reaches a breakpoint, it may be determined whether or not the application program has a computer virus property by checking through what call sequence the function is reached. If a breakpoint is reached after a sequence of calls such as an unexpected function, it is suspected to have a computer virus.
Further, it may be determined whether or not the application program has a computer virus property by examining an argument such as a function in which a breakpoint is set. For example, a computer virus that infects other computers using e-mail accesses the address book of e-mail addresses in order to obtain e-mail addresses. Therefore, the determination may be made based on whether an argument for accessing the address book is specified.
In many cases, the process for executing the program for realizing the computer virus detection device is different from the process for executing the application program. Usually, the program for realizing the computer virus detection device is the application program. The contents of the memory space of the executing process, especially the contents of the stack cannot be read. However, the operating system has a function that allows a certain process to read or change the contents of the memory space and registers of other processes if they are between processes in a specific relationship. It is normal. Examples of the “specific relationship” here include a parent-child relationship, a process executed by the same user, and a relationship in which a predetermined system call (for example, attach) is executed on another process, and so on. Therefore, when the computer virus detection apparatus is realized by a program, the process for executing the program and the process for executing the application program need to have a specific relationship.
Most operating systems provide system calls for reading and changing the memory space and register contents of other processes. Alternatively, there may be a case where the contents of the memory space and registers of other processes can be read or changed using a special device called / dev / proc.
For example, the determination program may be executed by an interpreter. For example, the determination program may be described in a language such as Lisp, Perl, or Ruby. Further, the determination program may consist of a sequence of machine instructions that can be directly executed by a computer. In this case, a determination program may be incorporated as a part of a program for realizing the computer virus detection device. Alternatively, the determination program may be loaded into a program that dynamically realizes a computer virus detection device, for example, as a dynamic library. If the determination program is executed by an interpreter or is dynamically loaded, the determination program can be easily replaced.
FIG. 10 shows an example of a state in which breakpoint information is held by the breakpoint information holding unit 901. In FIG. 10A, breakpoint information is held in a table. A column 1001 stores breakpoint position information, and a column 1002 stores a determination program. FIG. 10B shows an example of a state in which a pointer to the determination program is stored in the table. The pointer points to a specific location within the memory space of the process executing the program that implements the computer virus detection device.
FIG. 11 illustrates a state in which breakpoint information is provided for each application program. Thus, the breakpoint information holding unit 901 may hold breakpoint information for each application program.
The “breakpoint setting unit” 902 sets breakpoint information in the application program based on the breakpoint information held by the breakpoint information holding unit 901. That is, a breakpoint is set at a position indicated by breakpoint position information included in the breakpoint information. This setting is performed using a system call or special device provided by the operating system. “Based on” means that, for example, when the breakpoint position information is expressed using a name of a function or the like, an address of the function or the like is obtained from the name of the function or the like. Correspondence between names of functions and their addresses and their addresses can be obtained by reading a symbol table of an application program.
The “determination program execution unit” 903 executes the determination program included in the breakpoint information when the execution of the application program reaches the breakpoint set by the breakpoint setting unit 902. The “application program” is an application program in which a breakpoint is set by the breakpoint setting unit 902. The computer virus detection apparatus waits until the execution of the application program in which the breakpoint is set reaches the breakpoint. For this purpose, for example, a wait system call is called. When the execution of the application program reaches a breakpoint, (1) the processing of the computer virus detection device resumes from the wait system call, (2) determines which breakpoint has been reached, and (3) a determination program execution unit 903 To execute a judgment program. To determine which breakpoint the application program has reached, it is determined by obtaining the value of the program counter held in the register of the process executing the application program.
(Embodiment 1: processing)
FIG. 12 illustrates a flowchart of processing of the computer virus detection apparatus.
In step S1201, a breakpoint is set in the application program at the position indicated by the breakpoint position information. For example, this process is performed by the breakpoint setting unit 902.
In step S1202, the execution of the application program waits until a breakpoint is reached. This process is realized, for example, by executing a wait system call.
In step S1203, the determination program corresponding to the breakpoint at which the execution of the application program has been reached is executed. For example, this process is performed by the determination program execution unit 903.
In step S1204, it is determined whether or not to end the process. For example, if it is determined by execution of the determination program in step S1203 that the application program has a computer virus property, the process ends. If it is determined not to end the process, the process proceeds to step S1205.
In step S1205, the execution of the application program is continued. When the application program reaches a breakpoint, the execution of the application program stops, so that the processing is resumed from the point where it stopped. For example, a signal (for example, SIG_CONT) is sent to the process that executes the application program. Thereafter, the process proceeds to step S1202.
The computer virus detection apparatus can be considered as an apparatus for using a computer virus detection method including a breakpoint information holding step, a breakpoint setting step, and a determination program execution step. “Breakpoint information holding step” is a step for holding breakpoint information. “Breakpoint setting step” is a step for setting a breakpoint in the application program based on the breakpoint information held in the breakpoint information holding step. The “determination program execution step” is a step of executing the determination program included in the breakpoint information when the execution of the application program reaches the breakpoint set in the breakpoint setting step. . That is, the breakpoint information holding step is a step that operates the breakpoint information holding unit, the breakpoint setting step is a step that operates the breakpoint setting unit, and the determination program execution step executes the determination program execution unit. It is a step. The use of the computer virus detection method according to the present invention is not limited to the computer virus detection apparatus according to the present invention.
(Embodiment 1: Main effects)
According to the present embodiment, since the behavior of a process for executing an application program can be monitored by a computer virus detection device without modifying the kernel of the operating system, the occurrence of a system down can be avoided. Become. In addition, since the behavior of computer viruses is often very similar, the necessity of continuing to update the pattern file to the latest one, which was necessary in conventional anti-virus software, is reduced. Update is unnecessary.
(Embodiment 2)
As a second embodiment of the present invention, a computer virus detection apparatus that holds an application program will be described.
FIG. 13 illustrates a display screen by the computer virus detection apparatus according to the present embodiment. A window 1301 is a window displayed by the computer virus detection device according to the present embodiment. An application program icon is displayed in the sub-window 1302 of the window. If necessary, an icon (eg, icon 1304) displayed outside the window 1301 can be dragged and moved to the inside of the sub-window 1302. By double-clicking an icon (for example, icon 1303) displayed in the sub window 1302, a process for executing the application program is generated as a child process of the process for executing the computer virus detection device, and its behavior is monitored. Is done.
(Embodiment 2: Configuration)
FIG. 14 illustrates a functional block diagram of the computer virus detection device according to the present embodiment. The computer virus detection apparatus 1400 includes a breakpoint information holding unit 901, a breakpoint setting unit 902, a determination program execution unit 903, an application program holding unit 1401, a program execution start unit 1402, a breakpoint setting instruction unit 1403, Have.
Therefore, in the computer virus detection device according to the present embodiment, the computer virus detection device according to the first embodiment further includes an application program holding unit 1401, a program execution start unit 1402, and a breakpoint setting command unit 1403. It has a configuration. In the present specification, the same reference numerals are assigned to parts to which the same definition is applied as much as possible. It should be noted that assignment of the same code does not mean that the same configuration or the like is obtained in actual manufacturing or the like.
An “application program holding unit” 1401 holds an application program. There are various forms of holding. For example, there is a form in which the entire application program is stored. Further, there may be a form of storing a location where an application program is stored, for example, a path expressed in a file system.
The “program execution start unit” 1402 starts execution of the application program held by the application program holding unit 1401. For example, execution of an application program is started as a child process of a process that executes a program for realizing a computer virus detection device.
A “breakpoint setting instruction unit” 1403 instructs the breakpoint setting unit 902 to set a breakpoint for an application program whose execution is started by the program execution start unit 1402. For example, a function for realizing the breakpoint setting unit 902 is called.
(Embodiment 2: processing)
FIG. 15 illustrates a flowchart of processing of the computer virus detection device according to the present embodiment.
In step S1501, the application program is held. This process is performed by the application program holding unit 1401. For example, in FIG. 13, it is detected that the icon 1304 has been dragged into the sub-window 1302, and an application program represented by the icon 1304 is held.
In step S1502, the process waits until an application program is selected. For example, in FIG. 13, the process waits until an icon inside the sub window 1302 is double-clicked.
In step S1503, a command is issued to set a breakpoint at the position indicated by the breakpoint position information in the selected application. This processing is performed by the breakpoint setting command unit 1403.
In step S1504, the process waits for completion of the breakpoint setting. For example, it waits until it returns from a call of a function that implements the breakpoint setting unit 902.
In step S1505, the selected application program is executed. More precisely, a process for executing the selected application program is executed. After step S1505, step S1202, step S1203, step S1204, and step S1205 in the flowchart of FIG. 12 are executed. In recent operating systems, it is possible to operate a plurality of threads in parallel / parallel in one process. Therefore, execution of step S1202, step S1203, step S1204, and step S1205 may be performed by a thread different from the thread that executes the flowchart of FIG.
In step S1506, it is determined whether or not to end the process. For example, the determination is made based on whether the operator of the computer virus detection apparatus has pressed the end button. If not completed, the process returns to step S1502.
(Embodiment 2: Main effects)
According to this embodiment, it is possible to easily generate a process for executing an application program whose behavior is to be monitored. In addition, application programs that are not likely to introduce a computer virus from the outside can be excluded from monitoring, so the speed at which such application programs are executed is not reduced by setting breakpoints. .
(Embodiment 3)
As a third embodiment of the present invention, a computer virus detection apparatus that sets a breakpoint in a system call API function and monitors the behavior of a process will be described.
(Embodiment 3: Configuration)
The computer virus detection apparatus according to the present embodiment is configured so that the breakpoint information held by the breakpoint information holding unit 901 of the computer virus detection apparatus according to the first or second embodiment is determined based on the system call API function of the application program. It is a thing.
The “system call API function” means a library function for calling a system call. Such a library function or the like is normally configured such that an argument for a system call is loaded on the stack and a trap instruction is executed. By executing the trap instruction, an interrupt routine set in the CPU by the operating system is started, and processing inside the operating system is started. Since it is difficult to directly express a process of loading arguments and executing a trap instruction in a high-level language, a library function for performing such a process is prepared.
FIG. 16 illustrates breakpoint information in the present embodiment. In FIG. 16, RegCreateKeyExA is the name of the system call API function. Therefore, when the breakpoint setting unit sets a breakpoint, it is necessary to convert the name of the system call API function into an address. The conversion process is as described in the overview section.
(Embodiment 3: Main effects)
Since a computer virus often infects a computer itself using a system call API function, by detecting the call of the system call API function and determining whether the application program has a computer virus property, It is possible to make an accurate judgment with fewer breakpoints.
(Embodiment 4)
As a fourth embodiment of the present invention, a computer virus detection apparatus that makes a determination based on examination of arguments of a system call API function will be described.
(Embodiment 4: Configuration)
The computer virus detection apparatus according to the present embodiment has a configuration in which the system call inspection program is included in the determination program in the computer virus detection apparatus according to the third embodiment. The “system call inspection program” is a program for determining whether or not the application program has a computer virus property based on the inspection of the argument of the system call API function called by the application program. “The application program” means an application program in which a breakpoint is set by the breakpoint setting unit 902.
Therefore, in this embodiment, when the execution of the application program reaches a breakpoint, the argument of the system call API function of the application program is checked. Based on the result of this inspection, it is determined whether or not the application program has a computer virus property.
In the present embodiment, the system call API function whose argument is checked is not limited to the one in which a breakpoint is set. For example, all the machine instructions of the application program may be examined, and the arguments of all system call API functions may be examined. The argument of the system call API function at the reached breakpoint may be stored, and when the breakpoint is reached later, the argument may be checked in the stored system call API function.
(Embodiment 4: Main effects)
In the present embodiment, since the computer virus property is determined based on the examination of the argument of the system call API function, the determination can be made more accurately.
(Embodiment 5)
As a fifth embodiment of the present invention, a computer virus detection apparatus for inspecting an argument of a system call API function at a reached breakpoint will be described.
(Embodiment 5: Configuration)
The computer virus detection apparatus according to the present embodiment is a system in which an argument to be inspected by the system call inspection program is determined by breakpoint position information held by the breakpoint information holding unit 901 in the computer virus detection apparatus according to the fourth embodiment. This is an argument of the call API function.
For example, as illustrated in FIG. 16, when a breakpoint is set in a system call API function called RegCreateKeyExA, and the execution of the application program reaches the breakpoint, the system call inspection program sets an argument of RegCreateKeyExA. inspect. An example of the inspection is as described in the overview section of the present invention.
(Embodiment 5: Main effects)
According to the present embodiment, since the computer virus property is determined based on the examination of the argument of the called system call API function, the determination can be made more accurately.
(Embodiment 6)
As a sixth embodiment of the present invention, a computer virus detection apparatus that generates a copy of a changed system resource when a system call API function that changes the system resource is called will be described.
(Embodiment 6: Configuration)
The computer virus detection apparatus according to the present embodiment has a configuration in which a copy creation program is included in the determination program in the computer virus detection apparatus according to the fourth or fifth embodiment. The “copy creation program” generates a copy of the changed system resource when the system resource is changed by the system call API function of the application program. “The application program” is an application program in which breakpoints are set by the breakpoint setting unit 902.
Accordingly, in the present embodiment, the breakpoint position information indicates the position of the system call API function that changes the system resource. The system resource here means, for example, a resource that can be duplicated among resources used by a computer, such as a registry and a file.
For example, a break point is set in the system call API function for changing the registry, and when the execution of the application program reaches the break point, a copy creation program for copying the registry is executed. When a copy is created, the registry is changed by a system call. In duplicating the registry, the entire registry may be duplicated, or only the part to be changed may be duplicated. The part to be changed in the registry can be determined by an argument of the system call API function.
In the present embodiment, the copy creation program may be executed when it is determined that the application program has a computer virus property. As a result, the amount of duplicates to be created can be reduced.
(Embodiment 6: processing)
FIG. 17 illustrates a flowchart of processing of the computer virus detection device according to the present embodiment.
In step S1701, a breakpoint is set in the application program at the position indicated by the breakpoint position information.
In step S1702, the process waits until execution of the application program reaches a breakpoint.
In step S1703, a determination program is executed.
In step S1704, it is determined whether the execution result of the determination program is that the application program has a computer virus property. If it has a computer virus property, the process proceeds to step S1705, and if not, the process is skipped to step S1707.
In step S1705, it is determined whether the application program is changing the system resource. This determination can be made by examining the type of system call API function related to the reached breakpoint and its argument. If the system resource is to be changed, the process proceeds to step S1706, and if not, the process is skipped to step S1707.
In step S1706, a copy of the system resource is created by the copy creation program.
In step S1707, it is determined whether to end the entire process. If it is determined not to end, the process proceeds to step S1708.
In step S1708, execution of the application program is continued, and the process proceeds to step S1702. Even if the application program is a computer virus and the system resource is changed to an illegal one, the system can be restored by the copy created in step S1706.
(Embodiment 6: Main effects)
In this embodiment, since a copy of the system resource to be changed is created, even if the application program is a computer virus and the computer is infected, the system can be recovered using the copy of the system resource.
(Embodiment 7)
As a seventh embodiment of the present invention, a computer virus detection apparatus that does not execute a system call API function when an application program is determined to have a computer virus property will be described.
(Embodiment 7: Configuration)
FIG. 18 illustrates a functional block diagram of the computer virus detection device according to the present embodiment. The configuration of the computer virus detection device according to the present embodiment is such that any one of the computer virus detection devices according to the first to sixth embodiments includes an execution blocking unit. Therefore, for example, the computer virus detection apparatus 1800 includes a breakpoint information holding unit 901, a breakpoint setting unit 902, a determination program execution unit 903, and an execution prevention unit 1801. In addition, the computer virus detection apparatus 1800 may include an application program holding unit, a program execution start unit, and a breakpoint setting command unit.
As a result of the determination by the determination program execution unit 903, the “execution prevention unit” 1801 does not execute the system call API function of the application program when it is determined that the application program to be determined has a computer virus property. It is a part for.
When the use of the stack is illustrated in FIG. 5, the execution prevention unit 1801 uses the value of the frame pointer (fp) to calculate the value of the frame pointer before the function call stored in the part 504. It is acquired and set to the frame pointer (fp), and the value of the program counter is set to the value stored in the part 503 so that the system call API function is not executed.
(Embodiment 7: processing)
FIG. 19 illustrates a flowchart of processing of the computer virus detection device according to the present embodiment.
In step S1901, a breakpoint is set in the application program at the position indicated by the breakpoint position information.
In step S1902, the process waits until execution of the application program reaches a breakpoint.
In step S1903, a determination program is executed.
In step S1904, it is determined as a result of the determination program whether the application program has a computer virus property. If it has a computer virus property, the process proceeds to step S1905, and if not, the process is skipped to step S1906.
In step S1905, the system call API function is not executed. In this process, the execution prevention unit 1801 is used.
In step S1906, it is determined whether to end the entire process. If not finished, the process proceeds to step S1907.
In step S1907, execution of the application program is continued. Thereafter, the process proceeds to step S1902.
(Embodiment 7: Main effects)
In the present embodiment, since dangerous system calls are prevented from being executed, for example, when a macro program of a specific word processor has a computer virus property, the execution of the dangerous macro program without stopping the function of the word processor. Thus, it is possible to continue the execution of the application program while preventing the execution of a dangerous system call.
(Embodiment 8)
As an eighth embodiment of the present invention, a computer virus detection apparatus and a communication device for blocking communication of an application program having a computer virus property will be described.
FIG. 20 illustrates an overview of the present embodiment. A computer 2001 is connected to an external communication network 2003 via a communication device 2002. A typical example of the communication device 2002 is a router. Inside the computer 2001, a process 2004 for executing an application program and a process 2005 for realizing a computer virus detection apparatus operate. The process 2005 monitors the behavior of the process 2004. If an application program executed by the process 2004 has a computer virus property, an attempt is made to communicate with the outside 2006. In this case, the process 2005 considers that the process 2004 is performing harmful communication to the outside, and outputs a communication blocking instruction 2007 to the communication device 2002 in order to block the harmful communication. Based on the communication blocking instruction 2007, the communication device 2002 blocks communication by not relaying a packet of communication to be performed by the process 2004.
(Embodiment 8: Configuration of computer virus detection apparatus)
FIG. 21 illustrates a functional block diagram of the computer virus detection apparatus according to the present embodiment. The configuration of the computer virus detection device according to the present embodiment is such that the computer virus detection device according to any one of Embodiments 1 to 7 has a communication blocking command output unit. For example, the computer virus detection device 2100 includes a breakpoint information holding unit 901, a breakpoint setting unit 902, a determination program execution unit 903, and a communication blocking instruction output unit 2101.
The “communication blocking instruction output unit” 2101 determines that, as a result of the determination by the determination program execution unit 903, the application program to be determined has a computer virus property, the application program sends a communication system call API function. When executing, a communication blocking command is output. The “communication blocking instruction” is an instruction for causing an external communication device to fail communication using the communication system call API function executed by the application program.
For example, a system call API function for communication in order for an application program determined to have a computer virus property to transmit data to the outside of the computer or to receive data from the outside of the computer. Is executed, an instruction to fail the communication is output to an external communication device such as a router.
FIG. 22 shows an example of a communication blocking command. In this example, the communication blocking instruction is described as a structured document such as XML. In FIG. 22, for example, in FIG. 20, the IP address of the computer 2001 is 192.168.193.063, the process 2004 is the communication with the IP address of 10.139.210.254, and the port is No. 25. A communication blocking command output when an attempt is made is shown. Such a communication blocking command may be output to an external communication device by, for example, SOAP (Simple Object Access Protocol).
(Embodiment 8: Processing of computer virus detection device)
FIG. 23 illustrates a flowchart of processing of the computer virus detection device according to the present embodiment.
In step S2301, a breakpoint is set in the application program at the position indicated by the breakpoint position information.
In step S2302, the process waits until execution of the application program reaches a breakpoint.
In step S2303, a determination program is executed.
In step S2304, it is determined whether the application program has a computer virus. If it is determined that the computer virus is present, the process proceeds to step S2305; otherwise, the process skips to step S2307.
In step S2305, it is determined whether the reached breakpoint is a communication system call API function. If it is a communication system call API function, the process proceeds to step S2306; otherwise, the process is skipped to step S2307.
In step S2306, a communication blocking command is output to an external communication device. This processing is performed by the communication block command output unit 2101.
In step S2307, it is determined whether or not to end the entire process. If not finished, the process proceeds to step S2308.
In step S2308, execution of the application program is continued. Even if harmful communication is performed following execution, communication is blocked by the communication blocking command output in step S2306.
(Embodiment 8: Configuration of communication device)
FIG. 24 illustrates a functional block diagram of the communication device according to the present embodiment. The communication device 2400 includes a communication blocking command receiving unit 2401 and a communication blocking unit 2402.
The “communication block command receiving unit” 2401 receives a communication block command. The communication blocking command is output by, for example, the communication blocking command output unit 2101. When described in XML, the communication blocking command is exemplified in FIG. A port for receiving a communication blocking command is prepared, and the communication blocking command receiving unit 2401 waits until a communication blocking command is transmitted to this port. Moreover, you may perform the process for authenticating that the program which output the communication prevention command is a legitimate program as needed.
The “communication blocking unit” 2402 blocks communication based on the communication blocking command received by the communication blocking command receiving unit 2401. For example, when the communication blocking instruction is as shown in FIG. 22, the relay of the communication packet going from the IP address of 192.168.193.063 to the 25th port of the computer having the IP address of 10.139.210.254 is performed. Do something like not.
(Embodiment 8: Processing of communication device)
FIG. 25 is a flowchart of processing of the communication device according to the present embodiment. The communication device repeatedly executes the processing shown by this flowchart.
In step S2501, the process waits until a communication blocking command is received. This processing is performed by the communication blocking command receiving unit 2401.
In step S2502, communication is blocked based on the communication block command. This processing is performed by the communication blocking unit 2402.
(Embodiment 8: Main effects)
According to the present embodiment, it is possible to prevent a program such as so-called spyware from transmitting computer data to the outside. In addition, it is possible to prevent transmission of e-mails transmitted by computer viruses that spread through e-mails.
(Embodiment 9)
As a ninth embodiment of the present invention, a computer virus detection apparatus that determines whether an application program has a computer virus property based on a history of breakpoints reached by the application program will be described.
(Embodiment 9: Configuration)
FIG. 26 illustrates a functional block diagram of the computer virus detection device according to the present embodiment. The computer virus detection apparatus 2600 includes a breakpoint information holding unit 901, a breakpoint setting unit 902, a determination program execution unit 903, and a history holding unit 2601. Therefore, the computer virus detection apparatus whose functional block diagram is illustrated in FIG. 26 is configured such that the computer virus detection apparatus according to the first embodiment includes the history holding unit 2601. Note that the computer virus detection device according to this embodiment may be the computer virus detection device according to any one of the other embodiments, that is, any one of the second to eighth embodiments, including the history holding unit 2601. Good.
A “history holding unit” 2601 holds a history of the application program reaching the breakpoint set by the breakpoint setting unit 902. “The application program” means an application program in which a breakpoint is set by the breakpoint setting unit 902.
Therefore, in this embodiment, when the execution of the application program reaches a breakpoint, for example, which breakpoint has been reached, its date and time, and if the breakpoint is a system call API function, its arguments, etc. are used as a history. to add. This processing may be performed by a determination program, or may be performed by a program included in the determination program or a part of the computer virus detection device 2600. When the history holding unit 2601 holds a history of breakpoints reached by a plurality of application programs, it is preferable that identification information for identifying the application program is also added as a history.
In the present embodiment, the determination program has a history inspection program. The “history inspection program” determines whether the application program has a computer virus property based on the history held by the history holding unit 2601.
For example, there is an application program called a so-called daemon program. The daemon program is an application program that resides in the computer, waits for a request to be received, and provides a service for the request. The contents of services provided by such a daemon program are standardized, and therefore the operation of the daemon program is almost constant. For example, among the daemon programs, an application program that returns a requested web page in response to a web page transmission request (for example, a program named Apache) is requested to a specific port. Wait until it is sent, open the file that stores the requested web page, read the file, return the read result, close the file, and write to the log file Repeat. Further, the file location to be opened has a characteristic that it is under a specific directory. Therefore, if a process deviating from such a certain process is performed, there is a high possibility that the daemon program is infected with a computer virus or worm. In this embodiment, in this way, it is determined whether or not the application program has a computer virus property.
As a more specific example, the number of times reached is recorded for each breakpoint, and if a breakpoint that has never been reached is reached, it is determined that the application program has a computer virus. Alternatively, if the breakpoint position is a system call API function, the rule of the argument is extracted based on the history, and if an argument that does not match the rule is given, the application program is a computer virus It is judged that it has. For example, if the file path rule specified when opening a file is extracted as a wildcard or regular expression, and you try to open a file whose path does not match the wildcard or regular expression, the application program Is determined to have computer virus properties.
Note that the present embodiment can be applied not only to the daemon program but also to other application programs. For example, the use of word processors and the like by ordinary people is a routine one. Therefore, when a call other than a system call that is called for routine use is called, it may be determined that the word processor has a computer virus property. Although a word processor is used as an example, it can also be applied to application programs such as a spreadsheet program, a presentation program, a mailer, and a browser.
(Embodiment 9: processing)
FIG. 27 illustrates a flowchart of processing of the computer virus detection device according to the present embodiment.
In step S2701, a breakpoint is set in the application program at the position indicated by the breakpoint position information.
In step S2702, the process waits until execution of the application program reaches a breakpoint.
In step S2703, a history of reaching the breakpoint is added.
In step S2704, a determination program is executed. Here, the history inspection program is also executed.
In step S2705, it is determined whether or not to end. If not finished, the process proceeds to step S2706.
In step S2706, execution of the application program is continued. Thereafter, the process proceeds to step S2702.
Note that the process of step S2703 may be performed after the determination program is executed.
(Embodiment 9: Main effects)
According to the present embodiment, since the computer virus nature is determined based on whether the operation of the application program shows a different tendency than before, it is useful for monitoring the behavior of a daemon program or the like that repeatedly performs a certain operation. . In addition, if there is a history of normal operations, it is possible to make a determination of a computer virus, making it easy to create a determination program.
(Embodiment 10)
As a tenth embodiment of the present invention, a computer virus detection apparatus in which an application program is a virtual machine will be described.
(Embodiment 10: Configuration)
FIG. 28 illustrates a usage pattern of the computer virus detection device according to the present embodiment. Inside the computer 2801, a computer virus detection device 2802 and a virtual machine 2803 are operating. The computer virus detection device 2802 is a program that realizes the computer virus detection device according to any one of the first to ninth embodiments. The computer virus detection device 2802 sets a breakpoint in the virtual machine 2803 and monitors the behavior.
A “virtual machine” is an application program that executes another program 2805. Usually, the other program 2805 is described by a machine instruction of a computer having an assumed architecture. A typical example is one that executes a compiled program described in Java (registered trademark). Since a Java (registered trademark) program is assumed to be downloaded from the Internet, in many cases, the source / feature is unknown and the program may be a dangerous program. Thus, for example, a Java (registered trademark) virtual machine is designed to restrict a program to be executed from freely using an API (2804) to an OS to access computer resources. However, there are cases where a program 2805 running on the virtual machine freely accesses computer resources by utilizing a bug in the virtual machine.
Therefore, whether or not the computer virus detection apparatus 2802 of this embodiment sets a breakpoint in the virtual machine 2803, detects the behavior of the virtual machine 2803, and the virtual machine 2803 is not executing a program having a computer virus property. Judging. In the present embodiment, the fact that a virtual machine has a computer virus property also means that the virtual machine executes a program having a computer virus property.
(Embodiment 10: Main effects)
According to the present embodiment, it is possible to prevent execution of a program that uses a bug of a virtual machine.
(Embodiment 11)
As an eleventh embodiment of the present invention, an embodiment in which the computer in the tenth embodiment is a mobile phone will be described.
(Embodiment 11: Configuration)
FIG. 29 illustrates a usage pattern of the computer virus detection device according to the present embodiment. A computer 2801 in FIG. 28 is replaced with a mobile phone 2901.
(Embodiment 11: Main effects)
There is a remarkable improvement in the functionality of mobile phones. For example, not only a browser for the Internet but also a Java (registered trademark) virtual machine operates inside a mobile phone. In addition, an operating system that has conventionally been operated on a personal computer is now operating inside a mobile phone, and a program that operates on the mobile phone is complicated.
However, bugs and security holes may be found after cell phone sales begin. On the other hand, the number of mobile phones more than personal computers is on the market, and collecting mobile terminals is costly and time consuming. For this reason, if a computer virus that exploits bugs or security holes in a virtual machine that runs on a mobile phone is created, the scale of the infection cannot be predicted, which has a great social impact. For example, using a bug in a virtual machine, address book data of any mobile phone is collected, leading to leakage of privacy information.
Therefore, a computer that exploits bugs, security holes, etc. by operating a program that implements the computer virus detection device of the present invention inside a mobile phone and detecting a behavior by setting a breakpoint in a virtual machine. It becomes possible to prevent the action of viruses.

上記のように本発明によれば、登録された命令の実行有無により監視対象プロセスの実行を中止、あるいは実行前の状態にロールバックできるようになり、従来に比してユーザの負担を軽減してウィルスへの感染予防、及び、システムのクリーンアップができる。
また、本発明は、プログラム実行時の振る舞いを検出するため、従来のシグネチャスキャンでは必要であったスキャン前の圧縮ファイルの解凍や、暗号化ファイルの復号化等の前処理を必要としない。
したがって、本発明は、コンピュータウィルス検出装置として有用である。
As described above, according to the present invention, execution of a monitored process can be stopped or rolled back to a state before execution depending on whether or not a registered instruction is executed, thereby reducing the burden on the user compared to the conventional case. Can prevent virus infection and clean up the system.
In addition, since the present invention detects the behavior at the time of program execution, it does not require preprocessing such as decompression of the compressed file before scanning and decryption of the encrypted file, which are necessary in the conventional signature scan.
Therefore, the present invention is useful as a computer virus detection device.

【書類名】 明細書
【詳細な説明】
【0001】
技術分野
【0002】
この発明は、電子メール、WEB、ピア・ツー・ピアのファイル交換ソフトウェア等により、インターネットなどコンピュータの外部から導入されるなどして実行可能となったプログラムの実行をモニタリングして、コンピュータウィルスの振る舞い、若しくは、コンピュータウィルスに類似した振る舞いを検出し、プログラムの実行停止等の対応をすることに関する。
【0003】
背景技術
【0004】
現在、コンピュータウィルス(以下、単に「ウィルス」という場合がある。)の検出技術は、パターンマッチングを用いるものが主流である。この技術は、例えば、特開2003−216444、特開2002−196942、WO 02/086717 A1などにより開示されている。パターンマッチングは、コンピュータのメモリや、ハードディスク上のファイルに着目し、過去に発見されたウィルスの特徴的なシグネチャと比較してウィルスを検出する。パターンマッチングは誤検出が少ない技術であるが、既知のウィルスしか検出できない。
【0005】
現在、一日に、約10〜20種類の新しいウィルスが見つかっている。一般ユーザが使用するコンピュータが、そのような新しいウィルスを検出し、対処することができるようにするためには、頻繁にアップデートされるウィルス・シグネチャ・ファイルを速やかにアンチウィルス会社から入手して、コンピュータにインストールしなければいけない。ところで、新しいウィルスは、過去のウィルスをほんの少し変えたものが多い。このため、実際のウィルスの振る舞いは、どれも非常に似ているという特徴がある。それにもかかわらず、ウィルスのプログラムという情報としてのパターンは異なるので、ウィルスが発見されるごとに、ウィルス・シグネチャ・ファイルをインストールする必要がある。
【0006】
ウィルスの検出技術には、パターンマッチングの他に、ヒューリスティックスキャンがある。ヒューリスティックスキャンは、擬似的にコードを実行し、ウィルスに似た挙動をしないかを、エミュレーションに基づいて判断を行なう。しかし、実行ファイルのインストラクションを全てエミュレーションできるとは限らない。また、プログラムサイズが大きく、又は/及び、複雑に暗号化されたウィルスのエミュレーションには、非常に時間がかかる。
【0007】
発明の開示
【0008】
本発明では、コンピュータ上で、新規にプロセスを生成するか、または実行中のプロセスにアタッチ(Attach)して、プロセスを監視対象とし、コンピュータに重要な変更を加えることができるシステムコールなどの呼び出しを監視することで、振る舞いを監視する。そして、監視対象であるプロセスの振る舞いと、過去のコンピュータウィルスの特徴的な振る舞いと、を比較する。ウィルスの特徴的な振る舞いが検出されると、監視対象であるプロセスを中止できるように、ユーザに通知などをする。ここで、監視対象プロセスは、主に、インターネットに接続するプロセスを指す。
【0009】
図1は、コンピュータでのプロセスの実行を概念的に説明する図である。上位の層にアプリケーション101、102、電子メールソフトウェア103、WEBブラウザ104が動作する。このうち、アプリケーション102、電子メールソフトウェア103、WEBブラウザ104が、インターネットに接続などして、コンピュータの外部からプログラムを導入するプログラムを実行するプロセスであるとする。本発明では、それらのプロセスと、システムコールAPI層105と、の間に、本発明によるセキュリティ層を設ける。このセキュリティ層は、システムコールの呼び出しを監視する層である。
【0010】
システムコールAPI層105の下には、オペレーティングシステム(以下では、「OS」と略記する場合がある。)を実現するカーネル層106があり、その下層に、デバイスドライバ/ハードウェア107の層がある。
【0011】
通常のコンピュータにおけるOSにおいては、カーネルモードと、ユーザモードと、に分かれて処理が行なわれる。システムコールAPI層105より上の部分108は、ユーザモードで処理が行なわれる部分であり、システムコールAPI層105より下の部分109は、カーネルモードで処理が行なわれる部分である。
【0012】
ユーザモードで実行するプロセスは、個別のコンテキストと、仮想アドレス空間を持っている。そのため、同じユーザモードで実行するプロセス同士が、他のプロセスのメモリをアクセスできないようになっている。
【0013】
本発明は、アプリケーションプログラムの実行に際して設定するべきブレークポイントの位置と、そのアプリケーションプログラムの実行がそのブレークポイントに到達したときに、そのアプリケーションプログラムのスタックの内容に基づいて、そのアプリケーションプログラムがコンピュータウィルス性を有するかどうかを判断する判断プログラムとを関連付けて保持し、アプリケーションプログラムにブレークポイントを設定し、アプリケーションプログラムの実行がブレークポイントに到達した時には、そのブレークポイントの位置と関連付けて保持された判断プログラムを実行するコンピュータウィルス検出装置を提供する。
【0014】
また、コンピュータウィルス検出装置は、アプリケーションプログラムを保持し、保持されたアプリケーションプログラムを実行するときに、ブレークポイントをアプリケーションプログラムに設定するようになっていてもよい。
【0015】
また、ブレークポイントの位置は、システムコールAPI関数に基づいて定められていてもよい。このようにすることにより、図1のセキュリティ層が実現される。
【0016】
また、アプリケーションプログラムの実行が、ブレークポイントに到達したときには、システムコールAPI関数の引数を検査してもよい。
【0017】
さらに、システムコールAPI関数が、システムリソースを変更するものである場合には、システムコールの実行の前に、コンピュータウィルス検出装置がシステムリソースの複製が生成されるようになっていてもよい。
【0018】
また、コンピュータウィルス検出装置は、アプリケーションプログラムがコンピュータウィルス性を有すると判断された際には、システムコールAPI関数の実行を阻止するようになっていてもよい。
【0019】
また、システムコールAPI関数が通信を行なうものである場合には、コンピュータウィルス検出装置は、その通信を失敗させるよう外部の通信機器(例えば、ルータ)に命令を出力するようになっていてもよい。
【0020】
また、アプリケーションプログラムがコンピュータウィルス性を有するかどうかは、アプリケーションプログラムが到達したブレークポイントの履歴に基づいて判断されるようになっていてもよい。
【0021】
また、本発明において、アプリケーションプログラムは、Java(登録商標)などの言語で記述されたプログラムを実行するためのバーチャルマシンであってもよい。また、そのバーチャルマシンは、携帯電話で動作するものであってもよい。
【0022】
WINDOWS(登録商標)を含めたOSにおいては、プロセスの振る舞いをコントロールする方法として、カーネルドライバを書き、システムコールをフックする方法がある(例えば、コンピュータアソシエイツ社のeTrust Access Control "Soft hook"で用いられている方法)。一方、本発明によるプロセスの振る舞いの監視は、デバッガというソフトウェア開発で使われる機能を使用して行なわれる。
【0023】
本発明における振る舞いの監視は、全てユーザモード、つまりアプリケーション層で行なわれるという特徴を有する。これにより、カーネルドライバを用いる場合にしばしば引き起こされるシステムダウンなどの致命的なエラーの発生が無い。
【0024】
以下では、本発明の理解を助けるために、従来におけるデバッガの機能について概説を行なう。
【0025】
図2は、アプリケーションプログラムを実行するプロセス201と、デバッガ202と、の関係を例示する。(1)まず、デバッガ202が、プロセス201にアタッチする。アタッチにより、プロセス201とデバッガ202との関係がOSにより管理されるようになる。すなわち、OSは、デバッガ202にプロセス201を関連付け、例えば、プロセス201の状態に変化が発生すると、デバッガ202に通知が行なわれるようになる。(2)次に、デバッガ202は、プロセス201にブレークポイントを設定する。「ブレークポイント」は、プロセス201のプログラムカウンタが所定の値になった場合に、CPUの実行を停止させるメモリアドレスを示す。そのようなメモリアドレスを指定することを、ブレークポイントの設定という。ブレークポイントの設定を行なう方法としては、ブレークポイントが示すメモリアドレス値をCPUに設定したり、ブレークポイントのプログラムカウンタ値が示すメモリアドレスの命令を特殊な命令に置換したりすることにより実現される(例えば、Jonathan B.Rosenberg著、"How Debuggers Work、Algorithms, Data Structures, and Architecture"、Wiley Computer Publishing、1997年参照。)。その後、プロセス201が実行を開始し、ブレークポイントに到達すると、(2)実行が停止したことがOSに通知される。この通知は、プロセス201が行なうというよりも、プロセスの実行がブレークポイントに到達することによりCPUに割り込みが発生し、その割り込みを処理するための処理ルーチンにより行なわれる。なお、処理ルーチンは、OSの初期化などにより適宜設定されている。OSが通知を受けると、(4)デバッガ202に通知が行き、デバッガ202はプロセス201の実行がブレークポイントに到達したことを知る。その後、デバッガ202の利用者の操作により、(5)プロセス201のデバッグの操作が行なわれる。デバッグ操作の代表的なものとしては、プロセスのスタックの内容を読み、関数や手続きが呼ばれたシーケンスを調べたり、引数や変数の値などを調べたりする。
【0026】
なお、ブレークポイントはプロセスごとに設定されるものである。したがって、「アプリケーションプログラムを実行するプロセスにブレークポイントを設定する」という記述が正確であるが、記述が長くなるので、以降では、アプリケーションプログラムと、アプリケーションプログラムを実行するプロセスと、を同一視して、「アプリケーションプログラムにブレークポイントを設定する」などと記述する場合がある。
【0027】
図3は、従来技術において、高級言語での関数や手続きの呼び出しがどのようにコンパイルされるかを例示する。高級言語において、符号301に示すような「f(引数1,引数2,…,引数n);」という関数ないし手続き(以後、「関数」と省略する。)の呼び出しが記述されているとする。これをコンパイルすると、符号302に示すようなマシンインストラクションに変換される。すなわち、push命令により引数をスタックに積み、最後に、「call f」により、fを呼び出す。多くのCPUでは、call fのような、関数を呼び出すマシンインストラクションの実行により、呼び出された関数の処理から戻る際にプログラムカウンタへ設定される値がスタックに積まれる。
【0028】
図4は、関数fのコンパイル結果を例示する。fの呼び出しが行なわれると、まず、「push fp」というマシンインストラクションにより、fの呼び出しの前のフレームポインタ(fp)の値がスタックに積まれる。「フレームポインタ」は、関数呼び出しのためのスタックの部分を示すためのCPUのレジスタである。フレームポインタは、後述するように、関数の呼び出し列(コールシーケンス)を得るために重要な役割をする。次に、「move sp→fp」によりスタックポインタ(sp)の値をフレームポインタ(fp)にセットする。これにより、現在呼び出されているfのスタックの部分をフレームポインタ(fp)が指すようになる。その後、fの処理が行なわれる。fの呼び出しから復帰する際には、「pop fp」により、fの呼び出しの前のフレームポインタ(fp)の値が設定され、「ret」により、fの呼び出しから復帰する。例えば、スタックに積まれているプログラムカウンタの値が、プログラムカウンタに設定される。
【0029】
図5は、スタックに値が積まれた状態を例示する。スタック501の一番上の部分に積まれている値(すなわち、スタックの一番上の部分に格納されている値)が、現在実行中の関数に係るものであり、エリア501の部分には、引数の値が積まれている。エリア503には、関数呼び出し後のプログラムカウンタが積まれている。エリア504には、関数呼び出し前のフレームポインタ(fp)の値が積まれている。エリア505には、関数の中で定義されている自動変数の値などが格納されている。フレームポインタ(fp)は、エリア504の上部を指しており、エリア504に積まれている値は、前の関数呼び出しの時にスタック501に積まれたフレームポインタ(fp)が格納されている位置の上を指している。したがって、フレームポインタの値をたどることにより、どのような呼び出し列を経て、関数が呼び出されたかを知ることができる。また、スタックに積まれたプログラムカウンタの値を調べることにより、関数がプログラムのどの位置から呼ばれたかを知ることができる。また、スタックに積まれた引数を調べることにより、関数にどのような値が与えられたかを知ることができる。
【0030】
本発明に係るコンピュータウィルス検出装置は、このようなデバッガの機能を利用することにより、プロセスの振る舞いを監視する。ただし、従来技術におけるデバッガにおいては、人間がデバッガを操作してデバッグ対象のプロセスを調査するのに対して、本発明に係るコンピュータウィルス検出装置によるプロセスの振る舞いの監視は、自動的に行なわれる。
【0031】
また、本発明は、商用ソフトウェアにまつわる課題を解決するものである。以下、スパイウェアを例に用いて説明する。スパイウェアは、インターネット経由でその作成者または発信者に情報を送信するアプリケーションプログラムである。スパイウェアは、バックドア・ウィルスと似た振る舞いをする。悪質なスパイウェアは、ユーザ情報や、キーストロークを盗み、特定の通信チャネルを通して、他のマシンへ情報を送信する。
【0032】
しかし、アンチウィルス企業の多くは、そのポリシーとしてスパイウェアなどの商用ソフトウェアを検出しない。ハードディスクを破棄する際に使用するデータを消去する商用ソフトウェアがあり、それが友人から電子メールとして送られてくるかも知れないからである。ユーザの意図通りにデータを消去するプログラムは、アンチウィルスでは検出しない。
【0033】
したがって、プログラムを実行した結果が、コンピュータや、ユーザのビジネスにインパクトを与えるものであっても、現在のアンチウィルス技術では、それらの脅威を完全に防ぐことは不可能である。
【0034】
現在のウィルスは、わずかにLinux(登録商標)で活動するものがあるが、圧倒的にWINDOWS(登録商標)で活動する。その一つの原因として、WINDOWS(登録商標)を使うほとんどの人々は、アドミニストレータ権限をログオン・ユーザに加えていることが挙げられる。アドミニストレータ権限は、アプリケーションをインストールする際に必要だが、UNIX(登録商標)のようにシステム管理者のために一時的に、root(特権ユーザ)になる習慣がWINDOWS(登録商標)にはない。WINDOWS(登録商標)では、アドミニストレータのような特権ユーザのまま、メールで送られてきた不審なファイルがしばしば実行される。
【0035】
アドミニストレータ権限は、システムの全ての資源にアクセスできる。つまりはシステムが稼動するために必要な重要なファイルを改ざんできる。こういった環境で、ウィルスを実行すると、コンピュータの重要なファイルが改ざんされ、さらにはインターネットを通して、世界中のコンピュータがウィルスに感染することがある。プログラムの実行環境は、ユーザのためにもっと適切に保護されるべきである。
【0036】
発明を実施するための最良の形態
【0037】
以下、本発明を実施するための最良の形態について、図を用いて実施形態として説明する。なお、本発明は、これら実施形態に何ら限定されるものではなく、その要旨を逸脱しない範囲において、種々なる態様で実施し得る。
【0038】
(本発明の概要)
本発明は、プログラムの振る舞いに着目し、プログラムがウィルスかどうかを判断する。本発明を具現化したプロセスと、監視対象のプロセスは、デバッガ(Debugger)と、デバッギ(Debuggee)の関係に類似した関係を持つ。デバッガは、本発明を具現化したプロセスに対応し、デバッギは、監視対象のプロセスに対応する。
【0039】
デバッグされるプロセスをデバッギという。本発明は、監視対象プロセスをデバッギとして実行する。実行中のプロセスを監視する場合には、実行中のプロセスにアタッチする。
【0040】
本発明を具現化するプロセスは、監視対象プロセスの振る舞いをチェックするため、システムに重要な変更を加えるシステムコール(またはAPI関数)にブレークポイント(Breakpoints)を設定する。
【0041】
ブレークポイントは、Intel(登録商標)CPUの場合には、Int3のハードウェア割り込みインストラクションを、ブレークポイントが示すメモリアドレスに配置することにより実現できる。プロセスの実行がブレークポイントに到達すると、そのプロセスの実行は停止し、本発明に係るコンピュータウィルス検出装置が、そのプロセスのスタックの内容などを調査して、監視対象のプロセスの振る舞いと、過去のコンピュータウィルスの特徴的な振る舞いを比較する。
【0042】
ウィルスの特徴的な振る舞いとしては、以下のものを挙げることができる。
【0043】
・自分自身をシステムフォルダにコピーする。
【0044】
・ネットワークで共有されたディレクトリを探す。そして、自分自身をコピーする。
【0045】
・メールのアドレス帳にアクセスし、ウィルスを添付したメールを大量に送信する。
【0046】
・ファイル交換ソフトウェアがインストールされていれば、それを使って自分自身をばらまく。
【0047】
・重要なシステムファイルを消す。または改ざんする。
【0048】
・再起動しても、自分自身が実行されるように、システムを変更する。
【0049】
本発明は、監視対象プロセスのAPI呼び出しを過去のコンピュータウィルスの振る舞いなどと比較し、監視対象プロセスの停止や、ユーザへの警告を発する。
【0050】
以下、WINDOWS(登録商標)を例に具体的に述べる。WINDOWS(登録商標)では、ファイルやディレクトリを操作するAPIは、KERNEL32.DLLというファイルに含まれている。レジストリに関連するAPIは、ADVAPI32.DLLに含まれている。ネットワークの共有ドライブを操作するAPIは、MPR.DLLに含まれている。以下、これらをDLLファイルと呼ぶ。
【0051】
監視対象のプロセスがどのAPIを呼び出そうとしているか判断する方法を以下に述べる。監視対象プロセスが実行を開始するときに、DLLファイルは、仮想プロセス空間にマッピングされる。
【0052】
図6は、仮想プロセス空間601に、Kernel32.Dll、MRP.Dll、Advapi32.Dllがマッピングされた状態を例示する。このようにマッピングが行なわれることにより、監視対象プロセスは、例えば、Advapi32.Dllで定義されているRegCreateKeyExなどの関数を呼び出すことができる。
【0053】
図7は、プロセスの仮想メモリ空間を示す。仮想メモリ空間700は、メモリアドレスの小さい方から、インストラクションの部分701、ヒープの部分702、DLLファイルがマッピングされる部分703、スタックの部分704を有する。部分703は、ヒープの部分702とスタックの部分704との間に位置し、DLLファイルがマッピングされる。すなわち、部分703のメモリアドレスに対して参照を行なうと、ファイルとして格納されているDLLファイルの内容が得られる。
【0054】
DLLファイルのマップアドレス(DLLファイルが仮想メモリ空間へマッピングされた部分の最初のアドレス)は、イメージベースと呼ばれ、各DLLでユニークに、他と重複しないよう決められている。
【0055】
例えば、レジストリを操作するRegOpenKeyExAというAPIは、ADVAPI32.DLLに含まれている。
【0056】
RegOpenKeyExAのアドレスを、「ADVAPI32.DLLのイメージベース」+「RegOpenKeyExAのRVA」により求める。なお、「RVA」とは、Relative Virtual Addressの略である。すなわち、DLLファイルの中に、APIの定義が現れる相対的な位置である。
【0057】
アドレスが求められたら、デバッガ用APIなどを使用してブレークポイントを設定する。
【0058】
監視対象プロセスの実行が、ブレークポイントにヒットしたら、APIの引数などを解析する。
【0059】
監視対象プロセスが、レジストリやシステムファイルに変更を加えるAPIを呼び出した場合、このステップで、バックアップを作成する。
【0060】
ウィルスの特徴を検出したらプロセスの停止、またはユーザにレポートする。検出しなければ処理を続ける。
【0061】
具体例を説明する。多くのWINDOWS(登録商標)ウィルスは実行すると再起動時に、システムに常駐するために、以下のレジストリへ値を追加する。
【0062】
HKEY_LOCAL_MACHINE¥SOFTWARE¥MICROSOFT¥Windows¥CurrentVersion¥Run
参考として、このキーに値を追加するメジャーなウィルスを以下に挙げる。
【0063】
NIMDA,LOVELATTER,TROJ_MATRIX,W32_MAGISTR,TROJ_HYBRIS,WORM_KLEZ,WORM_BUGBEAR,WORM_BADTRANS,JS_EXCEPTION,WORM_LIRBA
メールで受け取った不明なプログラムがシステムに常駐する必要はないと考えられる。
【0064】
上記レジストリを追加するには、次の2ステップのAPI呼び出しが必要である。
【0065】
RegCreateKeyExA … Runの下に新しいキーを作る。
【0066】
RegSetValueExA … 値をセットする。
【0067】
上の2つのAPIは、ADVAPI32.DLLに含まれている。ここでは、ADVAPI32.DLLのイメージベースが0x77D80000であるとする。数字の0xは、16進数であることを示す。また、RegCreateKeyExAのRVAが0x29427、RegSetValueExAのRVAが0x2C58Dであるとする。
【0068】
RegCreateKeyExAのアドレスは、
0x77D80000+0x29427=0x77DA9427
RegSetValueExAのアドレスは、
0x77D80000+0x2C58D=0x77DAC58D
で求められる。これらは仮想アドレス空間であるから同時に複数のプロセスが実行されていても、同じ仮想アドレスでDLLファイルがマップされる。
【0069】
アドレスを求めたら、それらへブレークポイントを設定する。
【0070】
もし、監視対象のプロセスが、WINDOWS(登録商標)起動時に自動実行するプログラムであれば、RegCreateKeyExAのブレークポイントがヒットする。次にスタックを解析する。C言語などのコンパイラでは、スタックを介して引数が受け渡されるようなマシンインストラクションが生成されるためである。
【0071】
80000002 0041f028 ADVAPI32!RegCreateKeyExA
例えば、上記の数値が得られたとする。RegCreateKeyExAを呼ぶ際には、2番目の引数はレジストリの位置である。この例では、メモリアドレス41f028へレジストリの位置が入っている。そこで、メモリアドレス41f028をチェックする。
【0072】
>41f028
41f028 SOFTWARE¥Microso
41f038 ft¥Windows¥Curre
41f048 ntVersion¥Run¥Vi
41f058 rus
APIと引数から、監視プロセスは、Runの下にVirusというキーを作ろうとしていることが分かる。
【0073】
プログラム実行前の状態に復帰する場合には、Virusキーを削除すればよい。そこで、システムコールの実行の前にレジストリなどのシステムリソースの変更の履歴や、システムリソースの複製、などを保持するようにしてもよい。
【0074】
同様に、プログラムの振る舞いを把握するために必要なAPIをチェックし、その呼び出しの傾向を解析する。
【0075】
呼び出しを監視するAPIと、引数の対応(以下これを検出ルールと呼ぶ)は、ハードコーディングではなく、検出ルールを記したファイルを外部、例えばインターネットから読み込むことで追加、変更できることが望ましい。
【0076】
この方法では、ファイルをスキャンするオーバーヘッドは、一切無い。ウィルスの特徴的な振る舞いを検出したら、監視対象のプロセスをユーザの意思により、中止させられるように、ダイアログボックス等を表示するのが好適である。
【0077】
または、プログラムを中止せずに、続けて実行する。フローチャートを図8に例示する。
【0078】
(実施形態1)
本発明の実施形態1として、ブレークポイント位置情報と、アプリケーションプログラムがそのブレークポイント位置情報で示すブレークポイントに到達した場合に実行する判断プログラムと、を関連付けて保持し、ブレークポイントをアプリケーションプログラムに設定して、判断プログラムを実行するコンピュータウィルス検出装置について説明する。
【0079】
(実施形態1:構成)
図9は、本実施形態に係るコンピュータウィルス検出装置の機能ブロック図を例示する。コンピュータウィルス検出装置900は、ブレークポイント情報保持部901と、ブレークポイント設定部902と、判断プログラム実行部903と、を有する。
【0080】
なお、以下の説明から明らかになるように、これらの部を有するコンピュータウィルス検出装置は、コンピュータで動作するプログラムとして実現が可能である。したがって、図9は、そのようなプログラムのモジュール構成を示す図であると解釈することもできる。すなわち、そのようなプログラムは、ブレークポイント情報保持部をプログラムにより実現するプレークポイント情報保持ステップと、ブレークポイント設定部をプログラムにより実現するブレークポイント設定ステップと、判断プログラム実行部をプログラムにより実現する判断プログラム実行ステップと、をコンピュータに実行させるためのプログラムである。
【0081】
「ブレークポイント情報保持部」901は、ブレークポイント情報を保持する。例えば、ハードディスクや半導体メモリなどに、ブレークポイント情報を保持する。「ブレークポイント情報」とは、ブレークポイント位置情報と、判断プログラムと、を含む情報である。「含む」とあるので、ブレークポイント情報の成分は、ブレークポイント位置情報と判断プログラムとに限られない場合がある。
【0082】
「ブレークポイント位置情報」とは、アプリケーションプログラムの実行に際して設定するべきブレークポイントの位置を示す情報である。ブレークポイントの位置は、例えば、アプリケーションプログラムのメモリアドレスによって示される。また、アプリケーションプログラムが呼び出す関数、手続き、メソッド(以下、「関数など」という。)の名前によっても示される場合がある。
【0083】
「判断プログラム」とは、そのアプリケーションプログラムの実行が前記ブレークポイントに到達したときに、そのアプリケーションプログラムの実行で参照されるスタックの内容に基づいて、そのアプリケーションプログラムがコンピュータウィルス性を有するかどうかの判断を行なうためのプログラムである。「そのアプリケーションプログラム」とは、後で説明されるブレークポイント設定部902によりブレークポイント位置情報で示される位置にブレークポイントが設定されるアプリケーションプログラムを意味する。「前記ブレークポイント」とは、ブレークポイント位置情報が示す位置に設定されたブレークポイントを意味する。
【0084】
「アプリケーションプログラムがコンピュータウィルス性を有する」場合とは、アプリケーションプログラム自身がコンピュータウィルスである場合のみならず、アプリケーションプログラムがコンピュータウィルスに感染した場合、アプリケーションプログラムのバグやセキュリティホールなどが利用されて設計時には想定されていなかった動作をする場合、などを含む。例えば、ウェブサーバプログラムのバグを利用して、悪意を持った人間が、通常の操作では得ることができないファイルの内容を得るなどの動作をする場合である。
【0085】
そのアプリケーションプログラムの実行で参照されるスタックの内容に基づいて、そのアプリケーションプログラムがコンピュータウィルス性を有するかどうかの判断を行なう方法としては、種々のものがある。例えば、そのアプリケーションプログラムの実行で参照されるスタックを、スタックの上部からフレームポインタをたどってスタックの下部までたどることができるかどうかを判断する。コンピュータウィルスの中には、スタックの内容を破壊することにより、アプリケーションプログラムが正常に動作するならば呼び出さない態様でシステムコールなどを呼び出す。そこで、スタックの内容が破壊されていないかどうかを判断する。その判断の一つとして、フレームポインタをたどり、プログラムの実行において最初に呼ばれる関数など(例えば、_startupという名前の関数など)の呼び出しまでたどることができるかどうかにより、アプリケーションプログラムがコンピュータウィルス性を有するかどうかの判断を行なう。
【0086】
また、アプリケーションプログラムが、ブレークポイントに到達した際、どのような関数などの呼び出し系列を経て到達したかを調べることで、コンピュータウィルス性を有するかどうかの判断を行なってもよい。もし、想定されない関数などの呼び出しの系列の後にブレークポイントに到達している場合には、コンピュータウィルス性を有することが疑われる。
【0087】
また、ブレークポイントが設定された関数などの引数を調べることにより、アプリケーションプログラムがコンピュータウィルス性を有するかどうかを判断してもよい。例えば、電子メールを用いて他のコンピュータに自らを感染させるコンピュータウィルスは、電子メールアドレスを取得するために電子メールアドレスのアドレス帳をアクセスする。そこで、アドレス帳へのアクセスを行なうための引数が指定されているかどうかに基づいて、判断を行なうようになっていてもよい。
【0088】
なお、多くの場合、コンピュータウィルス検出装置を実現するプログラムを実行するプロセスと、アプリケーションプログラムを実行するプロセスとは、異なるプロセスであり、通常は、コンピュータウィルス検出装置を実現するプログラムが、アプリケーションプログラムを実行するプロセスのメモリ空間の内容、特にスタックの内容を読むことはできない。しかし、オペレーティングシステムは、特定の関係にあるプロセス間であれば、あるプロセスが他のプロセスのメモリ空間やレジスタの内容を読んだり、変更したりすることを許可する機能を有しているのが通常である。ここでいう「特定の関係」の例としては、親子関係や、同じユーザが実行しているプロセスであり、他のプロセスに対して所定のシステムコール(例えば、attachなど)を実行したという関係、などがある。したがって、コンピュータウィルス検出装置をプログラムにより実現する場合には、そのプログラムを実行するプロセスと、アプリケーションプログラムを実行するプロセスと、は特定の関係になっている必要がある。
【0089】
なお、ほとんどのオペレーティングシステムでは、他のプロセスのメモリ空間やレジスタの内容を読んだり、変更したりするためのシステムコールが提供されている。あるいは、/dev/procというスペシャルデバイスを用いて、他のプロセスのメモリ空間やレジスタの内容を読んだり、変更したりすることができるようになっている場合もある。
【0090】
判断プログラムは、例えば、インタープリタによって実行されるものであってもよい。例えば、判断プログラムがLisp、Perl、Rubyなどの言語により記述されていてもよい。また、判断プログラムは、コンピュータが直接実行できるマシンインストラクションの列からなっていてもよい。この場合には、コンピュータウィルス検出装置を実現するプログラムの一部として、判断プログラムが組み込まれていてもよい。あるいは、判断プログラムが、例えば、動的ライブラリなどとして、動的にコンピュータウィルス検出装置を実現するプログラムにロードされるようになっていてもよい。なお、判断プログラムが、インタープリタで実行されるものであったり、動的にロードされるものであったりする場合には、判断プログラムを差し替えることが容易に行なえる。
【0091】
図10は、ブレークポイント情報がブレークポイント情報保持部901により保持されている状態の一例を示す。図10(a)においては、ブレークポイント情報がテーブルに保持されている。列1001には、ブレークポイント位置情報が格納され、列1002には、判断プログラムが格納される。図10(b)は、判断プログラムへのポインタがテーブルに格納されている状態の一例を示す。そのポインタは、コンピュータウィルス検出装置を実現するプログラムを実行するプロセスのメモリ空間内部における特定の場所を指す。
【0092】
図11は、アプリケーションプログラムごとにブレークポイント情報が提供されている様子を例示する。ブレークポイント情報保持部901は、このように、アプリケーションプログラムごとにブレークポイント情報を保持していてもよい。
【0093】
「ブレークポイント設定部」902は、アプリケーションプログラムに、ブレークポイント情報保持部901で保持されたブレークポイント情報に基づいて、ブレークポイント情報を設定する。すなわち、ブレークポイント情報に含まれるブレークポイント位置情報が示す位置にブレークポイントを設定する。この設定は、オペレーティングシステムが提供するシステムコールやスペシャルデバイスを用いて行なう。「基づいて」とは、例えば、ブレークポイント位置情報が関数などの名前を用いて表現されている場合には、関数などの名前から、その関数などのアドレスを得ることを意味する。関数などの名前と、そのアドレスと、の対応付けは、アプリケーションプログラムのシンボルテーブルを読むことなどによって得ることができる。
【0094】
「判断プログラム実行部」903は、前記アプリケーションプログラムの実行が、ブレークポイント設定部902で設定されたブレークポイントに到達したとき、前記ブレークポイント情報に含まれる判断プログラムを実行する。「前記アプリケーションプログラム」とは、ブレークポイント設定部902によりブレークポイントが設定されたアプリケーションプログラムである。コンピュータウィルス検出装置は、ブレークポイントが設定されたアプリケーションプログラムの実行がブレークポイントに到達するまで待つことを行なう。このためには、例えば、waitシステムコールが呼び出される。アプリケーションプログラムの実行がブレークポイントに到達すると、(1)waitシステムコールからコンピュータウィルス検出装置の処理が再開し、(2)どのブレークポイントに到達したかを判断し、(3)判断プログラム実行部903に、判断プログラムを実行させる。アプリケーションプログラムがどのブレークポイントに到達したかを判断するには、アプリケーションプログラムを実行するプロセスのレジスタに保持されているプログラムカウンタの値を取得することにより判断する。
【0095】
(実施形態1:処理)
図12は、コンピュータウィルス検出装置の処理のフローチャートを例示する。
【0096】
ステップS1201において、ブレークポイント位置情報が示す位置に、ブレークポイントを、アプリケーションプログラムに設定する。例えば、この処理はブレークポイント設定部902により行なわれる。
【0097】
ステップS1202において、アプリケーションプログラムの実行が、ブレークポイントに到達するまで待つ。この処理は、例えば、waitシステムコールを実行することにより、実現される。
【0098】
ステップS1203において、アプリケーションプログラムの実行が到達したブレークポイントに対応する判断プログラムを実行する。例えば、この処理は判断プログラム実行部903により行なう。
【0099】
ステップS1204において、処理を終了するかどうかを判断する。例えば、ステップS1203における判断プログラムの実行により、アプリケーションプログラムがコンピュータウィルス性を有すると判断された場合には、処理を終了する。もし、処理を終了しないと判断された場合には、ステップS1205へ処理を移行する。
【0100】
ステップS1205において、アプリケーションプログラムの実行を続ける。アプリケーションプログラムがブレークポイントに到達すると、アプリケーションプログラムの実行が停止するので、停止したところから処理を再開させる。例えば、アプリケーションプログラムを実行するプロセスにシグナル(例えば、SIG_CONT)を送る。その後、ステップS1202へ処理を移行する。
【0101】
なお、コンピュータウィルス検出装置は、ブレークポイント情報保持ステップと、ブレークポイント設定ステップと、判断プログラム実行ステップと、を含むコンピュータウィルス検出方法を使用するための装置と考えることができる。「ブレークポイント情報保持ステップ」は、ブレークポイント情報を保持するステップであり、「ブレークポイント設定ステップ」は、アプリケーションプログラムに、ブレークポイント情報保持ステップで保持されたブレークポイント情報に基づいて、ブレークポイントを設定するステップであり、「判断プログラム実行ステップ」とは、アプリケーションプログラムの実行が、ブレークポイント設定ステップで設定されたブレークポイントに到達したとき、ブレークポイント情報に含まれる判断プログラムを実行するステップである。すなわち、ブレークポイント情報保持ステップは、ブレークポイント情報保持部を動作するステップであり、ブレークポイント設定ステップは、ブレークポイント設定部を動作するステップであり、判断プログラム実行ステップは判断プログラム実行部を実行するステップである。なお、本発明に係るコンピュータウィルス検出方法の使用は、本発明に係るコンピュータウィルス検出装置に限定されることはない。
【0102】
(実施形態1:主な効果)
本実施形態により、オペレーティングシステムのカーネル内部に修正を加えることなく、アプリケーションプログラムを実行するプロセスの振る舞いを、コンピュータウィルス検出装置により監視することができるので、システムダウンの発生を回避することが可能となる。また、コンピュータウィルスの振る舞いは非常に似ている場合が多いので、従来のアンチウィルスソフトウェアにおいて必要であった、パターンファイルを最新のものに更新し続けることの必要性が低くなったり、パターンファイルの更新が不要となったりする。
【0103】
(実施形態2)
本発明の実施形態2として、アプリケーションプログラムを保持するコンピュータウィルス検出装置を説明する。
【0104】
図13は、本実施形態に係るコンピュータウィルス検出装置による表示画面を例示する。ウィンドウ1301は、本実施形態に係るコンピュータウィルス検出装置が表示するウィンドウである。そのウィンドウのサブウィンドウ1302に、アプリケーションプログラムのアイコンが表示されている。必要に応じて、ウィンドウ1301の外に表示されているアイコン(例えば、アイコン1304)をドラッグして、サブウィンドウ1302の内部に移動させることができる。サブウィンドウ1302の内部に表示されたアイコン(例えば、アイコン1303)をダブルクリックなどすることにより、アプリケーションプログラムを実行するプロセスが、コンピュータウィルス検出装置を実行するプロセスの子プロセスとして生成され、その振る舞いが監視される。
【0105】
(実施形態2:構成)
図14は、本実施形態に係るコンピュータウィルス検出装置の機能ブロック図を例示する。コンピュータウィルス検出装置1400は、ブレークポイント情報保持部901と、ブレークポイント設定部902と、判断プログラム実行部903と、アプリケーションプログラム保持部1401と、プログラム実行開始部1402と、ブレークポイント設定命令部1403と、を有する。
【0106】
したがって、本実施形態に係るコンピュータウィルス検出装置は、実施形態1に係るコンピュータウィルス検出装置が、さらに、アプリケーションプログラム保持部1401と、プログラム実行開始部1402と、ブレークポイント設定命令部1403と、を有する構成となっている。なお、本明細書においては、同じ定義が適用される部には、できるだけ同じ符号を割り当てることにする。なお、同じ符号が割り当てられていることは、実際の製造などにおいて、同一の構成などになることを意味するものではない。
【0107】
「アプリケーションプログラム保持部」1401は、アプリケーションプログラムを保持する。保持には、種々の形態がある。例えば、アプリケーションプログラム全体を格納する形態がある。また、アプリケーションプログラムが格納されている場所、例えばファイルシステムにおけるパスなどで表現される、を格納する形態もあり得る。
【0108】
「プログラム実行開始部」1402は、アプリケーションプログラム保持部1401で保持されたアプリケーションプログラムの実行を開始する。例えば、コンピュータウィルス検出装置を実現するプログラムを実行するプロセスの子プロセスとして、アプリケーションプログラムの実行を開始する。
【0109】
「ブレークポイント設定命令部」1403は、プログラム実行開始部1402で実行が開始されるアプリケーションプログラムに対して、ブレークポイント設定部902に、ブレークポイントの設定を命令する。例えば、ブレークポイント設定部902を実現する関数などの呼び出しを行なう。
【0110】
(実施形態2:処理)
図15は、本実施形態に係るコンピュータウィルス検出装置の処理のフローチャートを例示する。
【0111】
ステップS1501において、アプリケーションプログラムを保持する。この処理は、アプリケーションプログラム保持部1401により行なわれる。例えば、図13において、アイコン1304をサブウィンドウ1302の内部にドラッグされたことを検出し、アイコン1304が表わすアプリケーションプログラムを保持する。
【0112】
ステップS1502において、アプリケーションプログラムが選択されるまで待つ。例えば、図13において、サブウィンドウ1302の内部のアイコンがダブルクリックされるまで待つ。
【0113】
ステップS1503において、ブレークポイント位置情報が示す位置に、ブレークポイントを、選択されたアプリケーションに設定することを命ずる。この処理は、ブレークポイント設定命令部1403により行なわれる。
【0114】
ステップS1504において、ブレークポイントの設定の完了を待つ。例えば、ブレークポイント設定部902を実現する関数などの呼び出しから戻るまで待つ。
【0115】
ステップS1505において、選択されたアプリケーションプログラムを実行する。より正確に述べると、選択されたアプリケーションプログラムを実行するためのプロセスを実行させる。ステップS1505の後は、図12のフローチャートのステップS1202、ステップS1203、ステップS1204、ステップS1205を実行することとなる。最近のオペレーティングシステムにおいては、一つのプロセスの中で複数のスレッドを並列/平行に動作させることが可能となっている。そこで、ステップS1202、ステップS1203、ステップS1204、ステップS1205の実行は、図15のフローチャートを実行するスレッドとは別のスレッドにより行なわれてもよい。
【0116】
ステップS1506により、処理を終了するかどうかを判断する。例えば、コンピュータウィルス検出装置の操作者が、終了ボタンを押したかどうかにより判断する。もし、終了でなければ、ステップS1502へ戻る。
【0117】
(実施形態2:主な効果)
本実施形態により、振る舞いを監視するべきアプリケーションプログラムを実行するプロセスを容易に生成することが可能となる。また、コンピュータウィルスを外部から導入する虞が無いアプリケーションプログラムは、監視の対象としないようにすることができるので、ブレークポイントの設定により、そのようなアプリケーションプログラムを実行するスピードを低下させることがない。
【0118】
(実施形態3)
本発明の実施形態3として、システムコールAPI関数にブレークポイントを設定し、プロセスの振る舞いを監視するコンピュータウィルス検出装置について説明する。
【0119】
(実施形態3:構成)
本実施形態に係るコンピュータウィルス検出装置は、実施形態1又は2のコンピュータウィルス検出装置のブレークポイント情報保持部901が保持するブレークポイント情報を、アプリケーションプログラムのシステムコールAPI関数に基づいて定められるようにしたものである。
【0120】
「システムコールAPI関数」とは、システムコールを呼び出すためのライブラリ関数などを意味する。そのようなライブラリ関数などは、通常は、システムコールに対する引数をスタックに積み、トラップ命令を実行するようになっている。トラップ命令の実行により、オペレーティングシステムによりCPUに設定された割り込みルーチンが起動され、オペレーティングシステム内部の処理が開始される。スタックに引数を積み、トラップ命令を実行する処理を、直接に高級言語で表現することは困難であるので、そのような処理を行なうライブラリ関数などが用意されている。
【0121】
図16は、本実施形態におけるブレークポイント情報を例示する。図16において、RegCreateKeyExAがシステムコールAPI関数の名前となっている。したがって、ブレークポイント設定部がブレークポイントを設定する場合には、システムコールAPI関数の名前をアドレスに変換する必要がある。その変換の処理については、概要の項で説明した通りである。
【0122】
(実施形態3:主な効果)
コンピュータウィルスは、システムコールAPI関数を用いて、自身をコンピュータに感染させることが多いので、システムコールAPI関数の呼び出しを検出して、アプリケーションプログラムがコンピュータウィルス性を有するかどうかを判断することで、少ないブレークポイントの設定で的確に判断することが可能となる。
【0123】
(実施形態4)
本発明の実施形態4として、システムコールAPI関数の引数の検査に基づいて、判断を行なうコンピュータウィルス検出装置について説明する。
【0124】
(実施形態4:構成)
本実施形態に係るコンピュータウィルス検出装置は、実施形態3に係るコンピュータウィルス検出装置において、判断プログラムに、システムコール検査プログラムを含ませた構成となっている。「システムコール検査プログラム」とは、そのアプリケーションプログラムが呼び出すシステムコールAPI関数の引数の検査に基づいて、そのアプリケーションプログラムがコンピュータウィルス性を有するかどうかの判断をするためのプログラムである。「そのアプリケーションプログラム」とは、ブレークポイント設定部902によりプレークポイントが設定されたアプリケーションプログラムを意味する。
【0125】
したがって、本実施形態においては、アプリケーションプログラムの実行がブレークポイントに到達すると、アプリケーションプログラムのシステムコールAPI関数の引数が検査されることになる。この検査の結果に基づいて、アプリケーションプログラムがコンピュータウィルス性を有するかどうかが判断される。
【0126】
なお、本実施形態において、引数が検査されるシステムコールAPI関数は、ブレークポイントが設定されたものに限定はされない。例えば、アプリケーションプログラムのマシンインストラクションを全て調べて、全てのシステムコールAPI関数の引数が検査されるようになっていてもよい。また、到達したブレークポイントでのシステムコールAPI関数の引数を記憶しておき、後にブレークポイントに到達したときに、記憶されたシステムコールAPI関数に引数を検査するようになっていてもよい。
【0127】
(実施形態4:主な効果)
本実施形態では、システムコールAPI関数の引数の検査に基づいて、コンピュータウィルス性が判断されるので、より的確に判断を行なうことが可能となる。
【0128】
(実施形態5)
本発明の実施形態5として、到達したブレークポイントにおけるシステムコールAPI関数の引数を検査するコンピュータウィルス検出装置について説明する。
【0129】
(実施形態5:構成)
本実施形態に係るコンピュータウィルス検出装置は、実施形態4に係るコンピュータウィルス検出装置において、システムコール検査プログラムによって検査される引数を、ブレークポイント情報保持部901が保持するブレークポイント位置情報で定められるシステムコールAPI関数の引数としたものである。
【0130】
例えば、図16に例示されるように、RegCreateKeyExAというシステムコールAPI関数にブレークポイントが設定され、アプリケーションプログラムの実行がそのブレークポイントに到達した場合には、システムコール検査プログラムは、そのRegCreateKeyExAの引数を検査する。その検査の例は、本発明の概要の項で述べたとおりである。
【0131】
(実施形態5:主な効果)
本実施形態により、呼び出されたシステムコールAPI関数の引数の検査に基づいてコンピュータウィルス性の判断がされるので、より的確に判断を行なえる。
【0132】
(実施形態6)
本発明の実施形態6として、システムリソースを変更するシステムコールAPI関数が呼ばれた場合、変更されるシステムリソースの複製を生成するコンピュータウィルス検出装置について説明する。
【0133】
(実施形態6:構成)
本実施形態に係るコンピュータウィルス検出装置は、実施形態4または5のコンピュータウィルス検出装置において、判断プログラムに、複製作成プログラムを含ませた構成となっている。「複製作成プログラム」は、そのアプリケーションプログラムのシステムコールAPI関数によりシステムリソースが変更される場合に、その変更されるシステムリソースの複製を生成する。「そのアプリケーションプログラム」とは、ブレークポイント設定部902によりブレークポイントの設定が行なわれたアプリケーションプログラムである。
【0134】
したがって、本実施形態においては、ブレークポイント位置情報は、システムリソースを変更するシステムコールAPI関数の位置を示すこととなる。ここでいうシステムリソースとは、例えば、レジストリ、ファイルなど、コンピュータが使用するリソースのうち、複製が可能なリソースを意味する。
【0135】
例えば、レジストリを変更するシステムコールAPI関数にブレークポイントを設定しておき、アプリケーションプログラムの実行が、そのブレークポイントに到達した場合には、レジストリの複製をする複製作成プログラムが実行される。複製が作成されると、システムコールによりレジストリの変更が行なわれる。レジストリの複製するにあったては、レジストリ全体を複製してもよいし、変更される部分だけを複製してもよい。レジストリの変更される部分は、システムコールAPI関数の引数により判断することができる。
【0136】
なお、本実施形態において、複製作成プログラムの実行は、アプリケーションプログラムがコンピュータウィルス性を有すると判断される場合に行なうようにしてもよい。これにより、作成される複製の量を減らすことができる。
【0137】
(実施形態6:処理)
図17は、本実施形態に係るコンピュータウィルス検出装置の処理のフローチャートを例示する。
【0138】
ステップS1701において、ブレークポイント位置情報が示す位置に、ブレークポイントをアプリケーションプログラムに設定する。
【0139】
ステップS1702において、アプリケーションプログラムの実行がブレークポイントに到達するまで待つ。
【0140】
ステップS1703において、判断プログラムを実行する。
【0141】
ステップS1704において、判断プログラムの実行の結果が、アプリケーションプログラムがコンピュータウィルス性を有するものであるかどうかを判定する。もし、コンピュータウィルス性を有するものであれば、ステップS1705へ処理を移行させ、そうでなければ、ステップS1707へ処理をスキップさせる。
【0142】
ステップS1705において、アプリケーションプログラムがシステムリソースを変更しようとしているかどうかを判定する。この判定は、到達したブレークポイントに係るシステムコールAPI関数の種類、その引数を調べることにより行なうことができる。もし、システムリソースを変更しようとしている場合には、ステップS1706へ処理を移行させ、そうでなければ、ステップS1707へ処理をスキップさせる。
【0143】
ステップS1706において、複製作成プログラムにより、システムリソースの複製を作成する。
【0144】
ステップS1707において、全体の処理を終了するかどうかを判断する。もし、終了しないと判断されると、ステップS1708へ処理を移行させる。
【0145】
ステップS1708において、アプリケーションプログラムの実行を続け、ステップS1702へ処理を移行させる。もし、アプリケーションプログラムがコンピュータウィルスであり、システムリソースが不正なものに変更されても、ステップS1706で作成された複製によりシステムを復元することができる。
【0146】
(実施形態6:主な効果)
本実施形態においては、変更されるシステムリソースの複製が作成されるので、アプリケーションプログラムがコンピュータウィルスでありコンピュータが感染したとしても、システムリソースの複製を用いてシステムの復旧が可能となる。
【0147】
(実施形態7)
本発明の実施形態7として、アプリケーションプログラムがコンピュータウィルス性を有すると判断された場合に、システムコールAPI関数の実行をさせないコンピュータウィルス検出装置について説明する。
【0148】
(実施形態7:構成)
図18は、本実施形態に係るコンピュータウィルス検出装置の機能ブロック図を例示する。本実施形態に係るコンピュータウィルス検出装置の構成は、実施形態1から6のいずれかのコンピュータウィルス検出装置が、実行阻止部を有する構成となっている。したがって、例えば、コンピュータウィルス検出装置1800は、ブレークポイント情報保持部901と、ブレークポイント設定部902と、判断プログラム実行部903と、実行阻止部1801と、を有する。コンピュータウィルス検出装置1800は、このほかに、アプリケーションプログラム保持部、プログラム実行開始部、ブレークポイント設定命令部を有していてもよい。
【0149】
「実行阻止部」1801は、判断プログラム実行部903による判断の結果、判断の対象となったアプリケーションプログラムがコンピュータウィルス性を有すると判断された場合に、アプリケーションプログラムのシステムコールAPI関数の実行をさせないための部である。
【0150】
スタックの使用が図5に例示されたものである場合には、実行阻止部1801は、フレームポインタ(fp)の値を用いて、部分504に格納されている関数呼び出し前のフレームポインタの値を取得してフレームポインタ(fp)に設定し、プログラムカウンタの値を部分503に格納されている値にして、システムコールAPI関数の実行をさせないようにする。
【0151】
(実施形態7:処理)
図19は、本実施形態に係るコンピュータウィルス検出装置の処理のフローチャートを例示する。
【0152】
ステップS1901において、ブレークポイント位置情報が示す位置に、ブレークポイントを、アプリケーションプログラムに設定する。
【0153】
ステップS1902において、アプリケーションプログラムの実行がブレークポイントに到達するまで待つ。
【0154】
ステップS1903において、判断プログラムを実行する。
【0155】
ステップS1904において、判断プログラムの結果、アプリケーションプログラムがコンピュータウィルス性を有するかどうかを判定する。もし、コンピュータウィルス性を有するのであれば、ステップS1905へ処理を移行させ、そうでなければ、ステップS1906へ処理をスキップさせる。
【0156】
ステップS1905において、システムコールAPI関数の実行をさせないようにする。この処理において、実行阻止部1801を用いる。
【0157】
ステップS1906において、全体の処理を終了させるかどうかを判断する。もし、終了させないのであれば、ステップS1907へ処理を移行させる。

ステップS1907において、アプリケーションプログラムの実行を続ける。その後、ステップS1902へ処理を移行させる。
【0158】
(実施形態7:主な効果)
本実施形態においては、危険なシステムコールの実行が阻止されるので、例えば、特定のワードプロセッサのマクロプログラムがコンピュータウィルス性を有する場合に、ワードプロセッサの機能を停止させることなく、危険なマクロプログラムの実行を阻止することが可能となり、危険なシステムコールの実行を阻止しつつ、アプリケーションプログラムの実行を継続することができる。
【0159】
(実施形態8)
本発明の実施形態8として、コンピュータウィルス性を有するアプリケーションプログラムの通信を阻止するコンピュータウィルス検出装置と、通信機器と、について説明する。
【0160】
図20は、本実施形態の概要を例示する。コンピュータ2001が、通信機器2002を介して外部の通信網2003に接続されている。通信機器2002の代表的な例としては、ルータがある。コンピュータ2001の内部では、アプリケーションプログラムを実行するプロセス2004と、コンピュータウィルス検出装置を実現するプロセス2005が動作し、プロセス2005は、プロセス2004の振る舞いを監視している。もし、プロセス2004が実行するアプリケーションプログラムがコンピュータウィルス性を有し、外部に対して通信2006を行なおうとしたとする。この場合、プロセス2005は、プロセス2004が外部に対して有害な通信を行なうとしているとみなして、その有害な通信を阻止するために、通信機器2002に対して通信阻止命令2007を出力する。通信機器2002は、通信阻止命令2007に基づいて、プロセス2004が行なおうとする通信のパケットを中継しないなどして、通信を阻止する。
【0161】
(実施形態8:コンピュータウィルス検出装置の構成)
図21は、本実施形態に係るコンピュータウィルス検出装置の機能ブロック図を例示する。本実施形態に係るコンピュータウィルス検出装置の構成は、実施形態1ないし7のいずれか一におけるコンピュータウィルス検出装置が、通信阻止命令出力部を有する構成となっている。例えば、コンピュータウィルス検出装置2100は、ブレークポイント情報保持部901と、ブレークポイント設定部902と、判断プログラム実行部903と、通信阻止命令出力部2101と、を有する。
【0162】
「通信阻止命令出力部」2101は、判断プログラム実行部903による判断の結果、判断の対象となったアプリケーションプログラムがコンピュータウィルス性を有すると判断された場合、そのアプリケーションプログラムが通信システムコールAPI関数を実行するときに、通信阻止命令を出力する。「通信阻止命令」とは、外部の通信機器に対して、アプリケーションプログラムが実行する通信システムコールAPI関数による通信を失敗させるための命令である。
【0163】
例えば、コンピュータウィルス性を持つと判断されたアプリケーションプログラムが、コンピュータの外部に対してデータを送信しようとしたり、コンピュータの外部からデータを受信しようとしたりするために、通信のためのシステムコールAPI関数を実行すると、外部の通信機器、例えばルータ、に対して、その通信を失敗させる命令が出力される。
【0164】
図22は、通信阻止命令の一例を示す。この例では、通信阻止命令はXMLなどの構造化文書として記述されている。図22は、例えば図20において、コンピュータ2001のIPアドレスが192.168.193.063であり、プロセス2004が、IPアドレスが10.139.210.254であり、ポートが25番である通信を行なおうとした場合に出力される通信阻止命令を示している。このような通信阻止命令は、例えば、SOAP(Simple Object Access Protocol)により、このような通信阻止命令が外部の通信機器に出力されるようになっていてもよい。
【0165】
(実施形態8:コンピュータウィルス検出装置の処理)
図23は、本実施形態に係るコンピュータウィルス検出装置の処理のフローチャートを例示する。
【0166】
ステップS2301において、ブレークポイント位置情報が示す位置に、ブレークポイントを、アプリケーションプログラムに設定する。
【0167】
ステップS2302において、アプリケーションプログラムの実行がブレークポイントに到達するまで待つ。
【0168】
ステップS2303において判断プログラムを実行する。
【0169】
ステップS2304において、アプリケーションプログラムが、コンピュータウィルス性を有するかどうかの判定を行なう。もし、コンピュータウィルス性を有すると判定されると、ステップS2305へ処理を移行させ、そうでなければ、ステップS2307へ処理をスキップする。
【0170】
ステップS2305において、到達したブレークポイントが通信システムコールAPI関数かどうかを判断する。もし、通信システムコールAPI関数であれば、処理をステップS2306へ移行させ、そうでなければ、ステップS2307へ処理をスキップさせる。
【0171】
ステップS2306において、外部の通信機器に通信阻止命令を出力する。この処理は、通信阻止命令出力部2101により行なわれる。
【0172】
ステップS2307において、全体の処理を終了するかどうか判定する。もし、終了しないのであれば、処理をステップS2308へ移行させる。
【0173】
ステップS2308において、アプリケーションプログラムの実行を続ける。もし、実行が続いて、有害な通信が行なわれたとしても、ステップS2306において出力された通信阻止命令により、通信が阻止されることになる。
【0174】
(実施形態8:通信機器の構成)
図24は、本実施形態に係る通信機器の機能ブロック図を例示する。通信機器2400は、通信阻止命令受信部2401と、通信阻止部2402と、を有する。
【0175】
「通信阻止命令受信部」2401は、通信阻止命令を受信する。通信阻止命令は、例えば、通信阻止命令出力部2101により出力されるものであり、XMLで記述された場合には、図22に例示したものとなる。通信阻止命令を受信するためのポートを用意しておき、通信阻止命令受信部2401は、このポートに通信阻止命令が送信されるまで待つ。また、必要に応じて、通信阻止命令を出力したプログラムが正当なプログラムであることを認証するための処理を行なってもよい。
【0176】
「通信阻止部」2402は、通信阻止命令受信部2401で受信された通信阻止命令に基づいて、通信を阻止する。例えば、通信阻止命令が図22に示すものである場合、192.169.193.063のIPアドレスから、10.139.210.254のIPアドレスのコンピュータの25番ポートへ行く通信パケットの中継をしないなどの処理を行なう。
【0177】
(実施形態8:通信機器の処理)
図25は、本実施形態に係る通信機器の処理のフローチャートである。通信機器は、このフローチャートにより示される処理を繰り返し実行する。
【0178】
ステップS2501において、通信阻止命令が受信されるまで待つ。この処理は、通信阻止命令受信部2401により行なう。
【0179】
ステップS2502において、通信阻止命令に基づいて通信を阻止する。この処理は、通信阻止部2402により行なう。
【0180】
(実施形態8:主な効果)
本実施形態によれば、いわゆるスパイウェアなどのプログラムがコンピュータのデータを外部に送信することを防止することが可能となる。また、電子メールを介して感染が広がるコンピュータウィルスが送信する電子メールの送信を阻止することが可能となる。
【0181】
(実施形態9)
本発明の実施形態9として、アプリケーションプログラムが到達したブレークポイントの履歴に基づいて、アプリケーションプログラムがコンピュータウィルス性を有するかどうか判断するコンピュータウィルス検出装置について説明する。
【0182】
(実施形態9:構成)
図26は、本実施形態に係るコンピュータウィルス検出装置の機能ブロック図を例示する。コンピュータウィルス検出装置2600は、ブレークポイント情報保持部901と、ブレークポイント設定部902と、判断プログラム実行部903と、履歴保持部2601と、を有する。したがって、図26に機能ブロック図が例示されたコンピュータウィルス検出装置は、実施形態1に係るコンピュータウィルス検出装置が履歴保持部2601を有する構成となっている。なお、本実施形態に係るコンピュータウィルス検出装置は、他の実施形態、すなわち、実施形態2から実施形態8のいずれか一に係るコンピュータウィルス検出装置が、履歴保持部2601を有するものであってもよい。
【0183】
「履歴保持部」2601は、ブレークポイント設定部902で設定されたブレークポイントに前記アプリケーションプログラムが到達した履歴を保持する。「前記アプリケーションプログラム」とは、ブレークポイント設定部902によりブレークポイントが設定されたアプリケーションプログラムを意味する。
【0184】
したがって、本実施形態においては、アプリケーションプログラムの実行がブレークポイントに到達すると、例えば、どのブレークポイントに到達したか、その日時、ブレークポイントがシステムコールAPI関数であれば、その引数、などを履歴として追加する。この処理は、判断プログラムが行なってもよいし、あるいは、判断プログラムに含まれるプログラムや、コンピュータウィルス検出装置2600の部によって行なわれてもよい。なお、履歴保持部2601が複数のアプリケーションプログラムが到達したブレークポイントの履歴を保持する場合には、アプリケーションプログラムを識別する識別情報も履歴として追加されるのが好ましい。
【0185】
本実施形態においては、判断プログラムは、履歴検査プログラムを有する。「履歴検査プログラム」とは、履歴保持部2601で保持された履歴に基づいて、そのアプリケーションプログラムがコンピュータウィルス性を有するかどうかを判断する。
【0186】
例えば、いわゆるデーモンプログラムと呼ばれるアプリケーションプログラムがある。デーモンプログラムは、コンピュータ内部に常駐して、要求が受信できるのを待ち、その要求に対してサービスを提供するアプリケーションプログラムである。このようなデーモンプログラムが提供するサービスの内容は定型化されており、したがって、デーモンプログラムの動作はほぼ一定である。例えば、デーモンプログラムのうち、ウェブページの送信要求に対して、要求されたウェブページを返信するアプリケーションプログラム(例えば、Apacheと名前が付けられたプログラムが有名である)は、特定のポートに要求が送信されるのを待ち、要求されたウェブページを格納するファイルをオープンし、そのファイルに対してreadを行ない、readの結果を返信し、ファイルをクローズして、ログファイルに書き込む、という処理を繰り返し行なう。また、オープンするべきファイルの場所は、特定のディレクトリ下であるという特性を持つ。したがって、このような一定の処理から逸脱した処理を行なうと、そのデーモンプログラムがコンピュータウィルスやワームに感染した可能性が高い。本実施形態では、このようにして、アプリケーションプログラムがコンピュータウィルス性を有するかどうかを判断する。
【0187】
より具体的な例としては、ブレークポイントごとに、到達した回数を記録しておき、これまで到達したことがないブレークポイントに到達したならば、アプリケーションプログラムがコンピュータウィルス性を有すると判断する。あるいは、ブレークポイントの位置がシステムコールAPI関数である場合には、履歴に基づいて、その引数の規則を抽出し、その規則に合致しない引数が与えられた場合には、アプリケーションプログラムがコンピュータウィルス性を有すると判断する。例えば、ファイルをオープンする際に指定されるファイルのパスに関する規則を、ワイルドカードや正規表現として抽出し、そのワイルドカードや正規表現に適合しないパスのファイルをオープンしようとした場合には、アプリケーションプログラムがコンピュータウィルス性を有すると判断する。
【0188】
なお、本実施形態は、デーモンプログラムにのみ適用できるのみならず、他のアプリケーションプログラムにも適用が可能である。例えば、一般人によるワードプロセッサなどの使用は定型的なものである。そこで、定型的な使用で呼び出されるシステムコール以外が呼び出されると、そのワードプロセッサがコンピュータウィルス性を有すると判断されるようになっていてもよい。ワードプロセッサを例に用いたが、表計算プログラム、プレゼンテーションプログラム、メーラ、ブラウザなどのアプリケーションプログラムにも適用ができる。
【0189】
(実施形態9:処理)
図27は、本実施形態に係るコンピュータウィルス検出装置の処理のフローチャートを例示する。
【0190】
ステップS2701において、ブレークポイント位置情報が示す位置に、ブレークポイントを、アプリケーションプログラムに設定する。
【0191】
ステップS2702において、アプリケーションプログラムの実行がブレークポイントに到達するまで待つ。
【0192】
ステップS2703において、ブレークポイントに到達した履歴を追加する。
【0193】
ステップS2704において、判断プログラムを実行する。ここで、履歴検査プログラムも実行されることになる。
【0194】
ステップS2705において、終了するべきかどうかを判定する。もし、終了しないのであれば、ステップS2706へ処理を移行させる。
【0195】
ステップS2706において、アプリケーションプログラムの実行を続ける。その後、ステップS2702に処理を移行させる。
【0196】
なお、ステップS2703の処理は、判断プログラムを実行した後で行なわれるようになっていてもよい。
【0197】
(実施形態9:主な効果)
本実施形態によれば、アプリケーションプログラムの動作がこれまでと異なる傾向を示すかどうかに基づいて、コンピュータウィルス性を判断するので、一定の動作を繰り返し行なうデーモンプログラムなどの振る舞いの監視に有用である。また、正常な動作の履歴があればコンピュータウィルス性の判断が行なえるので、判断プログラムの作成が容易となる。
【0198】
(実施形態10)
本発明の実施形態10として、アプリケーションプログラムがバーチャルマシンであるコンピュータウィルス検出装置について説明する。
【0199】
(実施形態10:構成)
図28は、本実施形態に係るコンピュータウィルス検出装置の使用の形態を例示する。コンピュータ2801の内部で、コンピュータウィルス検出装置2802とバーチャルマシン2803が動作している。コンピュータウィルス検出装置2802は、実施形態1ないし9のいずれか一のコンピュータウィルス検出装置を実現するプログラムである。コンピュータウィルス検出装置2802は、バーチャルマシン2803にブレークポイントを設定し、振る舞いを監視する。
【0200】
「バーチャルマシン」とは、他のプログラム2805を実行するアプリケーションプログラムである。通常は、他のプログラム2805は、想定されたアーキテクチャのコンピュータのマシンインストラクションで記述される。代表的な例としては、Java(登録商標)で記述され、コンパイルされたプログラムを実行するものがある。Java(登録商標)のプログラムは、インターネットからダウンロードされることが想定されているので、多くの場合、その出所/素性が不明であり、危険なプログラムである場合がある。そこで、例えば、Java(登録商標)のバーチャルマシンは、実行するプログラムがOSへのAPI(2804)を自由に使ってコンピュータのリソースにアクセスすることを制限するように設計されている。しかし、バーチャルマシンのバグを利用して、バーチャルマシン上で動くプログラム2805がコンピュータのリソースに自由にアクセスする場合がある。
【0201】
そこで、本実施形態のコンピュータウィルス検出装置2802が、バーチャルマシン2803にブレークポイントを設定して、バーチャルマシン2803の振る舞いを検出し、バーチャルマシン2803がコンピュータウィルス性を有するプログラムを実行していないかどうかを判断する。なお、本実施形態においては、バーチャルマシンがコンピュータウィルス性を有するとは、コンピュータウィルス性を有するプログラムをバーチャルマシンが実行することをも意味するものとする。
【0202】
(実施形態10:主な効果)
本実施形態により、バーチャルマシンのバグなどを利用するプログラムの実行を阻止することができる。
【0203】
(実施形態11)
本発明の実施形態11として、実施形態10におけるコンピュータを携帯電話とした実施形態について説明する。
【0204】
(実施形態11:構成)
図29は、本実施形態に係るコンピュータウィルス検出装置の使用の形態を例示する。図28のコンピュータ2801が携帯電話2901に置き換わっている。
【0205】
(実施形態11:主な効果)
携帯電話の高機能化にはめざましいものがある。例えば、インターネット用のブラウザは言うに及ばず、Java(登録商標)のバーチャルマシンも携帯電話の内部で動作するようになっている。また、従来はパーソナルコンピュータで動作していたオペレーティングシステムが携帯電話の内部でも動作するようになってきており、携帯電話で動作するプログラムが複雑化している。
【0206】
しかし、携帯電話の販売が開始された後に、バグやセキュリティホールが見つかる場合がある。一方、携帯電話はパーソナルコンピュータ以上の台数が市場に出回り、携帯端末の回収にはコストがかかるうえ、時間も要する。このため、携帯電話で動作するバーチャルマシンなどのバグやセキュリティホールを悪用したコンピュータウィルスが作成されると、その感染規模は予想もつかないこととなり、社会的な影響が大きい。例えば、バーチャルマシンのバグなどを利用して、あらゆる携帯電話のアドレス帳のデータが収集され、プライバシ情報の漏洩につながる。
【0207】
そこで、本発明のコンピュータウィルス検出装置を実現するプログラムを、携帯電話の内部で動作させておき、バーチャルマシンにブレークポイントを設定して振る舞いを検出することにより、バグやセキュリティホールなどを悪用したコンピュータウィルスの動作を未然に防ぐことが可能となる。
【0208】
産業上の利用可能性
【0209】
上記のように本発明によれば、登録された命令の実行有無により監視対象プロセスの実行を中止、あるいは実行前の状態にロールバックできるようになり、従来に比してユーザの負担を軽減してウィルスへの感染予防、及び、システムのクリーンアップができる。
【0210】
また、本発明は、プログラム実行時の振る舞いを検出するため、従来のシグネチャスキャンでは必要であったスキャン前の圧縮ファイルの解凍や、暗号化ファイルの復号化等の前処理を必要としない。
【0211】
したがって、本発明は、コンピュータウィルス検出装置として有用である。
【図面の簡単な説明】
【図1】従来技術における、コンピュータでのプロセスの実行を概念的に説明する図
【図2】従来技術における、アプリケーションプログラムを実行するプロセスと、デバッガと、の関係を例示する図
【図3】従来技術において、高級言語での関数や手続きの呼び出しがどのようにコンパイルされるかを例示する図
【図4】従来技術における関数のコンパイル結果を例示する図
【図5】従来技術において、スタックに値が積まれた状態を例示する図
【図6】従来技術において、仮想プロセス空間にDLLファイルがマッピングされた状態を例示する図
【図7】従来技術におけるプロセスの仮想メモリ空間を示す図
【図8】本発明における処理のフローチャートを例示する図
【図9】本発明の実施形態1に係るコンピュータウィルス検出装置の機能ブロック図
【図10】ブレークポイント情報が保持されている状態の一例を示す図
【図11】アプリケーションプログラムごとにブレークポイント情報が提供されている様子を例示する図
【図12】コンピュータウィルス検出装置の処理のフローチャートを例示する図
【図13】本発明の実施形態2に係るコンピュータウィルス検出装置による表示画面を例示する図
【図14】本発明の実施形態2に係るコンピュータウィルス検出装置の機能ブロック図を例示する図
【図15】コンピュータウィルス検出装置の処理のフローチャート
【図16】本発明の実施形態3におけるブレークポイント情報を例示する図
【図17】コンピュータウィルス検出装置の処理のフローチャート
【図18】本発明の実施形態7に係るコンピュータウィルス検出装置の機能ブロック図
【図19】コンピュータウィルス検出装置の処理のフローチャート
【図20】本発明の実施形態8の概要を例示する図
【図21】本発明の実施形態8に係るコンピュータウィルス検出装置の機能ブロック図
【図22】通信阻止命令の一例を示す図
【図23】コンピュータウィルス検出装置の処理のフローチャート
【図24】本発明の実施形態8に係る通信機器の機能ブロック図
【図25】通信機器の処理のフローチャート
【図26】本発明の実施形態9に係るコンピュータウィルス検出装置の機能ブロック図
【図27】コンピュータウィルス検出装置の処理のフローチャートを例示する図
【図28】本発明の実施形態10に係るコンピュータウィルス検出装置の使用の形態を例示する図
【図29】本発明の実施形態11に係るコンピュータウィルス検出装置の使用の形態を例示する図

[Document Name] Statement
[Detailed explanation]
[0001]
Technical field
[0002]
The present invention monitors the execution of a program that can be executed by e-mail, WEB, peer-to-peer file exchange software, etc. that is executed from outside the computer, such as the Internet, and the behavior of a computer virus. Or, it relates to detecting a behavior similar to a computer virus and taking measures such as stopping execution of a program.
[0003]
Background art
[0004]
Currently, the mainstream of detection techniques for computer viruses (hereinafter sometimes simply referred to as “viruses”) uses pattern matching. This technique is disclosed in, for example, Japanese Patent Application Laid-Open No. 2003-216444, Japanese Patent Application Laid-Open No. 2002-196942, and WO 02/087717 A1. Pattern matching focuses on a file on a computer memory or hard disk, and detects a virus by comparing it with a signature signature of a virus found in the past. Pattern matching is a technique with few false detections, but only known viruses can be detected.
[0005]
Currently, about 10 to 20 kinds of new viruses are found in one day. In order for computers used by regular users to be able to detect and deal with such new viruses, obtain frequently updated virus signature files from anti-virus companies promptly, Must be installed on the computer. By the way, there are many new viruses that have changed the past viruses a little. For this reason, the actual behavior of viruses is very similar. Nevertheless, the information pattern of virus programs is different, so each time a virus is found, a virus signature file must be installed.
[0006]
Virus detection technology includes heuristic scanning in addition to pattern matching. In the heuristic scan, a pseudo code is executed to determine whether or not a behavior similar to a virus is performed based on emulation. However, not all executable file instructions can be emulated. Also, it takes a very long time to emulate a virus with a large program size and / or complicated encryption.
[0007]
Disclosure of the invention
[0008]
In the present invention, a process such as a system call that can create a new process on a computer or attach to a running process (Attach) to monitor the process and make important changes to the computer By monitoring the behavior. Then, the behavior of the process to be monitored is compared with the characteristic behavior of past computer viruses. When the characteristic behavior of the virus is detected, the user is notified so that the process to be monitored can be stopped. Here, the monitoring target process mainly refers to a process connected to the Internet.
[0009]
FIG. 1 is a diagram conceptually illustrating the execution of a process in a computer. Applications 101 and 102, e-mail software 103, and WEB browser 104 operate in the upper layer. Of these, it is assumed that the application 102, the e-mail software 103, and the WEB browser 104 are processes for executing a program for introducing a program from outside the computer by connecting to the Internet. In the present invention, a security layer according to the present invention is provided between these processes and the system call API layer 105. This security layer is a layer that monitors the invocation of system calls.
[0010]
Below the system call API layer 105 is a kernel layer 106 that implements an operating system (hereinafter sometimes abbreviated as “OS”), and below that is a device driver / hardware 107 layer. .
[0011]
In an OS in a normal computer, processing is performed separately in a kernel mode and a user mode. A portion 108 above the system call API layer 105 is a portion where processing is performed in the user mode, and a portion 109 below the system call API layer 105 is a portion where processing is performed in the kernel mode.
[0012]
A process executing in user mode has a separate context and a virtual address space. Therefore, processes executed in the same user mode cannot access the memory of other processes.
[0013]
The present invention is based on the position of a breakpoint to be set when executing an application program, and when the execution of the application program reaches the breakpoint, the application program is stored in a computer virus based on the contents of the stack of the application program. And a determination program that determines whether or not it has a function. When a breakpoint is set in the application program and the execution of the application program reaches the breakpoint, the determination is held in association with the position of the breakpoint. A computer virus detection apparatus for executing a program is provided.
[0014]
The computer virus detection apparatus may hold an application program and set a breakpoint in the application program when the held application program is executed.
[0015]
The position of the breakpoint may be determined based on the system call API function. By doing so, the security layer of FIG. 1 is realized.
[0016]
Further, when the execution of the application program reaches a breakpoint, the argument of the system call API function may be checked.
[0017]
Further, when the system call API function changes the system resource, the computer virus detection device may generate a copy of the system resource before executing the system call.
[0018]
Further, the computer virus detection device may be configured to prevent the execution of the system call API function when it is determined that the application program has a computer virus property.
[0019]
Further, when the system call API function performs communication, the computer virus detection apparatus may output a command to an external communication device (for example, a router) so as to cause the communication to fail. .
[0020]
Further, whether or not the application program has a computer virus property may be determined based on a history of breakpoints reached by the application program.
[0021]
In the present invention, the application program may be a virtual machine for executing a program written in a language such as Java (registered trademark). Further, the virtual machine may operate on a mobile phone.
[0022]
In an OS including WINDOWS (registered trademark), as a method for controlling the behavior of a process, there is a method of writing a kernel driver and hooking a system call (for example, used in eTrust Access Control “Soft hook” of Computer Associates). Method). On the other hand, the monitoring of the behavior of the process according to the present invention is performed by using a function used in software development called a debugger.
[0023]
The behavior monitoring in the present invention is characterized in that it is all performed in the user mode, that is, the application layer. As a result, there is no occurrence of a fatal error such as a system down often caused when a kernel driver is used.
[0024]
In the following, in order to help understanding of the present invention, the function of a conventional debugger will be outlined.
[0025]
FIG. 2 illustrates the relationship between the process 201 for executing the application program and the debugger 202. (1) First, the debugger 202 attaches to the process 201. By the attachment, the relationship between the process 201 and the debugger 202 is managed by the OS. That is, the OS associates the process 201 with the debugger 202. For example, when a change occurs in the state of the process 201, the debugger 202 is notified. (2) Next, the debugger 202 sets a breakpoint in the process 201. “Breakpoint” indicates a memory address at which execution of the CPU is stopped when the program counter of the process 201 reaches a predetermined value. Designating such a memory address is called setting a breakpoint. A method for setting a breakpoint is realized by setting the memory address value indicated by the breakpoint in the CPU or by replacing the instruction at the memory address indicated by the program counter value of the breakpoint with a special instruction. (See, for example, Jonathan B. Rosenberg, “How Debuggers Work, Algorithms, Data Structures, and Architecture”, Wiley Computer Publishing, 1997). Thereafter, when the process 201 starts execution and reaches a breakpoint, (2) the OS is notified that execution has stopped. This notification is performed not by the process 201 but by a processing routine for processing the interrupt when the execution of the process reaches a breakpoint and the CPU is interrupted. Note that the processing routine is appropriately set by initializing the OS or the like. When the OS receives the notification, (4) the debugger 202 is notified, and the debugger 202 knows that the execution of the process 201 has reached a breakpoint. Thereafter, (5) debug operation of the process 201 is performed by the operation of the user of the debugger 202. As a typical debugging operation, the contents of the process stack are read, the sequence in which functions and procedures are called, and the values of arguments and variables are examined.
[0026]
Breakpoints are set for each process. Therefore, the description “set a breakpoint in the process that executes the application program” is accurate, but the description becomes longer. Therefore, in the following, the application program and the process that executes the application program are regarded as the same. , “Set breakpoint in application program”, etc.
[0027]
FIG. 3 illustrates how function and procedure calls in high-level languages are compiled in the prior art. In a high-level language, it is assumed that a function or procedure called “f (argument 1, argument 2,..., Argument n); . When this is compiled, it is converted into a machine instruction as indicated by reference numeral 302. That is, the argument is loaded on the stack by the push instruction, and finally f is called by “call f”. In many CPUs, when a machine instruction that calls a function such as call f is executed, a value set in the program counter is loaded on the stack when returning from the processing of the called function.
[0028]
FIG. 4 illustrates the compilation result of the function f. When f is called, first, the value of the frame pointer (fp) before the call of f is put on the stack by a machine instruction “push fp”. The “frame pointer” is a CPU register for indicating a portion of the stack for function calls. As will be described later, the frame pointer plays an important role in obtaining a function call sequence (call sequence). Next, the value of the stack pointer (sp) is set to the frame pointer (fp) by “move sp → fp”. As a result, the frame pointer (fp) points to the stack portion of f currently being called. Thereafter, the process f is performed. When returning from the call to f, the value of the frame pointer (fp) before the call to f is set by “pop fp”, and the process returns from the call to f by “ret”. For example, the value of the program counter stacked on the stack is set in the program counter.
[0029]
FIG. 5 illustrates a state in which values are stacked on the stack. The value stacked in the top part of the stack 501 (that is, the value stored in the top part of the stack) relates to the function currently being executed. , The argument values are stacked. In area 503, a program counter after the function call is stacked. The area 504 is loaded with the value of the frame pointer (fp) before the function call. An area 505 stores the values of automatic variables defined in the function. The frame pointer (fp) points to the upper part of the area 504, and the value accumulated in the area 504 is the position where the frame pointer (fp) accumulated in the stack 501 at the previous function call is stored. Pointing up. Therefore, by following the value of the frame pointer, it is possible to know through which call sequence the function is called. Further, by checking the value of the program counter loaded on the stack, it is possible to know from where in the program the function is called. In addition, it is possible to know what value is given to the function by examining the arguments stacked on the stack.
[0030]
The computer virus detection apparatus according to the present invention monitors the behavior of a process by using such a debugger function. However, in the debugger in the prior art, a human operates the debugger to investigate the process to be debugged, whereas the process behavior monitoring by the computer virus detection apparatus according to the present invention is automatically performed.
[0031]
The present invention also solves the problems associated with commercial software. Hereinafter, description will be made using spyware as an example. Spyware is an application program that sends information to its creator or caller over the Internet. Spyware behaves like a backdoor virus. Malicious spyware steals user information and keystrokes and sends information to other machines through a specific communication channel.
[0032]
However, many anti-virus companies do not detect commercial software such as spyware as their policy. This is because there is commercial software that erases the data used to destroy the hard disk, which may be sent as an email from a friend. Anti-virus does not detect programs that erase data as intended by the user.
[0033]
Therefore, even if the result of executing the program has an impact on a computer or a user's business, it is impossible to completely prevent these threats with the current anti-virus technology.
[0034]
Some of the current viruses are active on Linux (registered trademark), but they are predominantly active on WINDOWS (registered trademark). One reason for this is that most people using WINDOWS® have added administrator rights to the logged-on user. Administrator authority is necessary when installing an application, but WINDOWS (registered trademark) does not have the custom of temporarily becoming a root (privileged user) for a system administrator like UNIX (registered trademark). In WINDOWS (registered trademark), a suspicious file sent by e-mail is often executed as a privileged user such as an administrator.
[0035]
Administrator privileges have access to all resources of the system. In other words, you can tamper with important files necessary for the system to work. If a virus is executed in such an environment, important files on the computer may be altered, and computers around the world may be infected with the virus through the Internet. The execution environment of the program should be better protected for the user.
[0036]
BEST MODE FOR CARRYING OUT THE INVENTION
[0037]
Hereinafter, the best mode for carrying out the present invention will be described as an embodiment with reference to the drawings. Note that the present invention is not limited to these embodiments, and can be implemented in various modes without departing from the spirit of the present invention.
[0038]
(Outline of the present invention)
The present invention focuses on the behavior of the program and determines whether the program is a virus. A process embodying the present invention and a process to be monitored have a relationship similar to that of a debugger and a debuggee. The debugger corresponds to the process embodying the present invention, and the debug corresponds to the process to be monitored.
[0039]
The debugged process is called debuggee. The present invention executes the monitored process as a debuggee. When monitoring a running process, attach to the running process.
[0040]
The process embodying the present invention sets breakpoints in system calls (or API functions) that make significant changes to the system in order to check the behavior of the monitored process.
[0041]
In the case of an Intel (registered trademark) CPU, a breakpoint can be realized by placing a hardware interrupt instruction of Int3 at a memory address indicated by the breakpoint. When the execution of the process reaches a breakpoint, the execution of the process stops, and the computer virus detection apparatus according to the present invention investigates the contents of the stack of the process, and the behavior of the process to be monitored and the past Compare the characteristic behavior of computer viruses.
[0042]
The following are examples of characteristic behavior of viruses.
[0043]
• Copy yourself to the system folder.
[0044]
• Look for directories shared on the network. Then copy yourself.
[0045]
・ Access the mail address book and send a large number of mails with viruses attached.
[0046]
・ If file exchange software is installed, use it to distribute yourself.
[0047]
-Delete important system files. Or tamper.
[0048]
-Change the system so that it will run on reboot.
[0049]
The present invention compares the API call of the monitoring target process with the past behavior of a computer virus, etc., and stops the monitoring target process or issues a warning to the user.
[0050]
Hereinafter, WINDOWS (registered trademark) will be specifically described as an example. In WINDOWS (registered trademark), an API for manipulating files and directories is KERNEL32. It is included in a file called DLL. The API related to the registry is ADVAPI32. Included in the DLL. An API for operating a network shared drive is MPR. Included in the DLL. Hereinafter, these are called DLL files.
[0051]
A method for determining which API the monitored process is trying to call will be described below. When the monitored process starts executing, the DLL file is mapped to the virtual process space.
[0052]
FIG. 6 shows that the virtual process space 601 includes Kernel32. Dll, MRP. Dll, Advapi32. The state where Dll was mapped is illustrated. By performing the mapping in this manner, the monitoring target process is, for example, Adobe32. Functions such as RegCreateKeyEx defined in Dll can be called.
[0053]
FIG. 7 shows the virtual memory space of the process. The virtual memory space 700 has an instruction part 701, a heap part 702, a DLL part 703 to which a DLL file is mapped, and a stack part 704 from the smallest memory address. The portion 703 is located between the heap portion 702 and the stack portion 704, and the DLL file is mapped to the portion 703. That is, when a reference is made to the memory address of the portion 703, the contents of the DLL file stored as a file are obtained.
[0054]
The map address of the DLL file (the first address of the part where the DLL file is mapped to the virtual memory space) is called an image base, and is uniquely determined in each DLL so as not to overlap with the others.
[0055]
For example, an API called RegOpenKeyExA that operates the registry is ADVAPI32. Included in the DLL.
[0056]
The address of RegOpenKeyExA is obtained by “ADVAPI32.DLL image base” + “RegOpenKeyExA RVA”. Note that “RVA” is an abbreviation for “relative virtual address”. That is, it is a relative position where the API definition appears in the DLL file.
[0057]
When the address is obtained, a breakpoint is set using a debugger API or the like.
[0058]
When the execution of the monitored process hits a breakpoint, the API argument is analyzed.
[0059]
If the monitored process calls an API that changes the registry or system file, a backup is created in this step.
[0060]
If virus characteristics are detected, stop the process or report to the user. If not detected, processing continues.
[0061]
A specific example will be described. Many WINDOWS® viruses add a value to the following registry to run and resident in the system upon restart:
[0062]
HKEY_LOCAL_MACHINE \ SOFTWARE \ MICROSOFT \ Windows \ CurrentVersion \ Run
For reference, here are some major viruses that add values to this key:
[0063]
NIMDA, LOVELATERTER, TROJ_MATRIX, W32_MAGISTR, TROJ_HYBRIS, WORM_KLEZ, WORM_BUGBEAR, WORM_BADTRANS, JS_EXCEPTION, WORM_LIRBA
An unknown program received by e-mail may not need to reside in the system.
[0064]
To add the registry, the following two-step API call is required.
[0065]
RegCreateKeyExA ... Creates a new key under Run.
[0066]
RegSetValueExA ... Set the value.
[0067]
The top two APIs are ADVAPI32. Included in the DLL. Here, ADVAPI32. Assume that the image base of the DLL is 0x77D80000. The number 0x indicates a hexadecimal number. Further, it is assumed that the RVA of RegCreateKeyExA is 0x29427 and the RVA of RegSetValueExA is 0x2C58D.
[0068]
The address of RegCreateKeyExA is
0x77D80000 + 0x29427 = 0x77DA9427
The address of RegSetValueExA is
0x77D80000 + 0x2C58D = 0x77DAC58D
Is required. Since these are virtual address spaces, the DLL file is mapped with the same virtual address even if a plurality of processes are executed simultaneously.
[0069]
When asked for addresses, set breakpoints on them.
[0070]
If the process to be monitored is a program that is automatically executed when WINDOWS (registered trademark) is activated, a break point of RegCreateKeyExA is hit. Next, analyze the stack. This is because a compiler such as C language generates machine instructions that pass arguments through the stack.
[0071]
80000002 0041f028 ADVAPI32! RegCreateKeyExA
For example, assume that the above numerical values are obtained. When calling RegCreateKeyExA, the second argument is the location of the registry. In this example, the location of the registry is stored in the memory address 41f028. Therefore, the memory address 41f028 is checked.
[0072]
> 41f028
41f028 SOFTWARE \ Microsoft
41f038 ft \ Windows \ Cure
41f048 ntVersion \ Run \ Vi
41f058 rus
From the API and arguments, it can be seen that the monitoring process is trying to create a key called Virus under Run.
[0073]
In order to return to the state before the program execution, the Virus key may be deleted. Therefore, a history of changes in system resources such as a registry, a copy of system resources, and the like may be held before execution of a system call.
[0074]
Similarly, API necessary for grasping the behavior of the program is checked, and the tendency of the call is analyzed.
[0075]
It is desirable that the correspondence between the API for monitoring the call and the argument (hereinafter referred to as a detection rule) can be added or changed by reading a file describing the detection rule from the outside, for example, the Internet, instead of hard coding.
[0076]
With this method, there is no overhead of scanning the file. When the characteristic behavior of the virus is detected, it is preferable to display a dialog box or the like so that the process to be monitored can be stopped by the user's intention.
[0077]
Or, continue without executing the program. A flowchart is illustrated in FIG.
[0078]
(Embodiment 1)
As Embodiment 1 of the present invention, breakpoint position information and a determination program to be executed when an application program reaches a breakpoint indicated by the breakpoint position information are stored in association with each other, and the breakpoint is set in the application program A computer virus detection apparatus that executes a determination program will be described.
[0079]
(Embodiment 1: Configuration)
FIG. 9 illustrates a functional block diagram of the computer virus detection device according to the present embodiment. The computer virus detection apparatus 900 includes a breakpoint information holding unit 901, a breakpoint setting unit 902, and a determination program execution unit 903.
[0080]
As will become clear from the following description, a computer virus detection apparatus having these units can be realized as a program that runs on a computer. Therefore, FIG. 9 can also be interpreted as a diagram showing the module configuration of such a program. That is, such a program includes a breakpoint information holding step for realizing a breakpoint information holding unit by a program, a breakpoint setting step for realizing a breakpoint setting unit by a program, and a determination for realizing a judgment program execution unit by a program. A program for causing a computer to execute a program execution step.
[0081]
A “breakpoint information holding unit” 901 holds breakpoint information. For example, breakpoint information is held in a hard disk or semiconductor memory. “Breakpoint information” is information including breakpoint position information and a determination program. Since “includes”, the components of the breakpoint information may not be limited to the breakpoint position information and the determination program.
[0082]
“Breakpoint position information” is information indicating the position of a breakpoint to be set when the application program is executed. The position of the breakpoint is indicated by, for example, a memory address of the application program. It may also be indicated by the name of a function, procedure, or method (hereinafter referred to as “function or the like”) that is called by the application program.
[0083]
The “determination program” means whether or not the application program has a computer virus property based on the contents of the stack referred to in the execution of the application program when the execution of the application program reaches the breakpoint. This is a program for making a decision. “The application program” means an application program in which a breakpoint is set at a position indicated by breakpoint position information by a breakpoint setting unit 902 described later. The “breakpoint” means a breakpoint set at a position indicated by breakpoint position information.
[0084]
"Application program has computer virus" is designed not only when the application program itself is a computer virus, but also when the application program is infected with a computer virus, using bugs or security holes in the application program In some cases, such as when the operation is not expected. For example, there is a case where a malicious person performs an operation such as obtaining the contents of a file that cannot be obtained by a normal operation using a bug of the web server program.
[0085]
There are various methods for determining whether or not the application program has a computer virus property based on the contents of the stack referred to when the application program is executed. For example, it is determined whether or not the stack referred to in the execution of the application program can be traced from the top of the stack to the bottom of the stack by following the frame pointer. Some computer viruses call system calls and the like in such a manner that they are not called if the application program operates normally by destroying the contents of the stack. Therefore, it is determined whether or not the contents of the stack are destroyed. One of the judgments is that the application program has a computer virus property depending on whether it can follow the frame pointer and call up to a function called first in the execution of the program (for example, a function named _startup). Judge whether or not.
[0086]
In addition, when the application program reaches a breakpoint, it may be determined whether or not the application program has a computer virus property by checking through what call sequence the function is reached. If a breakpoint is reached after a sequence of calls such as an unexpected function, it is suspected to have a computer virus.
[0087]
Further, it may be determined whether or not the application program has a computer virus property by examining an argument such as a function in which a breakpoint is set. For example, a computer virus that infects other computers using e-mail accesses the address book of e-mail addresses in order to obtain e-mail addresses. Therefore, the determination may be made based on whether an argument for accessing the address book is specified.
[0088]
In many cases, the process for executing the program for realizing the computer virus detection device is different from the process for executing the application program. Usually, the program for realizing the computer virus detection device is the application program. The contents of the memory space of the executing process, especially the contents of the stack cannot be read. However, the operating system has a function that allows a certain process to read or change the contents of the memory space and registers of other processes if they are between processes in a specific relationship. It is normal. Examples of the “specific relationship” here include a parent-child relationship, a process executed by the same user, and a relationship in which a predetermined system call (for example, attach) is executed on another process, and so on. Therefore, when the computer virus detection apparatus is realized by a program, the process for executing the program and the process for executing the application program need to have a specific relationship.
[0089]
Most operating systems provide system calls for reading and changing the memory space and register contents of other processes. Alternatively, there may be a case where the contents of the memory space and registers of other processes can be read or changed using a special device called / dev / proc.
[0090]
For example, the determination program may be executed by an interpreter. For example, the determination program may be described in a language such as Lisp, Perl, or Ruby. Further, the determination program may consist of a sequence of machine instructions that can be directly executed by a computer. In this case, a determination program may be incorporated as a part of a program for realizing the computer virus detection device. Alternatively, the determination program may be loaded into a program that dynamically realizes a computer virus detection device, for example, as a dynamic library. If the determination program is executed by an interpreter or is dynamically loaded, the determination program can be easily replaced.
[0091]
FIG. 10 shows an example of a state in which breakpoint information is held by the breakpoint information holding unit 901. In FIG. 10A, breakpoint information is held in a table. A column 1001 stores breakpoint position information, and a column 1002 stores a determination program. FIG. 10B shows an example of a state in which a pointer to the determination program is stored in the table. The pointer points to a specific location within the memory space of the process executing the program that implements the computer virus detection device.
[0092]
FIG. 11 illustrates a state in which breakpoint information is provided for each application program. Thus, the breakpoint information holding unit 901 may hold breakpoint information for each application program.
[0093]
The “breakpoint setting unit” 902 sets breakpoint information in the application program based on the breakpoint information held by the breakpoint information holding unit 901. That is, a breakpoint is set at a position indicated by breakpoint position information included in the breakpoint information. This setting is performed using a system call or special device provided by the operating system. “Based on” means that, for example, when the breakpoint position information is expressed using a name of a function or the like, an address of the function or the like is obtained from the name of the function or the like. Correspondence between names of functions and their addresses and their addresses can be obtained by reading a symbol table of an application program.
[0094]
The “determination program execution unit” 903 executes the determination program included in the breakpoint information when the execution of the application program reaches the breakpoint set by the breakpoint setting unit 902. The “application program” is an application program in which a breakpoint is set by the breakpoint setting unit 902. The computer virus detection apparatus waits until the execution of the application program in which the breakpoint is set reaches the breakpoint. For this purpose, for example, a wait system call is called. When the execution of the application program reaches a breakpoint, (1) the processing of the computer virus detection device resumes from the wait system call, (2) determines which breakpoint has been reached, and (3) a determination program execution unit 903 To execute a judgment program. To determine which breakpoint the application program has reached, it is determined by obtaining the value of the program counter held in the register of the process executing the application program.
[0095]
(Embodiment 1: processing)
FIG. 12 illustrates a flowchart of processing of the computer virus detection apparatus.
[0096]
In step S1201, a breakpoint is set in the application program at the position indicated by the breakpoint position information. For example, this process is performed by the breakpoint setting unit 902.
[0097]
In step S1202, the execution of the application program waits until a breakpoint is reached. This process is realized, for example, by executing a wait system call.
[0098]
In step S1203, the determination program corresponding to the breakpoint at which the execution of the application program has been reached is executed. For example, this process is performed by the determination program execution unit 903.
[0099]
In step S1204, it is determined whether or not to end the process. For example, if it is determined by execution of the determination program in step S1203 that the application program has a computer virus property, the process ends. If it is determined not to end the process, the process proceeds to step S1205.
[0100]
In step S1205, the execution of the application program is continued. When the application program reaches a breakpoint, the execution of the application program stops, so that the processing is resumed from the point where it stopped. For example, a signal (for example, SIG_CONT) is sent to the process that executes the application program. Thereafter, the process proceeds to step S1202.
[0101]
The computer virus detection apparatus can be considered as an apparatus for using a computer virus detection method including a breakpoint information holding step, a breakpoint setting step, and a determination program execution step. “Breakpoint information holding step” is a step for holding breakpoint information. “Breakpoint setting step” is a step for setting a breakpoint in the application program based on the breakpoint information held in the breakpoint information holding step. The “determination program execution step” is a step of executing the determination program included in the breakpoint information when the execution of the application program reaches the breakpoint set in the breakpoint setting step. . That is, the breakpoint information holding step is a step that operates the breakpoint information holding unit, the breakpoint setting step is a step that operates the breakpoint setting unit, and the determination program execution step executes the determination program execution unit. It is a step. The use of the computer virus detection method according to the present invention is not limited to the computer virus detection apparatus according to the present invention.
[0102]
(Embodiment 1: Main effects)
According to the present embodiment, since the behavior of a process for executing an application program can be monitored by a computer virus detection device without modifying the kernel of the operating system, the occurrence of a system down can be avoided. Become. In addition, since the behavior of computer viruses is often very similar, the necessity of continuing to update the pattern file to the latest one, which was necessary in conventional anti-virus software, is reduced. Update is unnecessary.
[0103]
(Embodiment 2)
As a second embodiment of the present invention, a computer virus detection apparatus that holds an application program will be described.
[0104]
FIG. 13 illustrates a display screen by the computer virus detection apparatus according to the present embodiment. A window 1301 is a window displayed by the computer virus detection device according to the present embodiment. An application program icon is displayed in the sub-window 1302 of the window. If necessary, an icon (eg, icon 1304) displayed outside the window 1301 can be dragged and moved to the inside of the sub-window 1302. By double-clicking an icon (for example, icon 1303) displayed in the sub window 1302, a process for executing the application program is generated as a child process of the process for executing the computer virus detection device, and its behavior is monitored. Is done.
[0105]
(Embodiment 2: Configuration)
FIG. 14 illustrates a functional block diagram of the computer virus detection device according to the present embodiment. The computer virus detection apparatus 1400 includes a breakpoint information holding unit 901, a breakpoint setting unit 902, a determination program execution unit 903, an application program holding unit 1401, a program execution start unit 1402, a breakpoint setting instruction unit 1403, Have.
[0106]
Therefore, in the computer virus detection device according to the present embodiment, the computer virus detection device according to the first embodiment further includes an application program holding unit 1401, a program execution start unit 1402, and a breakpoint setting command unit 1403. It has a configuration. In the present specification, the same reference numerals are assigned to parts to which the same definition is applied as much as possible. It should be noted that assignment of the same code does not mean that the same configuration or the like is obtained in actual manufacturing or the like.
[0107]
An “application program holding unit” 1401 holds an application program. There are various forms of holding. For example, there is a form in which the entire application program is stored. Further, there may be a form of storing a location where an application program is stored, for example, a path expressed in a file system.
[0108]
The “program execution start unit” 1402 starts execution of the application program held by the application program holding unit 1401. For example, execution of an application program is started as a child process of a process that executes a program for realizing a computer virus detection device.
[0109]
A “breakpoint setting instruction unit” 1403 instructs the breakpoint setting unit 902 to set a breakpoint for an application program whose execution is started by the program execution start unit 1402. For example, a function for realizing the breakpoint setting unit 902 is called.
[0110]
(Embodiment 2: processing)
FIG. 15 illustrates a flowchart of processing of the computer virus detection device according to the present embodiment.
[0111]
In step S1501, the application program is held. This process is performed by the application program holding unit 1401. For example, in FIG. 13, it is detected that the icon 1304 has been dragged into the sub-window 1302, and an application program represented by the icon 1304 is held.
[0112]
In step S1502, the process waits until an application program is selected. For example, in FIG. 13, the process waits until an icon inside the sub window 1302 is double-clicked.
[0113]
In step S1503, a command is issued to set a breakpoint at the position indicated by the breakpoint position information in the selected application. This processing is performed by the breakpoint setting command unit 1403.
[0114]
In step S1504, the process waits for completion of the breakpoint setting. For example, it waits until it returns from a call of a function that implements the breakpoint setting unit 902.
[0115]
In step S1505, the selected application program is executed. More precisely, a process for executing the selected application program is executed. After step S1505, step S1202, step S1203, step S1204, and step S1205 in the flowchart of FIG. 12 are executed. In recent operating systems, it is possible to operate a plurality of threads in parallel / parallel in one process. Therefore, execution of step S1202, step S1203, step S1204, and step S1205 may be performed by a thread different from the thread that executes the flowchart of FIG.
[0116]
In step S1506, it is determined whether or not to end the process. For example, the determination is made based on whether the operator of the computer virus detection apparatus has pressed the end button. If not completed, the process returns to step S1502.
[0117]
(Embodiment 2: Main effects)
According to this embodiment, it is possible to easily generate a process for executing an application program whose behavior is to be monitored. In addition, application programs that are not likely to introduce a computer virus from the outside can be excluded from monitoring, so the speed at which such application programs are executed is not reduced by setting breakpoints. .
[0118]
(Embodiment 3)
As a third embodiment of the present invention, a computer virus detection apparatus that sets a breakpoint in a system call API function and monitors the behavior of a process will be described.
[0119]
(Embodiment 3: Configuration)
The computer virus detection apparatus according to the present embodiment is configured so that the breakpoint information held by the breakpoint information holding unit 901 of the computer virus detection apparatus according to the first or second embodiment is determined based on the system call API function of the application program. It is a thing.
[0120]
The “system call API function” means a library function for calling a system call. Such a library function or the like is normally configured such that an argument for a system call is loaded on the stack and a trap instruction is executed. By executing the trap instruction, an interrupt routine set in the CPU by the operating system is started, and processing inside the operating system is started. Since it is difficult to directly express a process of loading arguments and executing a trap instruction in a high-level language, a library function for performing such a process is prepared.
[0121]
FIG. 16 illustrates breakpoint information in the present embodiment. In FIG. 16, RegCreateKeyExA is the name of the system call API function. Therefore, when the breakpoint setting unit sets a breakpoint, it is necessary to convert the name of the system call API function into an address. The conversion process is as described in the overview section.
[0122]
(Embodiment 3: Main effects)
Since a computer virus often infects a computer itself using a system call API function, by detecting the call of the system call API function and determining whether the application program has a computer virus property, It is possible to make an accurate judgment with fewer breakpoints.
[0123]
(Embodiment 4)
As a fourth embodiment of the present invention, a computer virus detection apparatus that makes a determination based on examination of arguments of a system call API function will be described.
[0124]
(Embodiment 4: Configuration)
The computer virus detection apparatus according to the present embodiment has a configuration in which the system call inspection program is included in the determination program in the computer virus detection apparatus according to the third embodiment. The “system call inspection program” is a program for determining whether or not the application program has a computer virus property based on the inspection of the argument of the system call API function called by the application program. “The application program” means an application program in which a breakpoint is set by the breakpoint setting unit 902.
[0125]
Therefore, in this embodiment, when the execution of the application program reaches a breakpoint, the argument of the system call API function of the application program is checked. Based on the result of this inspection, it is determined whether or not the application program has a computer virus property.
[0126]
In the present embodiment, the system call API function whose argument is checked is not limited to the one in which a breakpoint is set. For example, all the machine instructions of the application program may be examined, and the arguments of all system call API functions may be examined. The argument of the system call API function at the reached breakpoint may be stored, and when the breakpoint is reached later, the argument may be checked in the stored system call API function.
[0127]
(Embodiment 4: Main effects)
In the present embodiment, since the computer virus property is determined based on the examination of the argument of the system call API function, the determination can be made more accurately.
[0128]
(Embodiment 5)
As a fifth embodiment of the present invention, a computer virus detection apparatus for inspecting an argument of a system call API function at a reached breakpoint will be described.
[0129]
(Embodiment 5: Configuration)
The computer virus detection apparatus according to the present embodiment is a system in which an argument to be inspected by the system call inspection program is determined by breakpoint position information held by the breakpoint information holding unit 901 in the computer virus detection apparatus according to the fourth embodiment. This is an argument of the call API function.
[0130]
For example, as illustrated in FIG. 16, when a breakpoint is set in a system call API function called RegCreateKeyExA, and the execution of the application program reaches the breakpoint, the system call inspection program sets an argument of RegCreateKeyExA. inspect. An example of the inspection is as described in the overview section of the present invention.
[0131]
(Embodiment 5: Main effects)
According to the present embodiment, since the computer virus property is determined based on the examination of the argument of the called system call API function, the determination can be made more accurately.
[0132]
(Embodiment 6)
As a sixth embodiment of the present invention, a computer virus detection apparatus that generates a copy of a changed system resource when a system call API function that changes the system resource is called will be described.
[0133]
(Embodiment 6: Configuration)
The computer virus detection apparatus according to the present embodiment has a configuration in which a copy creation program is included in the determination program in the computer virus detection apparatus according to the fourth or fifth embodiment. The “copy creation program” generates a copy of the changed system resource when the system resource is changed by the system call API function of the application program. “The application program” is an application program in which breakpoints are set by the breakpoint setting unit 902.
[0134]
Accordingly, in the present embodiment, the breakpoint position information indicates the position of the system call API function that changes the system resource. The system resource here means, for example, a resource that can be duplicated among resources used by a computer, such as a registry and a file.
[0135]
For example, a break point is set in the system call API function for changing the registry, and when the execution of the application program reaches the break point, a copy creation program for copying the registry is executed. When a copy is created, the registry is changed by a system call. In duplicating the registry, the entire registry may be duplicated, or only the part to be changed may be duplicated. The part to be changed in the registry can be determined by an argument of the system call API function.
[0136]
In the present embodiment, the copy creation program may be executed when it is determined that the application program has a computer virus property. As a result, the amount of duplicates to be created can be reduced.
[0137]
(Embodiment 6: processing)
FIG. 17 illustrates a flowchart of processing of the computer virus detection device according to the present embodiment.
[0138]
In step S1701, a breakpoint is set in the application program at the position indicated by the breakpoint position information.
[0139]
In step S1702, the process waits until execution of the application program reaches a breakpoint.
[0140]
In step S1703, a determination program is executed.
[0141]
In step S1704, it is determined whether the execution result of the determination program is that the application program has a computer virus property. If it has a computer virus property, the process proceeds to step S1705, and if not, the process is skipped to step S1707.
[0142]
In step S1705, it is determined whether the application program is changing the system resource. This determination can be made by examining the type of system call API function related to the reached breakpoint and its argument. If the system resource is to be changed, the process proceeds to step S1706, and if not, the process is skipped to step S1707.
[0143]
In step S1706, a copy of the system resource is created by the copy creation program.
[0144]
In step S1707, it is determined whether to end the entire process. If it is determined not to end, the process proceeds to step S1708.
[0145]
In step S1708, execution of the application program is continued, and the process proceeds to step S1702. Even if the application program is a computer virus and the system resource is changed to an illegal one, the system can be restored by the copy created in step S1706.
[0146]
(Embodiment 6: Main effects)
In this embodiment, since a copy of the system resource to be changed is created, even if the application program is a computer virus and the computer is infected, the system can be recovered using the copy of the system resource.
[0147]
(Embodiment 7)
As a seventh embodiment of the present invention, a computer virus detection apparatus that does not execute a system call API function when an application program is determined to have a computer virus property will be described.
[0148]
(Embodiment 7: Configuration)
FIG. 18 illustrates a functional block diagram of the computer virus detection device according to the present embodiment. The configuration of the computer virus detection device according to the present embodiment is such that any one of the computer virus detection devices according to the first to sixth embodiments includes an execution blocking unit. Therefore, for example, the computer virus detection apparatus 1800 includes a breakpoint information holding unit 901, a breakpoint setting unit 902, a determination program execution unit 903, and an execution prevention unit 1801. In addition, the computer virus detection apparatus 1800 may include an application program holding unit, a program execution start unit, and a breakpoint setting command unit.
[0149]
As a result of the determination by the determination program execution unit 903, the “execution prevention unit” 1801 does not execute the system call API function of the application program when it is determined that the application program to be determined has a computer virus property. It is a part for.
[0150]
When the use of the stack is illustrated in FIG. 5, the execution prevention unit 1801 uses the value of the frame pointer (fp) to calculate the value of the frame pointer before the function call stored in the part 504. It is acquired and set to the frame pointer (fp), and the value of the program counter is set to the value stored in the part 503 so that the system call API function is not executed.
[0151]
(Embodiment 7: processing)
FIG. 19 illustrates a flowchart of processing of the computer virus detection device according to the present embodiment.
[0152]
In step S1901, a breakpoint is set in the application program at the position indicated by the breakpoint position information.
[0153]
In step S1902, the process waits until execution of the application program reaches a breakpoint.
[0154]
In step S1903, a determination program is executed.
[0155]
In step S1904, it is determined as a result of the determination program whether the application program has a computer virus property. If it has a computer virus property, the process proceeds to step S1905, and if not, the process is skipped to step S1906.
[0156]
In step S1905, the system call API function is not executed. In this process, the execution prevention unit 1801 is used.
[0157]
In step S1906, it is determined whether to end the entire process. If not finished, the process proceeds to step S1907.

In step S1907, execution of the application program is continued. Thereafter, the process proceeds to step S1902.
[0158]
(Embodiment 7: Main effects)
In the present embodiment, since dangerous system calls are prevented from being executed, for example, when a macro program of a specific word processor has a computer virus property, the execution of the dangerous macro program without stopping the function of the word processor. Thus, it is possible to continue the execution of the application program while preventing the execution of a dangerous system call.
[0159]
(Embodiment 8)
As an eighth embodiment of the present invention, a computer virus detection apparatus and a communication device for blocking communication of an application program having a computer virus property will be described.
[0160]
FIG. 20 illustrates an overview of the present embodiment. A computer 2001 is connected to an external communication network 2003 via a communication device 2002. A typical example of the communication device 2002 is a router. Inside the computer 2001, a process 2004 for executing an application program and a process 2005 for realizing a computer virus detection apparatus operate. The process 2005 monitors the behavior of the process 2004. If an application program executed by the process 2004 has a computer virus property, an attempt is made to communicate with the outside 2006. In this case, the process 2005 considers that the process 2004 is performing harmful communication to the outside, and outputs a communication blocking instruction 2007 to the communication device 2002 in order to block the harmful communication. Based on the communication blocking instruction 2007, the communication device 2002 blocks communication by not relaying a packet of communication to be performed by the process 2004.
[0161]
(Embodiment 8: Configuration of computer virus detection apparatus)
FIG. 21 illustrates a functional block diagram of the computer virus detection apparatus according to the present embodiment. The configuration of the computer virus detection device according to the present embodiment is such that the computer virus detection device according to any one of Embodiments 1 to 7 has a communication blocking command output unit. For example, the computer virus detection device 2100 includes a breakpoint information holding unit 901, a breakpoint setting unit 902, a determination program execution unit 903, and a communication blocking instruction output unit 2101.
[0162]
The “communication blocking instruction output unit” 2101 determines that, as a result of the determination by the determination program execution unit 903, the application program to be determined has a computer virus property, the application program sends a communication system call API function. When executing, a communication blocking command is output. The “communication blocking instruction” is an instruction for causing an external communication device to fail communication using the communication system call API function executed by the application program.
[0163]
For example, a system call API function for communication in order for an application program determined to have a computer virus property to transmit data to the outside of the computer or to receive data from the outside of the computer. Is executed, an instruction to fail the communication is output to an external communication device such as a router.
[0164]
FIG. 22 shows an example of a communication blocking command. In this example, the communication blocking instruction is described as a structured document such as XML. In FIG. 22, for example, in FIG. 20, the IP address of the computer 2001 is 192.168.193.063, the process 2004 is the communication with the IP address of 10.139.210.254, and the port is No. 25. A communication blocking command output when an attempt is made is shown. Such a communication blocking command may be output to an external communication device by, for example, SOAP (Simple Object Access Protocol).
[0165]
(Embodiment 8: Processing of computer virus detection device)
FIG. 23 illustrates a flowchart of processing of the computer virus detection device according to the present embodiment.
[0166]
In step S2301, a breakpoint is set in the application program at the position indicated by the breakpoint position information.
[0167]
In step S2302, the process waits until execution of the application program reaches a breakpoint.
[0168]
In step S2303, a determination program is executed.
[0169]
In step S2304, it is determined whether the application program has a computer virus. If it is determined that the computer virus is present, the process proceeds to step S2305; otherwise, the process skips to step S2307.
[0170]
In step S2305, it is determined whether the reached breakpoint is a communication system call API function. If it is a communication system call API function, the process proceeds to step S2306; otherwise, the process is skipped to step S2307.
[0171]
In step S2306, a communication blocking command is output to an external communication device. This processing is performed by the communication block command output unit 2101.
[0172]
In step S2307, it is determined whether or not to end the entire process. If not finished, the process proceeds to step S2308.
[0173]
In step S2308, execution of the application program is continued. Even if harmful communication is performed following execution, communication is blocked by the communication blocking command output in step S2306.
[0174]
(Embodiment 8: Configuration of communication device)
FIG. 24 illustrates a functional block diagram of the communication device according to the present embodiment. The communication device 2400 includes a communication blocking command receiving unit 2401 and a communication blocking unit 2402.
[0175]
The “communication block command receiving unit” 2401 receives a communication block command. The communication blocking command is output by, for example, the communication blocking command output unit 2101. When described in XML, the communication blocking command is exemplified in FIG. A port for receiving a communication blocking command is prepared, and the communication blocking command receiving unit 2401 waits until a communication blocking command is transmitted to this port. Moreover, you may perform the process for authenticating that the program which output the communication prevention command is a legitimate program as needed.
[0176]
The “communication blocking unit” 2402 blocks communication based on the communication blocking command received by the communication blocking command receiving unit 2401. For example, when the communication blocking instruction is as shown in FIG. 22, the relay of the communication packet going from the IP address of 192.168.193.063 to the 25th port of the computer having the IP address of 10.139.210.254 is performed. Do something like not.
[0177]
(Embodiment 8: Processing of communication device)
FIG. 25 is a flowchart of processing of the communication device according to the present embodiment. The communication device repeatedly executes the processing shown by this flowchart.
[0178]
In step S2501, the process waits until a communication blocking command is received. This processing is performed by the communication blocking command receiving unit 2401.
[0179]
In step S2502, communication is blocked based on the communication block command. This processing is performed by the communication blocking unit 2402.
[0180]
(Embodiment 8: Main effects)
According to the present embodiment, it is possible to prevent a program such as so-called spyware from transmitting computer data to the outside. In addition, it is possible to prevent transmission of e-mails transmitted by computer viruses that spread through e-mails.
[0181]
(Embodiment 9)
As a ninth embodiment of the present invention, a computer virus detection apparatus that determines whether an application program has a computer virus property based on a history of breakpoints reached by the application program will be described.
[0182]
(Embodiment 9: Configuration)
FIG. 26 illustrates a functional block diagram of the computer virus detection device according to the present embodiment. The computer virus detection apparatus 2600 includes a breakpoint information holding unit 901, a breakpoint setting unit 902, a determination program execution unit 903, and a history holding unit 2601. Therefore, the computer virus detection apparatus whose functional block diagram is illustrated in FIG. 26 is configured such that the computer virus detection apparatus according to the first embodiment includes the history holding unit 2601. Note that the computer virus detection device according to this embodiment may be the computer virus detection device according to any one of the other embodiments, that is, any one of the second to eighth embodiments, including the history holding unit 2601. Good.
[0183]
A “history holding unit” 2601 holds a history of the application program reaching the breakpoint set by the breakpoint setting unit 902. “The application program” means an application program in which a breakpoint is set by the breakpoint setting unit 902.
[0184]
Therefore, in this embodiment, when the execution of the application program reaches a breakpoint, for example, which breakpoint has been reached, its date and time, and if the breakpoint is a system call API function, its arguments, etc. are used as a history. to add. This processing may be performed by a determination program, or may be performed by a program included in the determination program or a part of the computer virus detection device 2600. When the history holding unit 2601 holds a history of breakpoints reached by a plurality of application programs, it is preferable that identification information for identifying the application program is also added as a history.
[0185]
In the present embodiment, the determination program has a history inspection program. The “history inspection program” determines whether the application program has a computer virus property based on the history held by the history holding unit 2601.
[0186]
For example, there is an application program called a so-called daemon program. The daemon program is an application program that resides in the computer, waits for a request to be received, and provides a service for the request. The contents of services provided by such a daemon program are standardized, and therefore the operation of the daemon program is almost constant. For example, among the daemon programs, an application program that returns a requested web page in response to a web page transmission request (for example, a program named Apache) is requested to a specific port. Wait until it is sent, open the file that stores the requested web page, read the file, return the read result, close the file, and write to the log file Repeat. Further, the file location to be opened has a characteristic that it is under a specific directory. Therefore, if a process deviating from such a certain process is performed, there is a high possibility that the daemon program is infected with a computer virus or worm. In this embodiment, in this way, it is determined whether or not the application program has a computer virus property.
[0187]
As a more specific example, the number of times reached is recorded for each breakpoint, and if a breakpoint that has never been reached is reached, it is determined that the application program has a computer virus. Alternatively, if the breakpoint position is a system call API function, the rule of the argument is extracted based on the history, and if an argument that does not match the rule is given, the application program is a computer virus It is judged that it has. For example, if the file path rule specified when opening a file is extracted as a wildcard or regular expression, and you try to open a file whose path does not match the wildcard or regular expression, the application program Is determined to have computer virus properties.
[0188]
Note that the present embodiment can be applied not only to the daemon program but also to other application programs. For example, the use of word processors and the like by ordinary people is a routine one. Therefore, when a call other than a system call that is called for routine use is called, it may be determined that the word processor has a computer virus property. Although a word processor is used as an example, it can also be applied to application programs such as a spreadsheet program, a presentation program, a mailer, and a browser.
[0189]
(Embodiment 9: processing)
FIG. 27 illustrates a flowchart of processing of the computer virus detection device according to the present embodiment.
[0190]
In step S2701, a breakpoint is set in the application program at the position indicated by the breakpoint position information.
[0191]
In step S2702, the process waits until execution of the application program reaches a breakpoint.
[0192]
In step S2703, a history of reaching the breakpoint is added.
[0193]
In step S2704, a determination program is executed. Here, the history inspection program is also executed.
[0194]
In step S2705, it is determined whether or not to end. If not finished, the process proceeds to step S2706.
[0195]
In step S2706, execution of the application program is continued. Thereafter, the process proceeds to step S2702.
[0196]
Note that the process of step S2703 may be performed after the determination program is executed.
[0197]
(Embodiment 9: Main effects)
According to the present embodiment, since the computer virus nature is determined based on whether the operation of the application program shows a different tendency than before, it is useful for monitoring the behavior of a daemon program or the like that repeatedly performs a certain operation. . In addition, if there is a history of normal operations, it is possible to make a determination of a computer virus, making it easy to create a determination program.
[0198]
(Embodiment 10)
As a tenth embodiment of the present invention, a computer virus detection apparatus in which an application program is a virtual machine will be described.
[0199]
(Embodiment 10: Configuration)
FIG. 28 illustrates a usage pattern of the computer virus detection device according to the present embodiment. Inside the computer 2801, a computer virus detection device 2802 and a virtual machine 2803 are operating. The computer virus detection device 2802 is a program that realizes the computer virus detection device according to any one of the first to ninth embodiments. The computer virus detection device 2802 sets a breakpoint in the virtual machine 2803 and monitors the behavior.
[0200]
A “virtual machine” is an application program that executes another program 2805. Usually, the other program 2805 is described by a machine instruction of a computer having an assumed architecture. A typical example is one that executes a compiled program described in Java (registered trademark). Since a Java (registered trademark) program is assumed to be downloaded from the Internet, in many cases, the source / feature is unknown and the program may be a dangerous program. Thus, for example, a Java (registered trademark) virtual machine is designed to restrict a program to be executed from freely using an API (2804) to an OS to access computer resources. However, there are cases where a program 2805 running on the virtual machine freely accesses computer resources by utilizing a bug in the virtual machine.
[0201]
Therefore, whether or not the computer virus detection apparatus 2802 of this embodiment sets a breakpoint in the virtual machine 2803, detects the behavior of the virtual machine 2803, and the virtual machine 2803 is not executing a program having a computer virus property. Judging. In the present embodiment, the fact that a virtual machine has a computer virus property also means that the virtual machine executes a program having a computer virus property.
[0202]
(Embodiment 10: Main effects)
According to the present embodiment, it is possible to prevent execution of a program that uses a bug of a virtual machine.
[0203]
(Embodiment 11)
As an eleventh embodiment of the present invention, an embodiment in which the computer in the tenth embodiment is a mobile phone will be described.
[0204]
(Embodiment 11: Configuration)
FIG. 29 illustrates a usage pattern of the computer virus detection device according to the present embodiment. A computer 2801 in FIG. 28 is replaced with a mobile phone 2901.
[0205]
(Embodiment 11: Main effects)
There is a remarkable improvement in the functionality of mobile phones. For example, not only a browser for the Internet but also a Java (registered trademark) virtual machine operates inside a mobile phone. In addition, an operating system that has conventionally been operated on a personal computer is now operating inside a mobile phone, and a program that operates on the mobile phone is complicated.
[0206]
However, bugs and security holes may be found after cell phone sales begin. On the other hand, the number of mobile phones more than personal computers is on the market, and collecting mobile terminals is costly and time consuming. For this reason, if a computer virus that exploits bugs or security holes in a virtual machine that runs on a mobile phone is created, the scale of the infection cannot be predicted, which has a great social impact. For example, using a bug in a virtual machine, address book data of any mobile phone is collected, leading to leakage of privacy information.
[0207]
Therefore, a computer that exploits bugs, security holes, etc. by operating a program that implements the computer virus detection device of the present invention inside a mobile phone and detecting a behavior by setting a breakpoint in a virtual machine. It becomes possible to prevent the action of viruses.
[0208]
Industrial applicability
[0209]
As described above, according to the present invention, execution of a monitored process can be stopped or rolled back to a state before execution depending on whether or not a registered instruction is executed, thereby reducing the burden on the user compared to the conventional case. Can prevent virus infection and clean up the system.
[0210]
In addition, since the present invention detects the behavior at the time of program execution, it does not require preprocessing such as decompression of the compressed file before scanning and decryption of the encrypted file, which are necessary in the conventional signature scan.
[0211]
Therefore, the present invention is useful as a computer virus detection device.
[Brief description of the drawings]
FIG. 1 is a diagram conceptually illustrating execution of a process on a computer in the prior art.
FIG. 2 is a diagram illustrating the relationship between a process for executing an application program and a debugger in the prior art.
FIG. 3 is a diagram illustrating how function and procedure calls in a high-level language are compiled in the prior art.
FIG. 4 is a diagram illustrating a result of function compilation in the prior art
FIG. 5 is a diagram illustrating a state in which values are stacked on a stack in the prior art.
FIG. 6 is a diagram illustrating a state in which a DLL file is mapped in a virtual process space in the prior art.
FIG. 7 is a diagram showing a virtual memory space of a process in the prior art
FIG. 8 is a diagram illustrating a flowchart of processing in the present invention.
FIG. 9 is a functional block diagram of the computer virus detection device according to the first embodiment of the invention.
FIG. 10 is a diagram illustrating an example of a state in which breakpoint information is held
FIG. 11 is a diagram illustrating a state in which breakpoint information is provided for each application program
FIG. 12 is a diagram illustrating a flowchart of processing of a computer virus detection device
FIG. 13 is a diagram illustrating a display screen by the computer virus detection device according to the second embodiment of the invention.
FIG. 14 is a diagram illustrating a functional block diagram of a computer virus detection device according to the second embodiment of the invention;
FIG. 15 is a flowchart of processing of a computer virus detection apparatus.
FIG. 16 is a diagram illustrating breakpoint information according to the third embodiment of the present invention.
FIG. 17 is a flowchart of processing of a computer virus detection apparatus.
FIG. 18 is a functional block diagram of a computer virus detection apparatus according to Embodiment 7 of the present invention.
FIG. 19 is a flowchart of processing of a computer virus detection apparatus.
FIG. 20 is a diagram illustrating an outline of an eighth embodiment of the present invention;
FIG. 21 is a functional block diagram of a computer virus detection device according to an eighth embodiment of the present invention.
FIG. 22 is a diagram showing an example of a communication blocking command
FIG. 23 is a flowchart of processing of a computer virus detection apparatus.
FIG. 24 is a functional block diagram of a communication device according to an eighth embodiment of the present invention.
FIG. 25 is a flowchart of processing of a communication device.
FIG. 26 is a functional block diagram of a computer virus detection apparatus according to the ninth embodiment of the present invention.
FIG. 27 is a diagram illustrating a flowchart of processing of a computer virus detection device
FIG. 28 is a diagram illustrating a usage pattern of the computer virus detection device according to the tenth embodiment of the invention;
FIG. 29 is a diagram illustrating a usage pattern of the computer virus detection device according to the eleventh embodiment of the present invention;

Claims (14)

アプリケーションプログラムの実行に際して設定するべきブレークポイントの位置を示す情報であるブレークポイント位置情報と、そのアプリケーションプログラムの実行が前記ブレークポイントに到達したときに、そのアプリケーションプログラムの実行で参照されるスタックの内容に基づいて、そのアプリケーションプログラムがコンピュータウィルス性を有するかどうかの判断を行なうための判断プログラムと、を含む情報であるブレークポイント情報を保持するブレークポイント情報保持部と、
アプリケーションプログラムに、前記ブレークポイント情報保持部で保持されたブレークポイント情報に基づいて、ブレークポイントを設定するためのブレークポイント設定部と、
前記アプリケーションプログラムの実行が、前記ブレークポイント設定部で設定されたブレークポイントに到達したとき、前記ブレークポイント情報に含まれる判断プログラムを実行する判断プログラム実行部と、
を有するコンピュータウィルス検出装置。
Breakpoint position information, which is information indicating the position of the breakpoint to be set when executing the application program, and the contents of the stack that is referenced when executing the application program when the execution of the application program reaches the breakpoint A breakpoint information holding unit for holding breakpoint information that is information including a determination program for determining whether the application program has a computer virus property based on
A breakpoint setting unit for setting a breakpoint based on the breakpoint information held in the breakpoint information holding unit in the application program;
A determination program execution unit that executes a determination program included in the breakpoint information when execution of the application program reaches a breakpoint set in the breakpoint setting unit;
A computer virus detection device.
アプリケーションプログラムを保持するアプリケーションプログラム保持部と、
アプリケーションプログラム保持部で保持されたアプリケーションプログラムの実行を開始するプログラム実行開始部と、
前記プログラム実行開始部で実行が開始されるアプリケーションプログラムに対して、前記ブレークポイント設定部にプレークポイントの設定を命令するブレークポイント設定命令部と、
を有する請求の範囲第1項に記載のコンピュータウィルス検出装置。
An application program holding unit for holding application programs;
A program execution start unit for starting execution of the application program held in the application program holding unit;
A breakpoint setting command unit for instructing the breakpoint setting unit to set a breakpoint for an application program whose execution is started by the program execution start unit;
The computer virus detection device according to claim 1, comprising:
前記ブレークポイント情報保持部が保持する前記ブレークポイント位置情報は、前記アプリケーションプログラムのシステムコールAPI関数に基づいて定められる請求の範囲第1項に記載のコンピュータウィルス検出装置。The computer virus detection device according to claim 1, wherein the breakpoint position information held by the breakpoint information holding unit is determined based on a system call API function of the application program. 前記判断プログラムは、そのアプリケーションプログラムのシステムコールAPI関数の引数の検査に基づいてそのアプリケーションプログラムがコンピュータウィルス性を有するかどうかの判断をするためのシステムコール検査プログラムを含む請求の範囲第3項に記載のコンピュータウィルス検出装置4. The system call inspection program according to claim 3, wherein the determination program includes a system call inspection program for determining whether or not the application program has a computer virus property based on an inspection of an argument of a system call API function of the application program. The computer virus detection device described 前記システムコール検査プログラムによって検査される引数は、前記ブレークポイント情報保持部が保持するブレークポイント位置情報で定められるシステムコールAPI関数の引数である請求の範囲第4項に記載のコンピュータウィルス検出装置。5. The computer virus detection device according to claim 4, wherein the argument to be inspected by the system call inspection program is an argument of a system call API function defined by breakpoint position information held by the breakpoint information holding unit. 前記判断プログラムは、
そのアプリケーションプログラムのシステムコールAPI関数の実行によりシステムリソースが変更される場合に、その変更されるシステムリソースの複製を作成する複製作成プログラムを含む請求の範囲第4項または請求の範囲第5項に記載のコンピュータウィルス検出装置。
The determination program is
Claim 4 or Claim 5 includes a copy creation program for creating a copy of the changed system resource when the system resource is changed by executing the system call API function of the application program. The computer virus detection apparatus as described.
前記判断プログラム実行部による判断の結果、判断の対象となったアプリケーションプログラムがコンピュータウィルス性を有すると判断された場合に、コンピュータウィルス性を有すると判断されたアプリケーションプログラムのシステムコールAPI関数の実行をさせないための実行阻止部を有する請求の範囲第4項または請求の範囲第5項に記載のコンピュータウィルス検出装置。As a result of the determination by the determination program execution unit, when it is determined that the application program to be determined has a computer virus property, the system call API function of the application program determined to have the computer virus property is executed. The computer virus detection device according to claim 4 or claim 5, further comprising an execution blocking unit for preventing the execution. 前記判断プログラム実行部による判断の結果、判断の対象となったアプリケーションプログラムがコンピュータウィルス性を有すると判断された場合に、アプリケーションプログラムが通信を行なう通信システムコールAPI関数を実行するときに、外部の通信機器に対してアプリケーションプログラムが実行する通信システムコールAPI関数による通信を失敗させるための命令である通信阻止命令を出力する通信阻止命令出力部を有する請求の範囲第4項に記載のコンピュータウィルス検出装置。As a result of the determination by the determination program execution unit, when it is determined that the application program to be determined has a computer virus property, when executing the communication system call API function with which the application program performs communication, 5. The computer virus detection according to claim 4, further comprising: a communication block instruction output unit that outputs a communication block instruction that is a command for causing communication apparatus to fail communication by a communication system call API function executed by an application program. apparatus. 前記ブレークポイント設定部で設定されたブレークポイントに前記アプリケーションプログラムが到達した履歴を保持する履歴保持部を有し、
前記判断プログラムは、前記履歴保持部で保持された履歴に基づいて、そのアプリケーションプログラムがコンピュータウィルス性を有するかどうかを判断する履歴検査プログラムを有する請求の範囲第1項に記載のコンピュータウィルス検出装置。
A history holding unit that holds a history of the application program reaching the breakpoint set in the breakpoint setting unit;
2. The computer virus detection apparatus according to claim 1, wherein the determination program includes a history inspection program for determining whether the application program has a computer virus property based on the history held by the history holding unit. .
前記アプリケーションプログラムは、バーチャルマシンである請求の範囲第1項に記載のコンピュータウィルス検出装置。The computer virus detection apparatus according to claim 1, wherein the application program is a virtual machine. 前記バーチャルマシンは、携帯電話内で動作する請求の範囲第10項に記載のコンピュータウィルス検出装置。The computer virus detection device according to claim 10, wherein the virtual machine operates in a mobile phone. 前記通信阻止命令を受信する通信阻止命令受信部と、
前記通信阻止命令受信部で受信された通信阻止命令に基づいて、通信を阻止する通信阻止部を有する通信機器。
A communication blocking command receiving unit for receiving the communication blocking command;
A communication device having a communication blocking unit for blocking communication based on the communication blocking command received by the communication blocking command receiving unit.
アプリケーションプログラムの実行に際して設定するべきブレークポイントの位置を示す情報であるブレークポイント位置情報と、そのアプリケーションプログラムの実行が前記ブレークポイントに到達したときに、前記アプリケーションプログラムの実行で参照されるスタックの内容に基づいて、前記アプリケーションプログラムがコンピュータウィルス性を有するかどうかの判断を行なうための判断プログラムと、を含む情報であるブレークポイント情報を保持するブレークポイント情報保持ステップと、
アプリケーションプログラムに、前記ブレークポイント情報保持ステップにより保持されたブレークポイント情報に基づいて、ブレークポイントを設定するためのブレークポイント設定ステップと、
前記アプリケーションプログラムの実行が、前記ブレークポイント設定ステップにて設定されたブレークポイントに到達したとき、前記ブレークポイント情報に含まれる判断プログラムを実行する判断プログラム実行ステップと、
をコンピュータに実行させるためのコンピュータウィルス検出プログラム。
Breakpoint position information, which is information indicating the position of the breakpoint to be set when executing the application program, and the contents of the stack that is referred to when executing the application program when the execution of the application program reaches the breakpoint A breakpoint information holding step for holding breakpoint information that is information including a determination program for determining whether the application program has a computer virus property based on
A breakpoint setting step for setting a breakpoint on the application program based on the breakpoint information held by the breakpoint information holding step;
A determination program execution step for executing a determination program included in the breakpoint information when the execution of the application program reaches the breakpoint set in the breakpoint setting step;
A computer virus detection program that causes a computer to execute.
アプリケーションプログラムの実行に際して設定するべきブレークポイントの位置を示す情報であるブレークポイント位置情報と、そのアプリケーションプログラムの実行が前記ブレークポイントに到達したときに、前記アプリケーションプログラムの実行で参照されるスタックの内容に基づいて、前記アプリケーションプログラムがコンピュータウィルス性を有するかどうかの判断を行なうための判断プログラムと、を含む情報であるブレークポイント情報を保持するブレークポイント情報保持ステップと、
アプリケーションプログラムに、前記ブレークポイント情報保持ステップにより保持されたブレークポイント情報に基づいて、ブレークポイントを設定するためのブレークポイント設定ステップと、
前記アプリケーションプログラムの実行が、前記ブレークポイント設定ステップにて設定されたブレークポイントに到達したとき、前記ブレークポイント情報に含まれる判断プログラムを実行する判断プログラム実行ステップと、
を含むコンピュータウィルス検出方法。
Breakpoint position information, which is information indicating the position of the breakpoint to be set when executing the application program, and the contents of the stack that is referred to when executing the application program when the execution of the application program reaches the breakpoint A breakpoint information holding step for holding breakpoint information that is information including a determination program for determining whether the application program has a computer virus property based on
A breakpoint setting step for setting a breakpoint on the application program based on the breakpoint information held by the breakpoint information holding step;
A determination program execution step for executing a determination program included in the breakpoint information when the execution of the application program reaches the breakpoint set in the breakpoint setting step;
A computer virus detection method including:
JP2005502696A 2003-02-21 2004-02-16 Computer virus judgment method Pending JPWO2004075060A1 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2003092702 2003-02-21
JP2003092702 2003-02-21
PCT/JP2004/001663 WO2004075060A1 (en) 2003-02-21 2004-02-16 Computer virus detection device

Publications (1)

Publication Number Publication Date
JPWO2004075060A1 true JPWO2004075060A1 (en) 2006-06-01

Family

ID=32905961

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005502696A Pending JPWO2004075060A1 (en) 2003-02-21 2004-02-16 Computer virus judgment method

Country Status (2)

Country Link
JP (1) JPWO2004075060A1 (en)
WO (1) WO2004075060A1 (en)

Families Citing this family (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009509273A (en) * 2005-09-22 2009-03-05 モカナ・コーポレーション Managing embedded patches
JP4754922B2 (en) 2005-09-30 2011-08-24 富士通株式会社 Worm-infected device detection device
JP4732874B2 (en) * 2005-11-28 2011-07-27 株式会社エヌ・ティ・ティ・ドコモ Software behavior modeling device, software behavior monitoring device, software behavior modeling method, and software behavior monitoring method
US7730538B2 (en) * 2006-06-02 2010-06-01 Microsoft Corporation Combining virus checking and replication filtration
JP2008129707A (en) * 2006-11-17 2008-06-05 Lac Co Ltd Program analyzing device, program analyzing method, and program
JP2008176352A (en) * 2007-01-16 2008-07-31 Lac Co Ltd Computer program, computer device and operation control method
JP4883409B2 (en) * 2007-01-22 2012-02-22 独立行政法人情報通信研究機構 Data similarity inspection method and apparatus
JP5083760B2 (en) * 2007-08-03 2012-11-28 独立行政法人情報通信研究機構 Malware similarity inspection method and apparatus
KR100897849B1 (en) 2007-09-07 2009-05-15 한국전자통신연구원 Apparatus and Method for finding malicious process
JP4995170B2 (en) * 2008-10-06 2012-08-08 日本電信電話株式会社 Fraud detection method, fraud detection device, fraud detection program, and information processing system
JP5228943B2 (en) * 2009-01-27 2013-07-03 富士通株式会社 Minimum privilege violation detection program
KR101044274B1 (en) * 2009-11-03 2011-06-28 주식회사 안철수연구소 Exploit site filtering APPARATUS, METHOD, AND RECORDING MEDIUM HAVING COMPUTER PROGRAM RECORDED
KR101265173B1 (en) * 2012-05-11 2013-05-15 주식회사 안랩 Apparatus and method for inspecting non-portable executable files
KR101244731B1 (en) * 2012-09-11 2013-03-18 주식회사 안랩 Apparatus and method for detecting malicious shell code by using debug event
CN103902891A (en) * 2012-12-24 2014-07-02 珠海市君天电子科技有限公司 Method and system for detecting virus program through Android simulator
KR20140124906A (en) * 2013-01-24 2014-10-28 주식회사 잉카인터넷 process check system and method based by behavior
KR101429131B1 (en) * 2013-06-12 2014-08-11 소프트캠프(주) Device and method for securing system
JP6025125B2 (en) * 2014-08-07 2016-11-16 パナソニックIpマネジメント株式会社 Payment processing device
US9460284B1 (en) * 2015-06-12 2016-10-04 Bitdefender IPR Management Ltd. Behavioral malware detection using an interpreter virtual machine
WO2016203759A1 (en) 2015-06-16 2016-12-22 日本電気株式会社 Analysis system, analysis method, analysis device, and recording medium in which computer program is stored
RU2659742C1 (en) 2017-08-17 2018-07-03 Акционерное общество "Лаборатория Касперского" Method for emulating the execution of files comprising instructions, different from machine instructions

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04107646A (en) * 1990-08-28 1992-04-09 Nippon Telegr & Teleph Corp <Ntt> Analysis system for on-line task processing time
JPH05108487A (en) * 1991-10-11 1993-04-30 Seiji Murakami Device and system for preventing computer virus invasion
JPH0793184A (en) * 1993-09-24 1995-04-07 Nec Corp Debugging device
WO2001037095A1 (en) * 1999-11-14 2001-05-25 Clicknet Software, Inc. Method and system for intercepting an application program interface
WO2001092981A2 (en) * 2000-05-28 2001-12-06 Yaron Mayer System and method for comprehensive general generic protection for computers against malicious programs that may steal information and/or cause damages
JP2003067210A (en) * 2001-08-22 2003-03-07 Just Syst Corp Program execution prevention device, program execution prevention method, program for computer to execute the method, and computer readable recording medium stored with the program

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04107646A (en) * 1990-08-28 1992-04-09 Nippon Telegr & Teleph Corp <Ntt> Analysis system for on-line task processing time
JPH05108487A (en) * 1991-10-11 1993-04-30 Seiji Murakami Device and system for preventing computer virus invasion
JPH0793184A (en) * 1993-09-24 1995-04-07 Nec Corp Debugging device
WO2001037095A1 (en) * 1999-11-14 2001-05-25 Clicknet Software, Inc. Method and system for intercepting an application program interface
JP2003515219A (en) * 1999-11-14 2003-04-22 クリックネット ソフトウエア,インク. Method and system for inhibiting application program interface
WO2001092981A2 (en) * 2000-05-28 2001-12-06 Yaron Mayer System and method for comprehensive general generic protection for computers against malicious programs that may steal information and/or cause damages
JP2003535414A (en) * 2000-05-28 2003-11-25 ヤロン メイヤー Systems and methods for comprehensive and common protection of computers against malicious programs that may steal information and / or cause damage
JP2003067210A (en) * 2001-08-22 2003-03-07 Just Syst Corp Program execution prevention device, program execution prevention method, program for computer to execute the method, and computer readable recording medium stored with the program

Also Published As

Publication number Publication date
WO2004075060A1 (en) 2004-09-02

Similar Documents

Publication Publication Date Title
JPWO2004075060A1 (en) Computer virus judgment method
US11550912B2 (en) Detection of exploitative program code
Guo et al. A study of the packer problem and its solutions
Lam et al. A general dynamic information flow tracking framework for security applications
TWI559166B (en) Threat level assessment of applications
US9237171B2 (en) System and method for indirect interface monitoring and plumb-lining
Bartel et al. Static analysis for extracting permission checks of a large scale framework: The challenges and solutions for analyzing android
US12001554B2 (en) Just in time memory analysis for malware detection
US9804948B2 (en) System, method, and computer program product for simulating at least one of a virtual environment and a debugging environment to prevent unwanted code from executing
Hsu et al. Antivirus software shield against antivirus terminators
JP2010262609A (en) Efficient technique for dynamic analysis of malware
Apostolopoulos et al. Resurrecting anti-virtualization and anti-debugging: Unhooking your hooks
Dai et al. Behavior-based malware detection on mobile phone
Bagheri et al. Automated dynamic enforcement of synthesized security policies in android
US20190236275A1 (en) Just in time memory analysis for malware detection
Maffia et al. Longitudinal study of the prevalence of malware evasive techniques
Filho et al. Evasion and countermeasures techniques to detect dynamic binary instrumentation frameworks
Kollenda et al. Towards automated discovery of crash-resistant primitives in binary executables
US9483645B2 (en) System, method, and computer program product for identifying unwanted data based on an assembled execution profile of code
Abbadini et al. Lightweight cloud application sandboxing
Ruan et al. Analyzing android application in real-time at kernel level
Neugschwandtner et al. d Anubis–Dynamic Device Driver Analysis Based on Virtual Machine Introspection
Gorski III et al. {FReD}: Identifying File {Re-Delegation} in Android System Services
Tian et al. A policy‐centric approach to protecting OS kernel from vulnerable LKMs
Chiaramida et al. AppSeer: discovering flawed interactions among Android components

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20060209

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20060330