Search Favourite Tips

Showing posts with label DDos. Show all posts
Showing posts with label DDos. Show all posts

Tuesday, 26 April 2016

Investigation Report: Computer Viruses Work

How Computer Viruses Work



Anyone who has ever been through a virus attacking their system knows all too well that it can be incredibly stressful.
Strange as it may sound, the computer virus is something of an Information Age marvel. On one hand, viruses show us how vulnerable we are -- a properly engineered virus can have a devastating effect, disrupting productivity and doing billions of dollars in damages. On the other hand, they show us how sophisticated and interconnected human beings have become.
For example, experts estimate that the Mydoom worm infected approximately a quarter-million computers in a single day in January 2004. Back in March 1999, the Melissa virus was so powerful that it forced Microsoft and a number of other very large companies to completely turn off their e-mail systems until the virus could be contained. The ILOVEYOU virus in 2000 had a similarly devastating effect. In January 2007, a worm called Storm appeared -- by October, experts believed up to 50 million computers were infected. That's pretty impressive when you consider that many viruses are incredibly simple.

When you listen to the news, you hear about many different forms of electronic infection. The most common are:
  • Viruses: A virus is a small piece of software that piggybacks on real programs. For example, a virus might attach itself to a program such as a spreadsheet program. Each time the spreadsheet program runs, the virus runs, too, and it has the chance to reproduce (by attaching to other programs) or wreak havoc.
  • E-mail viruses: An e-mail virus travels as an attachment to e-mail messages, and usually replicates itself by automatically mailing itself to dozens of people in the victim's e-mail address book. Some e-mail viruses don't even require a double-click -- they launch when you view the infected message in the preview pane of your e-mail software [source: Johnson].
  • Trojan horses: A Trojan horse is simply a computer program. The program claims to do one thing (it may claim to be a game) but instead does damage when you run it (it may erase your hard disk). Trojan horses have no way to replicate automatically.
  • Worms: A worm is a small piece of software that uses computer networks and security holes to replicate itself. A copy of the worm scans the network for another machine that has a specific security hole. It copies itself to the new machine using the security hole, and then starts replicating from there, as well.
In this article, we will discuss viruses -- from "traditional" viruses to e-mail viruses and exploits that could target your mobile phone -- so that you can learn how they work and understand how to protect yourself.

Virus Origins:

Computer viruses are called viruses because they share some of the traits of biological viruses. A computer virus passes from computer to computer like a biological virus passes from person to person.

Unlike a cell, a virus has no way to reproduce by itself. Instead, a biological virus must inject its DNA into a cell. The viral DNA then uses the cell's existing machinery to reproduce itself. In some cases, the cell fills with new viral particles until it bursts, releasing the virus. In other cases, the new virus particles bud off the cell one at a time, and the cell remains alive.

Similar to the way a biological virus must hitch a ride on a cell, a computer virus must piggyback on top of some other program or document in order to launch. Once a computer virus is running, it can infect other programs or documents. Obviously, the analogy between computer and biological viruses stretches things a bit, but there are enough similarities that the name sticks.

People write computer viruses. A person has to write the code, test it to make sure it spreads properly and then release it. A person also designs the virus's attack phase, whether it's a silly message or the destruction of a hard disk. Why do they do it?

There are at least four reasons. The first is the same psychology that drives vandals and arsonists. Why would someone want to break a window on someone's car, paint signs on buildings or burn down a beautiful forest? For some people, that seems to be a thrill. If that sort of person knows computer programming, then he or she may funnel energy into the creation of destructive viruses.

The second reason has to do with the thrill of watching things blow up. Some people have a fascination with things like explosions and car wrecks. When you were growing up, there might have been a kid in your neighborhood who learned how to make gunpowder. And that kid probably built bigger and bigger bombs until he either got bored or did some serious damage to himself. Creating a virus is a little like that -- it creates a virtual bomb inside a computer, and the more computers that get infected, the more "fun" the explosion.

The third reason involves bragging rights. Sort of like Mount Everest -- the mountain is there, so someone is compelled to climb it. If you are a certain type of programmer who sees a security hole that could be exploited, you might simply be compelled to exploit the hole yourself before someone else beats you to it.
And then there's cold, hard cash. Viruses can trick you into buying fake software, steal your personal information and use it to get to your money, or be sold on the digital equivalent of the black market. Powerful viruses are valuable -- and potentially lucrative -- tools.

Of course, most virus creators seem to miss the point that they cause real damage to real people with their creations. Destroying everything on a person's hard disk is real damage. Forcing a large company to waste thousands of hours cleaning up after a virus attack is real damage. Even a silly message is real damage because someone has to waste time getting rid of it. For this reason, the legal system continues to develop more rigorous penalties for people who create viruses.

Virus History:

Ah, the floppy disk: When most people were using these to store and transport computer programs, viruses spread like wildfire.
Ah, the floppy disk: When most people were using these to store and transport computer programs, viruses spread like wildfire.
Traditional computer viruses were first widely seen in the late 1980s, and came about because of several factors. The first factor was the spread of personal computers (PCs). Prior to the 1980s, home computers were nearly non-existent. Real computers were rare, and were locked away for use by "experts." During the '80s, real computers started to spread to businesses and homes because of the popularity of the IBM PC (released in 1982) and the Apple Macintosh (released in 1984). By the late 1980s, PCs were in businesses, homes and college campuses.

The second factor was the use of computer bulletin boards. People could dial up a bulletin board with a modem and download programs of all types. Games were extremely popular, and so were simple word processors, spreadsheets and other productivity software. Bulletin boards led to the precursor of the virus known as the Trojan horse. A Trojan horse masquerades as a program with a cool-sounding name and description, enticing you to download it. When you run the program, however, it does something uncool, like erasing your hard drive. You think you're getting a neat game, but instead, you get a wiped-out system. Trojan horses only hit a small number of people because they're quickly discovered, and word of the danger spreads among users.

The third factor that led to the creation of viruses was the floppy disk. In the 1980s, programs were small, and you could fit the entire operating system, a few programs and some documents onto a floppy disk or two. Many computers did not have hard disks, so when you turned on your machine it would load the operating system and everything else from the floppy disk. Virus authors took advantage of this to create the first self-replicating programs.

Early viruses were pieces of code embedded in a larger, legitimate program, such as a game or word processor. When the user downloads and runs the legitimate program, the virus loads itself into memory --­ and looks around to see if it can find any other programs on the disk. If it can find one, it modifies the program to add the virus's code into that program. Then the virus launches the "real program." The user really has no way to know that the virus ever ran. Unfortunately, the virus has now reproduced itself, so two programs are infected. The next time the user launches either of those programs, they infect other programs, and the cycle continues.

If one of the infected programs is given to another person on a floppy disk, or if it is uploaded so other people can download it, then other programs get infected. This is how the virus spreads -- similar to the infection phase of a biological virus. But viruses wouldn't be so violently despised if all they did was replicate themselves. Most viruses also have a destructive attack phase where they do real damage. Some sort of trigger will activate the attack phase, and the virus will then do something -- anything from displaying a silly message on the screen to erasing all of your data. The trigger might be a specific date, a number of times the virus has been replicated or something similar.

In the next section, we will look at how viruses have evolved over the years.

Virus Evolution:

Virus creators have added new tricks to their bag throughout the years. One such trick is the ability to load viruses into memory so they can keep running in the background as long as the computer remains on. This gives viruses a much more effective way to replicate themselves. Another trick is the ability to infect the boot sector on floppy disks and hard disks. The boot sector is a small program that is the first part of the operating system that the computer loads. It contains a tiny program that tells the computer how to load the rest of the operating system. By putting its code in the boot sector, a virus can guarantee it's executed. It can load itself into memory immediately, and run whenever the computer is on. Boot sector viruses can infect the boot sector of any floppy disk inserted in the machine, and in places like college campuses, where lots of people share machines, they can spread like wildfire.

In general, neither executable nor boot sector viruses are very threatening today. The first reason for their decline has been the huge size of today's programs. Most programs you buy today come on compact discs. Commercially distributed compact discs (CDs) cannot be modified, and that makes viral infection of a CD unlikely, unless the manufacturer permits a virus to be burned onto the CD during production. People certainly can't carry applications around on floppy disks like they did in the 1980s, when floppies full of programs were traded like baseball cards. Boot sector viruses have also declined, because operating systems now routinely protect the boot sector.

Infection from boot sector viruses and executable viruses is still possible. Even so, it's a lot less likely than it once was. Call it "shrinking habitat," if you want to use a biological analogy. The environment of floppy disks, small programs and weak operating systems made these viruses possible in the 1980s, but that environmental niche has been largely eliminated by huge executables, unchangeable CDs and better operating system safeguards.

E-mail viruses are probably the most familiar to you. We'll look at those in the next section.

E-mail Viruses:

Virus authors adapted to the changing computing environment by creating the e-mail virus. For example, the Melissa virus in March 1999 was spectacular in its attack. Melissa spread in Microsoft Word documents sent via e-mail, and it worked like this:

Someone created the virus as a Word document and uploaded it to an Internet newsgroup. Anyone who downloaded the document and opened it would trigger the virus. The virus would then send the document (and therefore itself) in an e-mail message to the first 50 people in the person's address book. The e-mail message contained a friendly note that included the person's name, so the recipient would open the document, thinking it was harmless. The virus would then create 50 new messages from the recipient's machine. At that rate, the Melissa virus quickly became the fastest-spreading virus anyone had seen at the time. As mentioned earlier, it forced a number of large companies to shut down their e-mail systems to control the spread.

The ILOVEYOU virus, which appeared on May 4, 2000, was even simpler. It contained a piece of code as an attachment. People who double-clicked on the attachment launched the code. It then sent copies of itself to everyone in the victim's address book and started corrupting files on the victim's machine. This is as simple as a virus can get. It is really more of a Trojan horse distributed by e-mail than it is a virus.

The Melissa virus took advantage of the programming language built into Microsoft Word called VBA, or Visual Basic for Applications. It is a complete programming language and it can be used to write programs that do things like modify files and send e-mail messages. It also has a useful but dangerous auto-execute feature. A programmer can insert a program into a document that runs instantly whenever the document is opened. This is how the Melissa virus was programmed. Anyone who opened a document infected with Melissa would immediately activate the virus. It would send the 50 e-mails, and then infect a central file called NORMAL.DOT so that any file saved later would also contain the virus. It created a huge mess.
Microsoft applications have a feature called Macro Virus Protection built into them to prevent this sort of virus. With Macro Virus Protection turned on (the default option is ON), the auto-execute feature is disabled. So, when a document tries to auto-execute viral code, a dialog pops up warning the user. Unfortunately, many people don't know what macros or macro viruses are, and when they see the dialog they ignore it, so the virus runs anyway. Many other people turn off the protection mechanism. Because of this, the Melissa virus spread despite the safeguards in place to prevent it.

In the case of the ILOVEYOU virus, the whole thing was human-powered. If a person double-clicked on the program that came as an attachment, then the program ran and did its thing. What fueled this virus was the human willingness to double-click on the executable. The same kinds of exploits have also been passed over instant messaging networks like AIM and Windows Live Messenger. Commandeered accounts will send out links to viruses in instant messages; anyone who clicks the link and installs a Trojan application will have their own account hijacked and unwittingly spam their own friends with the compromising link.

Now that we've covered e-mail viruses, let's take a look at worms.

Worms:

A worm is a computer program that has the ability to copy itself from machine to machine. Worms use up computer processing time and network bandwidth when they replicate, and often carry payloads that do considerable damage. A worm called Code Red made huge headlines in 2001. Experts predicted that this worm could clog the Internet so effectively that things would completely grind to a halt.

A worm usually exploits some sort of security hole in a piece of software or the operating system. For example, the Slammer worm (which caused mayhem in January 2003) exploited a hole in Microsoft's SQL server. Wired magazine took a fascinating look inside Slammer's tiny (376 byte) program.

Worms normally move around and infect other machines through computer networks. Using a network, a worm can expand from a single copy incredibly quickly. The Code Red worm replicated itself more than 250,000 times in approximately nine hours on July 19, 2001 [Source: Rhodes].

The Code Red worm slowed down Internet traffic when it began to replicate itself, but not nearly as badly as predicted. Each copy of the worm scanned the Internet for Windows NT or Windows 2000 servers that did not have the Microsoft security patch installed. Each time it found an unsecured server, the worm copied itself to that server. The new copy then scanned for other servers to infect. Depending on the number of unsecured servers, a worm could conceivably create hundreds of thousands of copies.

The Code Red worm had instructions to do three things:
  • Replicate itself for the first 20 days of each month
  • Replace Web pages on infected servers with a page featuring the message "Hacked by Chinese"
  • Launch a concerted attack on the White House Web site in an attempt to overwhelm it [source: eEyeDigitalSecurity]
Upon successful infection, Code Red would wait for the appointed hour and connect to the www.whitehouse.gov domain. This attack would consist of the infected systems simultaneously sending 100 connections to port 80 of www.whitehouse.gov (198.137.240.91).

The U.S. government changed the IP address of www.whitehouse.gov to circumvent that particular threat from the worm and issued a general warning about the worm, advising users of Windows NT or Windows 2000 Web servers to make sure they installed the security patch.

A worm called Storm, which showed up in 2007, immediately started making a name for itself. Storm used social engineering techniques to trick users into loading the worm on their computers. And boy, was it effective -- experts believe between 1 million and 50 million computers have been infected [source: Schneier]. Anti-virus makers adapted to Storm and learned to detect the virus even as it went through many forms, but it was easily one of the most successful viruses in Internet history and could someday rear its head again. At one point, the Storm worm was believed to be responsible for 20 percent of the Internet's spam mail [source: Kaplan].

When the worm is launched, it opens a back door into the computer, adds the infected machine to a botnet and installs code that hides itself. Botnets are small peer-to-peer groups, rather than a larger, more easily identified network. Experts think the people controlling Storm rent out their micro-botnets to deliver spam or adware, or for denial-of-service attacks on Web sites.

Viruses of all kinds were a major threat in the early years of the Internet's growth. They're still out there, but since the mid-2000s anti-virus software has gotten better and Web browsers and operating systems have become more secure. Will the big threat of the 2010s be levied against smartphones rather than PCs?

Viruses In the 2000s and Beyond:

Anti-virus software is vital to keeping your system free of problems.

Anti-virus software is vital to keeping your system free of problems.
New viruses pop up all the time, but it's rare for a worm or other exploit to have the kind of impact that Storm once did. The 10 Worst Computer Viruses of All Time struck around the turn of the century and in the early 2000s. Computers were ripe targets: Anti-virus software was expensive and not always reliable, Microsoft's Internet Explorer was ripe for exploitation and PC users were unaware of how easily viruses could spread over the Internet. Viruses haven't had the same kind of impact in recent years for a number of reasons.

People are a bit better educated about viruses. Free anti-virus software is easy to download. Microsoft recommends its own Security Essentials, while companies like AVG and Avast offer their own free alternatives. Computer software, in general, is designed with the Internet in mind and is less susceptible to viruses. Just compare today's Chrome and Firefox browsers to the infamously terrible Internet Explorer 6, which was patched for over a decade after its release in 2001. Viruses are still around, of course -- in 2009, a worm called Downadup infected millions of computers in a matter of days. We're just getting better at handling them.

There are more viruses than ever out there for anti-virus software to keep track of. These programs will automatically update themselves regularly -- often even daily -- to guard against the latest virus mutations on the Internet. Just look at Avast's Virus Update History to see how many Trojans, worms and other nefarious bits of code are added to the database every day.

In a modern era of smartphones and tablets, it's actually easier than ever to browse the Internet without getting a virus. Why? Because viruses are written for specific platforms. A virus intended to exploit something on Windows won't work on Apple's Mac operating system -- the code that makes up the two systems is completely different. Similarly, the code that makes up mobile operating systems like Android and iOS is different from the code on PCs. Viruses that would cripple your computer won't work on mobile devices.

But mobile devices aren't completely secure, themselves. There are viruses out there that can extract personal information from Android phones. Because Apple's iOS is a closed source platform, unlike the open source Android, it's more difficult to target with viruses. Besides, Windows is still a juicier target. While mobile viruses will certainly become more popular as smartphone sales increase, as of 2011, they're a very minor concern.

In the next section, we'll look at patching your PC and other things you can do to protect your computer.

How to Protect Your Computer from Viruses:

You can protect yourself against viruses with a few simple steps:

If you're truly worried about traditional (as opposed to e-mail) viruses, you should be running a more secure operating system like Linux and, to a lesser extent, Apple's Mac OS X. You never hear about viruses on these operating systems because they represent such a small part of the market they're targeted by far fewer viruses than the Windows operating system. Apple's OS X has seen its share, but viruses are still predominately a Windows problem.

If you're using an unsecured operating system, then installing virus protection software is a nice safeguard. Many anti-virus options are available for free online.

If you simply avoid programs from unknown sources (like the Internet), and instead stick with commercial software purchased on CDs, you eliminate almost all of the risk from traditional viruses.

You should make sure that Macro Virus Protection is enabled in all Microsoft applications, and you should NEVER run macros in a document unless you know what they do. There is seldom a good reason to add macros to a document, so avoiding all macros is a great policy.

You should never double-click on an e-mail attachment that contains an executable. Attachments that come in as Word files (.DOC), spreadsheets (.XLS), images (.GIF), etc., are data files and they can do no damage (noting the macro virus problem in Word and Excel documents mentioned above). However, some viruses can now come in through .JPG graphic file attachments. A file with an extension like EXE, COM or VBS is an executable, and an executable can do any sort of damage it wants. Once you run it, you have given it permission to do anything on your machine. The only defense: Never run executables that arrive via e-mail.

By following these simple steps, you can remain virus-free.

Monday, 25 April 2016

Investigation Report: How Zombie Computers Work

How Zombie Computers Work



Zombie computers are computers that have been taken over by a hacker without the knowledge of the owner. See more ­computer pictures.
Zombie computers are computers that have been taken over by a hacker without the knowledge of the owner. 

­Imagine that the Internet is a city. It would undoubtedly be the most remarkable and diverse city on the planet, but it would also be incredibly seedy and dangerous. You could find the world's most comprehensive libraries there alongside X-rated theaters.

 

Inside this city, you would also discover that not everyone is who they seem to be -- even yourself. You might find out that you've been misbehaving, although you don't remember it. Like the unwitting agent in "The Manchurian Candidate," you discover you've been doing someone else's bidding, and you have no idea how to stop it.

A zombie computer is very much like the agent in "The Manchurian Candidate." A cracker -- a computer hacker who intends mischief or harm -- secretly infiltrates an unsuspecting victim's computer and uses it to conduct illegal activities. The user generally remains unaware that his computer has been taken over -- he can still use it, though it might slow down considerably. As his computer begins to either send out massive amounts of spam or attack Web pages, he becomes the focal point for any investigations involving his computer's suspicious activities.

­The user might find that his Internet Service Provider (ISP) has cancelled his service, or even that he's under investigation for criminal activity. Meanwhile, the cracker shrugs off the loss of one of his zombies because he has more. Sometimes, he has a lot more -- one investigation allegedly discovered that a cracker's single computer controlled a network of more than 1.5 million computers [source: TechWeb].

In this article we'll look at how crackers can commandeer your computer, why they do it and the best way to protect yourself from malicious attacks.

Hacking a Computer:

­Crackers transform computers into zombies by using small­ programs that exploit weaknesses in a computer's operating system (OS). You might think that these crackers are cutting-edge Internet criminal masterminds, but in truth, many have little to no programming experience or knowledge. (Sometimes people call these crackers "script kiddies" because they are young and show no proficiency in writing script or code.) Investigators who monitor botnets say that the programs these crackers use are primitive and poorly programmed. Despite the ham-handed approach, these programs do what the crackers intended them to do -- convert computers into zombies.

In order to infect a computer, the cracker must first get the installation program to the victim. Crackers can do this through e-mail, peer-to-peer networks or even on a regular Web site. Most of the time, crackers disguise the malicious program with a name and file extension so that the victim thinks he's getting something entirely different. As users become savvier about Internet attacks, crackers find new ways to deliver their programs. Have you ever seen a pop-up ad that included a "No Thanks" button? Hopefully you didn't click on it -- those buttons are often just decoys. Instead of dismissing the annoying pop-up ad, they activate a download of malicious software.

Once the victim receives the program, he has to activate it. In most cases, the user thinks the program is something else. It might appear to be a picture file, an MPEG or some other recognizable file format. When the user chooses to run the program, nothing seems to happen. For some people, this raises alarm bells and they immediately follow up with a flurry of virus and spyware scanner activity. Unfortunately, some users simply think they received a bad file and leave it at that.

Meanwhile, the activated program attaches itself to an element of the user's operating system so that every time the user turns on his computer, the program becomes active. Crackers don't always use the same segment of an operating system's initializing sequence, which makes detection tricky for the average user.
The program either contains specific instructions to carry out a task at a particular time, or it allows the cracker to directly control the user's Internet activity. Many of these programs work over an Internet Relay Chat (IRC), and in fact there are botnet communities on IRC networks where fellow crackers can help one another out -- or attempt to steal another cracker's botnet.

Once a user's computer is compromised, the cracker pretty much has free reign to do whatever he likes. Most crackers try to stay below the radar of users' awareness. If a cracker alerts a user to his presence, the cracker risks losing a bot. For some crackers, this isn't much of a problem since some networks number in the hundreds of thousands of zombies.
In the next section, we'll look at the relationship between zombie computers and spam.

­

Spam Distribution:

Crackers sometimes turn unsuspecting victims' computers into zombie computers to spread e-mail across the world. E-mail recipients usually can't trace the e-mail back to its source.
Crackers sometimes turn unsuspecting victims' computers into zombie computers to spread e-mail across the world. E-mail recipients usually can't trace the e-mail back to its source.
 
Spam continues to be a huge problem. It's a frustrating experience to open your e-mail and sort through dozens of examples of junk mail. Where does all that spam come from? According to FBI estimates, a large percentage of it comes from networked zombie computers.

If spam came from one centralized source, it would be relatively easy to track it down and either demand the corresponding ISP shut down that computer's access to the Internet or charge the user for sending out illegal spam. To get around these pitfalls, crackers rely on zombie computers. The zombie computer becomes a proxy, meaning the cracker is one step removed from the origin of spam e-mails. A cracker with a large botnet can send millions of spam messages every day.

Crackers might set up a spam botnet to deliver a computer virus or Trojan program to as many computers as possible. They also can use spam to send phishing messages, which are attempts to trick users into sharing personal information (we'll talk more about phishing later).

When sending out ads in spam mail, the cracker either sets up the botnet specifically for a client or he rents it out on an hourly basis. Clients who wish to advertise their products (and who don't care how intrusive or illegal their advertisements might be) pay the crackers to send out e-mail to thousands of people.

The majority of e-mail recipients usually can't figure out where the spam is coming from. They might block one source only to receive the same spam from a different zombie in the botnet. If the e-mail includes a message that says something like "Click here to be removed from this e-mail list," they might fall prey to exposing their computer to even more spam. Users savvy enough to track the e-mail back may not notice that the sender's computer is part of a larger network of compromised machines. For someone who knows what he's doing, it's not always impossible to figure out if a sender is a single user sending out spam or if a cracker is controlling the computer remotely. It is, however, time consuming.

A zombie-computer owner might realize a cracker is controlling his machine remotely if spam recipients write to complain about the junk mail or if his own e-mail outbox is full of messages he didn't write. Otherwise, the owner is likely to remain blissfully unaware that he's part of a ring of spammers. Some users don't seem to care if their machines are being used to spread spam mail as if it were someone else's problem and many more don't take the necessary precautions to avoid becoming part of a botnet.

In the next section, we'll talk about another vicious use of botnets -- distributed denial of service attacks.

Distributed Denial of Service Attacks:

Sometimes a cracker uses a network of zombie computers to sabotage a specific Web site or server. The idea is pretty simple -- a cracker tells all the computers on his botnet to contact a specific server or Web site repeatedly. The sudden increase in traffic can cause the site to load very slowly for legitimate users. Sometimes the traffic is enough to shut the site down completely. We call this kind of an attack a Distributed Denial of Service (DDoS) attack.

Some particularly tricky botnets use uncorrupted computers as part of the attack. Here's how it works: the cracker sends the command to initiate the attack to his zombie army. Each computer within the army sends an electronic connection request to an innocent computer called a reflector. When the reflector receives the request, it looks like it originates not from the zombies, but from the ultimate victim of the attack. The reflectors send information to the victim system, and eventually the system's performance suffers or it shuts down completely as it is inundated with multiple unsolicited responses from several computers at once.
From the perspective of the victim, it looks like the reflectors attacked the system. From the perspective of the reflectors, it seems like the victimized system requested the packets. The zombie computers remain hidden, and even more out of sight is the cracker himself.

The list of DDoS attack victims includes some pretty major names. Microsoft suffered an attack from a DDoS called MyDoom. Crackers have targeted other major Internet players like Amazon, CNN, Yahoo and eBay. The DDoS names range from mildly amusing to disturbing:

  • Ping of Death - bots create huge electronic packets and sends them on to victims
  • Mailbomb - bots send a massive amount of e-mail, crashing e-mail servers
  • Smurf Attack - bots send Internet Control Message Protocol (ICMP) messages to reflectors, see above illustration
  • Teardrop - bots send pieces of an illegitimate packet; the victim system tries to recombine the pieces into a packet and crashes as a result.

Once an army begins a DDoS attack against a victim system, there are few things the system administrator can do to prevent catastrophe. He could choose to limit the amount of traffic allowed on his server, but this restricts legitimate Internet connections and zombies alike. If the administrator can determine the origin of the attacks, he can filter the traffic. Unfortunately, since many zombie computers disguise (or spoof) their addresses, this isn't always easy to do.

In the next section we'll look at some other ways crackers use zombie computers.

Click Fraud:

Some crackers aren't interested in using zombie computers to send spam or cripple a particular target. Many take control of computers as a method of phishing, which is where a cracker tries to uncover secret information, particularly identification information. Crackers might steal your credit card information or search through your files for other sources of profit. The cracker might use a key logging program to track everything you type, then use it to discover your passwords and other confidential information.
Sometimes crackers will use zombie computers in ways that don't directly harm the victim of the initial attack or even the ultimate target, though the end goal is still pretty sneaky and unethical.

You've probably seen or even participated in several Internet-based polls. Perhaps you've even seen one where the results seemed unusual or counter-intuitive, particularly when it comes to a contest. While it's entirely possible the poll wasn't ever attacked, crackers have been known to use zombie computers to commit click fraud. Click fraud refers to the practice of setting up a botnet to repeatedly click on a particular link. Sometimes, crackers will commit click fraud by targeting advertisers on their own Web sites. Since Web advertisers usually pay sites a certain amount of money for the number of clicks an ad gets, the cracker could stand to earn quite a few dollars from fraudulent site visits.

Zombie computers and the crackers responsible for them are pretty scary. You could end up being the victim of identity theft or unknowingly participate in an attack on an important Web site. It's important to learn how to protect yourself from crackers as well as what you should do if you find out your computer has been compromised.

In the next section, we'll look at what security measures you should employ to prevent your computer from becoming a zombie.

Preventing Zombie Computer Attacks:


You don't want your computer to become a zombie, so what do you do to prevent it? The most important thing to remember is that prevention is an ongoing process -- you can't just set everything up and expect to be protected forever. Also, it's important to remember that unless you employ common sense and prudent Internet habits, you're courting disaster.
Antivirus software is an absolute necessity. Whether you purchase a commercial package like McAfee VirusScan or download a free program like AVG Anti-Virus Free Edition, you need to activate it and make sure your version remains current. Some experts say that to be truly effective, an antivirus package would need to update on an hourly basis. That's not practical, but it does help stress the importance of making sure your software is as up to date as possible.

Install spyware scanners to search for malicious spyware. Spyware includes programs that monitor your Internet habits. Some go even further, logging your keystrokes and recording everything you do on your computer. Get a good anti-spyware program like Ad-Aware from Lavasoft. Like the antivirus software, make sure the program stays up to date.

Install a firewall to protect your home network. Firewalls can be part of a software package or even incorporated into some hardware like routers or modems.

You should also make sure that your passwords are difficult or impossible to guess, and you shouldn't use the same password for multiple applications. This makes remembering all those passwords a pain, but it gives you an added layer of protection.

If your computer has already been infected and turned into a zombie computer, there are only a few options open to you. If you have access to tech support who can work on your computer for you, that would be the best option. If not, you can try to run a virus removal program to kill the connection between your computer and the cracker. Unfortunately, sometimes the only option you have is to erase everything on your computer and reload its operating system, then starting from scratch. You should make backup disks of your hard drive on a regular basis just in case. Remember to scan those files with an antivirus program to make sure none of them are corrupted.

Your computer is a great resource. Sadly, crackers think the same thing -- they want to make your computer their own resource. If you practice careful Internet habits and follow the tips we've described on this page, your chances of your computer remaining secure are very good.

To learn more about zombie computers and how to avoid them, check out the links on the next page.

Saturday, 16 April 2016

Defending Against DDos Attack.

What Is a DDoS Attack?

A distributed denial-of-service (DDoS) attack is a coordinated strike, distributed among different computers, that aims to prevent the authorized use of one or more systems.

These Web server DDoS attacks have become a weapon of choice for malicious actors to conduct cyber attacks. They are used by different types of attackers, from experienced cyber criminals to the bored teenager.

One of the assets that’s most often targeted by attackers is the public Web server of a victim. Although these servers might (and should) not hold that much sensitive or critical information, they are a target of choice because of their immediate public visibility and, consequently, the potential financial impact of an attack.
This article lists a number of protection mechanisms to defend against Web server DDoS attacks, more specifically those against Apache Web servers.

Types of DDoS Attacks

There are three types of DDoS attacks:
  • A volumetric attack, completed by overflowing the available bandwidth;
  • A traffic attack, done by abusing the available system resources;
  • An application attack, executed by exhausting the available system resources.
Sometimes attackers will combine the different types of attack into one campaign.
One of the most observed attack types is a volumetric attack, especially one that is amplification-based. In an amplification attack, packets with a spoofed source address are sent to a vulnerable service. This service will then reply with a much larger reply toward the spoofed address (the victim).

Motivation for the Attacks

Why do people conduct DDoS attacks? This can be for various reasons, but essentially, whatever bothers the attacker can be enough to trigger an incident.

The motivation can be political or ideological protest, blackmail, a smoke screen to hide other attacks, showing off technical skills or maybe just because someone is bored.

Be Ready for Web Server DDoS Attacks

There are a number of preventive measures you can take to be prepared for an attack, but you must realize that there is not always a proper defense against some large-scale strikes. Sometimes you just have to wait until the attacker loses interest and moves on to the next target.

What can you do to be prepared for a DDoS attack? It starts with a few best practices:
  • Understand your environment and prioritize your assets.
  • Apply best practices for the configuration of network devices, systems and services.
  • Monitor and log your networks, systems and services.
  • Have an incident response plan.
  • Have a crisis communication and business continuity plan.
When you design your incident response plan, you should also take into account how you have to interact with your ISP, service providers, CERTs and law enforcement agencies in the event of an attack. Setting up these communication channels and information exchange methods in advance allows you to focus on the core of the problem during an incident: incident handling.

Attackers can start a volumetric attack against a website but can also issue an application or traffic attack. When dealing with the volumetric attack, the mitigation is most often done on a network level, whereas the application and traffic types have some mitigation on the Web-service level.

Service Protection for Apache

For one of the most popular Web servers, Apache, there are a few mitigation solutions available.

About ModSecurity

ModSecurity is an open-source Web application firewall. It allows real-time application security monitoring and access control. The different sets of protection rules allow you to inspect the HTTP traffic and reliably block unwanted traffic. It allows you to fix session management issues and block SQL injection attempts. Most importantly, it’s an open architecture, so you can enable only the features that you consider necessary.
One of the biggest strengths of ModSecurity is virtual patching. You are protected against application vulnerabilities for which you are not yet able to patch.

With ModSecurity, you can protect and harden your website against unwanted malicious traffic and reduce the size of the possible attack vector.

About mod_evasive

Another item that you can add to your protection arsenal is mod_evasive. It is a module for Apache that provides evasive action in the event of an HTTP DoS or DDoS attack or brute-force attack.
The module tracks HTTP connections and verifies how many requests for a page are done within a given time frame. If the number of concurrent requests exceeds a specified threshold then the request is blocked. This blocking is done on an application level. The requester gets a forbidden answer to the request.
The configuration and setup (on Ubuntu) is fairly easy. The module is available as a package:

sudo apt-get install libapache2-mod-evasive
 
You then have to create the log directory. (Note: Make sure the directory is owned by the Web user; in most cases, this is www-data.)

sudo mkdir /var/log/mod_evasive
 
Then enable the module for the Apache Web server.

sudo a2enmod evasive
 
The default configuration file /etc/apache2/mods-available/evasive.conf will get you very far. You might want to add your management and proxy networks to the DOSWhitelist setting so that you do not block your own network. Also make sure you change DOSEmailNotify to a working email address, otherwise you won’t get notifications from mod_evasive.

If you’re not sure about the correct configuration options, test your setup with a Perl script that’s part of the installed package. The script performs a number of concurrent HTTP queries, which should trigger the module.

perl /usr/share/doc/libapache2-mod-evasive/examples/test.pl

About Fail2ban

The third method for protecting your Web server is Fail2ban. Fail2ban scans log files and bans IPs that show malicious signs. It is most often used to block SSH knock attempts, but you can also use it to block repeated requests to your Web resources.

Fail2ban uses a list of regular expressions and checks these expressions against a set of log files. If there are matches that go beyond a certain threshold, then the source IP of the request is blocked. The IP is blocked on a network level.

Similar to mod_evasive, the installation on Ubuntu is easy.
sudo apt-get install fail2ban
 
After installing the package, you have to copy the default configuration file to a working configuration file.
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
 
Add your own management and proxy networks to ignoreip and set a proper destemail email address for block notifications. I also advise you to set usedns to no.

Fail2ban uses jails to describe services that have to be protected. By default, Fail2ban enables the SSH jail. If you don’t want this, then disable the SSH jail. You can then add this apache-ddos jail to hold the custom configuration settings for protecting your Web server. Note that you can use pattern matching in the logpath (e.g., /var/log/apache*/*access.log).

Apache DDoS Jail for Fail2Ban

This will start a jail with the filter apache-ddos. The filters are defined in /etc/fail2ban/filter.d/. Add the file apache-ddos.conf to this location.

Apache DDoS Jail Filter for Fail2Ban
The above code will block IPs that do repeated request for HEAD or IPs that do repeated POST requests to xmlrpc.php. If you are not sure about the exact configuration or regular expressions, then have a look at the provided examples (e.g., apache-badbots, apache-noscript, etc).

The list of blocked IPs can be viewed if you list the active firewall rules (iptables -L -n). You can remove a blocked IP with:

fail2ban-client set apache-ddos unbanip 1.2.3.4
 
The fail2ban-client command is a useful command-line utility to get the status of the current jails, reload configuration, add individual IPs to the jail or stop and restart the service.

Conclusion

DDoS attacks are very hard to fight, especially if you are facing a volumetric attack. There are a couple of solutions for Apache Web servers that can limit the harm done by excess traffic and application attacks. Some of these, such as ModSecurity, will filter malicious traffic, whereas other solutions will block traffic on a network level (Fail2ban) or application level (mod_evasive).

The key to all this is having multiple lines of defense and adjusting the configuration of the different solutions to work together and provide an integrated solution.




© Kuyasa Mahbub