SlideShare a Scribd company logo
1 of 33
Download to read offline
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) # データを新しいタブにコピーする

More Related Content

What's hot

台科逆向簡報
台科逆向簡報台科逆向簡報
台科逆向簡報耀德 蔡
 
Paul Angus - CloudStack Backup and Recovery Framework
Paul Angus - CloudStack Backup and Recovery FrameworkPaul Angus - CloudStack Backup and Recovery Framework
Paul Angus - CloudStack Backup and Recovery FrameworkShapeBlue
 
Monitoring Oracle Database Instances with Zabbix
Monitoring Oracle Database Instances with ZabbixMonitoring Oracle Database Instances with Zabbix
Monitoring Oracle Database Instances with ZabbixGerger
 
How to Take Advantage of Optimizer Improvements in MySQL 8.0
How to Take Advantage of Optimizer Improvements in MySQL 8.0How to Take Advantage of Optimizer Improvements in MySQL 8.0
How to Take Advantage of Optimizer Improvements in MySQL 8.0Norvald Ryeng
 
Protected Process Light will be Protected – MemoryRanger Fills the Gap Again
Protected Process Light will be Protected – MemoryRanger Fills the Gap AgainProtected Process Light will be Protected – MemoryRanger Fills the Gap Again
Protected Process Light will be Protected – MemoryRanger Fills the Gap AgainIgor Korkin
 
MySQLレプリケーションあれやこれや
MySQLレプリケーションあれやこれやMySQLレプリケーションあれやこれや
MySQLレプリケーションあれやこれやyoku0825
 
Defending against Java Deserialization Vulnerabilities
 Defending against Java Deserialization Vulnerabilities Defending against Java Deserialization Vulnerabilities
Defending against Java Deserialization VulnerabilitiesLuca Carettoni
 
Serverspecの活用tips紹介
Serverspecの活用tips紹介Serverspecの活用tips紹介
Serverspecの活用tips紹介Daisuke Ikeda
 
Apache Avro vs Protocol Buffers
Apache Avro vs Protocol BuffersApache Avro vs Protocol Buffers
Apache Avro vs Protocol BuffersSeiya Mizuno
 
Innodb에서의 Purge 메커니즘 deep internal (by 이근오)
Innodb에서의 Purge 메커니즘 deep internal (by  이근오)Innodb에서의 Purge 메커니즘 deep internal (by  이근오)
Innodb에서의 Purge 메커니즘 deep internal (by 이근오)I Goo Lee.
 
ストリーム処理におけるApache Avroの活用について(NTTデータ テクノロジーカンファレンス 2019 講演資料、2019/09/05)
ストリーム処理におけるApache Avroの活用について(NTTデータ テクノロジーカンファレンス 2019 講演資料、2019/09/05)ストリーム処理におけるApache Avroの活用について(NTTデータ テクノロジーカンファレンス 2019 講演資料、2019/09/05)
ストリーム処理におけるApache Avroの活用について(NTTデータ テクノロジーカンファレンス 2019 講演資料、2019/09/05)NTT DATA Technology & Innovation
 
VMs All the Way Down (BSides Delaware 2016)
VMs All the Way Down (BSides Delaware 2016)VMs All the Way Down (BSides Delaware 2016)
VMs All the Way Down (BSides Delaware 2016)John Hubbard
 
OS X Drivers Reverse Engineering
OS X Drivers Reverse EngineeringOS X Drivers Reverse Engineering
OS X Drivers Reverse EngineeringPositive Hack Days
 
Sigreturn Oriented Programming
Sigreturn Oriented ProgrammingSigreturn Oriented Programming
Sigreturn Oriented ProgrammingAngel Boy
 
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
"15 Technique to Exploit File Upload Pages", Ebrahim HegazyHackIT Ukraine
 
[2018] MySQL 이중화 진화기
[2018] MySQL 이중화 진화기[2018] MySQL 이중화 진화기
[2018] MySQL 이중화 진화기NHN FORWARD
 

What's hot (20)

B-link-tree
B-link-treeB-link-tree
B-link-tree
 
台科逆向簡報
台科逆向簡報台科逆向簡報
台科逆向簡報
 
Paul Angus - CloudStack Backup and Recovery Framework
Paul Angus - CloudStack Backup and Recovery FrameworkPaul Angus - CloudStack Backup and Recovery Framework
Paul Angus - CloudStack Backup and Recovery Framework
 
Monitoring Oracle Database Instances with Zabbix
Monitoring Oracle Database Instances with ZabbixMonitoring Oracle Database Instances with Zabbix
Monitoring Oracle Database Instances with Zabbix
 
How to Take Advantage of Optimizer Improvements in MySQL 8.0
How to Take Advantage of Optimizer Improvements in MySQL 8.0How to Take Advantage of Optimizer Improvements in MySQL 8.0
How to Take Advantage of Optimizer Improvements in MySQL 8.0
 
Protected Process Light will be Protected – MemoryRanger Fills the Gap Again
Protected Process Light will be Protected – MemoryRanger Fills the Gap AgainProtected Process Light will be Protected – MemoryRanger Fills the Gap Again
Protected Process Light will be Protected – MemoryRanger Fills the Gap Again
 
MySQLレプリケーションあれやこれや
MySQLレプリケーションあれやこれやMySQLレプリケーションあれやこれや
MySQLレプリケーションあれやこれや
 
Defending against Java Deserialization Vulnerabilities
 Defending against Java Deserialization Vulnerabilities Defending against Java Deserialization Vulnerabilities
Defending against Java Deserialization Vulnerabilities
 
Serverspecの活用tips紹介
Serverspecの活用tips紹介Serverspecの活用tips紹介
Serverspecの活用tips紹介
 
Docker Swarm入門
Docker Swarm入門Docker Swarm入門
Docker Swarm入門
 
Apache Avro vs Protocol Buffers
Apache Avro vs Protocol BuffersApache Avro vs Protocol Buffers
Apache Avro vs Protocol Buffers
 
Innodb에서의 Purge 메커니즘 deep internal (by 이근오)
Innodb에서의 Purge 메커니즘 deep internal (by  이근오)Innodb에서의 Purge 메커니즘 deep internal (by  이근오)
Innodb에서의 Purge 메커니즘 deep internal (by 이근오)
 
ストリーム処理におけるApache Avroの活用について(NTTデータ テクノロジーカンファレンス 2019 講演資料、2019/09/05)
ストリーム処理におけるApache Avroの活用について(NTTデータ テクノロジーカンファレンス 2019 講演資料、2019/09/05)ストリーム処理におけるApache Avroの活用について(NTTデータ テクノロジーカンファレンス 2019 講演資料、2019/09/05)
ストリーム処理におけるApache Avroの活用について(NTTデータ テクノロジーカンファレンス 2019 講演資料、2019/09/05)
 
VMs All the Way Down (BSides Delaware 2016)
VMs All the Way Down (BSides Delaware 2016)VMs All the Way Down (BSides Delaware 2016)
VMs All the Way Down (BSides Delaware 2016)
 
MyRocks Deep Dive
MyRocks Deep DiveMyRocks Deep Dive
MyRocks Deep Dive
 
OS X Drivers Reverse Engineering
OS X Drivers Reverse EngineeringOS X Drivers Reverse Engineering
OS X Drivers Reverse Engineering
 
Automated master failover
Automated master failoverAutomated master failover
Automated master failover
 
Sigreturn Oriented Programming
Sigreturn Oriented ProgrammingSigreturn Oriented Programming
Sigreturn Oriented Programming
 
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
 
[2018] MySQL 이중화 진화기
[2018] MySQL 이중화 진화기[2018] MySQL 이중화 진화기
[2018] MySQL 이중화 진화기
 

Similar to [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 to [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
 

More from 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
 

More from 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) # データを新しいタブにコピーする