Skip to content

Commit

Permalink
Some summary refactoring, still far from ready
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Jul 6, 2024
1 parent 434a11f commit 9a61768
Show file tree
Hide file tree
Showing 118 changed files with 271 additions and 289 deletions.
75 changes: 39 additions & 36 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,32 @@
* [Expressions](first_steps/expressions.md)
* [Basic Debugger Session](first_steps/basic_debugger_session.md)
* [Contributing to radare2](first_steps/contributing.md)
* [Command Line Tools](tools/intro.md)
* [Rax2](tools/rax2/intro.md)
* [Rafind2](tools/rafind2/intro.md)
* [Rarun2](tools/rarun2/intro.md)
* [r2pm](tools/r2pm/intro.md)
* [Rabin2](tools/rabin2/intro.md)
* [File Identification](tools/rabin2/file_identification.md)
* [Entrypoint](tools/rabin2/entrypoints.md)
* [Imports](tools/rabin2/imports.md)
* [Exports](tools/rabin2/exports.md)
* [Symbols](tools/rabin2/symbols.md)
* [Libraries](tools/rabin2/libraries.md)
* [Strings](tools/rabin2/strings.md)
* [Program Sections](tools/rabin2/program_sections.md)
* [Radiff2](tools/radiff2/intro.md)
* [Binary Diffing](tools/radiff2/binary_diffing.md)
* [Rasm2](tools/rasm2/intro.md)
* [Assemble](tools/rasm2/assemble.md)
* [Disassemble](tools/rasm2/disassemble.md)
* [Configuration](tools/rasm2/config.md)
* [Ragg2](tools/ragg2/ragg2.md)
* [Language](tools/ragg2/lang.md)
* [Encoders](tools/ragg2/encoders.md)
* [Padding](tools/ragg2/padding.md)
* [Rahash2](tools/rahash2/intro.md)
* [Rahash Tool](tools/rahash2/rahash_tool.md)
* [Configuration](configuration/intro.md)
* [Colors](configuration/colors.md)
* [Configuration Variables](configuration/evars.md)
Expand Down Expand Up @@ -75,42 +101,19 @@
* [Remote Access](debugger/remoting_capabilities.md)
* [Remote GDB](debugger/remote_gdb.md)
* [Remote WinDbg](debugger/windbg.md)
* [Command Line Tools](tools/intro.md)
* [Rax2](tools/rax2/intro.md)
* [Rafind2](tools/rafind2/intro.md)
* [Rarun2](tools/rarun2/intro.md)
* [Rabin2](tools/rabin2/intro.md)
* [File Identification](tools/rabin2/file_identification.md)
* [Entrypoint](tools/rabin2/entrypoints.md)
* [Imports](tools/rabin2/imports.md)
* [Exports](tools/rabin2/exports.md)
* [Symbols](tools/rabin2/symbols.md)
* [Libraries](tools/rabin2/libraries.md)
* [Strings](tools/rabin2/strings.md)
* [Program Sections](tools/rabin2/program_sections.md)
* [Radiff2](tools/radiff2/intro.md)
* [Binary Diffing](tools/radiff2/binary_diffing.md)
* [Rasm2](tools/rasm2/intro.md)
* [Assemble](tools/rasm2/assemble.md)
* [Disassemble](tools/rasm2/disassemble.md)
* [Configuration](tools/rasm2/config.md)
* [Ragg2](tools/ragg2/ragg2.md)
* [Language](tools/ragg2/lang.md)
* [Encoders](tools/ragg2/encoders.md)
* [Padding](tools/ragg2/padding.md)
* [Rahash2](tools/rahash2/intro.md)
* [Rahash Tool](tools/rahash2/rahash_tool.md)
* [Plugins](plugins/intro.md)
* [IO plugins](plugins/ioplugins.md)
* [Asm plugins](plugins/dev-asm.md)
* [Charset plugins](plugins/dev-charset.md)
* [Analysis plugins](plugins/dev-anal.md)
* [Bin plugins](plugins/dev-bin.md)
* [Other plugins](plugins/dev-other.md)
* [Charset plugins](plugins/dev-charset.md)
* [Python plugins](plugins/python.md)
* [Debugging](plugins/debug.md)
* [Other plugins](plugins/dev-other.md)
* [Troubleshooting](plugins/troubles.md)
* [Testing](plugins/testing.md)
* [Packaging](plugins/r2pm.md)
* [R2Frida](r2frida/intro.md)
* [First Steps](r2frida/first_steps.md)
* [Crackmes](crackmes/intro.md)
* [IOLI](crackmes/ioli/intro.md)
* [IOLI 0x00](crackmes/ioli/ioli_0x00.md)
Expand All @@ -123,13 +126,13 @@
* [IOLI 0x07](crackmes/ioli/ioli_0x07.md)
* [IOLI 0x08](crackmes/ioli/ioli_0x08.md)
* [IOLI 0x09](crackmes/ioli/ioli_0x09.md)
* [Avatao R3v3rs3 4](crackmes/avatao/01-reverse4/intro.md)
* [.radare2](crackmes/avatao/01-reverse4/radare2.md)
* [.first_steps](crackmes/avatao/01-reverse4/first_steps.md)
* [.main](crackmes/avatao/01-reverse4/main.md)
* [.vmloop](crackmes/avatao/01-reverse4/vmloop.md)
* [.instructionset](crackmes/avatao/01-reverse4/instructionset.md)
* [.bytecode](crackmes/avatao/01-reverse4/bytecode.md)
* [.outro](crackmes/avatao/01-reverse4/outro.md)
* [Avatao R3v3rs3 4](crackmes/avatao/intro.md)
* [.radare2](crackmes/avatao/radare2.md)
* [.first_steps](crackmes/avatao/first_steps.md)
* [.main](crackmes/avatao/main.md)
* [.vmloop](crackmes/avatao/vmloop.md)
* [.instructionset](crackmes/avatao/instructionset.md)
* [.bytecode](crackmes/avatao/bytecode.md)
* [.outro](crackmes/avatao/outro.md)
* [Reference Card](refcard/intro.md)
* [Acknowledgments](credits/credits.md)
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.bytecode
---------
### .bytecode

Well, we did the reverse engineering part, now we have to write a program for
the VM with the instruction set described in the previous paragraph. Here is
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.first_steps
------------
### .first_steps

OK, enough of praising r2, lets start reversing this stuff. First, you have to
know your enemy:
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.instructionset
---------------
### .instructionset

We've now reversed all the VM instructions, and have a full understanding about
how it works. Here is the VM's instruction set:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Avatao R3v3rs3 4
------
## Avatao R3v3rs3 4

After a few years of missing out on wargames at
[Hacktivity](https://hacktivity.com), this year I've finally found the time to
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.main
-----
### .main

As I was saying, I usually take a look at the entry point, so let's just do
that:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.outro
------
### .outro

Well, what can I say? Such VM, much reverse! :)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.radare2
--------
### .radare2

I've decided to solve the reversing challenges using
[radare2](http://www.radare.org/r/), a free and open source reverse engineering
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.vmloop
-------
### .vmloop

```
[offset]> fcn.vmloop
Expand Down
10 changes: 7 additions & 3 deletions src/crackmes/intro.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Crackmes
========
# Crackmes

Crackmes (from "crack me" challenge) are the training ground for reverse engineering people. This section will go over tutorials on how to defeat various crackmes using r2.
Reverse engineering is a crucial skill in today's digital landscape, and one of the best ways to hone this skill is by participating in crackme challenges. A crackme (short for "crack me" challenge) is a piece of software or firmware that has been intentionally obfuscated or encrypted, making it difficult to reverse engineer without the correct key or password.

In this chapter, we will explore how to use radare2 to defeat various crackmes and uncover their secrets. We will cover tutorials on how to analyze and disassemble different types of crackmes, including those that use encryption, compression, and other forms of obfuscation.

By following along with these tutorials, you will gain a deeper understanding of the reverse engineering process and develop the skills needed to tackle even the most challenging crackmes. Whether you're a beginner or an experienced reverser, this chapter is designed to provide you with the tools and knowledge necessary to take on any crackme that comes your way.

So let's get started!
3 changes: 1 addition & 2 deletions src/crackmes/ioli/intro.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
IOLI CrackMes
=============
## IOLI CrackMes

The IOLI crackme is a good starting point for learning r2. This is a set of tutorials based on the tutorial at [dustri](http://dustri.org/b/defeating-ioli-with-radare2.html)

Expand Down
3 changes: 1 addition & 2 deletions src/crackmes/ioli/ioli_0x00.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
IOLI 0x00
=========
### IOLI 0x00

This is the first IOLI crackme, and the easiest one.

Expand Down
3 changes: 1 addition & 2 deletions src/crackmes/ioli/ioli_0x01.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
IOLI 0x01
=========
### IOLI 0x01

This is the second IOLI crackme.

Expand Down
3 changes: 1 addition & 2 deletions src/crackmes/ioli/ioli_0x02.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
IOLI 0x02
=========
### IOLI 0x02

This is the third one.

Expand Down
5 changes: 2 additions & 3 deletions src/crackmes/ioli/ioli_0x03.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
IOLI 0x03
=========
### IOLI 0x03

crackme 0x03, let's skip the string check part and analyze it directly.

Expand Down Expand Up @@ -64,7 +63,7 @@ Password OK!!! :)

Take a look at `sym.test`. It's a two path conditional jump which compares two parameters and then do shift. We can guess that shift is most likely the decryption part (shift cipher, e.g. Caesar cipher).

```C
```c
/* r2dec pseudo code output */
/* ./crackme0x03 @ 0x804846e */
#include <stdint.h>
Expand Down
5 changes: 1 addition & 4 deletions src/crackmes/ioli/ioli_0x04.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
IOLI 0x04
=========

# 0x04
### IOLI 0x04

```C
[0x080483d0]> pdd@main
Expand Down
3 changes: 1 addition & 2 deletions src/crackmes/ioli/ioli_0x05.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
IOLI 0x05
=========
### IOLI 0x05

check again, it uses `scanf()` to get our input and pass it to `check()` as parameter.

Expand Down
3 changes: 1 addition & 2 deletions src/crackmes/ioli/ioli_0x06.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
IOLI 0x06
=========
### IOLI 0x06

nearly a routine to check this binary (not complete output in the following):

Expand Down
3 changes: 1 addition & 2 deletions src/crackmes/ioli/ioli_0x07.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
IOLI 0x07
=========
### IOLI 0x07

a weird "wtf?" string.

Expand Down
3 changes: 1 addition & 2 deletions src/crackmes/ioli/ioli_0x08.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
IOLI 0x08
=========
### IOLI 0x08

we can reverse it and find it's similar to 0x07, and use the same password to solve it:

Expand Down
3 changes: 1 addition & 2 deletions src/crackmes/ioli/ioli_0x09.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
IOLI 0x09
=========
### IOLI 0x09

Hints: crackme0x09 hides the format string (%d and %s), and nothing more than 0x08.

Expand Down
2 changes: 1 addition & 1 deletion src/debugger/files.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Files
## Files

The radare2 debugger allows the user to list and manipulate the file descriptors from the target process.

Expand Down
4 changes: 2 additions & 2 deletions src/debugger/getting_started.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Getting Started
## Getting Started

## Small session in radare2 debugger
### Small session in radare2 debugger

* `r2 -d /bin/ls`: Opens radare2 with file `/bin/ls` in debugger mode using the radare2 native debugger, but does not run the program. You’ll see a prompt (radare2) - all examples are from this prompt.

Expand Down
2 changes: 1 addition & 1 deletion src/debugger/heap.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Heap
## Heap

radare2's `dm` subcommands can also display a map of the heap which is useful for those who are interested in inspecting the heap and its content. Simply execute `dmh` to show a map of the heap:

Expand Down
2 changes: 1 addition & 1 deletion src/debugger/memory_maps.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Memory Maps
## Memory Maps

The ability to understand and manipulate the memory maps of a debugged program is important for many different Reverse Engineering tasks. radare2 offers a rich set of commands to handle memory maps in the binary. This includes listing the memory maps of the currently debugged binary, removing memory maps, handling loaded libraries and more.

Expand Down
18 changes: 9 additions & 9 deletions src/debugger/migration.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Migration from ida, GDB or WinDBG
## Migration from ida, GDB or WinDBG

## How to run the program using the debugger ##
### How to run the program using the debugger ##

`r2 -d /bin/ls` - start in debugger mode => [[video](http://asciinema.org/a/12022)]

## How do I attach/detach to running process ? (gdb -p) ##
### How do I attach/detach to running process ? (gdb -p) ##

`r2 -d <pid>` - attach to process

Expand All @@ -14,11 +14,11 @@

`r2 -D gdb gdb://localhost:1234` - attach to gdbserver

## How to set args/environment variable/load a specific libraries for the debugging session of radare
### How to set args/environment variable/load a specific libraries for the debugging session of radare

Use `rarun2` (`libpath=$PWD:/tmp/lib`, `arg2=hello`, `setenv=FOO=BAR` ...) see `rarun2 -h` / `man rarun2`

## How to script radare2 ?
### How to script radare2 ?

`r2 -i <scriptfile> ...` - run a script **after** loading the file => [[video](http://asciinema.org/a/12020)]

Expand All @@ -32,11 +32,11 @@ Use `rarun2` (`libpath=$PWD:/tmp/lib`, `arg2=hello`, `setenv=FOO=BAR` ...) see `

To get `#!python` and much more, just build [radare2-bindings](https://github.com/radareorg/radare2-bindings)

## How to list Source code as in gdb list ?
### How to list Source code as in gdb list ?

`CL @ sym.main` - though the feature is highly experimental

# shortcuts
## shortcuts

| Command | IDA Pro | radare2 | r2 (visual mode) | GDB | WinDbg |
| ------------- | ------------- |----------------|------------------|-----|-----|
Expand Down Expand Up @@ -118,13 +118,13 @@ To get `#!python` and much more, just build [radare2-bindings](https://github.co
|options |option menu |`e?` | `e` |
|search |search menu |`/?` | Select the zone with the cursor `c` then `/` | | `s`

## Equivalent of "set-follow-fork-mode" gdb command
### Equivalent of "set-follow-fork-mode" gdb command
This can be done using 2 commands:

1. `dcf` - until a fork happen
2. then use `dp` to select what process you want to debug.

# Common features
### Common features
- r2 accepts FLIRT signatures
- r2 can connect to GDB, LLVM and WinDbg
- r2 can write/patch in place
Expand Down
2 changes: 1 addition & 1 deletion src/debugger/registers.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Registers
## Registers

The registers are part of a user area stored in the context structure used by the scheduler. This structure can be manipulated to get and set the values of those registers, and, for example, on Intel hosts, it is possible to directly manipulate DR0-DR7 hardware registers to set hardware breakpoints.

Expand Down
2 changes: 1 addition & 1 deletion src/debugger/remote_gdb.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Debugging with gdbserver
## Debugging with gdbserver

radare2 allows remote debugging over the gdb remote protocol. So you can run a
gdbserver and connect to it with radare2 for remote debugging. The syntax for
Expand Down
2 changes: 1 addition & 1 deletion src/debugger/remoting_capabilities.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Remote Access Capabilities
## Remote Access Capabilities

Radare can be run locally, or it can be started as a server process which is controlled by a local
radare2 process. This is possible because everything uses radare's IO subsystem which abstracts access to system(), cmd() and all basic IO operations so to work over a network.
Expand Down
2 changes: 1 addition & 1 deletion src/debugger/revdebug.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Reverse Debugging
## Reverse Debugging

Radare2 has reverse debugger, that can seek the program counter backward.
(e.g. reverse-next, reverse-continue in gdb)
Expand Down
Loading

0 comments on commit 9a61768

Please sign in to comment.