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
-`TBD` means that we have not decided whether to support it, or how to support it.
23
-
-`No` means it is not possible to do, at least for now.
24
-
25
-
Notes:
26
-
27
-
(1). Right now, we only support gdbserver with android remote debugging. Support for other gdbserver or gdb stub, e.g., qiling, VMWare, QEMU, will be added later.
28
-
29
-
The progress is tracked in [this issue](https://github.com/Vector35/debugger/issues/122).
30
-
7
+
This is the current comparability matrix of the debugger. The columns stand for where we run BN and the rows stand for the targets.
8
+
9
+
| Target 🔽 Host ▶️ | macOS | Linux | Windows | Note |
Copy file name to clipboardExpand all lines: build.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,10 @@ git checkout dev
14
14
# or git checkout commit_hash
15
15
```
16
16
17
-
- Download LLDB development build for your OS at https://github.com/Vector35/lldb-artifacts/releases - make sure that the correct LLDB version is downloaded (`grep 'LLVM_VERSION ' core/CMakeLists.txt` can help)
17
+
- Download LLDB development build for your OS at https://github.com/Vector35/lldb-artifacts/releases/latest - make sure that the correct LLDB version is downloaded (`grep 'LLVM_VERSION ' core/CMakeLists.txt` can help)
18
18
- Extract the zip archive to `~/libclang`
19
19
20
-
- Download Qt development build for your OS at https://github.com/Vector35/qt-artifacts/releases.
20
+
- Download Qt development build for your OS at https://github.com/Vector35/qt-artifacts/releases/latest.
"title" : "Attempt to unload the DLL with wrong path",
106
+
"title" : "Attempt to unload the DbgEng DLLs from wrong path",
116
107
"type" : "boolean",
117
108
"default" : false,
118
109
"description" : "Attempt to unload the already loaded DLL if they are from a wrong path. You may turn this on if the DbgEng DLLs, e.g., dbghelp.dll, is loaded from a wrong path, but it happens early than the debugger initialization",
Copy file name to clipboardExpand all lines: docs/guide/dbgeng-ttd.md
+10-6
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
-
# Time Travel Debugging
1
+
# Time Travel Debugging (Windows)
2
2
3
3
Time travel debugging (TTD) allows you to record an execution trace of a program or system and replay it back and forth.
4
4
It can speed up the process of reverse engineering/vulnerability research, and deal with certain tasks that are not easy to handle in regular forward debugging.
5
5
6
-
Several tools implement TTD. As of now, Binary Ninja debugger integrates with the WinDbg/DbgEng TTD so that you can replay and analyze a trace recorded by WinDbg.
6
+
Several tools implement TTD. On Windows, Binary Ninja debugger integrates with the WinDbg/DbgEng TTD so that you can replay and analyze a trace recorded by WinDbg.
7
7
The combination of TTD and your familiar reverse engineer tool would hopefully supercharge the ability to time travel and make your workflow even more effective.
8
8
9
9
Below is a guide to set it up.
@@ -54,9 +54,12 @@ all types of recording supported by WinDbg (e.g., attach to a running process an
54
54
55
55
### Record a TTD Trace in Binary Ninja
56
56
57
+
- Make sure you have WinDbg property installed and configured
57
58
- Open the file you wish to trace in Binary Ninja (optional)
- The [!position](https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/time-travel-debugging-extension-positions) command prints the `position` of all active threads
110
-
- The [!tt](https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/time-travel-debugging-extension-tt) command navigates to a `position` in the trace
113
+
- The [!tt navigation](https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/time-travel-debugging-extension-tt) command navigates to a `position` in the trace
111
114
- E.g., `!tt 1A0:12F`
112
115
- While using the debugger, when the target stops, the current position will be printed in the debugger console
116
+
- The new [!tt breakpoint](https://learn.microsoft.com/en-us/windows-hardware/drivers/debuggercmds/time-travel-debugging-extension-tt#tt-break-commands) now supports breaking the target when a memory is read/written/executed, a register value is changed, or a module has been loaded, both in forward and backward direction. This is very powerful and worth checking out!
Time travel debugging (TTD) allows you to record an execution trace of a program or system and replay it back and forth.
4
+
It can speed up the process of reverse engineering/vulnerability research, and deal with certain tasks that are not easy to handle in regular forward debugging.
5
+
6
+
Several tools implement TTD. On Linux, Binary Ninja debugger has a GDB RSP adapter which can be used to replay/debug the
7
+
trace produced by [rr](https://rr-project.org/).
8
+
The combination of TTD and your familiar reverse engineer tool would hopefully supercharge the ability to time travel
9
+
and make your workflow even more effective.
10
+
11
+
Below is a guide to set it up.
12
+
13
+
## Install rr
14
+
15
+
- Download and install the latest release from https://github.com/rr-debugger/rr/releases
16
+
17
+
## Record an rr Trace
18
+
19
+
- Record a trace with `rr your_program arg1 arg2`
20
+
- This saves the trace into the default directory (`$HOME/.local/share/rr`). To specify a custom directory,
21
+
use `-o target_dir`
22
+
- For more options during the record, check out `rr record -h`
23
+
24
+
## Replay an rr Trace
25
+
26
+
- Run `rr replay -h 0.0.0.0 -s 31337`
27
+
- This will instruct rr to spawn a GDB stub and listen on port 31337 of all interfaces
28
+
- It will replay the last recorded trace. To replay a different trace, specify the trace directory on the command line
29
+
- For more options during the replay, check out `rr replay -h`
30
+
31
+
## Connect to the gdb stub in Binary Ninja
32
+
33
+
- Open the binary file in Binary Ninja (optional)
34
+
- Click Menu -> "Debugger" -> "Connect To Remote Process", the `Debug Adapter Settings` will popup
35
+
- Select `GDB RSP` as the debug adapter
36
+
- Type in the `IP Address` and `Port` in the previous step
0 commit comments