
Go 웹 애플리케이션 침투 테스트
GOWAPT는 wfuzz의 동생으로, WAPT의 스위스 아미 나이프입니다. 침투 테스터가 아무런 스트레스 없이 대규모 활동을 수행할 수 있도록 해주며, 설정만 하면 클릭 몇 번으로 끝납니다.
gowapt를 설치하려면 다음을 입력하세요:
make
sudo make install
-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
예제
http://www.example.com을 스캔하고 모든 200 OK 요청을 필터링합니다.
gowapt -u "http://www.example.com/FUZZ" -w wordlist/general/common.txt -f "code == 200"
http://www.example.com을 스캔하고 vuln GET 매개변수를 퍼징하여 XSS를 찾습니다 (적법한 요청에 200 태그가 있다고 가정).
gowapt -u "http://www.example.com/?vuln=FUZZ" -w wordlist/Injections/XSS.txt -f "tags > 200"
http://www.example.com을 스캔하고 vuln POST 매개변수를 퍼징하여 XSS를 찾습니다 (적법한 요청에 200 태그가 있다고 가정).
gowapt -u "http://www.example.com/" -d "vuln=FUZZ" -w wordlist/Injections/XSS.txt -f "tags > 200"
인증으로 보호된 http://www.example.com을 스캔하고 모든 200 OK 요청을 필터링합니다.
gowapt -u "http://www.example.com/FUZZ" -w wordlist/general/common.txt -f "code == 200" -a "user:password"
http://www.example.com을 스캔하고 헤더 Hello: world를 추가한 후 모든 200 OK 요청을 필터링합니다.
gowapt -u "http://www.example.com/FUZZ" -w wordlist/general/common.txt -f "code == 200" -H "Hello: world"
http://www.example.com을 스캔하고 기본 인증(사용자/비밀번호 guest:guest)을 사용합니다.
gowapt -u "http://www.example.com/FUZZ" -w wordlist/general/common.txt -a "guest:guest"
http://www.example.com을 스캔하고 확장자를 추가합니다.
gowapt -u "http://www.example.com/FUZZ" -w wordlist/general/common.txt -x myextension.js
http://www.example.com을 프록시(예: Burp)를 통해 스캔합니다:
gowapt -p "http://localhost:8080" -u "http://www.example.com/FUZZ" -w wordlist/general/common.txt
http://www.example.com을 (프록시로부터 받은) 스캔하고 모든 200 OK 요청을 필터링합니다.
gowapt --from-proxy -w wordlist/general/common.txt
http://www.example.com에서 (프록시로부터 받은) 기본 플러그인으로 스캐너 모드를 실행합니다.
gowapt --from-proxy --scanner --plugin-dir plugin/
그런 다음 BurpSuite를 열고 퍼징하려는 요청을 리피터로 보내고 업스트림 프록시를 127.0.0.1:31337로 설정합니다. 준비가 되면 보내기를 클릭하면, 모든 것이 정상이라면 응답으로 Request received by GOWAPT가 표시됩니다.
확장 기능은 gowapt 기능을 쉽게 확장하는 방법이며, JavaScript VM이 확장 파일을 로드하고 실행하는 역할을 담당합니다.
현재 구현된 API 목록은 다음과 같습니다.
* 참고: setHTTPInterceptor를 사용할 때 콜백 메서드는 3개의 매개변수를 받습니다:
sendRequestSync의 특성상 동기 요청으로 인해 엔진 속도가 느려지므로 적당히 사용하세요.
자세한 내용은 아래의 예제 확장 파일을 참조하세요:
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"})
}
})
최신 커밋에서 Scanner라는 새로운 모드가 도입되었습니다. 이를 통해 사용자는 완전히 사용자 정의 가능한 플러그인을 만들어 능동적인 웹 스캔을 수행할 수 있습니다. 자세한 내용은 Wiki를 읽어보세요!.
워드리스트는 wfuzz 프로젝트에서 제공됩니다! 정말 감사합니다!
사용 가능한 인코더 목록
다음 변수에 필터를 적용할 수 있습니다
gowapt는 GPL 3.0 라이선스로 배포되며 Daniele 'dzonerzy' Linguaglossa의 카피레프트입니다.
| 메서드 | 매개변수 수 | 설명 | 매개변수 |
|---|
| addCustomEncoder | 2 | 사용자 정의 인코더를 생성하여 워드리스트와 함께 사용 | Param1 -> EncoderName (문자열) Param2 -> EncoderLogic (함수) |
| panic | 1 | 디버깅 목적으로 애플리케이션을 충돌시킴 | Param1 -> PanicText (문자열) |
| dumpResponse | 2 | 전체 요청/응답을 디스크에 덤프, 테스트케이스 저장에 유용 | Param1 -> ResponseObject (http.Response) Param2 -> Path (문자열) |
| setHTTPInterceptor | 1 | 나가는 HTTP 요청과 들어오는 응답에 대한 인터셉터 생성 | Param1 -> HTTPCallback (함수) * |
| sendRequestSync * | 4 | 동기 방식으로 HTTP 요청 전송 | Param1 -> Method (문자열) Param2 -> Url (문자열) Param3 -> PostData (문자열) Param4 -> Headers (Object{Name:Value}) |