Security Monitoring · Topic 7 of 8
Endpoint Attacks, Evasion and Obfuscation
Describe buffer overflows, command and control, malware and ransomware, plus evasion and obfuscation methods such as tunnelling, encryption and proxies.
- 4 min
- A buffer overflow writes past the end of a memory area and can lead to code execution.
- A worm spreads by itself. A virus needs a host file.
- A trojan hides a payload inside something that looks useful.
What it is
Endpoint attacks compromise a laptop, server or phone, and evasion techniques help the attacker avoid being noticed while doing it.
An attack on an endpoint usually has a delivery step, an exploit or execution step, and a control step in which the attacker keeps contact. Defenders try to catch each step.
Attackers respond with evasion and obfuscation. These hide what the traffic or file really is.
How it works
The attacks differ in how they gain a foothold, and the evasion methods hide the later stages.
Buffer overflow
A buffer overflow happens when a program writes more data into a memory area than it can hold. The extra data spills into neighbouring memory and can overwrite important values, such as the place the program returns to.
An attacker who controls the overflow can make the program run the attacker's code. It usually needs a coding flaw in software written in languages without automatic bounds checking. Defences include patching, safer languages, and operating system protections such as address space layout randomisation and non executable memory.
Malware
Malware is malicious software. Common types include:
| Type | Behaviour |
|---|---|
| Virus | Attaches to files and spreads when they are run or shared |
| Worm | Spreads by itself across the network |
| Trojan | Looks useful but carries a hidden payload |
| Rootkit | Hides its presence deep in the system |
| Spyware | Collects information secretly |
| Backdoor | Gives the attacker a way back in |
| Botnet agent | Joins the device to a group controlled by the attacker |
Command and control (C2)
Command and control is the channel between compromised hosts and the attacker. The malware contacts a C2 server for instructions and sends back stolen data.
Malware often beacons, which means it connects at regular intervals. C2 traffic is frequently hidden in normal looking web or DNS traffic. Signs include regular connections to a rare external address, odd domain names, and traffic at times when the user is away.
Ransomware
Ransomware encrypts the victim's files and demands payment for the key. Some groups also steal data first and threaten to publish it, which is called double extortion.
Defences include offline backups, patching, limiting administrator rights and user training. Backups only help if they cannot be reached and encrypted by the same attacker.
Evasion and obfuscation
Evasion avoids detection, and obfuscation makes content hard to read or understand.
- Tunnelling hides one protocol inside another. DNS tunnelling, for example, carries data in DNS queries and answers, which many networks allow through.
- Encryption hides the content from inspection. Malware can encrypt its C2 traffic, or its own code, to stop signatures matching.
- Proxies relay traffic so the real source or destination is hidden. Attackers route C2 or scanning through proxies, and anonymising services add more layers.
- Packing and encoding compress or scramble a program so that its code looks different each time.
- Fragmentation and unusual protocols split or alter traffic so that simple inspection misses the pattern.
An example of obfuscation is a script that holds its commands as an encoded string and decodes them only when it runs. A scanner that looks for the plain command does not find it.
Detection ideas
- Look for regular beaconing intervals.
- Look for unusually long DNS names or very many DNS queries from one host.
- Look for connections to newly registered or rare domains.
- Use behaviour based endpoint tools, since signatures miss packed or encrypted code.
What to remember for the exam
Seven facts cover most questions on this topic.
- A buffer overflow writes past the end of a memory area and can lead to code execution.
- A worm spreads by itself. A virus needs a host file.
- A trojan hides a payload inside something that looks useful.
- C2 is the channel that lets an attacker control compromised hosts, often through beaconing.
- Ransomware encrypts files and demands payment, and offline backups help recovery.
- Tunnelling hides one protocol inside another.
- Encryption and proxies hide content and the real endpoints from inspection.
Regular, repeated connections from one host to a rare external address are a classic sign of C2 beaconing.
Common mistakes
These four errors appear often.
Mixing up virus and worm. A virus needs a host file to spread. A worm spreads by itself over the network.
Assuming backups always save you from ransomware. Backups connected to the network can be encrypted too.
Treating encrypted traffic as always benign. Malware uses encryption to hide C2 traffic.
Relying only on signatures. Packed and obfuscated malware changes its appearance to avoid them.
Tunnelling and proxies are also used legitimately, so judge them by context, not by the technique alone.
Check yourself
Work through these three questions.
What is beaconing in command and control traffic?
It is malware connecting to its C2 server at regular intervals to ask for instructions.
How does a worm differ from a virus?
A worm spreads by itself across the network. A virus attaches to a host file and spreads when that file is run or shared.
Why do attackers use tunnelling and encryption?
They hide the real content and purpose of the traffic, so that inspection and signatures are less likely to detect it.
Topic 7 of 8 in Security Monitoring
Test yourself on Security Monitoring
The full Cisco CCNA 200-201 CBROPS question bank has 754 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Cisco. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.