Skip to content

Commit

Permalink
ifxilitn
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Aug 31, 2024
1 parent 3f5a2e4 commit 9000e0e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/r2fwrev/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

Once we get a flash dump in our hands it usually requires so many different steps and workflows compared to normal userland programs that we are used to work on.

This chapter will guide you through the necessary steps to understand how to analyze a raw flash dump from the very beginning.
This chapter will guide you through the necessary steps to understand how to configure your environment, load the required files, analyze and emulate it the very beginning.

As long as these tasks require a lot of steps and tend to be tedious it is important to have some good habits and understand all the concepts before get your hands deep down.
12 changes: 8 additions & 4 deletions src/r2fwrev/memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ We have already mapped the firmware to the base address using the `-m` commandli

But now we need to create a new map for the RAM. Let's imagine our device have 8MB of ram located at address 0x4000_0000:

```
```console
> on malloc://8M 0x40000000
```

Expand All @@ -119,7 +119,7 @@ The second argument tells where this file needs to be mapped in memory.

We can verify that everything worked as expected by using the `om` command like this:

```
```console
[0x00000000]> om
- 2 fd: 4 +0x00000000 0x80000000 - 0x087fffff r-x
* 1 fd: 3 +0x00000000 0x40000000 - 0x007fffff rwx
Expand All @@ -128,7 +128,7 @@ We can verify that everything worked as expected by using the `om` command like

Naming maps is done with the `omn.` command:

```
```console
[0x00000000]> omn. FLASH @ entry0
[0x00000000]> omn. RAM
- 2 fd: 4 +0x00000000 0x80000000 - 0x087fffff r-x FLASH
Expand All @@ -138,5 +138,9 @@ Naming maps is done with the `omn.` command:

We can change the permissions of each map using the `omp` command but bear in mind that we won't be able to make a page writeable if the underlying file descriptor is read-only.

To write the contents of a file inside a map we may use the `wff` command
To write the contents of a file inside a map we may use the `wff` command.

```console
[0x00000000]> wff?
| wf[fs] -|file write contents of file at current offset
```
1 change: 0 additions & 1 deletion src/r2fwrev/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ e cfg.bigendian=true|false
For example a big endian ARM-Thumb environment can be configured like this:

`$ r2 -a arm -b 16 -e cfg.bigendian=true`

0 comments on commit 9000e0e

Please sign in to comment.