Skip to content

Assignment 3.1 Powershell and DNS

dthomsen116 edited this page Feb 5, 2023 · 5 revisions

Thomsen Tech Journal

Stated Goal of the Assignment

We don't always have a Kali box handy when we are trying to get information on a target, we can also scan laterally using a system we have targeted and exploited.

Useful Commands

List out any commands that were used or found to be helpful during the process.

  • Resolve-DnsName

Scans a network using the DNS server to gather Host information.

Steps from the Process

Document any notes that were taken while working on the assignment.

  1. Given the following snippit of code, extend the one liner by creating a powershell script that takes a network prefix, the dns server to use

Snippit: Resolve-DnsName -DnsOnly 192.168.3.100 -Server 192.168.4.4 -ErrorAction Ignore

  1. There were a few steps in order to answer these criteria:
  • Takes a network prefix, done using params

  • Takes the dns server, done using params

  • Host Id is set by using a range

  • The full IP used for the command is the $network var + the $hostid

  1. Formatting was one of the largest issues I ran into.
  • I was unable to format the individual Host Addresses, but was able to format the output to only include the Name and HostName.

Troubles Encountered

**List out any issues that were encountered while working on the assignment. **

  • image

  • I was unable to properly format the file to look like:

"IP HostName"

Resolutions

If any issues were solved, list out the resolutions for each problem.

  • Set-ExecutionPolicy -ExecutionPolicy Unrestricted

Further Questions

List out any questions that arose while working on the assignment.

How can I properly format this output in order to fulfill the deliverable properly?