
اختبار اختراق تطبيق ويب 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 باستخدام التعتيم على معامل GET vuln بحثًا عن XSS (افترض أنه يحتوي على 200 علامة مع طلب شرعي)
gowapt -u "http://www.example.com/?vuln=FUZZ" -w wordlist/Injections/XSS.txt -f "tags > 200"
مسح http://www.example.com باستخدام التعتيم على معامل POST vuln بحثًا عن 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 وأرسل الطلب الذي تريد تعتيمه إلى المكرر (Repeater) واضبط وكيلًا علويًا على 127.0.0.1:31337 عندما تكون جاهزًا انقر إرسال، إذا كان كل شيء صحيحًا يجب أن ترى كاستجابة Request received by GOWAPT
الإضافات هي طريقة سهلة لتوسيع ميزات gowapt، حيث تكون آلة جافاسكريبت الافتراضية مسؤولة عن تحميل وتنفيذ ملفات الإضافات.
فيما يلي قائمة بالواجهات المنفذة حاليًا
* ملاحظة: عند استخدام setHTTPInterceptor فإن طريقة الاسترجاع (callback) تستقبل 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 مع أحدث التزام (commit)، حيث يسمح للمستخدم بإنشاء إضافات قابلة للتخصيص بالكامل لإجراء مسح ويب نشط. لمزيد من المعلومات، اقرأ الويكي!
قوائم الكلمات تأتي من مشروع wfuzz! لذا شكرًا جزيلاً يا رفاق!
فيما يلي قائمة بالمشفرات المتاحة
يمكنك تطبيق مرشحات على المتغيرات التالية
gowapt صدر تحت ترخيص GPL 3.0 وهو حقوق متروكة لـ Daniele 'dzonerzy' Linguaglossa
| Method | Number of params | Description | Params |
|---|
| addCustomEncoder | 2 | إنشاء مشفر مخصص لاستخدامه مع قوائم الكلمات | المعامل1 -> اسم المشفر (نص) المعامل2 -> منطق المشفر (دالة) |
| panic | 1 | لأغراض التصحيح، تعطل التطبيق | المعامل1 -> نص الانهيار (نص) |
| dumpResponse | 2 | تفريغ طلب/استجابة كامل إلى القرص، مفيد لحفظ حالة اختبار | المعامل1 -> كائن الاستجابة (http.Response) المعامل2 -> المسار (نص) |
| setHTTPInterceptor | 1 | إنشاء معترض للطلبات الصادرة والاستجابات الواردة | المعامل1 -> دالة HTTPCallback (دالة) * |
| sendRequestSync * | 4 | إرسال طلب HTTP بطريقة متزامنة | المعامل1 -> الطريقة (نص) المعامل2 -> الرابط (نص) المعامل3 -> بيانات POST (نص) المعامل4 -> الرؤوس (كائن{الاسم:القيمة}) |