Chapter 9: Evasion with Metasploit
We covered all the major phases of a penetration test in the previous chapters. In this chapter, we will include the problems that tend to occur for a penetration tester in real-world scenarios. Gone are the days where a straightforward attack would pop you a shell in Metasploit. With the attack surface increasing these days, security perspectives have also increased gradually. Hence, tricky mechanisms are required to circumvent the security controls of various natures. In this chapter, we'll look at different methods and techniques that can prevent security controls that have been deployed at the target's endpoint. Throughout this chapter, we will cover the following topics:
- Evading Meterpreter detection using C wrappers and custom encoders
- Evading Meterpreter detection with Python
- Evading IDS systems with Metasploit
- Bypassing Windows firewall blocked ports
So, let's get started with the evasion techniques...