Proj 1x: Port Scanning Challenges (15 pts. extra credit)

What You Need

A Kali Linux machine, real or virtual. You could use Windows with Python installed, but it's easier to just use Linux.

Challenge 1: Find a Service (5 pts. extra credit)

There is another service listening on attackdirect.samsclass.info on a port number ending in 000; that is, one of these: 1000, 2000, 3000, etc.

The service you want has a banner starting with "Congratulations! You found the hidden"

Hunt for it until you find it. Capture a whole-desktop image similar to the example below for an additional 5 points. Save the image as "Proj 1xa from YOUR NAME".

Challenge 2: Port Knocking (10 pts. extra credit)

There is a hidden service on port 3003. To open it, you must send these packets to "knock":
  1. A SYN to port 3100 (Note: a connect() call sends a SYN)
  2. Another SYN to a secret hidden port, which is one of these: (3100, 3200, 3300, 3400, 3500, 3600, 3700, 3800, 3900)
  3. A 2-second delay (see this link)
When the server receives the correct knock, port 3003 will open for 5 seconds and then close. You must grab the banner from port 3003 during that brief period. The correct banner starts with "Congratulations!"

Note: If many students are knocking at the same time, the knockd service may fail to recognize a valid sequence of packets, so you may have to try 2 or 3 times to see the banner.

Email in a screen capture showing the correct banner from port 3003.

Save the image as "Proj 1xb from YOUR NAME".

Turning in Your Project

Send the images to cnit.124@gmail.com with a subject of "Proj 1x from YOUR NAME".

Sources

Python Network Programming
17.2. socket -- Low-level networking interface
How can I make a time delay in Python?
Gotcha -- forgetting parentheses | Python Conquers The Universe


Last revised: 1-5-17