https://github.com/eeriedusk/knockles Skip to content Sign up * Product + Features + Mobile + Actions + Codespaces + Copilot + Packages + Security + Code review + Issues + Discussions + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Skills + GitHub Sponsors + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} eeriedusk / knockles Public * Notifications * Fork 4 * Star 103 eBPF Port Knocking Tool License Apache-2.0 license 103 stars 4 forks Star Notifications * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights eeriedusk/knockles This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 1 branch 0 tags Code * Clone HTTPS GitHub CLI [https://github.com/e] Use Git or checkout with SVN using the web URL. [gh repo clone eeried] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @eeriedusk eeriedusk Init ... a9c740a Aug 9, 2022 Init a9c740a Git stats * 1 commit Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time libbpf @ 0e43565 Init Aug 9, 2022 src Init Aug 9, 2022 .gitignore Init Aug 9, 2022 .gitmodules Init Aug 9, 2022 LICENSE Init Aug 9, 2022 README.md Init Aug 9, 2022 View code [ ] Knockles - eBPF Port Knocking Tool Server configuration Server compilation Requirements Debian Ubuntu Build Usage Server side Client side README.md Knockles - eBPF Port Knocking Tool Knockles , is a port knocking tool based on eBPF . It allows you to remotely open a TCP connection while being completely invisible to port scanners. * A single SYN request is sent on an opened || closed port * It carries an OTP for authentication so you can be the only one to open a port * Once authentified, a random (HMAC based) port is opened for a TCP connection * Then, the port is closed as soon as a connection has been established Server configuration Modify the following macros/variables ./knockles/src/knockles.bpf.c * l.6:PORT: Port monitored for knocks [default: 80] ./knockles/src/knockles.c * l.16:HMAC_DURATION: Time between two different OTP (in seconds) [default: 30] * l.17:LISTENING_DURATION: Timeout of the opened port if no connection occurs (in seconds) [default: 30] * l.18:SECRET: HMAC secret key [?][?] Don't forget to modify this variable [?][?] [default: MY_SECRET_KEY] Server compilation Requirements Debian sudo apt install git make pkg-config libelf-dev clang-11 libc6-dev-i386 bpftool libssl-dev -y pip install scapy Ubuntu sudo apt install git make pkg-config libelf-dev clang-11 libc6-dev-i386 linux-tools-common linux-tools-$(uname -r) libssl-dev -y pip install scapy Build cd ./knockles/src make Usage Server side Usage: ./knockles [OPTION]... eBPF port knocking tool - Server. --help display this help and exit --daemon run program as daemon Client side usage: knuckknock.py [-h] -s KEY -t TIME -d IP -p PORT eBPF port knocking tool - Client. optional arguments: -h, --help show this help message and exit -s KEY , --secret KEY HMAC secret key -t TIME, --time TIME generated HMAC duration -d IP, --dst IP destination IP address -p PORT, --port PORT monitored port About eBPF Port Knocking Tool Resources Readme License Apache-2.0 license Stars 103 stars Watchers 4 watching Forks 4 forks Releases No releases published Languages * C 99.9% * Other 0.1% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.