Life is fun and easy!
不正IP報告数
Okan Sensor
ページへ戻る
印刷
SecurityTool/masscan/mac
をテンプレートにして作成 ::
UJP
tech_regist2
:SecurityTool/masscan/mac をテンプレートにして作成
開始行:
*macosでmasscanを使ってみる
**はじめに
IoTなどもあるので自分のネットワーク上に何が存在している...
MasscanはIPv4の指定したアドレス空間を高速にスキャンする...
つまり,使い方を間違えれば,自分自身が攻撃者として扱わ...
**インストール
今回もHomeBrewでインストール.
まずは情報を確認.
$ brew info masscan🆑
masscan: stable 1.0.5 (bottled), HEAD
TCP port scanner, scans entire Internet in under 5 minutes
https://github.com/robertdavidgraham/masscan/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/mas...
==> Options
--HEAD
Install HEAD version
==> Analytics
install: 274 (30 days), 861 (90 days), 3,435 (365 days)
install-on-request: 274 (30 days), 856 (90 days), 3,388 ...
build-error: 0 (30 days)
$
1年で3435インストールというのは,多いいのか少ないのか.
気にせずインストールしてみる.
$ brew install masscan🆑
Updating Homebrew...
==> Auto-updated Homebrew!
Updated Homebrew from a1939cfe7 to 99a8f15fb.
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
cargo-c devdash monolith postgresql@11
==> Updated Formulae
nss ✔ cstore_fdw fluxctl gwyddion maxwell pgr...
wget ✔ dcos-cli gcc@6 haproxy n pgrouting ...
awscli eslint gcc@8 helmfile navi phpmyad...
babel evince gitleaks juju nsd postgis...
cfn-lint exploitdb glooctl libpq paket pos...
citus file-roller goreleaser libpqxx pgloader ...
==> Downloading https://homebrew.bintray.com/bottles/mas...
########################################################...
==> Pouring masscan-1.0.5.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/masscan/1.0.5: 5 files, 284.6KB
$
問題なく完了.
**masscanを使って80番ポートをスキャン
まず簡単に使って見る. ポート80番(HTTP)でlocalhostをス...
$ /usr/local/bin/masscan -p80 127.0.0.1🆑
FAIL: en0: You don't have permission to capture on that ...
[hint] need to sudo or run as root or something
[hint] I've got some local priv escalation 0days that m...
adapter[en0].init: failed
$
root権限が必要だそうだ.
sudoして実行する.
$ sudo /usr/local/bin/masscan -p80 127.0.0.1🆑
Password:🆑
Starting masscan 1.0.4 (http://bit.ly/14GZzcT) at 2019-1...
-- forced options: -sS -Pn -n --randomize-hosts -v --se...
Initiating SYN Stealth Scan
Scanning 1 hosts [1 port/host]
$
localhost(127.0.0.1)なので1台見つかったとされる.
**セグメント全体をスキャンして見る
0番ポートから65535ポートまでを指定してセグメト全体を指...
$ date;sudo /usr/local/bin/masscan -p0-65535 192.168.20....
日 11 24 20:27:07 JST 2019
Starting masscan 1.0.4 (http://bit.ly/14GZzcT) at 2019-1...
-- forced options: -sS -Pn -n --randomize-hosts -v --se...
Initiating SYN Stealth Scan
Scanning 256 hosts [65536 ports/host]
Discovered open port 62078/tcp on 192.168.20.126
Discovered open port 62078/tcp on 192.168.20.103
Discovered open port 62078/tcp on 192.168.20.108
Cwaiting several seconds to exit...
saving resume file to: paused.conf
月 11 25 01:13:45 JST 2019
$
5時間かかっても終わらないので,停止してみた.
次に,自分自身1台だけと対象を絞って,0番ポートから6553...
$ date;sudo /usr/local/bin/masscan -p0-65535 192.168.20....
月 11 25 22:47:29 JST 2019
Password:
Starting masscan 1.0.4 (http://bit.ly/14GZzcT) at 2019-1...
-- forced options: -sS -Pn -n --randomize-hosts -v --se...
Initiating SYN Stealth Scan
Scanning 1 hosts [65536 ports/host]
月 11 25 22:58:41 JST 2019
$
1台だけでも11分程度かかっている模様.
そしてこのあと大問題が・・・・
**ルータが停止した
セグメント全体をスキャンしていても問題なかったから,loc...
セグメント全体をスキャンといっても40%位までだったので,...
使い方を間違えるとダウンさせてしまうという例かな.実験...
終了行:
*macosでmasscanを使ってみる
**はじめに
IoTなどもあるので自分のネットワーク上に何が存在している...
MasscanはIPv4の指定したアドレス空間を高速にスキャンする...
つまり,使い方を間違えれば,自分自身が攻撃者として扱わ...
**インストール
今回もHomeBrewでインストール.
まずは情報を確認.
$ brew info masscan🆑
masscan: stable 1.0.5 (bottled), HEAD
TCP port scanner, scans entire Internet in under 5 minutes
https://github.com/robertdavidgraham/masscan/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/mas...
==> Options
--HEAD
Install HEAD version
==> Analytics
install: 274 (30 days), 861 (90 days), 3,435 (365 days)
install-on-request: 274 (30 days), 856 (90 days), 3,388 ...
build-error: 0 (30 days)
$
1年で3435インストールというのは,多いいのか少ないのか.
気にせずインストールしてみる.
$ brew install masscan🆑
Updating Homebrew...
==> Auto-updated Homebrew!
Updated Homebrew from a1939cfe7 to 99a8f15fb.
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
cargo-c devdash monolith postgresql@11
==> Updated Formulae
nss ✔ cstore_fdw fluxctl gwyddion maxwell pgr...
wget ✔ dcos-cli gcc@6 haproxy n pgrouting ...
awscli eslint gcc@8 helmfile navi phpmyad...
babel evince gitleaks juju nsd postgis...
cfn-lint exploitdb glooctl libpq paket pos...
citus file-roller goreleaser libpqxx pgloader ...
==> Downloading https://homebrew.bintray.com/bottles/mas...
########################################################...
==> Pouring masscan-1.0.5.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/masscan/1.0.5: 5 files, 284.6KB
$
問題なく完了.
**masscanを使って80番ポートをスキャン
まず簡単に使って見る. ポート80番(HTTP)でlocalhostをス...
$ /usr/local/bin/masscan -p80 127.0.0.1🆑
FAIL: en0: You don't have permission to capture on that ...
[hint] need to sudo or run as root or something
[hint] I've got some local priv escalation 0days that m...
adapter[en0].init: failed
$
root権限が必要だそうだ.
sudoして実行する.
$ sudo /usr/local/bin/masscan -p80 127.0.0.1🆑
Password:🆑
Starting masscan 1.0.4 (http://bit.ly/14GZzcT) at 2019-1...
-- forced options: -sS -Pn -n --randomize-hosts -v --se...
Initiating SYN Stealth Scan
Scanning 1 hosts [1 port/host]
$
localhost(127.0.0.1)なので1台見つかったとされる.
**セグメント全体をスキャンして見る
0番ポートから65535ポートまでを指定してセグメト全体を指...
$ date;sudo /usr/local/bin/masscan -p0-65535 192.168.20....
日 11 24 20:27:07 JST 2019
Starting masscan 1.0.4 (http://bit.ly/14GZzcT) at 2019-1...
-- forced options: -sS -Pn -n --randomize-hosts -v --se...
Initiating SYN Stealth Scan
Scanning 256 hosts [65536 ports/host]
Discovered open port 62078/tcp on 192.168.20.126
Discovered open port 62078/tcp on 192.168.20.103
Discovered open port 62078/tcp on 192.168.20.108
Cwaiting several seconds to exit...
saving resume file to: paused.conf
月 11 25 01:13:45 JST 2019
$
5時間かかっても終わらないので,停止してみた.
次に,自分自身1台だけと対象を絞って,0番ポートから6553...
$ date;sudo /usr/local/bin/masscan -p0-65535 192.168.20....
月 11 25 22:47:29 JST 2019
Password:
Starting masscan 1.0.4 (http://bit.ly/14GZzcT) at 2019-1...
-- forced options: -sS -Pn -n --randomize-hosts -v --se...
Initiating SYN Stealth Scan
Scanning 1 hosts [65536 ports/host]
月 11 25 22:58:41 JST 2019
$
1台だけでも11分程度かかっている模様.
そしてこのあと大問題が・・・・
**ルータが停止した
セグメント全体をスキャンしていても問題なかったから,loc...
セグメント全体をスキャンといっても40%位までだったので,...
使い方を間違えるとダウンさせてしまうという例かな.実験...
ページ名: