In Chapter 10, Moving Laterally and Escalating Your Privileges, we performed post-exploitation and obtained access to the compromised host, which ended with us owning the domain. What happens if the vulnerability we exploited is patched or the IT staff have discovered there has been a compromise and have taken steps to remediate the gaps, which ultimately removes our access? We will need a way to get back into the target network or system. Sure, we can try additional exploits or even start from a social engineering attack—but this takes time and takes us a number of steps back. This is where maintaining access comes into play. Maintaining access should be a top priority once you have compromised the initial system. The objective is to obtain a persistent presence within the target to obtain a goal of in-depth access.
In the real world...