Skip to content

Commit

Permalink
Improve README & fix small bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
0vercl0k committed Jan 18, 2022
1 parent 1077dd7 commit a75045e
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,32 @@
<img src='pics/rp.gif'>
</p>

## Finding ROP gadgets

To find ROP gadget you need to specify a file with the `--file` / `-f` option and use the `--rop` / `-r` option specifying the maximum the number of instructions in the gadget:

<p align='center'>
<img src='pics/rp-r.gif'>
</p>

You can customize the base address of the module with the `--va` option (if you pass a base of `0`, then you get relative offsets) and you can also use the `--raw` option to analyze raw code dumps.

## Finding pointers

Oftentimes when building ROP chains, you might need to find pointers to integers with specific values. To look for those, you can use the `--search-int` option like in the below:

<p align='center'>
<img src='pics/rp-sint.gif'>
</p>

Other times, you might need to find pointers to specific strings. To look for those, you can use the `--search-hexa` option like in the below:

<p align='center'>
<img src='pics/rp-shexa.gif'>
</p>

You can also use the `--va` option to specify your own base address.

## Build

You can find shell scripts in [src/build](src/build) for every supported platforms; below is the Linux example:
Expand Down
Binary file added pics/rp-r.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pics/rp-shexa.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pics/rp-sint.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/rp/coloshell.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ template <class T> static void coloshell(const T t, const Colors colo) {
enable_color(COLO_GREEN); \
for (uint32_t i = 0; i < size; ++i) { \
if (isprint(hex_val[i])) { \
fmt::print("{}", hex_val[i]); \
fmt::print("{:c}", hex_val[i]); \
} else { \
fmt::print("\\x{:02x}", hex_val[i]); \
} \
Expand Down

0 comments on commit a75045e

Please sign in to comment.