![]() |
VOOZH | about |
06 February, 2024
The 2.6.11 release of fwknop is available for download (or via the github release tag). Here is the complete ChangeLog:06 February, 2024 | Port Knocking and SPA | fwknop | Software Releases | By: Michael Rash
06 October, 2018
(The primary material for this blog post was released on github. I'm reproducing part it here as a blog post.)06 October, 2018 | Network Security | By: Michael Rash
06 August, 2018
The 2.6.10 release of fwknop is available for download (or via the github release tag). Here is the complete ChangeLog:06 August, 2018 | Port Knocking and SPA | fwknop | Software Releases | By: Michael Rash
31 July, 2018
A pair of software releases is available for download - psad-2.4.6 and fwsnort-1.6.8. The main change is that now both pieces of software support the Snort 'metadata' keyword. This keyword and associated field is a common fixture of modern Snort rule sets, and usually contains important data such as IPS policy preferences, information about vulnerable target software or OS, date created, and more.Jul 30 21:24:44 moria kernel: [650982.555939] [1] SID2000500 ESTAB IN=enx0014d1b0da65 OUT= MAC=00:12:34:56:78:65:60:e3:27:39:12:34:56:00 SRC=192.168.10.11 DST=192.168.10.1 LEN=59 TOS=0x00 PREC=0x00 TTL=63 ID=0 DF PROTO=TCP SPT=58801 DPT=21 WINDOW=4117 RES=0x00 ACK PSH URGP=0 OPT (0101080A4538966A09B20FBC)When psad monitors this out of the syslog data, an email alert is generated as usual. However, in this email alert the metadata 'created_at' and 'updated_at' fields are now included as defined in the original rule:
"ET ATTACK_RESPONSE FTP inaccessible directory access COM2" dst port: 21 (no server bound to local port) flags: ACK PSH content: "/COM2/" content: "/COM2/" sid: 2000500 chain: FWSNORT_INPUT_ESTAB packets: 36 classtype: string-detect reference: (url) http://doc.emergingthreats.net/bin/view/Main/2000500 reference: (url) http://doc.emergingthreats.net/bin/view/Main/2000500 created_at 2010_07_30 updated_at 2010_07_30
31 July, 2018 | Software Releases | By: Michael Rash
08 June, 2016
The 2.6.9 release of fwknop is available for download (or via the github release tag). Here is the complete ChangeLog:08 June, 2016 | Port Knocking and SPA | fwknop | Software Releases | By: Michael Rash
23 December, 2015
A major new feature in fwknop has been introduced today with the 2.6.8 release (github tag) - the ability to integrate with third-party devices. This brings SPA operations easily to any device or software that offers a command line interface. By default, the fwknop daemon supports four different firewalls: iptables, firewalld, ipfw, and PF. But, suppose you want to have fwknopd leverage ipset instead? Or, suppose you have an SSH pre-shared key between a Linux system and a Cisco router, and you want fwknopd (running on the Linux box) to control the ACL on the router for the filtering portion of SPA? Finally, suppose that you want a stronger measure of protection for an SSH daemon that may have been backdoored, and that runs on a proprietary OS where fwknopd can't be deployed natively? The sky is the limit, and I would be interested in hearing about other deployment scenarios.[spaserver]# ipset create fwknop_allow hash:ip,port timeout 30 [spaserver]# iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT [spaserver]# iptables -A INPUT -m set --match-set fwknop_allow src,dst -j ACCEPT [spaserver]# iptables -A INPUT -j DROPNow, we create a stanza in the fwknop /etc/fwknop/access.conf file and fire up fwknopd like this:
[spaserver]# cat /etc/fwknop/access.conf SOURCE ANY KEY_BASE64 <base64 string> HMAC_KEY_BASE64 <base64 string> CMD_CYCLE_OPEN ipset add fwknop_allow $SRC,$PROTO:$PORT timeout $CLIENT_TIMEOUT CMD_CYCLE_CLOSE NONE [spaserver]# service fwknopd startWith fwknopd running and iptables configured to drop everything except for IP communications that match the fwknop_allow ipset, let's use the fwknop client from a remote system "spaclient" to gain access to SSHD on the server for 30 seconds (note that the iptables conntrack module will keep the connection open after the SPA client IP is removed from the ipset). We'll assume that the encryption and HMAC keys have been previous shared between the two systems, and on the client these keys have been written to the "spaserver" stanza in the ~/.fwknoprc file:
[spaclient]$ fwknop -A tcp/22 -a 1.1.1.1 -f 30 -n spaserver [spaclient]$ ssh user@spaserver [spaserver]$So, behind the scenes after the SPA packet has been sent above, fwknopd on the server has authenticated and decrypted the SPA packet, and has executed the following ipset command. In this case, there is no need for a corresponding close command because ipset implements the timer provided by the client itself, so the client IP is deleted from the ipset automatically. (In other scenarios, the close command can be fully specified instead of using the string 'NONE' as we have above.) Here are the syslog messages that fwknopd has generated, along with the 'ipset list' command output to show the 1.1.1.1 IP as a member of the set:
[spaserver]# grep fwknopd /var/log/syslog |tail -n 2 Dec 23 15:38:06 ubuntu fwknopd[13537]: (stanza #1) SPA Packet from IP: 1.2.3.4 received with access source match Dec 23 15:38:06 ubuntu fwknopd[13537]: [1.2.3.4] (stanza #1) Running CMD_CYCLE_OPEN command: /sbin/ipset add fwknop_allow 1.1.1.1,6:22 timeout 30 [spaserver]# ipset list Name: fwknop_allow Type: hash:ip,port Revision: 5 Header: family inet hashsize 1024 maxelem 65536 timeout 30 Size in memory: 224 References: 0 Members: 1.1.1.1,tcp:22 timeout 27In addition to the ability to swap out the existing firewall with a completely different filtering infrastructure, there are other notable features and fixes in the 2.6.8 release. The most important of these is a new feature implemented by Jonathan Bennett (and suggested by Hank Leininger in github issue #62) that allows access.conf files to be imported via a new '%include' directive. This can be advantageous in some scenarios by letting non-privledged users define their own encryption and authentication keys for SPA operations. This way, users do not need write permissions to the main /etc/fwknop/access.conf file to change keys around or define new ones.
23 December, 2015 | Port Knocking and SPA | fwknop | Software Releases | By: Michael Rash
24 August, 2015
๐ fwknop-2.6.7 software release
$ fwknopd --key-gen | ./extras/console-qr/console-qr.sh
๐ fwknop QR key code24 August, 2015 | Port Knocking and SPA | fwknop | Software Releases | By: Michael Rash
|
๐ @michaelrash ๐ Google+ ๐ Atom feed ๐ LinkedIn |
Terms of Use
Copyright ยฉ 2001-2012 Michael Rash.
Design by Andreas Viklund.