Port Knock Client

The knock script sets the socket to 'non-blocking'. Non-blocking in python is the same as setting the timeout to 0 - that is, don't wait for a response. The TCP protocol defaults to 'blocking' - i.e wait for a response. From Knock git the relevant line is: s.setblocking (False). Basically what you do is fill out the entries, IP address, description and at least one knock port. Fill out protocol type, the port you want to knock on and if it is UDP, you can optionally add some text to send with the message! Here’s the program compiled and ready to go.password on zip is “portknock”.: PortKnock.zip (314527 downloads).

****The application now accepts DNS names and will correctly resolve them when knocking…rejoice!****


This is a known issue with all autoit compiled scripts. They are NOT infected, it’s just that Autoit code has been picked up by virus scanners at one point, and now are forever flagged *sigh*. If you prefer, just simply compile the code below for yourself. If google sees me as having malicious code I may have to pull the compiled EXE and switch to just having the code(sorry about that).

Port

It seems to be becoming more popular to use port knocking applications these days. Port knocking is sending connection attempts to a device in a specific pattern to unlock a specific service.

An example would be to send 3 UDP connection attempts to a Mikrotik router all on different port numbers in a specific order. It will then add your IP address to a specific address list so you can winbox in.

I found an application out there for windows that does it, but it only did UDP…I wanted one that would do both. I also wanted the ability to send text with the UDP connections to do L7 matches on it.

So, I wrote my own:

There is no charge for awesomeness...or attractiveness.

Port Knock Client Services

Basically what you do is fill out the entries, IP address, description and at least one knock port.

Fill out protocol type, the port you want to knock on and if it is UDP, you can optionally add some text to send with the message!

Here’s the program compiled and ready to go *password on zip is “portknock”*: PortKnock.zip (314903 downloads)

Here’s the code:

TCP.exe code:

Be sure to check out Jimmys lil write up on UDP port knocking with text 🙂

BTW, I just threw this together and haven’t properly tested, so let me know how it goes 😛

****The application now accepts DNS names and will correctly resolve them when knocking…rejoice!****


This is a known issue with all autoit compiled scripts. They are NOT infected, it’s just that Autoit code has been picked up by virus scanners at one point, and now are forever flagged *sigh*. If you prefer, just simply compile the code below for yourself. If google sees me as having malicious code I may have to pull the compiled EXE and switch to just having the code(sorry about that).

It seems to be becoming more popular to use port knocking applications these days. Port knocking is sending connection attempts to a device in a specific pattern to unlock a specific service.

Knock

An example would be to send 3 UDP connection attempts to a Mikrotik router all on different port numbers in a specific order. It will then add your IP address to a specific address list so you can winbox in.

I found an application out there for windows that does it, but it only did UDP…I wanted one that would do both. I also wanted the ability to send text with the UDP connections to do L7 matches on it.

So, I wrote my own:

There is no charge for awesomeness...or attractiveness.

Basically what you do is fill out the entries, IP address, description and at least one knock port.

Fill out protocol type, the port you want to knock on and if it is UDP, you can optionally add some text to send with the message!

Here’s the program compiled and ready to go *password on zip is “portknock”*: PortKnock.zip (314903 downloads)

Here’s the code:

Port Knock Client Log

TCP.exe code:

Be sure to check out Jimmys lil write up on UDP port knocking with text 🙂

Port Knock Client Definition

BTW, I just threw this together and haven’t properly tested, so let me know how it goes 😛