Skip to content

DNS Enumeration Using Python ​

FieldValue
Module ID27
DifficultyMedium
TierTier 0
CategoryGeneral
Estimated Time3 hours
Cubes Earned0
Experience Points540
CreatorsCry0l1t3
Last Updated2020-12-16T00:00:00.000000Z
URLhttps://academy.hackthebox.com/app/module/27

Module Includes ​

  • 11 Sections
  • 7 Interactive Exercises
  • 0 Assessments
  • 0 Cubes

Module Description ​

As a penetration tester or red teamer, it is imperative that we understand the tools that we use inside and out and also have the ability to write out own, even simple, tools if we are on an assessment with certain constraints such as no internet or the requirement to use a customer provided host as our "attack box." A strong understanding of DNS as well as the various ways to interact with fundamental when performing any security assessment.

Module Summary ​

This module covers the importance of tool development for technical security practitioners, using the DNS protocol as examples for the tool building exercises.

In this module, we will cover:

  • An introduction to tool development
  • DNS structure
  • Querying DNS records
  • Tool development using Python modules
  • DNS security

This module is broken down into sections with accompanying hands-on exercises to practice each of the tactics and techniques we cover. The module ends with a practical hands-on skills assessment to gauge your understanding of the various topic areas.

As you work through the module, you will see example commands and command output for the various topics introduced. It is worth reproducing as many of these examples as possible to reinforce further the concepts introduced in each section. You can do this in the Pwnbox provided in the interactive sections or your own virtual machine.

You can start and stop the module at any time and pick up where you left off. There is no time limit or "grading," but you must complete all of the exercises and the skills assessment to receive the maximum number of cubes and have this module marked as complete in any paths you have chosen.

The module is classified as "Medium" but assumes a working knowledge of the Linux command line and an understanding of information security fundamentals.

A firm grasp of the following modules can be considered prerequisites for successful completion of this module:

  • Linux Fundamentals
  • Web Requests
  • Introduction to Bash Scripting

Sections ​

11 sections - 7 Interactive

#GroupTypeTitle
1IntroductiontheoryTool Development
2theoryDNS Structure
3DNS ProceduretheoryDNS Zones
4interactiveDNS Records and Queries
5theoryDNS Security
6Information GatheringinteractiveDNS Enumeration
7DNS with PythoninteractivePython Code
8interactivePython Modules
9interactiveAXFR Function
10interactiveMain Function
11interactiveArgparse

Conclusion ​

In this module, we touch upon the importance of tool building with a special focus on the DNS protocol.

Module Key Takeaways

  • The importance of tool building for offensive and defensive security practitioners
  • The structure and function of DNS
  • Using the Dnspython module to create tooling
  • DNS security