diff options
-rw-r--r-- | etc/pf.os | 515 | ||||
-rw-r--r-- | sbin/pfctl/pfctl_osfp.c | 91 | ||||
-rw-r--r-- | sys/net/pf_osfp.c | 42 | ||||
-rw-r--r-- | sys/net/pfvar.h | 16 | ||||
-rw-r--r-- | usr.sbin/tcpdump/pfctl_osfp.c | 91 |
5 files changed, 467 insertions, 288 deletions
diff --git a/etc/pf.os b/etc/pf.os index 5ed81f77161..b7087fdb70e 100644 --- a/etc/pf.os +++ b/etc/pf.os @@ -1,4 +1,4 @@ -# $OpenBSD: pf.os,v 1.23 2010/10/04 09:12:48 claudio Exp $ +# $OpenBSD: pf.os,v 1.24 2010/10/17 12:14:28 jsing Exp $ # passive OS fingerprinting # ------------------------- # @@ -197,156 +197,154 @@ # Linux 2.0, but it uses a fairly rare MSSes, at least sometimes... # This is a shoddy hack, though. -45046:64:0:44:M*: AIX:4.3::AIX 4.3 -16384:64:0:44:M512: AIX:4.3:2-3:AIX 4.3.2 and earlier +45046:64:0:44:M*:.: AIX:4.3::AIX 4.3 +16384:64:0:44:M512:.: AIX:4.3:2-3:AIX 4.3.2 and earlier -16384:64:0:60:M512,N,W%2,N,N,T: AIX:4.3:3:AIX 4.3.3-5.2 -16384:64:0:60:M512,N,W%2,N,N,T: AIX:5.1-5.2::AIX 4.3.3-5.2 -32768:64:0:60:M512,N,W%2,N,N,T: AIX:4.3:3:AIX 4.3.3-5.2 -32768:64:0:60:M512,N,W%2,N,N,T: AIX:5.1-5.2::AIX 4.3.3-5.2 -65535:64:0:60:M512,N,W%2,N,N,T: AIX:4.3:3:AIX 4.3.3-5.2 -65535:64:0:60:M512,N,W%2,N,N,T: AIX:5.1-5.2::AIX 4.3.3-5.2 -65535:64:0:64:M*,N,W1,N,N,T,N,N,S: AIX:5.3:ML1:AIX 5.3 ML1 +16384:64:0:60:M512,N,W%2,N,N,T:.: AIX:4.3:3:AIX 4.3.3-5.2 +16384:64:0:60:M512,N,W%2,N,N,T:.: AIX:5.1-5.2::AIX 4.3.3-5.2 +32768:64:0:60:M512,N,W%2,N,N,T:.: AIX:4.3:3:AIX 4.3.3-5.2 +32768:64:0:60:M512,N,W%2,N,N,T:.: AIX:5.1-5.2::AIX 4.3.3-5.2 +65535:64:0:60:M512,N,W%2,N,N,T:.: AIX:4.3:3:AIX 4.3.3-5.2 +65535:64:0:60:M512,N,W%2,N,N,T:.: AIX:5.1-5.2::AIX 4.3.3-5.2 +65535:64:0:64:M*,N,W1,N,N,T,N,N,S:.: AIX:5.3:ML1:AIX 5.3 ML1 # ----------------- Linux ------------------- -# S1:64:0:44:M*:A: Linux:1.2::Linux 1.2.x (XXX quirks support) -512:64:0:44:M*: Linux:2.0:3x:Linux 2.0.3x -16384:64:0:44:M*: Linux:2.0:3x:Linux 2.0.3x +S1:64:0:44:M*:A: Linux:1.2::Linux 1.2.x +512:64:0:44:M*:.: Linux:2.0:3x:Linux 2.0.3x +16384:64:0:44:M*:.: Linux:2.0:3x:Linux 2.0.3x # Endian snafu! Nelson says "ha-ha": -2:64:0:44:M*: Linux:2.0:3x:Linux 2.0.3x (MkLinux) on Mac -64:64:0:44:M*: Linux:2.0:3x:Linux 2.0.3x (MkLinux) on Mac +2:64:0:44:M*:.: Linux:2.0:3x:Linux 2.0.3x (MkLinux) on Mac +64:64:0:44:M*:.: Linux:2.0:3x:Linux 2.0.3x (MkLinux) on Mac +S4:64:1:60:M1360,S,T,N,W0:.: Linux:google::Linux (Google crawlbot) -S4:64:1:60:M1360,S,T,N,W0: Linux:google::Linux (Google crawlbot) +S2:64:1:60:M*,S,T,N,W0:.: Linux:2.4::Linux 2.4 (big boy) +S3:64:1:60:M*,S,T,N,W0:.: Linux:2.4:.18-21:Linux 2.4.18 and newer +S4:64:1:60:M*,S,T,N,W0:.: Linux:2.4::Linux 2.4/2.6 <= 2.6.7 +S4:64:1:60:M*,S,T,N,W0:.: Linux:2.6:.1-7:Linux 2.4/2.6 <= 2.6.7 +S4:64:1:60:M*,S,T,N,W7:.: Linux:2.6:8:Linux 2.6.8 and newer (?) -S2:64:1:60:M*,S,T,N,W0: Linux:2.4::Linux 2.4 (big boy) -S3:64:1:60:M*,S,T,N,W0: Linux:2.4:.18-21:Linux 2.4.18 and newer -S4:64:1:60:M*,S,T,N,W0: Linux:2.4::Linux 2.4/2.6 <= 2.6.7 -S4:64:1:60:M*,S,T,N,W0: Linux:2.6:.1-7:Linux 2.4/2.6 <= 2.6.7 -S4:64:1:60:M*,S,T,N,W7: Linux:2.6:8:Linux 2.6.8 and newer (?) +S3:64:1:60:M*,S,T,N,W1:.: Linux:2.5::Linux 2.5 (sometimes 2.4) +S4:64:1:60:M*,S,T,N,W1:.: Linux:2.5-2.6::Linux 2.5/2.6 +S3:64:1:60:M*,S,T,N,W2:.: Linux:2.5::Linux 2.5 (sometimes 2.4) +S4:64:1:60:M*,S,T,N,W2:.: Linux:2.5::Linux 2.5 (sometimes 2.4) -S3:64:1:60:M*,S,T,N,W1: Linux:2.5::Linux 2.5 (sometimes 2.4) -S4:64:1:60:M*,S,T,N,W1: Linux:2.5-2.6::Linux 2.5/2.6 -S3:64:1:60:M*,S,T,N,W2: Linux:2.5::Linux 2.5 (sometimes 2.4) -S4:64:1:60:M*,S,T,N,W2: Linux:2.5::Linux 2.5 (sometimes 2.4) - -S20:64:1:60:M*,S,T,N,W0: Linux:2.2:20-25:Linux 2.2.20 and newer -S22:64:1:60:M*,S,T,N,W0: Linux:2.2::Linux 2.2 -S11:64:1:60:M*,S,T,N,W0: Linux:2.2::Linux 2.2 +S20:64:1:60:M*,S,T,N,W0:.: Linux:2.2:20-25:Linux 2.2.20 and newer +S22:64:1:60:M*,S,T,N,W0:.: Linux:2.2::Linux 2.2 +S11:64:1:60:M*,S,T,N,W0:.: Linux:2.2::Linux 2.2 # Popular cluster config scripts disable timestamps and # selective ACK: -S4:64:1:48:M1460,N,W0: Linux:2.4:cluster:Linux 2.4 in cluster +S4:64:1:48:M1460,N,W0:.: Linux:2.4:cluster:Linux 2.4 in cluster # This needs to be investigated. On some systems, WSS # is selected as a multiple of MTU instead of MSS. I got # many submissions for this for many late versions of 2.4: -T4:64:1:60:M1412,S,T,N,W0: Linux:2.4::Linux 2.4 (late, uncommon) +T4:64:1:60:M1412,S,T,N,W0:.: Linux:2.4::Linux 2.4 (late, uncommon) # This happens only over loopback, but let's make folks happy: -32767:64:1:60:M16396,S,T,N,W0: Linux:2.4:lo0:Linux 2.4 (local) -S8:64:1:60:M3884,S,T,N,W0: Linux:2.2:lo0:Linux 2.2 (local) +32767:64:1:60:M16396,S,T,N,W0:.:Linux:2.4:lo0:Linux 2.4 (local) +S8:64:1:60:M3884,S,T,N,W0:.: Linux:2.2:lo0:Linux 2.2 (local) # Opera visitors: -16384:64:1:60:M*,S,T,N,W0: Linux:2.2:Opera:Linux 2.2 (Opera?) -32767:64:1:60:M*,S,T,N,W0: Linux:2.4:Opera:Linux 2.4 (Opera?) +16384:64:1:60:M*,S,T,N,W0:.: Linux:2.2:Opera:Linux 2.2 (Opera?) +32767:64:1:60:M*,S,T,N,W0:.: Linux:2.4:Opera:Linux 2.4 (Opera?) # Some fairly common mods: -S4:64:1:52:M*,N,N,S,N,W0: Linux:2.4:ts:Linux 2.4 w/o timestamps -S22:64:1:52:M*,N,N,S,N,W0: Linux:2.2:ts:Linux 2.2 w/o timestamps +S4:64:1:52:M*,N,N,S,N,W0:.: Linux:2.4:ts:Linux 2.4 w/o timestamps +S22:64:1:52:M*,N,N,S,N,W0:.: Linux:2.2:ts:Linux 2.2 w/o timestamps # ----------------- FreeBSD ----------------- -16384:64:1:44:M*: FreeBSD:2.0-2.2::FreeBSD 2.0-4.2 -16384:64:1:44:M*: FreeBSD:3.0-3.5::FreeBSD 2.0-4.2 -16384:64:1:44:M*: FreeBSD:4.0-4.2::FreeBSD 2.0-4.2 -16384:64:1:60:M*,N,W0,N,N,T: FreeBSD:4.4::FreeBSD 4.4 +16384:64:1:44:M*:.: FreeBSD:2.0-2.2::FreeBSD 2.0-4.2 +16384:64:1:44:M*:.: FreeBSD:3.0-3.5::FreeBSD 2.0-4.2 +16384:64:1:44:M*:.: FreeBSD:4.0-4.2::FreeBSD 2.0-4.2 +16384:64:1:60:M*,N,W0,N,N,T:.: FreeBSD:4.4::FreeBSD 4.4 -1024:64:1:60:M*,N,W0,N,N,T: FreeBSD:4.4::FreeBSD 4.4 +1024:64:1:60:M*,N,W0,N,N,T:.: FreeBSD:4.4::FreeBSD 4.4 -57344:64:1:44:M*: FreeBSD:4.6-4.8:noRFC1323:FreeBSD 4.6-4.8 (no RFC1323) -57344:64:1:60:M*,N,W0,N,N,T: FreeBSD:4.6-4.9::FreeBSD 4.6-4.9 +57344:64:1:44:M*:.: FreeBSD:4.6-4.8:noRFC1323:FreeBSD 4.6-4.8 (no RFC1323) +57344:64:1:60:M*,N,W0,N,N,T:.: FreeBSD:4.6-4.9::FreeBSD 4.6-4.9 -32768:64:1:60:M*,N,W0,N,N,T: FreeBSD:4.8-4.11::FreeBSD 4.8-5.1 (or MacOS X) -32768:64:1:60:M*,N,W0,N,N,T: FreeBSD:5.0-5.1::FreeBSD 4.8-5.1 (or MacOS X) -65535:64:1:60:M*,N,W0,N,N,T: FreeBSD:4.8-4.11::FreeBSD 4.8-5.2 (or MacOS X) -65535:64:1:60:M*,N,W0,N,N,T: FreeBSD:5.0-5.2::FreeBSD 4.8-5.2 (or MacOS X) -65535:64:1:60:M*,N,W1,N,N,T: FreeBSD:4.7-4.11::FreeBSD 4.7-5.2 -65535:64:1:60:M*,N,W1,N,N,T: FreeBSD:5.0-5.2::FreeBSD 4.7-5.2 +32768:64:1:60:M*,N,W0,N,N,T:.: FreeBSD:4.8-4.11::FreeBSD 4.8-5.1 (or MacOS X) +32768:64:1:60:M*,N,W0,N,N,T:.: FreeBSD:5.0-5.1::FreeBSD 4.8-5.1 (or MacOS X) +65535:64:1:60:M*,N,W0,N,N,T:.: FreeBSD:4.8-4.11::FreeBSD 4.8-5.2 (or MacOS X) +65535:64:1:60:M*,N,W0,N,N,T:.: FreeBSD:5.0-5.2::FreeBSD 4.8-5.2 (or MacOS X) +65535:64:1:60:M*,N,W1,N,N,T:.: FreeBSD:4.7-4.11::FreeBSD 4.7-5.2 +65535:64:1:60:M*,N,W1,N,N,T:.: FreeBSD:5.0-5.2::FreeBSD 4.7-5.2 -# XXX need quirks support -# 65535:64:1:60:M*,N,W0,N,N,T:Z:FreeBSD:5.1-5.4::5.1-current (1) -# 65535:64:1:60:M*,N,W1,N,N,T:Z:FreeBSD:5.1-5.4::5.1-current (2) -# 65535:64:1:60:M*,N,W2,N,N,T:Z:FreeBSD:5.1-5.4::5.1-current (3) -# 65535:64:1:44:M*:Z:FreeBSD:5.2::FreeBSD 5.2 (no RFC1323) +65535:64:1:60:M*,N,W0,N,N,T:Z: FreeBSD:5.1-5.4::5.1-current (1) +65535:64:1:60:M*,N,W1,N,N,T:Z: FreeBSD:5.1-5.4::5.1-current (2) +65535:64:1:60:M*,N,W2,N,N,T:Z: FreeBSD:5.1-5.4::5.1-current (3) +65535:64:1:44:M*:Z: FreeBSD:5.2::FreeBSD 5.2 (no RFC1323) # 16384:64:1:60:M*,N,N,N,N,N,N,T:FreeBSD:4.4:noTS:FreeBSD 4.4 (w/o timestamps) # ----------------- NetBSD ------------------ -16384:64:0:60:M*,N,W0,N,N,T: NetBSD:1.3::NetBSD 1.3 -65535:64:0:60:M*,N,W0,N,N,T0: NetBSD:1.6:opera:NetBSD 1.6 (Opera) -16384:64:0:60:M*,N,W0,N,N,T0: NetBSD:1.6::NetBSD 1.6 -16384:64:1:60:M*,N,W0,N,N,T0: NetBSD:1.6:df:NetBSD 1.6 (DF) -65535:64:1:60:M*,N,W1,N,N,T0: NetBSD:1.6::NetBSD 1.6W-current (DF) -65535:64:1:60:M*,N,W0,N,N,T0: NetBSD:1.6::NetBSD 1.6X (DF) -32768:64:1:60:M*,N,W0,N,N,T0: NetBSD:1.6:randomization:NetBSD 1.6ZH-current (w/ ip_id randomization) +16384:64:0:60:M*,N,W0,N,N,T:.: NetBSD:1.3::NetBSD 1.3 +65535:64:0:60:M*,N,W0,N,N,T0:.: NetBSD:1.6:opera:NetBSD 1.6 (Opera) +16384:64:0:60:M*,N,W0,N,N,T0:.: NetBSD:1.6::NetBSD 1.6 +16384:64:1:60:M*,N,W0,N,N,T0:.: NetBSD:1.6:df:NetBSD 1.6 (DF) +65535:64:1:60:M*,N,W1,N,N,T0:.: NetBSD:1.6::NetBSD 1.6W-current (DF) +65535:64:1:60:M*,N,W0,N,N,T0:.: NetBSD:1.6::NetBSD 1.6X (DF) +32768:64:1:60:M*,N,W0,N,N,T0:.: NetBSD:1.6:randomization:NetBSD 1.6ZH-current (w/ ip_id randomization) # ----------------- OpenBSD ----------------- -16384:64:0:60:M*,N,W0,N,N,T: OpenBSD:2.6::NetBSD 1.3 (or OpenBSD 2.6) -16384:64:1:64:M*,N,N,S,N,W0,N,N,T: OpenBSD:3.0-4.8::OpenBSD 3.0-4.8 -16384:64:0:64:M*,N,N,S,N,W0,N,N,T: OpenBSD:3.0-4.8:no-df:OpenBSD 3.0-4.8 (scrub no-df) -57344:64:1:64:M*,N,N,S,N,W0,N,N,T: OpenBSD:3.3-4.0::OpenBSD 3.3-4.0 -57344:64:0:64:M*,N,N,S,N,W0,N,N,T: OpenBSD:3.3-4.0:no-df:OpenBSD 3.3-4.0 (scrub no-df) +16384:64:0:60:M*,N,W0,N,N,T:.: OpenBSD:2.6::NetBSD 1.3 (or OpenBSD 2.6) +16384:64:1:64:M*,N,N,S,N,W0,N,N,T:.: OpenBSD:3.0-4.8::OpenBSD 3.0-4.8 +16384:64:0:64:M*,N,N,S,N,W0,N,N,T:.: OpenBSD:3.0-4.8:no-df:OpenBSD 3.0-4.8 (scrub no-df) +57344:64:1:64:M*,N,N,S,N,W0,N,N,T:.: OpenBSD:3.3-4.0::OpenBSD 3.3-4.0 +57344:64:0:64:M*,N,N,S,N,W0,N,N,T:.: OpenBSD:3.3-4.0:no-df:OpenBSD 3.3-4.0 (scrub no-df) -65535:64:1:64:M*,N,N,S,N,W0,N,N,T: OpenBSD:3.0-4.0:opera:OpenBSD 3.0-4.0 (Opera) +65535:64:1:64:M*,N,N,S,N,W0,N,N,T:.: OpenBSD:3.0-4.0:opera:OpenBSD 3.0-4.0 (Opera) -16384:64:1:64:M*,N,N,S,N,W3,N,N,T: OpenBSD:4.9::OpenBSD 4.9 -16384:64:0:64:M*,N,N,S,N,W3,N,N,T: OpenBSD:4.9:no-df:OpenBSD 4.9 (scrub no-df) +16384:64:1:64:M*,N,N,S,N,W3,N,N,T:.: OpenBSD:4.9::OpenBSD 4.9 +16384:64:0:64:M*,N,N,S,N,W3,N,N,T:.: OpenBSD:4.9:no-df:OpenBSD 4.9 (scrub no-df) # ----------------- Solaris ----------------- -S17:64:1:64:N,W3,N,N,T0,N,N,S,M*: Solaris:8:RFC1323:Solaris 8 RFC1323 -S17:64:1:48:N,N,S,M*: Solaris:8::Solaris 8 -S17:255:1:44:M*: Solaris:2.5-2.7::Solaris 2.5 to 7 +S17:64:1:64:N,W3,N,N,T0,N,N,S,M*:.: Solaris:8:RFC1323:Solaris 8 RFC1323 +S17:64:1:48:N,N,S,M*:.: Solaris:8::Solaris 8 +S17:255:1:44:M*:.: Solaris:2.5-2.7::Solaris 2.5 to 7 -S6:255:1:44:M*: Solaris:2.6-2.7::Solaris 2.6 to 7 -S23:255:1:44:M*: Solaris:2.5:1:Solaris 2.5.1 -S34:64:1:48:M*,N,N,S: Solaris:2.9::Solaris 9 -S44:255:1:44:M*: Solaris:2.7::Solaris 7 +S6:255:1:44:M*:.: Solaris:2.6-2.7::Solaris 2.6 to 7 +S23:255:1:44:M*:.: Solaris:2.5:1:Solaris 2.5.1 +S34:64:1:48:M*,N,N,S:.: Solaris:2.9::Solaris 9 +S44:255:1:44:M*:.: Solaris:2.7::Solaris 7 -4096:64:0:44:M1460: SunOS:4.1::SunOS 4.1.x +4096:64:0:44:M1460:.: SunOS:4.1::SunOS 4.1.x -S34:64:1:52:M*,N,W0,N,N,S: Solaris:10:beta:Solaris 10 (beta) -32850:64:1:64:M*,N,N,T,N,W1,N,N,S: Solaris:10::Solaris 10 1203 +S34:64:1:52:M*,N,W0,N,N,S:.: Solaris:10:beta:Solaris 10 (beta) +32850:64:1:64:M*,N,N,T,N,W1,N,N,S:.: Solaris:10::Solaris 10 1203 # ----------------- IRIX -------------------- -49152:64:0:44:M*: IRIX:6.4::IRIX 6.4 -61440:64:0:44:M*: IRIX:6.2-6.5::IRIX 6.2-6.5 -49152:64:0:52:M*,N,W2,N,N,S: IRIX:6.5:RFC1323:IRIX 6.5 (RFC1323) -49152:64:0:52:M*,N,W3,N,N,S: IRIX:6.5:RFC1323:IRIX 6.5 (RFC1323) +49152:64:0:44:M*:.: IRIX:6.4::IRIX 6.4 +61440:64:0:44:M*:.: IRIX:6.2-6.5::IRIX 6.2-6.5 +49152:64:0:52:M*,N,W2,N,N,S:.: IRIX:6.5:RFC1323:IRIX 6.5 (RFC1323) +49152:64:0:52:M*,N,W3,N,N,S:.: IRIX:6.5:RFC1323:IRIX 6.5 (RFC1323) -61440:64:0:48:M*,N,N,S: IRIX:6.5:12-21:IRIX 6.5.12 - 6.5.21 -49152:64:0:48:M*,N,N,S: IRIX:6.5:15-21:IRIX 6.5.15 - 6.5.21 +61440:64:0:48:M*,N,N,S:.: IRIX:6.5:12-21:IRIX 6.5.12 - 6.5.21 +49152:64:0:48:M*,N,N,S:.: IRIX:6.5:15-21:IRIX 6.5.15 - 6.5.21 -49152:60:0:64:M*,N,W2,N,N,T,N,N,S: IRIX:6.5:IP27:IRIX 6.5 IP27 +49152:60:0:64:M*,N,W2,N,N,T,N,N,S:.: IRIX:6.5:IP27:IRIX 6.5 IP27 # ----------------- Tru64 ------------------- -32768:64:1:48:M*,N,W0: Tru64:4.0::Tru64 4.0 (or OS/2 Warp 4) -32768:64:0:48:M*,N,W0: Tru64:5.0::Tru64 5.0 -8192:64:0:44:M1460: Tru64:5.1:noRFC1323:Tru64 6.1 (no RFC1323) (or QNX 6) -61440:64:0:48:M*,N,W0: Tru64:5.1a:JP4:Tru64 v5.1a JP4 (or OpenVMS 7.x on Compaq 5.x stack) +32768:64:1:48:M*,N,W0:.: Tru64:4.0::Tru64 4.0 (or OS/2 Warp 4) +32768:64:0:48:M*,N,W0:.: Tru64:5.0::Tru64 5.0 +8192:64:0:44:M1460:.: Tru64:5.1:noRFC1323:Tru64 6.1 (no RFC1323) (or QNX 6) +61440:64:0:48:M*,N,W0:.: Tru64:5.1a:JP4:Tru64 v5.1a JP4 (or OpenVMS 7.x on Compaq 5.x stack) # ----------------- OpenVMS ----------------- -6144:64:1:60:M*,N,W0,N,N,T: OpenVMS:7.2::OpenVMS 7.2 (Multinet 4.4 stack) +6144:64:1:60:M*,N,W0,N,N,T:.: OpenVMS:7.2::OpenVMS 7.2 (Multinet 4.4 stack) # ----------------- MacOS ------------------- @@ -354,11 +352,11 @@ S34:64:1:52:M*,N,W0,N,N,S: Solaris:10:beta:Solaris 10 (beta) # S2:255:1:48:M*,W0,E:.:MacOS:8.6 classic # XXX some of these use EOL too -16616:255:1:48:M*,W0: MacOS:7.3-7.6:OTTCP:MacOS 7.3-8.6 (OTTCP) -16616:255:1:48:M*,W0: MacOS:8.0-8.6:OTTCP:MacOS 7.3-8.6 (OTTCP) -16616:255:1:48:M*,N,N,N: MacOS:8.1-8.6:OTTCP:MacOS 8.1-8.6 (OTTCP) -32768:255:1:48:M*,W0,N: MacOS:9.0-9.2::MacOS 9.0-9.2 -65535:255:1:48:M*,N,N,N,N: MacOS:9.1::MacOS 9.1 (OT 2.7.4) +16616:255:1:48:M*,W0:.: MacOS:7.3-7.6:OTTCP:MacOS 7.3-8.6 (OTTCP) +16616:255:1:48:M*,W0:.: MacOS:8.0-8.6:OTTCP:MacOS 7.3-8.6 (OTTCP) +16616:255:1:48:M*,N,N,N:.: MacOS:8.1-8.6:OTTCP:MacOS 8.1-8.6 (OTTCP) +32768:255:1:48:M*,W0,N:.: MacOS:9.0-9.2::MacOS 9.0-9.2 +65535:255:1:48:M*,N,N,N,N:.: MacOS:9.1::MacOS 9.1 (OT 2.7.4) # ----------------- Windows ----------------- @@ -370,75 +368,75 @@ S34:64:1:52:M*,N,W0,N,N,S: Solaris:10:beta:Solaris 10 (beta) # awkward MSS of 536, which I use to tell one from another # in most difficult cases. -8192:32:1:44:M*: Windows:3.11::Windows 3.11 (Tucows) -S44:64:1:64:M*,N,W0,N,N,T0,N,N,S: Windows:95::Windows 95 -8192:128:1:64:M*,N,W0,N,N,T0,N,N,S: Windows:95:b:Windows 95b +8192:32:1:44:M*:.: Windows:3.11::Windows 3.11 (Tucows) +S44:64:1:64:M*,N,W0,N,N,T0,N,N,S:.: Windows:95::Windows 95 +8192:128:1:64:M*,N,W0,N,N,T0,N,N,S:.: Windows:95:b:Windows 95b # There were so many tweaking tools and so many stack versions for # Windows 98 it is no longer possible to tell them from each other # without some very serious research. Until then, there's an insane # number of signatures, for your amusement: -S44:32:1:48:M*,N,N,S: Windows:98:lowTTL:Windows 98 (low TTL) -8192:32:1:48:M*,N,N,S: Windows:98:lowTTL:Windows 98 (low TTL) -%8192:64:1:48:M536,N,N,S: Windows:98::Windows 98 -%8192:128:1:48:M536,N,N,S: Windows:98::Windows 98 -S4:64:1:48:M*,N,N,S: Windows:98::Windows 98 -S6:64:1:48:M*,N,N,S: Windows:98::Windows 98 -S12:64:1:48:M*,N,N,S: Windows:98::Windows 98 -T30:64:1:64:M1460,N,W0,N,N,T0,N,N,S: Windows:98::Windows 98 -32767:64:1:48:M*,N,N,S: Windows:98::Windows 98 -37300:64:1:48:M*,N,N,S: Windows:98::Windows 98 -46080:64:1:52:M*,N,W3,N,N,S: Windows:98:RFC1323:Windows 98 (RFC1323) -65535:64:1:44:M*: Windows:98:noSack:Windows 98 (no sack) -S16:128:1:48:M*,N,N,S: Windows:98::Windows 98 -S16:128:1:64:M*,N,W0,N,N,T0,N,N,S: Windows:98::Windows 98 -S26:128:1:48:M*,N,N,S: Windows:98::Windows 98 -T30:128:1:48:M*,N,N,S: Windows:98::Windows 98 -32767:128:1:52:M*,N,W0,N,N,S: Windows:98::Windows 98 -60352:128:1:48:M*,N,N,S: Windows:98::Windows 98 -60352:128:1:64:M*,N,W2,N,N,T0,N,N,S: Windows:98::Windows 98 +S44:32:1:48:M*,N,N,S:.: Windows:98:lowTTL:Windows 98 (low TTL) +8192:32:1:48:M*,N,N,S:.: Windows:98:lowTTL:Windows 98 (low TTL) +%8192:64:1:48:M536,N,N,S:.: Windows:98::Windows 98 +%8192:128:1:48:M536,N,N,S:.: Windows:98::Windows 98 +S4:64:1:48:M*,N,N,S:.: Windows:98::Windows 98 +S6:64:1:48:M*,N,N,S:.: Windows:98::Windows 98 +S12:64:1:48:M*,N,N,S:.: Windows:98::Windows 98 +T30:64:1:64:M1460,N,W0,N,N,T0,N,N,S:.: Windows:98::Windows 98 +32767:64:1:48:M*,N,N,S:.: Windows:98::Windows 98 +37300:64:1:48:M*,N,N,S:.: Windows:98::Windows 98 +46080:64:1:52:M*,N,W3,N,N,S:.: Windows:98:RFC1323:Windows 98 (RFC1323) +65535:64:1:44:M*:.: Windows:98:noSack:Windows 98 (no sack) +S16:128:1:48:M*,N,N,S:.: Windows:98::Windows 98 +S16:128:1:64:M*,N,W0,N,N,T0,N,N,S:.: Windows:98::Windows 98 +S26:128:1:48:M*,N,N,S:.: Windows:98::Windows 98 +T30:128:1:48:M*,N,N,S:.: Windows:98::Windows 98 +32767:128:1:52:M*,N,W0,N,N,S:.: Windows:98::Windows 98 +60352:128:1:48:M*,N,N,S:.: Windows:98::Windows 98 +60352:128:1:64:M*,N,W2,N,N,T0,N,N,S:.: Windows:98::Windows 98 # What's with 1414 on NT? -T31:128:1:44:M1414: Windows:NT:4.0:Windows NT 4.0 SP6a -64512:128:1:44:M1414: Windows:NT:4.0:Windows NT 4.0 SP6a -8192:128:1:44:M*: Windows:NT:4.0:Windows NT 4.0 (older) +T31:128:1:44:M1414:.: Windows:NT:4.0:Windows NT 4.0 SP6a +64512:128:1:44:M1414:.: Windows:NT:4.0:Windows NT 4.0 SP6a +8192:128:1:44:M*:.: Windows:NT:4.0:Windows NT 4.0 (older) # Windows XP and 2000. Most of the signatures that were # either dubious or non-specific (no service pack data) # were deleted and replaced with generics at the end. -65535:128:1:48:M*,N,N,S: Windows:2000:SP4:Windows 2000 SP4, XP SP1 -65535:128:1:48:M*,N,N,S: Windows:XP:SP1:Windows 2000 SP4, XP SP1 -%8192:128:1:48:M*,N,N,S: Windows:2000:SP2+:Windows 2000 SP2, XP SP1 (seldom 98 4.10.2222) -%8192:128:1:48:M*,N,N,S: Windows:XP:SP1:Windows 2000 SP2, XP SP1 (seldom 98 4.10.2222) -S20:128:1:48:M*,N,N,S: Windows:2000::Windows 2000/XP SP3 -S20:128:1:48:M*,N,N,S: Windows:XP:SP3:Windows 2000/XP SP3 -S45:128:1:48:M*,N,N,S: Windows:2000:SP4:Windows 2000 SP4, XP SP 1 -S45:128:1:48:M*,N,N,S: Windows:XP:SP1:Windows 2000 SP4, XP SP 1 -40320:128:1:48:M*,N,N,S: Windows:2000:SP4:Windows 2000 SP4 - -S6:128:1:48:M*,N,N,S: Windows:2000:SP2:Windows XP, 2000 SP2+ -S6:128:1:48:M*,N,N,S: Windows:XP::Windows XP, 2000 SP2+ -S12:128:1:48:M*,N,N,S: Windows:XP:SP1:Windows XP SP1 -S44:128:1:48:M*,N,N,S: Windows:2000:SP3:Windows Pro SP1, 2000 SP3 -S44:128:1:48:M*,N,N,S: Windows:XP:SP1:Windows Pro SP1, 2000 SP3 -64512:128:1:48:M*,N,N,S: Windows:2000:SP3:Windows SP1, 2000 SP3 -64512:128:1:48:M*,N,N,S: Windows:XP:SP1:Windows SP1, 2000 SP3 -32767:128:1:48:M*,N,N,S: Windows:2000:SP4:Windows SP1, 2000 SP4 -32767:128:1:48:M*,N,N,S: Windows:XP:SP1:Windows SP1, 2000 SP4 +65535:128:1:48:M*,N,N,S:.: Windows:2000:SP4:Windows 2000 SP4, XP SP1 +65535:128:1:48:M*,N,N,S:.: Windows:XP:SP1:Windows 2000 SP4, XP SP1 +%8192:128:1:48:M*,N,N,S:.: Windows:2000:SP2+:Windows 2000 SP2, XP SP1 (seldom 98 4.10.2222) +%8192:128:1:48:M*,N,N,S:.: Windows:XP:SP1:Windows 2000 SP2, XP SP1 (seldom 98 4.10.2222) +S20:128:1:48:M*,N,N,S:.: Windows:2000::Windows 2000/XP SP3 +S20:128:1:48:M*,N,N,S:.: Windows:XP:SP3:Windows 2000/XP SP3 +S45:128:1:48:M*,N,N,S:.: Windows:2000:SP4:Windows 2000 SP4, XP SP 1 +S45:128:1:48:M*,N,N,S:.: Windows:XP:SP1:Windows 2000 SP4, XP SP 1 +40320:128:1:48:M*,N,N,S:.: Windows:2000:SP4:Windows 2000 SP4 + +S6:128:1:48:M*,N,N,S:.: Windows:2000:SP2:Windows XP, 2000 SP2+ +S6:128:1:48:M*,N,N,S:.: Windows:XP::Windows XP, 2000 SP2+ +S12:128:1:48:M*,N,N,S:.: Windows:XP:SP1:Windows XP SP1 +S44:128:1:48:M*,N,N,S:.: Windows:2000:SP3:Windows Pro SP1, 2000 SP3 +S44:128:1:48:M*,N,N,S:.: Windows:XP:SP1:Windows Pro SP1, 2000 SP3 +64512:128:1:48:M*,N,N,S:.: Windows:2000:SP3:Windows SP1, 2000 SP3 +64512:128:1:48:M*,N,N,S:.: Windows:XP:SP1:Windows SP1, 2000 SP3 +32767:128:1:48:M*,N,N,S:.: Windows:2000:SP4:Windows SP1, 2000 SP4 +32767:128:1:48:M*,N,N,S:.: Windows:XP:SP1:Windows SP1, 2000 SP4 # Odds, ends, mods: -S52:128:1:48:M1260,N,N,S: Windows:2000:cisco:Windows XP/2000 via Cisco -S52:128:1:48:M1260,N,N,S: Windows:XP:cisco:Windows XP/2000 via Cisco -65520:128:1:48:M*,N,N,S: Windows:XP::Windows XP bare-bone -16384:128:1:52:M536,N,W0,N,N,S: Windows:2000:ZoneAlarm:Windows 2000 w/ZoneAlarm? -2048:255:0:40:.: Windows:.NET::Windows .NET Enterprise Server +S52:128:1:48:M1260,N,N,S:.: Windows:2000:cisco:Windows XP/2000 via Cisco +S52:128:1:48:M1260,N,N,S:.: Windows:XP:cisco:Windows XP/2000 via Cisco +65520:128:1:48:M*,N,N,S:.: Windows:XP::Windows XP bare-bone +16384:128:1:52:M536,N,W0,N,N,S:.: Windows:2000:ZoneAlarm:Windows 2000 w/ZoneAlarm? +2048:255:0:40:.:.: Windows:.NET::Windows .NET Enterprise Server -44620:64:0:48:M*,N,N,S: Windows:ME::Windows ME no SP (?) -S6:255:1:48:M536,N,N,S: Windows:95:winsock2:Windows 95 winsock 2 -32768:32:1:52:M1460,N,W0,N,N,S: Windows:2003:AS:Windows 2003 AS +44620:64:0:48:M*,N,N,S:.: Windows:ME::Windows ME no SP (?) +S6:255:1:48:M536,N,N,S:.: Windows:95:winsock2:Windows 95 winsock 2 +32768:32:1:52:M1460,N,W0,N,N,S:.: Windows:2003:AS:Windows 2003 AS # No need to be more specific, it passes: @@ -447,19 +445,19 @@ S6:255:1:48:M536,N,N,S: Windows:95:winsock2:Windows 95 winsock 2 # ----------------- HP/UX ------------------- -32768:64:1:44:M*: HP-UX:B.10.20::HP-UX B.10.20 -32768:64:0:48:M*,W0,N: HP-UX:11.0::HP-UX 11.0 -32768:64:1:48:M*,W0,N: HP-UX:11.10::HP-UX 11.0 or 11.11 -32768:64:1:48:M*,W0,N: HP-UX:11.11::HP-UX 11.0 or 11.11 +32768:64:1:44:M*:.: HP-UX:B.10.20::HP-UX B.10.20 +32768:64:0:48:M*,W0,N:.: HP-UX:11.0::HP-UX 11.0 +32768:64:1:48:M*,W0,N:.: HP-UX:11.10::HP-UX 11.0 or 11.11 +32768:64:1:48:M*,W0,N:.: HP-UX:11.11::HP-UX 11.0 or 11.11 # Whoa. Hardcore WSS. -0:64:0:48:M*,W0,N: HP-UX:B.11.00:A:HP-UX B.11.00 A (RFC1323) +0:64:0:48:M*,W0,N:.: HP-UX:B.11.00:A:HP-UX B.11.00 A (RFC1323) # ----------------- RiscOS ------------------ # We don't yet support the ?12 TCP option #16384:64:1:68:M1460,N,W0,N,N,T,N,N,?12: RISCOS:3.70-4.36::RISC OS 3.70-4.36 -12288:32:0:44:M536: RISC OS:3.70:4.10:RISC OS 3.70 inet 4.10 +12288:32:0:44:M536:.: RISC OS:3.70:4.10:RISC OS 3.70 inet 4.10 # XXX quirk # 4096:64:1:56:M1460,N,N,T:T: RISC OS:3.70:freenet:RISC OS 3.70 freenet 2.00 @@ -469,74 +467,73 @@ S6:255:1:48:M536,N,N,S: Windows:95:winsock2:Windows 95 winsock 2 # ----------------- BSD/OS ------------------ # Once again, power of two WSS is also shared by MacOS X with DF set -8192:64:1:60:M1460,N,W0,N,N,T: BSD/OS:3.1::BSD/OS 3.1-4.3 (or MacOS X 10.2 w/DF) -8192:64:1:60:M1460,N,W0,N,N,T: BSD/OS:4.0-4.3::BSD/OS 3.1-4.3 (or MacOS X 10.2) +8192:64:1:60:M1460,N,W0,N,N,T:.: BSD/OS:3.1::BSD/OS 3.1-4.3 (or MacOS X 10.2 w/DF) +8192:64:1:60:M1460,N,W0,N,N,T:.: BSD/OS:4.0-4.3::BSD/OS 3.1-4.3 (or MacOS X 10.2) # ---------------- NewtonOS ----------------- -4096:64:0:44:M1420: NewtonOS:2.1::NewtonOS 2.1 +4096:64:0:44:M1420:.: NewtonOS:2.1::NewtonOS 2.1 # ---------------- NeXTSTEP ----------------- -S4:64:0:44:M1024: NeXTSTEP:3.3::NeXTSTEP 3.3 -S8:64:0:44:M512: NeXTSTEP:3.3::NeXTSTEP 3.3 +S4:64:0:44:M1024:.: NeXTSTEP:3.3::NeXTSTEP 3.3 +S8:64:0:44:M512:.: NeXTSTEP:3.3::NeXTSTEP 3.3 # ------------------ BeOS ------------------- -1024:255:0:48:M*,N,W0: BeOS:5.0-5.1::BeOS 5.0-5.1 -12288:255:0:44:M1402: BeOS:5.0::BeOS 5.0.x +1024:255:0:48:M*,N,W0:.: BeOS:5.0-5.1::BeOS 5.0-5.1 +12288:255:0:44:M1402:.: BeOS:5.0::BeOS 5.0.x # ------------------ OS/400 ----------------- -8192:64:1:60:M1440,N,W0,N,N,T: OS/400:VR4::OS/400 VR4/R5 -8192:64:1:60:M1440,N,W0,N,N,T: OS/400:VR5::OS/400 VR4/R5 -4096:64:1:60:M1440,N,W0,N,N,T: OS/400:V4R5:CF67032:OS/400 V4R5 + CF67032 +8192:64:1:60:M1440,N,W0,N,N,T:.:OS/400:VR4::OS/400 VR4/R5 +8192:64:1:60:M1440,N,W0,N,N,T:.:OS/400:VR5::OS/400 VR4/R5 +4096:64:1:60:M1440,N,W0,N,N,T:.:OS/400:V4R5:CF67032:OS/400 V4R5 + CF67032 -# XXX quirk -# 28672:64:0:44:M1460:A:OS/390:? +28672:64:0:44:M1460:A: OS/390:::OS/390? # ------------------ ULTRIX ----------------- -16384:64:0:40:.: ULTRIX:4.5::ULTRIX 4.5 +16384:64:0:40:.:.: ULTRIX:4.5::ULTRIX 4.5 # ------------------- QNX ------------------- -S16:64:0:44:M512: QNX:::QNX demodisk +S16:64:0:44:M512:.: QNX:::QNX demodisk # ------------------ Novell ----------------- -16384:128:1:44:M1460: Novell:NetWare:5.0:Novel Netware 5.0 -6144:128:1:44:M1460: Novell:IntranetWare:4.11:Novell IntranetWare 4.11 -6144:128:1:44:M1368: Novell:BorderManager::Novell BorderManager ? +16384:128:1:44:M1460:.: Novell:NetWare:5.0:Novel Netware 5.0 +6144:128:1:44:M1460:.: Novell:IntranetWare:4.11:Novell IntranetWare 4.11 +6144:128:1:44:M1368:.: Novell:BorderManager::Novell BorderManager ? -6144:128:1:52:M*,W0,N,S,N,N: Novell:Netware:6:Novell Netware 6 SP3 +6144:128:1:52:M*,W0,N,S,N,N:.: Novell:Netware:6:Novell Netware 6 SP3 # ----------------- SCO ------------------ -S3:64:1:60:M1460,N,W0,N,N,T: SCO:UnixWare:7.1:SCO UnixWare 7.1 -S17:64:1:60:M1380,N,W0,N,N,T: SCO:UnixWare:7.1:SCO UnixWare 7.1.3 MP3 -S23:64:1:44:M1380: SCO:OpenServer:5.0:SCO OpenServer 5.0 +S3:64:1:60:M1460,N,W0,N,N,T:.: SCO:UnixWare:7.1:SCO UnixWare 7.1 +S17:64:1:60:M1380,N,W0,N,N,T:.: SCO:UnixWare:7.1:SCO UnixWare 7.1.3 MP3 +S23:64:1:44:M1380:.: SCO:OpenServer:5.0:SCO OpenServer 5.0 # ------------------- DOS ------------------- -2048:255:0:44:M536: DOS:WATTCP:1.05:DOS Arachne via WATTCP/1.05 -T2:255:0:44:M984: DOS:WATTCP:1.05Arachne:Arachne via WATTCP/1.05 (eepro) +2048:255:0:44:M536:.: DOS:WATTCP:1.05:DOS Arachne via WATTCP/1.05 +T2:255:0:44:M984:.: DOS:WATTCP:1.05Arachne:Arachne via WATTCP/1.05 (eepro) # ------------------ OS/2 ------------------- -S56:64:0:44:M512: OS/2:4::OS/2 4 -28672:64:0:44:M1460: OS/2:4::OS/2 Warp 4.0 +S56:64:0:44:M512:.: OS/2:4::OS/2 4 +28672:64:0:44:M1460:.: OS/2:4::OS/2 Warp 4.0 # ----------------- TOPS-20 ----------------- # Another hardcore MSS, one of the ACK leakers hunted down. # XXX QUIRK 0:64:0:44:M1460:A:TOPS-20:version 7 -0:64:0:44:M1460: TOPS-20:7::TOPS-20 version 7 +0:64:0:44:M1460:.: TOPS-20:7::TOPS-20 version 7 # ----------------- FreeMiNT ---------------- -S44:255:0:44:M536: FreeMiNT:1:16A:FreeMiNT 1 patch 16A (Atari) +S44:255:0:44:M536:.: FreeMiNT:1:16A:FreeMiNT 1 patch 16A (Atari) # ------------------ AMIGA ------------------ @@ -545,11 +542,11 @@ S44:255:0:44:M536: FreeMiNT:1:16A:FreeMiNT 1 patch 16A (Atari) # ------------------ Plan9 ------------------ -65535:255:0:48:M1460,W0,N: Plan9:4::Plan9 edition 4 +65535:255:0:48:M1460,W0,N:.: Plan9:4::Plan9 edition 4 # ----------------- AMIGAOS ----------------- -16384:64:1:48:M1560,N,N,S: AMIGAOS:3.9::AMIGAOS 3.9 BB2 MiamiDX +16384:64:1:48:M1560,N,N,S:.: AMIGAOS:3.9::AMIGAOS 3.9 BB2 MiamiDX ########################################### # Appliance / embedded / other signatures # @@ -557,133 +554,131 @@ S44:255:0:44:M536: FreeMiNT:1:16A:FreeMiNT 1 patch 16A (Atari) # ---------- Firewalls / routers ------------ -S12:64:1:44:M1460: @Checkpoint:::Checkpoint (unknown 1) -S12:64:1:48:N,N,S,M1460: @Checkpoint:::Checkpoint (unknown 2) -4096:32:0:44:M1460: ExtremeWare:4.x::ExtremeWare 4.x +S12:64:1:44:M1460:.: @Checkpoint:::Checkpoint (unknown 1) +S12:64:1:48:N,N,S,M1460:.: @Checkpoint:::Checkpoint (unknown 2) +4096:32:0:44:M1460:.: ExtremeWare:4.x::ExtremeWare 4.x # XXX TCP option 12 # S32:64:0:68:M512,N,W0,N,N,T,N,N,?12:.:Nokia:IPSO w/Checkpoint NG FP3 # S16:64:0:68:M1024,N,W0,N,N,T,N,N,?12:.:Nokia:IPSO 3.7 build 026 -S4:64:1:60:W0,N,S,T,M1460: FortiNet:FortiGate:50:FortiNet FortiGate 50 +S4:64:1:60:W0,N,S,T,M1460:.: FortiNet:FortiGate:50:FortiNet FortiGate 50 -8192:64:1:44:M1460: Eagle:::Eagle Secure Gateway +8192:64:1:44:M1460:.: Eagle:::Eagle Secure Gateway -S52:128:1:48:M1260,N,N,N,N: LinkSys:WRV54G::LinkSys WRV54G VPN router +S52:128:1:48:M1260,N,N,N,N:.: LinkSys:WRV54G::LinkSys WRV54G VPN router # ------- Switches and other stuff ---------- -4128:255:0:44:M*: Cisco:::Cisco Catalyst 3500, 7500 etc -S8:255:0:44:M*: Cisco:12008::Cisco 12008 -60352:128:1:64:M1460,N,W2,N,N,T,N,N,S: Alteon:ACEswitch::Alteon ACEswitch -64512:128:1:44:M1370: Nortel:Contivity Client::Nortel Conectivity Client +4128:255:0:44:M*:.: Cisco:::Cisco Catalyst 3500, 7500 etc +S8:255:0:44:M*:.: Cisco:12008::Cisco 12008 +60352:128:1:64:M1460,N,W2,N,N,T,N,N,S:.:Alteon:ACEswitch::Alteon ACEswitch +64512:128:1:44:M1370:.: Nortel:Contivity Client::Nortel Conectivity Client # ---------- Caches and whatnots ------------ -S4:64:1:52:M1460,N,N,S,N,W0: AOL:web cache::AOL web cache +S4:64:1:52:M1460,N,N,S,N,W0:.: AOL:web cache::AOL web cache -32850:64:1:64:N,W1,N,N,T,N,N,S,M*: NetApp:5.x::NetApp Data OnTap 5.x -16384:64:1:64:M1460,N,N,S,N,W0,N: NetApp:5.3:1:NetApp 5.3.1 -65535:64:0:64:M1460,N,N,S,N,W*,N,N,T: NetApp:5.3-5.5::NetApp 5.3-5.5 -65535:64:0:60:M1460,N,W0,N,N,T: NetApp:CacheFlow::NetApp CacheFlow -8192:64:1:64:M1460,N,N,S,N,W0,N,N,T: NetApp:5.2:1:NetApp NetCache 5.2.1 -20480:64:1:64:M1460,N,N,S,N,W0,N,N,T: NetApp:4.1::NetApp NetCache4.1 +32850:64:1:64:N,W1,N,N,T,N,N,S,M*:.: NetApp:5.x::NetApp Data OnTap 5.x +16384:64:1:64:M1460,N,N,S,N,W0,N:.: NetApp:5.3:1:NetApp 5.3.1 +65535:64:0:64:M1460,N,N,S,N,W*,N,N,T:.: NetApp:5.3-5.5::NetApp 5.3-5.5 +65535:64:0:60:M1460,N,W0,N,N,T:.: NetApp:CacheFlow::NetApp CacheFlow +8192:64:1:64:M1460,N,N,S,N,W0,N,N,T:.: NetApp:5.2:1:NetApp NetCache 5.2.1 +20480:64:1:64:M1460,N,N,S,N,W0,N,N,T:.: NetApp:4.1::NetApp NetCache4.1 -65535:64:0:60:M1460,N,W0,N,N,T: CacheFlow:4.1::CacheFlow CacheOS 4.1 -8192:64:0:60:M1380,N,N,N,N,N,N,T: CacheFlow:1.1::CacheFlow CacheOS 1.1 +65535:64:0:60:M1460,N,W0,N,N,T:.: CacheFlow:4.1::CacheFlow CacheOS 4.1 +8192:64:0:60:M1380,N,N,N,N,N,N,T:.: CacheFlow:1.1::CacheFlow CacheOS 1.1 -S4:64:0:48:M1460,N,N,S: Cisco:Content Engine::Cisco Content Engine +S4:64:0:48:M1460,N,N,S:.: Cisco:Content Engine::Cisco Content Engine -27085:128:0:40:.: Dell:PowerApp cache::Dell PowerApp (Linux-based) +27085:128:0:40:.:.: Dell:PowerApp cache::Dell PowerApp (Linux-based) -65535:255:1:48:N,W1,M1460: Inktomi:crawler::Inktomi crawler -S1:255:1:60:M1460,S,T,N,W0: LookSmart:ZyBorg::LookSmart ZyBorg +65535:255:1:48:N,W1,M1460:.: Inktomi:crawler::Inktomi crawler +S1:255:1:60:M1460,S,T,N,W0:.: LookSmart:ZyBorg::LookSmart ZyBorg -16384:255:0:40:.: Proxyblocker:::Proxyblocker (what's this?) +16384:255:0:40:.:.: Proxyblocker:::Proxyblocker (what's this?) -65535:255:0:48:M*,N,N,S: Redline:::Redline T|X 2200 +65535:255:0:48:M*,N,N,S:.: Redline:::Redline T|X 2200 -32696:128:0:40:M1460: Spirent:Avalanche::Spirent Web Avalanche HTTP benchmarking engine +32696:128:0:40:M1460:.: Spirent:Avalanche::Spirent Web Avalanche HTTP benchmarking engine # ----------- Embedded systems -------------- -S9:255:0:44:M536: PalmOS:Tungsten:C:PalmOS Tungsten C -S5:255:0:44:M536: PalmOS:3::PalmOS 3/4 -S5:255:0:44:M536: PalmOS:4::PalmOS 3/4 -S4:255:0:44:M536: PalmOS:3:5:PalmOS 3.5 -2948:255:0:44:M536: PalmOS:3:5:PalmOS 3.5.3 (Handera) -S29:255:0:44:M536: PalmOS:5::PalmOS 5.0 -16384:255:0:44:M1398: PalmOS:5.2:Clie:PalmOS 5.2 (Clie) -S14:255:0:44:M1350: PalmOS:5.2:Treo:PalmOS 5.2.1 (Treo) +S9:255:0:44:M536:.: PalmOS:Tungsten:C:PalmOS Tungsten C +S5:255:0:44:M536:.: PalmOS:3::PalmOS 3/4 +S5:255:0:44:M536:.: PalmOS:4::PalmOS 3/4 +S4:255:0:44:M536:.: PalmOS:3:5:PalmOS 3.5 +2948:255:0:44:M536:.: PalmOS:3:5:PalmOS 3.5.3 (Handera) +S29:255:0:44:M536:.: PalmOS:5::PalmOS 5.0 +16384:255:0:44:M1398:.: PalmOS:5.2:Clie:PalmOS 5.2 (Clie) +S14:255:0:44:M1350:.: PalmOS:5.2:Treo:PalmOS 5.2.1 (Treo) -S23:64:1:64:N,W1,N,N,T,N,N,S,M1460: SymbianOS:7::SymbianOS 7 +S23:64:1:64:N,W1,N,N,T,N,N,S,M1460:.: SymbianOS:7::SymbianOS 7 -8192:255:0:44:M1460: SymbianOS:6048::Symbian OS 6048 (Nokia 7650?) -8192:255:0:44:M536: SymbianOS:9210::Symbian OS (Nokia 9210?) -S22:64:1:56:M1460,T,S: SymbianOS:P800::Symbian OS ? (SE P800?) -S36:64:1:56:M1360,T,S: SymbianOS:6600::Symbian OS 60xx (Nokia 6600?) +8192:255:0:44:M1460:.: SymbianOS:6048::Symbian OS 6048 (Nokia 7650?) +8192:255:0:44:M536:.: SymbianOS:9210::Symbian OS (Nokia 9210?) +S22:64:1:56:M1460,T,S:.: SymbianOS:P800::Symbian OS ? (SE P800?) +S36:64:1:56:M1360,T,S:.: SymbianOS:6600::Symbian OS 60xx (Nokia 6600?) # Perhaps S4? -5840:64:1:60:M1452,S,T,N,W1: Zaurus:3.10::Zaurus 3.10 +5840:64:1:60:M1452,S,T,N,W1:.: Zaurus:3.10::Zaurus 3.10 -32768:128:1:64:M1460,N,W0,N,N,T0,N,N,S: PocketPC:2002::PocketPC 2002 +32768:128:1:64:M1460,N,W0,N,N,T0,N,N,S:.: PocketPC:2002::PocketPC 2002 -S1:255:0:44:M346: Contiki:1.1:rc0:Contiki 1.1-rc0 +S1:255:0:44:M346:.: Contiki:1.1:rc0:Contiki 1.1-rc0 -4096:128:0:44:M1460: Sega:Dreamcast:3.0:Sega Dreamcast Dreamkey 3.0 -T5:64:0:44:M536: Sega:Dreamcast:HKT-3020:Sega Dreamcast HKT-3020 (browser disc 51027) -S22:64:1:44:M1460: Sony:PS2::Sony Playstation 2 (SOCOM?) +4096:128:0:44:M1460:.: Sega:Dreamcast:3.0:Sega Dreamcast Dreamkey 3.0 +T5:64:0:44:M536:.: Sega:Dreamcast:HKT-3020:Sega Dreamcast HKT-3020 (browser disc 51027) +S22:64:1:44:M1460:.: Sony:PS2::Sony Playstation 2 (SOCOM?) -S12:64:0:44:M1452: AXIS:5600:v5.64:AXIS Printer Server 5600 v5.64 +S12:64:0:44:M1452:.: AXIS:5600:v5.64:AXIS Printer Server 5600 v5.64 -3100:32:1:44:M1460: Windows:CE:2.0:Windows CE 2.0 +3100:32:1:44:M1460:.: Windows:CE:2.0:Windows CE 2.0 #################### # Fancy signatures # #################### -1024:64:0:40:.: *NMAP:syn scan:1:NMAP syn scan (1) -2048:64:0:40:.: *NMAP:syn scan:2:NMAP syn scan (2) -3072:64:0:40:.: *NMAP:syn scan:3:NMAP syn scan (3) -4096:64:0:40:.: *NMAP:syn scan:4:NMAP syn scan (4) +1024:64:0:40:.:.: *NMAP:syn scan:1:NMAP syn scan (1) +2048:64:0:40:.:.: *NMAP:syn scan:2:NMAP syn scan (2) +3072:64:0:40:.:.: *NMAP:syn scan:3:NMAP syn scan (3) +4096:64:0:40:.:.: *NMAP:syn scan:4:NMAP syn scan (4) -# Requires quirks support -# 1024:64:0:40:.:A:*NMAP:TCP sweep probe (1) -# 2048:64:0:40:.:A:*NMAP:TCP sweep probe (2) -# 3072:64:0:40:.:A:*NMAP:TCP sweep probe (3) -# 4096:64:0:40:.:A:*NMAP:TCP sweep probe (4) +1024:64:0:40:.:A: *NMAP:sweep:1:TCP sweep probe (1) +2048:64:0:40:.:A: *NMAP:sweep:2:TCP sweep probe (2) +3072:64:0:40:.:A: *NMAP:sweep:3:TCP sweep probe (3) +4096:64:0:40:.:A: *NMAP:sweep:4:TCP sweep probe (4) -1024:64:0:60:W10,N,M265,T: *NMAP:OS:1:NMAP OS detection probe (1) -2048:64:0:60:W10,N,M265,T: *NMAP:OS:2:NMAP OS detection probe (2) -3072:64:0:60:W10,N,M265,T: *NMAP:OS:3:NMAP OS detection probe (3) -4096:64:0:60:W10,N,M265,T: *NMAP:OS:4:NMAP OS detection probe (4) +1024:64:0:60:W10,N,M265,T:.: *NMAP:OS:1:NMAP OS detection probe (1) +2048:64:0:60:W10,N,M265,T:.: *NMAP:OS:2:NMAP OS detection probe (2) +3072:64:0:60:W10,N,M265,T:.: *NMAP:OS:3:NMAP OS detection probe (3) +4096:64:0:60:W10,N,M265,T:.: *NMAP:OS:4:NMAP OS detection probe (4) -32767:64:0:40:.: *NAST:::NASTsyn scan +32767:64:0:40:.:.: *NAST:::NASTsyn scan -# Requires quirks support -# 12345:255:0:40:.:A:-p0f:sendsyn utility +12345:255:0:40:.:A: -p0f:::sendsyn utility ##################################### # Generic signatures - just in case # ##################################### -#*:64:1:60:M*,N,W*,N,N,T: @FreeBSD:4.0-4.9::FreeBSD 4.x/5.x -#*:64:1:60:M*,N,W*,N,N,T: @FreeBSD:5.0-5.1::FreeBSD 4.x/5.x - -*:128:1:52:M*,N,W0,N,N,S: @Windows:XP:RFC1323:Windows XP/2000 (RFC1323 no tstamp) -*:128:1:52:M*,N,W0,N,N,S: @Windows:2000:RFC1323:Windows XP/2000 (RFC1323 no tstamp) -*:128:1:52:M*,N,W*,N,N,S: @Windows:XP:RFC1323:Windows XP/2000 (RFC1323 no tstamp) -*:128:1:52:M*,N,W*,N,N,S: @Windows:2000:RFC1323:Windows XP/2000 (RFC1323 no tstamp) -*:128:1:64:M*,N,W0,N,N,T0,N,N,S: @Windows:XP:RFC1323:Windows XP/2000 (RFC1323) -*:128:1:64:M*,N,W0,N,N,T0,N,N,S: @Windows:2000:RFC1323:Windows XP/2000 (RFC1323) -*:128:1:64:M*,N,W*,N,N,T0,N,N,S: @Windows:XP:RFC1323:Windows XP (RFC1323, w+) -*:128:1:48:M536,N,N,S: @Windows:98::Windows 98 -*:128:1:48:M*,N,N,S: @Windows:XP::Windows XP/2000 -*:128:1:48:M*,N,N,S: @Windows:2000::Windows XP/2000 +#*:64:1:60:M*,N,W*,N,N,T:.: @FreeBSD:4.0-4.9::FreeBSD 4.x/5.x +#*:64:1:60:M*,N,W*,N,N,T:.: @FreeBSD:5.0-5.1::FreeBSD 4.x/5.x + +*:128:1:52:M*,N,W0,N,N,S:.: @Windows:XP:RFC1323:Windows XP/2000 (RFC1323 no tstamp) +*:128:1:52:M*,N,W0,N,N,S:.: @Windows:2000:RFC1323:Windows XP/2000 (RFC1323 no tstamp) +*:128:1:52:M*,N,W*,N,N,S:.: @Windows:XP:RFC1323:Windows XP/2000 (RFC1323 no tstamp) +*:128:1:52:M*,N,W*,N,N,S:.: @Windows:2000:RFC1323:Windows XP/2000 (RFC1323 no tstamp) +*:128:1:64:M*,N,W0,N,N,T0,N,N,S:.: @Windows:XP:RFC1323:Windows XP/2000 (RFC1323) +*:128:1:64:M*,N,W0,N,N,T0,N,N,S:.: @Windows:2000:RFC1323:Windows XP/2000 (RFC1323) +*:128:1:64:M*,N,W*,N,N,T0,N,N,S:.: @Windows:XP:RFC1323:Windows XP (RFC1323, w+) +*:128:1:48:M536,N,N,S:.: @Windows:98::Windows 98 +*:128:1:48:M*,N,N,S:.: @Windows:XP::Windows XP/2000 +*:128:1:48:M*,N,N,S:.: @Windows:2000::Windows XP/2000 diff --git a/sbin/pfctl/pfctl_osfp.c b/sbin/pfctl/pfctl_osfp.c index d7531e55f02..22f8b5add91 100644 --- a/sbin/pfctl/pfctl_osfp.c +++ b/sbin/pfctl/pfctl_osfp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_osfp.c,v 1.16 2009/12/24 10:06:35 sobrado Exp $ */ +/* $OpenBSD: pfctl_osfp.c,v 1.17 2010/10/17 12:14:28 jsing Exp $ */ /* * Copyright (c) 2003 Mike Frantzen <frantzen@openbsd.org> @@ -79,6 +79,8 @@ int get_str(char **, size_t *, char **, const char *, int, int get_tcpopts(const char *, int, const char *, pf_tcpopts_t *, int *, int *, int *, int *, int *, int *); +int get_quirks(const char *, int, const char *, + u_int16_t *); void import_fingerprint(struct pf_osfp_ioctl *); const char *print_ioctl(struct pf_osfp_ioctl *); void print_name_list(int, struct name_list *, const char *); @@ -96,7 +98,7 @@ pfctl_file_fingerprints(int dev, int opts, const char *fp_filename) int window, w_mod, ttl, df, psize, p_mod, mss, mss_mod, wscale, wscale_mod, optcnt, ts0; pf_tcpopts_t packed_tcpopts; - char *class, *version, *subtype, *desc, *tcpopts; + char *class, *version, *subtype, *desc, *tcpopts, *quirks; struct pf_osfp_ioctl fp; pfctl_flush_my_fingerprints(&classes); @@ -105,7 +107,7 @@ pfctl_file_fingerprints(int dev, int opts, const char *fp_filename) warn("%s", fp_filename); return (1); } - class = version = subtype = desc = tcpopts = NULL; + class = version = subtype = desc = tcpopts = quirks = NULL; if ((opts & PF_OPT_NOACTION) == 0) pfctl_clear_fingerprints(dev, opts); @@ -122,7 +124,9 @@ pfctl_file_fingerprints(int dev, int opts, const char *fp_filename) free(desc); if (tcpopts) free(tcpopts); - class = version = subtype = desc = tcpopts = NULL; + if (quirks) + free(quirks); + class = version = subtype = desc = tcpopts = quirks = NULL; memset(&fp, 0, sizeof(fp)); /* Chop off comment */ @@ -158,20 +162,26 @@ pfctl_file_fingerprints(int dev, int opts, const char *fp_filename) GET_INT(psize, &p_mod, "overall packet size", T_MOD|T_DC, 8192) || GET_STR(tcpopts, "TCP Options", 1) || + GET_STR(quirks, "Quirks", 1) || GET_STR(class, "OS class", 1) || GET_STR(version, "OS version", 0) || GET_STR(subtype, "OS subtype", 0) || GET_STR(desc, "OS description", 2)) continue; - if (get_tcpopts(fp_filename, lineno, tcpopts, &packed_tcpopts, - &optcnt, &mss, &mss_mod, &wscale, &wscale_mod, &ts0)) - continue; + if (len != 0) { fprintf(stderr, "%s:%d excess field\n", fp_filename, lineno); continue; } + if (get_tcpopts(fp_filename, lineno, tcpopts, &packed_tcpopts, + &optcnt, &mss, &mss_mod, &wscale, &wscale_mod, &ts0)) + continue; + + if (get_quirks(fp_filename, lineno, quirks, &fp.fp_quirks)) + continue; + fp.fp_ttl = ttl; if (df) fp.fp_flags |= PF_OSFP_DF; @@ -202,7 +212,6 @@ pfctl_file_fingerprints(int dev, int opts, const char *fp_filename) } fp.fp_psize = psize; - switch (wscale_mod) { case T_DC: fp.fp_flags |= PF_OSFP_WSCALE_DC; @@ -687,7 +696,6 @@ import_fingerprint(struct pf_osfp_ioctl *fp) } } - fingerprint_count++; DEBUG(fp, "import signature %d:%d:%d", class, version, subtype); } @@ -976,6 +984,71 @@ get_tcpopts(const char *filename, int lineno, const char *tcpopts, return (0); } +int +get_quirks(const char *filename, int lineno, const char *quirkstr, + u_int16_t *quirks) +{ + int i, opt; + + *quirks = 0; + + if (strcmp(quirkstr, ".") == 0) + return (0); + + for (i = 0; quirkstr[i];) { + switch ((opt = toupper(quirkstr[i++]))) { + case 'D': + fprintf(stderr, "%s:%d quirk %c not yet supported\n", + filename, lineno, opt); + *quirks |= PF_OSFP_QUIRK_DATA; + break; + case 'Q': + *quirks |= PF_OSFP_QUIRK_SEQEQ; + break; + case '0': + *quirks |= PF_OSFP_QUIRK_SEQZERO; + break; + case 'P': + fprintf(stderr, "%s:%d quirk %c not yet supported\n", + filename, lineno, opt); + *quirks |= PF_OSFP_QUIRK_PAST; + break; + case 'Z': + *quirks |= PF_OSFP_QUIRK_ZEROID; + break; + case 'I': + *quirks |= PF_OSFP_QUIRK_IPOPT; + break; + case 'U': + *quirks |= PF_OSFP_QUIRK_URG; + break; + case 'X': + *quirks |= PF_OSFP_QUIRK_X2; + break; + case 'A': + *quirks |= PF_OSFP_QUIRK_ACKNO; + break; + case 'T': + *quirks |= PF_OSFP_QUIRK_TS2; + break; + case 'F': + *quirks |= PF_OSFP_QUIRK_FLAGS; + break; + case '!': + fprintf(stderr, "%s:%d quirk %c not yet supported\n", + filename, lineno, opt); + *quirks |= PF_OSFP_QUIRK_BROKEN; + break; + default: + fprintf(stderr, "%s:%d unknown quirk %c\n", + filename, lineno, opt); + return (1); + } + } + + return (0); +} + /* rip the next field out of a formatted config file line */ char * get_field(char **line, size_t *len, int *fieldlen) diff --git a/sys/net/pf_osfp.c b/sys/net/pf_osfp.c index 3d7b5af0010..31c766c16a2 100644 --- a/sys/net/pf_osfp.c +++ b/sys/net/pf_osfp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_osfp.c,v 1.19 2010/10/04 09:13:05 claudio Exp $ */ +/* $OpenBSD: pf_osfp.c,v 1.20 2010/10/17 12:14:28 jsing Exp $ */ /* * Copyright (c) 2003 Mike Frantzen <frantzen@w4g.org> @@ -111,7 +111,7 @@ struct pf_osfp_enlist * pf_osfp_fingerprint_hdr(const struct ip *ip, const struct ip6_hdr *ip6, const struct tcphdr *tcp) { struct pf_os_fingerprint fp, *fpresult; - int cnt, optlen = 0; + int cnt, tscnt = 0, optlen = 0; const u_int8_t *optp; #ifdef _KERNEL char srcname[128]; @@ -137,6 +137,10 @@ pf_osfp_fingerprint_hdr(const struct ip *ip, const struct ip6_hdr *ip6, const st fp.fp_ttl = ip->ip_ttl; if (ip->ip_off & htons(IP_DF)) fp.fp_flags |= PF_OSFP_DF; + if (ip->ip_hl > 5) + fp.fp_quirks |= PF_OSFP_QUIRK_IPOPT; + if (ip->ip_id == 0) + fp.fp_quirks |= PF_OSFP_QUIRK_ZEROID; #ifdef _KERNEL strlcpy(srcname, inet_ntoa(ip->ip_src), sizeof(srcname)); #else @@ -178,6 +182,19 @@ pf_osfp_fingerprint_hdr(const struct ip *ip, const struct ip6_hdr *ip6, const st return (NULL); fp.fp_wsize = ntohs(tcp->th_win); + /* Set quirks flags. */ + if (tcp->th_seq == tcp->th_ack) + fp.fp_quirks |= PF_OSFP_QUIRK_SEQEQ; + if (tcp->th_seq == 0) + fp.fp_quirks |= PF_OSFP_QUIRK_SEQZERO; + if (tcp->th_ack != 0) + fp.fp_quirks |= PF_OSFP_QUIRK_ACKNO; + if (tcp->th_urp != 0) + fp.fp_quirks |= PF_OSFP_QUIRK_URG; + if (tcp->th_x2 != 0) + fp.fp_quirks |= PF_OSFP_QUIRK_X2; + if (tcp->th_flags & ~(TH_SYN|TH_ACK|TH_RST|TH_ECE|TH_CWR)) + fp.fp_quirks |= PF_OSFP_QUIRK_FLAGS; cnt = (tcp->th_off << 2) - sizeof(*tcp); optp = (const u_int8_t *)((const char *)tcp + sizeof(*tcp)); @@ -218,12 +235,15 @@ pf_osfp_fingerprint_hdr(const struct ip *ip, const struct ip6_hdr *ip6, const st PF_OSFP_TCPOPT_BITS) | PF_OSFP_TCPOPT_SACK; break; case TCPOPT_TIMESTAMP: + tscnt++; if (optlen >= TCPOLEN_TIMESTAMP) { u_int32_t ts; memcpy(&ts, &optp[2], sizeof(ts)); if (ts == 0) fp.fp_flags |= PF_OSFP_TS0; - + else if (tscnt > 1) + fp.fp_quirks |= + PF_OSFP_QUIRK_TS2; } fp.fp_tcpopts = (fp.fp_tcpopts << PF_OSFP_TCPOPT_BITS) | PF_OSFP_TCPOPT_TS; @@ -236,8 +256,8 @@ pf_osfp_fingerprint_hdr(const struct ip *ip, const struct ip6_hdr *ip6, const st } DPFPRINTF(LOG_NOTICE, - "fingerprinted %s:%d %d:%d:%d:%d:%llx (%d) " - "(TS=%s,M=%s%d,W=%s%d)", + "fingerprinted %s:%d %d:%d:%d:%d:%llx (%d) " + "(TS=%s,M=%s%d,W=%s%d) (0x%hx)", srcname, ntohs(tcp->th_sport), fp.fp_wsize, fp.fp_ttl, (fp.fp_flags & PF_OSFP_DF) != 0, fp.fp_psize, (long long int)fp.fp_tcpopts, fp.fp_optcnt, @@ -247,7 +267,7 @@ pf_osfp_fingerprint_hdr(const struct ip *ip, const struct ip6_hdr *ip6, const st fp.fp_mss, (fp.fp_flags & PF_OSFP_WSCALE_MOD) ? "%" : (fp.fp_flags & PF_OSFP_WSCALE_DC) ? "*" : "", - fp.fp_wscale); + fp.fp_wscale, fp.fp_quirks); if ((fpresult = pf_osfp_find(&pf_osfp_list, &fp, PF_OSFP_MAXTTL_OFFSET))) @@ -328,6 +348,7 @@ pf_osfp_add(struct pf_osfp_ioctl *fpioc) fpadd.fp_psize = fpioc->fp_psize; fpadd.fp_mss = fpioc->fp_mss; fpadd.fp_flags = fpioc->fp_flags; + fpadd.fp_quirks = fpioc->fp_quirks; fpadd.fp_optcnt = fpioc->fp_optcnt; fpadd.fp_wscale = fpioc->fp_wscale; fpadd.fp_ttl = fpioc->fp_ttl; @@ -358,7 +379,7 @@ pf_osfp_add(struct pf_osfp_ioctl *fpioc) fpioc->fp_os.fp_os); if ((fp = pf_osfp_find_exact(&pf_osfp_list, &fpadd))) { - SLIST_FOREACH(entry, &fp->fp_oses, fp_entry) { + SLIST_FOREACH(entry, &fp->fp_oses, fp_entry) { if (PF_OSFP_ENTRY_EQ(entry, &fpioc->fp_os)) return (EEXIST); } @@ -374,6 +395,7 @@ pf_osfp_add(struct pf_osfp_ioctl *fpioc) fp->fp_psize = fpioc->fp_psize; fp->fp_mss = fpioc->fp_mss; fp->fp_flags = fpioc->fp_flags; + fp->fp_quirks = fpioc->fp_quirks; fp->fp_optcnt = fpioc->fp_optcnt; fp->fp_wscale = fpioc->fp_wscale; fp->fp_ttl = fpioc->fp_ttl; @@ -471,6 +493,8 @@ pf_osfp_find(struct pf_osfp_list *list, struct pf_os_fingerprint *find, continue; } } + if (f->fp_quirks != find->fp_quirks) + continue; return (f); } @@ -489,6 +513,7 @@ pf_osfp_find_exact(struct pf_osfp_list *list, struct pf_os_fingerprint *find) f->fp_psize == find->fp_psize && f->fp_mss == find->fp_mss && f->fp_flags == find->fp_flags && + f->fp_quirks == find->fp_quirks && f->fp_optcnt == find->fp_optcnt && f->fp_wscale == find->fp_wscale && f->fp_ttl == find->fp_ttl) @@ -523,7 +548,6 @@ pf_osfp_get(struct pf_osfp_ioctl *fpioc) int num = fpioc->fp_getnum; int i = 0; - memset(fpioc, 0, sizeof(*fpioc)); SLIST_FOREACH(fp, &pf_osfp_list, fp_next) { SLIST_FOREACH(entry, &fp->fp_oses, fp_entry) { @@ -531,6 +555,7 @@ pf_osfp_get(struct pf_osfp_ioctl *fpioc) fpioc->fp_mss = fp->fp_mss; fpioc->fp_wsize = fp->fp_wsize; fpioc->fp_flags = fp->fp_flags; + fpioc->fp_quirks = fp->fp_quirks; fpioc->fp_psize = fp->fp_psize; fpioc->fp_ttl = fp->fp_ttl; fpioc->fp_wscale = fp->fp_wscale; @@ -545,7 +570,6 @@ pf_osfp_get(struct pf_osfp_ioctl *fpioc) return (EBUSY); } - /* Validate that each signature is reachable */ struct pf_os_fingerprint * pf_osfp_validate(void) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 4c812506839..d90fa3faa71 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfvar.h,v 1.315 2010/09/22 05:58:29 henning Exp $ */ +/* $OpenBSD: pfvar.h,v 1.316 2010/10/17 12:14:28 jsing Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -487,6 +487,19 @@ struct pf_os_fingerprint { #define PF_OSFP_DF 0x1000 /* IPv4 don't fragment bit */ #define PF_OSFP_TS0 0x2000 /* Zero timestamp */ #define PF_OSFP_INET6 0x4000 /* IPv6 */ + u_int16_t fp_quirks; +#define PF_OSFP_QUIRK_DATA 0x0001 /* SYN contains payload. */ +#define PF_OSFP_QUIRK_SEQEQ 0x0002 /* SEQ no equals ACK no. */ +#define PF_OSFP_QUIRK_SEQZERO 0x0004 /* SEQ no is zero. */ +#define PF_OSFP_QUIRK_PAST 0x0008 /* Options past EOL. */ +#define PF_OSFP_QUIRK_ZEROID 0x0010 /* IPv4 ID is zero. */ +#define PF_OSFP_QUIRK_IPOPT 0x0020 /* IPv4 options specified. */ +#define PF_OSFP_QUIRK_URG 0x0040 /* URG pointer non-zero. */ +#define PF_OSFP_QUIRK_X2 0x0080 /* Used x2 field non-zero. */ +#define PF_OSFP_QUIRK_ACKNO 0x0100 /* ACK no is non-zero. */ +#define PF_OSFP_QUIRK_TS2 0x0200 /* Second non-zero timestamp. */ +#define PF_OSFP_QUIRK_FLAGS 0x0400 /* Unusual flags set. */ +#define PF_OSFP_QUIRK_BROKEN 0x0800 /* Broken options segment. */ u_int8_t fp_optcnt; /* TCP option count */ u_int8_t fp_wscale; /* TCP window scaling */ u_int8_t fp_ttl; /* IPv4 TTL */ @@ -512,6 +525,7 @@ struct pf_osfp_ioctl { u_int16_t fp_psize; /* ip->ip_len */ u_int16_t fp_mss; /* TCP MSS */ u_int16_t fp_flags; + u_int16_t fp_quirks; u_int8_t fp_optcnt; /* TCP option count */ u_int8_t fp_wscale; /* TCP window scaling */ u_int8_t fp_ttl; /* IPv4 TTL */ diff --git a/usr.sbin/tcpdump/pfctl_osfp.c b/usr.sbin/tcpdump/pfctl_osfp.c index 6037e6f765b..4ec9d1fa833 100644 --- a/usr.sbin/tcpdump/pfctl_osfp.c +++ b/usr.sbin/tcpdump/pfctl_osfp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_osfp.c,v 1.5 2008/06/16 03:40:34 david Exp $ */ +/* $OpenBSD: pfctl_osfp.c,v 1.6 2010/10/17 12:14:28 jsing Exp $ */ /* * Copyright (c) 2003 Mike Frantzen <frantzen@openbsd.org> @@ -79,6 +79,8 @@ int get_str(char **, size_t *, char **, const char *, int, int get_tcpopts(const char *, int, const char *, pf_tcpopts_t *, int *, int *, int *, int *, int *, int *); +int get_quirks(const char *, int, const char *, + u_int16_t *); void import_fingerprint(struct pf_osfp_ioctl *); const char *print_ioctl(struct pf_osfp_ioctl *); void print_name_list(int, struct name_list *, const char *); @@ -99,11 +101,11 @@ pfctl_file_fingerprints(int dev, int opts, const char *fp_filename) int window, w_mod, ttl, df, psize, p_mod, mss, mss_mod, wscale, wscale_mod, optcnt, ts0; pf_tcpopts_t packed_tcpopts; - char *class, *version, *subtype, *desc, *tcpopts; + char *class, *version, *subtype, *desc, *tcpopts, *quirks; struct pf_osfp_ioctl fp; pfctl_flush_my_fingerprints(&classes); - class = version = subtype = desc = tcpopts = NULL; + class = version = subtype = desc = tcpopts = quirks = NULL; if ((opts & PF_OPT_NOACTION) == 0) pfctl_clear_fingerprints(dev, opts); @@ -123,7 +125,9 @@ pfctl_file_fingerprints(int dev, int opts, const char *fp_filename) free(desc); if (tcpopts) free(tcpopts); - class = version = subtype = desc = tcpopts = NULL; + if (quirks) + free(quirks); + class = version = subtype = desc = tcpopts = quirks = NULL; memset(&fp, 0, sizeof(fp)); /* Chop off comment */ @@ -159,20 +163,26 @@ pfctl_file_fingerprints(int dev, int opts, const char *fp_filename) GET_INT(psize, &p_mod, "overall packet size", T_MOD|T_DC, 8192) || GET_STR(tcpopts, "TCP Options", 1) || + GET_STR(quirks, "Quirks", 1) || GET_STR(class, "OS class", 1) || GET_STR(version, "OS version", 0) || GET_STR(subtype, "OS subtype", 0) || GET_STR(desc, "OS description", 2)) continue; - if (get_tcpopts(fp_filename, lineno, tcpopts, &packed_tcpopts, - &optcnt, &mss, &mss_mod, &wscale, &wscale_mod, &ts0)) - continue; + if (len != 0) { fprintf(stderr, "%s:%d excess field\n", fp_filename, lineno); continue; } + if (get_tcpopts(fp_filename, lineno, tcpopts, &packed_tcpopts, + &optcnt, &mss, &mss_mod, &wscale, &wscale_mod, &ts0)) + continue; + + if (get_quirks(fp_filename, lineno, quirks, &fp.fp_quirks)) + continue; + fp.fp_ttl = ttl; if (df) fp.fp_flags |= PF_OSFP_DF; @@ -203,7 +213,6 @@ pfctl_file_fingerprints(int dev, int opts, const char *fp_filename) } fp.fp_psize = psize; - switch (wscale_mod) { case T_DC: fp.fp_flags |= PF_OSFP_WSCALE_DC; @@ -678,7 +687,6 @@ import_fingerprint(struct pf_osfp_ioctl *fp) } } - fingerprint_count++; DEBUG(fp, "import signature %d:%d:%d", class, version, subtype); } @@ -968,6 +976,71 @@ get_tcpopts(const char *filename, int lineno, const char *tcpopts, return (0); } +int +get_quirks(const char *filename, int lineno, const char *quirkstr, + u_int16_t *quirks) +{ + int i, opt; + + *quirks = 0; + + if (strcmp(quirkstr, ".") == 0) + return (0); + + for (i = 0; quirkstr[i];) { + switch ((opt = toupper(quirkstr[i++]))) { + case 'D': + fprintf(stderr, "%s:%d quirk %c not yet supported\n", + filename, lineno, opt); + *quirks |= PF_OSFP_QUIRK_DATA; + break; + case 'Q': + *quirks |= PF_OSFP_QUIRK_SEQEQ; + break; + case '0': + *quirks |= PF_OSFP_QUIRK_SEQZERO; + break; + case 'P': + fprintf(stderr, "%s:%d quirk %c not yet supported\n", + filename, lineno, opt); + *quirks |= PF_OSFP_QUIRK_PAST; + break; + case 'Z': + *quirks |= PF_OSFP_QUIRK_ZEROID; + break; + case 'I': + *quirks |= PF_OSFP_QUIRK_IPOPT; + break; + case 'U': + *quirks |= PF_OSFP_QUIRK_URG; + break; + case 'X': + *quirks |= PF_OSFP_QUIRK_X2; + break; + case 'A': + *quirks |= PF_OSFP_QUIRK_ACKNO; + break; + case 'T': + *quirks |= PF_OSFP_QUIRK_TS2; + break; + case 'F': + *quirks |= PF_OSFP_QUIRK_FLAGS; + break; + case '!': + fprintf(stderr, "%s:%d quirk %c not yet supported\n", + filename, lineno, opt); + *quirks |= PF_OSFP_QUIRK_BROKEN; + break; + default: + fprintf(stderr, "%s:%d unknown quirk %c\n", + filename, lineno, opt); + return (1); + } + } + + return (0); +} + /* rip the next field ouf of a formatted config file line */ char * get_field(char **line, size_t *len, int *fieldlen) |