Ticket #76 (closed enhancement: fixed)

Opened 3 years ago

Last modified 12 months 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 (14.1 KB) - added by pierre@… 3 years ago.
patch.2 (17.4 KB) - added by pierre@… 3 years ago.
bugfixes, code cleaner, adds p0f_getlocalsigs()
patch.3 (17.4 KB) - added by pierre@… 3 years ago.
bugfixes, code cleaner, adds p0f_getlocalsigs()
patch.4 (17.4 KB) - added by pierre@… 3 years ago.
bugfix in p0f_getlocalifs()
scapy-2-p0f.patch (17.4 KB) - added by Pierre LALET <pierre@…> 12 months ago.
New patch, same functionalities, for scapy v2

Change History

Changed 3 years ago by pierre@…

Changed 3 years ago by pierre@…

bugfixes, code cleaner, adds p0f_getlocalsigs()

Changed 3 years ago by pierre@…

bugfixes, code cleaner, adds p0f_getlocalsigs()

Changed 3 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 3 years ago by pierre@…

bugfix in p0f_getlocalifs()

Changed 3 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 12 months ago by Pierre LALET <pierre@…>

New patch, same functionalities, for scapy v2

Changed 12 months 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.

Changed 12 months ago by pbi

  • status changed from new to closed
  • resolution set to fixed

Applied in [fa0c948e7ffa]. At last!

Add/Change #76 (Major p0f improvements: other databases support and new p0f_impersonate() function)

Author


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


Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.