Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
redis_exploit — CVE-2025-49844 (RediShell) | Kitploit
도구/GitHubGitHub/raminfp/redis_exploit
Vulnerability AnalysisExploitationLearning & EducationDatabase SecurityBinary ExploitationLabs & Practice
GitHubraminfp/redis_exploit

redis_exploit

CVE-2025-49844 (RediShell)

저장소 보기
3436610개월 전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 인스턴스를 최신 버전으로 패치하세요!

도구 다운로드