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

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

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

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

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
redis_exploit — CVE-2025-49844 (RediShell) | Kitploit
ツール/GitHubGitHub/raminfp/redis_exploit
脆弱性分析エクスプロイト学習と教育データベースセキュリティバイナリエクスプロイトラボと実践
GitHubraminfp/redis_exploit

redis_exploit

CVE-2025-49844 (RediShell)

リポジトリを見る
34366411ヶ月前Kitploit レビュー済み

人気

すべて見る →

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

すべてのツールを探索

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

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

CVE-2025-49844 (RediShell) - ラボ環境

Redis の深刻な CVE-2025-49844 (RediShell) 脆弱性をテストおよび理解するための実用的なラボ環境です。

⚠️ 警告

これは教育目的のみです!

  • 所有しているシステム、またはテストする明示的な許可を得たシステムでのみ使用してください
  • インターネットに公開しないでください
  • 本番環境では使用しないでください

脆弱性について

  • CVE ID: CVE-2025-49844
  • 名前: RediShell
  • CVSS スコア: 10.0 (緊急)
  • タイプ: Lua インタプリタにおける Use-After-Free (UAF)
  • 影響: リモートコード実行 (RCE)
  • 発見者: Wiz Research Team

影響を受けるバージョン

以下のバージョンより前のすべての Redis バージョン:

  • Redis 8.2.2
  • Redis 8.0.4
  • Redis 7.4.6
  • Redis 7.2.11

このラボでは Redis 7.2.0 (脆弱なバージョン) を使用します。

クイックスタート

前提条件

root@kitploit:~
# Install Docker and Docker Compose
sudo apt-get update
sudo apt-get install docker.io docker-compose

# Install Python dependencies
pip install redis colorama

セットアップと実行

root@kitploit:~
# 1. Start vulnerable Redis instance
docker-compose up -d

# 2. Wait a few seconds for Redis to start
sleep 5

# 3. Verify Redis is running
docker-compose ps

# 4. Run the exploit
python3 exploit_poc.py -H localhost -p 6380 -m all

使用方法

基本コマンド

root@kitploit:~
# Check vulnerability only
python3 exploit_poc.py -H localhost -p 6380 -m check

# Run basic UAF test
python3 exploit_poc.py -H localhost -p 6380 -m basic

# Test sandbox escape
python3 exploit_poc.py -H localhost -p 6380 -m sandbox

# Test advanced memory corruption
python3 exploit_poc.py -H localhost -p 6380 -m advanced

# Run all tests
python3 exploit_poc.py -H localhost -p 6380 -m all

# With authentication
python3 exploit_poc.py -H localhost -p 6380 -a "password" -m all

Docker 管理

root@kitploit:~
# View logs
docker-compose logs -f

# Connect to Redis CLI
docker-compose exec redis-vulnerable redis-cli

# Stop the lab
docker-compose down

# Remove everything (including volumes)
docker-compose down -v

期待される出力

テスト成功時 (脆弱なバージョン)

root@kitploit:~
╔═══════════════════════════════════════════════════════════╗
║          CVE-2025-49844 (RediShell) PoC                  ║
║          Use-After-Free in Redis Lua Interpreter         ║
║          CVSS Score: 10.0 (CRITICAL)                     ║
╚═══════════════════════════════════════════════════════════╝

[*] Testing connection to localhost:6380...
[+] Connected successfully!
[i] Redis Version: 7.2.0
[*] Checking if Lua scripting is enabled...
[+] Lua scripting is enabled!

[*] Checking vulnerability status...
[i] Detected Redis version: 7.2.0
[!] VULNERABLE: This version is affected by CVE-2025-49844
[!] Update to the latest patched version immediately!

[*] Attempting basic UAF trigger...
[+] Lua script executed: UAF pattern executed
[!] UAF pattern triggered (simplified demo)

[*] Testing Lua sandbox boundaries...
[*] Testing os.execute...
[+] Protected: os.execute blocked
[*] Testing io.popen...
[+] Protected: io.popen blocked
[*] Testing loadfile...
[+] Protected: loadfile blocked
[*] Testing package.loadlib...
[+] Protected: package.loadlib blocked

[*] Attempting memory corruption pattern...
[+] Memory corruption pattern executed: Memory corruption pattern completed
[!] In vulnerable versions, this could lead to RCE!

============================================================
[*] PoC execution completed
============================================================

脆弱性の仕組み

攻撃フロー

  1. Redis に接続 (認証ありまたは認証なし)
  2. EVAL コマンドで悪意のある Lua スクリプトを送信
  3. ガベージコレクションを通じて Use-After-Free を誘発
  4. Lua サンドボックスをエスケープして制限された関数にアクセス
  5. サンドボックス外で任意のネイティブコードを実行
  6. ホストへの完全なアクセスを取得 (データの窃取、マルウェアのインストールなど)

技術的詳細

この脆弱性は、Redis の Lua インタプリタに存在する 13 年前の Use-After-Free バグを悪用します:

  • メモリ破壊: ガベージコレクション中の不適切なメモリ管理
  • サンドボックスエスケープ: Lua サンドボックスの制限を回避
  • コード実行: 任意のシステムコマンドを実行
  • 完全な侵害: ホストシステムへの完全なアクセス

セキュリティ推奨事項

1. 直ちに更新する

root@kitploit:~
# Pull latest patched version
docker pull redis:8.2.2
# or
docker pull redis:7.4.6

2. 安全な設定

root@kitploit:~
# /etc/redis/redis.conf

# Enable authentication
requirepass your_strong_password_here

# Restrict network access
bind 127.0.0.1 ::1
protected-mode yes

# Disable dangerous commands
rename-command FLUSHDB ""
rename-command FLUSHALL ""
rename-command CONFIG ""
rename-command EVAL ""
rename-command EVALSHA ""

# Enable logging
loglevel notice
logfile /var/log/redis/redis-server.log

3. Redis ACL を使用する

root@kitploit:~
# Disable Lua scripting for specific users
redis-cli ACL SETUSER myuser -@scripting

# Create limited user
redis-cli ACL SETUSER limited on >password ~* +@read +@write -@scripting

4. ネットワークセキュリティ

root@kitploit:~
# Use firewall rules
sudo ufw allow from 192.168.1.0/24 to any port 6379
sudo ufw deny 6379

# Or use iptables
sudo iptables -A INPUT -p tcp --dport 6379 -s 192.168.1.0/24 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 6379 -j DROP

トラブルシューティング

ポートがすでに使用されている場合

root@kitploit:~
# Check what's using the port
sudo lsof -i :6380

# Or change port in docker-compose.yml
# ports:
#   - "6381:6379"

Python モジュールが見つからない場合

root@kitploit:~
# Install required packages
pip install redis colorama

# Or use virtual environment
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Docker の権限が拒否された場合

root@kitploit:~
# Add user to docker group
sudo usermod -aG docker $USER

# Then logout and login again

Redis が起動しない場合

root@kitploit:~
# Check logs
docker-compose logs

# Restart container
docker-compose restart

# Rebuild image
docker-compose up -d --build

プロジェクト構成

root@kitploit:~
redis_exploit/
├── Dockerfile              # Redis 7.2.0 vulnerable instance
├── docker-compose.yml      # Docker Compose configuration
├── exploit_poc.py          # Main exploit script
├── requirements.txt        # Python dependencies
├── .gitignore             # Git ignore file
└── README.md              # This file

参照

  • Wiz Research Blog - RediShell
  • BleepingComputer Article
  • Redis Security Advisory

免責事項

この PoC は簡略化されており、教育目的のみです。実際の CVE-2025-49844 エクスプロイトには複雑なメモリ操作が含まれます。Redis インスタンスは常に最新バージョンにパッチしてください!

ツールをダウンロード