Dec 072017
C routine to allow an executable file to check if it has been modified. Prevents others from patching your code.
File CAWARE.ZIP from The Programmer’s Corner in
Category C Source Code
C routine to allow an executable file to check if it has been modified. Prevents others from patching your code.
File Name File Size Zip Size Zip Type
EXAMPLE.C 6071 1009 deflated
EXEAWARC.OBJ 1015 789 deflated
EXEAWARH.OBJ 1047 797 deflated
EXEAWARL.OBJ 1045 806 deflated
EXEAWARM.OBJ 967 760 deflated
EXEAWARS.OBJ 937 748 deflated
EXEAWART.OBJ 937 748 deflated
MAKAWARE.EXE 10408 6489 deflated
READ.ME 5862 2176 deflated

Download File CAWARE.ZIP Here

Contents of the READ.ME file

* *
* Make your Turbo C programs self-aware of themselves! *
* *

(C)Copyright 1988, Gilmore Systems

Gilmore Systems
P.O. Box 3831
Beverly Hills, CA 90212-0831 U.S.A.

Voice: (213) 275-8006
Data: (213) 276-5263

Now you can allow your COMPILED Turbo C pgms to check themselves for
changes in their CRC or filesize, thus detecting if a virus has modified

Viruses have become a problem - altering *.EXE and *.COM files these
days. Not just viruses, but hackers who modify shareware programs
because they don't like looking at the opening screens.

Well, if you're a programmer using Turbo C, you now have a means of
protection. You can make your programs aware of their own CRC and
filesize - the 2 most likely things to change in the event of a virus or
hacker attack.

Enclosed in this archive is this READ.ME file, MAKAWARE.EXE (exe
initializer), EXAMPLE.C (sample source for using the checker), and 6
OBJ's - one for each memory model which you can link with your programs
to offer you (or your program) security. These OBJ's contain the
function exeaware() as follows:

char *pgmname;

RETURNS: 0 - no changes, file unaltered.
1 - CRC changed, file altered.
2 - size changed, file altered.
3 - both CRC and size changed, file altered.

The passed parameter "pgmname", is the name of your running program.
For example purposes, you could call the function as follows:

int argc;
char **argv;
extern int exeaware();
int result;
result = exeaware(argv[0]); /* this is how to call the function */
case 1:
printf("CRC changed\n");
case 2:
printf("size changed\n");
case 3:
printf("CRC and size changed\n");
case 0:
printf("No changes\n");

We've included a source file named "example.c" to demonstrate how this
works. It first calls exeaware() and proves that nothing has been
altered in the file. It then alters itself by adding a single byte to
the end of the file and re-calls exeaware(), proving that the CRC and
size of file has changed.

See the "example.c" file for details on compiling and linking.

To use this code, take note of the memory model you're using and link
with the appropriate .obj file:

exeawart.obj - tiny model
exeawarc.obj - compact model
exeawars.obj - small model
exeawarm.obj - medium model
exeawarl.obj - large model
exeawarh.obj - huge model

See the "example.c" file for details on compiling and linking.

It is a two-step process to enable this code:

First, you must have a call in your main() function to
exeaware() as shown in the "example.c" source file, and you
must link with the appropriate memory model.

Second, you must run the program MAKAWARE.EXE against your new
"exe" file produced by the linker. Again, refer to the
"example.c" file for instructions.

This code offers protection that no external programs can offer. At
least now, nobody can accuse YOUR program of containing a virus.
Although nothing's perfect, I'm sure some hacker will come up with a way
of defeating this code manually, but it would be extremely difficult for
a virus to alter or defeat this code.

* Register and get the source code *

As with all shareware, try it first. If you like it, send us $10. In
return for your $10, we'll send you the source code. You'll receive:

EXEAWARE.C - source code needed to reproduce the exeawar?.obj files.
MAKAWARE.C - source code needed to reproduce the makaware.exe file.

We're not doing anything fancy here. The source code should also work
with the Microsoft C compiler. The OBJ's that you now have should only
work with the Turbo C compiler/linker.

If you register for $15 instead of $10, we'll give you 6-months of full
access to our "Virus Info" BBS in addition to the source code. Our
"Virus Info" BBS deals strictly with the topic of computer viruses. You
can download text, source, and programs all pertaining to computer virus
prevention and detection. A great way to keep informed of the latest
viruses going around.

You can use your Visa/MC to phone in your order today!

One final note: If you've obtained this archive from a BBS other than
ours and question the integrity of these .obj's or the makaware.exe
program within this archive, you can download the CAWARE.ARC file from
our BBS to be certain nobody 'tinkered' with it. You don't have to be a
registered user of our BBS to download this file.

- Chuck Gilmore

 December 7, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>