Rust 製のポートスキャナー`RustScan`を試してみる。

こんにちは、k-junです。

rust製のポートスキャナーであるRustScanなるものを発見したので試してみます。 ポートスキャナーというと、ネットワーク診断などで使用されるイメージですがまあ使ってみましょう。

https://github.com/RustScan/RustScan

install

https://github.com/RustScan/RustScan/wiki/Installation-Guide

docker での利用方法が有るのでそれを用います。推奨も docker なのでバッチリですね。

docker run -it --rm --name rustscan rustscan/rustscan:1.10.0

document

https://rustscan.github.io/RustScan/

内部的には nmap を実行しているだけのようなので、nmap の早い版と考えれば良さそうです。

run

適当に google.com に向けて打ってみました。

~ docker run -it --rm --name rustscan rustscan/rustscan:1.10.0 rustscan google.com -t 500 -b 1500 -- -A
.----. .-. .-. .----..---.  .----. .---.   .--.  .-. .-.
| {}  }| { } |{ {__ {_   _}{ {__  /  ___} / {} \ |  `| |
| .-. \| {_} |.-._} } | |  .-._} }\     }/  /\  \| |\  |
`-' `-'`-----'`----'  `-'  `----'  `---' `-'  `-'`-' `-'
Faster Nmap scanning with Rust.
________________________________________
: https://discord.gg/GFrQsGy           :
: https://github.com/RustScan/RustScan :
 --------------------------------------
Please contribute more quotes to our GitHub https://github.com/rustscan/rustscan

[~] The config file is expected to be at "/home/rustscan/.rustscan.toml"
[~] File limit higher than batch size. Can increase speed by increasing batch size '-b 1048476'.
Open 172.217.31.174:80
Open 172.217.31.174:443
...

おおお、これはいい感じですね。自前で aws に ec2 を立ててそれに向けて打ってみます。 22, 80, 443, 9200 が空いていますが果たして...。

~ docker run -it --rm --name rustscan rustscan/rustscan:1.10.0 rustscan XX.XXX.XX.XXX -t 500 -b 1500 -- -A
.----. .-. .-. .----..---.  .----. .---.   .--.  .-. .-.
| {}  }| { } |{ {__ {_   _}{ {__  /  ___} / {} \ |  `| |
| .-. \| {_} |.-._} } | |  .-._} }\     }/  /\  \| |\  |
`-' `-'`-----'`----'  `-'  `----'  `---' `-'  `-'`-' `-'
Faster Nmap scanning with Rust.
________________________________________
: https://discord.gg/GFrQsGy           :
: https://github.com/RustScan/RustScan :
 --------------------------------------
Nmap? More like slowmap.🐢

[~] The config file is expected to be at "/home/rustscan/.rustscan.toml"
[~] File limit higher than batch size. Can increase speed by increasing batch size '-b 1048476'.
Open 18.179.61.237:22
...

22 だけ。なるほど、プロセスを起動していないからですね 笑。 適当に netcat で起動しておきましょう。

$ sudo apt install -y nginx
$ sudo service nginx start
~ docker run -it --rm --name rustscan rustscan/rustscan:1.10.0 rustscan 18.179.61.237 -t 500 -b 1500 -- -A
.----. .-. .-. .----..---.  .----. .---.   .--.  .-. .-.
| {}  }| { } |{ {__ {_   _}{ {__  /  ___} / {} \ |  `| |
| .-. \| {_} |.-._} } | |  .-._} }\     }/  /\  \| |\  |
`-' `-'`-----'`----'  `-'  `----'  `---' `-'  `-'`-' `-'
Faster Nmap scanning with Rust.
________________________________________
: https://discord.gg/GFrQsGy           :
: https://github.com/RustScan/RustScan :
 --------------------------------------
Nmap? More like slowmap.🐢

[~] The config file is expected to be at "/home/rustscan/.rustscan.toml"
[~] File limit higher than batch size. Can increase speed by increasing batch size '-b 1048476'.
Open 18.179.61.237:22
Open 18.179.61.237:80
...

追加された。いい感じですね。

確かに結構早いけれども、わざわざ install して実行するかと言われると nmap で良い気がしますね... それでは今日はこのへんで。