Tool introduction: dig
The domain name can provide important information about the job of a target system: As humans have a hard time remembering a random sequence of numbers, IT systems are usually assigned a meaningful designation. As attackers we can take advantage of this fact by attempting to narrow down the target network or a domain via DNS queries. Here, we can perform both forward lookups and reverse lookups.
When we use a forward lookup, we attempt to resolve a domain name into its associated IP address via the responsible DNS server. This occurs, for example, when opening a website using its name. Furthermore, we may attempt to identify additional IT systems in a network by probing various subdomains. For example, a company like Dubius Payment Ltd. may designate a firewall through the subdomain fw. This means we need to carry out a forward lookup for the full domain name fw.dubius-payment.com. These types of DNS queries can be accomplished with the dig tool (domain information groper):
- dig ${domain name} @${DNS server} +short
Unlike a forward lookup, with a reserve lookup we have the IP addresses of the target systems available to us and we “only“ aim to determine the domain name. As mentioned previously, the domain name reveals information about the function of a system. The domain name db.dubius-payment.com, for instance, is likely to hold a database on the existing system. So we should query the possible domain name for each IP address in a network:
-dig -x ${IP address} @${DNS server} +short
Sometimes we get lucky as attackers. With DNS, this would be a permitted zone transfer. With a successful zone transfer, we end up with a list of resource records and are thus endowed with the relevant information on a domain:
-dig axfr ${Domain} @${DNS server}
But as much as we would like to have the zone file of a domain available to us, this is rarely the case. It may even be the case that no DNS entries are stored for an IT system, so that we should be grateful for any additional information available.
Pentest Training
Take a look at the pentest training chapters and learn penetration testing:
- Preface
- Introduction
- Legal Framework
- Hacking vs. Penetration Testing
- Classification
- Meaningfulness of Penetration Tests
- Penetration Testing Standards
- The Hacking Guide
- Hacking I: Scanning networks
- Hacking II: Password attacks
- Hacking III: Web application attacks
- Hacking IV: Privilege Escalation
- Hacking V: Tunnelling Techniques
- Hacking VI: Vulnerability scanner and penetration testing frameworks
- Demonstration of a Penetration Test
- Risk Assessment of Identified Vulnerabilities
- Structure of Documentation and Reporting
- Insider stories: Tales from Dubius Payment Ltd.
binsec academy GmbH - Online IT Security Training with Practical Focus
binsec academy GmbH is provider of online IT security training, offering practical, lab-based courses for professionals. The academy provides hands-on training in areas such as penetration testing and secure software development. Participants gain practical experience through realistic lab environments, including simulations of company networks and applications. Courses are available in multiple programming languages and align with standards like OWASP Top 10 and PCI DSS. Upon successful completion, participants receive certifications such as the Binsec Academy Certified Pentest Professional (BACPP) and Binsec Academy Certified Secure Coding Professional (BACSCP), demonstrating their ability to identify and remediate security vulnerabilities.
Goto binsec acadmy GmbH

binsec GmbH – Experts in Penetration Testing
binsec GmbH is a German IT security company focused on professional penetration testing. With over 10 years of experience, the team conducts in-depth penetration tests on networks, web applications, APIs, and mobile apps. Certified experts systematically identify and document security vulnerabilities to support organizations in improving their security and meeting compliance requirements.
Goto binsec GmbH