views:

79

answers:

2

can somone tell me how to write these hexadecimals to an exe file while still having it exec


4D 5A 50 00 02 00 00 00 04 00 0F 00 FF FF 00 00 B8 00 00 00 00 00 00 
00 40 00 1A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 BA 10 00 0E 1F 
B4 09 CD 21 B8 01 4C CD 21 90 90 54 68 69 73 20 70 72 6F 67 72 61 6D 
20 6D 75 73 74 20 62 65 20 72 75 6E 20 75 6E 64 65 72 20 57 69 6E 33 
32 0D 0A 24 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 

//  Removed approximately 400 similar lines from the original posting.
//  (no point to be so verbose...)

40 FC C3 E8 F3 FF FF FF 48 C3 90 55 8B EC FF 75 08 E8 51 FB FF FF 5D 
C2 04 00 90 E9 3B F9 FF FF C3 8B C0 E8 9B 01 00 00 C3 8B C0 55 8B EC 
83 C4 E0 53 56 57 89 4D F8 8B F2 89 45 FC 8B 5D FC 8B 1B 8B 45 08 8B 
38 85 FF 7F 1A 85 FF 7D 07 B0 04 E8 DE E0 FF FF 8B 45 FC 8B D6 E8 C4 
FF FF FF E9 4A 01 00 00 33 C0 89 45 F0 85 DB 74 0B 83 EB 04 8B 03 89 
45 F0 83 EB 04 33 C0 8A 46 01 01 C6 8B C6 8B 50 02 89 55 E8 8B 5
A: 

It is a rather simple proposal... Using most any general purpose language at your disposal, be it VB, C, Java, Python... you need to:

 1. Save this text to a file 
    (alternatively, directly paste it into the source code adding
     necessary string delimitors)

 2. Write a small program which will

 2.1 Parse the input, 3 characters at a time, and convert each two Hex values
     to a byte type (a type holding 0-255)

 2.2 Write these bytes, in proper order to the output file (open as a "write
     binary" type file).

3 Run a virus scan on the damn thing (whoe knows where it's been)

4 Run this newly created binary... 
mjv
A: 

Useless reply: If you don't know how to write binary data, you have no business writing it to EXE files.

yu_sha