Changeset 1173
- Timestamp:
- 07/18/08 23:38:39 (5 months ago)
- Files:
-
- fwknop/trunk/ChangeLog (modified) (2 diffs)
- fwknop/trunk/fwknop (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
fwknop/trunk/ChangeLog
r1165 r1173 1 fwknop-1.9.6 (07/ /2008):1 fwknop-1.9.6 (07/18/2008): 2 2 - SPA packets are base64-encoded by the fwknop client, and this encoding 3 3 pads data with '=' chars until the total length of the encoded data is a … … 25 25 alert udp any any -> any 62201 (msg:"fwknop GnuPG encrypted SPA 26 26 traffic"; content:"hQ"; depth:2; dsize:>1000; sid:20080003; rev:1;) 27 28 - Updated the fwknop client to randomize the UDP source port for default 29 SPA packet generation. There is also a new command line argument 30 --Source-port <port> to allow the user to manually set the source port 31 on the fwknop client command line. A lot more attention is given now to 32 source ports after the Dan Kaminsky DNS caching exploit, and it turns 33 out that even on Linux that the kernel did not randomize UDP source 34 ports until the 2.6.24 kernel. Of course, any userspace process is free 35 to request a random port itself, but if a userspace application did not 36 build this in then it would be up to the kernel to assign a source port. 37 In the case of Linux, here are two links that show the change to the 38 kernel code as well as the ChangeLog entry for UDP source port 39 randomization: 40 41 http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;\ 42 a=commit;h=32c1da70810017a98aa6c431a5494a302b6b9a30 43 http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.24 27 44 28 45 - (Test suite): Added the ability to explicitly run major classes of tests fwknop/trunk/fwknop
r1167 r1173 67 67 my $knock_dst = ''; 68 68 my $homedir = ''; 69 my $min_port = 10000; 70 my $max_port = 65535; 69 71 my $spoof_src = ''; 70 72 my $server_mode = 'pcap'; … … 87 89 my $gpg_agent_info = ''; 88 90 my $include_salted = 0; 91 my $client_src_port = 0; 89 92 my $gpg_default_key = 0; 90 93 my $err_wait_timer = 30; ### seconds … … 971 974 "over udp/$enc_pcap_port...\n" unless $quiet; 972 975 976 unless ($client_src_port) { 977 $client_src_port = &rand_port(); 978 } 973 979 unless ($test_mode) { 974 980 my $socket = IO::Socket::INET->new( 975 PeerAddr => $knock_dst, 976 PeerPort => $enc_pcap_port, 977 Proto => 'udp', 978 Timeout => 1 981 PeerAddr => $knock_dst, 982 PeerPort => $enc_pcap_port, 983 LocalPort => $client_src_port, 984 Proto => 'udp', 985 Timeout => 1 979 986 ) or die "[*] Could not acquire UDP socket: $!"; 980 987 … … 1499 1506 'NAT-local' => \$NAT_local, 1500 1507 'NAT-access=s' => \$NAT_access_str, 1508 'Source-port=i' => \$client_src_port, 1501 1509 'Spoof-user=s' => \$spoof_username, 1502 1510 'Spoof-proto=s' => \$spoof_proto, … … 1762 1770 1763 1771 sub rand_port() { 1764 return 10000 + int(rand(55535));1772 return int(rand($max_port - $min_port)) + $min_port; 1765 1773 } 1766 1774 … … 1856 1864 encrypted SPA packet is stored when the 1857 1865 --Save-packet argument is used. 1866 --Source-port <port> - Fix a specific source port for outgoing SPA 1867 packets. This is not usually necessary, 1868 and the fwknop client randomizes its source 1869 port by default. 1858 1870 --Server-port <port> - Specify the port number to which to send 1859 1871 the single authentication packet (this is
