kali中安装shodan及使用

         ~~~~~~~~         因为想要面对一个新的开始,一个人必须有梦想、有希望、有对未来的憧憬。如果没有这些,就不叫新的开始,而叫逃亡。 ​​​​
                                                                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                 ————玛丽亚·杜埃尼亚斯

shodan除了可以在web上直接操作,还可以在命令行以及编写python脚本去进行批量化操作。

安装命令

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

在这里插入图片描述
在这里插入图片描述

kali中shodan的使用

shodan -h 查看帮助文档
在这里插入图片描述
相关参数解释

 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

shodan init api_key

在这里插入图片描述
shodan host ip 查看指定主机的相关信息,如地理位置、开放端口、可能存在的漏洞等信息。
在这里插入图片描述
search直接将查询结果展示在命令行中,默认情况下只显示ip、端口号、主机名和http数据。也可以通过使用–fields来自定义显示内容。比如只显示ip、端口号、组织机构、主机名。

shodan search --fields ip_str,port,org,hostnames apache

在这里插入图片描述
可以使用download参数把查询结果下载下来(文件中的每一行都是json格式存储目标banner信息。默认情况下该命令只会下载100条结果,如果需要获取更多则需要花钱注册,下载时用参数–limit来指定)

shodan download apache-data apache

在这里插入图片描述
parse可以用来解析数据,多用于python脚本中。

shodan parse --fields ip_str,port,org --separator , apache-data.json.gz

在这里插入图片描述
stats用来汇总查询结果,方便统计

shodan stats nginx 统计nginx全球分布情况

在这里插入图片描述

  • 3
    点赞
  • 52
    收藏
    觉得还不错? 一键收藏
  • 7
    评论
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值