Computer viruses - Beginners guide to hacking and penetration testing (2017)

Beginners guide to hacking and penetration testing (2017)

Computer viruses

Computer viruses can serve a number of uses ranging from malicious mischief to serving as a backdoor into a network or computer. Denial of Service attacks (DDOS) can also play into this by creating a distraction. In this section we will be looking at some virus tools and creating viruses.

Computer Viruses:

Computer viruses have evolved over the years into several different categories. Computer viruses are an important part to hacking, penetration testing and network security. They can be employed to create a distraction, backdoors, or even as a method of ransom. Below are some of the common types of viruses:

Ransomware/cryptoware: This type of virus will encrypt the files on your computer and possibly spread through your network, after which a ransom page will appear with instructions as to how to pay the hacker and unlock your files. The amount of ransom varies, often times staying within a "reasonable" amount in order to increase the likelihood of the hacker to get paid. No one is safe from this as home users, hospitals, schools, and police departments have been targeted. To make matters worse, paying the ransom does not always mean your files will be unlocked. If a system does become infected by one of these remove it from the network in order to isolate it. If you are able to identify the type of ransomware you may be lucky enough to find a unlock program, otherwise you will likely need to restore from a backup.

Scripts: This type of virus tend to be simple programs that are generated from a virus tool. These often times fall under the "script kiddie" category and in general will be detected by many antiviruses.

Trojans: This type of virus is hidden within legitimate programs. Downloading cracked programs and filesharing can contain Trojans. Once on your system the payloads can vary.

DDOS Attacks:

Low Orbit Ion Cannon or LOIC is another method of attack that relies on flooding the target's network in a DOS or DDOS (Denial of service or Distributed denial of service).

The use of this attack is incredibly simple.

• Under the URL or IP field the attacker would enter the address and click "Lock on"

• Under "Attack options" the attacker can set the attack method (TCP, UDP, etc.)

Port number and threads can be set

• Once all the settings are in place all they need to do is click "IMMA CHARGIN MAH LAZERS" and the attack will commence.

Virus Creation Tool:

Below is one of many virus creation tools that can be found online. This is to help demonstrate how easy it is for a person to create a virus.

As you can see from the screen above launching the program it has several options to select with a click

of the mouse.

From there we simply click the "Build" tab, name our virus, and save it.

Making a virus:

Part of hacking is computer viruses, viruses can cause havoc, create backdoors, or create a diversion for us. In this section we will be making what is known as a Fork bomb virus.

A Fork bomb virus is an incredibly simple virus to make, yet efficient. In short the virus is a denial of service attack on the computer that will tie up the system resources until the computer crashes.

As a reminder this is intended for educational purposes and should not be used for malicious means.

How it works: The virus itself is a batch file who's command is to run itself in a replicating fashion. The first instance opens 2 of the same program, those 2 open 4, those for open 8, and so on until the computer locks up.

How to make your virus:

In your test editor (in this case I am using Notepad) type: start forkbomb.bat

Click File and Save then save the file as forkbomb.bat

There you have your virus. I tested this on an Intel i7 with 8GB of memory and was able to crash the system after a couple minutes.