02.03.2018 Views

Sybex CEH Certified Ethical Hacker Version 8 Study Guide

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Malware 189<br />

How to Create a Virus<br />

Creating a virus is a process that can be very complicated or something that happens with<br />

a few button clicks (see Exercise 8.1). Advanced programmers may choose to code the<br />

malware from scratch. The less savvy or experienced may have to pursue other options,<br />

such as hiring someone to write the virus, purchasing code, or using an “underground”<br />

virus-maker application.<br />

CREATING A VIRUS<br />

Exercise 8.1: Creating a Simple Virus<br />

So: let’s write a simple virus. You need access to Notepad and bat2com, the latter of which<br />

you can find on the Internet:<br />

Before you get started, here’s a warning: Do not execute this virus. This exercise is meant<br />

to be a proof of concept and for illustrative purposes only. Executing this code on your<br />

system could result in damage to your system that may require extensive time and skill to fix<br />

properly. With that said, follow these steps:<br />

1. Create a batch file called virus.bat using Windows Notepad.<br />

2. Enter the following lines of code:<br />

@echo off<br />

Del c:\windows\system32\*.*<br />

Del c:\windows\*.*<br />

3. Save virus.bat.<br />

4. From the command prompt, use bat2com to convert virus.bat into virus.com.<br />

Another way to create a virus is to use a utility such as JPS Virus Maker. It is a simple<br />

utility in which you pick options from a GUI and then choose to create a new executable<br />

file that can be used to infect a host. Figure 8.1 shows the interface for JPS Virus Maker.<br />

Researching Viruses<br />

There are many defensive techniques for fighting malware, many of which we will<br />

discuss later in this chapter; but what about researching new malware? If you need to<br />

investigate and analyze malware in addition to defending against it, you should know<br />

about a mechanism known as a sheep-dip system. A sheep dip system is a computer that is<br />

specifically configured to analyze files. The system typically is stripped down and includes<br />

only those services and applications needed to test software to ascertain whether or not<br />

it is safe.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!