logo Use CA10RAM to get 10%* Discount.
Order Nowlogo
(5/5)

Add a main function which contains code to read the arguments passed in by the user from the command line when the script was launched.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Network Reconnaissance

Assignment Summary

The net recon.py script/tool allows a user to passively or actively detect hosts on their network. This tool takes in two arguments; A network interface name (e.g. "enp0s3") and an indicator for active or passive mode. The network interface should be specified using "-1" or "--iface".

A user who launches the tool with the "-p" or "-passive" argument will launch the tool in passive mode, where the script will monitor ARP traffic on the given interface and use this traffic to detect IP address and MAC address pairings. IP and MAC addresses collected by the script are printed out to the terminal while the script is running. The passive scan will continue until the user stops the script using ctrl+c.

A user who launches the tool with the "-a" or "-active" argument will launch the tool in active mode. In active mode the tool will perform a ping sweep. The tool should ping every address in the network and detect if a reply was received to determine if that address is active in the network.

You may use the scapy, sys, and os libraries/modules only. You must demonstrate that you can write the code with these restrictions in place.

Part 1-Set-up (10%)

Create a script called "net_recon.py".

Add a main function which contains code to read the arguments passed in by the user from the command line when the script was launched.

Add a function help(), which will print out the usage of the tool. If the user launches the script without the necessary arguments, this function should be called and should print out the arguments which a user can include when running the script.

Part 2-Passive Recon (30%)

Add a function passive_scan() which is called if the user includes the "-p" or "-passive" augments when launching the tool.

This function should use the Scapy sniff() function to listen for traffic at the interface provided by the user. Include any function(s) necessary to handle traffic picked up by the sniff() function.

ARP traffic with an op code of 2 or "is-at" should be parsed and the source IP address and source MAC address stored. If an IP address has already been stored but a different MAC address is seen then the script should also store this additional MAC address.

The user should see a list of hosts appear in the terminal while the script is running.

 

(5/5)
Attachments:

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Um e HaniScience

986 Answers

Hire Me
expert
Muhammad Ali HaiderFinance

788 Answers

Hire Me
expert
Husnain SaeedComputer science

669 Answers

Hire Me
expert
Atharva PatilComputer science

638 Answers

Hire Me

Get Free Quote!

365 Experts Online