Skip to content

Debugging Meterpreter(s)

Tim edited this page Jun 10, 2020 · 6 revisions

Windows C Meterpreter

#define DEBUGTRACE 1

Add that at the top of any file you would like to debug, then use dprintf([format string]) For more information, see the code responsible for it in common.h by searching for the DEBUGTRACE macro.

Once that is in place, run debugView as admin on the machine running the payload. Be sure to select "Global_Win32" messages in the "Capture" dropdown box.

Python Meterpreter

When setting up the handler for the connection in msfconsole: set PythonMeterpreterDebug True

Launch the meterpreter in a location that you will see stdout/stderr like a cmd.exe or a bash window.

The function you will use is debug_print("STRING")

Java Meterpreter

Set JavaMeterpreterDebug=True when creating the payload.

Android Meterpreter

Set AndroidMeterpreterDebug=True when creating the payload.

Clone this wiki locally