mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-10 01:01:33 +00:00
Cleaned unicorn speedtest sample README
This commit is contained in:
parent
a45cdb240c
commit
34caf7d781
@ -6,6 +6,10 @@ to show the raw speed of C, Rust, and Python harnesses.
|
|||||||
## Compiling...
|
## Compiling...
|
||||||
|
|
||||||
Make sure you built unicornafl first (`../../build_unicorn_support.sh`).
|
Make sure you built unicornafl first (`../../build_unicorn_support.sh`).
|
||||||
|
Build the target using the provided Makefile.
|
||||||
|
This will also run the [./get_offsets.py](./get_offsets.py) script,
|
||||||
|
which finds some relevant addresses in the target binary using `objdump`,
|
||||||
|
and dumps them to different files.
|
||||||
Then, follow these individual steps:
|
Then, follow these individual steps:
|
||||||
|
|
||||||
### Rust
|
### Rust
|
||||||
@ -34,39 +38,3 @@ cd python
|
|||||||
## Results
|
## Results
|
||||||
|
|
||||||
TODO: add results here.
|
TODO: add results here.
|
||||||
|
|
||||||
## Compiling speedtest_target.c
|
|
||||||
|
|
||||||
You shouldn't need to compile simple_target.c since a X86_64 binary version is
|
|
||||||
pre-built and shipped in this sample folder. This file documents how the binary
|
|
||||||
was built in case you want to rebuild it or recompile it for any reason.
|
|
||||||
|
|
||||||
The pre-built binary (simple_target_x86_64.bin) was built using -g -O0 in gcc.
|
|
||||||
|
|
||||||
Then load the binary and execute the main function directly.
|
|
||||||
|
|
||||||
## Addresses for the harness
|
|
||||||
|
|
||||||
To find the address (in hex) of main, run:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
objdump -M intel -D target | grep '<main>:' | cut -d" " -f1
|
|
||||||
```
|
|
||||||
|
|
||||||
To find all call sites to magicfn, run:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
objdump -M intel -D target | grep '<magicfn>$' | cut -d":" -f1
|
|
||||||
```
|
|
||||||
|
|
||||||
For malloc callsites:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
objdump -M intel -D target | grep '<malloc@plt>$' | cut -d":" -f1
|
|
||||||
```
|
|
||||||
|
|
||||||
And free callsites:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
objdump -M intel -D target | grep '<free@plt>$' | cut -d":" -f1
|
|
||||||
```
|
|
Loading…
x
Reference in New Issue
Block a user