Rednote
GuidebooksTerminalCode
  • Welcome!
  • Utility
    • General
    • Server
    • Transferring File
      • Main
      • Code
      • Miscellaneous
    • Reverse & Bind Shells
      • Havoc
    • Metasploit
    • Service
      • FTP (21)
      • SSH (22)
      • DNS (53)
      • HTTP/HTTPS (80-443)
      • SMTP (25-465-587)
      • POP3 (110-995)
      • IMAP (143-993)
      • MySQL (3306)
      • MSSQL (1433-2433)
      • SMB (139-445)
      • RDP (3389)
      • WinRM (5985-5986)
      • WMI (135)
      • LLMNR & NBT-NS (5355-137)
      • NFS (111-2049)
      • SNMP (161-162)
      • VNC (5900)
      • Rsync (873)
      • R-Service (512-513-514)
      • IPMI (623)
      • Oracle TNS (1521)
  • Pentesting Process
    • Information Gathering
      • Passive
      • Active
      • OSINT
    • Vulnerability
    • Web Attacks
      • GENERAL
      • Crawling/Spidering & Fuzzing
      • Information Disclosure
      • Command Injection
      • Unrestricted File Upload
      • File Inclusion/Path Traversal
      • Request Smuggling
      • Clickjacking
      • Web Cache Poisoning
      • Web Cache Deception
      • Insecure Deserialization
      • Prototype Pollution
      • OAuth 2.0
      • JWT
      • SQLi
        • sqlmap
      • NoSQLi
      • GraphQL
      • XSS
      • SSRF
      • XXE
      • IDOR
      • API
      • SSTI
      • CSRF
      • CORS
      • AJP
      • SSI
      • ESI
      • XSLT
      • Cloud
      • LLM Prompt Security
    • Software Attacks
      • Binary
      • Shellcode
      • AV Evasion & Obfuscation
    • Network Attacks
      • ARP Poisoning
      • Local DNS Cache Poisoning
      • Baby Local DoS
    • Crypto Attacks
      • Utility
      • RSA
      • DSA/DSS
      • PRNG
        • LGC
        • MT
        • LFSR
    • Misc Attacks
    • Social Engineering
    • Password Cracking
      • Wordlist
      • Offline
      • Online
    • Pivoting & Tunneling
    • Local Enumeration
      • Linux
      • Windows
    • Privilege Escalation
      • Linux
        • Linux Privilege Escalation with Groups
        • Linux Privilege Escalation with Library
      • Windows
        • Windows Privilege Escalation with Groups and Privileges
        • Windows Privilege Escalation with DLL Hijacking
    • Active Directory
      • Enumeration
      • Abuse ACL
      • Extract Hash & Password
      • Pass The Hash
      • Pass The Ticket
      • Overpass the Hash
      • Relay Attack
      • Password Spraying Attack
      • AS-REP Roasting
      • Kerberoasting
      • Silver Ticket
      • Golden Ticket
      • DC Synchronization
      • AD Certificates
      • Attacking Domain Trusts
    • Reports
      • Bug Bounty Report
    • CVE
      • Linux
      • Windows
    • OTHER
      • CMS
        • WordPress
        • Joomla
        • Drupal
      • Tomcat
      • Jenkins
      • Splunk
      • Web Service
      • Navigating Python Objects
      • JavaScript Deobfuscation
  • Extra
    • My Books
    • My Exploits
    • Compiled Binaries
Powered by GitBook
On this page
  • Port
  • Config File
  • Interact
  • Attacks
  • Zone Transfer
  • Other attacks

Was this helpful?

  1. Utility
  2. Service

DNS (53)

Domain Name System.

Last updated 8 months ago

Was this helpful?

Protocol Information

The DNS system is responsible for translating human-readable hostnames into machine-readable IP addresses, and vice versa.

DNS recursive resolver is activated, which makes several requests: - Root Name Server (are 13) - Top Level Domain (.com, .it, , etc.) - Authoritative Name Server (example.com).

DNS Records provides specific information. - NS : Returns the DNS servers (NameServers) of the domain, responsible for the Authoritative Name Server of the zone. - A : Hostname to IPv4. - AAAA : Hostname to IPv6. - PTR : IP to Hostname. - CNAME : Associate an alias with a hostname, with the hostname associated with an A. e.g., A for hackthebox.eu and CNAME for www.hackthebox.eu - MX : Mail Exchange, identifies hosts that will accept emails for a specific host. Returns the responsible mail servers. - TXT : Contains various textual information. - ANY : To get all records, but RFC8482 specifies that they would be dropped, so they might not respond. - SOA : It provides information about the corresponding DNS zone and the e-mail address of the administrative contact. The SOA record is found in a domain's zone file and specifies who is responsible for operating the domain and how DNS information for the domain is managed. The dot (.) is replaced by a snail symbol (@) in the email address.

Port

53 UDP

DNS (unencrypted)

53 TCP

DNS (encrypted)

Config File

The hosts file is located at:

  • Windows: C:\\Windows\System32\drivers\etc\hosts

  • Linux e MacOS: /etc/hosts

  • /etc/bind/named.conf.local

  • /etc/bind/named.conf.options

  • /etc/bind/named.conf.log

Interact

host -t <TYPE> <DOMAIN> [<DNS_SERVER>]
nslookup -query=<TYPE> <DOMAIN> [<DNS_SERVER>] 
nslookup -type=<TYPE> <DOMAIN> [<DNS_SERVER>]
dig <TYPE> <DOMAIN> [@<DNS_SERVER>]
Website
Details

For the enumeration of DNS TYPEs.

For many specific DNS information.

Discover hosts related to a domain.

Attacks

CountryCode
Bind9
Zone Transfer
Other attacks
Hurricane Electric
viewDNS
DNSDumpster