Skip to content

Instantly share code, notes, and snippets.

@tylernchls
Last active July 30, 2019 02:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tylernchls/282b255d8ad0f320c73d9d356571785a to your computer and use it in GitHub Desktop.
Save tylernchls/282b255d8ad0f320c73d9d356571785a to your computer and use it in GitHub Desktop.
Network Survival Kit

Networking Survival Kit

Scenario:

You are a security professional that has been hired to carry out an investigation into a recent security breach of Arch industries. Upon initial scan of equipment, you have determined their system is severly outdated and contains none of the standard network cli tools and applications you normally have to perform your duties. Guess you will have to build your own!!!!!!

Your Task:

You are to use your knowledge of networking and scripting to build basic networking tools in order to complete your job. Below are your details if you choose to accept.

Required Tooling/Specs

1. System Info Tool - This tool will grab the hostname of the target machine.

  • This tool will need to use the socket module.
  • It will print the hostname to stdout in the format of: "The hostname is: NoSoupForYou"

2. IP Mapping - This tool will return the corresponding IP address of any domain entered.

  • This tool will make use of the socket module.
  • It will take stdin from the user and return the IP address in the format of: "The IP address of target is: 58.65.22.14"

3. Port Scanner - This tool will scan for open ports on any domain or IP and return a report when completed.

  • This tool will make use of the socket and sys modules.
  • It will be able to scan any range of ports.
  • It will generate a report in the format of: "Port 80: OPEN"

4. Client Browser - This tool will act as your client browswer to pull html from any domain.

  • This tool will make use of the urllib module.
  • It will be able to print the url, status code of request, request header info, server info, and the html.

5. Mac Address Lookup - This tool will return information on mac addressses.

  • This tool will use the urllib2, json, and codecs modules.
  • This tool will make an api call with mac address to http://macvendors.co/api
  • It will take stndin from user.
  • It will return a report in format of: "Company Name, Address".

6. Data Collector - This tool will automate transfering of data for all your findings.

  • This tool will make use of the open() method.
  • It will be able to save your findings to a standard .txt file when invoked with appropriate formatting in a report format.
  • HINT: You will need to store results of other tools for this tool to work.

Resources

Stretch Goals

  • Write a function that will keep track of how long each tool takes to complete its task. This should be an optional flag that can be toggled on or off.
  • Optimize performance/speed of port scanner.
  • Merge all individual tools into one tool that can be executed.
  • Add error handling such as keyboard interrupt.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment