hack のためのネタ帳, etc,,,

×

状況

多分 FireWall のせいなんだけど
tracepath が too many hops になって hop count が確認できない host があるんだけど、どうにかして hop count を知りたい。
ping が通るなら、例えば のように TTL 増減して hop count 特定する事もできるんだが
ICMP が潰されてるらしくて ping も通らない。

HTTP は通るので、curl に TTL を設定出来れば同じことが出来るはずなのだが、それらしいオプションが見当たらない。
さてどうしたものかと。

解法

nmap に --ttl オプションがあったのでこれを使えば特定可能だった。

例: www.u-tokyo.ac.jp = 14 hops
$ ping -c 1 www.u-tokyo.ac.jp
PING www.u-tokyo.ac.jp (210.152.243.234) 56(84) bytes of data.

--- www.u-tokyo.ac.jp ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
$ curl -I www.u-tokyo.ac.jp
HTTP/1.1 302 Found
Date: Wed, 08 Apr 2026 10:04:04 GMT
Server: Apache
Location: https://www.u-tokyo.ac.jp/
Content-Type: text/html; charset=iso-8859-1
$ nmap www.u-tokyo.ac.jp -p 80 --ttl 14
Starting Nmap 7.94SVN ( https://nmap.org ) at 2026-04-08 19:03 JST
You have specified some options that require raw socket access.
These options will not be honored without the necessary privileges.
Nmap scan report for www.u-tokyo.ac.jp (210.152.243.234)
Host is up (0.032s latency).
rDNS record for 210.152.243.234: 210-152-243-234.jp-west.compute.idcfcloud.com

PORT   STATE SERVICE
80/tcp open  http

Nmap done: 1 IP address (1 host up) scanned in 0.16 seconds
$ nmap www.u-tokyo.ac.jp -p 80 --ttl 13
Starting Nmap 7.94SVN ( https://nmap.org ) at 2026-04-08 19:03 JST
You have specified some options that require raw socket access.
These options will not be honored without the necessary privileges.
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 0.12 seconds

コメントをかく


「http://」を含む投稿は禁止されています。

利用規約をご確認のうえご記入下さい

Wiki内検索

フリーエリア

管理人/副管理人のみ編集できます

広告募集中