A network engineer must understand the real threats to the network infrastructure (e.g., risk assessment or business impact analysis) before he can offer security consultancy services. We will analyze different categories of threats to confidentiality, integrity, and availability, including:
- Denial of Service (DoS) and Distributed Denial of Service (DDoS) attacks
- Spoofing (masquerading)
- Telnet attacks
- Password cracking programs
- Viruses
- Trojans and worms
These threats must be analyzed in the context of the network areas they affect and considering the exact system component they target.
Denial of Service Attacks
The main purpose of a Denial of Service (DoS) attack is to render a machine or a network resource unavailable to its intended users. In this particular type of attack, the attacker does not try to gain access to a resource; rather, he tries to induce a loss of access to different users or services. The resources can include:
- The entire enterprise network
- The CPU of a network device or server
- The memory of a network device or server
- The disk of a network device or server
A DoS attack results in the resource being overloaded (e.g., in terms of disk space, bandwidth, memory, buffer overflow, or queue overflow), and this will cause the resource to become unavailable for usage. This can vary from blocking access to a particular resource to actually crashing a network device or server. There are many types of DoS attacks, such as ICMP attacks and TCP flooding.
An advanced form of DoS attack is Distributed Denial of Service (DDoS), which works by manipulating a large number of systems to launch an attack on a target over the Internet or over an enterprise network. To deploy a DDoS attack, hackers usually break into weakly secured hosts (e.g., using common security holes in the operating systems or applications used) and compromise the systems by installing malicious code, which gives the attacker full access to the victims’ resources. After many systems are compromised, they can be used to launch a massive simultaneous attack on a target that will be overwhelmed by a very large number of illegitimate requests. Figure 30.2 below illustrates the difference between a DoS attack and a DDoS attack:
Figure 30.2 – DoS Attack versus DDoS Attack
| Note: The process of sending illegitimate requests by the attacker to a network resource is also called flooding.
|
Spoofing and Man-in-the-Middle Attacks
A spoofing (or masquerading) attack is the process in which a single host or entity falsely assumes (spoof) the identity of another host. A common spoofing attack is called the man-in-the -middle (MITM) attack and it works by convincing two different hosts (the sender and the receiver) that the computer in the middle is actually the other host (see Figure 30.3 below). This is accomplished using DNS spoofing, where a hacker compromises a DNS server and explicitly changes the name resolution entries.
Another type of masquerading attack is ARP spoofing, where the ARP cache is altered and thus the Layer 2-to-Layer 3 address mapping entries are changed in order to redirect the traffic through the attacker’s machine. This type of attack is usually targeted within a Local Area Network.
Figure 30.3 – Man-in-the-Middle Attack
Telnet Attacks
Programs like Telnet and FTP employ user-based authentication but the credentials are sent in clear text (unencrypted) over the wire. These credentials can be captured by attackers using network monitoring tools and they can be used to gain unauthorized access to network devices.
Other related threats in this area are generated using old unsecured protocols like rlogin, rcp, or rsh that allow access to different systems. These unsecured protocols should be replaced by protocols like SSH or SFTP.
Password Cracking
Password cracking software is very easy to find nowadays and it can be used to compromise password security in different applications or services. The software works by revealing the password that has been previously encrypted with weak encryption algorithms (e.g., DES).
A way to prevent password cracking from happening is to enforce the company’s security policy by:
- Using strong encrypting algorithms (e.g., AES)
- Choosing complex passwords (a combination of letters, numbers, and special characters)
- Periodically changing passwords
Viruses
A virus is a generic term for any type of program that attaches to individual files on a target system. Once the virus appends its original code to a victim’s file, the victim is infected and the file is changed and can infect other files through a process called replication.
The replication process can spread across hard disks and it can infect the entire operating system. Once a virus is linked to an executable file, it will infect other files every time the host file is executed. There are three major types of viruses, depending on where they act:
- MBR (Master Boot Sector) viruses
- Boot sector viruses
- File viruses
MBR and boot sector viruses affect the boot sector on the physical disk and render the operating system unable to boot. File viruses represent the most common type of viruses and they affect different types of files.
Another way to categorize viruses is based on their behavior, of which there are two types:
- Stealth viruses
- Polymorphic viruses
Stealth viruses use different techniques to hide the fact that a change to the disk drive was made. Polymorphic viruses are difficult to identify because they can mutate, meaning they can change their size, and they can avoid detection by special software. When using these virus detection programs, the recommendation is to make sure that they are updated as often as possible so they are capable of scanning for new forms of viruses.
Trojans and Worms
Trojan programs are basically unauthorized code that is contained in legitimate programs and performs functions that are hidden to the user. Worms are other illegitimate pieces of software that can be attached to e-mails, and once they are executed they can propagate themselves within the file system and perform unauthorized functions, like redirecting user traffic to certain websites.
Social Engineering Attacks
Social engineering attacks are difficult to identify because they are not electronically detectable. They function via direct human interaction in which an attacker (assuming a different identity) convinces an employee to disclose confidential information. That information can be used by the attacker to gain access to the network.
Some of the forms of social engineering attacks include the following:
- Attacker pretends to be from tech support and asks for user authentication information for verification purposes
- Attacker pretends to be a high-level manager and asks for user confidential information
- Attacker pretends to have obtained authorization from the employee’s manager and asks for confidential information
- Tailgating: an attacker, seeking entry to a restricted area secured by unattended, electronic access control (e.g., by an RFID card), simply walks in behind a person who has legitimate access
- Baiting: the attacker leaves a malware-infected floppy disk, CD-ROM, or USB flash drive in a location sure to be found (e.g., bathroom, elevator, sidewalk, or parking lot), gives it a legitimate-looking and curiosity-piquing label, and simply waits for the victim to use the device
- Phishing: the attacker sends an e-mail that appears to come from a legitimate business (e.g., a bank or credit card company) requesting verification of information (the e-mail usually contains a link to a fraudulent Web page that seems legitimate and has a form requesting everything from a home address to an ATM card’s PIN)
- Phone phishing: phishing over the phone
Some of the most important actions that can be taken against social engineering attacks are:
- Clear enterprise security policies
- User training
Buffer Overflow Attacks
A buffer overflow attack is one that takes advantage of an application’s vulnerability. Applications have different storage areas in their memory called buffers, and if you try to store more information than the buffer size, data might be “spilled” to adjacent memory areas that should not be accessed. An attacker might take advantage of this behavior and may write malware code in certain memory areas in order for this to be executed.
Once an attacker discovers a possible buffer overflow, this does not mean he can consider it a vulnerability. Careful analysis has to be made, as many times overflowing a buffer can simply make the application crash. An attacker determined to make use of a buffer overflow weakness must figure out exactly how much and what type of data should be injected. If the buffer overflow can be performed in a repeated and predictable way, the attacker can take over the system.
Buffer overflow attacks can be prevented by developers performing proper checks and imposing restrictions on what and where information can be entered. It is very important for developers to reserve a serious amount of time for testing, as possible attackers also have a lot of time to search for weaknesses in the applications.
Another way to protect against buffer overflow attacks is to perform regular system patches, as new vulnerabilities are discovered on a regular basis.
Packet Sniffing Attacks
Packets that are captured (sniffed) on a network link may provide a lot of useful information for an attacker, whether it’s in a wired or wireless environment. This type of attack is still an option for attackers because many users still send unencrypted confidential traffic through the network. Some of the things an attacker can do with captured packets include the following:
- Rebuild them to see:
- Mail exchange
- Websites accessed by the users
- Layer 3 information (IP addresses, routing protocols, etc.)
- Layer 2 information (MAC addresses)
- Device and topology discovery
As mentioned in previous chapters, the open source application Wireshark is the most commonly used packet capturing tool. When using wireless networks it is very easy to gather packets because this can be done without physically accessing the infrastructure.
If you want to prevent attackers from seeing private information if they do capture packets, you should encrypt your communication. On wired networks it is recommended that you use HTTPS or VPN tunnels, and in wireless environments you should use WPA2 encryption.
FTP Bounce Attack
The bounce attack is used with an FTP server and it sends traffic to a third device on a network. It uses FTP in passive mode and takes advantage of the client initiating both the command and data sessions.
This attack functions by the client instructing the FTP server to send the information to a third-party receiver instead of the client’s machine. This vulnerability is not really used in modern environments, as FTP servers know about this and prevent this behavior.

