我们之前介绍过,怎么屏蔽censys等扫描器,通过访问443端口获取ssl证书,来判断IP所对应的网站域名的行为。
今天来介绍一下怎么通过简单指令完成扫描
1.使用curl指令
echo quit|curl -v https://151.80.18.195 2>&1| grep 'subject'
* subject: CN=*.ppy.sh
* subjectAltName does not match 151.80.18.195
* SSL: no alternative certificate subject name matches target host name '151.80.18.195'
curl: (51) SSL: no alternative certificate subject name matches target host name '151.80.18.195'
2.使用openssl
echo quit | openssl s_client -connect 151.80.18.195:443 2>&1 | grep subject
subject=/CN=*.ppy.sh
使用cut过滤
echo quit | openssl s_client -connect 151.80.18.195:443 2>&1 | grep subject | cut -d\= -f3
*.ppy.sh
完成,可以以此为核心写个脚本去扫描全网了
评论