Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
XLMMacroDeobfuscator — XLMマクロ(別名 Excel 4.0 マクロ)を抽出および難読化解除する | Kitploit
ツール/GitHubGitHub/dissectmalware/xlmmacrodeobfuscator
静的分析動的分析 (サンドボックス)リバースエンジニアリングマルウェア分析
GitHubdissectmalware/xlmmacrodeobfuscator

XLMMacroDeobfuscator

XLMマクロ(別名 Excel 4.0 マクロ)を抽出および難読化解除する

リポジトリを見る
5871184年前Kitploit レビュー済み

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有

XLMMacroDeobfuscator

XLMMacroDeobfuscator は、難読化されたXLMマクロ(Excel 4.0マクロとも呼ばれます)をデコードするために使用できます。内部のXLMエミュレータを利用して、マクロを完全に実行せず解釈します。

xls、xlsm、xlsbの各形式をサポートしています。

セルの抽出やその他の情報の取得には、xlsファイルには xlrd2、xlsbファイルには pyxlsb2、xlsmファイルには独自のパーサーをそれぞれ使用します。

XLM文法は xlm-macro-lark.template でも確認できます。

エミュレータのインストール

  1. pipを使用してインストール
root@kitploit:~
pip install XLMMacroDeobfuscator --force

または

root@kitploit:~
pip install xlmmacrodeobfuscator[defusedxml] --force
  1. 最新開発版のインストール
root@kitploit:~
pip install -U https://github.com/DissectMalware/XLMMacroDeobfuscator/archive/master.zip --force

エミュレータの実行

Excel文書内のマクロを難読化解除するには:

root@kitploit:~
xlmdeobfuscator --file document.xlsm

Excel文書からマクロのみを抽出するには(難読化解除なし):

root@kitploit:~
xlmdeobfuscator --file document.xlsm -x

難読化解除されたマクロのみをインデントなしで取得するには:

root@kitploit:~
xlmdeobfuscator --file document.xlsm --no-indent --output-formula-format "[[INT-FORMULA]]"

出力をJSON形式でエクスポートするには:

root@kitploit:~
xlmdeobfuscator --file document.xlsm --export-json result.json

JSON出力のサンプルはこのリンクを参照してください。

設定ファイルを使用するには:

root@kitploit:~
xlmdeobfuscator --file document.xlsm -c default.config

default.configファイルは以下のような有効なJSONファイルである必要があります:

root@kitploit:~
{
	"no-indent": true,
	"output-formula-format": "[[CELL-ADDR]] [[INT-FORMULA]]",
	"non-interactive": true,
	"output-level": 1
}

コマンドライン

root@kitploit:~

          _        _______
|\     /|( \      (       )
( \   / )| (      | () () |
 \ (_) / | |      | || || |
  ) _ (  | |      | |(_)| |
 / ( ) \ | |      | |   | |
( /   \ )| (____/\| )   ( |
|/     \|(_______/|/     \|
   ______   _______  _______  ______   _______           _______  _______  _______ _________ _______  _______
  (  __  \ (  ____ \(  ___  )(  ___ \ (  ____ \|\     /|(  ____ \(  ____ \(  ___  )\__   __/(  ___  )(  ____ )
  | (  \  )| (    \/| (   ) || (   ) )| (    \/| )   ( || (    \/| (    \/| (   ) |   ) (   | (   ) || (    )|
  | |   ) || (__    | |   | || (__/ / | (__    | |   | || (_____ | |      | (___) |   | |   | |   | || (____)|
  | |   | ||  __)   | |   | ||  __ (  |  __)   | |   | |(_____  )| |      |  ___  |   | |   | |   | ||     __)
  | |   ) || (      | |   | || (  \ \ | (      | |   | |      ) || |      | (   ) |   | |   | |   | || (\ (
  | (__/  )| (____/\| (___) || )___) )| )      | (___) |/\____) || (____/\| )   ( |   | |   | (___) || ) \ \__
  (______/ (_______/(_______)|/ \___/ |/       (_______)\_______)(_______/|/     \|   )_(   (_______)|/   \__/

    
XLMMacroDeobfuscator(v0.2.0) - https://github.com/DissectMalware/XLMMacroDeobfuscator

Error: --file is missing

usage: deobfuscator.py [-h] [-c FILE_PATH] [-f FILE_PATH] [-n] [-x]
                       [--sort-formulas] [--defined-names] [-2]
                       [--with-ms-excel] [-s] [-d DAY]
                       [--output-formula-format OUTPUT_FORMULA_FORMAT]
                       [--extract-formula-format EXTRACT_FORMULA_FORMAT]
                       [--no-indent] [--silent] [--export-json FILE_PATH]
                       [--start-point CELL_ADDR] [-p PASSWORD]
                       [-o OUTPUT_LEVEL] [--timeout N]

optional arguments:
  -h, --help            show this help message and exit
  -c FILE_PATH, --config-file FILE_PATH
                        Specify a config file (must be a valid JSON file)
  -f FILE_PATH, --file FILE_PATH
                        The path of a XLSM file
  -n, --noninteractive  Disable interactive shell
  -x, --extract-only    Only extract cells without any emulation
  --sort-formulas       Sort extracted formulas based on their cell address
                        (requires -x)
  --defined-names       Extract all defined names
  -2, --no-ms-excel     [Deprecated] Do not use MS Excel to process XLS files
  --with-ms-excel       Use MS Excel to process XLS files
  -s, --start-with-shell
                        Open an XLM shell before interpreting the macros in
                        the input
  -d DAY, --day DAY     Specify the day of month
  --output-formula-format OUTPUT_FORMULA_FORMAT
                        Specify the format for output formulas ([[CELL-ADDR]],
                        [[INT-FORMULA]], and [[STATUS]]
  --extract-formula-format EXTRACT_FORMULA_FORMAT
                        Specify the format for extracted formulas ([[CELL-
                        ADDR]], [[CELL-FORMULA]], and [[CELL-VALUE]]
  --no-indent           Do not show indent before formulas
  --silent              Do not print output
  --export-json FILE_PATH
                        Export the output to JSON
  --start-point CELL_ADDR
                        Start interpretation from a specific cell address
  -p PASSWORD, --password PASSWORD
                        Password to decrypt the protected document
  -o OUTPUT_LEVEL, --output-level OUTPUT_LEVEL
                        Set the level of details to be shown (0:all commands,
                        1: commands no jump 2:important commands 3:strings in
                        important commands).
  --timeout N           stop emulation after N seconds (0: not interruption
                        N>0: stop emulation after N seconds)

ライブラリ

以下の例は、XLMMacroDeobfuscatorをPythonプロジェクトで使用してXLMマクロを難読化解除する方法を示しています。

root@kitploit:~
from XLMMacroDeobfuscator.deobfuscator import process_file

result = process_file(file='path/to/an/excel/file', 
            noninteractive= True, 
            noindent= True, 
            output_formula_format='[[CELL-ADDR]], [[INT-FORMULA]]',
            return_deobfuscated= True,
            timeout= 30)

for record in result:
    print(record)
  • 注意: ライブラリとして使用する場合、xlmdeobfuscatorのロゴは表示されません。

必要条件

requirements.txtを参照して、XLMMacroDeobfuscatorが依存するPythonライブラリの一覧を確認してください。

xlmdeobfuscatorは任意のOSで実行でき、xls、xlsm、xlsbファイルからマクロを抽出および難読化解除できます。MS Excelのインストールは不要です。

注意: MS Excel(Windows)を使用する場合は、pywin32ライブラリをインストールし、--with-ms-excelスイッチを使用する必要があります。 --with-ms-excelを使用すると、xlmdeobfuscatorはまずMS Excelでxlsファイルの読み込みを試み、失敗した場合にはxlrd2ライブラリを使用します。

XLMMacroDeobfuscator を使用しているプロジェクト

XLMMacroDeobfuscator は以下のプロジェクトで採用されています。

  • CAPE Sandbox
  • FAME
  • REMNUX
  • IntelOwl
  • Assemblyline 4 (カナダサイバーセキュリティセンター提供)
  • oletools(@decalage2 提供)

XLMMacroDeobfuscatorをプロジェクトに組み込んだ場合は、ご連絡ください。

貢献方法

バグを見つけた場合や改善の提案がある場合は、イシューページで新しいイシューを作成してください。

プロジェクトをフォークし、プルリクエストを送信することで自由に貢献できます。

Twitterの@DissectMalwareにダイレクトメッセージでご連絡いただけます。

ツールをダウンロード