All the steps we take to exploit the vulnerabilities are based on the information we enumerate about our targets. This phase can be considered the cornerstone of any penetration test. We can obtain the necessary information relevant to us in many different ways. However, we can divide them into the following categories:
- Open-Source Intelligence
- Infrastructure Enumeration
- Service Enumeration
- Host Enumeration
OSINT
- Use public (Open-Source) information from freely available sources to obtain desired results
- If this type of sensitive information (Passwords, Hashes, Keys, Tokens) is found at the onset of testing, the Incident Handling and Report section of the RoE should describe the procedure for reporting these types of critical security vulnerabilities. Publicly published passwords or SSH keys represent a critical security gap if they have not already been removed or changed. Therefore, our client's administrator must review this information before we proceed.
Infra enumeration
Use OSINT and first active scans DNS to create map of servers/hosts and understand how infra is structured
- Nameservers
- Mailservers
- Webservers
- Cloud instances
- more
Determine company security measures. More precise = easier to disguise attacks (Evasive Testing) IDing firewalls, i.e. WAF, helps understand what techniques we can use to be sneaky Doesn't matter where we are positioned at this point
Service enumeration
With a detailed list of infrastructure, we examine every host listed in the scoping document. Identify the operating system on the host, services, versions and etc. Use various OSINT methods to determine how it is configured. There's still many hosts and servers that manufacturers no longer support, but the vulnerabilities are still found for these older versions.
Doesn't matter where the service is found, but internally sometimes you will find vulnerable servers internally because administrators assume they're secure since they are internal. Thus many misconfigurations are often found.
During host enumeration, we try to determine what role this host or server plays and what network components it communicates with. In addition, we must also identify which services it uses for this purpose and on which ports they are located.
During internal host enumeration, which in most cases comes after the successful Exploitation of one or more vulnerabilities, we also examine the host or server from the inside. This means we look for sensitive files, local services, scripts, applications, information, and other things that could be stored on the host. This is also an essential part of the Post-Exploitation phase, where we try to exploit and elevate privileges.
Pillaging
After post-exploitation, PILLAGING is performed to collect sensitive information locally on the exploited host.
- Employee names
- Customer data
- etc.
Info gained on exploited hosts can be divided into many different categories and varies. Depends on purpose of host and position in network.