Modify

Ticket #76 (closed enhancement: fixed)

Opened 4 years ago

Last modified 3 years ago

Major p0f improvements: other databases support and new p0f_impersonate() function

Reported by: pierre@… Owned by: pbi
Priority: major Milestone: scapy 2.2
Component: Scapy Version:
Keywords: p0f Cc: pierre@…

Description

Adds support for new p0f(a,r,o).fp databases (TCP SYN/ACK, RST & RST/ACK, and stray ACK packets).

Adds a p0f_impersonate() function:

Welcome to Scapy (1.2.0.2)
>>> x = p0f_impersonate(IP(dst='10.0.0.1')/TCP(flags='RA'), 'Linux',
... extrahops=4)
>>> x
<IP  flags=DF frag=0 ttl=60 proto=tcp dst=10.0.0.1 |<TCP  seq=<RandInt>
ack=<RandInt> flags=RA window=<RandShort> options=[('NOP', None), ('NOP',
None), ('Timestamp', (310207126,u3333721462L))] |>>
>>> prnp0f(x)
192.168.0.97:ftp_data - Linux 2.4 (?) (dropped, lame) (up: 861 hrs)
  -> 10.0.0.1:www (RA) (distance 4)
>>> x = p0f_impersonate(IP(dst='10.0.0.1')/TCP(flags='S',sport=RandInt()),
'Solaris', osdetails='9', extrahops=3)
>>> x
<IP  flags=DF frag=0 ttl=61 proto=tcp dst=10.0.0.1 |<TCP  sport=<RandInt>
flags=S window=39202 options=[('MSS', 1153), ('NOP', None), ('NOP', None),
('SAckOK', '')] |>>
>>> prnp0f(x)
192.168.0.97:<RandInt> - Solaris 9
  -> 10.0.0.1:www (S) (distance 3)

Attachments

patch Download (14.1 KB) - added by pierre@… 4 years ago.
patch.2 Download (17.4 KB) - added by pierre@… 4 years ago.
bugfixes, code cleaner, adds p0f_getlocalsigs()
patch.3 Download (17.4 KB) - added by pierre@… 4 years ago.
bugfixes, code cleaner, adds p0f_getlocalsigs()
patch.4 Download (17.4 KB) - added by pierre@… 4 years ago.
bugfix in p0f_getlocalifs()
scapy-2-p0f.patch Download (17.4 KB) - added by Pierre LALET <pierre@…> 3 years ago.
New patch, same functionalities, for scapy v2

Change History

Changed 4 years ago by pierre@…

Changed 4 years ago by pierre@…

bugfixes, code cleaner, adds p0f_getlocalsigs()

Changed 4 years ago by pierre@…

bugfixes, code cleaner, adds p0f_getlocalsigs()

comment:1 Changed 4 years ago by pierre@…

patch.2 and patch.3 are the same file, my mistake.

As the file description says, the new pacth fixes a few bugs, cleans a bit the code, and adds a p0f_getlocalsigs() to get signatures for the local system.

It also adds different ways to specify the signature to use in p0f_impersonate().

Changed 4 years ago by pierre@…

bugfix in p0f_getlocalifs()

comment:2 Changed 4 years ago by pierre@…

OK... I still had a bug in p0f_getlocalifs() that was causing an incorrect result when multiple signatures for the the same flags were seen ([a, [b], [c]] instead of [a, b, c]).

The good one is patch.4. For now ;-)

Changed 3 years ago by Pierre LALET <pierre@…>

New patch, same functionalities, for scapy v2

comment:3 Changed 3 years ago by Pierre LALET <pierre@…>

  • Cc pierre@… added
  • Milestone set to scapy 2.2

The new patch applies to scapy v2, but does exactly the same thing.

comment:4 Changed 3 years ago by pbi

  • Status changed from new to closed
  • Resolution set to fixed

Applied in [fa0c948e7ffa]. At last!

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.