Giter VIP home page Giter VIP logo

knock's Introduction

knock: A port-knocking implementation

Copyright (c) 2004, Judd Vinet [email protected]

ABOUT

This is a port-knocking server/client. Port-knocking is a method where a server can sniff one of its interfaces for a special "knock" sequence of port-hits. When detected, it will run a specified event bound to that port knock sequence. These port-hits need not be on open ports, since we use libpcap to sniff the raw interface traffic.

BUILDING

To build knockd, make sure you have libpcap and the autoconf tools installed. Then run the following:

$ autoreconf -fi
$ ./configure --prefix=/usr/local
$ make
$ sudo make install

EXAMPLE

The example below could be used to run a strict (DENY policy) firewall that can only be accessed after a successful knock sequence.

  1. Client sends four TCP SYN packets to Server, at the following ports: 38281, 29374, 4921, 54918
  2. Server detects this and runs an iptables command to open port 22 to Client.
  3. Client connects to Server via SSH and does whatever it needs to do.
  4. Client sends four more TCP SYN packets to Server: 37281, 8529, 40127, 10100
  5. Server detects this and runs another iptables command to close port 22 to Client.

KNOCKING CLIENTS

The accompanying knock client is very basic. If you want to do more advanced knocks (eg, setting specific tcp flags) then you should take look at hping, sendip or packit.

OTHER IMPLEMENTATIONS

Here are some other implementations of port-knocking:

knock's People

Contributors

airwoflgh avatar flameeyes avatar infinity0 avatar jonathonreinhart avatar jvinet avatar ossilator avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.