一个SSH配置和策略扫描器
Mozilla 不再维护 SSH Scan 项目。
请 fork 该项目以继续开发。
ssh_scan 指向一个 SSH 服务,即可获得关于其支持内容和策略状态的 JSON 报告。作为 gem 安装并运行,输入:
gem install ssh_scan
ssh_scan
从 docker 容器运行,输入:
docker pull mozilla/ssh_scan
docker run -it mozilla/ssh_scan -t sshscan.rubidus.com
从源码安装并运行,输入:
# clone repo
git clone https://github.com/mozilla/ssh_scan.git
cd ssh_scan
gem install bundler
bundle install
./bin/ssh_scan
运行 ssh_scan -h 获取此信息
ssh_scan v0.0.21 (https://github.com/mozilla/ssh_scan)
Usage: ssh_scan [options]
-t, --target [IP/Range/Hostname] IP/Ranges/Hostname to scan
-f, --file [FilePath] File Path of the file containing IP/Range/Hostnames to scan
-T, --timeout [seconds] Timeout per connect after which ssh_scan gives up on the host
-L, --logger [Log File Path] Enable logger
-O, --from_json [FilePath] File to read JSON output from
-o, --output [FilePath] File to write JSON output to
-p, --port [PORT] Port (Default: 22)
-P, --policy [FILE] Custom policy file (Default: Mozilla Modern)
--threads [NUMBER] Number of worker threads (Default: 5)
--fingerprint-db [FILE] File location of fingerprint database (Default: ./fingerprints.db)
--suppress-update-status Do not check for updates
-u, --unit-test [FILE] Throw appropriate exit codes based on compliance status
-V [STD_LOGGING_LEVEL],
--verbosity
-v, --version Display just version info
-h, --help Show this message
Examples:
ssh_scan -t 192.168.1.1
ssh_scan -t server.example.com
ssh_scan -t ::1
ssh_scan -t ::1 -T 5
ssh_scan -f hosts.txt
ssh_scan -o output.json
ssh_scan -O output.json -o rescan_output.json
ssh_scan -t 192.168.1.1 -p 22222
ssh_scan -t 192.168.1.1 -p 22222 -L output.log -V INFO
ssh_scan -t 192.168.1.1 -P custom_policy.yml
ssh_scan -t 192.168.1.1 --unit-test -P custom_policy.yml
本项目仅用于 ssh_scan 引擎/命令行使用。
如果您希望将 ssh_scan 作为服务运行,请参考 ssh_scan_api 项目
本项目与 travis-ci 集成,并定期测试以确保与多种 Ruby 版本兼容。
查看这些 Ruby 版本的当前构建状态,请点击这里。
如果您有兴趣为该项目做出贡献,请参阅 CONTRIBUTING.md。
ssh_scan 的灵感来源