This note will expand our knowledge needed to learn more about the system. We discussed account discovery and security products within the system in previous tasks. We will continue learning more about the system, including:
- Installed applications
- Services and processes
- Sharing files and printers
- Internal services: DNS and local web applications
It is necessary to understand what the system provides in order to get the benefit of the information.
Installed Applications
First, we start enumerating the system for installed applications by checking the applicationโs name and version. As a red teamer, this information will benefit us. We may find vulnerable software installed to exploit and escalate our system privileges. Also, we may find some information, such as plain-text credentials, is left on the system that belongs to other systems or services.
ย We will be using theย wmic
ย Windows command to list all installed applications and their version.
Another interesting thing is to look for particular text strings, hidden directories, backup files. Then we can use the PowerShell cmdlets,ย Get-ChildItem, as follow:
Services and Process
Windows services enable the system administrator to create long-running executable applications in our own Windows sessions. Sometimes Windows services have misconfiguration permissions, which escalates the current user access level of permissions. Therefore, we must look at running services and perform services and processes reconnaissance.ย For more details, you can read about process discovery on Attack MITRE.
Process discovery is an enumeration step to understand what the system provides. The red team should get information and details about running services and processes on a system. We need to understand as much as possible about our targets. This information could help us understand common software running on other systems in the network.ย For example, the compromised system may have a custom client application used for internal purposes.ย Custom internally developed software is the most common root cause of escalation vectors.ย Thus, it is worth digging more to get details about the current process.ย ย
For more details about core Windows processes from the blue team perspective, check out the TryHackMe room: Core Windows Process.
Sharing files and Printers
Sharing files and network resources is commonly used in personal and enterprise environments. System administrators misconfigure access permissions, and they may have useful information about other accounts and systems. For more information on printer hacking, we suggest trying out the following TryHackMe room: Printer Hacking 101.
Internal services: DNS, local web applications, etc
Internal network services are another source of information to expand our knowledge about other systems and the entire environment. To get more details about network services that are used for external and internal network services, we suggest trying out the following rooms: Network Service, Network Service2.
The following are some of the internal services that are commonly used that we are interested in:
- DNS Services
- Email Services
- Network File Share
- Web application
- Database service
Letโs try listing the running services using the Windows command promptย net startย to check if there are any interesting running services.
We can see a service with the nameย THM Demoย which we want to know more about.
Now letโs look for the exact service name, which we need to find more information.
We find the file name and its path; now letโs find more details using theย Get-Processย cmdlet.
Once we find its process ID, letโs check if providing a network service by listing the listening ports within the system.
We mentioned that DNS service is a commonly used protocol in any active directory environment and network. The attached machine provides DNS services for AD. Letโs enumerate the DNS by performing a zone transfer DNS and see if we can list all records.
We will perform DNS zone transfer using the Microsoft tool isย nslookup.exe
.
Once we execute it, we provide the DNS server that we need to ask, which in this case is the target machine
Now letโs try the DNS zone transfer on the domain we find in the AD environment.
The previous output is an example of successfully performing the DNS zone transfer.