Ethical Data: Port Scanner

forthebadge forthebadge

Inspiration

Why did we build this? This tool is good for beginners in cybersecurity who just want to see what all processes run on different ports and experiment with them. We have also implemented required precautions to prevent accidental closing of an essential system process through an aesthetically pleasing CLI. We were very much interested in creating something interesting to test out basic port and data processes in your machine.

What it does

In essence, we aim to build a cool tool to be used as a source of common info while giving options to directly interact with your machine. It has notable features:

  • Help: Use the help command to get a list of available flags and features you can tinker with
  • Check open ports: Allowing the user to check what ports they have open for user processes. We aim to add a flag to view system processes too.
  • Close ports: Allowing the users to close ports for different applications. For security concerns, it will not allow the closing of ports running system processes.
  • Random facts: What else would be a better idea to increase engagement than a random fact? Get a random fact about security concerns by using a simple flag -f
  • List common ports: It can be used as a go-to tool for getting common info like what port is used for what stuff etc.

How we built it

This project was built in a few different stages.

  1. First, we scaffolded the Command Line Interface using Python3. It features an input-based event loop that executes commands based on what the user inputs. It also features the usage of history, which allows users to re-execute some of their recent commands.
  2. We then implemented the code regarding the port and process portions of the app. We added the ability to list open ports, close ports, list popular ports, and show a random fun fact, all with the use of Python3 and accompanying system-focused python packages.
  3. We finally finished up and added the final touches to the project and its core features.

Challenges we ran into

We had a small handful of very difficult challenges that we were forced to work through:

  • All of our team members live in vastly different parts of the world, and thus, our time zones did not really match up very well. Despite this, we were able to collaborate effectively and work through it.
  • The sprint theme was quite difficult to come up with an idea for. Despite how interesting and intriguing the topic is, it is slightly more niche than our past themes, so it took a few days to correctly formulate a plan/idea.
  • In the same breath as the last one, this type of project was relatively new to all of the members of our team.
  • We had planned to add features which would allow the users to check if their ports are accessible from other systems on or outside their network but could not implement it on time as it required external servers (which we realised kinda late)

Accomplishments that we're proud of

We are very proud of a few things related to our project:

  1. A correctly working, functional Command-Line Interface
  2. Port display despite the various issues with regards to getting this to work
  3. A nice looking final product that accomplishes what we set out to build
  4. Learning new Python system libraries without messing up our systems

What we learned

We all learned quite a bit about ports, systems-related programming in Python, CLI implementation, and lastly, how to collaborate across different time zones.

What's next for MLH Ethical Data Port Monitor

  1. Work on the scope of port accessibility
  2. Implement a single command to close any unused ports
  3. Make it easy for non-developers to use

Built With

Share this project:

Updates