JP6734481B2 - コールスタック取得装置、コールスタック取得方法、および、コールスタック取得プログラム - Google Patents
コールスタック取得装置、コールスタック取得方法、および、コールスタック取得プログラム Download PDFInfo
- Publication number
- JP6734481B2 JP6734481B2 JP2019529066A JP2019529066A JP6734481B2 JP 6734481 B2 JP6734481 B2 JP 6734481B2 JP 2019529066 A JP2019529066 A JP 2019529066A JP 2019529066 A JP2019529066 A JP 2019529066A JP 6734481 B2 JP6734481 B2 JP 6734481B2
- Authority
- JP
- Japan
- Prior art keywords
- stack
- function
- thread
- memory
- call stack
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/55—Detecting local intrusion or implementing counter-measures
- G06F21/554—Detecting local intrusion or implementing counter-measures involving event detection and direct action
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/55—Detecting local intrusion or implementing counter-measures
- G06F21/56—Computer malware detection or handling, e.g. anti-virus arrangements
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/03—Indexing scheme relating to G06F21/50, monitoring users, programs or devices to maintain the integrity of platforms
- G06F2221/034—Test or assess a computer or a system
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Virology (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Quality & Reliability (AREA)
- Debugging And Monitoring (AREA)
Description
本実施形態のコールスタック取得装置10(図2参照)は、メモリダンプと、スレッドID(コールスタックの取得対象となるスレッドのスレッドID)との入力を受け付けると、当該スレッドIDの実行コンテキストを収集し、アプリケーションの動作状態を示すコールスタックの取得を行う。
図2を用いてコールスタック取得装置10の構成例を説明する。コールスタック取得装置10は、例えば、メモリダンプと、スレッドIDとを入力とし、入力されたスレッドIDのスレッドのコールスタックを取得し、出力する。
次に、図5を用いて、コールスタック取得装置10の処理手順の例を説明する。なお、コールスタック取得装置10は、メモリダンプと、スレッドID(コールスタックの取得対象となるスレッドのスレッドID)との入力を受け付け済みであるものとする。また、実行ファイルは、PE32+形式の実行ファイルである場合を例に説明する。
なお、コールスタック取得装置10は、コールスタックの作成にあたり、RUNTIME_FUNCTION構造体、UNWIND_INFO構造体、UNWIND_CODE構造体等を用いる場合を例に説明したが、各関数が使用するスタックの幅やスタックの使用方法を特定可能なデータ構造であれば、これらの構造体に限定されない。
例えば、図7の符号701に示すように、インシデントレスポンスにコールスタック取得装置10を用いてもよい。この場合、コールスタック取得装置10は、被害PCのメモリダンプを解析し、コールスタックを取得する。そして、フォレンジックアナリスト等が、作成されたコールスタックの内容を見ることで、被害PCの被害状況や対策を検討し、インシデントレスポンスを速やかに行うことができる。
また、上記の実施形態で述べたコールスタック取得装置10の機能を実現するプログラムを所望の情報処理装置(コンピュータ)にインストールすることによって実装できる。例えば、パッケージソフトウェアやオンラインソフトウェアとして提供される上記のプログラムを情報処理装置に実行させることにより、情報処理装置をコールスタック取得装置10として機能させることができる。ここで言う情報処理装置には、デスクトップ型またはノート型のパーソナルコンピュータが含まれる。また、その他にも、情報処理装置にはスマートフォン、携帯電話機やPHS(Personal Handyphone System)等の移動体通信端末、さらには、PDA(Personal Digital Assistants)等がその範疇に含まれる。また、コールスタック取得装置10を、クラウドサーバに実装してもよい。
11 準備部
12 実行コンテキスト取得部
13 スタックトレース部
Claims (5)
- コンピュータのメモリの状態を記録したメモリダンプから、前記コンピュータで動作していたアプリケーションのコールスタックを取得するコールスタック取得装置であって、
前記メモリダンプから、前記コールスタックの作成対象となるスレッドの所属するプロセスのメモリ空間を再現するメモリ空間再現部と、
前記再現されたメモリ空間から、メモリに保存された前記スレッドのレジスタ情報を、前記スレッドの実行コンテキストとして取得する実行コンテキスト取得部と、
前記取得した前記スレッドの実行コンテキストに含まれるスタックポインタから、現在のスタックの位置を取得するスタック位置取得部と、
前記取得した実行コンテキストに含まれる現在実行中の命令ポインタから、現在実行中の関数を取得する関数取得部と、
前記メモリ空間に含まれる実行ファイルに埋め込まれたメタデータを解釈することにより、前記現在実行中の関数が使用するスタックの幅を取得し、前記取得したスタックの幅に基づき、スタック上の戻りアドレスを取得することで、前記現在実行中の関数の呼び出し元関数を特定し、前記特定した呼び出し元関数を現在実行中の関数として前記メタデータの解釈に基づく戻りアドレス取得を繰り返し行うことにより、前記現在実行中の関数の呼び出し元となる一連の関数を特定し、前記特定した一連の関数を示すコールスタックを取得するスタック取得部と
を備えることを特徴とするコールスタック取得装置。 - 前記スレッドのレジスタ情報は、
前記スレッドの動作中にOS(Operating System)がメモリに保存したレジスタ情報である
ことを特徴とする請求項1に記載のコールスタック取得装置。 - 前記実行ファイルに埋め込まれたメタデータは、
前記実行ファイルに埋め込まれた例外処理用データのうち、前記実行ファイルで用いられる関数のスタックの巻き戻しのための情報である
ことを特徴とする請求項1に記載のコールスタック取得装置。 - コンピュータのメモリの状態を記録したメモリダンプから、前記コンピュータで動作していたアプリケーションのコールスタックを取得するコールスタック取得方法であって、
前記メモリダンプから、前記コールスタックの作成対象となるスレッドの所属するプロセスのメモリ空間を再現するステップと、
前記再現されたメモリ空間から、メモリに保存された前記スレッドのレジスタ情報を、前記スレッドの実行コンテキストとして取得するステップと、
前記取得した前記スレッドの実行コンテキストに含まれるスタックポインタから、現在のスタックの位置を取得するステップと、
前記取得した実行コンテキストに含まれる現在実行中の命令ポインタから、現在実行中の関数を取得するステップと、
前記メモリ空間に含まれる実行ファイルに埋め込まれたメタデータを解釈することにより、前記現在実行中の関数が使用するスタックの幅を取得し、前記取得したスタックの幅に基づき、スタック上の戻りアドレスを取得することで、前記現在実行中の関数の呼び出し元関数を特定し、前記特定した呼び出し元関数を現在実行中の関数として前記メタデータの解釈に基づく戻りアドレス取得を繰り返し行うことにより、前記現在実行中の関数の呼び出し元となる一連の関数を特定し、前記特定した一連の関数を示すコールスタックを取得するステップと
をコールスタック取得装置が実行することを特徴とするコールスタック取得方法。 - コンピュータのメモリの状態を記録したメモリダンプから、前記コンピュータで動作していたアプリケーションのコールスタックを取得するためのコールスタック取得プログラムであって、
前記メモリダンプから、前記コールスタックの作成対象となるスレッドの所属するプロセスのメモリ空間を再現するステップと、
前記再現されたメモリ空間から、メモリに保存された前記スレッドのレジスタ情報を、前記スレッドの実行コンテキストとして取得するステップと、
前記取得した前記スレッドの実行コンテキストに含まれるスタックポインタから、現在のスタックの位置を取得するステップと、
前記取得した実行コンテキストに含まれる現在実行中の命令ポインタから、現在実行中の関数を取得するステップと、
前記メモリ空間に含まれる実行ファイルに埋め込まれたメタデータを解釈することにより、前記現在実行中の関数が使用するスタックの幅を取得し、前記取得したスタックの幅に基づき、スタック上の戻りアドレスを取得することで、前記現在実行中の関数の呼び出し元関数を特定し、前記特定した呼び出し元関数を現在実行中の関数として前記メタデータの解釈に基づく戻りアドレス取得を繰り返し行うことにより、前記現在実行中の関数の呼び出し元となる一連の関数を特定し、前記特定した一連の関数を示すコールスタックを取得するステップと
をコンピュータに実行させるためのコールスタック取得プログラム。
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017134516 | 2017-07-10 | ||
| JP2017134516 | 2017-07-10 | ||
| PCT/JP2018/025117 WO2019013033A1 (ja) | 2017-07-10 | 2018-07-02 | コールスタック取得装置、コールスタック取得方法、および、コールスタック取得プログラム |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPWO2019013033A1 JPWO2019013033A1 (ja) | 2019-11-07 |
| JP6734481B2 true JP6734481B2 (ja) | 2020-08-05 |
Family
ID=65001973
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2019529066A Active JP6734481B2 (ja) | 2017-07-10 | 2018-07-02 | コールスタック取得装置、コールスタック取得方法、および、コールスタック取得プログラム |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US11182479B2 (ja) |
| JP (1) | JP6734481B2 (ja) |
| WO (1) | WO2019013033A1 (ja) |
Families Citing this family (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7424599B2 (ja) * | 2019-05-23 | 2024-01-30 | コネクトフリー株式会社 | システムおよび情報処理方法 |
| US20220283853A1 (en) * | 2019-08-07 | 2022-09-08 | Nippon Telegraph And Telephone Corporation | Analysis system, analysis method, and analysis program |
| US11163645B2 (en) * | 2019-09-23 | 2021-11-02 | Denso Corporation | Apparatus and method of control flow integrity enforcement utilizing boundary checking |
| US20210216667A1 (en) * | 2020-01-10 | 2021-07-15 | Acronis International Gmbh | Systems and methods for protecting against unauthorized memory dump modification |
| CN114328073B (zh) * | 2020-10-10 | 2025-01-17 | 深圳市腾讯计算机系统有限公司 | 线程监控方法、装置、设备及存储介质 |
| US11288170B1 (en) * | 2020-12-10 | 2022-03-29 | International Business Machines Corporation | Log analysis debugging without running on real production environment |
| CN114138531B (zh) * | 2021-09-23 | 2025-09-23 | 统信软件技术有限公司 | 一种核心转储文件的生成方法、计算设备及存储介质 |
| CN115270119A (zh) * | 2022-05-25 | 2022-11-01 | 哈尔滨理工大学 | 一种基于内存取证技术的代码注入攻击检测方式 |
| CN115964103A (zh) * | 2022-12-11 | 2023-04-14 | 上海瓶钵信息科技有限公司 | 一种基于tee规范的安全应用中远程函数调用的方法 |
| US20260037629A1 (en) * | 2024-07-31 | 2026-02-05 | Palo Alto Networks (Israel Analytics) Ltd. | Detection of Dynamic Link Library (DLL) Side Loading Attacks |
Family Cites Families (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6560773B1 (en) * | 1997-12-12 | 2003-05-06 | International Business Machines Corporation | Method and system for memory leak detection in an object-oriented environment during real-time trace processing |
| US7028056B1 (en) * | 2000-04-14 | 2006-04-11 | Microsoft Corporation | Method and arrangements for generating debugging information following software failures |
| WO2002095585A1 (en) * | 2001-05-24 | 2002-11-28 | Techtracker, Inc. | Program execution stack signatures |
| US7178132B2 (en) * | 2002-10-23 | 2007-02-13 | Microsoft Corporation | Forward walking through binary code to determine offsets for stack walking |
| US7149929B2 (en) * | 2003-08-25 | 2006-12-12 | Hewlett-Packard Development Company, L.P. | Method of and apparatus for cross-platform core dumping during dynamic binary translation |
| US7290176B2 (en) * | 2004-07-31 | 2007-10-30 | Hewlett-Packard Development Company, L.P. | Method and system for generating stacked register dumps from backing-store memory |
| US7958512B2 (en) * | 2005-10-31 | 2011-06-07 | Microsoft Corporation | Instrumentation to find the thread or process responsible for an application failure |
| US8088011B2 (en) * | 2005-11-08 | 2012-01-03 | Microsoft Corporation | Dynamic debugging dump for game console |
| US8566944B2 (en) * | 2010-04-27 | 2013-10-22 | Microsoft Corporation | Malware investigation by analyzing computer memory |
| US8732681B2 (en) | 2011-05-16 | 2014-05-20 | Texas Instruments Incorporated | Stack analysis for post mortem analysis |
| US8607098B2 (en) * | 2011-05-26 | 2013-12-10 | International Business Machines Corporation | Generating appropriately sized core files used in diagnosing application crashes |
| US8909990B2 (en) * | 2012-08-04 | 2014-12-09 | Microsoft Corporation | Historical software diagnostics using lightweight process snapshots |
| US9015534B2 (en) * | 2012-11-08 | 2015-04-21 | Dell Products L.P. | Generation of memory dump of a computer process without terminating the computer process |
| US10621026B2 (en) * | 2017-06-04 | 2020-04-14 | Apple Inc. | Auto bug capture |
-
2018
- 2018-07-02 US US16/628,263 patent/US11182479B2/en active Active
- 2018-07-02 WO PCT/JP2018/025117 patent/WO2019013033A1/ja not_active Ceased
- 2018-07-02 JP JP2019529066A patent/JP6734481B2/ja active Active
Also Published As
| Publication number | Publication date |
|---|---|
| US11182479B2 (en) | 2021-11-23 |
| US20200218803A1 (en) | 2020-07-09 |
| WO2019013033A1 (ja) | 2019-01-17 |
| JPWO2019013033A1 (ja) | 2019-11-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6734481B2 (ja) | コールスタック取得装置、コールスタック取得方法、および、コールスタック取得プログラム | |
| CN107808094B (zh) | 检测文件中的恶意代码的系统和方法 | |
| US9015814B1 (en) | System and methods for detecting harmful files of different formats | |
| US8516589B2 (en) | Apparatus and method for preventing virus code execution | |
| US8978141B2 (en) | System and method for detecting malicious software using malware trigger scenarios | |
| CN105009139B (zh) | 用于恶意软件检测的对应用的通用拆包 | |
| US9804948B2 (en) | System, method, and computer program product for simulating at least one of a virtual environment and a debugging environment to prevent unwanted code from executing | |
| EP2985716B1 (en) | Information processing device and identifying method | |
| US11914711B2 (en) | Systems and methods for automatically generating malware countermeasures | |
| CN113391874B (zh) | 一种虚拟机检测对抗方法、装置、电子设备及存储介质 | |
| JP2010262609A (ja) | 効率的なマルウェアの動的解析手法 | |
| WO2004075060A1 (ja) | コンピュータウィルス検出装置 | |
| US20220245247A1 (en) | Exception handlers in a sandbox environment for malware detection | |
| EP2988242B1 (en) | Information processing device, and information processing method | |
| WO2018129916A1 (zh) | 沙箱检测的方法、沙箱系统和沙箱设备 | |
| US20220261481A1 (en) | Software packer-agnostic unpacking of packed executables | |
| CN113176926B (zh) | 一种基于虚拟机自省技术的api动态监控方法及系统 | |
| JP6817454B2 (ja) | コールスタック取得装置、コールスタック取得方法およびコールスタック取得プログラム | |
| JP5766650B2 (ja) | 情報処理装置、監視方法および監視プログラム | |
| EP2819055B1 (en) | System and method for detecting malicious software using malware trigger scenarios | |
| RU2592383C1 (ru) | Способ формирования антивирусной записи при обнаружении вредоносного кода в оперативной памяти | |
| EP4310707B1 (en) | System and method for detecting malicious code by an interpreter in a computing device | |
| EP3293660A1 (en) | System and method of detecting malicious code in files | |
| CN101739519A (zh) | 用于一硬件的监控装置及监控方法 | |
| US20230138346A1 (en) | Managing file dependency management in virtual machines |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190614 |
|
| 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: 20200707 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20200709 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6734481 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |