Skip to content
KitploitKITPLOIT
ツールエクスプロイトブログ
Log in
提出
ツールエクスプロイトブログ
提出

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

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

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

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
SuperMega — 実行ファイルにシェルコードをステルス状に注入する | Kitploit
ツール/GitHubGitHub/dobin/supermega
永続化メカニズムエクスプロイトIDS/IPS回避シェルコードマルウェア分析ペネトレーションテストレッドチーミングシェルコード生成ペイロード開発バイナリエクスプロイト
GitHubdobin/supermega

SuperMega

490831年前Kitploit レビュー済み

人気

すべて見る →

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

すべてのツールを探索

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

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

実行ファイルにシェルコードをステルス状に注入する

リポジトリを見る

SuperMega - Cordyceps実装

Ophiocordyceps camponoti-balzaniは、ハチ目(主にアリ)の昆虫宿主に寄生する真菌の一種です。 O. camponoti-balzaniはアリに感染し、最終的に宿主が真菌の胞子を拡散するのに理想的な場所へ移動した後に宿主を殺します。

概要

SuperMegaはシェルコードローダーです。ペイロードのシェルコードを正規の実行ファイル(.exeまたは.dll)に注入します。

ローダー/キャリアのシェルコードは.exeに密接に統合されるため、静的解析でexeが感染していることを見抜くのは困難です。静的解析では正規のexeの痕跡しか見えません。

また、最新のアンチEDRメカニズムを使用しているため、シェルコードのロードが検出される可能性が低くなります。

機能:

  • XORによるペイロードの暗号化
  • 実行ガードレールにより、ペイロードはターゲット上でのみ復号される
  • アンチエミュレーション:メモリ内のペイロードを検出するAVエミュレータへの対策
  • EDRデコンディショナー:EDRのメモリスキャンへの対策
  • 実行ファイルの元のプロパティ(インポート、メタデータなど)をすべて保持し、ヒューリスティックに対抗
  • main関数ハイジャックによるコード実行で静的解析に対抗
  • キャリアはPEBウォークを行わず、IATを再利用してWindows API関数を実行(Cordycepsテクニック)

参考資料:

  • スライド HITB2024 BKK「My first and last shellcode loader」
  • ブログ Supermega Loader
  • ブログ Cordyceps File injection techniques

SuperMega

使用準備

SuperMegaはVS2022コンパイラに依存しています。

web.pyまたはsupermega.pyを実行するには、x64 native tools command promptを起動してください。

あるいは、VSCなど既存のシェルを使用したい場合は次のとおりです:

powershellで:

> cmd.exe /k "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64

cmd 内:

> call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64

必要に応じてパスを調整してください。これにより、キャリアシェルコードのコンパイルに必要な cl.exe と Windows.h が利用可能になります。

Web での使用方法

> ./web.py

http://localhost:5001 にアクセスします。

使用法 コマンドライン

calc64.bin シェルコードを procexp64.exe にインジェクトする例:

PS C:\Users\dobin\Repos\SuperMega> cmd.exe /k "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.12.4
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

C:\Users\dobin\Repos\SuperMega>python.exe supermega.py
(helper.py       ) Write project to: projects/commandline/project.pickle
(project.py      ) -[ Cleanup project: commandline
(payload.py      ) -[ Payload: data/binary/shellcodes/calc64.bin
(payload.py      )     Size: 272 bytes
(templater.py    ) -[ Carrier create Template: projects/commandline/main.c
(templater.py    )     Carrier: alloc_rw_rx
(templater.py    )     Carrier: Code into: .text
(templater.py    )     Carrier: Decoder: xor_2
(templater.py    )     Carrier: Invoker: backdoor Entrypoint
(templater.py    )     Carrier AntiEmulation: sirallocalot
(templater.py    )     Carrier Guardrail: none
(templater.py    )     Carrier Decoy: none
(compiler.py     ) -[ Carrier: Compile C to ASM
(compiler.py     )     Carrier: projects/commandline/main.c -> projects/commandline/main.asm
(helper.py       )    > Run process: cl.exe /c /FA /GS- /Faprojects/commandline/ projects/commandline/main.c
(assembler.py    ) -[ Carrier: ASM to EXE
(assembler.py    )     Carrier: projects/commandline/main.asm -> projects/commandline/main.exe
(helper.py       )    > Run process: ml64.exe projects/commandline/main.asm /link /OUT:projects/commandline/main.exe /entry:AlignRSP
(assembler.py    )     Carrier Size: 590
(injector.py     ) -[ Injecting Carrier
(injector.py     )     Injectable: data/binary/injectables/procexp64.exe -> projects/commandline/procexp64.infected.exe
(injector.py     )     Checking if IAT entries required by carrier are available
(injector.py     )     IAT entries missing: 0
(injector.py     )     Inject: Write Carrier to 0x71C8D (0x7108D)
(injector.py     )     Backdoor function at entrypoint (0xE1D78)
(injector.py     )     Inject Carrier data into injectable .rdata/.text
(injector.py     )     Patch Carrier code to reference the injected data
(injector.py     ) -[ Write to file: projects/commandline/procexp64.infected.exe

> C:\Users\dobin\Repos\SuperMega>.\projects\commandline\procexp64.infected.exe

messagebox.bin シェルコードを、キャリア alloc_rw_rx とデコーダ xor_1 を使用して、注入可能な procexp64.exe に注入するには、以下を使用します:

  • シェルコード messagebox.bin: data/binary/shellcodes/messagebox.bin
  • 注入可能な procexp64.exe: data/binary/injectables/procexp64.exe
  • キャリア alloc_rw_rx: data/source/carrier/alloc_rw_rx/template.c
  • デコーダ xor_1: data/source/decoder/xor_1.c
> python.exe supermega.py --shellcode messagebox.bin --inject procexp64.exe --carrier alloc_rw_rx --decoder xor_1 
(helper.py       ) Write project to: projects/commandline/project.pickle
(project.py      ) -[ Cleanup project: commandline
(payload.py      ) -[ Payload: data/binary/shellcodes/messagebox.bin
(payload.py      )     Size: 433 bytes
(templater.py    ) -[ Carrier create Template: projects/commandline/main.c
(templater.py    )     Carrier: alloc_rw_rx
(templater.py    )     Carrier: Code into: .text
(templater.py    )     Carrier: Decoder: xor_1
(templater.py    )     Carrier: Invoker: backdoor Entrypoint
(templater.py    )     Carrier AntiEmulation: sirallocalot
(templater.py    )     Carrier Guardrail: none
(templater.py    )     Carrier Decoy: none
(compiler.py     ) -[ Carrier: Compile C to ASM
(compiler.py     )     Carrier: projects/commandline/main.c -> projects/commandline/main.asm
(helper.py       )    > Run process: cl.exe /c /FA /GS- /Faprojects/commandline/ projects/commandline/main.c
(assembler.py    ) -[ Carrier: ASM to EXE
(assembler.py    )     Carrier: projects/commandline/main.asm -> projects/commandline/main.exe
(helper.py       )    > Run process: ml64.exe projects/commandline/main.asm /link /OUT:projects/commandline/main.exe /entry:AlignRSP
(assembler.py    )     Carrier Size: 576
(injector.py     ) -[ Injecting Carrier
(injector.py     )     Injectable: data/binary/injectables/procexp64.exe -> projects/commandline/procexp64.infected.exe
(injector.py     )     Checking if IAT entries required by carrier are available
(injector.py     )     IAT entries missing: 0
(injector.py     )     Inject: Write Carrier to 0x71C43 (0x71043)
(injector.py     )     Backdoor function at entrypoint (0xE1D78)
(injector.py     )     Inject Carrier data into injectable .rdata/.text
(injector.py     )     Patch Carrier code to reference the injected data
(injector.py     ) -[ Write to file: projects/commandline/procexp64.infected.exe

> C:\Users\dobin\Repos\SuperMega>.\projects\commandline\procexp64.infected.exe

ディレクトリ

入力:

  • data/binary/shellcodes: 入力: 入力(ペイロード)として使用するシェルコード。.bin
  • data/binary/injectables/: 入力: インジェクション先となる無害な EXE ファイル。.exe

出力:

  • projects/<projectname>: 出力: 生成されたファイル(感染した exe を含む)を含むプロジェクトディレクトリ
  • projects/default: 出力: Web からのすべてのファイルを含むプロジェクトディレクトリ
  • projects/commandline: 出力: コマンドラインからのすべてのファイルを含むプロジェクトディレクトリ

変更可能:

  • data/source/carrier: 実際にペイロードをデコードして実行するもの(alloc_rw_rx、alloc_rx_rwx、...)
  • data/source/antiemulation: AV エミュレータを諦めさせるためのさまざまな実装(sirallocalot、timeraw、...)
  • data/source/decoder: ペイロードの復号化(xor、xor2)
  • data/source/guardrails: 実行ガードレールの例(env)
  • data/source/virtualprotect: virtualprotect を使ったお遊び

インストール

アップグレード時は projects/ をクリアしてください。

VS2022 コンパイラが必要です:

  • ml64.exe
  • cl.exe

さらに以下の Python パッケージ:

> pip.exe install -r requirements.txt

Visual Studio 2022 で必要となる可能性があるパッケージ/コンポーネントの一覧:

  • C++ 2022 再頒布可能パッケージ Update
  • C++ Build Insights
  • Windows 用 C++ CMake ツール
  • v143 ビルドツール用 C++ /CLI サポート (最新)
  • MSBuild
  • MSVC v133 - VS 2002 C++ x64/x86 ビルドツール (最新)
  • 最新の v143 ビルドツール用 C++ ATL (x86 & x64)
  • 最新の v143 ビルドツール用 C++ MFC (x86 & x64)
  • Windows 11 SDK

オプション:

  • r2.exe

設定 & OPSEC

機能と設定の説明。

シェルコード / ペイロード

--shellcode <filename.bin>
CobaltStrike ビーコンなどの 64 ビット ペイロード シェルコード。x64 である必要があります。
data/binary/shellcodes/*.bin ディレクトリに配置されます。

ツールをダウンロード