JP4643201B2 - Buffer overflow vulnerability analysis method, data processing device, analysis information providing device, analysis information extraction processing program, and analysis information provision processing program - Google Patents

Buffer overflow vulnerability analysis method, data processing device, analysis information providing device, analysis information extraction processing program, and analysis information provision processing program Download PDF

Info

Publication number
JP4643201B2
JP4643201B2 JP2004234978A JP2004234978A JP4643201B2 JP 4643201 B2 JP4643201 B2 JP 4643201B2 JP 2004234978 A JP2004234978 A JP 2004234978A JP 2004234978 A JP2004234978 A JP 2004234978A JP 4643201 B2 JP4643201 B2 JP 4643201B2
Authority
JP
Japan
Prior art keywords
buffer
information
analysis information
function
attack
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.)
Expired - Fee Related
Application number
JP2004234978A
Other languages
Japanese (ja)
Other versions
JP2006053760A (en
Inventor
誠 岩村
仁 冨士
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2004234978A priority Critical patent/JP4643201B2/en
Publication of JP2006053760A publication Critical patent/JP2006053760A/en
Application granted granted Critical
Publication of JP4643201B2 publication Critical patent/JP4643201B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、バッファオーバーフロー攻撃の対象となったプログラムの修正を行う上で必要となる分析情報を、そのプログラムの開発者に提供するための処理を行うバッファオーバーフロー脆弱性分析方法と、そのバッファオーバーフロー脆弱性分析方法を実現するシステムで用いられるデータ処理装置及び分析情報提供装置と、そのデータ処理装置の実現に用いられる分析情報抽出処理用プログラムと、その分析情報提供装置の実現に用いられる分析情報提供処理用プログラムとに関する。   The present invention relates to a buffer overflow vulnerability analysis method for performing processing for providing analysis information necessary for correcting a program subjected to a buffer overflow attack to the developer of the program, and the buffer overflow Data processing apparatus and analysis information providing apparatus used in system for realizing vulnerability analysis method, analysis information extraction processing program used for realizing the data processing apparatus, and analysis information used for realizing the analysis information providing apparatus It relates to a program for providing processing.

スタックメモリ上には、サブルーチン呼び出しの際に呼び出し元へ戻るためのリターンアドレスや、フレームポインタや、サブルーチン内でのみ利用される局所変数等が格納され、さらに、オペレーティングシステムによっては例外ハンドラ(例外発生時に実行されるサブルーチン)のアドレス等が格納される。   The stack memory stores a return address for returning to the caller when a subroutine is called, a frame pointer, a local variable used only within the subroutine, and an exception handler (exception occurs depending on the operating system). The address of a subroutine that is sometimes executed is stored.

これから、サブルーチン内でのみ利用される局所変数として宣言されたバッファに対して、バッファの境界を越えた書き込み(バッファオーバーフロー)が発生すると、リターンアドレス等が書き換わることになる。   From now on, when a write exceeding the buffer boundary (buffer overflow) occurs in a buffer declared as a local variable used only in a subroutine, the return address and the like are rewritten.

バッファオーバーフロー攻撃(スタックスマッシング攻撃)は、この書き換えによりプログラムの処理フローを変更して、任意のプログラムを実行させるという攻撃である。   The buffer overflow attack (stack smashing attack) is an attack in which an arbitrary program is executed by changing the processing flow of the program by this rewriting.

このバッファオーバーフロー攻撃は、具体的には、コピー元のバッファに攻撃用データを書き込むことで実行され、攻撃用データが書き込まれると、攻撃対象のプロセスが標準コピー関数(呼び出し元のプロセスにより指定されるコピー元のバッファからコピー先のバッファへのコピー処理を実行する関数)を呼び出してコピーを行うと、コピー先のバッファがオーバーフローしてリターンアドレス等が書き換わり、これにより攻撃が行われることになる。   Specifically, this buffer overflow attack is executed by writing attack data in the copy source buffer. When the attack data is written, the attack target process is specified by the standard copy function (calling process). When a copy is performed by calling a function that executes a copy process from the copy source buffer to the copy destination buffer), the copy destination buffer overflows and the return address is rewritten, which causes an attack. Become.

バッファオーバーフロー攻撃に対する防御を実現する従来技術として、動的リンカを使って、標準的なメモリコピー関数の呼び出しをプロセス実行時にフックすることで、コピー先のバッファのサイズをあらかじめチェックして、バッファオーバーフローを検出するという手法がある(例えば、非特許文献1参照)。   As a conventional technique for protecting against buffer overflow attacks, a dynamic linker is used to hook a standard memory copy function call at the time of process execution, so that the size of the copy destination buffer is checked in advance and a buffer overflow occurs. There is a technique of detecting (see, for example, Non-Patent Document 1).

なお、『関数をフックする』とは、ある関数が呼び出されるときに制御を横取りすることをいう。デバッグ目的で、ある関数が正確に呼び出されているのかを調べるために、一旦制御を横取りしてログ出力する、といった利用方法がある。   Note that “hooking a function” means that control is intercepted when a certain function is called. For debugging purposes, in order to check whether a certain function is called correctly, there is a usage method in which control is temporarily intercepted and logged.

また、保護対象のプロセスに対して、コンパイル時にリターンアドレス等の保護のための特別の値であるガード変数を挿入して、関数のリターン処理の直前に、ガード変数の有効性を確認し、ガード変数が破壊されているときはプロセスを異常終了する、という処理を挿入するものがある(例えば、特許文献1参照)。   In addition, a guard variable that is a special value for protection such as a return address is inserted into the process to be protected at the time of compilation, and the validity of the guard variable is confirmed immediately before the return processing of the function. Some insert a process of abnormally terminating the process when the variable is destroyed (see, for example, Patent Document 1).

これらの従来技術により、バッファオーバーフロー攻撃によるサーバの乗っ取りやデータの改竄といった不正侵入からホストを防御できるようになる。
White Paper 「Libsafe: Protecting critical elements of stacks.」"http://www.research.avayalabs.com/project/libsafe/" A.Baratloo, N.Singh, and T.Tsai, December 1999. 特開2001−216161
These conventional technologies can protect the host from unauthorized intrusion such as server hijacking and data tampering due to buffer overflow attacks.
White Paper “Libsafe: Protecting critical elements of stacks.” “Http://www.research.avayalabs.com/project/libsafe/” A. Baratloo, N. Singh, and T. Tsai, December 1999. JP 2001-216161 A

しかしながら、このような従来技術に従っていたのでは、バッファオーバーフローが発生したことを検知することは可能であるものの、その原因の特定が困難であるという問題がある。   However, according to such a conventional technique, it is possible to detect the occurrence of a buffer overflow, but there is a problem that it is difficult to identify the cause.

したがって、従来技術に従っていると、根本的な対処であるプログラムソースの修正や修正パッチの適用を迅速に行えないという問題がある。   Therefore, according to the prior art, there is a problem that it is impossible to quickly correct the program source and apply the correction patch, which is a fundamental countermeasure.

本発明はかかる事情に鑑みてなされたものであって、発生したバッファオーバーフローの原因を明確にすることで、根本的な対処であるプログラムソースの修正や修正パッチの適用を迅速に行えるようにする新たな技術の提供を目的とする。   The present invention has been made in view of such circumstances, and by clarifying the cause of the buffer overflow that has occurred, it is possible to quickly correct the program source and apply the correction patch, which is the fundamental countermeasure. The purpose is to provide new technology.

本発明により実現されるバッファオーバーフロー脆弱性分析システムは、複数のデータ処理装置と分析情報提供装置とがネットワークを介して接続されることで構成されて、バッファオーバーフロー攻撃の対象となったプログラムの修正を行う上で必要となる分析情報を、そのプログラムの開発者に提供するための処理を行う。   The buffer overflow vulnerability analysis system realized by the present invention is configured by connecting a plurality of data processing devices and an analysis information providing device via a network, and corrects a program that is subject to a buffer overflow attack. Processing to provide analysis information necessary for performing to the developer of the program.

〔1〕本発明のデータ処理装置
本発明のデータ処理装置は、上記の分析情報提供処理を実現するために、(イ)ヒープメモリ上にバッファを確保するときに呼び出されるヒープメモリ確保関数が呼び出されるときに、スタックトップまでスタックトレースを行うことでそのバッファの確保処理が行われるまでの関数の呼び出し履歴の情報を取得して、その取得した情報をヒープメモリ確保関数呼び出し履歴格納部に記録する格納手段と、(ロ)攻撃対象プロセスがコピー関数を呼び出すときに処理に入って、スタックメモリをトレースすることで、そのコピー関数で指定されるコピー先バッファのアドレスであるコピー先バッファの先頭からその呼び出し元関数のフレームポインタの直前までの距離を求め、その距離を攻撃対象となるコピー先バッファのサイズとして取得し、このとき、コピー先バッファがスタックメモリに存在しない場合には、ヒープメモリ上に確保されたバッファの情報を管理するヒープ管理ブロックを検索することでコピー先バッファのサイズを取得して、コピー元バッファのサイズとそのようにして取得したコピー先バッファのサイズとを比較し、コピー先バッファのサイズの方がコピー元バッファのサイズよりも小さい場合には、攻撃対象プロセスに対してバッファオーバーフロー攻撃が発生したものとして攻撃発生の有無を検出する検出手段と、(ハ)検出手段が攻撃対象のバッファがスタックメモリに存在することを検出する場合には、攻撃対象のバッファの先頭を越えたトレース後に最初にたどり着くフレームポインタの1つ前のフレームポインタに続くリターンアドレスを特定して、その特定したリターンアドレスの指すアドレス位置に存在する攻撃対象のバッファの確保処理を行った関数の情報を取得し、さらに、そのトレースで特定されたリターンアドレスに基づいて、攻撃対象のバッファ確保からバッファオーバーフロー攻撃までの関数の呼び出し履歴の情報を取得する第1の取得手段と、(ニ)検出手段が攻撃対象のバッファがヒープメモリに存在することを検出する場合には、ヒープメモリ確保関数呼び出し履歴格納部を参照することで、攻撃対象のバッファの確保処理が行われるまでの関数の呼び出し履歴の情報を取得する第2の取得手段と、(ホ)検出手段が検出した攻撃対象のバッファがスタックメモリかヒープメモリのどちらに存在するのかという情報と、第1の取得手段/第2の取得手段の取得した情報とを、プログラム開発者に提供する分析情報として決定する決定手段とを備える。
[1] Data processing apparatus of the present invention The data processing apparatus of the present invention calls (a) a heap memory allocation function that is called when a buffer is allocated on the heap memory in order to realize the analysis information providing process. The function call history until the buffer allocation processing is performed by performing a stack trace to the top of the stack, and the acquired information is recorded in the heap memory allocation function call history storage unit. Storage means and (b) When the attack target process calls the copy function, it enters the process and traces the stack memory so that the address of the copy destination buffer specified by the copy function starts from the beginning of the copy destination buffer. Find the distance to the point just before the frame pointer of the caller function, and copy that distance to the attack target Obtained as the size of the destination buffer. If the destination buffer does not exist in the stack memory at this time, the size of the destination buffer is searched by searching for the heap management block that manages the buffer information allocated in the heap memory. If the size of the copy destination buffer is smaller than the size of the copy source buffer, the size of the copy source buffer is compared with the size of the copy destination buffer thus obtained. Detecting means for detecting whether a buffer overflow attack has occurred, and (c) if the detecting means detects that the attack target buffer exists in the stack memory, the attack target buffer The frame point before the first frame pointer that arrives first after tracing beyond the beginning of The return address that follows is specified, information on the function that secured the attack target buffer at the address pointed to by the specified return address is obtained, and further, based on the return address specified in the trace First acquisition means for acquiring function call history information from securing the attack target buffer to buffer overflow attack, and (d) when the detection means detects that the attack target buffer exists in the heap memory. A second acquisition unit that acquires information on a function call history until the buffer for the attack target is secured by referring to the heap memory allocation function call history storage unit; and (e) a detection unit Information on whether the attack target buffer detected by the sash exists in stack memory or heap memory, and the first The acquired information of the resulting unit / second acquisition unit, and a determination means for determining as analysis information to be provided to the program developer.

ここで、本発明のデータ処理装置を構成する各処理手段はコンピュータプログラムでも実現できるものであり、このコンピュータプログラムは、適当な記録媒体に記録して提供されたり、ネットワークを介して提供され、本発明を実施する際にインストールされてCPUなどの制御手段上で動作することにより本発明を実現することになる。   Here, each processing means constituting the data processing apparatus of the present invention can also be realized by a computer program. This computer program is provided by being recorded on an appropriate recording medium or provided via a network. The present invention is realized by installing and operating on a control means such as a CPU when the invention is carried out.

〔2〕本発明の分析情報提供装置
本発明の分析情報提供装置は、上記の分析情報提供処理を実現するために、(イ)本発明のデータ処理装置から送られてくる、本発明のデータ処理装置がプログラム開発者へ提供する情報として決定した攻撃対象のバッファがスタックメモリかヒープメモリのどちらに存在するのかという分析情報を受信し、さらに、この受信にあたって、(i)攻撃対象のバッファがスタックメモリに存在する場合には、本発明のデータ処理装置が攻撃対象のバッファの確保処理を行った関数の情報と攻撃対象のバッファ確保からバッファオーバーフロー攻撃までの関数の呼び出し履歴の情報とをプログラム開発者へ提供する分析情報として決定するので、その分析情報についても受信し、(ii)一方、攻撃対象のバッファがヒープメモリに存在する場合には、本発明のデータ処理装置が攻撃対象のバッファの確保処理が行われるまでの関数の呼び出し履歴の情報をプログラム開発者へ提供する分析情報として決定するので、その分析情報についても受信することで、プログラム開発者に提供する分析情報を受信する受信手段と、(ロ)プログラム開発者に提供済みの分析情報を記憶する既知分析情報記憶手段を参照することで、受信手段の受信した分析情報が既にプログラム開発者に提供済みであるのか否かを判断する判断手段と、(ハ)受信手段の受信した分析情報が既知分析情報記憶手段に登録されていないことを判断する場合には、その分析情報をプログラム開発者に提供し、登録されていることを判断する場合には、その分析情報に対応付けて既知分析情報記憶手段に登録されている対処情報に基づいて、バッファオーバーフロー攻撃に対する対処処理を実行する実行手段とを備える。
[2] Analysis Information Providing Device of the Present Invention The analysis information providing device of the present invention provides (a ) the data of the present invention sent from the data processing device of the present invention in order to realize the above analysis information providing process Analyzing information indicating whether the attack target buffer determined as information to be provided to the program developer by the processing device exists in the stack memory or the heap memory. Further, upon receiving this, (i) the attack target buffer When the data is present in the stack memory, the data processing apparatus of the present invention programs the information on the function that performed the process of securing the attack target buffer and the function call history information from the securing of the attack target buffer to the buffer overflow attack. Since it is determined as analysis information to be provided to the developer, the analysis information is also received. (Ii) Meanwhile, the attack target buffer If it exists in the heap memory, the data processing device of the present invention determines the function call history information until the attack target buffer is secured as analysis information to be provided to the program developer. also by receiving the information, by referring receiving means for receiving the analysis information to be provided to program developer, known analysis information storage means for storing already provided insights into (ii) the program developer, a determination unit received analysis information receiving means is already determined whether it is already provided in the program developer, not been registered to the known analysis information storage means analyzes information received in (c) receiving means Ikoto when determining the provides the analysis information to the program developer, if it is determined that it is registered, known analysis in association with the analysis information of their Based on the address information registered in the broadcast storage means comprises executing means for executing a dealing process for buffer overflow attacks.

この構成を採るときにあって、判断手段は、受信手段の受信した分析情報が既知分析情報記憶手段に登録されているのか否かを判断するにあたって、攻撃対象のバッファを確保した関数からプログラム修正の施された関数までの呼び出し履歴が既知分析情報記憶手段に登録されている分析情報のものと同じとなるものについては、それ以降の関数呼び出し履歴が異なるものであっても同一のものとして扱って判断を行うことがある。 In the case of employing this configuration, the determination unit, when the received analysis information receiving means determines whether the registered in the known analysis information storage unit, from the function which ensures an attack Target Bas Ffa If the call history up to a function that has undergone program correction is the same as that of the analysis information registered in the known analysis information storage means, the same function is used even if the subsequent function call history is different. Judgment may be made as

ここで、本発明の分析情報提供装置を構成する各処理手段はコンピュータプログラムでも実現できるものであり、このコンピュータプログラムは、適当な記録媒体に記録して提供されたり、ネットワークを介して提供され、本発明を実施する際にインストールされてCPUなどの制御手段上で動作することにより本発明を実現することになる。   Here, each processing means constituting the analysis information providing apparatus of the present invention can also be realized by a computer program, and this computer program is provided by being recorded on an appropriate recording medium or provided via a network, When the present invention is implemented, the present invention is realized by being installed and operating on a control means such as a CPU.

〔3〕本発明の処理について
このように構成される本発明では、データ処理装置は、バッファオーバーフロー攻撃の発生を検知すると、プログラム開発者に提供する分析情報として、攻撃の対象となったバッファの存在する場所の情報と、そのバッファを確保した関数の情報とを抽出するとともに、そのバッファ確保からバッファオーバーフロー攻撃までの関数の呼び出し履歴の情報を抽出できる場合には、その情報を抽出する。
[3] Regarding the processing of the present invention In the present invention configured as described above, when the data processing apparatus detects the occurrence of a buffer overflow attack, the data processing apparatus detects the occurrence of the buffer as the attack target as analysis information to be provided to the program developer. Information on the existing location and information on the function that secured the buffer are extracted, and if the function call history information from the buffer securing to the buffer overflow attack can be extracted, the information is extracted.

バッファオーバーフローの修正方法は大きく分けて、
(i)確保するバッファのサイズを拡張する
(ii)バッファ書き込み時にバッファサイズをチェックする
という二つが挙げられる。
Buffer overflow correction methods can be broadly divided into
(I) Extending the size of the buffer to be secured (ii) Checking the buffer size when writing to the buffer can be cited.

(i)の修正を行うには、どのバッファをどの程度拡張すべきかを知る必要がある。   In order to correct (i), it is necessary to know how much buffer should be expanded to what extent.

そこで、本発明では、バッファを特定するために、バッファが存在する場所とバッファを確保した場所とを利用する。バッファが存在する場所としては、主にスタックメモリとヒープメモリがある。   Therefore, in the present invention, in order to specify the buffer, a place where the buffer exists and a place where the buffer is secured are used. The location where the buffer exists is mainly stack memory and heap memory.

スタックメモリ上のバッファが確保されるのは、関数が呼び出された直後であり、本発明では、オーバーフロー発生時のフレームポインタから攻撃対象となったバッファの先頭をまたぐまでスタックトレースを行い、最終的にたどり着くフレームポインタの直前のフレームポインタに近接するリターンアドレスを抽出することで、バッファを確保した関数を特定する。   The buffer in the stack memory is secured immediately after the function is called. In the present invention, the stack trace is performed from the frame pointer at the time of the overflow to the beginning of the attacked buffer, and finally The function that secures the buffer is specified by extracting the return address close to the frame pointer immediately before the frame pointer that arrives at.

また、ヒープメモリ上のバッファが確保されるのは、ヒープメモリ確保関数が呼ばれたときであり、本発明では、ヒープメモリ確保関数が呼び出されたときにスタックトップまでスタックトレースを行うことで関数の呼び出し履歴の情報(どのようなモジュール構成に従って呼び出されたのかについての情報)を取得して、その情報をヒープメモリ上に確保されたバッファの情報に対応付けて記録しておき、攻撃の対象となったバッファがヒープメモリに存在するときには、その記録情報を参照することで、バッファを確保した関数の情報を特定する。   In addition, the buffer on the heap memory is secured when the heap memory allocation function is called. In the present invention, when the heap memory allocation function is called, the function is performed by performing a stack trace to the top of the stack. The call history information (information about what module configuration is called according to the module configuration) is acquired, and the information is recorded in association with the information of the buffer secured in the heap memory. When the resulting buffer exists in the heap memory, the information on the function that secured the buffer is specified by referring to the recorded information.

一方、(ii)の修正を行うには、(i)の情報に加えて、どこでバッファのサイズをチェックするべきかを知る必要がある。バッファサイズのチェックを行うべき契機は、バッファが確保されてからオーバーフローが発生するまでである。   On the other hand, in order to correct (ii), it is necessary to know where to check the buffer size in addition to the information of (i). The trigger for checking the buffer size is from the time when the buffer is secured until the overflow occurs.

そこで、本発明では、その場所を特定するために、オーバーフロー発生時のフレームポインタからバッファを確保した関数までスタックトレースを行うことで、バッファ確保からバッファオーバーフロー攻撃までの関数の呼び出し履歴の情報を抽出する。   Therefore, in the present invention, in order to specify the location, stack trace is performed from the frame pointer at the time of overflow occurrence to the function that secures the buffer, thereby extracting function call history information from buffer securing to buffer overflow attack. To do.

データ処理装置は、このようにして取得した情報をプログラム開発者に提供する分析情報として分析情報提供装置に通知し、これを受けて、分析情報提供装置は、既知分析情報記憶手段を参照することで、通知された分析情報が既にプログラム開発者に提供済みであるのか否かを判断して、未だ提供していないことを判断するときには、通知された分析情報をプログラム開発者に提供する。   The data processing apparatus notifies the analysis information providing apparatus of the information acquired in this way as analysis information to be provided to the program developer, and in response to this, the analysis information providing apparatus refers to the known analysis information storage means. Thus, when it is determined whether or not the notified analysis information has already been provided to the program developer, and it is determined that it has not been provided yet, the notified analysis information is provided to the program developer.

この分析情報の提供を受けて、プログラム開発者は、提供された分析情報を元にプログラムを(1)又は(2)の方法で修正し、既知分析情報記憶手段に登録される分析情報に、その修正方法((1)または(2)であることを示す情報)を反映する。さらに、(2)の方法で修正した場合には、既知分析情報記憶手段に登録される分析情報に、そのバッファのサイズチェックを行った場所を反映する。その他に、修正パッチの在処などの対処情報もあれば、それについても既知分析情報記憶手段に登録される分析情報に反映する。   Upon receiving this analysis information, the program developer modifies the program by the method (1) or (2) based on the provided analysis information, and adds the analysis information registered in the known analysis information storage means to The correction method (information indicating (1) or (2)) is reflected. Further, when the correction is made by the method (2), the location where the buffer size check is performed is reflected in the analysis information registered in the known analysis information storage means. In addition, if there is coping information such as the location of the correction patch, it is also reflected in the analysis information registered in the known analysis information storage means.

このようにして修正方法を分析情報に反映することで、同一のバッファが異なった関数呼び出し履歴でオーバーフローしたときにも、既知の分析情報であるのか否かの判断を適切に行えるようにする。   By reflecting the correction method in the analysis information in this way, it is possible to appropriately determine whether or not the analysis information is known even when the same buffer overflows with a different function call history.

そして、分析情報提供装置は、データ処理装置から通知された分析情報が既知分析情報記憶手段に登録されていることを判断する場合には、その分析情報に対応付けて既知分析情報記憶手段に登録されている対処情報に基づいて、そのバッファオーバーフロー攻撃に対する対処処理を実行する。例えば、利用者にその対処情報を提示したり、その対処情報に基づいて自動的に対処するなどの対処処理を実行するのである。   When the analysis information providing apparatus determines that the analysis information notified from the data processing apparatus is registered in the known analysis information storage means, the analysis information providing apparatus registers it in the known analysis information storage means in association with the analysis information. On the basis of the handling information that has been processed, a handling process for the buffer overflow attack is executed. For example, coping processing such as presenting the coping information to the user or automatically coping based on the coping information is executed.

本発明によって得られる効果は、根本的な対処であるプログラムソースの修正や修正パッチの適用を迅速に行えるようになることである。   The effect obtained by the present invention is that it becomes possible to quickly correct a program source and apply a correction patch, which is a fundamental countermeasure.

従来のバッファオーバーフロー攻撃に対する検出手法では、バッファオーバーフローが発生したことがわかっても、その原因の特定が困難であるため、根本的な対処であるプログラムソースの修正や修正パッチの適用が遅れてしまっていた。   Even if it is known that a buffer overflow has occurred in conventional detection methods against buffer overflow attacks, it is difficult to identify the cause of the buffer overflow. It was.

これに対して、本発明では、発生したバッファオーバーフローが既知の脆弱性か否かを判断し、未知の脆弱性の場合には、プログラムを修正する上で必要な情報を抽出してプログラム開発者に伝達することで、迅速なプログラム修正が可能となる。そして、既知の脆弱性の場合には、プログラム開発者により登録された対処情報を提示したり、その対処情報に従って自動的に対処を行うことで、迅速に修正パッチを適用できるようになる。   In contrast, in the present invention, it is determined whether or not the buffer overflow that has occurred is a known vulnerability, and in the case of an unknown vulnerability, information necessary for correcting the program is extracted and the program developer is extracted. By transmitting to, quick program correction becomes possible. In the case of known vulnerabilities, it is possible to quickly apply a correction patch by presenting countermeasure information registered by the program developer or by automatically dealing with it according to the countermeasure information.

次に、本発明の実施の形態について図面を参照して詳細に説明する。   Next, embodiments of the present invention will be described in detail with reference to the drawings.

図1に、本発明により実現されるバッファオーバーフロー脆弱性分析システムの一実施形態例を図示する。   FIG. 1 illustrates an example embodiment of a buffer overflow vulnerability analysis system implemented by the present invention.

この図に示すように、本発明により実現されるバッファオーバーフロー脆弱性分析システムは、バッファオーバーフローを検知するバッファオーバーフロー検知部1と、プログラム開発者がプログラムの修正箇所を特定するための情報(修正箇所情報)を抽出する修正箇所抽出部2と、発生したバッファオーバーフローが既知脆弱性(過去に発生したもの)かどうかを判定する既知脆弱性判定部3と、既知脆弱性情報(バッファオーバーフローの原因や対処情報など)を格納する既知脆弱性情報格納部4と、プログラム開発者と対話することで既知脆弱性情報を既知脆弱性情報格納部4に登録する対話登録部5と、既知脆弱性情報格納部4に格納されている既知脆弱性情報を元に、バッファオーバーフローに対する対処処理を実行する対処部6とから構成される。   As shown in this figure, the buffer overflow vulnerability analysis system realized by the present invention includes a buffer overflow detection unit 1 that detects a buffer overflow, and information for a program developer to specify a program correction location (correction location). Information), a known vulnerability determination unit 3 that determines whether the generated buffer overflow is a known vulnerability (one that occurred in the past), and known vulnerability information (the cause of the buffer overflow A known vulnerability information storage unit 4 for storing the handling information), a dialogue registration unit 5 for registering the known vulnerability information in the known vulnerability information storage unit 4 by interacting with the program developer, and a known vulnerability information storage. Coping section that executes countermeasure processing for buffer overflow based on known vulnerability information stored in section 4 Composed of a.

ここで、図中に示す7はスタックメモリ、8はヒープメモリ確保関数呼び出し履歴格納部、9はヒープメモリ確保関数呼び出し履歴記録部である。   Here, 7 is a stack memory, 8 is a heap memory allocation function call history storage unit, and 9 is a heap memory allocation function call history recording unit.

このヒープメモリ確保関数呼び出し履歴格納部8は、図2に示すように、ヒープメモリ上に確保されたバッファのアドレスに対応付けて、ヒープメモリ確保関数の呼び出し履歴の情報(どのようなモジュール構成に従って呼び出されたのかについての情報)を格納するものであり、ヒープメモリ確保関数呼び出し履歴記録部9は、図3に示すように、ヒープメモリ確保関数が呼び出されるときに(ヒープメモリ上にバッファが確保されるときに呼び出される)、スタックトップまでスタックトレースを行い、ヒープメモリ確保関数が呼び出されるまでの関数履歴を特定して、それをヒープメモリ上に確保されたバッファのアドレスに対応付けてヒープメモリ確保関数呼び出し履歴格納部8に記録する処理を実行する。   As shown in FIG. 2, the heap memory allocation function call history storage unit 8 associates the address of the buffer allocated on the heap memory with the call history information of the heap memory allocation function (according to any module configuration). The heap memory allocation function call history recording unit 9 as shown in FIG. 3 ensures that a buffer is allocated on the heap memory when the heap memory allocation function is called, as shown in FIG. The stack trace to the top of the stack, identify the function history until the heap memory allocation function is called, and associate it with the address of the buffer allocated in the heap memory, and the heap memory Processing to be recorded in the secured function call history storage unit 8 is executed.

このバッファオーバーフロー脆弱性分析システムは、具体的には、図4に示すように、バッファオーバーフロー攻撃の対象となるプログラムを展開する複数の利用者端末10と修正箇所情報提供装置11とプログラム開発者端末12とがネットワーク13を介して接続されるシステムで構築されるものであり、利用者端末10には、図1に示したバッファオーバーフロー検知部1/修正箇所抽出部2/ヒープメモリ確保関数呼び出し履歴格納部8/ヒープメモリ確保関数呼び出し履歴記録部9が備えられ、修正箇所情報提供装置11には、図1に示した既知脆弱性判定部3/既知脆弱性情報格納部4/対話登録部5/対処部6が備えられることになる。   Specifically, as shown in FIG. 4, the buffer overflow vulnerability analysis system includes a plurality of user terminals 10, a correction location information providing device 11, and a program developer terminal that develop a program that is subject to a buffer overflow attack. 12 is constructed by a system connected to the network via the network 13, and the user terminal 10 includes a buffer overflow detection unit 1 / correction location extraction unit 2 / heap memory allocation function call history shown in FIG. The storage unit 8 / heap memory allocation function call history recording unit 9 is provided, and the corrected location information providing device 11 includes the known vulnerability determination unit 3 / known vulnerability information storage unit 4 / dialog registration unit 5 shown in FIG. / The coping part 6 will be provided.

なお、修正箇所情報提供装置11については、プログラム開発者端末12に組み込まれる形で用意されることもある。   The correction location information providing device 11 may be prepared in a form incorporated in the program developer terminal 12.

次に、このように構成されるバッファオーバーフロー脆弱性分析システムの大まかな処理の流れについて説明する。   Next, a rough processing flow of the buffer overflow vulnerability analysis system configured as described above will be described.

先ず最初に、バッファオーバーフロー検知部1がバッファオーバーフローを検知すると、オーバーフローの発生したバッファの場所(スタックメモリまたはヒープメモリ)を特定した上で、修正箇所抽出部2に制御を渡す。   First, when the buffer overflow detection unit 1 detects a buffer overflow, the location of the buffer where the overflow has occurred (stack memory or heap memory) is specified, and control is passed to the correction location extraction unit 2.

これを受けて、修正箇所抽出部2は、バッファを確保した場所(どの関数がバッファを確保したのかの情報)を抽出する。さらに、バッファサイズのチェックを行うべき場所を特定するために、オーバーフロー発生時のフレームポインタを用いてバッファを確保した関数までスタックトレースを行うことで、バッファ確保からバッファオーバーフロー攻撃までの関数の呼び出し履歴を抽出する。そして、このようにして抽出した修正箇所情報を既知脆弱性判定部3に渡す。   In response to this, the correction location extraction unit 2 extracts the location where the buffer is secured (information about which function secured the buffer). In addition, in order to specify the location where the buffer size should be checked, the function call history from buffer allocation to buffer overflow attack is performed by performing a stack trace to the function that secured the buffer using the frame pointer at the time of overflow occurrence. To extract. Then, the correction location information extracted in this way is passed to the known vulnerability determination unit 3.

これを受けて、既知脆弱性判定部3は、修正箇所抽出部2より渡された修正箇所情報が既知脆弱性情報格納部4に格納されているのか否かをチェックして、その修正箇所情報が既知脆弱性情報格納部4に格納されていないことを判断する場合には、その修正箇所情報を既知脆弱性情報格納部4に格納するとともに、対話登録部5を介して、プログラム開発者にその修正箇所情報を伝達する。   In response to this, the known vulnerability determination unit 3 checks whether or not the corrected part information passed from the corrected part extraction unit 2 is stored in the known vulnerability information storage unit 4, and the corrected part information Is not stored in the known vulnerability information storage unit 4, the corrected part information is stored in the known vulnerability information storage unit 4, and the program developer is notified via the dialog registration unit 5. The correction part information is transmitted.

これを受けて、プログラム開発者が既知脆弱性情報(バッファオーバーフローの原因や対処情報など)を入力してくるので、対話登録部5は、それを入力して、既知脆弱性情報格納部4に格納する。   In response to this, the program developer inputs known vulnerability information (cause of buffer overflow, countermeasure information, etc.), so the dialog registration unit 5 inputs it and stores it in the known vulnerability information storage unit 4. Store.

一方、既知脆弱性判定部3は、修正箇所抽出部2より渡された修正箇所情報が既知脆弱性情報格納部4に格納されていることを判断する場合には、該当する既知脆弱性情報からプログラム開発者が作成した対処情報を取得して、それを対処部6に伝達する。   On the other hand, when the known vulnerability determination unit 3 determines that the corrected part information passed from the corrected part extraction unit 2 is stored in the known vulnerability information storage unit 4, the known vulnerability information is extracted from the corresponding known vulnerability information. The coping information created by the program developer is acquired and transmitted to the coping unit 6.

これを受けて、対処部6は、既知脆弱性判定部3から受け取った対処情報を元に、その対処情報を利用者に提示したり、その対処情報に基づいて自動的に対処を行う。   In response to this, the coping section 6 presents the coping information to the user based on the coping information received from the known vulnerability determination section 3, or automatically performs coping based on the coping information.

次に、このように構成されるバッファオーバーフロー脆弱性分析システムの詳細な処理について説明する。   Next, detailed processing of the buffer overflow vulnerability analysis system configured as described above will be described.

〔1〕バッファオーバーフロー検知部1の処理
先ず最初に、バッファオーバーフロー検知部1の処理について説明する。
[1] Processing of Buffer Overflow Detection Unit 1 First, the processing of the buffer overflow detection unit 1 will be described.

バッファオーバーフロー検知部1には、本発明者らが先に出願した特願2004-40962で開示したバッファオーバーフロー検知技術を利用することができる。   The buffer overflow detection unit 1 can use the buffer overflow detection technology disclosed in Japanese Patent Application No. 2004-40962 filed earlier by the present inventors.

この本発明者らが開示したバッファオーバーフロー検知技術では、標準コピー関数の呼び出しをプログラム実行時にフックして、コピー先のバッファがスタックメモリに存在しない場合には、ヒープ管理ブロックを探索することで、ヒープメモリ上に確保されたバッファのバッファオーバーフローについても検知できるようにしている。   In the buffer overflow detection technology disclosed by the present inventors, the standard copy function call is hooked at the time of program execution, and when the copy destination buffer does not exist in the stack memory, the heap management block is searched, It is possible to detect the buffer overflow of the buffer secured in the heap memory.

これまでのバッファオーバーフロー検知の従来技術では、ヒープメモリ上に確保されたバッファのバッファオーバーフローについては検知できないが、この本発明者らが開示したバッファオーバーフロー検知技術では、その検知が可能となるという点に大きな特徴があり、これにより本発明を構成するバッファオーバーフロー検知部1を実現できるようになる。   The conventional technology for detecting buffer overflow so far cannot detect the buffer overflow of the buffer secured on the heap memory, but the buffer overflow detection technology disclosed by the present inventors can detect the buffer overflow. There is a great feature in this, and this makes it possible to realize the buffer overflow detector 1 constituting the present invention.

図5に、本発明者らが開示した発明により構成されるバッファオーバーフロー検知部1の一構成例を図示する。   FIG. 5 illustrates a configuration example of the buffer overflow detection unit 1 configured according to the invention disclosed by the present inventors.

この図に示すように、バッファオーバーフロー検知部1は、攻撃対象プロセス20に対して行われるバッファオーバーフロー攻撃を検知するために、バッファオーバーフロー攻撃の検知処理を行う標準コピー関数フック用ライブラリ21と、攻撃対象プロセス20に標準コピー関数フック用ライブラリ21をロードさせる処理を行うライブラリ注入プログラム22とを備える。   As shown in this figure, the buffer overflow detection unit 1 includes a standard copy function hook library 21 that performs a buffer overflow attack detection process in order to detect a buffer overflow attack performed on the attack target process 20, and an attack. And a library injection program 22 for performing processing for loading the standard copy function hook library 21 into the target process 20.

バッファオーバーフロー攻撃とは、コピー元バッファに攻撃用データを書き込むことで実行され、攻撃対象プロセス20がコピー元及びコピー先のバッファを指定して標準コピー関数を呼び出すことで、コピー元バッファからコピー先バッファへコピーを行うと、コピー先バッファがオーバーフローさせられることでリターンアドレス等が書き換えられてしまうという攻撃である。   A buffer overflow attack is executed by writing attack data in a copy source buffer, and the attack target process 20 specifies a copy source buffer and a copy destination buffer and calls a standard copy function to copy from the copy source buffer to the copy destination buffer. When copying to a buffer, the return address is rewritten due to overflow of the copy destination buffer.

バッファオーバーフロー検知部1は、このようなバッファオーバーフロー攻撃を検知する処理を実行するものである。   The buffer overflow detection unit 1 executes processing for detecting such a buffer overflow attack.

図6に、この検知処理を実現すべく用意される標準コピー関数フック用ライブラリ21の一構成例を図示する。   FIG. 6 shows a configuration example of the standard copy function hook library 21 prepared for realizing this detection process.

この図に示すように、標準コピー関数フック用ライブラリ21は、ライブラリがロードされた際にOSやローダから呼び出されるライブラリ初期化関数210と、各標準コピー関数に対応するフック関数(バッファオーバーフロー攻撃が行われているのか否かを検出する機能を持つ)の集まりである標準コピー関数用フック関数群211と、標準コピー関数のエントリポイントのコピー先であるトランポリンコード領域212とを備える。   As shown in this figure, the standard copy function hook library 21 includes a library initialization function 210 that is called from the OS and loader when the library is loaded, and hook functions corresponding to each standard copy function. A standard copy function hook function group 211, and a trampoline code area 212 which is a copy destination of the entry point of the standard copy function.

このように構成されるバッファオーバーフロー検知部1では、まず、ライブラリ注入プログラム22を起動することにより、標準コピー関数フック用ライブラリ21を攻撃対象プロセス空間内に注入する。   In the buffer overflow detection unit 1 configured as described above, first, the library injection program 22 is started to inject the standard copy function hook library 21 into the attack target process space.

注入された標準コピー関数フック用ライブラリ21のライブラリ初期化関数210は、攻撃対象プロセス20を書き換えることにより、攻撃対象プロセス20による標準コピー関数の呼び出しをフックする。このフックによりフック関数に制御が渡り、バッファオーバーフロー攻撃が発生している場合には、フック関数がそれを検知し、攻撃対象プロセス20を強制終了する。   The library initialization function 210 of the injected standard copy function hook library 21 hooks the call of the standard copy function by the attack target process 20 by rewriting the attack target process 20. If this hook gives control to the hook function and a buffer overflow attack has occurred, the hook function detects it and forcibly terminates the attack target process 20.

次に、図7と図8とを用いて、標準コピー関数フック用ライブラリ21内のライブラリ初期化関数210が行う処理について説明する。   Next, processing performed by the library initialization function 210 in the standard copy function hook library 21 will be described with reference to FIGS.

ここで、図7中に示す30は攻撃対象プロセス20に係るプログラム部分であって、標準コピー関数の一例である“strcpy関数”の呼び出し部分と、その“strcpy関数”の先頭部分とを示している。ここで、“strcpy関数”の呼び出しの際に指定される"dst" はコピー先バッファのアドレスを示し、“strcpy関数”の呼び出しの際に指定される"src" はコピー元バッファのアドレスを示している。   Here, 30 shown in FIG. 7 is a program part related to the attack target process 20, and shows a calling part of “strcpy function” which is an example of a standard copy function and a head part of the “strcpy function”. Yes. Here, "dst" specified when calling the "strcpy function" indicates the address of the copy destination buffer, and "src" specified when calling the "strcpy function" indicates the address of the copy source buffer. ing.

また、31は図6のトランポリンコード領域212に対応している。また、32はライブラリ初期化関数210が実行された直後の“strcpy関数”の呼び出し部分と、その“strcpy関数”の先頭部分とを示している。また、33はライブラリ初期化関数210が実行された直後のトランポリンコード領域212を示している。また、34は“strcpy関数”に対応するフック関数を示している。   Reference numeral 31 corresponds to the trampoline code area 212 of FIG. Reference numeral 32 denotes a calling part of the “strcpy function” immediately after the library initialization function 210 is executed, and a head part of the “strcpy function”. Reference numeral 33 denotes a trampoline code area 212 immediately after the library initialization function 210 is executed. Reference numeral 34 denotes a hook function corresponding to the “strcpy function”.

標準コピー関数フック用ライブラリ21内のライブラリ初期化関数210は、先ず最初に、30にある“strcpy関数”の先頭部分を、31のトランポリンコード領域内にある空きスペースにコピーする。この結果、31は33に示す状態になる。   The library initialization function 210 in the standard copy function hook library 21 first copies the head part of the “strcpy function” in 30 to an empty space in the 31 trampoline code area. As a result, 31 becomes a state indicated by 33.

続いて、30にある“strcpy関数”の先頭部分を、この“strcpy関数”に対応するフック関数にジャンプする命令(jmp hook-strcpy)に書き換える。この結果、30は32に示す状態になる。   Subsequently, the head part of the “strcpy function” in 30 is rewritten to an instruction (jmp hook-strcpy) for jumping to the hook function corresponding to this “strcpy function”. As a result, 30 becomes the state shown in 32.

これにより、攻撃対象プロセス20から“strcpy関数”が呼び出されると、ジャンプ命令に従って、34に示すこの“strcpy関数”に対応するフック関数に制御が渡り、バッファサイズのチェックを行うことができるようになる。   Thus, when the “strcpy function” is called from the attack target process 20, control is passed to the hook function corresponding to this “strcpy function” shown in 34 according to the jump instruction so that the buffer size can be checked. Become.

このフック関数は、バッファサイズをチェックした結果、バッファオーバーフロー攻撃が発生していないことを判断するときには、“call trampoline-strcpy”という命令コードに従って、トランポリンコード領域33にコピーされた“strcpy関数”の先頭部分を実行し、その後、トランポリンコード領域33に記述される“jmp strcpy+N”という命令コードに従って、“strcpy関数”に制御を戻すことになる。   When it is determined that a buffer overflow attack has not occurred as a result of checking the buffer size, this hook function uses the “strcpy function” copied to the trampoline code area 33 according to the instruction code “call trampoline-strcpy”. The head portion is executed, and then control is returned to the “strcpy function” according to the instruction code “jmp strcpy + N” described in the trampoline code area 33.

図8に、標準コピー関数フック用ライブラリ21内のライブラリ初期化関数210が実行する処理フローを図示する。   FIG. 8 shows a processing flow executed by the library initialization function 210 in the standard copy function hook library 21.

次に、この処理フローに従って、ライブラリ初期化関数210の実行する処理について詳細に説明する。   Next, processing executed by the library initialization function 210 will be described in detail according to this processing flow.

ライブラリ初期化関数210は、図8の処理フローに示すように、先ず最初に、ステップ20で、ライブラリ初期化関数210を処理するスレッド以外の全てのスレッドを一時停止する。   As shown in the processing flow of FIG. 8, the library initialization function 210 first suspends all threads other than the thread that processes the library initialization function 210 in step 20.

続いて、ステップ21で、標準コピー関数のエントリポイントを取得し、続くステップ22で、その取得したエントリポイントをフック関数へジャンプする命令に書き換える際に上書きされることになる命令を、トランポリンコード領域212(図7の31)へコピーする。   Subsequently, in step 21, the entry point of the standard copy function is acquired, and in step 22, the instruction that will be overwritten when the acquired entry point is rewritten to an instruction that jumps to the hook function is stored in the trampoline code area. Copy to 212 (31 in FIG. 7).

続いて、ステップ23で、標準コピー関数のエントリポイント(後述する処理で書き換えることになる)を実行中のスレッドが存在しないかどうかを判断して、存在する場合には、ステップ24に進んで、標準コピー関数のエントリポイントを実行中のスレッドを再開し、処理を進めてエントリポイントが実行中とならないようにした後に再度停止してから、ステップ23に戻る。   Subsequently, in step 23, it is determined whether or not there is a thread that is executing the entry point of the standard copy function (which will be rewritten in the process described later). If there is, the process proceeds to step 24. The thread that is executing the entry point of the standard copy function is resumed, the process is advanced to prevent the entry point from being executed, the process is stopped again, and the process returns to step 23.

そして、ステップ23に戻ることを繰り返していくことで、全スレッドが標準コピー関数のエントリポイントを実行していない状態を作り出すと、ステップ25に進んで、CPUの命令キャッシュの内容を消去する。続いて、ステップ26で、標準コピー関数のエントリポイントをフック関数へジャンプする命令に書き換える。   Then, by repeating the return to step 23 to create a state in which all threads are not executing the entry point of the standard copy function, the process proceeds to step 25 to erase the contents of the instruction cache of the CPU. Subsequently, in step 26, the entry point of the standard copy function is rewritten with an instruction for jumping to the hook function.

続いて、ステップ27で、全ての標準コピー関数のエントリポイントを書き換えたかどうか判断して、まだ書き換えていない標準コピー関数のエントリポイントがある場合には、ステップ21に戻る。   Subsequently, in step 27, it is determined whether or not all standard copy function entry points have been rewritten. If there is a standard copy function entry point that has not yet been rewritten, the process returns to step 21.

そして、ステップ21に戻ることを繰り返していくことで、全ての標準コピー関数のエントリポイントを書き換えたことを判断すると、ステップ28に進んで、全てのスレッドを再開して、処理を終了する。   If it is determined that the entry points of all the standard copy functions have been rewritten by repeating the return to step 21, the process proceeds to step 28, where all threads are resumed and the process is terminated.

このようにして、ライブラリ初期化関数210は、攻撃対象プロセス20により呼び出される標準コピー関数のエントリポイントをフック関数へジャンプする命令に書き換えることにより、攻撃対象プロセス20による標準コピー関数の呼び出しをフックしてフック関数に制御が渡るように処理するのである。   In this way, the library initialization function 210 hooks the call of the standard copy function by the attack target process 20 by rewriting the entry point of the standard copy function called by the attack target process 20 into an instruction to jump to the hook function. And process so that control is passed to the hook function.

次に、図9〜図11を用いて、標準コピー関数用フック関数群211を構成するフック関数が行う処理について説明する。   Next, processing performed by the hook functions constituting the standard copy function hook function group 211 will be described with reference to FIGS.

ここで、図9及び図10中に示す40は攻撃対象プロセス20のスタックメモリ(図1の7に相当するもので、呼び出された関数についての情報を記録するフレームが関数を単位としてスタックされている)を示し、図10中に示す41はヒープメモリ(プロセスの実行時に動的にバッファを割り当てる場合に使われるメモリ領域)を示し、図10中に示す42はヒープメモリ41を管理するヒープ管理ブロックを示している。   Here, reference numeral 40 shown in FIGS. 9 and 10 denotes a stack memory of the attack target process 20 (corresponding to 7 in FIG. 1), and a frame for recording information about the called function is stacked in units of functions. 10 indicates heap memory (a memory area used when a buffer is dynamically allocated during process execution), and 42 illustrated in FIG. 10 indicates heap management for managing the heap memory 41. Indicates a block.

フック関数は、攻撃対象プロセス20のスタックメモリ40を探索対象として、現在のフレームポインタが指す領域から呼び出し元関数のフレームポインタを順に辿ることで、コピー先バッファの先頭(攻撃対象プロセス20が標準コピー関数を呼び出すときに指定したコピー先バッファのアドレス)がどの関数フレームに属するのかを求めて、その属する関数フレームを求めると、図9に示すように、コピー先バッファの先頭からその求めた関数フレームの持つフレームポインタの直前までの距離をコピー先バッファのサイズとして求める。   The hook function searches the stack memory 40 of the attack target process 20 and searches the frame pointer of the caller function in order from the area pointed to by the current frame pointer, so that the head of the copy destination buffer (the attack target process 20 is the standard copy). When the function frame to which the address of the copy destination buffer (designated when calling the function) belongs is obtained and the function frame to which it belongs is obtained, as shown in FIG. 9, the obtained function frame from the top of the copy destination buffer. Is obtained as the size of the copy destination buffer.

このようにして、フック関数は、現在のフレームポインタが指す領域から呼び出し元関数のフレームポインタを順に辿ることになるが、図10に示すように、コピー先バッファの先頭がヒープメモリ41上を指している場合は、スタックメモリ40にはコピー先バッファが存在しないので、最終的にスタックボトムに到達することになる。   In this way, the hook function sequentially follows the frame pointer of the caller function from the area pointed to by the current frame pointer. However, as shown in FIG. 10, the head of the copy destination buffer points to the heap memory 41. If there is no copy destination buffer in the stack memory 40, the stack bottom is finally reached.

これから、フック関数は、フレームポインタを順に辿ることでスタックボトムに到達すると、コピー先バッファが動的に割り当てられたことでヒープメモリ41に存在する可能性があることを考慮して、図10に示すように、ヒープ管理ブロック42でコピー先バッファが管理されているかどうかを探し出し(コピー先バッファの先頭アドレスが管理されているのかをチェックすることで探し出し)、管理されている場合には、その管理されているバッファサイズをコピー先バッファのサイズとして求める。   From now on, considering that the hook function may exist in the heap memory 41 due to the dynamic allocation of the copy destination buffer when the stack bottom is reached by following the frame pointer in order, FIG. As shown in the figure, the heap management block 42 finds out whether or not the copy destination buffer is managed (searches by checking whether or not the start address of the copy destination buffer is managed). The managed buffer size is obtained as the size of the copy destination buffer.

ここで、スタックメモリ41のスタックボトムのアドレスについては実行環境によって固定であることがあり、その場合には、その固定値をスタックボトムとして取得することになるが、スタックボトムが固定ではない実行環境では、スレッド環境ブロック(TEB:Thread Environment Block)によって管理されているため、これを参照することで取得することになる。   Here, the stack bottom address of the stack memory 41 may be fixed depending on the execution environment. In this case, the fixed value is acquired as the stack bottom, but the execution environment where the stack bottom is not fixed. Then, since it is managed by a thread environment block (TEB), it is acquired by referring to this.

図11に、標準コピー関数用フック関数群211を構成するフック関数が実行する処理フローを図示する。   FIG. 11 shows a processing flow executed by hook functions constituting the standard copy function hook function group 211.

次に、この処理フローに従って、フック関数の実行する処理について詳細に説明する。   Next, processing executed by the hook function will be described in detail according to this processing flow.

フック関数は、図11の処理フローに示すように、先ず最初に、ステップ30で、各標準コピー関数の仕様からコピー元バッファのサイズを求める。続いて、ステップ31で、スタックトップとスタックボトムのアドレスを取得し、続くステップ32で、フレームポインタ(起点は自関数が呼び出された時点でのフレームポインタ)が指す領域がスタック内であるのかどうかを判断する。   As shown in the processing flow of FIG. 11, the hook function first obtains the size of the copy source buffer from the specification of each standard copy function in step 30. Subsequently, in step 31, the addresses of the stack top and stack bottom are acquired, and in step 32, whether the area pointed to by the frame pointer (the starting point is the frame pointer at the time when the own function is called) is in the stack or not. Judging.

このステップ32の判断処理に従って、フレームポインタが指す領域がスタック内であることを判断する場合には、ステップ33に進んで、呼び出し元関数のフレームを取得し、続くステップ34で、呼び出し元関数のフレームにコピー先バッファが属するのかどうかを判断する。   If it is determined that the area pointed to by the frame pointer is in the stack according to the determination process in step 32, the process proceeds to step 33 to acquire the frame of the caller function. It is determined whether or not the copy destination buffer belongs to the frame.

このステップ34の判断処理に従って、呼び出し元関数のフレームにコピー先バッファが属さないことを判断する場合には、ステップ35に進んで、フレームポインタを格納する変数を呼び出し元関数のフレームポインタに更新し、ステップ32に戻る。   If it is determined that the copy destination buffer does not belong to the frame of the caller function according to the determination process of step 34, the process proceeds to step 35, and the variable for storing the frame pointer is updated to the frame pointer of the caller function. Return to step 32.

一方、ステップ34の判断処理に従って、呼び出し元関数のフレームにコピー先バッファが属することを判断する場合には、ステップ36に進んで、図9に示すように、コピー先バッファの先頭からその呼び出し元関数のフレームポインタの直前までの距離をコピー先バッファのサイズとして求めてから、後述するステップ39の処理を行う。   On the other hand, when it is determined that the copy destination buffer belongs to the frame of the caller function according to the determination process of step 34, the process proceeds to step 36, and the caller is called from the head of the copy destination buffer as shown in FIG. After obtaining the distance to the point just before the frame pointer of the function as the size of the copy destination buffer, the processing of step 39 described later is performed.

一方、ステップ32の判断処理に従って、フレームポインタが指す領域がスタック内でないことを判断する場合には、ステップ37に進んで、コピー先バッファがヒープ管理ブロック42で管理されているかを調べる。   On the other hand, if it is determined that the area pointed to by the frame pointer is not in the stack according to the determination process in step 32, the process proceeds to step 37, and it is checked whether the copy destination buffer is managed by the heap management block.

このステップ37の判断処理に従って、コピー先バッファがヒープ管理ブロック42で管理されていないことを判断する場合には、バッファサイズのチェックは行わずに、ステップ41に進んで、トランポリンコード領域212(図7の31)にコピーされた標準コピー関数の先頭部分を呼び出すことにより、標準コピー関数に制御を渡すことで攻撃対象プロセス20の処理を継続する。   If it is determined that the copy destination buffer is not managed by the heap management block 42 in accordance with the determination processing in step 37, the process proceeds to step 41 without checking the buffer size, and the trampoline code area 212 (FIG. 7 of 31), by calling the head part of the standard copy function copied, the process of the attack target process 20 is continued by passing control to the standard copy function.

一方、ステップ37の判断処理に従って、コピー先バッファがヒープ管理ブロック42で管理されていることを判断する場合には、ステップ38に進んで、その管理されているバッファサイズに従ってコピー先バッファのサイズを取得する。   On the other hand, when it is determined that the copy destination buffer is managed by the heap management block 42 in accordance with the determination processing in step 37, the process proceeds to step 38, and the size of the copy destination buffer is set according to the managed buffer size. get.

続いて、ステップ39で、取得したコピー元バッファのサイズと取得したコピー先バッファのサイズとを比較して、コピー先バッファのサイズの方がコピー元バッファのサイズよりも小さいことを判断する場合には、バッファオーバーフロー攻撃が行われたことを検出して、ステップ40に進んで、攻撃対象プロセス20を強制終了する。   Subsequently, when it is determined in step 39 that the acquired copy source buffer size is compared with the acquired copy destination buffer size and the copy destination buffer size is smaller than the copy source buffer size. Detects that a buffer overflow attack has been performed, and proceeds to step 40 to forcibly terminate the attack target process 20.

一方、ステップ39の判断処理に従って、コピー先バッファのサイズの方がコピー元バッファのサイズよりも大きいことを判断する場合には、バッファオーバーフロー攻撃が行われなかったことを検出して、ステップ41に進んで、トランポリンコード領域212(図3の31)にコピーされた標準コピー関数の先頭部分を呼び出すことにより、標準コピー関数に制御を渡すことで攻撃対象プロセス20の処理を継続する。   On the other hand, if it is determined that the size of the copy destination buffer is larger than the size of the copy source buffer according to the determination process of step 39, it is detected that a buffer overflow attack has not been performed, and the process proceeds to step 41. The process of the attack target process 20 is continued by transferring the control to the standard copy function by calling the head part of the standard copy function copied to the trampoline code area 212 (31 in FIG. 3).

このようにして、フック関数は、攻撃対象プロセス20が標準コピー関数を呼び出すときに動作に入って、コピー元バッファのサイズとコピー先バッファのサイズとを取得して比較し、それに従って、攻撃対象プロセス20に対してバッファオーバーフロー攻撃が行われたのか否かを検出するように処理するのである。   In this way, the hook function enters the operation when the attack target process 20 calls the standard copy function, obtains and compares the size of the copy source buffer and the size of the copy destination buffer, and accordingly, the attack target Processing is performed so as to detect whether or not a buffer overflow attack has been performed on the process 20.

この構成に従って、図1に示したバッファオーバーフロー検知部1は、標準コピー関数の呼び出しをプログラム実行時にフックして、コピー先のバッファがスタックメモリに存在しない場合には、ヒープ管理ブロックを探索することで、ヒープメモリ上に確保されたバッファのバッファオーバーフロー攻撃についても検知できるようにしている。   According to this configuration, the buffer overflow detection unit 1 shown in FIG. 1 hooks the call of the standard copy function at the time of program execution, and searches the heap management block when the copy destination buffer does not exist in the stack memory. Therefore, it is possible to detect a buffer overflow attack of the buffer allocated in the heap memory.

〔2〕修正箇所抽出部2の処理
次に、図1に示した修正箇所抽出部2の処理について説明する。
[2] Processing of Correction Location Extraction Unit 2 Next, the processing of the correction location extraction unit 2 shown in FIG. 1 will be described.

修正箇所抽出部2は、オーバーフローしたバッファの場所に応じた方法で、バッファを確保した場所の情報(どの関数がバッファを確保したのかの情報)を抽出して、それを既知脆弱性判定部3に渡す処理を行う。   The correction location extraction unit 2 extracts the information on the location where the buffer is secured (information about which function secured the buffer) by a method corresponding to the location of the overflowed buffer, and extracts it from the known vulnerability determination unit 3 Process to pass to.

すなわち、修正箇所抽出部2は、オーバーフローしたバッファがスタックメモリ7上に存在した場合には、図12に示すように、まず、オーバーフローが発生した際のフレームポインタを用いて、オーバーフローしたバッファの先頭をまたぐまでスタックトレースを行う。その後、最終的にたどり着くフレームポインタの直前のフレームポインタに隣接するリターンアドレスを、オーバーフローしたバッファを確保した場所として抽出する。   That is, when the overflowed buffer exists on the stack memory 7, the correction location extraction unit 2 first uses the frame pointer at the time of the overflow as shown in FIG. Stack trace is done until it crosses. Thereafter, the return address adjacent to the frame pointer immediately before the finally arrived frame pointer is extracted as a place where the overflowed buffer is secured.

さらに、バッファを確保した関数からバッファオーバーフロー攻撃までの関数がバッファサイズのチェックを行うべき場所となることに対応して、修正箇所抽出部2は、バッファサイズのチェックを行うべき場所として、図12に示す関数の呼び出し履歴も抽出する。   Furthermore, in response to the functions from the buffer securing function to the buffer overflow attack being the place where the buffer size should be checked, the correction location extraction unit 2 determines that the buffer size should be checked as shown in FIG. It also extracts the function call history shown in.

このようにして、修正箇所抽出部2は、オーバーフローしたバッファがスタックメモリ7上に存在した場合には、図13に示すような修正箇所情報(プログラム開発者がプログラムの修正を行う上で必要となる情報)を抽出するように処理するのである。   In this way, when the overflowed buffer exists on the stack memory 7, the correction location extraction unit 2 corrects the correction location information as shown in FIG. 13 (necessary for the program developer to correct the program. To be extracted).

一方、修正箇所抽出部2は、オーバーフローしたバッファがヒープメモリ上に存在した場合には、そのバッファのアドレスをキーにして、図2に示すようなデータ構造を持つヒープメモリ確保関数呼び出し履歴格納部8を検索することで、オーバーフローしたバッファを確保した場所を抽出する。   On the other hand, when there is an overflowed buffer on the heap memory, the correction location extraction unit 2 uses the buffer address as a key to store a heap memory allocation function call history storage unit having a data structure as shown in FIG. By searching 8, the place where the overflowed buffer is secured is extracted.

ヒープメモリ上にバッファを確保するためには、ヒープメモリ確保関数を呼び出す必要がある。そこで、バッファが確保された場所を特定可能とするために、ヒープメモリ確保関数呼び出し履歴記録部9は、あらかじめヒープメモリ確保関数をフックしておき、ヒープメモリ確保関数が呼び出される度に、図14に示すように、スタックトップまでスタックトレースを行って、ヒープメモリ確保関数が呼ばれるまでの関数履歴をヒープメモリ確保関数呼び出し履歴格納部8(図2に示したデータ構造を持つ)に記録しておく。   In order to secure a buffer on the heap memory, it is necessary to call a heap memory allocation function. Therefore, in order to be able to specify the location where the buffer is secured, the heap memory allocation function call history recording unit 9 hooks the heap memory allocation function in advance, and whenever the heap memory allocation function is called, FIG. As shown in FIG. 2, the stack trace is performed up to the top of the stack, and the function history until the heap memory allocation function is called is recorded in the heap memory allocation function call history storage unit 8 (having the data structure shown in FIG. 2). .

これから、修正箇所抽出部2は、オーバーフローしたバッファがヒープメモリ上に存在した場合には、そのバッファのアドレスをキーにしてヒープメモリ確保関数呼び出し履歴格納部8を検索することで、オーバーフローしたバッファを確保した場所を抽出するのである。   From now on, when the overflowed buffer exists in the heap memory, the correction part extraction unit 2 searches the heap memory allocation function call history storage unit 8 by using the address of the buffer as a key. The secured location is extracted.

このようにして、修正箇所抽出部2は、オーバーフローしたバッファがヒープメモリ上に存在した場合には、図15に示すような修正箇所情報を抽出するように処理するのである。   In this way, when the overflowed buffer exists in the heap memory, the correction location extraction unit 2 performs processing to extract correction location information as shown in FIG.

次に、図16に示す処理フローに従って、修正箇所抽出部2の実行する処理について説明する。   Next, processing executed by the correction location extraction unit 2 will be described according to the processing flow shown in FIG.

すなわち、修正箇所抽出部2は、バッファオーバーフロー検知部1がバッファオーバーフロー攻撃を検知すると、図16の処理フローに示すように、先ず最初に、ステップ40で、バッファオーバーフロー検知部1から通知される検知結果に従って、オーバーフローしたバッファの存在する場所がスタックメモリ上にあるのか、ヒープメモリ上にあるのかを判定する。   That is, when the buffer overflow detection unit 1 detects a buffer overflow attack, the correction location extraction unit 2 first detects in step 40 the notification sent from the buffer overflow detection unit 1 as shown in the processing flow of FIG. According to the result, it is determined whether the place where the overflowed buffer exists is on the stack memory or the heap memory.

この判定処理に従って、オーバーフローしたバッファがヒープメモリ上にあることを判断する場合には、ステップ41に進んで、ヒープメモリ確保関数呼び出し履歴格納部8を参照することで、バッファ確保時の関数呼び出し履歴を取得する。   When it is determined that the overflowed buffer is on the heap memory according to this determination processing, the process proceeds to step 41, and the function call history at the time of buffer allocation is obtained by referring to the heap memory allocation function call history storage unit 8. To get.

そして、続くステップ42で、この取得した関数呼び出し履歴の情報を修正箇所情報(図15に示すもの)として通知しつつ、既知脆弱性判定部3に制御を渡す。   In the subsequent step 42, control is passed to the known vulnerability determination unit 3 while notifying the acquired function call history information as correction location information (shown in FIG. 15).

一方、オーバーフローしたバッファがスタックメモリ上にあることを判断する場合には、ステップ43に進んで、オーバーフローしたバッファの先頭をまたぐまでスタックトレースを行うことでバッファを確保した関数を特定する。続いて、ステップ44で、バッファを確保した関数からオーバーフローした関数までの関数履歴を取得する。   On the other hand, when it is determined that the overflowed buffer is on the stack memory, the process proceeds to step 43, and the function that secures the buffer is specified by performing the stack trace until the head of the overflowed buffer is crossed. Subsequently, in step 44, the function history from the function that secured the buffer to the overflowed function is acquired.

そして、続くステップ45で、この特定したバッファ確保の関数の情報と、この取得した関数呼び出し履歴の情報とを修正箇所情報(図13に示すもの)として通知しつつ、既知脆弱性判定部3に制御を渡す。   Then, in the following step 45, while notifying the information of the specified buffer securing function and the acquired function call history information as the corrected portion information (shown in FIG. 13), the known vulnerability determination unit 3 is notified. Pass control.

このようにして、修正箇所抽出部2は、オーバーフローしたバッファの場所に応じた方法で修正箇所情報を抽出して、それを既知脆弱性判定部3に通知するように処理するのである。   In this way, the correction location extraction unit 2 extracts the correction location information by a method corresponding to the location of the overflowed buffer, and processes so as to notify the known vulnerability determination unit 3 of the information.

〔3〕既知脆弱性判定部3の処理
次に、図1に示した既知脆弱性判定部3の処理について説明する。
[3] Processing of Known Vulnerability Determination Unit 3 Next, processing of the known vulnerability determination unit 3 shown in FIG. 1 will be described.

既知脆弱性判定部3は、修正箇所抽出部2より渡された修正箇所情報が既知脆弱性情報格納部4に格納されているのか否かをチェックして、その修正箇所情報が既知脆弱性情報格納部4に格納されていないことを判断する場合には、その修正箇所情報を既知脆弱性情報格納部4に格納するとともに、対話登録部5を介して、プログラム開発者に伝達し、一方、格納されていることを判断する場合には、該当する既知脆弱性情報からプログラム開発者の作成した対処情報を取得して、それを対処部6に伝達する処理を行う。   The known vulnerability determination unit 3 checks whether the corrected part information passed from the corrected part extraction unit 2 is stored in the known vulnerability information storage unit 4, and the corrected part information is known vulnerability information. When determining that the information is not stored in the storage unit 4, the correction part information is stored in the known vulnerability information storage unit 4 and transmitted to the program developer via the dialogue registration unit 5. When it is determined that the information is stored, the countermeasure information created by the program developer is acquired from the corresponding known vulnerability information, and the information is transmitted to the countermeasure unit 6.

図17に、既知脆弱性情報格納部4に格納される既知脆弱性情報の一例を図示する。   FIG. 17 illustrates an example of known vulnerability information stored in the known vulnerability information storage unit 4.

この図に示すように、既知脆弱性情報格納部4は、既知脆弱性情報として、バッファが存在する場所の情報と、バッファを確保した場所の情報と、バッファオーバーフローの脆弱性についての修正方法の情報と、バッファのサイズチェックを行う場所の情報と、バッファオーバーフローが発生したときの対処情報とを格納する。   As shown in this figure, the known vulnerability information storage unit 4 includes, as known vulnerability information, information on a location where a buffer exists, information on a location where a buffer is secured, and a correction method for a buffer overflow vulnerability. Information, information on a location where a buffer size check is performed, and information on handling when a buffer overflow occurs are stored.

ここで、バッファが存在する場所の情報と、バッファを確保した場所の情報と、バッファのサイズチェックを行う場所の情報とについては、修正箇所抽出部2から修正箇所情報として通知されることになる。   Here, the information on the location where the buffer exists, the information on the location where the buffer is secured, and the information on the location where the buffer size check is performed are notified from the correction location extraction unit 2 as correction location information. .

また、バッファオーバーフローの脆弱性についての修正方法の情報(未修正であるとか、バッファサイズを拡張したとか、バッファサイズをチェックするプログラムを挿入したという情報)については、プログラム開発者が修正箇所抽出部2の抽出した修正箇所情報に基づいてプログラムを修正した場合に、その修正の元となった修正箇所情報に対応付ける形で格納されることになる。   In addition, for information on how to correct the buffer overflow vulnerability (information that it has not been corrected, that the buffer size has been expanded, or that a program that checks the buffer size has been inserted), the program developer must extract the correction location. When the program is corrected based on the correction location information extracted in step 2, the program is stored in a form associated with the correction location information that is the basis of the correction.

ここで、このプログラムの修正で、バッファサイズをチェックするプログラムを挿入するという修正方法がとられた場合には、図17に示すリターンアドレスYに示すように、どの場所でその修正が行われたのかが記録されることになる。   Here, when the modification method of inserting a program for checking the buffer size is adopted in the modification of this program, the modification is performed at any place as shown in the return address Y shown in FIG. Will be recorded.

また、バッファオーバーフローが発生したときの対処情報(例えば、修正パッチのあるURLの情報など)については、プログラム開発者により作成されて、修正箇所情報に対応付ける形で格納されることになる。   In addition, information on handling when a buffer overflow occurs (for example, information on a URL with a correction patch) is created by the program developer and stored in a form associated with the correction location information.

図18に、既知脆弱性判定部3の実行する処理フローを図示する。次に、この処理フローに従って、既知脆弱性判定部3の実行する処理について説明する。   FIG. 18 illustrates a processing flow executed by the known vulnerability determination unit 3. Next, processing executed by the known vulnerability determination unit 3 will be described according to this processing flow.

既知脆弱性判定部3は、修正箇所抽出部2から修正箇所情報が渡されると、図18の処理フローに示すように、先ず最初に、ステップ50で、修正箇所抽出部2より受け取った修正箇所情報の“バッファが存在する場所”と“バッファを確保した場所”とが既知脆弱性情報格納部4に存在するのか否かをチェックする。   When the correction location information is passed from the correction location extraction unit 2, the known vulnerability determination unit 3 first receives the correction location received from the correction location extraction unit 2 in step 50, as shown in the processing flow of FIG. It is checked whether or not the information “location where the buffer exists” and “location where the buffer is secured” exist in the known vulnerability information storage unit 4.

このチェック処理に従って、修正箇所抽出部2より受け取った修正箇所情報の“バッファが存在する場所”と“バッファを確保した場所”とが既知脆弱性情報格納部4に存在しないことを判断するときには、ステップ55に進んで、その受け取った修正箇所情報を既知脆弱性情報格納部4に格納し、続くステップ56で、対話登録部5を介して、その受け取った修正箇所情報をプログラム開発者へ伝達する。   When determining that the “location where the buffer exists” and the “location where the buffer is secured” of the correction location information received from the correction location extraction unit 2 does not exist in the known vulnerability information storage unit 4 according to this check process, Proceeding to step 55, the received correction part information is stored in the known vulnerability information storage unit 4, and in the subsequent step 56, the received correction part information is transmitted to the program developer via the dialog registration unit 5. .

これを受けて、プログラム開発者は、伝達された修正箇所情報に従い、この脆弱性を修正するので(バッファサイズを拡張したり、バッファサイズをチェックする修正を行う)、対話登録部5は、それに応じて、既知脆弱性情報格納部4に格納される既知脆弱性情報を更新する。すなわち、修正方法を登録するとともに、対処情報が入力される場合には、それを登録し、そして、バッファサイズをチェックする修正を行った場合には、バッファのサイズチェック場所に実際にサイズチェックした場所をマークすることにより、既知脆弱性情報格納部4に格納される既知脆弱性情報を更新するのである。   In response to this, the program developer corrects this vulnerability according to the transferred correction location information (expands the buffer size or checks the buffer size). In response, the known vulnerability information stored in the known vulnerability information storage unit 4 is updated. That is, when a correction method is registered, if the handling information is input, it is registered, and when the buffer size is checked, the size is actually checked at the buffer size check location. By marking the location, the known vulnerability information stored in the known vulnerability information storage unit 4 is updated.

一方、既知脆弱性判定部3は、ステップ50で、修正箇所抽出部2より受け取った修正箇所情報の“バッファが存在する場所”と“バッファを確保した場所”とが既知脆弱性情報格納部4に存在することを判断するときには、ステップ51に進んで、その受け取った修正箇所情報に対応付けて格納されている修正方法が“未修正”であるのか否かをチェックする。   On the other hand, the known vulnerability determination unit 3 determines in step 50 that the “location where the buffer exists” and the “location where the buffer is secured” of the correction location information received from the correction location extraction unit 2 are the known vulnerability information storage unit 4. When it is determined that the correction method exists, the process proceeds to step 51 to check whether or not the correction method stored in association with the received correction portion information is “uncorrected”.

このチェック処理に従って、受け取った修正箇所情報に対応付けられる修正方法が“未修正”であることを判断するときには、ステップ54に進んで、バッファのサイズチェック場所が全て等しいかどうかを調べ(関数履歴が全て等しいかどうかを調べ)、等しいことを判断するときには、ステップ57に進んで、既知脆弱性情報格納部4に格納されている該当する対処情報を対処部6へ伝達する。一方、全て等しくないことを判断するときには、ステップ55に進んで、受け取った修正箇所情報を既知脆弱性情報格納部4に格納し、続くステップ56で、対話登録部5を介して、その受け取った修正箇所情報をプログラム開発者へ伝達する。   When it is determined that the correction method associated with the received correction location information is “uncorrected” according to this check processing, the process proceeds to step 54 to check whether or not all the buffer size check locations are equal (function history). If they are all equal, the process proceeds to step 57 to transmit the corresponding countermeasure information stored in the known vulnerability information storage unit 4 to the countermeasure unit 6. On the other hand, when it is determined that they are not equal, the process proceeds to step 55, where the received corrected portion information is stored in the known vulnerability information storage unit 4, and in step 56, the received information is received via the dialog registration unit 5. Communicating the correction location information to the program developer.

一方、ステップ51のチェック処理に従って、受け取った修正箇所情報に対応付けられる修正方法が“未修正”でないことを判断するときには、ステップ52に進んで、受け取った修正箇所情報に対応付けられる修正方法が“バッファサイズ拡張”であるのか否かをチェックする。   On the other hand, when it is determined that the correction method associated with the received correction location information is not “uncorrected” according to the check process of step 51, the process proceeds to step 52, where the correction method associated with the received correction location information is determined. Check if it is “buffer size extension”.

このチェック処理に従って、受け取った修正箇所情報に対応付けられる修正方法が“バッファサイズ拡張”であることを判断するときには、ステップ57に進んで、既知脆弱性情報格納部4に格納されている該当する対処情報を対処部6へ伝達する。一方、その修正方法が“バッファサイズ拡張”でないことを判断するとき、すなわち、その修正方法が“バッファサイズチェック”であることを判断するときには、ステップ53に進んで、バッファを確保した場所から修正箇所までに関してのみ、バッファのサイズチェック場所が等しいかどうかをチェックする。   When it is determined that the correction method associated with the received correction location information is “buffer size extension” according to this check processing, the process proceeds to step 57 and the corresponding stored in the known vulnerability information storage unit 4. The handling information is transmitted to the handling unit 6. On the other hand, when it is determined that the correction method is not “buffer size extension”, that is, when it is determined that the correction method is “buffer size check”, the process proceeds to step 53 to correct from the place where the buffer is secured. Check if the buffer size check locations are equal only up to the location.

このチェック処理に従って、バッファを確保した場所から修正箇所までのサイズチェック場所が等しいことを判断するときには、それ以降の関数履歴に関係なく既知脆弱性情報であると見なして、ステップ57に進んで、既知脆弱性情報格納部4に格納されている該当する対処情報を対処部6へ伝達する。一方、等しくないことを判断するときには、ステップ55に進んで、受け取った修正箇所情報を既知脆弱性情報格納部4に格納し、続くステップ56で、対話登録部5を介して、その受け取った修正箇所情報をプログラム開発者へ伝達する。   According to this check process, when it is determined that the size check location from the location where the buffer is secured to the correction location is equal, it is regarded as the known vulnerability information regardless of the function history thereafter, and the process proceeds to step 57. Corresponding countermeasure information stored in the known vulnerability information storage unit 4 is transmitted to the countermeasure unit 6. On the other hand, when it is determined that they are not equal to each other, the process proceeds to step 55 to store the received correction location information in the known vulnerability information storage unit 4 and then to the received correction via the dialog registration unit 5 in step 56. Communicate location information to the program developer.

そして、ステップ57の処理に従って、対処部6へ該当する対処情報が伝達されるときには、これを受けて、対処部6は、利用者にその対処情報(対処法)を提示したり、その対処情報に従って自動的にバッファオーバーフローに対しての対処を実施する。   Then, when the corresponding handling information is transmitted to the handling unit 6 in accordance with the processing in step 57, the handling unit 6 receives this information and presents the handling information (handling method) to the user. To deal with buffer overflows automatically.

このようにして、本発明により実現されるバッファオーバーフロー脆弱性分析システムでは、発生したバッファオーバーフローが既知の脆弱性か否かを判断し、未知の脆弱性の場合には、プログラムを修正する上で必要な情報を抽出してプログラム開発者に伝達することで、迅速なプログラム修正を可能とするとともに、既知の脆弱性の場合には、プログラム開発者により登録された対処情報を提示したり、その対処情報に従って自動的に対処を行うことで、迅速に修正パッチを適用できるようになる。   In this way, the buffer overflow vulnerability analysis system realized by the present invention determines whether or not the generated buffer overflow is a known vulnerability, and in the case of an unknown vulnerability, it is necessary to correct the program. By extracting necessary information and communicating it to the program developer, it is possible to fix the program quickly, and in the case of known vulnerabilities, the countermeasure information registered by the program developer can be presented, By automatically taking action according to the action information, it becomes possible to quickly apply a correction patch.

本発明により実現されるバッファオーバーフロー脆弱性分析システムの一実施形態例である。It is an example of an embodiment of a buffer overflow vulnerability analysis system realized by the present invention. ヒープメモリ確保関数呼び出し履歴格納部のデータ構造の説明図である。It is explanatory drawing of the data structure of a heap memory allocation function call history storage part. ヒープメモリ確保関数呼び出し履歴記録部の実行する処理フローである。It is the processing flow which a heap memory allocation function call history recording part performs. 本発明により構成されるバッファオーバーフロー脆弱性分析システムのシステム構成例である。1 is a system configuration example of a buffer overflow vulnerability analysis system configured according to the present invention. バッファオーバーフロー検知部の一構成例である。It is an example of 1 structure of a buffer overflow detection part. 標準コピー関数フック用ライブラリの一構成例である。It is an example of 1 structure of the library for a standard copy function hook. ライブラリ初期化関数の行う処理の説明図である。It is explanatory drawing of the process which a library initialization function performs. ライブラリ初期化関数の実行する処理フローである。It is the processing flow which a library initialization function performs. フック関数の行う処理の説明図である。It is explanatory drawing of the process which a hook function performs. フック関数の行う処理の説明図である。It is explanatory drawing of the process which a hook function performs. フック関数の実行する処理フローである。It is the processing flow which a hook function performs. 修正箇所抽出部の行う処理の説明図である。It is explanatory drawing of the process which a correction location extraction part performs. 修正箇所抽出部の抽出する修正箇所情報の説明図である。It is explanatory drawing of the correction location information which a correction location extraction part extracts. ヒープメモリ確保関数呼び出し履歴記録部の行う処理の説明図である。It is explanatory drawing of the process which a heap memory allocation function call history recording part performs. 修正箇所抽出部の抽出する修正箇所情報の説明図である。It is explanatory drawing of the correction location information which a correction location extraction part extracts. 修正箇所抽出部の実行する処理フローである。It is a processing flow which a correction location extraction part performs. 既知脆弱性情報格納部に格納される既知脆弱性情報の説明図である。It is explanatory drawing of the known vulnerability information stored in a known vulnerability information storage part. 既知脆弱性判定部の実行する処理フローである。It is a processing flow which a known vulnerability determination part performs.

符号の説明Explanation of symbols

1 バッファオーバーフロー検知部
2 修正箇所抽出部
3 既知脆弱性判定部
4 既知脆弱性情報格納部
5 対話登録部
6 対処部
7 スタックメモリ
8 ヒープメモリ確保関数呼び出し履歴格納部
9 ヒープメモリ確保関数呼び出し履歴記録部
DESCRIPTION OF SYMBOLS 1 Buffer overflow detection part 2 Correction location extraction part 3 Known vulnerability determination part 4 Known vulnerability information storage part 5 Dialog registration part 6 Countermeasure part 7 Stack memory 8 Heap memory allocation function call history storage part 9 Heap memory allocation function call history recording Part

Claims (8)

バッファオーバーフロー攻撃の対象となったプログラムの修正を行う上で必要となる分析情報を、そのプログラムの開発者に提供するための処理を行うバッファオーバーフロー脆弱性分析方法であって、
ヒープメモリ上にバッファを確保するときに呼び出されるヒープメモリ確保関数が呼び出されるときに、スタックトップまでスタックトレースを行うことでそのバッファの確保処理が行われるまでの関数の呼び出し履歴の情報を取得して、その取得した情報をヒープメモリ確保関数呼び出し履歴格納部に記録する過程と、
攻撃対象プロセスがコピー関数を呼び出すときに処理に入って、スタックメモリをトレースすることで、そのコピー関数で指定されるコピー先バッファのアドレスであるコピー先バッファの先頭からその呼び出し元関数のフレームポインタの直前までの距離を求め、その距離を攻撃対象となるコピー先バッファのサイズとして取得し、このとき、コピー先バッファがスタックメモリに存在しない場合には、ヒープメモリ上に確保されたバッファの情報を管理するヒープ管理ブロックを検索することでコピー先バッファのサイズを取得して、コピー元バッファのサイズとそのようにして取得したコピー先バッファのサイズとを比較し、コピー先バッファのサイズの方がコピー元バッファのサイズよりも小さい場合には、攻撃対象プロセスに対してバッファオーバーフロー攻撃が発生したものとして攻撃発生の有無を検出する過程と、
上記トレースによる検出処理で攻撃対象のバッファがスタックメモリに存在することを検出する場合には、攻撃対象のバッファの先頭を越えたトレース後に最初にたどり着くフレームポインタの1つ前のフレームポインタに続くリターンアドレスを特定して、その特定したリターンアドレスの指すアドレス位置に存在する攻撃対象のバッファの確保処理を行った関数の情報を取得し、さらに、そのトレースで特定されたリターンアドレスに基づいて、攻撃対象のバッファ確保からバッファオーバーフロー攻撃までの関数の呼び出し履歴の情報を取得する過程と、
上記トレースによる検出処理で攻撃対象のバッファがヒープメモリに存在することを検出する場合には、上記ヒープメモリ確保関数呼び出し履歴格納部を参照することで、攻撃対象のバッファの確保処理が行われるまでの関数の呼び出し履歴の情報を取得する過程と、
上記トレースによる検出処理で検出された攻撃対象のバッファがスタックメモリかヒープメモリのどちらに存在するのかという情報と、上記取得した情報とを、プログラム開発者に提供する分析情報として決定する過程とを備えることを、
特徴とするバッファオーバーフロー脆弱性分析方法。
A buffer overflow vulnerability analysis method that performs processing for providing analysis information necessary for correcting a program subjected to a buffer overflow attack to the developer of the program,
When a heap memory allocation function called when allocating a buffer on the heap memory is called, the function call history information until the buffer allocation processing is performed is obtained by performing a stack trace to the top of the stack. The process of recording the acquired information in the heap memory allocation function call history storage unit,
By entering the process when the attack target process calls the copy function and tracing the stack memory, the frame pointer of the caller function starts from the copy destination buffer, which is the address of the copy destination buffer specified by the copy function. obtains the distance to the immediately preceding, acquired as the size of the destination buffer comprising the distance attacked, this time, if the destination buffer is not present in the stack memory, the information in the buffer secured on the heap memory The size of the copy destination buffer is obtained by retrieving the size of the copy destination buffer by searching for the heap management block that manages the file, comparing the size of the copy source buffer with the size of the copy destination buffer obtained in this way. If There smaller than the size of the copy source buffer to attack process A step of detecting the presence or absence of attack occurs as a buffer overflow attack occurs,
When it is detected that the attack target buffer exists in the stack memory by the detection processing by the above trace, the return following the frame pointer immediately preceding the frame pointer that arrives first after the trace exceeding the head of the attack target buffer is reached Identifies the address, obtains information about the function that secured the attack target buffer at the address pointed to by the identified return address, and then attacks based on the return address identified in the trace. The process of acquiring function call history information from the allocation of the target buffer to the buffer overflow attack,
When it is detected that the attack target buffer exists in the heap memory by the detection process by the above trace, referring to the heap memory allocation function call history storage unit until the attack target buffer allocation process is performed. The process of obtaining call history information for
The process of determining whether the attack target buffer detected in the detection process by the trace exists in stack memory or heap memory and determining the acquired information as analysis information to be provided to the program developer. To prepare,
Characteristic buffer overflow vulnerability analysis method.
請求項1に記載のバッファオーバーフロー脆弱性分析方法において、
プログラム開発者に提供済みの分析情報を記憶する既知分析情報記憶手段を参照することで、上記決定した分析情報が既にプログラム開発者に提供済みであるのか否かを判断する過程と、
上記決定した分析情報が上記既知分析情報記憶手段に登録されていないことを判断する場合には、その分析情報をプログラム開発者に提供し、登録されていることを判断する場合には、その分析情報に対応付けて上記既知分析情報記憶手段に登録されている対処情報に基づいて、バッファオーバーフロー攻撃に対する対処処理を実行する過程とを備えることを、
特徴とするバッファオーバーフロー脆弱性分析方法。
The buffer overflow vulnerability analysis method according to claim 1,
Determining whether the determined analysis information has already been provided to the program developer by referring to known analysis information storage means for storing the analysis information already provided to the program developer;
When it is determined that the determined analysis information is not registered in the known analysis information storage means, the analysis information is provided to the program developer, and when it is determined that the analysis information is registered, the analysis is performed. A process of executing a countermeasure process against a buffer overflow attack based on the countermeasure information registered in the known analysis information storage means in association with the information,
Characteristic buffer overflow vulnerability analysis method.
請求項2に記載のバッファオーバーフロー脆弱性分析方法において、
上記判断する過程では、上記決定した分析情報が上記既知分析情報記憶手段に登録されているのか否かを判断するにあたって、攻撃対象のバッファを確保した関数からプログラム修正の施された関数までの呼び出し履歴が上記既知分析情報記憶手段に登録されている分析情報のものと同じとなるものについては、それ以降の関数呼び出し履歴が異なるものであっても同一のものとして扱って判断を行うことを、
特徴とするバッファオーバーフロー脆弱性分析方法。
The buffer overflow vulnerability analysis method according to claim 2,
In the determination process, in determining whether the determined analysis information is registered in the known analysis information storage unit, a call from a function that secures a buffer to be attacked to a function that has been subjected to program modification is performed. For those whose history is the same as that of the analysis information registered in the known analysis information storage means, even if the function call history thereafter is different, it is treated as the same, and determination is made.
Characteristic buffer overflow vulnerability analysis method.
バッファオーバーフロー攻撃の対象となったプログラムの修正を行う上で必要となる分析情報を、そのプログラムの開発者に提供するための処理を行うバッファオーバーフロー脆弱性分析システムで用いられるデータ処理装置であって、
ヒープメモリ上にバッファを確保するときに呼び出されるヒープメモリ確保関数が呼び出されるときに、スタックトップまでスタックトレースを行うことでそのバッファの確保処理が行われるまでの関数の呼び出し履歴の情報を取得して、その取得した情報をヒープメモリ確保関数呼び出し履歴格納部に記録する手段と、
攻撃対象プロセスがコピー関数を呼び出すときに処理に入って、スタックメモリをトレースすることで、そのコピー関数で指定されるコピー先バッファのアドレスであるコピー先バッファの先頭からその呼び出し元関数のフレームポインタの直前までの距離を求め、その距離を攻撃対象となるコピー先バッファのサイズとして取得し、このとき、コピー先バッファがスタックメモリに存在しない場合には、ヒープメモリ上に確保されたバッファの情報を管理するヒープ管理ブロックを検索することでコピー先バッファのサイズを取得して、コピー元バッファのサイズとそのようにして取得したコピー先バッファのサイズとを比較し、コピー先バッファのサイズの方がコピー元バッファのサイズよりも小さい場合には、攻撃対象プロセスに対してバッファオーバーフロー攻撃が発生したものとして攻撃発生の有無を検出する手段と、
上記トレースによる検出処理で攻撃対象のバッファがスタックメモリに存在することを検出する場合には、攻撃対象のバッファの先頭を越えたトレース後に最初にたどり着くフレームポインタの1つ前のフレームポインタに続くリターンアドレスを特定して、その特定したリターンアドレスの指すアドレス位置に存在する攻撃対象のバッファの確保処理を行った関数の情報を取得し、さらに、そのトレースで特定されたリターンアドレスに基づいて、攻撃対象のバッファ確保からバッファオーバーフロー攻撃までの関数の呼び出し履歴の情報を取得する手段と、
上記トレースによる検出処理で攻撃対象のバッファがヒープメモリに存在することを検出する場合には、上記ヒープメモリ確保関数呼び出し履歴格納部を参照することで、攻撃対象のバッファの確保処理が行われるまでの関数の呼び出し履歴の情報を取得する手段と、
上記トレースによる検出処理で検出された攻撃対象のバッファがスタックメモリかヒープメモリのどちらに存在するのかという情報と、上記取得した情報とを、プログラム開発者に提供する分析情報として決定する手段とを備えることを、
特徴とするデータ処理装置。
A data processing device used in a buffer overflow vulnerability analysis system that performs processing to provide analysis information necessary for correcting a program that has been subject to a buffer overflow attack to the developer of the program. ,
When a heap memory allocation function called when allocating a buffer on the heap memory is called, the function call history information until the buffer allocation processing is performed is obtained by performing a stack trace to the top of the stack. Means for recording the acquired information in the heap memory allocation function call history storage unit;
By entering the process when the attack target process calls the copy function and tracing the stack memory, the frame pointer of the caller function starts from the copy destination buffer, which is the address of the copy destination buffer specified by the copy function. obtains the distance to the immediately preceding, acquired as the size of the destination buffer comprising the distance attacked, this time, if the destination buffer is not present in the stack memory, the information in the buffer secured on the heap memory The size of the copy destination buffer is obtained by retrieving the size of the copy destination buffer by searching for the heap management block that manages the file, comparing the size of the copy source buffer with the size of the copy destination buffer obtained in this way. If There smaller than the size of the copy source buffer to attack process It means for detecting the presence or absence of attack occurs as a buffer overflow attack occurs,
When it is detected that the attack target buffer exists in the stack memory by the detection processing by the above trace, the return following the frame pointer immediately preceding the frame pointer that arrives first after the trace exceeding the head of the attack target buffer is reached Identifies the address, obtains information about the function that secured the attack target buffer at the address pointed to by the identified return address, and then attacks based on the return address identified in the trace. A means of obtaining function call history information from the allocation of the target buffer to a buffer overflow attack;
When it is detected that the attack target buffer exists in the heap memory by the detection process by the above trace, referring to the heap memory allocation function call history storage unit until the attack target buffer allocation process is performed. Means for obtaining information on the function call history of
Means for determining whether the attack target buffer detected in the detection processing by the trace exists in stack memory or heap memory, and means for determining the acquired information as analysis information to be provided to the program developer; To prepare,
Characteristic data processing device.
バッファオーバーフロー攻撃の対象となったプログラムの修正を行う上で必要となる分析情報を、そのプログラムの開発者に提供するための処理を行うバッファオーバーフロー脆弱性分析システムで用いられる分析情報提供装置であって、
請求項4に記載のデータ処理装置から送られてくる、請求項4に記載のデータ処理装置がプログラム開発者へ提供する情報として決定した攻撃対象のバッファがスタックメモリかヒープメモリのどちらに存在するのかという分析情報を受信し、さらに、この受信にあたって、(i)攻撃対象のバッファがスタックメモリに存在する場合には、請求項4に記載のデータ処理装置が攻撃対象のバッファの確保処理を行った関数の情報と攻撃対象のバッファ確保からバッファオーバーフロー攻撃までの関数の呼び出し履歴の情報とをプログラム開発者へ提供する分析情報として決定するので、その分析情報についても受信し、(ii)一方、攻撃対象のバッファがヒープメモリに存在する場合には、請求項4に記載のデータ処理装置が攻撃対象のバッファの確保処理が行われるまでの関数の呼び出し履歴の情報をプログラム開発者へ提供する分析情報として決定するので、その分析情報についても受信することで、プログラム開発者に提供する分析情報を受信する手段と、
プログラム開発者に提供済みの分析情報を記憶する既知分析情報記憶手段を参照することで、上記受信した分析情報が既にプログラム開発者に提供済みであるのか否かを判断する手段と、
上記受信した分析情報が上記既知分析情報記憶手段に登録されていないことを判断する場合には、その分析情報をプログラム開発者に提供し、登録されていることを判断する場合には、その分析情報に対応付けて上記既知分析情報記憶手段に登録されている対処情報に基づいて、バッファオーバーフロー攻撃に対する対処処理を実行する手段とを備えることを、
特徴とする分析情報提供装置。
This is an analysis information provision device used in a buffer overflow vulnerability analysis system that performs processing to provide analysis information necessary for correcting a program subject to a buffer overflow attack to the developer of the program. And
5. The attack target buffer determined by the data processing device according to claim 4 as information to be provided to the program developer from the data processing device according to claim 4 exists in either the stack memory or the heap memory. And (i) when the attack target buffer exists in the stack memory, the data processing device according to claim 4 performs the process of securing the attack target buffer. Function information and function call history information from the buffer acquisition to the buffer overflow attack are determined as analysis information to be provided to the program developer, so the analysis information is also received (ii) When the attack target buffer exists in the heap memory, the data processing apparatus according to claim 4 is configured to execute the attack target buffer. Since the function call history information until the reservation process is performed is determined as analysis information to be provided to the program developer, the analysis information provided to the program developer is received by receiving the analysis information as well. Means,
Means for determining whether the received analysis information has already been provided to the program developer by referring to known analysis information storage means for storing the analysis information already provided to the program developer;
When it is determined that the received analysis information is not registered in the known analysis information storage means, the analysis information is provided to the program developer, and when it is determined that the analysis information is registered, the analysis is performed. Means for executing a countermeasure process for a buffer overflow attack based on the countermeasure information registered in the known analysis information storage means in association with the information,
A characteristic analysis information providing device.
請求項5に記載の分析情報提供装置において、
上記判断する手段は、上記受信した分析情報が上記既知分析情報記憶手段に登録されているのか否かを判断するにあたって、攻撃対象のバッファを確保した関数からプログラム修正の施された関数までの呼び出し履歴が上記既知分析情報記憶手段に登録されている分析情報のものと同じとなるものについては、それ以降の関数呼び出し履歴が異なるものであっても同一のものとして扱って判断を行うことを、
特徴とする分析情報提供装置。
The analysis information providing apparatus according to claim 5,
The determining means determines whether or not the received analysis information is registered in the known analysis information storage means and calls from a function that secures a buffer to be attacked to a function that has undergone program modification. For those whose history is the same as that of the analysis information registered in the known analysis information storage means, even if the function call history thereafter is different, it is treated as the same, and determination is made.
A characteristic analysis information providing device.
請求項4に記載のデータ処理装置の持つ機能をコンピュータに実現させるための分析情報抽出処理用プログラム。   An analysis information extraction processing program for causing a computer to realize the functions of the data processing apparatus according to claim 4. 請求項5または6に記載の分析情報提供装置の持つ機能をコンピュータに実現させるための分析情報提供処理用プログラム。   An analysis information provision processing program for causing a computer to realize the function of the analysis information provision apparatus according to claim 5 or 6.
JP2004234978A 2004-08-12 2004-08-12 Buffer overflow vulnerability analysis method, data processing device, analysis information providing device, analysis information extraction processing program, and analysis information provision processing program Expired - Fee Related JP4643201B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004234978A JP4643201B2 (en) 2004-08-12 2004-08-12 Buffer overflow vulnerability analysis method, data processing device, analysis information providing device, analysis information extraction processing program, and analysis information provision processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004234978A JP4643201B2 (en) 2004-08-12 2004-08-12 Buffer overflow vulnerability analysis method, data processing device, analysis information providing device, analysis information extraction processing program, and analysis information provision processing program

Publications (2)

Publication Number Publication Date
JP2006053760A JP2006053760A (en) 2006-02-23
JP4643201B2 true JP4643201B2 (en) 2011-03-02

Family

ID=36031200

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004234978A Expired - Fee Related JP4643201B2 (en) 2004-08-12 2004-08-12 Buffer overflow vulnerability analysis method, data processing device, analysis information providing device, analysis information extraction processing program, and analysis information provision processing program

Country Status (1)

Country Link
JP (1) JP4643201B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8510596B1 (en) 2006-02-09 2013-08-13 Virsec Systems, Inc. System and methods for run time detection and correction of memory corruption
US10079841B2 (en) 2013-09-12 2018-09-18 Virsec Systems, Inc. Automated runtime detection of malware
EP3161715A1 (en) 2014-06-24 2017-05-03 Virsec Systems, Inc. System and methods for automated detection of input and output validation and resource management vulnerability
AU2017285429B2 (en) 2016-06-16 2022-03-31 Virsec Systems, Inc. Systems and methods for remediating memory corruption in a computer application
US10585660B2 (en) * 2018-06-11 2020-03-10 Fujitsu Limited Reducing buffer overflow
US11163645B2 (en) * 2019-09-23 2021-11-02 Denso Corporation Apparatus and method of control flow integrity enforcement utilizing boundary checking
US11816217B2 (en) * 2020-04-10 2023-11-14 Vmware, Inc. Decoy memory allocation

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0922369A (en) * 1995-07-07 1997-01-21 Fujitsu Ltd Illicit operation detection method in kernel of multi-tasking system
JPH09128267A (en) * 1995-10-31 1997-05-16 Nec Corp Data processor and data processing method
JP2001216161A (en) * 2000-02-04 2001-08-10 Internatl Business Mach Corp <Ibm> Memory device, stack protection system, computer system, compiler, stack protecting method, storage medium and program transmitter
JP2002328896A (en) * 2001-04-27 2002-11-15 Nippon Telegr & Teleph Corp <Ntt> Device for automatically setting rule coping with illegal access

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0922369A (en) * 1995-07-07 1997-01-21 Fujitsu Ltd Illicit operation detection method in kernel of multi-tasking system
JPH09128267A (en) * 1995-10-31 1997-05-16 Nec Corp Data processor and data processing method
JP2001216161A (en) * 2000-02-04 2001-08-10 Internatl Business Mach Corp <Ibm> Memory device, stack protection system, computer system, compiler, stack protecting method, storage medium and program transmitter
JP2002328896A (en) * 2001-04-27 2002-11-15 Nippon Telegr & Teleph Corp <Ntt> Device for automatically setting rule coping with illegal access

Also Published As

Publication number Publication date
JP2006053760A (en) 2006-02-23

Similar Documents

Publication Publication Date Title
CN107808094B (en) System and method for detecting malicious code in a file
JP4518564B2 (en) Method for preventing unauthorized code execution, program for preventing unauthorized code execution, and recording medium for program for preventing unauthorized code execution
US9846779B2 (en) Detecting a return-oriented programming exploit
CN106991324B (en) Malicious code tracking and identifying method based on memory protection type monitoring
US7631249B2 (en) Dynamically determining a buffer-stack overrun
US8763128B2 (en) Apparatus and method for detecting malicious files
US10691800B2 (en) System and method for detection of malicious code in the address space of processes
US20140053267A1 (en) Method for identifying malicious executables
US20100064367A1 (en) Intrusion detection for computer programs
US20130239214A1 (en) Method for detecting and removing malware
US9910983B2 (en) Malware detection
KR101064164B1 (en) Kernel integrity inspection and the recovery method on linux kernel based smart platform
JP2006330864A (en) Control method for server computer system
JP4643201B2 (en) Buffer overflow vulnerability analysis method, data processing device, analysis information providing device, analysis information extraction processing program, and analysis information provision processing program
CN109472135B (en) Method, device and storage medium for detecting process injection
US7620983B1 (en) Behavior profiling
KR101842263B1 (en) Method and apparatus for preventing reverse engineering
CN113312623B (en) Process detection method and device in access control, electronic equipment and storage medium
CN112784261A (en) Method for program execution and corresponding system, computer device and medium
EP3293660A1 (en) System and method of detecting malicious code in files
JP4358648B2 (en) Stack smashing attack defense method, stack smashing attack defense apparatus, and stack smashing attack defense program
CN110610086B (en) Illegal code identification method, system, device and storage medium
CN107220537B (en) Method for detecting leakage behavior of program memory layout information
JP2005032182A (en) Program, attack code extracting apparatus, and its method
JP6594213B2 (en) Control device and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060725

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091006

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091204

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20091204

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20100331

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100420

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100601

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20101130

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20101202

R150 Certificate of patent or registration of utility model

Ref document number: 4643201

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131210

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees