p0f

提供: セキュリティ
2015年9月22日 (火) 00:19時点におけるDaemon (トーク | 投稿記録)による版

(差分) ←前の版 | 最新版 (差分) | 次の版→ (差分)
移動: 案内検索
スポンサーリンク

p0f とは、TCP/IPコミュニケーションの背後で、プレイヤーの特定をするための純粋なパッシブトラフィックフィンガープリンティングメカニズムを利用するツールです。

読み方

p0f
ぴーぜろえふ

概要

パッシブOSフィンガープリンティングは、私達のシステムとコネクションが確立したときに、リモートホストから得られる情報を基にします。キャプチャしたパケットは、OSを特定する十分な情報を含んでいます。nmapquesoのようなアクティブスキャナーとは対照的に、p0fは、ホストの特定に何かを送信しません。

インストール

Ubuntu/Debianにインストールする場合

apt-get コマンドでインストールする場合です。

sudo apt-get install p0f

FreeBSDにインストールする場合

ports コレクションからインストールする場合

cd /usr/ports/net-mgmt/p0f
sudo make install clean

pkgコマンドでインストールする場合

sudo pkg install p0f

portmasterコマンドでインストールする場合

sudo portmaster -y -d /usr/ports/net-mgmt/p0f

portinstallコマンドでインストールする場合

sudo portinstall /usr/ports/net-mgmt/p0f

使い方

コマンドラインオプション

Usage: p0f [ -f file ] [ -i device ] [ -s file ] [ -o file ]
       [ -w file ] [ -Q sock [ -0 ] ] [ -u user ] [ -FXVNDUKASCMROqtpvdlrx ]
       [ -c size ] [ -T nn ] [ -e nn ] [ 'filter rule' ]
  -f file   - read fingerprints from file
  -i device - listen on this device
  -s file   - read packets from tcpdump snapshot
  -o file   - write to this logfile (implies -t)
  -w file   - save packets to tcpdump snapshot
  -u user   - chroot and setuid to this user
  -Q sock   - listen on local socket for queries
  -0        - make src port 0 a wildcard (in query mode)
  -e ms     - pcap capture timeout in milliseconds (default: 1)
  -c size   - cache size for -Q and -M options
  -M        - run masquerade detection
  -T nn     - set masquerade detection threshold (1-200)
  -V        - verbose masquerade flags reporting
  -F        - use fuzzy matching (do not combine with -R)
  -N        - do not report distances and link media
  -D        - do not report OS details (just genre)
  -U        - do not display unknown signatures
  -K        - do not display known signatures (for tests)
  -S        - report signatures even for known systems
  -A        - go into SYN+ACK mode (semi-supported)
  -R        - go into RST/RST+ACK mode (semi-supported)
  -O        - go into stray ACK mode (barely supported)
  -r        - resolve host names (not recommended)
  -q        - be quiet - no banner
  -v        - enable support for 802.1Q VLAN frames
  -p        - switch card to promiscuous mode
  -d        - daemon mode (fork into background)
  -l        - use single-line output (easier to grep)
  -x        - include full packet dump (for debugging)
  -X        - display payload string (useful in RST mode)
  -C        - run signature collision check
  -t        - add timestamps to every entry
 
  'Filter rule' is an optional pcap-style BPF expression (man tcpdump).

クライアントの特定

Windowsからp0fを実行しているUbuntussh接続をしたときの例です。 Windowsと特定されています。

kaworu@u1:~$ sudo p0f -i eth0
p0f - passive os fingerprinting utility, version 2.0.8
(C) M. Zalewski <lcamtuf@dione.cc>, W. Stearns <wstearns@pobox.com>
p0f: listening (SYN) on 'eth0', 262 sigs (14 generic, cksum 0F1F5CA2), rule: 'al
192.168.60.1:60771 - Windows XP/2000 (RFC1323+, w+, tstamp-) [GENERIC]
  Signature: [8192:128:1:52:M1460,N,W8,N,N,S:.:Windows:?]
  -> 192.168.60.132:22 (distance 0, link: ethernet/modem)

UbuntuからUbuntusshしたときの例です。

ubuntu@c1:~$ sudo p0f -i eth0 -vt
p0f - passive os fingerprinting utility, version 2.0.8
(C) M. Zalewski <lcamtuf@dione.cc>, W. Stearns <wstearns@pobox.com>
p0f: listening (SYN) on 'eth0', 262 sigs (14 generic, cksum 0F1F5CA2), rule: 'all'.
<Mon Dec 23 15:52:32 2013> 10.0.3.1:60986 - UNKNOWN [S10:64:1:60:M1460,S,T,N,W4:.:?:?] (up: 57 hrs)
  -> 10.0.3.161:22 (link: ethernet/modem)

関連項目




スポンサーリンク