You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once in the r2frida session, all commands start with `\`. For example, in radare2 you'd run `i` to display the binary information, but in r2frida you'd use `\i`.
24
+
Once in the r2frida session, all commands start with `:`. For example, in radare2 you'd run `i` to display the binary information, but in r2frida you'd use `:i`.
Copy file name to clipboardExpand all lines: techniques/android/MASTG-TECH-0045.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,10 +5,10 @@ platform: android
5
5
6
6
Runtime reverse engineering can be seen as the on-the-fly version of reverse engineering where you don't have the binary data to your host computer. Instead, you'll analyze it straight from the memory of the app.
7
7
8
-
We'll keep using the HelloWorld JNI app, open a session with r2frida `r2 frida://usb//sg.vantagepoint.helloworldjni` and you can start by displaying the target binary information by using the `\i` command:
8
+
We'll keep using the HelloWorld JNI app, open a session with r2frida `r2 frida://usb//sg.vantagepoint.helloworldjni` and you can start by displaying the target binary information by using the `:i` command:
9
9
10
10
```bash
11
-
[0x00000000]>\i
11
+
[0x00000000]>:i
12
12
arch arm
13
13
bits 64
14
14
os linux
@@ -36,26 +36,26 @@ cacheDir /data/local/tmp
36
36
jniEnv 0x7d30a43c60
37
37
```
38
38
39
-
Search all symbols of a certain module with `\is <lib>`, e.g. `\is libnative-lib.so`.
39
+
Search all symbols of a certain module with `:is <lib>`, e.g. `:is libnative-lib.so`.
40
40
41
41
```bash
42
42
[0x00000000]>\is libnative-lib.so
43
43
44
44
[0x00000000]>
45
45
```
46
46
47
-
Which are empty in this case. Alternatively, you might prefer to look into the imports/exports. For example, list the imports with `\ii <lib>`:
47
+
Which are empty in this case. Alternatively, you might prefer to look into the imports/exports. For example, list the imports with `:ii <lib>`:
48
48
49
49
```bash
50
-
[0x00000000]>\ii libnative-lib.so
50
+
[0x00000000]>:ii libnative-lib.so
51
51
0x7dbe1159d0 f __cxa_finalize /system/lib64/libc.so
52
52
0x7dbe115868 f __cxa_atexit /system/lib64/libc.so
53
53
```
54
54
55
-
And list the exports with `\iE <lib>`:
55
+
And list the exports with `:iE <lib>`:
56
56
57
57
```bash
58
-
[0x00000000]>\iE libnative-lib.so
58
+
[0x00000000]>:iE libnative-lib.so
59
59
0x7d1c49954c f Java_sg_vantagepoint_helloworldjni_MainActivity_stringFromJNI
While you're searching or exploring the app memory, you can always verify where your current offset is located in the memory map. Instead of noting and searching for the memory address in this list you can simply run `\dm.`. You'll find an example in the following section "In-Memory Search".
40
+
While you're searching or exploring the app memory, you can always verify where your current offset is located in the memory map. Instead of noting and searching for the memory address in this list you can simply run `:dm.`. You'll find an example in the following section "In-Memory Search".
41
41
42
-
If you're only interested into the modules (binaries and libraries) that the app has loaded, you can use the command `\il` to list them all:
42
+
If you're only interested into the modules (binaries and libraries) that the app has loaded, you can use the command `:il` to list them all:
43
43
44
44
```bash
45
-
[0x00000000]>\il
45
+
[0x00000000]>:il
46
46
0x0000000100b7c000 iGoat-Swift
47
47
0x0000000100eb4000 TweakInject.dylib
48
48
0x00000001862c0000 SystemConfiguration
@@ -120,7 +120,7 @@ Now take the first hit, seek to it and check your current location in the memory
Copy file name to clipboardExpand all lines: techniques/ios/MASTG-TECH-0097.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,10 +5,10 @@ platform: ios
5
5
6
6
Runtime reverse engineering can be seen as the on-the-fly version of reverse engineering where you don't have the binary data to your host computer. Instead, you'll analyze it straight from the memory of the app.
7
7
8
-
We'll keep using the [iGoat-Swift](0x08b-Reference-Apps.md#igoat-swift) app, open a session with r2frida `r2 frida://usb//iGoat-Swift` and you can start by displaying the target binary information by using the `\i` command:
8
+
We'll keep using the [iGoat-Swift](0x08b-Reference-Apps.md#igoat-swift) app, open a session with r2frida `r2 frida://usb//iGoat-Swift` and you can start by displaying the target binary information by using the `:i` command:
9
9
10
10
```bash
11
-
[0x00000000]>\i
11
+
[0x00000000]>:i
12
12
arch arm
13
13
bits 64
14
14
os darwin
@@ -25,7 +25,7 @@ isDebuggerAttached false
25
25
cwd /
26
26
```
27
27
28
-
Search all symbols of a certain module with `\is <lib>`, e.g. `\is libboringssl.dylib`.
28
+
Search all symbols of a certain module with `:is <lib>`, e.g. `:is libboringssl.dylib`.
29
29
30
30
The following does a case-insensitive search (grep) for symbols including "aes" (`~+aes`).
31
31
@@ -44,10 +44,10 @@ The following does a case-insensitive search (grep) for symbols including "aes"
44
44
45
45
Or you might prefer to look into the imports/exports. For example:
46
46
47
-
- List all imports of the main binary: `\ii iGoat-Swift`.
48
-
- List exports of the libc++.1.dylib library: `\iE /usr/lib/libc++.1.dylib`.
47
+
- List all imports of the main binary: `:ii iGoat-Swift`.
48
+
- List exports of the libc++.1.dylib library: `:iE /usr/lib/libc++.1.dylib`.
49
49
50
-
> For big binaries it's recommended to pipe the output to the internal less program by appending `~..`, i.e. `\ii iGoat-Swift~..` (if not, for this binary, you'd get almost 5000 lines printed to your terminal).
50
+
> For big binaries it's recommended to pipe the output to the internal less program by appending `~..`, i.e. `:ii iGoat-Swift~..` (if not, for this binary, you'd get almost 5000 lines printed to your terminal).
51
51
52
52
The next thing you might want to look at are the classes:
53
53
@@ -96,20 +96,20 @@ Imagine that you are interested into `0x000000018eec5c8c - setStringValue:`. You
96
96
╰ 0x18eec5ca8 f4 hlt
97
97
```
98
98
99
-
Finally, instead of doing a full memory search for strings, you may want to retrieve the strings from a certain binary and filter them, as you'd do _offline_ with radare2. For this you have to find the binary, seek to it and then run the `\iz` command.
99
+
Finally, instead of doing a full memory search for strings, you may want to retrieve the strings from a certain binary and filter them, as you'd do _offline_ with radare2. For this you have to find the binary, seek to it and then run the `:iz` command.
100
100
101
101
> It's recommended to apply a filter with a keyword `~<keyword>`/`~+<keyword>` to minimize the terminal output. If just want to explore all results you can also pipe them to the internal less `\iz~..`.
Copy file name to clipboardExpand all lines: tests/android/MASVS-STORAGE/MASTG-TEST-0011.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -308,7 +308,7 @@ Usage: /[!bf] [arg] Search stuff (see 'e??search' for options)
308
308
### Runtime Memory Analysis
309
309
310
310
Instead of dumping the memory to your host computer, you can alternatively use [r2frida](../../../Document/0x08a-Testing-Tools.md#r2frida). With it, you can analyze and inspect the app's memory while it's running.
311
-
For example, you may run the previous search commands from r2frida and search the memory for a string, hexadecimal values, etc. When doing so, remember to prepend the search command (and any other r2frida specific commands) with a backslash `\` after starting the session with `r2 frida://usb//<name_of_your_app>`.
311
+
For example, you may run the previous search commands from r2frida and search the memory for a string, hexadecimal values, etc. When doing so, remember to prepend the search command (and any other r2frida specific commands) with a backslash `:` after starting the session with `r2 frida://usb//<name_of_your_app>`.
312
312
313
313
For more information, options and approaches, please refer to section "[In-Memory Search](../../../Document/0x05c-Reverse-Engineering-and-Tampering.md#in-memory-search "In-Memory Search")"in the chapter "Tampering and Reverse Engineering on Android".
Copy file name to clipboardExpand all lines: tests/ios/MASVS-STORAGE/MASTG-TEST-0060.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,6 +66,6 @@ Usage: /[!bf] [arg] Search stuff (see 'e??search' for options)
66
66
67
67
### Runtime Memory Analysis
68
68
69
-
By using [r2frida](../../../Document/0x08a-Testing-Tools.md#r2frida) you can analyze and inspect the app's memory while running and without needing to dump it. For example, you may run the previous search commands from r2frida and search the memory for a string, hexadecimal values, etc. When doing so, remember to prepend the search command (and any other r2frida specific commands) with a backslash `\` after starting the session with `r2 frida://usb//<name_of_your_app>`.
69
+
By using [r2frida](../../../Document/0x08a-Testing-Tools.md#r2frida) you can analyze and inspect the app's memory while running and without needing to dump it. For example, you may run the previous search commands from r2frida and search the memory for a string, hexadecimal values, etc. When doing so, remember to prepend the search command (and any other r2frida specific commands) with a backslash `:` after starting the session with `r2 frida://usb//<name_of_your_app>`.
70
70
71
71
For more information, options and approaches, please refer to section "[In-Memory Search](../../../Document/0x06c-Reverse-Engineering-and-Tampering.md#in-memory-search "In-Memory Search")" in the chapter "Tampering and Reverse Engineering on iOS".
Copy file name to clipboardExpand all lines: tools/generic/MASTG-TOOL-0036.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,12 +23,12 @@ For more examples on how to connect to frida-server, [see the usage section in t
23
23
24
24
> The following examples were executed using an Android app but also apply to iOS apps.
25
25
26
-
Once in the r2frida session, all commands start with `\` or `=!`. For example, in radare2 you'd run `i` to display the binary information, but in r2frida you'd use `\i`.
26
+
Once in the r2frida session, all commands start with `:` or `=!`. For example, in radare2 you'd run `i` to display the binary information, but in r2frida you'd use `:i`.
27
27
28
28
> See all options with `r2 frida://?`.
29
29
30
30
```bash
31
-
[0x00000000]>\i
31
+
[0x00000000]>:i
32
32
arch x86
33
33
bits 64
34
34
os linux
@@ -74,18 +74,18 @@ policyunsupported md algorithmvar bad valuec0"},{"address":"0x561f072c4275", \
74
74
...
75
75
```
76
76
77
-
To list the loaded libraries use the command `\il` and filter the results using the internal grep from radare2 with the command `~`. For example, the following command will list the loaded libraries matching the keywords `keystore`, `ssl` and `crypto`:
77
+
To list the loaded libraries use the command `:il` and filter the results using the internal grep from radare2 with the command `~`. For example, the following command will list the loaded libraries matching the keywords `keystore`, `ssl` and `crypto`:
78
78
79
79
```bash
80
-
[0x00000000]>\il~keystore,ssl,crypto
80
+
[0x00000000]>:il~keystore,ssl,crypto
81
81
0x00007f3357b8e000 libssl.so.1.1
82
82
0x00007f3357716000 libcrypto.so.1.1
83
83
```
84
84
85
85
Similarly, to list the exports and filter the results by a specific keyword:
86
86
87
87
```bash
88
-
[0x00000000]>\iE libssl.so.1.1~CIPHER
88
+
[0x00000000]>:iE libssl.so.1.1~CIPHER
89
89
0x7f3357bb7ef0 f SSL_CIPHER_get_bits
90
90
0x7f3357bb8260 f SSL_CIPHER_find
91
91
0x7f3357bb82c0 f SSL_CIPHER_get_digest_nid
@@ -102,7 +102,7 @@ Similarly, to list the exports and filter the results by a specific keyword:
102
102
To list or set a breakpoint use the command db. This is useful when analyzing/modifying memory:
103
103
104
104
```bash
105
-
[0x00000000]>\db
105
+
[0x00000000]>:db
106
106
```
107
107
108
108
Finally, remember that you can also run Frida JavaScript code with `\.` plus the name of the script:
0 commit comments