rbasefind
1.0.0
@mncoppolaのbasefind.py& @rsaxvcのbasefind.cppに基づいたブルートフォースベースアドレススキャナー。
フラットの32ビットバイナリファイルをスキャンし、画像のベースアドレスを計算しようとします。 ASCIIの英語の文字列を探し、32ビットのすべての単語の最大の交差点を見つけ、文字列のポインターとオフセットとして解釈されます。
これは、一部の腕(親指以外の)バイナリでかなりうまく機能します。これは、ターゲットバイナリから可能な限りファイルに関する情報をほとんど使用しようとする非常に単純な発ヒューリスティックです。そのため、奇跡を起こすことはありません。
Scan a flat 32-bit binary and attempt to brute-force the base address via string/pointer comparison. Based on the
excellent basefind.py by mncoppola.
USAGE:
rbasefind [FLAGS] [OPTIONS] <INPUT>
FLAGS:
-b, --bigendian Interpret as big-endian (default is little)
-h, --help Prints help information
-p, --progress Show progress
-V, --version Prints version information
OPTIONS:
-n, --maxmatches <LEN> Maximum matches to display (default is 10)
-m, --minstrlen <LEN> Minimum string search length (default is 10)
-o, --offset <LEN> Scan every N (power of 2) addresses. (default is 0x1000)
-t, --threads <NUM_THREADS> # of threads to spawn. (default is # of cpu cores)
ARGS:
<INPUT> The input binary to scan
time ./rbasefind fw.bin
Located 2355 strings
Located 372822 pointers
Scanning with 8 threads...
0x00002000: 2195
0x00001000: 103
0x00000000: 102
0x00003000: 101
0x00004000: 90
0x45e95000: 74
0x45e93000: 73
0x00006000: 64
0x00005000: 59
0x45ec3000: 58
real 0m40.937s
user 5m20.908s
sys 0m0.035s 0x00002000 、このバイナリの正しいベースアドレスでした。
大きなバイナリの場合、デフォルトのスキャンには時間がかかりすぎる場合があります。 「精度」を犠牲にして、最小文字列の長さを指定して、検索サイズをダイヤルダウンできます。つまり、
time ./target/release/rbasefind fw_all.bin -m 100
Located 7 strings
Located 372822 pointers
Scanning with 8 threads...
0x00002000: 4
0x2ae7b000: 2
0xffe54000: 1
0xfba46000: 1
0xfb9c3000: 1
0xfb80a000: 1
0xfafe6000: 1
0xfafe0000: 1
0xfae3b000: 1
0xfae13000: 1
real 0m0.149s
user 0m0.751s
sys 0m0.012s