EH-Net

Ethical Hacking Discussions and Related Certifications => Network Pen Testing => Topic started by: Ignatius on October 14, 2009, 04:06:43 PM



Title: Use of debug.exe to create an executable
Post by: Ignatius on October 14, 2009, 04:06:43 PM
I recall having seen something quite a while ago about the use of debug.exe to recreate an executable.  A text file is downloaded to a locked down system, renamed as a .bat then run.  Towards the end of the batch file there are a series of commands such as:

@echo rcx >> tmp1
@echo n >> tmp1
@echo w >> tmp1
@echo q >> tmp1
@debug < tmp1 > nul
@copy /b /y tmp1 tmp1.exe

The main body of the text file has the representation of the executable which is piped in sequence into tmp1.  I am interested to know how the executable is converted into the format that can be used in a text file in this way.

I don't know if this technique is used currently in pen tests or if it's been superceded by other techniques.

Thanks in advance.


Title: Re: Use of debug.exe to create an executable
Post by: Ignatius on October 15, 2009, 12:45:13 PM
I've been researching and it seems that exe2bat.exe does the job of converting an executable to a format that can be used to recreate it on a target system.

Is this technique of value in the pen testing field now or is it redundant?