π‘οΈ Firewall and IDS/IPS Evasion
π Defense Layers: Endpoint vs. Perimeter Protection
π§ Endpoint Protection
Protects individual hosts (e.g., PC, server, workstation).
π§° Common components:
Antivirus (e.g., Avast, BitDefender)
Antimalware (e.g., Malwarebytes)
Host-based Firewall
Anti-DDoS tools
π Perimeter Protection
Guards the network edge using physical or virtual appliances.
π° Key zones:
Outside: Public internet
DMZ (De-Militarized Zone): Public-facing servers
Inside: Private/internal systems
π Security Policies
Similar to Access Control Lists (ACLs), policies are made of allow and deny rules.
π Categories:
Network Traffic
Application Behavior
User Access Control
File Permissions
DDoS Mitigation
π§ Detection Methods
Signature-Based
Matches known attack patterns
Heuristic/Statistical
Detects anomalies from network baseline
Stateful Protocol Analysis
Compares traffic to protocol norms
Live Monitoring (SOC)
Human/automated real-time monitoring
π΅οΈββοΈ Evasion Techniques
π Signature-Based AV Bypass
AV engines scan files/processes for known signatures
Detected threats are quarantined or terminated
π‘ Evade with MSFVenom AES Tunneling
π Meterpreter sessions support AES encryption for communication, protecting against:
Network-based IDS/IPS
Traffic inspection tools
Still vulnerable to static file scanning pre-execution.
𧬠Using Executable Templates
π― Embed payloads in legitimate executables (e.g., installers):
π Flags:
-k
β Keep original behavior-x
β Use custom executable-e
β Encode (e.g.,x86/shikata_ga_nai
)-i
β Encode iterations
π¦ Packing with Archives
βοΈ Password-protecting a file within nested archives helps bypass signature detection.
Steps:
Create archive:
Rename archive:
Nest again & rename:
π§ͺ Testing Against VirusTotal
π§° Submit via:
π― Result
Initial
test.js
file β Detected by ~11/59 AV enginesFinal
test2
file (double archived) β 0 detections π«
π§³ Packers
A packer compresses an executable with decompression logic to:
Obfuscate contents
Avoid AV file scanning
π§° Popular packers:
UPX
MPRESS
The Enigma Protector
Themida
ExeStealth
π§βπ» Exploit Coding & Obfuscation
To avoid detection, write customized, non-patterned exploit code.
Example:
π₯ Avoid:
Obvious NOP sleds
Static buffer patterns
Reuse of popular signatures
π οΈ Test custom exploits in a sandboxed lab before deployment.
π Further Reading
π§ͺ Try these techniques on HTB boxes or old AV environments
Let me know if youβd like this saved as a downloadable .md
file or used to create a full presentation!
Last updated