
Test di penetrazione di applicazioni web in Go
GOWAPT è il fratello minore di wfuzz, un coltellino svizzero dei WAPT, permette ai penetration tester di svolgere attività massive senza alcuno stress, basta configurarlo ed è questione di click.
Per installare gowapt basta digitare:
make
sudo make install
Dal menu -h
Usage of gowapt:
-H value
A list of additional headers
-a string
Basic authentication (user:password)
-c string
A list of cookies
-d string
POST data for request
-e string
A list of comma separated encoders (default "plain")
-f string
Filter the results
-from-proxy
Get the request via a proxy server
-fuzz
Use the built-in fuzzer
-p string
Use upstream proxy
-plugin-dir string
Directory containing all scanning module
-scanner
Run in scanning mode
-ssl
Use SSL
-t string
Template for request
-threads int
Number of threads (default 10)
-u string
URL to fuzz
-w string
Wordlist file
-x string
Extension file example.js
Esempi
Scansiona http://www.example.com e filtra tutte le richieste 200 OK
gowapt -u "http://www.example.com/FUZZ" -w wordlist/general/common.txt -f "code == 200"
Scansiona http://www.example.com fuzzando il parametro GET vuln cercando XSS (presuppone 200 tag con una richiesta legittima)
gowapt -u "http://www.example.com/?vuln=FUZZ" -w wordlist/Injections/XSS.txt -f "tags > 200"
Scansiona http://www.example.com fuzzando il parametro POST vuln cercando XSS (presuppone 200 tag con una richiesta legittima)
gowapt -u "http://www.example.com/" -d "vuln=FUZZ" -w wordlist/Injections/XSS.txt -f "tags > 200"
Scansiona http://www.example.com protetta da autenticazione e filtra tutte le richieste 200 OK
gowapt -u "http://www.example.com/FUZZ" -w wordlist/general/common.txt -f "code == 200" -a "user:password"
Scansiona http://www.example.com aggiungendo l'header Hello: world e filtra tutte le richieste 200 OK
gowapt -u "http://www.example.com/FUZZ" -w wordlist/general/common.txt -f "code == 200" -H "Hello: world"
Scansiona http://www.example.com usando l'autenticazione base con utente/password guest:guest
gowapt -u "http://www.example.com/FUZZ" -w wordlist/general/common.txt -a "guest:guest"
Scansiona http://www.example.com aggiungendo un'estensione
gowapt -u "http://www.example.com/FUZZ" -w wordlist/general/common.txt -x myextension.js
Scansiona http://www.example.com attraverso un proxy (come Burp):
gowapt -p "http://localhost:8080" -u "http://www.example.com/FUZZ" -w wordlist/general/common.txt
Scansiona http://www.example.com (ricevuta dal proxy) e filtra tutte le richieste 200 OK
gowapt --from-proxy -w wordlist/general/common.txt
Esegui la modalità scanner su http://www.example.com (ricevuta dal proxy) con i plugin predefiniti
gowapt --from-proxy --scanner --plugin-dir plugin/
Poi apri BurpSuite, invia la richiesta che vuoi fuzzare al repeater e imposta un proxy upstream verso 127.0.0.1:31337
quando sei pronto clicca su invia, se tutto è corretto dovresti vedere come risposta Request received by GOWAPT
Le estensioni sono un modo semplice per estendere le funzionalità di gowapt, una macchina virtuale JavaScript è responsabile del caricamento e dell'esecuzione dei file di estensione.
Di seguito l'elenco delle API attualmente implementate
* PS: Quando si utilizza setHTTPInterceptor, il metodo di callback riceve 3 parametri:
A causa della natura di sendRequestSync, rallenterà il motore a causa della richiesta sincrona, quindi usalo con moderazione
Maggiori informazioni nell'esempio di estensione qui sotto:
example.js
/*
* Create a custom encoder called helloworld
*
* This encore just add the string "_helloworld" to every payload
* coming from the wordlist
*/
addCustomEncoder("helloworld", myenc);
/*
* Define the callback method for the helloworld encoder
*/
function myenc(data) {
return data + "_helloword";
}
/*
* Create an HTTP interceptor
*
* The interceptor will hook every request / response
* is possible to modify request before send it, anyway the respose item
* it's just shadow copy of the one received from the server so no modification
* are possible
*
*
* request_response is an object which may contains both http.Request
* or http.Response , to know which on is contained check is_request flag
*
* REMEMBER! request_response is an http.* object so you must interact with
* this one just like you would do in golang!
*
* dumpResponse is a built-in function which dump full request-response to
* disk.
* result is an object filled with stats about the response it contains some fields
*
* result.tags => Number of tags in the response
* result.code => HTTP Response status
* result.words => Number of words in the response
* result.lines => Number of lines in the response
* result.chars => Number of chars in the response
* result.request => Full dump of the request
* result.response => Full dump of the response
* result.response => The injected payload
*
*/
setHTTPInterceptor(function(request_response, result, is_request){
if(is_request){
request_response.Header.Set("Hello", "world")
}else{
dumpResponse(request_response, "/tmp/dump.txt")
/*
* Send an HTTP request in a synchronous way
*
* This API accept 4 parameters:
* method => GET | POST | HEAD | PUT | PATCH | UPDATE
* url => The url of the HTTP service
* post_data => The content of request bodyBytes
* headers => A javascript dictionary {headerName => headerValue}
*
* The response object may be null or undefined or an http.Response from golang
*/
var response = sendRequestSync("GET", "http://example.com/", null, {"Fake": "Header"})
}
})
Una nuova modalità chiamata Scanner è stata introdotta con l'ultimo commit, permette all'utente di creare plugin completamente personalizzabili per eseguire scansioni web attive. Per maggiori informazioni leggi la Wiki!.
Le wordlist provengono dal progetto wfuzz! quindi grazie mille ragazzi!
Di seguito l'elenco degli encoder disponibili
Puoi applicare filtri sulle seguenti variabili
gowapt è rilasciato sotto licenza GPL 3.0 ed è copyleft di Daniele 'dzonerzy' Linguaglossa
| Metodo | Numero di parametri | Descrizione | Parametri |
|---|
| addCustomEncoder | 2 | Crea un encoder personalizzato da usare con le wordlist | Param1 -> EncoderName (string) Param2 -> EncoderLogic (function) |
| panic | 1 | Per scopi di debugging, crasha l'applicazione | Param1 -> PanicText (string) |
| dumpResponse | 2 | Scarica una richiesta/risposta completa su disco, utile per salvare casi di test | Param1 -> ResponseObject (http.Response) Param2 -> Path (string) |
| setHTTPInterceptor | 1 | Crea un interceptor per richieste HTTP in uscita e risposte in entrata | Param1 -> HTTPCallback (function) * |
| sendRequestSync * | 4 | Invia una richiesta HTTP in modo sincrono | Param1 -> Method (string) Param2 -> Url (string) Param3 -> PostData (string) Param4 -> Headers (Object{Name:Value}) |