SlideShare una empresa de Scribd logo
1 de 33
Descargar para leer sin conexión
Bluebox @ CODE BLUE 2019Bluebox @ CODE BLUE 2019
FileInsight-plugins:
Decoding toolbox for malware
analysis
萬谷 暢崇
Bluebox @ CODE BLUE 2019
自己紹介
• 政府職員
• 警察庁情報技術解析課サイバーテロ対策技術室(サイバーフォースセン
ター)専門官
• 過去にマルウェア解析やデジタルフォレンジックに従事
• 趣味のプログラマ
• 2001年から FreeBSD プロジェクトメンバー (ports committer)
• オープンソースソフトウェアが大好き!
1/28
Bluebox @ CODE BLUE 2019
FileInsight-plugins
• McAfee FileInsight バイナリエディタのプラグイン集
• 2019年10月時点で67個のプラグイン
• マルウェア解析における様々なデコード作業に便利
• 2012年に開発を開始
• 個人プロジェクトで自宅で開発
(日本国政府のものではありません)
• 入手はこちら https://github.com/nmantani/FileInsight-plugins
2/28
Bluebox @ CODE BLUE 2019
背景
• 攻撃者は解析を妨げたり意図を隠すためにマルウェア中の様々な
データを難読化する
• 埋め込まれた実行ファイルやおとり文書ファイル
• 設定情報(C2ホスト名やポート番号)
• 重要な文字列(ファイルパス、レジストリパスやコマンド)
• コード
• マルウェア解析者はさらなる解析のために可読化する必要がある
3/28
Bluebox @ CODE BLUE 2019
開発の動機
• 当初(2012年)
• Microsoft Office(と Adobe Flash Player)や Adobe Reader の脆弱性がマル
ウェア感染によく悪用されていた
• 解析環境のソフトウェアのバージョンが exploit コードのターゲットのバー
ジョンと異なっていて動的解析できないことが時々あった
• そのため、C2 ホスト名をいち早く知って通信をブロックするために難読化
されて埋め込まれたマルウェアの実行ファイルを手作業で抽出したい
• 現在
• ただただ無料でパワフルなバイナリエディタが欲しい!!
4/28
Bluebox @ CODE BLUE 2019
FileInsight
• マカフィー社が開発したフリーのバイナリ
エディタ
• 便利な組み込み機能
• デコーダ(XOR, ビットローテート, BASE64等)
• x86 逆アセンブラ
• ブックマーク
• データ構造ビューア(HTML, OLE と PE)
• Python / JavaScript でのスクリプティング
• Python プラグインで拡張可能!
5/28
Bluebox @ CODE BLUE 2019
FileInsight
• しかし・・・2009年以降アップデートされていません
• McAfee Free Tools ウェブサイトからも消えました
• FileInsight のインストーラはこちらで入手可能です
http://downloadcenter.mcafee.com/products/mcafee-
avert/fileinsight.zip
6/28
Bluebox @ CODE BLUE 2019Bluebox @ CODE BLUE 2019
FileInsight-plugins の詳細
7/28
Bluebox @ CODE BLUE 2019
プラグインの分類
• 67 のプラグインが8つのカテゴリに分類されている
(2019年10月現在)
8/28
• Basic operations
• Compression operations
• Crypto operations
• Encoding operations
• Misc operations
• Parsing operations
• Search operations
• XOR operations
Bluebox @ CODE BLUE 2019
アルゴリズムとフォーマットの追加サポート
9/28
圧縮 暗号
暗号利用モード
• aPLib
• Bzip2
• Deflate (without
zlib header)
• Gzip
• LZMA
• LZNT1
• XZ
• AES
• ARC2
• ARC4
• Blowfish
• ChaCha20
• DES
• Salsa20
• Triple DES
• ECB
• CBC
• CFB
• OFB
エンコード
• Binary data <->
Hex text
• Binary data <->
Binary text
• Custom BASE64
• ROT13 (variable
amount)
• Quoted printable
Bluebox @ CODE BLUE 2019
追加された機能
• 選択したデータを新しいタブで開く
• ハッシュ値の計算
• ファイルタイプの判別
• 埋め込まれたファイルの発見
• 正規表現を使った検索 / 置換
• XOR / ビットローテートされたデータ
の検索
• 0x00 をスキップする XOR
(Null-preserving XOR)
• 256 バイトの XOR キー推定(キーをイン
クリメント / デクリメントする XOR を使
われたデータに有効)
• データを外部ツールで開く(JSON ファイ
ルでカスタマイズ可能)
• ファイル比較
• YARAルールでのスキャン
• その他いろいろ!
10/28
Bluebox @ CODE BLUE 2019
必要なもの
• Python 2 (x86)
• FileInsight は Python 2 (x64) と Python 3 と互換性がありません
• Python モジュール等
11/28
• aPLib
• binwalk
• PyCryptodomex
• backports.lzma
• python-magic
• pefile
• yara-python
Bluebox @ CODE BLUE 2019
インストール
12/28
• “plugins” フォルダを %USERPROFILE%DocumentsFileInsight にコピーします
Bluebox @ CODE BLUE 2019
使い方
• “Plugins” タブからカテゴリをクリックしてプラグインを選択します
13/28* Anomaly Chart, Strings と VirusTotal のプラグインは FileInsight に同梱
Bluebox @ CODE BLUE 2019
使い方
• 又は右クリックのメニューからカテゴリを選択します
14/28* Anomaly Chart, Strings と VirusTotal のプラグインは FileInsight に同梱
Bluebox @ CODE BLUE 2019
FileInsight-plugins のお友達: CyberChef
• 超パワフルなデコードツール
• ウェブブラウザ上で動作
• 英国政府(GCHQ)と世界中の開発者に
よってアクティブに開発
• 手作業でのファイル編集は苦手
• “Send to” プラグインで CyberChef に
直接データを送り込める(12KBまで)
15/28
Bluebox @ CODE BLUE 2019Bluebox @ CODE BLUE 2019
デモ
16/28
Bluebox @ CODE BLUE 2019
デモ 1
• Microsoft Excel ファイル
• マルウェアの実行ファイルが XOR とビットローテートで難読化され
て埋め込まれている
• 使用するプラグイン
• Search operations -> XOR text search
• Paring operations -> Find PE file
• Misc operations -> Send to
17/28
Bluebox @ CODE BLUE 2019
デモ 1
18/28
可読化前: 可読化後:
Bluebox @ CODE BLUE 2019
デモ 2
• リッチテキストファイル
• マルウェアの実行ファイルがキーをインクリメントする XOR
(rolling XOR)で難読化されて埋め込まれている
• 使用するプラグイン
• XOR operations -> Guess 256 byte XOR keys
19/28
Bluebox @ CODE BLUE 2019
デモ 2
20/28
可読化前: 可読化後:
Bluebox @ CODE BLUE 2019
デモ 3
• PHP ウェブシェル
• コードは BASE64, ROT13, Deflate 等で難読化されている
• 使用するプラグイン:
• Encoding operations -> ROT13
• Basic operations -> Reverse order
• Encoding operations -> Custom BASE 64 decode
• Compression operations -> Raw inflate
• Misc operations -> Send to
21/28
Bluebox @ CODE BLUE 2019
デモ 3
22/28
可読化前:
可読化後:
Bluebox @ CODE BLUE 2019
デモ 4
• Zebrocy (Zekapab) マルウェア
• いくつかの文字列が16進数にエンコードされている
• 16進文字列を抽出してデコードする
• この文字列に基づく YARA ルールでスキャンする
• 使用するプラグイン:
• Parsing operations -> Strings
• Search operations -> YARA scan
23/28
Bluebox @ CODE BLUE 2019
デモ 4
24/28
“YARA scan” プラグインで FileInsight を YARA ルールエディタとして使用可能
Bluebox @ CODE BLUE 2019
デモ 5
• 隠しメッセージを含むバイナリファイル(マルウェアではありません)
• CyberChef とのコンビネーション
• 使用するプラグイン:
• Parsing operations -> File type
• Compression operation -> XZ decompress
• Misc operations -> Send to
25/28
Bluebox @ CODE BLUE 2019
デモ 5
26/28
可読化前: 可読化後:
Bluebox @ CODE BLUE 2019
まとめ
• FileInsight-plugins は FileInsight バイナリエディタをアイアン
マンスーツのようにもっとパワフルにします
• マルウェア解析における様々なデコード作業に便利
• 入手はこちら https://github.com/nmantani/FileInsight-plugins
• フィードバックをお待ちしています!(プルリクエスト、
バグレポート、機能追加の要望)
27/28
Bluebox @ CODE BLUE 2019Bluebox @ CODE BLUE 2019
ありがとうございました!
スライドは私の GitHub リポジトリからダウンロードできます:
https://github.com/nmantani/FileInsight-plugins
28/28
このスライドは Twitter 社によって CC-BY 4.0 でライセンスされて
いる Twemoji を使用しています。
https://twemoji.twitter.com/
Bluebox @ CODE BLUE 2019Bluebox @ CODE BLUE 2019
付録
Bluebox @ CODE BLUE 2019
FileInsight の API 関数の一覧
• getLength()
• getByteAt()
• setByteAt()
• setBookmark()
• getSelection()
• getSelectionOffset()
• getSelectionLength()
• gotoBookmark()
• download()
• newDocument()
• showSimpleDialog()
• decode()
関数の詳細については FileInsight のヘルプをご覧ください。
Bluebox @ CODE BLUE 2019
FileInsight の API 関数の一覧
• getDocument()
• setDocument()
• getDocumentName()
• getDocumentCount()
• getDocumentURL()
• activateDocumentAt()
関数の詳細については FileInsight のヘルプをご覧ください。
Bluebox @ CODE BLUE 2019
プラグインのサンプルコード
# 選択した部分又はファイル全体を新しいタブで開く
length = getSelectionLength() # 選択部分のサイズを取得
if length > 0:
data = getSelection() # 選択部分のデータを取得
else:
data = getDocument() # ファイル全体のデータを取得
newDocument(“New file”, 1) # hex view モードで新しいタブを開く
setDocument(data) # データを新しいタブにコピーする

Más contenido relacionado

La actualidad más candente

CSRF, ClickJacking & Open Redirect
CSRF, ClickJacking & Open RedirectCSRF, ClickJacking & Open Redirect
CSRF, ClickJacking & Open RedirectBlueinfy Solutions
 
HTTP Security Headers Every Java Developer Must Know
HTTP Security Headers Every Java Developer Must KnowHTTP Security Headers Every Java Developer Must Know
HTTP Security Headers Every Java Developer Must KnowAyoma Wijethunga
 
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.Mikhail Egorov
 
Secure code practices
Secure code practicesSecure code practices
Secure code practicesHina Rawal
 
XXE、SSRF、安全でないデシリアライゼーション入門
XXE、SSRF、安全でないデシリアライゼーション入門XXE、SSRF、安全でないデシリアライゼーション入門
XXE、SSRF、安全でないデシリアライゼーション入門Hiroshi Tokumaru
 
Exploring the x64
Exploring the x64Exploring the x64
Exploring the x64FFRI, Inc.
 
徳丸本ができるまで
徳丸本ができるまで徳丸本ができるまで
徳丸本ができるまでHiroshi Tokumaru
 
Security Testing: Fuzzing
Security Testing: FuzzingSecurity Testing: Fuzzing
Security Testing: FuzzingAndrei Rubaniuk
 
CNIT 126 13: Data Encoding
CNIT 126 13: Data EncodingCNIT 126 13: Data Encoding
CNIT 126 13: Data EncodingSam Bowne
 
Keycloak入門-OpenID ConnectによるAPIセキュリティ
Keycloak入門-OpenID ConnectによるAPIセキュリティKeycloak入門-OpenID ConnectによるAPIセキュリティ
Keycloak入門-OpenID ConnectによるAPIセキュリティYuichi Nakamura
 
メルカリ・ソウゾウでは どうGoを活用しているのか?
メルカリ・ソウゾウでは どうGoを活用しているのか?メルカリ・ソウゾウでは どうGoを活用しているのか?
メルカリ・ソウゾウでは どうGoを活用しているのか?Takuya Ueda
 
4 Mapping the Application
4 Mapping the Application4 Mapping the Application
4 Mapping the ApplicationSam Bowne
 
CNIT 126: 10: Kernel Debugging with WinDbg
CNIT 126: 10: Kernel Debugging with WinDbgCNIT 126: 10: Kernel Debugging with WinDbg
CNIT 126: 10: Kernel Debugging with WinDbgSam Bowne
 
CNIT 126 11. Malware Behavior
CNIT 126 11. Malware BehaviorCNIT 126 11. Malware Behavior
CNIT 126 11. Malware BehaviorSam Bowne
 
Exploiting XPC in AntiVirus
Exploiting XPC in AntiVirusExploiting XPC in AntiVirus
Exploiting XPC in AntiVirusCsaba Fitzl
 
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 EditionGoing Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 EditionSoroush Dalili
 
HTTP Request Smuggling via higher HTTP versions
HTTP Request Smuggling via higher HTTP versionsHTTP Request Smuggling via higher HTTP versions
HTTP Request Smuggling via higher HTTP versionsneexemil
 
Webデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
Webデザイン 第10回:HTML5実践 Three.jsで3DプログラミングWebデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
Webデザイン 第10回:HTML5実践 Three.jsで3DプログラミングAtsushi Tadokoro
 

La actualidad más candente (20)

CSRF, ClickJacking & Open Redirect
CSRF, ClickJacking & Open RedirectCSRF, ClickJacking & Open Redirect
CSRF, ClickJacking & Open Redirect
 
HTTP Security Headers Every Java Developer Must Know
HTTP Security Headers Every Java Developer Must KnowHTTP Security Headers Every Java Developer Must Know
HTTP Security Headers Every Java Developer Must Know
 
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.
 
zero day exploits
zero day exploitszero day exploits
zero day exploits
 
Secure code practices
Secure code practicesSecure code practices
Secure code practices
 
XXE、SSRF、安全でないデシリアライゼーション入門
XXE、SSRF、安全でないデシリアライゼーション入門XXE、SSRF、安全でないデシリアライゼーション入門
XXE、SSRF、安全でないデシリアライゼーション入門
 
Exploring the x64
Exploring the x64Exploring the x64
Exploring the x64
 
徳丸本ができるまで
徳丸本ができるまで徳丸本ができるまで
徳丸本ができるまで
 
Security Testing: Fuzzing
Security Testing: FuzzingSecurity Testing: Fuzzing
Security Testing: Fuzzing
 
CNIT 126 13: Data Encoding
CNIT 126 13: Data EncodingCNIT 126 13: Data Encoding
CNIT 126 13: Data Encoding
 
Keycloak入門-OpenID ConnectによるAPIセキュリティ
Keycloak入門-OpenID ConnectによるAPIセキュリティKeycloak入門-OpenID ConnectによるAPIセキュリティ
Keycloak入門-OpenID ConnectによるAPIセキュリティ
 
メルカリ・ソウゾウでは どうGoを活用しているのか?
メルカリ・ソウゾウでは どうGoを活用しているのか?メルカリ・ソウゾウでは どうGoを活用しているのか?
メルカリ・ソウゾウでは どうGoを活用しているのか?
 
4 Mapping the Application
4 Mapping the Application4 Mapping the Application
4 Mapping the Application
 
Aula 8 - SQL Injection
Aula 8 - SQL InjectionAula 8 - SQL Injection
Aula 8 - SQL Injection
 
CNIT 126: 10: Kernel Debugging with WinDbg
CNIT 126: 10: Kernel Debugging with WinDbgCNIT 126: 10: Kernel Debugging with WinDbg
CNIT 126: 10: Kernel Debugging with WinDbg
 
CNIT 126 11. Malware Behavior
CNIT 126 11. Malware BehaviorCNIT 126 11. Malware Behavior
CNIT 126 11. Malware Behavior
 
Exploiting XPC in AntiVirus
Exploiting XPC in AntiVirusExploiting XPC in AntiVirus
Exploiting XPC in AntiVirus
 
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 EditionGoing Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
 
HTTP Request Smuggling via higher HTTP versions
HTTP Request Smuggling via higher HTTP versionsHTTP Request Smuggling via higher HTTP versions
HTTP Request Smuggling via higher HTTP versions
 
Webデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
Webデザイン 第10回:HTML5実践 Three.jsで3DプログラミングWebデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
Webデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
 

Similar a [CB19] FileInsight-plugins: Decoding toolbox for malware analysis by 萬谷 暢崇

【Swift】SDKの読み込みにuse framework!が使えない場合の対処方法
【Swift】SDKの読み込みにuse framework!が使えない場合の対処方法【Swift】SDKの読み込みにuse framework!が使えない場合の対処方法
【Swift】SDKの読み込みにuse framework!が使えない場合の対処方法natsumo
 
Swiftアプリにプッシュ通知を組み込もう!-【番外編】SDKのインポート方法-
Swiftアプリにプッシュ通知を組み込もう!-【番外編】SDKのインポート方法-Swiftアプリにプッシュ通知を組み込もう!-【番外編】SDKのインポート方法-
Swiftアプリにプッシュ通知を組み込もう!-【番外編】SDKのインポート方法-natsumo
 
オープンデータの技術よりな話
オープンデータの技術よりな話オープンデータの技術よりな話
オープンデータの技術よりな話Fumihiro Kato
 
深層学習ライブラリのプログラミングモデル
深層学習ライブラリのプログラミングモデル深層学習ライブラリのプログラミングモデル
深層学習ライブラリのプログラミングモデルYuta Kashino
 
Rescale ScaleX講習会 ~AWSクラウド環境におけるHPC利用
Rescale ScaleX講習会 ~AWSクラウド環境におけるHPC利用Rescale ScaleX講習会 ~AWSクラウド環境におけるHPC利用
Rescale ScaleX講習会 ~AWSクラウド環境におけるHPC利用Rescale Japan株式会社
 
Composer による依存管理 と Packagist によるライブラリの公開
Composer による依存管理 と Packagist によるライブラリの公開Composer による依存管理 と Packagist によるライブラリの公開
Composer による依存管理 と Packagist によるライブラリの公開Shogo Kawahara
 
Fighting advanced malware using machine learning (Japanese)
Fighting advanced malware using machine learning (Japanese)Fighting advanced malware using machine learning (Japanese)
Fighting advanced malware using machine learning (Japanese)FFRI, Inc.
 
データ分析に必要なスキルをつけるためのツール~Jupyter notebook、r連携、機械学習からsparkまで~
データ分析に必要なスキルをつけるためのツール~Jupyter notebook、r連携、機械学習からsparkまで~データ分析に必要なスキルをつけるためのツール~Jupyter notebook、r連携、機械学習からsparkまで~
データ分析に必要なスキルをつけるためのツール~Jupyter notebook、r連携、機械学習からsparkまで~The Japan DataScientist Society
 
AWS Security JAWS 経済的にハニーポットのログ分析をするためのベストプラクティス?
AWS Security JAWS 経済的にハニーポットのログ分析をするためのベストプラクティス?AWS Security JAWS 経済的にハニーポットのログ分析をするためのベストプラクティス?
AWS Security JAWS 経済的にハニーポットのログ分析をするためのベストプラクティス?Masamitsu Maehara
 
Androidアプリ解析の基礎 公開用
Androidアプリ解析の基礎 公開用Androidアプリ解析の基礎 公開用
Androidアプリ解析の基礎 公開用Lumin Hacker
 
AndroidでActiveRecordライクにDBを使う
AndroidでActiveRecordライクにDBを使うAndroidでActiveRecordライクにDBを使う
AndroidでActiveRecordライクにDBを使うFujimura Munehiko
 
地味だけど劇的に便利になるGitHubリポジトリ設定あれこれ
地味だけど劇的に便利になるGitHubリポジトリ設定あれこれ地味だけど劇的に便利になるGitHubリポジトリ設定あれこれ
地味だけど劇的に便利になるGitHubリポジトリ設定あれこれKazumi IWANAGA
 
Firefoxの開発プロセス
Firefoxの開発プロセスFirefoxの開発プロセス
Firefoxの開発プロセスMakoto Kato
 
Software for Edge Heavy Computing @ INTEROP 2016 Tokyo
Software for Edge Heavy Computing @ INTEROP 2016 TokyoSoftware for Edge Heavy Computing @ INTEROP 2016 Tokyo
Software for Edge Heavy Computing @ INTEROP 2016 TokyoShohei Hido
 
論理思考とプログラミング 2013f#10
論理思考とプログラミング 2013f#10論理思考とプログラミング 2013f#10
論理思考とプログラミング 2013f#10Noritada Shimizu
 

Similar a [CB19] FileInsight-plugins: Decoding toolbox for malware analysis by 萬谷 暢崇 (20)

【Swift】SDKの読み込みにuse framework!が使えない場合の対処方法
【Swift】SDKの読み込みにuse framework!が使えない場合の対処方法【Swift】SDKの読み込みにuse framework!が使えない場合の対処方法
【Swift】SDKの読み込みにuse framework!が使えない場合の対処方法
 
Swiftアプリにプッシュ通知を組み込もう!-【番外編】SDKのインポート方法-
Swiftアプリにプッシュ通知を組み込もう!-【番外編】SDKのインポート方法-Swiftアプリにプッシュ通知を組み込もう!-【番外編】SDKのインポート方法-
Swiftアプリにプッシュ通知を組み込もう!-【番外編】SDKのインポート方法-
 
オープンデータの技術よりな話
オープンデータの技術よりな話オープンデータの技術よりな話
オープンデータの技術よりな話
 
私とOSSの25年
私とOSSの25年私とOSSの25年
私とOSSの25年
 
深層学習ライブラリのプログラミングモデル
深層学習ライブラリのプログラミングモデル深層学習ライブラリのプログラミングモデル
深層学習ライブラリのプログラミングモデル
 
210728 mpy
210728 mpy210728 mpy
210728 mpy
 
Rescale ScaleX講習会 ~AWSクラウド環境におけるHPC利用
Rescale ScaleX講習会 ~AWSクラウド環境におけるHPC利用Rescale ScaleX講習会 ~AWSクラウド環境におけるHPC利用
Rescale ScaleX講習会 ~AWSクラウド環境におけるHPC利用
 
Composer による依存管理 と Packagist によるライブラリの公開
Composer による依存管理 と Packagist によるライブラリの公開Composer による依存管理 と Packagist によるライブラリの公開
Composer による依存管理 と Packagist によるライブラリの公開
 
Fighting advanced malware using machine learning (Japanese)
Fighting advanced malware using machine learning (Japanese)Fighting advanced malware using machine learning (Japanese)
Fighting advanced malware using machine learning (Japanese)
 
データ分析に必要なスキルをつけるためのツール~Jupyter notebook、r連携、機械学習からsparkまで~
データ分析に必要なスキルをつけるためのツール~Jupyter notebook、r連携、機械学習からsparkまで~データ分析に必要なスキルをつけるためのツール~Jupyter notebook、r連携、機械学習からsparkまで~
データ分析に必要なスキルをつけるためのツール~Jupyter notebook、r連携、機械学習からsparkまで~
 
Firefoxの開発ツール
Firefoxの開発ツールFirefoxの開発ツール
Firefoxの開発ツール
 
AWS Security JAWS 経済的にハニーポットのログ分析をするためのベストプラクティス?
AWS Security JAWS 経済的にハニーポットのログ分析をするためのベストプラクティス?AWS Security JAWS 経済的にハニーポットのログ分析をするためのベストプラクティス?
AWS Security JAWS 経済的にハニーポットのログ分析をするためのベストプラクティス?
 
DAS_202109
DAS_202109DAS_202109
DAS_202109
 
Androidアプリ解析の基礎 公開用
Androidアプリ解析の基礎 公開用Androidアプリ解析の基礎 公開用
Androidアプリ解析の基礎 公開用
 
AndroidでActiveRecordライクにDBを使う
AndroidでActiveRecordライクにDBを使うAndroidでActiveRecordライクにDBを使う
AndroidでActiveRecordライクにDBを使う
 
地味だけど劇的に便利になるGitHubリポジトリ設定あれこれ
地味だけど劇的に便利になるGitHubリポジトリ設定あれこれ地味だけど劇的に便利になるGitHubリポジトリ設定あれこれ
地味だけど劇的に便利になるGitHubリポジトリ設定あれこれ
 
Firefoxの開発プロセス
Firefoxの開発プロセスFirefoxの開発プロセス
Firefoxの開発プロセス
 
Software for Edge Heavy Computing @ INTEROP 2016 Tokyo
Software for Edge Heavy Computing @ INTEROP 2016 TokyoSoftware for Edge Heavy Computing @ INTEROP 2016 Tokyo
Software for Edge Heavy Computing @ INTEROP 2016 Tokyo
 
200527 ur
200527 ur200527 ur
200527 ur
 
論理思考とプログラミング 2013f#10
論理思考とプログラミング 2013f#10論理思考とプログラミング 2013f#10
論理思考とプログラミング 2013f#10
 

Más de CODE BLUE

[cb22] Hayabusa Threat Hunting and Fast Forensics in Windows environments fo...
[cb22] Hayabusa  Threat Hunting and Fast Forensics in Windows environments fo...[cb22] Hayabusa  Threat Hunting and Fast Forensics in Windows environments fo...
[cb22] Hayabusa Threat Hunting and Fast Forensics in Windows environments fo...CODE BLUE
 
[cb22] Tales of 5G hacking by Karsten Nohl
[cb22] Tales of 5G hacking by Karsten Nohl[cb22] Tales of 5G hacking by Karsten Nohl
[cb22] Tales of 5G hacking by Karsten NohlCODE BLUE
 
[cb22] Your Printer is not your Printer ! - Hacking Printers at Pwn2Own by A...
[cb22]  Your Printer is not your Printer ! - Hacking Printers at Pwn2Own by A...[cb22]  Your Printer is not your Printer ! - Hacking Printers at Pwn2Own by A...
[cb22] Your Printer is not your Printer ! - Hacking Printers at Pwn2Own by A...CODE BLUE
 
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...CODE BLUE
 
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(4) by 板橋 博之
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(4) by 板橋 博之[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(4) by 板橋 博之
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(4) by 板橋 博之CODE BLUE
 
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...CODE BLUE
 
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(3) by Lorenzo Pupillo
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(3) by Lorenzo Pupillo[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(3) by Lorenzo Pupillo
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(3) by Lorenzo PupilloCODE BLUE
 
[cb22] ”The Present and Future of Coordinated Vulnerability Disclosure” Inte...
[cb22]  ”The Present and Future of Coordinated Vulnerability Disclosure” Inte...[cb22]  ”The Present and Future of Coordinated Vulnerability Disclosure” Inte...
[cb22] ”The Present and Future of Coordinated Vulnerability Disclosure” Inte...CODE BLUE
 
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(2)by Allan Friedman
[cb22]  「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(2)by Allan Friedman [cb22]  「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(2)by Allan Friedman
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(2)by Allan Friedman CODE BLUE
 
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...CODE BLUE
 
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション (1)by 高橋 郁夫
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション (1)by  高橋 郁夫[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション (1)by  高橋 郁夫
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション (1)by 高橋 郁夫CODE BLUE
 
[cb22] Are Embedded Devices Ready for ROP Attacks? -ROP verification for low-...
[cb22] Are Embedded Devices Ready for ROP Attacks? -ROP verification for low-...[cb22] Are Embedded Devices Ready for ROP Attacks? -ROP verification for low-...
[cb22] Are Embedded Devices Ready for ROP Attacks? -ROP verification for low-...CODE BLUE
 
[cb22] Wslinkのマルチレイヤーな仮想環境について by Vladislav Hrčka
[cb22] Wslinkのマルチレイヤーな仮想環境について by Vladislav Hrčka [cb22] Wslinkのマルチレイヤーな仮想環境について by Vladislav Hrčka
[cb22] Wslinkのマルチレイヤーな仮想環境について by Vladislav Hrčka CODE BLUE
 
[cb22] Under the hood of Wslink’s multilayered virtual machine en by Vladisla...
[cb22] Under the hood of Wslink’s multilayered virtual machine en by Vladisla...[cb22] Under the hood of Wslink’s multilayered virtual machine en by Vladisla...
[cb22] Under the hood of Wslink’s multilayered virtual machine en by Vladisla...CODE BLUE
 
[cb22] CloudDragon’s Credential Factory is Powering Up Its Espionage Activiti...
[cb22] CloudDragon’s Credential Factory is Powering Up Its Espionage Activiti...[cb22] CloudDragon’s Credential Factory is Powering Up Its Espionage Activiti...
[cb22] CloudDragon’s Credential Factory is Powering Up Its Espionage Activiti...CODE BLUE
 
[cb22] From Parroting to Echoing: The Evolution of China’s Bots-Driven Info...
[cb22]  From Parroting to Echoing:  The Evolution of China’s Bots-Driven Info...[cb22]  From Parroting to Echoing:  The Evolution of China’s Bots-Driven Info...
[cb22] From Parroting to Echoing: The Evolution of China’s Bots-Driven Info...CODE BLUE
 
[cb22] Who is the Mal-Gopher? - Implementation and Evaluation of “gimpfuzzy”...
[cb22]  Who is the Mal-Gopher? - Implementation and Evaluation of “gimpfuzzy”...[cb22]  Who is the Mal-Gopher? - Implementation and Evaluation of “gimpfuzzy”...
[cb22] Who is the Mal-Gopher? - Implementation and Evaluation of “gimpfuzzy”...CODE BLUE
 
[cb22] Mal-gopherとは?Go系マルウェアの分類のためのgimpfuzzy実装と評価 by 澤部 祐太, 甘粕 伸幸, 野村 和也
[cb22] Mal-gopherとは?Go系マルウェアの分類のためのgimpfuzzy実装と評価 by 澤部 祐太, 甘粕 伸幸, 野村 和也[cb22] Mal-gopherとは?Go系マルウェアの分類のためのgimpfuzzy実装と評価 by 澤部 祐太, 甘粕 伸幸, 野村 和也
[cb22] Mal-gopherとは?Go系マルウェアの分類のためのgimpfuzzy実装と評価 by 澤部 祐太, 甘粕 伸幸, 野村 和也CODE BLUE
 
[cb22] Tracking the Entire Iceberg - Long-term APT Malware C2 Protocol Emulat...
[cb22] Tracking the Entire Iceberg - Long-term APT Malware C2 Protocol Emulat...[cb22] Tracking the Entire Iceberg - Long-term APT Malware C2 Protocol Emulat...
[cb22] Tracking the Entire Iceberg - Long-term APT Malware C2 Protocol Emulat...CODE BLUE
 
[cb22] Fight Against Malware Development Life Cycle by Shusei Tomonaga and Yu...
[cb22] Fight Against Malware Development Life Cycle by Shusei Tomonaga and Yu...[cb22] Fight Against Malware Development Life Cycle by Shusei Tomonaga and Yu...
[cb22] Fight Against Malware Development Life Cycle by Shusei Tomonaga and Yu...CODE BLUE
 

Más de CODE BLUE (20)

[cb22] Hayabusa Threat Hunting and Fast Forensics in Windows environments fo...
[cb22] Hayabusa  Threat Hunting and Fast Forensics in Windows environments fo...[cb22] Hayabusa  Threat Hunting and Fast Forensics in Windows environments fo...
[cb22] Hayabusa Threat Hunting and Fast Forensics in Windows environments fo...
 
[cb22] Tales of 5G hacking by Karsten Nohl
[cb22] Tales of 5G hacking by Karsten Nohl[cb22] Tales of 5G hacking by Karsten Nohl
[cb22] Tales of 5G hacking by Karsten Nohl
 
[cb22] Your Printer is not your Printer ! - Hacking Printers at Pwn2Own by A...
[cb22]  Your Printer is not your Printer ! - Hacking Printers at Pwn2Own by A...[cb22]  Your Printer is not your Printer ! - Hacking Printers at Pwn2Own by A...
[cb22] Your Printer is not your Printer ! - Hacking Printers at Pwn2Own by A...
 
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
 
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(4) by 板橋 博之
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(4) by 板橋 博之[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(4) by 板橋 博之
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(4) by 板橋 博之
 
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
 
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(3) by Lorenzo Pupillo
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(3) by Lorenzo Pupillo[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(3) by Lorenzo Pupillo
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(3) by Lorenzo Pupillo
 
[cb22] ”The Present and Future of Coordinated Vulnerability Disclosure” Inte...
[cb22]  ”The Present and Future of Coordinated Vulnerability Disclosure” Inte...[cb22]  ”The Present and Future of Coordinated Vulnerability Disclosure” Inte...
[cb22] ”The Present and Future of Coordinated Vulnerability Disclosure” Inte...
 
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(2)by Allan Friedman
[cb22]  「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(2)by Allan Friedman [cb22]  「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(2)by Allan Friedman
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション(2)by Allan Friedman
 
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
[cb22] "The Present and Future of Coordinated Vulnerability Disclosure" Inter...
 
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション (1)by 高橋 郁夫
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション (1)by  高橋 郁夫[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション (1)by  高橋 郁夫
[cb22] 「協調された脆弱性開示の現在と未来」国際的なパネルディスカッション (1)by 高橋 郁夫
 
[cb22] Are Embedded Devices Ready for ROP Attacks? -ROP verification for low-...
[cb22] Are Embedded Devices Ready for ROP Attacks? -ROP verification for low-...[cb22] Are Embedded Devices Ready for ROP Attacks? -ROP verification for low-...
[cb22] Are Embedded Devices Ready for ROP Attacks? -ROP verification for low-...
 
[cb22] Wslinkのマルチレイヤーな仮想環境について by Vladislav Hrčka
[cb22] Wslinkのマルチレイヤーな仮想環境について by Vladislav Hrčka [cb22] Wslinkのマルチレイヤーな仮想環境について by Vladislav Hrčka
[cb22] Wslinkのマルチレイヤーな仮想環境について by Vladislav Hrčka
 
[cb22] Under the hood of Wslink’s multilayered virtual machine en by Vladisla...
[cb22] Under the hood of Wslink’s multilayered virtual machine en by Vladisla...[cb22] Under the hood of Wslink’s multilayered virtual machine en by Vladisla...
[cb22] Under the hood of Wslink’s multilayered virtual machine en by Vladisla...
 
[cb22] CloudDragon’s Credential Factory is Powering Up Its Espionage Activiti...
[cb22] CloudDragon’s Credential Factory is Powering Up Its Espionage Activiti...[cb22] CloudDragon’s Credential Factory is Powering Up Its Espionage Activiti...
[cb22] CloudDragon’s Credential Factory is Powering Up Its Espionage Activiti...
 
[cb22] From Parroting to Echoing: The Evolution of China’s Bots-Driven Info...
[cb22]  From Parroting to Echoing:  The Evolution of China’s Bots-Driven Info...[cb22]  From Parroting to Echoing:  The Evolution of China’s Bots-Driven Info...
[cb22] From Parroting to Echoing: The Evolution of China’s Bots-Driven Info...
 
[cb22] Who is the Mal-Gopher? - Implementation and Evaluation of “gimpfuzzy”...
[cb22]  Who is the Mal-Gopher? - Implementation and Evaluation of “gimpfuzzy”...[cb22]  Who is the Mal-Gopher? - Implementation and Evaluation of “gimpfuzzy”...
[cb22] Who is the Mal-Gopher? - Implementation and Evaluation of “gimpfuzzy”...
 
[cb22] Mal-gopherとは?Go系マルウェアの分類のためのgimpfuzzy実装と評価 by 澤部 祐太, 甘粕 伸幸, 野村 和也
[cb22] Mal-gopherとは?Go系マルウェアの分類のためのgimpfuzzy実装と評価 by 澤部 祐太, 甘粕 伸幸, 野村 和也[cb22] Mal-gopherとは?Go系マルウェアの分類のためのgimpfuzzy実装と評価 by 澤部 祐太, 甘粕 伸幸, 野村 和也
[cb22] Mal-gopherとは?Go系マルウェアの分類のためのgimpfuzzy実装と評価 by 澤部 祐太, 甘粕 伸幸, 野村 和也
 
[cb22] Tracking the Entire Iceberg - Long-term APT Malware C2 Protocol Emulat...
[cb22] Tracking the Entire Iceberg - Long-term APT Malware C2 Protocol Emulat...[cb22] Tracking the Entire Iceberg - Long-term APT Malware C2 Protocol Emulat...
[cb22] Tracking the Entire Iceberg - Long-term APT Malware C2 Protocol Emulat...
 
[cb22] Fight Against Malware Development Life Cycle by Shusei Tomonaga and Yu...
[cb22] Fight Against Malware Development Life Cycle by Shusei Tomonaga and Yu...[cb22] Fight Against Malware Development Life Cycle by Shusei Tomonaga and Yu...
[cb22] Fight Against Malware Development Life Cycle by Shusei Tomonaga and Yu...
 

[CB19] FileInsight-plugins: Decoding toolbox for malware analysis by 萬谷 暢崇

  • 1. Bluebox @ CODE BLUE 2019Bluebox @ CODE BLUE 2019 FileInsight-plugins: Decoding toolbox for malware analysis 萬谷 暢崇
  • 2. Bluebox @ CODE BLUE 2019 自己紹介 • 政府職員 • 警察庁情報技術解析課サイバーテロ対策技術室(サイバーフォースセン ター)専門官 • 過去にマルウェア解析やデジタルフォレンジックに従事 • 趣味のプログラマ • 2001年から FreeBSD プロジェクトメンバー (ports committer) • オープンソースソフトウェアが大好き! 1/28
  • 3. Bluebox @ CODE BLUE 2019 FileInsight-plugins • McAfee FileInsight バイナリエディタのプラグイン集 • 2019年10月時点で67個のプラグイン • マルウェア解析における様々なデコード作業に便利 • 2012年に開発を開始 • 個人プロジェクトで自宅で開発 (日本国政府のものではありません) • 入手はこちら https://github.com/nmantani/FileInsight-plugins 2/28
  • 4. Bluebox @ CODE BLUE 2019 背景 • 攻撃者は解析を妨げたり意図を隠すためにマルウェア中の様々な データを難読化する • 埋め込まれた実行ファイルやおとり文書ファイル • 設定情報(C2ホスト名やポート番号) • 重要な文字列(ファイルパス、レジストリパスやコマンド) • コード • マルウェア解析者はさらなる解析のために可読化する必要がある 3/28
  • 5. Bluebox @ CODE BLUE 2019 開発の動機 • 当初(2012年) • Microsoft Office(と Adobe Flash Player)や Adobe Reader の脆弱性がマル ウェア感染によく悪用されていた • 解析環境のソフトウェアのバージョンが exploit コードのターゲットのバー ジョンと異なっていて動的解析できないことが時々あった • そのため、C2 ホスト名をいち早く知って通信をブロックするために難読化 されて埋め込まれたマルウェアの実行ファイルを手作業で抽出したい • 現在 • ただただ無料でパワフルなバイナリエディタが欲しい!! 4/28
  • 6. Bluebox @ CODE BLUE 2019 FileInsight • マカフィー社が開発したフリーのバイナリ エディタ • 便利な組み込み機能 • デコーダ(XOR, ビットローテート, BASE64等) • x86 逆アセンブラ • ブックマーク • データ構造ビューア(HTML, OLE と PE) • Python / JavaScript でのスクリプティング • Python プラグインで拡張可能! 5/28
  • 7. Bluebox @ CODE BLUE 2019 FileInsight • しかし・・・2009年以降アップデートされていません • McAfee Free Tools ウェブサイトからも消えました • FileInsight のインストーラはこちらで入手可能です http://downloadcenter.mcafee.com/products/mcafee- avert/fileinsight.zip 6/28
  • 8. Bluebox @ CODE BLUE 2019Bluebox @ CODE BLUE 2019 FileInsight-plugins の詳細 7/28
  • 9. Bluebox @ CODE BLUE 2019 プラグインの分類 • 67 のプラグインが8つのカテゴリに分類されている (2019年10月現在) 8/28 • Basic operations • Compression operations • Crypto operations • Encoding operations • Misc operations • Parsing operations • Search operations • XOR operations
  • 10. Bluebox @ CODE BLUE 2019 アルゴリズムとフォーマットの追加サポート 9/28 圧縮 暗号 暗号利用モード • aPLib • Bzip2 • Deflate (without zlib header) • Gzip • LZMA • LZNT1 • XZ • AES • ARC2 • ARC4 • Blowfish • ChaCha20 • DES • Salsa20 • Triple DES • ECB • CBC • CFB • OFB エンコード • Binary data <-> Hex text • Binary data <-> Binary text • Custom BASE64 • ROT13 (variable amount) • Quoted printable
  • 11. Bluebox @ CODE BLUE 2019 追加された機能 • 選択したデータを新しいタブで開く • ハッシュ値の計算 • ファイルタイプの判別 • 埋め込まれたファイルの発見 • 正規表現を使った検索 / 置換 • XOR / ビットローテートされたデータ の検索 • 0x00 をスキップする XOR (Null-preserving XOR) • 256 バイトの XOR キー推定(キーをイン クリメント / デクリメントする XOR を使 われたデータに有効) • データを外部ツールで開く(JSON ファイ ルでカスタマイズ可能) • ファイル比較 • YARAルールでのスキャン • その他いろいろ! 10/28
  • 12. Bluebox @ CODE BLUE 2019 必要なもの • Python 2 (x86) • FileInsight は Python 2 (x64) と Python 3 と互換性がありません • Python モジュール等 11/28 • aPLib • binwalk • PyCryptodomex • backports.lzma • python-magic • pefile • yara-python
  • 13. Bluebox @ CODE BLUE 2019 インストール 12/28 • “plugins” フォルダを %USERPROFILE%DocumentsFileInsight にコピーします
  • 14. Bluebox @ CODE BLUE 2019 使い方 • “Plugins” タブからカテゴリをクリックしてプラグインを選択します 13/28* Anomaly Chart, Strings と VirusTotal のプラグインは FileInsight に同梱
  • 15. Bluebox @ CODE BLUE 2019 使い方 • 又は右クリックのメニューからカテゴリを選択します 14/28* Anomaly Chart, Strings と VirusTotal のプラグインは FileInsight に同梱
  • 16. Bluebox @ CODE BLUE 2019 FileInsight-plugins のお友達: CyberChef • 超パワフルなデコードツール • ウェブブラウザ上で動作 • 英国政府(GCHQ)と世界中の開発者に よってアクティブに開発 • 手作業でのファイル編集は苦手 • “Send to” プラグインで CyberChef に 直接データを送り込める(12KBまで) 15/28
  • 17. Bluebox @ CODE BLUE 2019Bluebox @ CODE BLUE 2019 デモ 16/28
  • 18. Bluebox @ CODE BLUE 2019 デモ 1 • Microsoft Excel ファイル • マルウェアの実行ファイルが XOR とビットローテートで難読化され て埋め込まれている • 使用するプラグイン • Search operations -> XOR text search • Paring operations -> Find PE file • Misc operations -> Send to 17/28
  • 19. Bluebox @ CODE BLUE 2019 デモ 1 18/28 可読化前: 可読化後:
  • 20. Bluebox @ CODE BLUE 2019 デモ 2 • リッチテキストファイル • マルウェアの実行ファイルがキーをインクリメントする XOR (rolling XOR)で難読化されて埋め込まれている • 使用するプラグイン • XOR operations -> Guess 256 byte XOR keys 19/28
  • 21. Bluebox @ CODE BLUE 2019 デモ 2 20/28 可読化前: 可読化後:
  • 22. Bluebox @ CODE BLUE 2019 デモ 3 • PHP ウェブシェル • コードは BASE64, ROT13, Deflate 等で難読化されている • 使用するプラグイン: • Encoding operations -> ROT13 • Basic operations -> Reverse order • Encoding operations -> Custom BASE 64 decode • Compression operations -> Raw inflate • Misc operations -> Send to 21/28
  • 23. Bluebox @ CODE BLUE 2019 デモ 3 22/28 可読化前: 可読化後:
  • 24. Bluebox @ CODE BLUE 2019 デモ 4 • Zebrocy (Zekapab) マルウェア • いくつかの文字列が16進数にエンコードされている • 16進文字列を抽出してデコードする • この文字列に基づく YARA ルールでスキャンする • 使用するプラグイン: • Parsing operations -> Strings • Search operations -> YARA scan 23/28
  • 25. Bluebox @ CODE BLUE 2019 デモ 4 24/28 “YARA scan” プラグインで FileInsight を YARA ルールエディタとして使用可能
  • 26. Bluebox @ CODE BLUE 2019 デモ 5 • 隠しメッセージを含むバイナリファイル(マルウェアではありません) • CyberChef とのコンビネーション • 使用するプラグイン: • Parsing operations -> File type • Compression operation -> XZ decompress • Misc operations -> Send to 25/28
  • 27. Bluebox @ CODE BLUE 2019 デモ 5 26/28 可読化前: 可読化後:
  • 28. Bluebox @ CODE BLUE 2019 まとめ • FileInsight-plugins は FileInsight バイナリエディタをアイアン マンスーツのようにもっとパワフルにします • マルウェア解析における様々なデコード作業に便利 • 入手はこちら https://github.com/nmantani/FileInsight-plugins • フィードバックをお待ちしています!(プルリクエスト、 バグレポート、機能追加の要望) 27/28
  • 29. Bluebox @ CODE BLUE 2019Bluebox @ CODE BLUE 2019 ありがとうございました! スライドは私の GitHub リポジトリからダウンロードできます: https://github.com/nmantani/FileInsight-plugins 28/28 このスライドは Twitter 社によって CC-BY 4.0 でライセンスされて いる Twemoji を使用しています。 https://twemoji.twitter.com/
  • 30. Bluebox @ CODE BLUE 2019Bluebox @ CODE BLUE 2019 付録
  • 31. Bluebox @ CODE BLUE 2019 FileInsight の API 関数の一覧 • getLength() • getByteAt() • setByteAt() • setBookmark() • getSelection() • getSelectionOffset() • getSelectionLength() • gotoBookmark() • download() • newDocument() • showSimpleDialog() • decode() 関数の詳細については FileInsight のヘルプをご覧ください。
  • 32. Bluebox @ CODE BLUE 2019 FileInsight の API 関数の一覧 • getDocument() • setDocument() • getDocumentName() • getDocumentCount() • getDocumentURL() • activateDocumentAt() 関数の詳細については FileInsight のヘルプをご覧ください。
  • 33. Bluebox @ CODE BLUE 2019 プラグインのサンプルコード # 選択した部分又はファイル全体を新しいタブで開く length = getSelectionLength() # 選択部分のサイズを取得 if length > 0: data = getSelection() # 選択部分のデータを取得 else: data = getDocument() # ファイル全体のデータを取得 newDocument(“New file”, 1) # hex view モードで新しいタブを開く setDocument(data) # データを新しいタブにコピーする