2020-01-03 23:36:38 +07:00
# Tools
2020-01-25 22:05:12 +07:00
- DFIRやマルウェア解析,OSINT,その他の多数のツールに関するデータベース< br >
2020-01-25 22:04:59 +07:00
[DFIR TRAINING(TOOLS) ](https://www.dfir.training/dfirtools/advanced-search )
2020-01-25 22:05:12 +07:00
- infographicsやツールのチートシート< br >
2020-01-25 22:04:59 +07:00
[DFIR TRAINING(RESOUCES-Downloads-Infographics & Cheet Sheets) ](https://www.dfir.training/resources/downloads/cheatsheets-infographics )
2020-02-23 22:25:07 +07:00
- マルウェアに含まれることが多い文字列とBase64エンコードの対応表< br >
2020-07-02 21:59:43 +07:00
[Learning Aid - Top Base64 Encodings Table ](https://gist.github.com/Neo23x0/6af876ee72b51676c82a2db8d2cd3639 )< br >
2020-07-02 22:00:09 +07:00
- 様々なマルウェア解析ツールを提供< br >
2020-07-02 21:59:43 +07:00
[kahusecurity ](http://www.kahusecurity.com/tools.html )
2020-02-23 22:25:07 +07:00
2020-02-03 21:55:13 +07:00
### OS/VM
2020-03-14 20:34:18 +07:00
- **[FLARE VM](https://github.com/fireeye/flare-vm)**< br >
2020-02-03 21:55:13 +07:00
FireEye社が提供するマルウェア解析, DFIR, ペネトレーションテストに特化したWindowsベースのディストリビューション< br >
Practical Malware Analysis Labsが同梱< br >
2020-03-14 20:34:18 +07:00
- **[REMnux](https://remnux.org/)**< br >
2020-02-03 21:55:13 +07:00
SANSが提供するリバースエンジニアリング, マルウェア解析に特化したUbuntuベースのディストリビューション< br >
2020-03-14 20:34:18 +07:00
- **[Tsurugi Linux](https://tsurugi-linux.org/index.php)**< br >
2020-02-03 21:55:13 +07:00
DFIR,マルウェア解析, OSINTに特化したUbuntuベースのディストリビューション< br >
2020-05-09 19:30:39 +07:00
- **[Ninjutsu OS](https://ninjutsu-os.github.io/2020/04/18/What-Is-Ninjutsu-OS/)**< br >
ペンテスト, red team用のWindowsベースディストリビューション, 800以上のtoolsが含まれている
2020-01-12 22:45:41 +07:00
### Static Analysis and Debug tools
※空欄は調査中(更新予定)
|name|disassembler|decompiler|debugger|reference|
|:-|:-|:-|:-|:-|
2020-08-07 17:14:22 +07:00
|[IDA pro](https://www.hex-rays.com/products/ida/)|〇 |〇 (Not free)< br > Snowman(plugin)|〇 |[IDA Pro Reverse Engineering Tutorial for Beginners](https://www.youtube.com/playlist?list=PLKwUZp9HwWoDDBPvoapdbJ1rdofowT67z)|||||
2020-03-14 20:06:02 +07:00
|[Binary Ninja](https://binary.ninja/)|〇 ||||||||
|[Cutter](https://github.com/radareorg/cutter)|〇 |r2dec,r2ghidra|native< br > gdb< br > windbg< br > etc.|[INTRO TO CUTTER FOR MALWARE ANALYSIS(2019-03)](https://malwology.com/2019/03/14/intro-to-cutter-for-malware-analysis/)< br > [megabeets.net](https://www.megabeets.net/?s=cutter)< br > [Cutter: Presenting r2ghidra Decompiler,r2con 2019](https://www.youtube.com/watch?v=eHtMiezr7l8& list=LLTk6-mAiILdt3V27uab14LA& index=8& t=0s)|||||
2020-08-21 19:07:48 +07:00
|[Ghidra](https://ghidra-sre.org/)|〇 |〇 ||[Reversing WannaCry Part 2 - Diving into the malware with #Ghidra ,youtube](https://www.youtube.com/watch?v=Q90uZS3taG0)< br > [cheetsheet](https://www.oldergeeks.com/downloads/file.php?id=2767)< br > [Scripting in Ghidra, Patching MacOS Image2Icon](https://duraki.github.io/posts/o/20200227-ghidra-scripting-image2icon.html)< br > [Intro to Reverse Engineering](https://medium.com/swlh/intro-to-reverse-engineering-45b38370384)< br > [Intro to Reverse Engineering, Part 2](https://medium.com/swlh/intro-to-reverse-engineering-part-2-4087a70104e9)< br > [Intro to Reverse Engineering with Ghidra,youtube](https://www.youtube.com/playlist?list=PL_tws4AXg7auglkFo6ZRoWGXnWL0FHAEi)|||||
2020-03-14 20:06:02 +07:00
|[x64/x32dbg](https://x64dbg.com/#start)|〇 |Snowman|〇 ||||||
2020-05-31 18:41:18 +07:00
|[WinDbg](https://docs.microsoft.com/ja-jp/windows-hardware/drivers/debugger/debugger-download-tools)|〇 ||〇 |[Memory Analysis Skillbuilder Series: Skeleton Key Deep Dive with WinDbg](https://www.youtube.com/watch?v=pdkOJMBmckQ& feature=youtu.be)< br > [WinDbg — the Fun Way: Part 2](https://medium.com/@yardenshafir2/windbg-the-fun-way-part-2-7a904cba5435)< br > [WinDbg Basics for Malware Analysis](https://www.youtube.com/watch?v=QuFJpH3My7A)|||||
2020-01-12 22:45:41 +07:00
|GDB|〇 ||〇 ||||||
|objdump|〇 |||
2020-03-14 20:06:02 +07:00
|[Snowman](https://derevenets.com/)||〇 |||||||
2020-05-03 20:06:46 +07:00
|[DbgShell](https://github.com/microsoft/DbgShell)|〇 ||〇 ||
2020-01-12 22:45:41 +07:00
|name|plugin|price|platform|remarks|
|:-|:-|:-|:-|:-|
2020-03-20 13:22:07 +07:00
|[IDA pro](https://www.hex-rays.com/products/ida/)|[Lighthouse](https://github.com/gaasedelen/lighthouse)< br > [UEFI_RETool](https://github.com/yeggor/UEFI_RETool/tree/master/ida_plugin)< br > [VT-IDA Plugin](https://github.com/VirusTotal/vt-ida-plugin)< br > [uEMU](https://github.com/brendantay/uEmu)|Not free|multi||||||
2020-08-06 18:03:29 +07:00
|[Binary Ninja](https://binary.ninja/)|[Lighthouse](https://github.com/gaasedelen/lighthouse)< br > [BinDbg](https://github.com/kukfa/bindbg)< br > [Emotet API+string deobfuscator (v0.1)](https://github.com/mauronz/binja-emotet)|Not free|multi||||||
2020-07-29 17:44:27 +07:00
|[Cutter](https://github.com/radareorg/cutter)|[CutterDRcov](https://github.com/oddcoder/CutterDRcov)< br > [Jupyter Plugin for Cutter](https://github.com/radareorg/cutter-jupyter)< br > [x64dbgcutter](https://github.com/yossizap/x64dbgcutter)< br > [tiny_tracer_tag_to_cutter](https://github.com/Dump-GUY/tiny_tracer_tag_to_cutter)< br > [etc.](https://github.com/radareorg/cutter-plugins)|free|multi||||||
2020-04-18 22:07:19 +07:00
|[Ghidra](https://ghidra-sre.org/)|[pwndra](https://github.com/0xb0bb/pwndra)< br > [ghidra_scripts](https://github.com/alephsecurity/general-research-tools/tree/master/ghidra_scripts)< br > [OOAnalyzer](https://insights.sei.cmu.edu/sei_blog/2019/07/using-ooanalyzer-to-reverse-engineer-object-oriented-code-with-ghidra.html)< br > [ghidra_scripts by ghidraninja](https://github.com/ghidraninja/ghidra_scripts)< br > [ghidra_scripts by AllsafeCyberSecurity](https://github.com/AllsafeCyberSecurity/ghidra_scripts)|free|multi||||||
2020-03-14 20:08:57 +07:00
|[x64/x32dbg](https://x64dbg.com/#start)|[DbgChild](https://github.com/David-Reguera-Garcia-Dreg/DbgChild)< br > [checksec](https://github.com/klks/checksec)< br > [idenLib](https://github.com/secrary/idenLib)< br > [xdbg](https://github.com/brock7/xdbg)< br > [ScyllaHide](https://github.com/x64dbg/ScyllaHide)< br > [x64dbgpylib](https://github.com/x64dbg/x64dbgpylib)< br > [ClawSearch](https://github.com/codecat/ClawSearch)< br > [x64dbg-dark](https://github.com/nextco/x64dbg-dark)< br > [YaraGen](https://github.com/mrexodia/YaraGen)< br > [xAnalyzer](https://github.com/ThunderCls/xAnalyzer)< br > [Unpacking Script](https://github.com/x64dbg/Scripts)|free|windows||||||
2020-03-14 20:07:47 +07:00
|[WinDbg](https://docs.microsoft.com/ja-jp/windows-hardware/drivers/debugger/debugger-download-tools)||free|windows|Kernel mode debugging possible|||||
2020-03-14 20:06:02 +07:00
|GDB|gdbpeda< br > pwngdb|free|linux|[onlinegdb](https://www.onlinegdb.com/)|||||
2020-01-12 22:45:41 +07:00
|objdump||free|linux||
2020-03-14 20:06:02 +07:00
|[Snowman](https://derevenets.com/)||free|windows||||||
2020-05-03 20:06:46 +07:00
|[DbgShell](https://github.com/microsoft/DbgShell)||free|windows|||||||
2020-01-12 22:45:41 +07:00
### Tracer
2020-03-14 20:43:10 +07:00
- **[drltrace](https://github.com/DynamoRIO/drmemory/tree/master/drltrace)**
2020-01-12 22:45:41 +07:00
- [DynamoRIO ](https://github.com/DynamoRIO/dynamorio ) based
- ライブラリトレーサ(Windows版ltrace)
2020-03-14 20:43:10 +07:00
- **[drstrace](http://drmemory.org/strace_for_windows.html)**
2020-01-12 22:45:41 +07:00
- DynamoRIO based
- システムコールトレーサ(Windows版strace)
2020-03-14 20:43:10 +07:00
- **[memtrace](https://github.com/DynamoRIO/dynamorio/blob/master/api/samples/memtrace_simple.c)**
2020-01-12 22:45:41 +07:00
- DynamoRIO based
- メモリトレーサ
2020-03-14 20:43:10 +07:00
- **[bbbuf](https://github.com/DynamoRIO/dynamorio/blob/master/api/samples/bbbuf.c)**
2020-01-12 22:45:41 +07:00
- DynamoRIO based
- べーシックブロックトレーサ
2020-03-14 20:43:10 +07:00
- **[API Monitor](http://www.rohitab.com/apimonitor)**
2020-01-12 22:45:41 +07:00
- GUI(Windows)
- APIコールを監視ツール
2020-03-14 20:43:10 +07:00
- **[Captain](https://github.com/y3n11/Captain)**
2020-02-23 11:34:02 +07:00
- APIフックを行いAPIの呼び出しを監視
- yaml形式で記載されたシグネチャをもとに, DLLインジェクション, マクロ実行, lsassメモリダンプ, wmicおよびmshtaマルウェアの検出を行うことが可能
- 現在はアルファ版(2020/02/23時点)
2020-01-12 22:45:41 +07:00
### Instrumentation
2020-03-14 20:43:10 +07:00
- **[drcov](http://dynamorio.org/docs/page_drcov.html)**
2020-01-12 22:45:41 +07:00
- DynamoRIO based
- カバレッジ計測
- drrun経由で実行
```
> drrun.exe -t drcov -- [program name] [arguments]
```
2020-03-14 20:43:10 +07:00
- **Intel PIN**
2020-01-12 22:45:41 +07:00
### Traffic Analysis tools
2020-03-20 13:19:20 +07:00
- **[Wireshark](https://www.wireshark.org/download.html)**
- CLI版はTShark
- ref:
- [Wireshark Tutorial,Unit42(2019) ](https://unit42.paloaltonetworks.com/tag/tutorial/ )
2020-04-22 17:24:58 +07:00
- [Decrypting SSL/TLS traffic with Wireshark ](https://resources.infosecinstitute.com/decrypting-ssl-tls-traffic-with-wireshark/ )
2020-03-14 20:43:10 +07:00
- **tcpdump**
2020-03-20 13:19:20 +07:00
- **[Scapy](https://scapy.net/)**
2020-03-14 20:43:10 +07:00
- **[Fiddler](https://www.telerik.com/fiddler)**
2020-03-20 13:19:20 +07:00
- Web Proxy debugger
2020-03-14 20:43:10 +07:00
- **[EKFiddle](https://github.com/malwareinfosec/EKFiddle)**
2020-03-20 13:19:20 +07:00
- URLパターン, IPなどから特定のマルウェアやEKの通信を識別することが可能
- ref:
- [Malicious Traffic Analysis with EKFiddle(2019-03) ](https://drive.google.com/file/d/1VhZyCiHgtDwcCh7cpVWMCTi9B_Nj66AC/view )
- **[Burp Suite](https://portswigger.net/burp)**
- ローカルプロキシツール
- プラグイン
- [awesome-burp-suite ](https://github.com/alphaSeclab/awesome-burp-suite )
- **[Fake-net NG](https://github.com/fireeye/flare-fakenet-ng)**
2020-04-03 18:23:13 +07:00
- ref:
- [FakeNet Genie: Improving Dynamic Malware Analysis with Cheat Codes for FakeNet-NG ](https://www.fireeye.com/blog/threat-research/2020/04/improving-dynamic-malware-analysis-with-cheat-codes-for-fakenet-ng.html )
2020-04-23 17:51:56 +07:00
- [あなたもFakeNetの達人: FakeNet‐ NGの裏技をマスターして動的マルウェア解析を改善しませんか? ](https://www.fireeye.com/blog/jp-threat-research/2020/04/improving-dynamic-malware-analysis-with-cheat-codes-for-fakenet-ng.html )
2020-03-20 13:19:20 +07:00
- **[INetSim](https://www.inetsim.org/)**
- **[Noriben](https://github.com/Rurik/Noriben)**
2020-03-14 20:43:10 +07:00
- **[Parse User Agents](https://developers.whatismybrowser.com/)**
2020-03-20 13:19:20 +07:00
- User AgentをパースするWebサービス
- User Agentに含まれる情報の調査に利用したり, 一般的なUser Agentが田舎の判断に利用することが可能
- 数百万のUser Agentに対応
2020-05-18 17:17:40 +07:00
- **[Packetmon](https://blogs.windows.com/windowsexperience/2019/08/20/windows-admin-center-preview-1908/)**
- ref:
- [Windows 10 quietly got a built-in network sniffer, how to use ](https://www.bleepingcomputer.com/news/microsoft/windows-10-quietly-got-a-built-in-network-sniffer-how-to-use/ )
2020-06-14 14:35:19 +07:00
- **nfdump**
- **nfcapd**
- **nfpcapd**
2020-06-16 21:45:41 +07:00
- **tcpflow**
- **editcap**
- **Dshell**
2020-07-25 18:22:03 +07:00
- ref:
- [Improving Packet Capture Performance – 1 of 3 ](https://www.activecountermeasures.com/improving-packet-capture-performance-1-of-3/ )
2020-01-12 22:45:41 +07:00
### Forensic
2020-04-21 21:19:28 +07:00
- **Windows Log**
2020-04-16 18:09:27 +07:00
- [Windows Security Log Events ](https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/ )
- 一覧
2020-04-21 21:19:28 +07:00
- [Windows security event log library ](https://www.manageengine.com/products/active-directory-audit/kb/windows-event-log-id-list.html )
2020-03-20 13:19:20 +07:00
- **[Sysinternals](https://docs.microsoft.com/en-us/sysinternals/downloads/)**
2020-02-24 18:14:10 +07:00
- Sysmon
2020-02-24 18:15:01 +07:00
- ホスト上で発生したプロセス, ファイル, レジストリ, ネットワーク, WMI関連のインベントをEventLog(.evtx)に記録する
2020-04-30 18:20:23 +07:00
- [SysmonSearch ](https://github.com/JPCERTCC/SysmonSearch )
- Sysmonで生成されたイベントログの分析ツール,Kibana使用
2020-05-06 21:59:44 +07:00
- v11.0よりファイル削除(EventID:23)と削除されたファイルのコピーをアーカイブボリューム内(ボリュームごと)に保存する機能が追加された
- [Sysmon and File Deletion ](https://isc.sans.edu/diary/26084 )
2020-02-24 18:14:10 +07:00
- ref:
- [SysmonCommunityGuide ](https://github.com/trustedsec/SysmonCommunityGuide )
2020-05-09 19:30:39 +07:00
- **[VmdkReader](https://github.com/leftp/VmdkReader)**
- vmdkイメージからファイルを抽出するツール
2020-05-15 19:31:42 +07:00
- **[Autopsy](https://www.autopsy.com/download/)**
- ディスク等のフォレンジックツール
- Central Storageなどを介して複数のユーザでコラボしながらフォレンジックを行うことが可能
2020-05-16 00:00:03 +07:00
- [3rd Party modules ](https://github.com/sleuthkit/autopsy )
2020-06-13 21:35:09 +07:00
- **[NetMiner](http://www.netminer.com/main/main-read.do)**
2020-03-14 20:43:10 +07:00
- **[Volatility](https://github.com/mether049/malware/edit/master/malware-analysis_ref_and_memo.md)**
2020-02-05 21:59:37 +07:00
- DFIRやマルウェア解析に焦点を当てたメモリダンプ調査フレームワーク
- プラグインが充実している
2020-02-05 22:55:04 +07:00
- プロファイルの指定が必要である(メモリダンプがどのシステム(OS, データ構造, シンボル)で使用したものなのかを識別するため)
- Volatility 3からは不要とのこと
- 対応しているメモリダンプのフォーマット
2020-02-05 22:58:48 +07:00
> - Raw linear sample (dd)
> - Hibernation file (from Windows 7 and earlier)
> - Crash dump file
> - VirtualBox ELF64 core dump
> - VMware saved state and snapshot files
> - EWF format (E01)
> - LiME format
> - Mach-O file format
> - QEMU virtual machine dumps
> - Firewire
> - HPAK (FDPro)
2020-02-05 22:55:04 +07:00
- **ref:**
- [cheet sheet ](https://github.com/volatilityfoundation/volatility/raw/gh-pages/docs/VolatilityCheatSheet.pdf )
- [cheet sheet(sans) ](https://digital-forensics.sans.org/media/volatility-memory-forensics-cheat-sheet.pdf )
- [Command Reference ](https://github.com/volatilityfoundation/volatility/wiki/Command-Reference )
- [First steps to volatile memory analysis ](https://medium.com/@zemelusa/first-steps-to-volatile-memory-analysis-dcbd4d2d56a1 )
- [Volatility, my own cheatsheet (Part 1): Image Identification ](https://www.andreafortuna.org/2017/06/25/volatility-my-own-cheatsheet-part-1-image-identification/ )
- Virtual Box上のゲストOSからメモリダンプ(VirtualBox ELF64 core dump)を取得する方法
- VBoxManageを利用してホストOSからゲストOSを起動する(VBoXManageで起動しないと原因は分からないがメモリダンプの取得でうまくいかなかった)
```
> .\VBoxManage.exe list vms # Virtual Boxで作成済みのゲストの名前とuuidの一覧を取得
> .\VBoxManage.exe startvm "guest name or uuid" #起動
```
2020-02-05 21:59:37 +07:00
- VboxManageでメモリダンプ(VirtualBox ELF64 core dump)を取得する
2020-02-05 22:55:04 +07:00
```
2020-03-29 22:10:50 +07:00
> .\VBoxManage.exe debugvm "guest name or uuid" dumpvmcore --filename output.dmp
2020-02-05 22:55:04 +07:00
```
- この他に,[vboxdump.py](https://www.virtualbox.org/ticket/10222)というメモリダンプ作成用のpythonスクリプトもある
- ref:
- [How to extract a RAM dump from a running VirtualBox machine ](https://www.andreafortuna.org/2017/06/23/how-to-extract-a-ram-dump-from-a-running-virtualbox-machine/ )
- Plugins
2020-02-05 22:58:48 +07:00
2020-02-05 22:55:04 +07:00
|name|default|how to use|description|reference|
|:-|:-|:-|:-|:-|
|malfind|〇 | python vol.py -f zeus.vmem malfind -p 1724|||
|[hollowfind](https://github.com/monnappa22/HollowFind)|-|python vol.py -f infected.vmem --profile=Win7SP0x86 hollowfind|||
2020-02-05 22:58:48 +07:00
|yarascan|〇 | python vol.py -f zeus.vmem yarascan --yara-file=/path/to/rules.yar|||
2020-02-05 22:55:04 +07:00
|[malconfscan](https://github.com/JPCERTCC/MalConfScan)|-|python vol.py malconfscan -f images.mem --profile=Win7SP1x64|マルウェアのコンフィグ情報の抽出, cuckooと組み合わせることが可能|[wiki](https://github.com/JPCERTCC/MalConfScan/wiki)|
2020-02-05 22:58:48 +07:00
|[malstrscan](https://github.com/JPCERTCC/MalConfScan)|-|python vol.py malstrscan -a -f images.mem --profile=Win7SP1x64|||
2020-02-16 21:59:20 +07:00
2020-03-14 20:43:10 +07:00
- **[Hexinator](https://hexinator.com/)**
2020-02-16 21:59:20 +07:00
- バイナリエディタ
2020-02-16 22:10:21 +07:00
- 各種ファイルタイプの構造が定義されたgrammarと呼ばれるxmlファイルを用いて, 開いたファイルの構造を認識し, ファイルヘッダやデータ内の各パラメータをバイナリエディタ上でカラーリングして表示
2020-02-16 22:08:53 +07:00
- パラメータの値の閲覧,編集も可能
- freeで多くのgrammerが用意されているが, ツール自体は試用期間のみ無料
- ファイルの破損部分を確認する際に有用
- バイナリの差分の確認も可能
2020-02-03 20:50:20 +07:00
### Threat hunting
2020-03-20 13:19:20 +07:00
- **[EQL](https://eql.readthedocs.io/en/latest/)**
2020-03-20 12:59:22 +07:00
- cheet sheet
```
2020-03-20 13:03:55 +07:00
# maldoc -> command,script
2020-03-20 12:59:22 +07:00
process where
parent_process_name in ("winword.exe", "excel.exe", "powerpnt.exe")
2020-03-20 13:03:55 +07:00
and process_name in ("powershell.exe", "cscript.exe","wscript.exe", "cmd.exe")
# Unusual Child Process
process where
subtype.create and
(
(process_name == 'smss.exe' and not parent_process_name in ('System', 'smss.exe')) or
(process_name == 'csrss.exe' and not parent_process_name in ('smss.exe', 'svchost.exe')) or
(process_name == 'wininit.exe' and parent_process_name != 'smss.exe') or
(process_name == 'winlogon.exe' and parent_process_name != 'smss.exe') or
(process_name == 'lsass.exe' and parent_process_name != 'wininit.exe') or
(process_name == 'LogonUI.exe' and not parent_process_name in ('winlogon.exe', 'wininit.exe')) or
(process_name == 'services.exe' and parent_process_name != 'wininit.exe') or
(process_name == 'svchost.exe' and parent_process_name != 'services.exe' and
not (parent_process_path == '*\\system32\\svchost.exe' and process_path == '*\\syswow64\\svchost.exe')) or
(process_name == 'spoolsv.exe' and parent_process_name != 'services.exe') or
(process_name == 'taskhost.exe' and not parent_process_name in ('services.exe', 'svchost.exe')) or
(process_name == 'taskhostw.exe' and not parent_process_name in ('services.exe', 'svchost.exe')) or
(process_name == 'userinit.exe' and not parent_process_name in ('dwm.exe', 'winlogon.exe'))
)
2020-03-20 12:59:22 +07:00
```
2020-04-21 21:19:28 +07:00
- ref:
- [Awesome Threat Detection and Hunting ](https://github.com/0x4D31/awesome-threat-detection )
- [Threat Hunting via Windows Event Logs ](https://www.sans.org/cyber-security-summit/archives/file/summit-archive-1524493093.pdf )
- [Detecting the Elusive Active Directory Threat Hunting
](https://adsecurity.org/wp-content/uploads/2017/04/2017-BSidesCharm-DetectingtheElusive-ActiveDirectoryThreatHunting-Final.pdf)
- [インシデント調査のための攻撃ツール等の実行痕跡調査に関する報告書 ](https://www.jpcert.or.jp/research/20160628ac-ir_research.pdf )
- [Event Log Analysis ](https://sect.iij.ad.jp/d/2018/05/044132/training_material_sample_for_eventlog_analysis.pdf )
- [ログを活用した Active Directory に対する攻撃の検知と対策 ](https://www.jpcert.or.jp/research/AD_report_20170314.pdf )
2020-02-03 21:55:13 +07:00
### .NET analysis
2020-03-14 20:43:10 +07:00
- **[dnspy](https://github.com/0xd4d/dnSpy)< br > **
2020-02-03 21:55:13 +07:00
.NETデコンパイラ,C#やVBで作成された実行ファイルを高精度でデコンパイルする
2020-05-24 19:48:11 +07:00
- ref:
2020-05-24 19:49:05 +07:00
- [The Use – and Abuse – of DotNet Files, and the Value of FortiResponder Automation in the Threat Analysis Process ](https://fortinet.com/blog/threat-research/the-use-and-abuse-of-dotnet-files-and-the-value-of-fortresponder-automation-in-threat-analysis.html )
2020-02-03 21:55:13 +07:00
### Utilities
2020-03-20 13:19:20 +07:00
- **[PeBear](https://github.com/hasherezade/pe-bear-releases)**
- **[PeStudio](https://www.winitor.com/get.html)**
2020-03-14 20:43:10 +07:00
- **[ResourceHacker](http://www.angusj.com/resourcehacker/)**
2020-02-28 21:16:41 +07:00
- PEファイルからリソースファイルの抽出, 編集が可能なツール
2020-03-14 20:43:10 +07:00
- **PEiD**
- **[010 Editor](https://www.sweetscape.com/)**
2020-03-14 20:33:02 +07:00
- 有償( 1ヶ月Trialあり) のテキストエディタ, バイナリエディタ
- Script機能による自動化
- [official repo ](https://www.sweetscape.com/010editor/repository/scripts/ )や個人サイトからダウンロード可能
- Template機能によるバイナリフォーマットのパースやSyntax Highlight機能
- ファイルの破損箇所などを確認可能
2020-03-14 20:54:10 +07:00
- [official repo ](https://www.sweetscape.com/010editor/repository/templates/ )や個人サイトからダウンロード可能
2020-03-14 20:33:02 +07:00
- プロセスメモリの表示等も可能
- ヒストグラム,バイナリ比較,ハッシュ値計算機能
- ref:
- [君にもできる目grepを使わない目grepリローデッドへの挑戦 (010 Editor編) ](https://gist.github.com/yoggy/4116843 )
- [Li-Script ](https://github.com/lich4/personal_script )
- [010Editor-stuff ](https://github.com/strazzere/010Editor-stuff )
2020-03-14 20:43:10 +07:00
- **Process Hacker**
2020-02-23 00:54:12 +07:00
- Mutexの確認が可能
2020-03-14 20:43:10 +07:00
- **RegShot**
2020-03-20 13:19:20 +07:00
- **[RegistryChangesView](https://www.nirsoft.net/utils/registry_changes_view.html)**
2020-03-14 20:43:10 +07:00
- **[CyberChef](https://gchq.github.io/CyberChef/)**
2020-02-23 21:59:34 +07:00
- input(ファイル,文字列,データ)に対して様々なOperation(暗号化,復号,エンコード,デコード,情報抽出,変換,置換,計算,その他多数)を適用・組み合わせて, OutputするWebサービス
- 適用・組み合わせたOperantinをレシピとしてURLで共有することができる
- [Chepy ](https://github.com/securisec/chepy )と呼ばれるpython用ライブラリも開発されている
2020-02-23 22:21:57 +07:00
- [レシピ集 ](https://github.com/mattnotmax/cyberchef-recipes )
2020-05-08 17:07:56 +07:00
- [0_CyberChef_CobaltStrike_Shellcode_Decoder_Recipe ](https://gist.github.com/0xtornado/69d12572520122cb9bddc2d6793d97ab )
2020-03-14 20:43:10 +07:00
- **[StringSifter](https://github.com/fireeye/stringsifter)**
2020-02-23 21:59:34 +07:00
- 機械学習モデルによってファイルの含まれる文字列とマルウェアとの関連性をランク付けする
- [010 Editorに組み込むことも可能 ](https://www.sweetscape.com/010editor/repository/scripts/file_info.php?file=RateStrings.1sc&type=1&sort= )
- ref:
- [Learning to Rank Strings Output for Speedier Malware Analysis ](https://www.fireeye.com/blog/threat-research/2019/05/learning-to-rank-strings-output-for-speedier-malware-analysis.html )
2020-07-15 20:38:50 +07:00
- **exiftool**
- **[Detect It Easy](https://github.com/horsicq/Detect-It-Easy)**
- library, linker, packer, compilerなどを判別
2020-03-14 20:43:10 +07:00
- **wql**
2020-02-09 21:59:36 +07:00
- wqlで子プロセスの検索
```
$procs=Start-Process "programname.exe" -PassThru
echo $procs.Id
$queryNameVersion="SELECT * FROM Win32_Process WHERE ParentProcessId=" + $procs.Id
$child_process=Get-WmiObject -Query $queryNameVersion
echo $child_process
```
2020-03-29 18:31:06 +07:00
### Control Windows features
- **[blackbird](https://www.getblackbird.net/)**
- **[Windows Firewall Control](https://www.binisoft.org/wfc.php)**
- **[reclaimWindows10.ps1](https://gist.github.com/alirobe/7f3b34ad89a159e6daa1)**
- windowsにデフォルトインストールさている機能(onedrive,windows defender,skype,windows update,etc.)のon/offを切り替える
- マルウェアの通信を解析する際にノイズ通信が加わることを防止する
2020-02-03 21:55:13 +07:00
2020-01-03 23:36:38 +07:00
### Online Sandbox
|name|site|remarks|
|:-|:-|:-|
|AMAaaS|https://amaaas.com/|apk only|
|ANYRUN|https://app.any.run/#register||
|Intezer Analyze|https://analyze.intezer.com/#/||
|IRIS-H|https://iris-h.services/pages/dashboard|maldoc only|
|CAPE Sandbox|https://cape.contextis.com/||
|Joe Sandbox Cloud|https://www.joesandbox.com/||
|cuckoo|https://cuckoo.cert.ee/||
|cuckoo|https://sandbox.pikker.ee/||
|Hybrid Analysis|https://www.hybrid-analysis.com/?lang=ja||
|ViCheck|https://www.vicheck.ca/submitfile.php||
|Triage|https://tria.ge/||
|Yomi Sandbox|https://yomi.yoroi.company/upload||
2020-02-24 11:16:04 +07:00
|UnpacMe|https://www.unpac.me/#/|online unpacker,beta,< br > extracting embedded AutoIT Script,< br > extracting URL from VB6 downloader(GuLoader)|
2020-03-02 18:14:33 +07:00
|MalwareConifg|https://malwareconfig.com/|特定マルウェアからconfig情報を抽出|
2020-03-20 02:41:07 +07:00
|anlyz.io|https://sandbox.anlyz.io/dashboard||
2020-01-03 23:36:38 +07:00
2020-07-05 21:35:07 +07:00
### Unpacker/Decryptor/Decoder/Extractor/Memory Scannerh/Deofuscator
2020-03-14 20:43:10 +07:00
- **[TAFOF-Unpacker](https://github.com/Tera0017/TAFOF-Unpacker)< br > **
2020-02-03 21:59:09 +07:00
攻撃者グループTA505が利用するマルウェア(GetandGoDll, Silence, TinyMet, Azorult, KBMiner, etc.)の静的アンパッカー< br >
2020-03-14 20:43:10 +07:00
- **[Trickbot artifact decrypter](https://github.com/snemes/malware-analysis/tree/master/trickbot)< br > **
2020-02-03 21:59:09 +07:00
Trickbotのartifactを取得するためのdecrypter< br >
2020-03-14 20:43:10 +07:00
- **[trick_settings_decoder.py](https://github.com/hasherezade/malware_analysis/tree/master/trickbot)**
Trickbotのartifactを取得するためのdecryter< br > その2
- **[VolatilityBot](https://github.com/mkorman90/VolatilityBot)< br > **
2020-02-03 21:59:09 +07:00
マルウェアサンプルやメモリダンプの自動分析(コードインジェクションの抽出, プロセスダンプ, yaraスキャン, 文字列の抽出)< br >
2020-03-14 20:43:10 +07:00
- **[Loki - Simple IOC Scanner](https://github.com/Neo23x0/Loki)< br > **
2020-02-03 21:59:09 +07:00
IoCスキャナー(パス・ファイル名の正規表現マッチ, ファイルとプロセスメモリのyaraスキャン, hashマッチ, c2 IoCスキャン, PE-Sieve)< br >
2020-03-14 20:43:10 +07:00
- **[flare-floss](https://github.com/fireeye/flare-floss)< br > **
2020-02-03 21:59:09 +07:00
FireEye Labsの静的解析分析技術を利用して, 難読化された文字列を自動的に検知, 抽出, デコード< br >
2020-03-14 20:43:10 +07:00
- **[PE-Sieve](https://github.com/hasherezade/pe-sieve)< br > **
2020-02-03 21:59:09 +07:00
Process Hollowing,Injectionされた特定のプロセスをダンプ< br >
2020-03-14 20:43:10 +07:00
- **[HollowsHunter](https://github.com/hasherezade/hollows_hunter)< br > **
2020-02-29 23:43:41 +07:00
全プロセスもしくは特定の名称のプロセスのメモリをスキャンし, Process HollowingやInjectionを検知するすることが可能。[Pe-Sieve](https://github.com/hasherezade/pe-sieve)のと同じ開発者によって作成されたツールであり, Pe-Sieveのdllが内部で用いられている< br >
2020-03-14 20:43:10 +07:00
- **[strings2](http://split-code.com/strings2.html)< br > **
2020-02-03 21:59:09 +07:00
ファイルやプロセスメモリ内の文字列の抽出< br >
2020-03-14 20:43:10 +07:00
- **[mnemosyne](https://github.com/nccgroup/mnemosyne)< br > **
2020-02-03 21:59:09 +07:00
文字列,正規表現でプロセスメモリをスキャン< br >
- **ref:**< br >
- [Memory Scraping for Fun & Profit - Matt Lewis, NCC Group at CRESTCon & IIP Congress,youtube ](https://www.youtube.com/watch?v=5HdYcE-woDc )
2020-03-14 20:43:10 +07:00
- **[Memhunter](https://github.com/marcosd4h/memhunter)< br > **
2020-02-03 21:59:09 +07:00
Injecition/Hollowingされたプロセスの自動検出< br >
2020-03-14 20:43:10 +07:00
- ref:< br >
2020-01-27 23:50:45 +07:00
- [Memhunter (Memory resident malware hunting at scale) ](https://docs.google.com/presentation/d/1hgx2FTNIkry9Nt8LOJVz_rHNhcGfJChxZVGckv7VI8E/edit#slide=id.g5712e7065f_1_1 )< br >
- [Reflective DLL Injection Detection through Memhunte,youtube ](https://www.youtube.com/watch?v=t_fR1sCENkc )< br >
- [Process Hollowing Injection Detection through Memhunter,youtube ](https://www.youtube.com/watch?v=QxCguP76uyg )< br >
2020-01-27 23:44:30 +07:00
- メモリダンプが不要で,感染環境でメモリスキャンを行う
- メモリスキャンのヒューリスティックトリガーにETWデータを利用している
- ETWのSuspicious Eventsとして以下を定義
> - Process Creattion<br>
> - Registry Operations<br>
> - Threads Operations<br>
> - Virtual Alloc Operations<br>
> - Image Load Operations<br>
> - Kernel Audit APIs usage<br>
> - etc.<br>
2020-03-14 20:43:10 +07:00
- **[Bisonal Analysis Utils](https://www.nttsecurity.com/docs/librariesprovider3/resources/Japan/bisonal-utils)**
2020-02-13 22:53:02 +07:00
- Bisonalに含まれる文字列のデコード, 通信の復号, yaraルール
2020-03-29 18:31:06 +07:00
- **[aa-tools](https://github.com/JPCERTCC/aa-tools)**
- tscookieのcofingデコーダやvolatility pluginなど
2020-03-29 18:37:31 +07:00
- **[RATDecoders](https://github.com/kevthehermit/RATDecoders)**
- マルウェアのconfigデコーダ(複数種)
- **[DC3-MWCP](https://github.com/Defense-Cyber-Crime-Center/DC3-MWCP)**
- マルウェアからconfigを取得するためのフレームワーク
2020-04-08 17:33:33 +07:00
- **[SDBbot Unpacker](https://github.com/Tera0017/SDBbot-Unpacker)**
- SDBbotのアンパッカー
2020-04-28 18:38:20 +07:00
- **[Malware Script](https://github.com/sysopfb/Malware_Scripts)**
- Decoderやunpacker(複数種)
2020-06-18 19:01:24 +07:00
- **[deICEr](https://github.com/f0wl/deICEr)**
- IcedIDのconfig extractor
- **[CobaltStrikeParser](https://github.com/Sentinel-One/CobaltStrikeParser)**
- CobaltStrikeのconfig Parser
2020-06-30 18:23:48 +07:00
- **[De-crypting a TrickBot Crypter](https://zero2auto.com/2020/06/22/decrypting-trickbot-crypter/)**
- Trickbotの復号に関する記事
2020-07-05 21:35:07 +07:00
- **[de4dot](https://github.com/0xd4d/de4dot)**
- .NET系のDeofuscatorおよびUnpacker
2020-07-26 20:28:26 +07:00
- **[formbook_decrypt_hash_string.py](https://github.com/ThisIsSecurity/malware/tree/master/formbook)**
- BZip2 CRC32 hash arrayの復号
- formbookの検体内の文字列の復号
- formbookがProcess Hollowingに使用するプロセス名の復号
- formbookが使用するc2 URIの復号
- etc.
- **[formbook_decode_pcap.py](https://github.com/ThisIsSecurity/malware/tree/master/formbook)**
- formbookの通信のデコードプログラム
2020-03-29 18:37:31 +07:00
2020-01-27 21:59:08 +07:00
2020-03-27 21:13:13 +07:00
# PDF Analysis
- **[pdfid.py](https://blog.didierstevens.com/programs/pdf-tools/)**
- **[pdf-parser.py](https://blog.didierstevens.com/programs/pdf-tools/)**
2020-01-12 01:11:09 +07:00
2020-03-09 19:02:26 +07:00
# Docment file Analysis
2020-03-20 03:08:22 +07:00
- Filetype
- .doc, .xls, .ppt
- Office 2003までのファイルの形式
- .docx, .xlsx, .pptx
- Office 2007以降のマクロを含まないファイルの形式
- .docm, .xlsm, .pptm
- Office 2007以降のマクロを含むファイルの形式
- p-code
- マクロコードをコンパイルした中間コード
- ドキュメント内のvbaコードのバージョンとシステム上のvbaのバージョンが同じ場合, コンテンツが有効化された際に表示されるソースコードは**p-codeが逆コンパイルされたもの**
2020-03-20 03:12:35 +07:00
- ドキュメント内のvbaコードのバージョンとシステム上のvbaのバージョンが異なる場合, コンテンツが有効化された際に表示されるソースコードは**圧縮されたvbaソースコードを解凍したもの**
2020-03-20 03:08:22 +07:00
- VB Editor
- debuggerでstep実行が可能?
- 難読化解除の手順
2020-03-20 13:09:40 +07:00
1. olevba等でvbaマクロコードを抽出
2. 悪意のあるファイルを開いてdocx形式で保存し, 閉じる
2020-03-20 03:08:22 +07:00
- [コンテンツを有効化]は押さない
- [編集を有効にする]は押す
2020-03-20 13:09:40 +07:00
3. olevba等で.docxファイルにマクロが含まれないことを確認する
4. .docxファイルを開く
2020-03-20 03:08:22 +07:00
- ActivXオブジェクトがある場合, [コンテンツを有効にする]を押す
2020-03-20 13:09:40 +07:00
5. Alt+F11でVB Editorを開く
6. 1.で抽出したVBAマクロコードのコピー
7. 悪意のあるコード実行部分を出力系の関数等(MsgBox,etc.)で無害化
8. VB Editorのdebuggerで難読化解除
2020-03-20 03:08:22 +07:00
- ref:
- [VBA Macro analysis: Beware of the Shift Key! ](https://decalage.info/vbashift )
- vbaData.xmlの削除
- 以下の状況下で有用
- p-codeが利用されている
- マクロのコンテンツを有効化しないと逆コンパイルされたvbaソースコードが表示されない
- p-codeのままではdebuggerを利用できない
- 悪意のあるコードを実行したあとにすぐ終了されるように設計されている
- 方法
- 7-zip等でwordファイルを展開
- wordフォルダ配下のvbaData.xmlを削除
- 再zip
- ref:
- [VBA Stomping — Advanced Maldoc Techniques ](https://medium.com/walmartlabs/vba-stomping-advanced-maldoc-techniques-612c484ab278 )
- **[pcodedmp](https://github.com/bontchev/pcodedmp)**
- p-codeの逆アセンブラ
- **[pcode2code.py](https://github.com/Big5-sec/pcode2code)**
- p-codeの逆コンパイラ
- **[VBA Seismograph](https://github.com/kirk-sayre-work/VBASeismograph)**
- VBA Stompingの検出ツール
- p-codeで利用される関数名, 変数名, 文字列, コメント等を出力
- pcodedmpとolevbaを利用している
2020-03-20 03:10:00 +07:00
- **[CMD Watcher](http://www.kahusecurity.com/posts/cmd_watcher_and_maldocs.html)**
2020-03-20 03:08:22 +07:00
- マクロによって実行されるpowershell,cmd,wscript,rundllのコマンドがCMD Watcherに出力される
- コマンドをキャプチャした際に自動的にプロセスを終了させる
- **[ole tools](https://github.com/decalage2/oletools/wiki)**
- [olevba ](https://github.com/decalage2/oletools/wiki/olevba )
- VBAマクロソースコードの検出/抽出
- 自動実行可能なマクロの検出
- 疑わしい文字列の抽出
- Anti-Sandbox,Anti-VMの検出
- hex,base64,strreverse,dridexで難読化された文字列の検出/デコード
- IoC(IP,URL,mail addr,file name)の抽出
- etc.
- [oleobj ](https://github.com/decalage2/oletools/wiki/oleobj )
- oleファイルから埋め込みオブジェクトを抽出するスクリプト
- [rtfobj ](https://github.com/decalage2/oletools/wiki/rtfobj )
- RTFファイルからOLEパッケージオブジェクトを検出し、埋め込みファイルを抽出
- ref:
- [oletools_cheatsheet.pdf ](https://github.com/decalage2/oletools/blob/master/cheatsheet/oletools_cheatsheet.pdf )
2020-03-20 03:12:35 +07:00
- **[ViperMonkey](https://github.com/decalage2/ViperMonkey)**
2020-03-20 03:08:22 +07:00
- VBAマクロの分析や難読化解除を行うためのVBAエミュレーションエンジン
- **[Vba2Graph](https://github.com/MalwareCantFly/Vba2Graph)**
- vbaのコールグラフを生成
- **[msoffcrypto-tool](https://github.com/nolze/msoffcrypto-tool)**
- **[msoffice](https://github.com/herumi/msoffice)**
- 暗号化されたOfficeファイルを暗号化/復号するためのツール
2020-03-19 16:41:59 +07:00
- LinuxでPS,VBの動的解析
- [.NET Core ](https://docs.microsoft.com/ja-jp/dotnet/core/install/linux-package-manager-ubuntu-1604 )
- [PowerShell Core(PowerShell 7+) ](https://docs.microsoft.com/ja-jp/powershell/scripting/install/installing-powershell-core-on-windows?view=powershell-7 )
2020-03-20 03:10:00 +07:00
- [LibreOffice ](https://ja.libreoffice.org/ )
2020-03-22 21:55:24 +07:00
- **exiftool**
- HyperLinkBabse等のプロパティにコマンド等が格納されているケースもある
2020-03-20 03:08:22 +07:00
- ref:
2020-03-20 22:28:35 +07:00
- [vbastomp.com ](https://vbastomp.com/ )
2020-03-20 03:08:22 +07:00
- [Advanced VBA Macros Attack&Defence,BHEU2019 ](https://www.decalage.info/files/eu-19-Lagadec-Advanced-VBA-Macros-Attack-And-Defence.pdf )
2020-03-28 21:58:47 +07:00
- [VbsEdit ](https://www.vbsedit.com/ )
- vbsのデバッガ付きエディタ
- [WSH Shell ](http://glsft.free.fr/ )
- vbsの対話型シェルとして利用可能
2020-03-20 22:28:35 +07:00
- vba memo
- Using WScript.Shell
```
Dim wsh As New WshShell
or
Dim wsh As Object
Set wsh = CreateObject("Wscript.Shell")
```
- StateMent
- Call
- dllを呼び出せる
- プロシージャを呼び出す
- `Call name [argumentlist]`
- Function
2020-03-20 22:29:30 +07:00
- [Command ](https://docs.microsoft.com/ja-jp/office/vba/language/reference/user-interface-help/command-function )
2020-03-20 22:28:35 +07:00
- コマンドライン引数を取得
- [ExecuteExcel4Macro ](https://docs.microsoft.com/ja-jp/office/vba/api/excel.application.executeexcel4macro )
- Excel4.0のマクロを実行
2020-02-03 20:50:20 +07:00
2020-07-01 19:12:18 +07:00
# powershell Analysis
- **Powershell ISE**
- Powershell Scriptのエディタ・デバッガ
2020-03-14 21:59:50 +07:00
# JavaScript Analysis
- **[JS Beautify](https://github.com/beautify-web/js-beautify)**
- JavaScriptのDeobfusecator
- [Online ver ](https://beautifier.io/ )
2020-03-16 17:45:06 +07:00
- **[malware-jail](https://github.com/HynekPetrak/malware-jail)**
- JavaScriptのマルウェア分析, 難読化解除, ペイロード抽出のためのサンドボックス
2020-06-11 17:39:11 +07:00
- ref:
- [JavaScript CheetSheet ](https://t.co/Bm3LyDWY7n?amp=1 )
2020-03-14 21:59:50 +07:00
2020-07-07 20:47:02 +07:00
# AutoIt Script Analysis
- **[AutoIt Script Editor](https://www.autoitscript.com/site/autoit/downloads/)**
- AutoIt Scriptのエディタ。デバッグも可能。SciTE をカスタマイズ
- **[AutoIt Debugger](http://www.thefoolonthehill.net/drupal/AutoIt%20Debugger)**
- AutoIt Scriptのデバッガ
2020-03-09 19:02:26 +07:00
# Other various file Analysis
2020-03-09 19:04:18 +07:00
### lnk file
2020-03-14 20:43:10 +07:00
- **[LnkParse](https://pypi.org/project/LnkParse3/)**
2020-03-09 19:02:26 +07:00
- .lnkファイルのパーサ
2020-03-20 13:06:13 +07:00
- exiftoolでもパース可能
2020-03-09 19:02:26 +07:00
- [[MS-SHLLINK]: Shell Link (.LNK) Binary File Format](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-shllink/16cb4ca1-9339-4d0c-a68d-bf1d6cc0f943?redirectedfrom=MSDN)
- .lnkファイルのバイナリフォーマット
2020-01-12 12:53:46 +07:00
# C2 Analysis
2020-03-14 20:43:10 +07:00
- **[C2MATRIX](https://www.thec2matrix.com/matrix)< br > **
2020-02-23 23:38:18 +07:00
- オープンソースのC2フレームワークとその比較表
- [SpreadSheet ](https://docs.google.com/spreadsheets/d/1b4mUxa6cDQuTV2BPC6aA-GR4zGZi0ooPYtBe4IgPsSc/edit#gid=0 )
2020-02-03 20:50:20 +07:00
### Emotet
2020-03-14 20:43:10 +07:00
- **[Emutet](https://github.com/d00rt/emotet_network_protocol)< br > **
2020-02-23 23:38:18 +07:00
- Emotetのc2通信部分のエミュレータ< br >
2020-02-03 20:50:20 +07:00
2020-01-12 12:53:46 +07:00
### Ursnif
2020-03-14 20:43:10 +07:00
- **Ursnif(version 2)のc2通信の仕組みと復号ツールについて< br > **
2020-02-23 23:38:18 +07:00
- [Writing Malware Traffic Decrypters for ISFB/Ursnif ](https://labs.sentinelone.com/writing-malware-traffic-decrypters-for-isfb-ursnif/ )
2020-01-03 23:36:38 +07:00
2020-01-04 00:51:36 +07:00
# Binary Analysis
2020-02-17 00:05:41 +07:00
### Unpacking
2020-03-14 20:43:10 +07:00
- **アンパックの流れ**
2020-02-17 00:05:41 +07:00
- OEPの特定し,OEPまで実行
- pushad命令, popad命令に着目。popad命令後のjmpでOEPに遷移する可能性がある(pushadした際のスタックのアドレスにハードウェアブレークポイントを設定することで監視)
- 動的に生成された領域に着目(領域にアクセスし,実行されるかをメモリブレークポイントを設定することで監視)
2020-02-23 00:07:17 +07:00
- WinMainCRTStartup, WinMainとの類似性からヒューリスティックに判断
2020-02-17 00:05:41 +07:00
- ツールを利用
- プロセスメモリのダンプ
- 基本的にツールを用いる
- IATの再構築(展開ルーチンのIAT再構築とは別)
- IATは展開ルーチンでローダによってそのときの実際のAPIのアドレスに書き換えられているため, ロード前に戻す必要がある
- PEヘッダはパックされたコードのIATを示しているので, 新たににインポートセクションを追加し, そのセクションを認識するようにPEヘッダを修正する
- 基本的にツールを用いる
2020-02-23 00:05:48 +07:00
### [Microsoft Windows Library](https://en.wikipedia.org/wiki/Microsoft_Windows_library_files)
2020-03-14 20:43:10 +07:00
- **NTDLL.DLL**
2020-02-23 00:05:48 +07:00
- Windows Native APIを提供
- Native APIはKERNEL32.DLLによってエクスポートされるKernel APIやbase APIの多くで使用されている
- Windows applicationから直接的に呼ばれることはほとんどない
- 公式ではドキュメント化されていないが,[こちら](https://undocumented.ntinternals.net/)からある程度確認可能
2020-03-14 20:43:10 +07:00
- **KERNEL32.DLL**
2020-02-23 00:05:48 +07:00
- メモリ操作, 入出力, プロセスやスレッド管理, 同期処理を行うWin32 base APIを提供する
2020-03-14 20:43:10 +07:00
- **USER32.DLL**
2020-02-23 00:05:48 +07:00
- GUIなどユーザインターフェース関連のAPIを提供
2020-03-14 20:43:10 +07:00
- **MSVCRT.DLL**
2020-02-23 00:05:48 +07:00
- ランタイム(CRT)ライブラリ
- MSVCコンパイラ用の標準C関数等(printf,malloc,etc.)の提供
- [Microsoft's C++ Standard Libraryのソースコード ](https://github.com/llvm/llvm-project/tree/47282b1b4bf3e18d2e2166b87159115ed520a2aa )
- ref about crt:
- [exeファイルとCRT - EternalWindows ](http://eternalwindows.jp/else/exe.html )
- [C Run-Time Library Reference ](https://docs.microsoft.com/en-us/cpp/c-runtime-library/c-run-time-library-reference?view=vs-2019 )
2020-02-23 20:57:15 +07:00
- ref:
- [Loading a DLL from memory ](https://www.joachim-bauch.de/tutorials/loading-a-dll-from-memory/ )
- DLLをロードする流れやメモリからロードするツールについて
2020-06-20 21:27:39 +07:00
### Win32API
2020-06-21 12:00:08 +07:00
|API< br > dll/header file|arg|return|overview|
|:-|:-|:-|:-|
|[GetModuleHandle](https://docs.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-getmodulehandlea)< br > kernel32/libloaderapi.h (include Windows.h)|PCSTR lpModuleName(モジュール名)|**Success**:a handle to the specified module< br > **Fail**:NULL|指定したモジュールへのハンドルを取得|
|[ReadProcessMemory](https://docs.microsoft.com/ja-jp/windows/win32/api/memoryapi/nf-memoryapi-readprocessmemory)< br > kernel32/memoryapi.h (include Windows.h)|1.HANDLE hProcess< br > 2.LPCVOID lpBaseAddress< br > 3.LPVOID lpBuffer>< br > 4.SIZE_T nSize< br > 5.SIZE_T \*lpNumberOfBytesRead|**Success**:non zero< br > **Fail**:zero(0)|特定のプロセスの指定したアドレスからメモリの内容を読み取る|
2020-06-23 20:02:51 +07:00
|[CreateProcess](https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessa)< br > kernel32.dll/processthreadsapi.h (include Windows.h)|1. LPCSTR lpApplicationName< br > 2. LPSTR lpCommandLine< br > 3. LPSECURITY_ATTRIBUTES lpProcessAttributes< br > 4. LPSECURITY_ATTRIBUTES lpThreadAttributes< br > 5. BOOL bInheritHandles< br > 6. DWORD dwCreationFlags< br > 7. LPVOID lpEnvironment< br > 8. LPCSTR lpCurrentDirectory < br > 9. LPSTARTUPINFOA lpStartupInfo< br > 10. LPPROCESS_INFORMATION lpProcessInformation|**Success**:non zero< br > **Fail** zero|新しいプロセスの作成|
2020-06-21 12:00:08 +07:00
|[CreateRemoteThread](https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createremotethread)< br > kernel32/processthreadsapi.h (include Windows.h)|1.HANDLE hProcess< br > 2.LPSECURITY_ATTRIBUTES lpThreadAttributes< br > 3.SIZE_T dwStackSize< br > 4.LPTHREAD_START_ROUTINE lpStartAddress< br > 5.LPVOID lpParameter< br > DWORD dwCreationFlags< br > 6.LPDWORD lpThreadId|**Success**:a handle to the new thread< br > **Fail**:Null|別プロセス上に対してスレッドを作成|
|[InitializeCriticalSection](https://docs.microsoft.com/ja-jp/windows/win32/api/synchapi/nf-synchapi-initializecriticalsection)< br > kernel32/synchapi.h (include Windows.h)|LPCRITICAL_SECTION lpCriticalSection|-|クリティカルセクションを初期化,クリティカルセクションオブジェクトにより1つのプロセスの複数スレッド間で相互排他の同期が行える|
2020-06-21 21:05:53 +07:00
|[InitializeListHead](https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-initializelisthead)< br > wdm.h (include Wdm.h, Ntddk.h, Ntifs.h, Wudfwdm.h)|PLIST_ENTRY ListHead|-|LIST_ENTRY構造体の初期化|
2020-06-23 20:02:51 +07:00
|[CreateMutex](https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-createmutexa)< br > kernel32/synchapi.h (include Windows.h)|1.LPSECURITY_ATTRIBUTES lpMutexAttributes< br > 2.BOOL bInitialOwner< br > 3.LPCSTR lpName|**Success**:a handle to the newly created mutex object< br > **Fail**:Null|Mutexを作成|
2020-06-21 21:05:53 +07:00
|[GetModuleFileName](https://docs.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-getmodulefilenamea)< br > kernel32/libloaderapi.h (include Windows.h)|1. HMODULE hModule< br > 2. LPSTR lpFilenam< br > 3. DWORD nSize|**Success**:the length of the string that is copied to the buffer, in characters, not including the terminating null character< br > **Fail**:zero|現在のプロセスにロードされている特定のモジュールの完全修飾パスを取得,hModuleがNullの場合現在のプロセスの実行ファイルのパスを取得|
2020-06-21 22:10:17 +07:00
|[GetUserName](https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getusernamea)< br > Advapi32.dll/winbase.h (include Windows.h)|1. LPSTR lpBuffer< br > 2. LPDWORD pcbBuffer|**Success**:a nonzero value< br > **Fail**:zero|現在のスレッドのユーザ名を取得|
2020-03-31 20:36:06 +07:00
### Deobfuscation
- バイナリの難読化解除に関するブログ
- [Tales Of Binary Deobfuscation - Part 1 ](https://ulexec.github.io/ulexec.github.io/article/2020/03/03/Deobfuscation_1.html )
2020-01-03 14:53:28 +07:00
### Symbolic Execurtion
to do...
2020-02-03 20:50:20 +07:00
2020-01-03 14:53:28 +07:00
### Taint Analysis
to do...
2020-02-03 20:50:20 +07:00
2020-01-03 14:53:28 +07:00
### Decompiler
2020-07-06 18:26:16 +07:00
- **[exe2aut](https://exe2aut.com/exe2aut-converter/)**
- AutoIT Scriptのデコンパイラ
2020-02-15 16:53:04 +07:00
### Perspective
- topdown
- コードの先頭から解析
2020-02-15 16:53:30 +07:00
- bottom-up
2020-02-15 16:53:04 +07:00
- 表層解析で得たキー情報(Win32API,怪しい文字列, etc.)の周辺から解析
2020-01-03 14:53:28 +07:00
### ref:
- Intel系アーキテクチャSoftware Developer向けのマニュアル< br >
[Intel® 64 and IA-32 Architectures Software Developer Manuals ](https://software.intel.com/en-us/articles/intel-sdm )< br >
2020-01-21 21:54:08 +07:00
- PEファイルのフォーマットについて< br >
2020-01-21 21:53:36 +07:00
[Inside Windows An In-Depth Look into the Win32 Portable Executable File Format, Part 1(2002) ](http://bytepointer.com/resources/pietrek_in_depth_look_into_pe_format_pt1.htm )< br >
[Peering Inside the PE: A Tour of the Win32 Portable Executable File Format(1994) ](http://bytepointer.com/resources/pietrek_peering_inside_pe.htm )< br >
2020-02-20 23:54:22 +07:00
- Windows APIに関するMSの公式ドキュメント< br >
2020-02-20 23:53:51 +07:00
[Windows API Index ](https://docs.microsoft.com/en-us/windows/win32/apiindex/windows-api-list )< br >
2020-04-02 21:58:00 +07:00
- 内容が公開されていないWindowsの構造体のリバースエンジニアリングについて< br >
[Reversing Stories: Updating the Undocumented ESTROBJ and STROBJ Structures for Windows 10 x64 ](https://versprite.com/blog/security-research/reverse-engineering-undocumented-structures/ )< br >
2020-04-05 19:25:37 +07:00
- ReverseEngineering全般について(PEB,TEB,TLS,SEHなどの記事もあり)< br >
[kblab.tistory.com(~2016) ](https://kblab.tistory.com/category/High%20Level%20Technique/Reversing )< br >
[k3y6reak.github.io(2017~) ](https://k3y6reak.github.io/category/technique/ )< br >
2020-07-20 18:48:35 +07:00
- exeからdllのコンバートに関する記事< br >
[Converting an EXE to a DLL ](https://osandamalith.com/2019/08/26/converting-an-exe-to-a-dll/ )
2020-02-23 11:34:02 +07:00
2020-03-10 20:35:49 +07:00
# Windows OS
- Windows Internalsを日本語で解説するプロジェクト< br >
[windows-internals-guid ](https://github.com/windows-internals-guide/security )< br >
2020-06-24 18:50:39 +07:00
- Windowsカーネルの仕組みについて< br >
[windows kernel internals ](https://www.matteomalvica.com/hacks/ )
2020-07-10 18:08:59 +07:00
- 古いOSのダウンロードや情報を提供< br >
[winworld ](https://winworldpc.com/home )
2020-07-11 21:43:54 +07:00
- Windowsの環境変数< br >
[Recognized Environment Variables ](https://docs.microsoft.com/en-us/windows/deployment/usmt/usmt-recognized-environment-variables )
2020-07-13 19:43:17 +07:00
- WIndowsの更新パッケージに含まれるファイルのダウンロードと情報の表示< br >
[Introducing Winbindex - the Windows Binaries Index ](https://m417z.com/Introducing-Winbindex-the-Windows-Binaries-Index/ )< br >
[Winbindex ](https://m417z.com/winbindex/ )
2020-03-10 20:35:49 +07:00
2020-02-24 19:25:10 +07:00
# Windows Command
2020-07-11 21:43:54 +07:00
- windows上で情報収集やフォレンジックに活用できるCommand Line CheetSheet
2020-02-24 19:26:57 +07:00
- [Windows Command Line cheatsheet (part 1): some useful tips ](https://www.andreafortuna.org/2017/08/03/windows-command-line-cheatsheet-part-1-some-useful-tips/ )
- [Windows Command Line cheatsheet (part 2): WMIC ](https://www.andreafortuna.org/2017/08/09/windows-command-line-cheatsheet-part-2-wmic/ )
2020-02-27 19:31:55 +07:00
- [WMI 101 for Pentesters ](https://www.ethicalhacker.net/features/root/wmi-101-for-pentesters/ )
2020-02-24 19:25:10 +07:00
2020-02-23 11:34:02 +07:00
# Training Material
2020-03-14 20:43:10 +07:00
- **[Malware-Traffic-Analysis(TRAFFIC ANALYSIS EXERCISES)](https://www.malware-traffic-analysis.net/training-exercises.html)< br > **
2020-02-23 12:04:41 +07:00
- pcap解析(マルウェア感染等のセキュリティインシデントに関わるトラフィック解析)に関するトレーニング教材< br >
2020-03-14 20:43:10 +07:00
- **[Malware-Analysis-Training](https://github.com/OpenRCE/Malware-Analysis-Training)< br > **
2020-02-23 11:34:02 +07:00
- 初心者/中級者向けのマルウェア解析トレーニング教材< br >
- 教材自体は2010年頃のもので2020年にオープンソース化
2020-02-23 11:59:09 +07:00
- 内容:
- IDA proやOllyDBG等の解析ツールについて
- アセンブリ言語について
- パッキング,耐解析機能,バイナリ差分と比較,難読化,隠ぺい技術等
2020-03-14 20:43:10 +07:00
- **[Advanced Binary Deobfuscation](https://github.com/malrev/ABD)**
2020-02-23 11:59:09 +07:00
- バイナリの難読化解除に関するトレーニング教材
- 内容:
2020-02-23 11:59:26 +07:00
- 難読化技術や難読化解除技術について
- データフロー分析やシンボリック実行
2020-03-14 20:43:10 +07:00
- **[Adversary Tactics: PowerShell](https://github.com/specterops/at-ps)**
2020-02-23 21:24:08 +07:00
- PowerShellスクリプトとセキュリティに関するトレーニング教材
2020-03-14 20:43:10 +07:00
- **[CS6038 (Spring 2020) - Malware Analysis](https://www.youtube.com/playlist?list=PLFvh_k-n27CnAyfsMDowQmogkG5MbZkXz)**
- **[CS6038/CS5138 Malware Analysis, UC](https://class.malware.re/)**
2020-03-05 18:51:46 +07:00
- シンシナティ大学のマルウェア解析講義(Youtube,資料)
2020-03-14 20:43:10 +07:00
- **[ExploitingBooks](https://github.com/hdbreaker/ExploitingBooks)**
2020-03-11 20:39:43 +07:00
- ReverseEngineering,Exploitの資料集
2020-03-21 16:00:12 +07:00
- **[Hands on Adversarial Machine Learning](https://resources.oreilly.com/live-training/hands-on-adversarial-machine-learning/tree/master)**
2020-03-21 16:00:38 +07:00
- Adversarial Machine Learning(敵対的機械学習)に関する教材
- DGAなどに対する敵対的機械学習をハンズオンで取り組むことができる
2020-05-01 18:00:29 +07:00
- **[Malware Challenges@0x00sec](https://0x00sec.org/t/malware-challenges-analyzeme-no1/20894)**
- 課題ベースでマルウェア解析について学習
2020-07-16 20:15:21 +07:00
- **[Publicly available PCAP files@NETRESEC](https://www.netresec.com/index.ashx?page=PcapFiles)**
2020-07-17 19:13:23 +07:00
- **[Certifications & Training@AboutDFIR.com](https://aboutdfir.com/education/certifications-training/)**
2020-07-28 19:09:19 +07:00
- **[Malware Reverse Engineering Handbook@NATO CCDCOE](https://ccdcoe.org/library/publications/malware-reverse-engineering-handbook/)**
- NATOによるマルウェア調査handbook
2020-08-08 21:38:41 +07:00
- **[Practical Malware Analysis Tutorials](https://www.youtube.com/playlist?list=PLt9cUwGw6CYEpBwasTz7WWgphfRWof0_O)**
2020-08-07 17:14:22 +07:00
- Practical Malware Analysisのチュートリアル動画
2020-08-11 17:20:58 +07:00
- **[Zero2Automated](https://courses.zero2auto.com/)**
- マルウェアリバースエンジニアリング/スレットインテリジェンス/yaraなどに関するトレーニング
- 最新のマルウェアや技術について随時更新しており実践的な内容
- 有料だがコンテンツの内容を踏まえると安い(個人で支払えるレベル)