CompTIA PenTest+
1 Threats, Attacks, and Vulnerabilities
1-1 Common Threat Actors
1-2 Threat Intelligence Sources
1-3 Threat Actors and Motives
1-4 Threat Actor Tactics, Techniques, and Procedures (TTPs)
1-5 Vulnerability Types
1-6 Exploit Types
1-7 Attack Types
1-8 Threat Detection and Monitoring
1-9 Threat Hunting
1-10 Incident Response
2 Architecture and Design
2-1 Security Controls
2-2 Network Architecture
2-3 Cloud and Virtualization
2-4 Web Application Security
2-5 Wireless Security
2-6 Mobile Security
2-7 IoT Security
2-8 Industrial Control Systems (ICS) Security
2-9 Physical Security
2-10 Secure Software Development
3 Tools and Code
3-1 Penetration Testing Tools
3-2 Exploitation Tools
3-3 Post-Exploitation Tools
3-4 Reporting Tools
3-5 Scripting and Automation
3-6 Programming Languages
3-7 Code Analysis
3-8 Open Source Intelligence (OSINT) Tools
4 Planning and Scoping
4-1 Penetration Testing Methodologies
4-2 Legal and Compliance Considerations
4-3 Scope Definition
4-4 Risk Assessment
4-5 Threat Modeling
4-6 Information Gathering
4-7 Asset Identification
4-8 Data Classification
4-9 Business Impact Analysis
4-10 Penetration Testing Objectives
5 Information Gathering and Vulnerability Identification
5-1 Passive Reconnaissance
5-2 Active Reconnaissance
5-3 Vulnerability Scanning
5-4 Network Mapping
5-5 Service Identification
5-6 Web Application Scanning
5-7 Wireless Network Scanning
5-8 Social Engineering Techniques
5-9 OSINT Techniques
5-10 Vulnerability Databases
6 Attacks and Exploits
6-1 Exploit Development
6-2 Buffer Overflows
6-3 SQL Injection
6-4 Cross-Site Scripting (XSS)
6-5 Cross-Site Request Forgery (CSRF)
6-6 Command Injection
6-7 Privilege Escalation
6-8 Lateral Movement
6-9 Evasion Techniques
6-10 Exploit Delivery Methods
7 Penetration Testing Process
7-1 Pre-Engagement Activities
7-2 Reconnaissance
7-3 Scanning and Enumeration
7-4 Exploitation
7-5 Post-Exploitation
7-6 Reporting
7-7 Remediation
7-8 Retesting
7-9 Documentation and Evidence Collection
7-10 Communication and Coordination
8 Reporting and Communication
8-1 Report Structure
8-2 Executive Summary
8-3 Technical Findings
8-4 Risk Assessment
8-5 Remediation Recommendations
8-6 Legal and Compliance Considerations
8-7 Presentation Skills
8-8 Communication with Stakeholders
8-9 Documentation Standards
8-10 Continuous Improvement
9 Security and Compliance
9-1 Regulatory Requirements
9-2 Industry Standards
9-3 Compliance Audits
9-4 Data Protection
9-5 Privacy Laws
9-6 Incident Response Planning
9-7 Disaster Recovery Planning
9-8 Business Continuity Planning
9-9 Risk Management
9-10 Security Awareness Training
6.9 Evasion Techniques Explained

6.9 Evasion Techniques Explained

Key Concepts

1. Obfuscation

Obfuscation is the process of making code or data difficult to understand or interpret. Attackers use obfuscation to hide malicious code within legitimate scripts, making it harder for security tools to detect and block the malicious activity.

2. Encoding

Encoding involves converting data into a different format to avoid detection. Attackers often use encoding techniques to transform malicious payloads into a format that security tools may not recognize, allowing the payload to bypass detection.

3. Polymorphism

Polymorphism is a technique where the same malicious code is altered in such a way that it appears different each time it is executed. This variation makes it difficult for signature-based detection systems to recognize and block the code.

4. Steganography

Steganography is the practice of hiding information within other, seemingly harmless data. Attackers use steganography to embed malicious code or commands within images, audio files, or other media, making it harder to detect the presence of the hidden payload.

5. Anti-Debugging

Anti-debugging techniques are used to prevent or hinder the analysis of malicious code by security professionals. These techniques can include detecting the presence of debugging tools, altering the execution flow to bypass debuggers, or causing the program to crash when debugged.

6. Sandbox Evasion

Sandbox evasion involves techniques to detect and avoid execution within a sandbox environment. Attackers use various methods to identify sandbox conditions, such as checking for specific hardware configurations or simulating user behavior, to ensure their code only runs in real-world environments.

Explanation of Concepts

Obfuscation

Obfuscation techniques include renaming variables, adding irrelevant code, and using complex structures to make the code harder to read. For example, an attacker might rename all variables in a script to random strings, making it difficult for a human or automated tool to understand the code's purpose.

Encoding

Encoding techniques can include Base64, hexadecimal, or other encoding methods. For instance, an attacker might encode a malicious script in Base64 and then decode it at runtime, allowing the script to bypass static analysis tools that only check for plaintext malicious code.

Polymorphism

Polymorphic code can change its appearance with each execution. For example, an attacker might use a polymorphic engine to alter the encryption key or the order of operations in a script, ensuring that the same malicious payload appears different each time it is executed.

Steganography

Steganographic techniques can involve hiding data within the least significant bits of image pixels or embedding commands within the metadata of a file. For example, an attacker might hide a command to download and execute a malicious file within the metadata of a seemingly innocent image file.

Anti-Debugging

Anti-debugging techniques can include checking for the presence of known debugging tools or libraries, altering the execution flow to bypass breakpoints, or causing the program to crash when it detects a debugger. For example, an attacker might include code that checks for the presence of a debugger and exits the program if one is detected.

Sandbox Evasion

Sandbox evasion techniques can include checking for specific hardware configurations, simulating user behavior, or measuring the time taken to perform certain operations. For example, an attacker might include code that checks the number of CPU cores or the amount of available RAM to determine if the code is running in a sandbox environment.

Examples and Analogies

Obfuscation

Consider obfuscation as writing a secret message in a foreign language. The message is still there, but it is harder to understand without knowing the language. Similarly, obfuscated code is still functional, but it is harder to understand its true purpose.

Encoding

Think of encoding as sending a message in a code that only the intended recipient can decode. For example, using a substitution cipher to encode a message makes it unreadable to anyone who doesn't have the key to decode it.

Polymorphism

Polymorphism can be compared to a shape-shifting creature that changes its appearance to avoid detection. Each time the creature appears, it looks different, making it harder to recognize and capture.

Steganography

Consider steganography as hiding a message in plain sight, such as writing a secret message in invisible ink. The message is hidden within another object, making it difficult to detect without the right tools.

Anti-Debugging

Think of anti-debugging as a security system that detects and thwarts attempts to break into a safe. The system might include motion sensors, alarms, or even self-destruct mechanisms to prevent unauthorized access.

Sandbox Evasion

Sandbox evasion can be compared to a spy who checks for surveillance cameras and security guards before entering a building. The spy uses various methods to ensure they are not being watched or monitored before proceeding with their mission.