shellcode2exe.py

提供: セキュリティ
移動: 案内検索
スポンサーリンク

shellcode2exe.py とは、シェルコードを実行ファイルに変換するPythonスクリプトです。

読み方

shellcode2exe.py
しぇるこーど とぅー えくぜ ぱい

概要

デバッガは、exeやdllなどの実行ファイルの解析用ツールであるため、実行ファイルではないシェルコードを解析できません。 shellcode2exe.pyは、PythonのInlineEggが必要です。

インストール

shellcode2exe.py のダウンロード

wget http://zeltser.com/reverse-malware/shellcode2exe.py.txt
mv shellcode2exe.py.txt shellcode2exe.py
chmod +x shellcode2exe.py

FreeBSDにインストールする場合

ports コレクションからインストールする場合

cd /usr/ports/devel/py-InlineEgg
sudo make install clean

pkgコマンドでインストールする場合

sudo pkg install py-InlineEgg

portmasterコマンドでインストールする場合

sudo portmaster -y -d /usr/ports/devel/py-InlineEgg

portinstallコマンドでインストールする場合

sudo portinstall /usr/ports/devel/py-InlineEgg

使い方

% shellcode2exe.py
Shellcode to executable converter
by Mario Vilas (mvilas at gmail dot com)
 
Usage:
        shellcode2exe.py payload.bin [payload.exe]
                [--arch=i386|powerpc|sparc|arm]
                [--os=windows|linux|freebsd|openbsd|solaris]
                [-c Allow for ascii shellcode as a cmd line parameter]
                [-s Allows for ascii shellcode in file]
 
Options:
  -h, --help            show this help message and exit
  -a ARCH, --arch=ARCH  target architecture [default: i386]
  -o OS, --os=OS        target operating system [default: windows]
  -c, --asciicmd        enable ascii entry in input file
  -s, --asciifile       enable ascii entry in command line
% python shellcode2exe.py ./payload.bin
Shellcode to executable converter
by Mario Vilas (mvilas at gmail dot com)
 
Reading raw shellcode from file ./payload.bin
Generating executable file
Writing file ./payload.exe
Done.
% file payload.exe
payload.exe: PE32 executable (GUI) Intel 80386, for MS Windows

関連項目




スポンサーリンク