Skip to content

Commit

Permalink
p0f-3.01b
Browse files Browse the repository at this point in the history
sha1: 35720d10593a6f4ab9ffe097ac96d273931fdf35  p0f-3.01b.tgz
  • Loading branch information
lcamtuf authored and majek committed Mar 11, 2012
1 parent 154ff59 commit 72fba30
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 4 deletions.
6 changes: 4 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#

PROGNAME="p0f"
VERSION="3.00b"
VERSION="3.01b"

test "$CC" = "" && CC="gcc"

Expand All @@ -25,6 +25,8 @@ USE_LDFLAGS="-Wl,-z,relro -pie $BASIC_LDFLAGS"

if [ "$OSTYPE" = "cygwin" ]; then
USE_LIBS="-lwpcap $LIBS"
elif [ "$OSTYPE" = "solaris" ]; then
USE_LIBS="-lsocket -lnsl $LIBS"
else
USE_LIBS="-lpcap $LIBS"
fi
Expand Down Expand Up @@ -61,7 +63,7 @@ if [ "$1" = "clean" -o "$1" = "publish" ]; then
exit 1
fi

TARGET="/var/www/lcamtuf/$PROGNAME-$VERSION.tgz"
TARGET="/var/www/lcamtuf/p0f3/$PROGNAME-devel.tgz"

echo "[*] Creating $TARGET..."

Expand Down
13 changes: 13 additions & 0 deletions docs/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
Version 3.01b:
--------------

Bug fixes:

- 'Date' comparisons for server sigs now work as expected.

- Bad TS reading now allowed on initial SYN (improves uptime detection).

Improvements:

- New signatures.

Version 3.00b:
--------------

Expand Down
7 changes: 6 additions & 1 deletion fp_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void http_init(void) {
#define HDR_AL 2
#define HDR_VIA 3
#define HDR_XFF 4
#define HDR_DAT 6
#define HDR_DAT 5

i = 0;
while (req_optional[i].name) {
Expand Down Expand Up @@ -827,6 +827,11 @@ static void score_nat(u8 to_srv, struct packet_flow* f) {
score += 4;
reason |= NAT_APP_DATE;

} else {

DEBUG("[#] HTTP 'Date' distance seems fine (%lld in %lld sec).\n",
hdr_diff, recv_diff);

}

}
Expand Down
9 changes: 8 additions & 1 deletion fp_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1282,7 +1282,14 @@ void check_ts_tcp(u8 to_srv, struct packet_data* pk, struct packet_flow* f) {

if (ffreq < MIN_TSCALE || ffreq > MAX_TSCALE) {

if (to_srv) f->cli_tps = -1; else f->srv_tps = -1;
/* Allow bad reading on SYN, as this may be just an artifact of IP
sharing or OS change. */

if (pk->tcp_type != TCP_SYN) {

if (to_srv) f->cli_tps = -1; else f->srv_tps = -1;

}

DEBUG("[#] Bad %s TS frequency: %.02f Hz (%d ticks in %llu ms).\n",
to_srv ? "client" : "server", ffreq, ts_diff, ms_diff);
Expand Down
5 changes: 5 additions & 0 deletions p0f.fp
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,7 @@ sig = 1:Host,Accept-Language=[zh-cn],Connection=[close],User-Agent:Accept,Acce
sig = 1:Host,Connection=[close],User-Agent,Accept-Language=[zh-cn,zh-tw],Accept-Encoding=[gzip],Accept=[*/*]:Accept-Charset:Baiduspider
sig = 1:Host,Connection=[close],User-Agent,Accept-Language=[tr-TR],Accept-Encoding=[gzip],Accept=[*/*]:Accept-Charset:Baiduspider
sig = 1:Host,Connection=[close],User-Agent,Accept-Encoding=[gzip],?Accept-Language=[zh-cn,zh-tw],Accept=[*/*]:Accept-Charset:Baiduspider
sig = 1:Host,Connection=[close],User-Agent,Accept-Encoding=[gzip],Accept-Language=[tr-TR],Accept=[*/*]:Accept-Charset:Baiduspider
label = s:!:Googlebot:
sys = Linux
Expand Down Expand Up @@ -729,6 +730,10 @@ sys = Linux
sig = 0:Client-IP,X-Forwarded-For,X-YQL-Depth,User-Agent,Host,Connection=[keep-alive],Via:Accept,Accept-Encoding,Accept-Language,Accept-Charset:Yahoo Pipes
sig = 1:Client-IP,X-Forwarded-For,X-YQL-Depth,User-Agent,Host,Via:Connection,Accept,Accept-Encoding,Accept-Language,Accept-Charset:Yahoo Pipes
label = s:!:Google Web Preview:
sys = Linux
sig = 1:Referer,User-Agent,Accept-Encoding=[gzip,deflate],Host,X-Forwarded-For:Connection,Accept,Accept-Language,Accept-Charset:Web Preview
; --------------------------------
; Command-line tools and libraries
; --------------------------------
Expand Down

0 comments on commit 72fba30

Please sign in to comment.