Home Artists Posts Import Register

Downloads

Content

Further Research

Lab 5

When launched the debugger will use the CREATE_PROCESS_DEBUG_EVENT to Read/Write the target process memory and alter the “Hello World” string to print “String Hack” instead.

Lab 5 - Exercise

Update the code in the CREATE_PROCESS_DEBUG_EVENT to patch the target and remove the “Hello World” print entirely so that no string is printed.

  • Open the target in IDA and use the Strings subview to locate where the “Hello World” string is referenced in the code.
  • Notice that the way the string is “printed” to the console is via a call to WriteFile where the file handle is actually a handle to CONOUT$
  • Note the address of the call to WriteFile and convert this to a relative virtual address (RVA) by subtracting the target based address 0x400000
  • Update the handle_event_create_process code and calculate the WriteFile virtual address using the RVA and the new image base address
  • Overwrite the 6 bytes at the call WriteFile address with nop (0x90) instructions
  • Test the new debugger and observe no “Hello World” string is printed


Files

Debugging Fundamentals Module 5

This is "Debugging Fundamentals Module 5" by OALABS on Vimeo, the home for high quality videos and the people who love them.

Comments

No comments found for this post.