If you’re planning to take the SY0-501 version of the Security+ exam, you should understand many common and advanced types of attacks launched against systems and networks.
See if you can answer this sample practice test question.
Q. While reviewing logs for a web application, a developer notices that it has crashed several times reporting a memory error. Shortly after it crashes, the logs show malicious code that isn’t part of a known application. Which of the following is MOST likely occurring?
A. Buffer overflow
B. ARP poisoning
C.Privilege escalation
D. Replay
More, do you know why the correct answer is correct and the incorrect answers are incorrect? The answer and explanation are available at the end of this post.
ARP Poisoning Attacks
ARP poisoning is an attack that misleads computers or switches about the actual MAC address of a system. The MAC address is the physical address, or hardware address, assigned to the NIC. ARP resolves the IP addresses of systems to their hardware address and stores the result in an area of memory known as the ARP cache.
TCP/IP uses the IP address to get a packet to a destination network. Once the packet arrives on the destination network, it uses the MAC address to get it to the correct host.
ARP uses two primary messages:
• ARP request. The ARP request broadcasts the IP address and essentially asks, “Who has this IP address?”
• ARP reply. The computer with the IP address in the ARP request responds with its MAC address. The computer that sent the ARP request caches the MAC address for the IP. In many operating systems, all computers that hear the ARP reply also cache the MAC address.
A vulnerability with ARP is that it is very trusting. It will believe any ARP reply packet. Attackers can easily create ARP reply packets with spoofed or bogus MAC addresses, and poison the ARP cache on systems in the network. Two possible attacks from ARP poisoning are a man- in-the-middle attack and a DoS attack.
Replay Attacks
A replay attack is one where an attacker replays data that was already part of a communication session. In a replay attack, a third party attempts to impersonate a client that is involved in the original session. Replay attacks can occur on both wired and wireless networks.
As an example, Maggie and Bart may initiate a session with each other. During the communication, each client authenticates with the other by passing authentication credentials to the other system. Hacker Harry intercepts all the data, including the credentials, and later initiates a conversation with Maggie pretending to be Bart. When Maggie challenges Hacker Harry, he sends Bart’s credentials.
Many protocols use timestamps and sequence numbers to thwart replay attacks. For example, Kerberos helps prevent replay attacks with timestamped tickets.
Amplification Attacks
An amplification attack is a type of DDoS attack. It typically uses a method that significantly increases the amount of traffic sent to, or requested from, a victim. As an example, a smurf attack spoofs the source address of a directed broadcast ping packet to flood a victim with ping replies. It’s worthwhile to break this down:
• A ping is normally unicast—one computer to one computer. A ping sends ICMP echo requests to one computer, and the receiving computer responds with ICMP echo responses.
• The smurf attack sends the ping out as a broadcast. In a broadcast, one computer sends the packet to all other computers in the subnet.
• The smurf attack spoofs the source IP. If the source IP address isn’t changed, the computer sending out the broadcast ping will get flooded with the ICMP replies. Instead, the smurf attack substitutes the source IP with the IP address of the victim, and the victim gets flooded with these ICMP replies.
DNS amplification attacks send DNS requests to DNS servers spoofing the IP address of the victim. Instead of just asking for a single record, these attacks tell the DNS servers to send as much zone data as possible, amplifying the data sent to the victim. Repeating this process from multiple attackers can overload the victim system.
An example of a Network Time Protocol (NTP) amplification attack uses the monlist command. When used normally, it sends a list of the last 600 hosts that connected to the NTP server. In an NTP amplification attack with monlist, the attacker spoofs the source IP address when sending the command. The NTP server then floods the victim with details of the last 600 systems that requested the time from the NTP server.
Q. While reviewing logs for a web application, a developer notices that it has crashed several times reporting a memory error. Shortly after it crashes, the logs show malicious code that isn’t part of a known application. Which of the following is MOST likely occurring?
A. Buffer overflow
B. ARP poisoning
C. Privilege escalation
D. Replay
Answer is A. Buffer overflow attacks often cause an application to crash and expose system memory. Attackers then write malicious code into the exposed memory and use different techniques to get the system to run this code.
None of the other attacks insert malicious code into memory.
An Address Resolution Protocol (ARP) poisoning attack attempts to mislead systems about the source media access control (MAC) address.
Privilege escalation techniques attempt to give an attacker more rights and permissions.
In a replay attack, the attacker intercepts data and typically attempts to use the intercepted data to impersonate a user or system.
See Chapter 7 of the CompTIA Security+: Get Certified Get Ahead: SY0-501 Study Guide for more information on common attacks.