Class Activty 3.1 DNS Enumeration
DNS Enumeration Using Bash
#!/bin/bash
#variables users must define when running the script
host=$1
port=$2
#append the last number to the IP address, and iterate through .1 to .254
for i in $(seq 1 254); do
if timeout .1 bash -c "echo >/dev/tcp/$host.$i/$port" 2>/dev/null; then
echo "$host.$i/$port"
#if the commands finds something then it will print it
fi
done
Deliverable 1. Provide a screenshot of your /24 port scan against 10.0.5.0/24 similar to the one below.


Organizing our Source Code
How to Push Code to GithubDeliverable 2. Provide a screenshot similar to the one below that shows your directory structure and the source code of your /24 port scanner. Note, this code can be 1 liner, but I want you to go through the process of submitting source code to github.

DNS Reverse Lookup


Deliverable 3. Write a script that takes a network prefix and a specific dns server in which to perform a lookup. Assume a /24 network. Provide a screenshot similar to the one below showing the program run.


Deliverable 4. Provide a screenshot similar to the one below that shows your directory structure and the source code of your dns resolver.

NMAP


Reverse Lookup with NMAP
Deliverable 6. Use nmap with -sL (list targets) while specifying a DNS server. Use grep and cut or awk to produce output similar to the one below. Provide a screenshot showing your modified nmap run.

Zone Transfer
Find the nameservers:

Attempt the zone transfer:

Deliverable 7. zt.txt should have some useful information, see what you can do to parse it in a manner that we have a hostname and associated ip address. Provide a screenshot similar to the one below. Note, the screenshot below is not quite perfect as not every host has an IP address.

Last updated
