Shodan

  • Shodan是一个搜素互联网链接设备的搜索引擎,不同于Google、Baidu这些搜素引擎。用户可以在Shodan上使用Shodan搜索语法查找链接到互联网的摄像头、路由器、服务器等设备信息。
  • Shodan 通过扫描全网设备并抓取解析各个设备返回的 banner 信息(用于描述设备所运行服务的标志性文本信息),通过了解这些信息 Shodan 就能得知网络中的Web 服务器情况。
  • 使用前需到https://www.shodan.io/注册帐号。

1 Shodan语法

  • hostname——————————搜索指定的主机或域名,例如 hostname:baidu
  • port——————————————搜索指定的端口或服务,例如 port:80
  • country———————————搜索指定的国家,例如 country:US
  • city——————————————搜索指定的城市,例如 city:Chengdu
  • org———————————————搜索指定的组织或公司,例如 org:”Google”
  • isp———————————————搜索指定的ISP供应商,例如 isp:”China Telecom”
  • product———————————搜索指定的操作系统/软件/平台,例如 product:”Apache httpd”
  • version———————————搜索指定的软件版本,例如 version:”1.6.2”
  • geo———————————————搜索指定的地理位置,参数为经纬度,例如 geo:”31.8639, 117.2808”
  • before/after——————搜索指定收录时间前后的数据,格式为dd-mm-yy,例如 before:”11-11-15”
  • net———————————————搜索指定的IP地址或子网,例如 net:”210.45.240.0/24”

2 命令行下使用

  Shodan 是由官方提供的 Python 库的,https://github.com/achillean/shodan-python,archlinux上可以 yaourt shodan 安装.或直接从源安装:

git clone https://github.com/achillean/shodan-python.git && cd shodan-python  
python setup.py install 

用法与web界面类似

➜  ~ shodan -h
Usage: shodan [OPTIONS] COMMAND [ARGS]...
Options:
  -h, --help  Show this message and exit.
  Commands:
  alert       Manage the network alerts for your account  # 管理账户的网络提示
  convert     Convert the given input data file into a...  # 转换输入文件
  count       Returns the number of results for a search  # 返回查询结果数量
  download    Download search results and save them in a...  # 下载查询结果到文件
  honeyscore  Check whether the IP is a honeypot or not.  # 检查 IP 是否为蜜罐
  host        View all available information for an IP...  # 显示一个 IP 所有可用的详细信息
  info        Shows general information about your account  # 显示账户的一般信息
  init        Initialize the Shodan command-line  # 初始化命令行
  myip        Print your external IP address  # 输出用户当前公网IP
  parse       Extract information out of compressed JSON...  # 解析提取压缩的JSON信息,即使用download下载的数据
  scan        Scan an IP/ netblock using Shodan.  # 使用 Shodan 扫描一个IP或者网段
  search      Search the Shodan database  # 查询 Shodan 数据库
  stats       Provide summary information about a search...  # 提供搜索结果的概要信息
  stream      Stream data in real-time.  # 实时显示流数据

参考

shodan help

版权声明:本文为博主原创文章,转载请注明出处。 旭日酒馆