Copy Link
Add to Bookmark
Report

Hexfiles Issue 2 File 018

eZine's profile picture
Published in 
hexfiles
 · 9 Aug 2024

  
HEX-FILES No. 2 File 018
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ


HOW TO COMPILE LISTINGS IN HEX-FILES



***********************************************************************
* *
* HEX-FILES does not carry live virii. However, program listings *
* and scripts found in HEX-FILES create first generations of virii, *
* infected programs, virii droppers or other virii related programs *
* when compiled. This was intentionally done so that we could avoid *
* someone from executing these programs without exactly knowing what *
* they are doing. Believe me, there are people stupid enough to do *
* this. *
* *
* If you create an executable program out of those listed in *
* HEX-FILES means that you are fully aware of the nature of these *
* programs and the consequences of using these programs. You also *
* agree that HEX-FILES and/or everybody connected with HEX-FILES in *
* any way are not responsible for any damage that may result from the *
* use or misuse of these programs. *
* *
* You, being the person who created the executable program *
* and/or executed the program, bears full responsibility for your *
* actions. *
* *
* Furthermore, you fully agree that these programs would only be *
* used for research and/or educational purposes. In no way should *
* these programs be used to inflict harm or damage on another *
* person and/or his property. *
* *
***********************************************************************


Programs in HEX-FILES are presented as assembly language source code
(*.asm) or debug scripts (*.scr). The suggested name for the assembly
source code or debug script is indicated before the listing. The
compiler used to exactly recreate the virus is indicated at the start
of the assembly listing. If another compiler is used, you might not
be able to recreate the exact virus and instead create a new variant
of the virus.



How to create an executable program

1. Open the selected file in a text editor. You can also use your
word processor but you will have to save it as a plain text or
ms-dos text file. Save a back-up copy of the file. Most files
contain both asm and scr listings, and others contain multiple
listings.

2. Cut everything from the start of the file up to the line which
says

ÄÄÄÄÄÄÄÄ xxxxxxxx.ASM starts here ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
or ÄÄÄÄÄÄÄÄ xxxxxxxx.SCR starts here ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ


3. Cut everything from the line which says

ÄÄÄÄÄÄÄÄ xxxxxxxx.ASM ends here ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
or ÄÄÄÄÄÄÄÄ xxxxxxxx.SCR ends here ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ

up to the end of the file.

4. Save the file as xxxxxxxx.ASM or xxxxxxxx.SCR, as the case may
be. Remember to save the file as plain text or ms-dos text file.


5. Compile the listing

5.1. For debug scripts, the command line is

debug < xxxxxxxx.SCR

An executable file is created, usually a com. If the created
file is an exe, it will have an .ex_ extension. Rename to
xxxxxxxx.exe to make it executable.

5.2. For assembly source codes, the listing is written in a way
that it could be compiled by different compilers,
specifically A86 4.02, TASM 2.01 and MASM 5.0. Other
compilers could be used but might require code fixes.

5.2.1. Command line for A86 version 4.02

5.2.1.1. Create COM program with org 100 directive

a86 xxxxxxxx.ASM

5.2.1.2. Create COM program with org 0 directive

a86 xxxxxxxx.ASM xxxxxxxx.COM

5.2.1.3. Create EXE program

a86 xxxxxxxx.ASM xxxxxxxx.OBJ
linker xxxxxxxx.OBJ

You can use tasm's tlink, masm's link or another
linker of your choice. a86 does not have a separate
linker program.


5.2.2. Command line for TASM version 2.01

5.2.2.1. Create COM program with org 100 directive

tasm xxxxxxxx.ASM;
tlink /t xxxxxxxx.OBJ;

5.2.2.2. Create COM program with org 0 directive

tasm xxxxxxxx.ASM;
tlink xxxxxxxx.OBJ;
exe2bin xxxxxxxx.EXE xxxxxxxx.COM

You can use other binary converter instead of
exe2bin.

5.2.2.3. Create EXE program

tasm xxxxxxxx.ASM;
tlink xxxxxxxx.OBJ;


5.2.3. Command line for MASM version 5.0

5.2.3.1. Create COM program

masm xxxxxxxx.ASM;
link xxxxxxxx.OBJ;
exe2bin xxxxxxxx.EXE xxxxxxxx.COM

You can use other binary converter instead of
exe2bin.

5.2.3.2. Create EXE program

masm xxxxxxxx.ASM;
link xxxxxxxx.OBJ;


5.2.4. For other compilers, refer to the program documentation
or see the compiler's help screen.



Availability of Compilers/Programs

1. DEBUG.EXE comes with Microsoft's operating system. If you are
using ms-dos you have debug unless you deleted it.

2. EXE2BIN.EXE comes with ms-dos but was dropped from ms-dos 6. A
replacement binary converter is available from shareware sites.
However, if you still want exe2bin, I think you can download a
copy from microsoft.

3. A86 is a shareware program and is available from shareware sites
or you can get it from its distribution site at

http://eji.com/a86/index.htm

4. TASM and MASM are commercial programs. If you are interested, get
in touch with Borland and Microsoft, respectively.

However, if like me, you couldn't afford to buy these programs
(with my meager allowance and the dwindling value of the
Philippine peso, how could I), a copy is available from your
friendly warez and virus sites. I won't tell you where but...

Look and you shall find
Knock and it shall be opened unto you

5. For other compilers, I guess you can find many shareware assembly
compilers in the Internet.


EoF.

← previous
next →
loading
sending ...
New to Neperos ? Sign Up for free
download Neperos App from Google Play
install Neperos as PWA

Let's discover also

Recent Articles

Recent Comments

Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT