radareorg / radare2

UNIX-like reverse engineering framework and command-line toolset
https://www.radare.org/
GNU Lesser General Public License v3.0
20.59k stars 2.99k forks source link

Add usb sniffing capability to radare2 #10128

Closed RKX1209 closed 6 years ago

RKX1209 commented 6 years ago

Does radare2 have the capability to sniff usb communication like libusbsniff? It can be useful for debugging over usb connection to embedded systems.

Maijin commented 6 years ago

that should probably go in r2-extras

XVilka commented 6 years ago

@RKX1209 r2 supports opening PCAP files with a plugin from extras. And USB sniffers able to produce PCAP files. So you may want to try to extend it or create a script/plugin on top of it.

radare commented 6 years ago

Nowadays i would probably use r2frida for this

On 19 May 2018, at 13:09, Anton Kochkov notifications@github.com wrote:

@RKX1209 r2 supports opening PCAP files with a plugin from extras. And USB sniffers able to produce PCAP files. So you may want to try to extend it or create a script/plugin on top of it.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

RKX1209 commented 6 years ago

Hmm. I want to implement Nintendo Switch debugger for radare2. It requires usb connection between r2 and switch to exchange debug packets. So I'd like to add capability of usb communication with some third party library like libusb. What do you think?

radare commented 6 years ago

you can do that with an IO plugin using libusb, but this must go into extras

On 21 May 2018, at 05:57, Ren Kimura notifications@github.com wrote:

Hmm. I want to implement Nintendo Switch debugger for radare2. It requires usb connection between r2 and switch to exchange debug packets. So I'd like to add capability of usb communication with some third party library like libusb. What do you think?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/radare/radare2/issues/10128#issuecomment-390546760, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3-lvbYigtBstuXTGw3BoMaD3gRE7pLks5t0jstgaJpZM4UFkv2.

RKX1209 commented 6 years ago

Sure Thx!

XVilka commented 6 years ago

@RKX1209 you can check the implementation of remote GDB io and debug plugins as an example. It basically uses the similar network capabilities.

radare commented 6 years ago

There are easier plugins to look at. R2frida dor example also uses debug.io to run debug commands thru the io interface

On 21 May 2018, at 12:28, Anton Kochkov notifications@github.com wrote:

@RKX1209 you can check the implementation of remote GDB io and debug plugins as an example. It basically uses the similar network capabilities.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.