零底子学安全--shodan学习

打印 上一主题 下一主题

主题 884|帖子 884|积分 2652

目次

免责声明
shodan简介
shodan安装
下载包
切换文件夹、并且安装
初始化shodan,这个api_key在你的账户里面
shodan使用
命令行
domain
scan
submit
status
search
country、--limit、---fields
city
os
has_vuln
device
 tp-link
http.title
net
org
http.waf
html
product
host
--history
download
parse 
count
honeyscore
myip
更多指令 
网页使用
搜索0708漏洞,直接使用特性来搜索
搜索摄像头
截图搜索
 实例
如何批量的去寻找cve-2019-0708的漏洞
如何寻找空VNC 
搜索思科的一个弱口令设备
搜索Mongodb未授权登陆
搜索Jenkins
学习毗连
shodan(1)_哔哩哔哩_bilibili 泷羽-sec

免责声明

本文只做学习使用,一切后果与本人无关
shodan简介

Shodan是一个基于网络的互联网毗连设备搜索平台。Shodan能够扫描环球互联网上的设备,包括服务器、路由器、网络摄像头、物联网设备、工业控制系统等,并收集这些设备的状态信息,如开放端口、操作系统版本、服务类型等。
shodan安装

下载包

  1. git clone https://github.com/achillean/shodan-python.git
复制代码
切换文件夹、并且安装

  1. cd shodan-python
  2. python setup.py install
复制代码
初始化shodan,这个api_key在你的账户里面

  1. shodan init api_key
复制代码
那一片蓝色的就是你的key 

初始化成功 

shodan使用

host
命令行

domain

查询域名信息
   shodan domain baidu.com
  

  scan

实时扫描
submit

查询IP地址
   shodan scan submit 153.3.238.102
  

  status

统计某种信息
   shodan stats --facets ssl.version country:cn has_ssl:true http
搜索ssl各版本在中国使用数目
  

  search

很明显这是一个用来搜索的选项
country、--limit、---fields

这个字段用来搜索国家
   搜索日本地域的IP,--limit选项是用来限定查询的条数
  shodan search --limit 10 country:jp
  

  上面搜索出来的东西很多,但是我们可能只需要IP和端口,我们可以使用--fields,来过滤我们需要的东西
  shodan --limit 10 --fields ip_str,port country:jp
  

  city

用来搜索是哪个城市的
   下面就是搜索条目10条,过滤IP和端口号为3389且是中国深圳的IP地址
  shodan search --limit 10 --fields ip_str port:3389 country:cn city:shenzhen 
  

  os

搜索操作系统
   shodan search --limit 10 --fields ip_str port:3389 country:cn city:shenzhen os:windows
  搜索在中国深圳的Windows的IP,且仅显示IP和端口为3389,且显示数目为10条
  

  has_vuln

   查询是否具有漏洞
  shodan search --limit 10 --fields ip_str port:3389 country:cn city:shenzhen os:windows has_vuln:ture
  

  device

   查看设备是什么
   shodan search --limit 10 --fields ip_str  country:cn city:shenzhen  device:webcam
  查看摄像头设备
  

  
  shodan search --limit 10 --fields ip_str  country:cn city:shenzhen  device:router
  查看路由器设备
  

   tp-link

   查看一些web端的设备 
  

  http.title

搜索网页标题内容
   搜索网页标题带有hack的网站
  shodan search --limit 10 --fields ip_str,port http.title:hack 
  

  
  net

搜索某个网段
   shodan search --limit 10 --fields ip_str,post net:208.88.84.0/24
  搜索208.88.84.0/24网段
  org

搜索某个构造
   shodan search --limit 10 --fields ip_str,post org:baidu
  

  http.waf

搜索存在某种防火墙的
   shodan search --limit 10 --fields ip_str,port http.waf:safedog
  搜索存在安全狗防火墙的IP
  

  html

查询html页面里面存在某个关键字
   shodan search --limit 10 --fields ip_str,port html:login
  

  随便点进去看一下,这里是一个登陆框
  

  product

搜索产品,例如一些中心件之类的东西
   shodan search --limit 10 --fields ip_str,port product:Apache httpd
  搜索apache2中心件
  这里是搜索出来的一个网址
  

  host

查看IP的具体信息
   shodan host 139.199.64.215
   查看139.199.64.215的信息

  --history

查看IP汗青解析记录
   shodan host IP --history

  download

下载你查询到的信息
   shodan download 文件名 --limit 100 '"\x03\x00\x00\x0b\x06\xd0\x00\x00\x124\x00"' 
  

  

  parse 

将下载的文件解析出来,这里填写绝对路径,刚刚填写相对路劲出现了问题
   shodan parse --fields ip_str ~/tool/shodan-python/0708.json.gz 
  

  将命令导入到0708文件中
  shodan parse --fields ip_str ~/tool/shodan-python/0708.json.gz > 0708.txt
  count

   计数
  盘算这个特性的漏洞数目
  

  honeyscore

查看对应IP是不是蜜罐
   

  但是这个我尝试了一下似乎没有作用
  我们还可以去网站上,直接搜索
  https://honeyscore.shodan.io/
  就是这么个网站
  

  myip

查看自己的IP的公网出口
   shodan myip
  

  更多指令 

https://www.shodan.io/search/filters 更多指令参考官方手册
网页使用

搜索0708漏洞,直接使用特性来搜索

'"\x03\x00\x00\x0b\x06\xd0\x00\x00\x124\x00"'

搜索摄像头


截图搜索

has_screenshot:true cisco
   带有试试截图的IP,这里可能泄漏一些隐私信息
  

   实例

如何批量的去寻找cve-2019-0708的漏洞

   使用cve2019-0708的十六进制漏洞特性 \x03\x00\x00\x0b\x06\xd0\x00\x124\x00 去查询,在这里是由于账号的权限不够,如果账号权限充足,则可以不消16进制特性
  shodan search --limit 10  --fields ip_str,port '"\x03\x00\x00\x0b\x06\xd0\x00\x00\x124\x00"'
  

  留意这里扫描出了漏洞,但是不一定能够利用
使用host查看是否存在,存在尝试利用

用自己的长途桌面尝试一下,这看起来像是windows7的一台设备
然后我们可以尝试一下弱口令,或者使用msf
账号:Administrador 暗码:Administrador
 

如何寻找空VNC 

shodan search --limit 30   --fields ip_str "authentication disable" port:5900
    
搜索出对应IP后可以尝试使用VNC毗连,可能寻找到没有暗码的VNC毗连,但是你搜索到的信息不一定准确,由于这个shodan不是实时的,可能你搜索到的这个信息时前段时间搜索出来的信息。人家已经把漏洞修复了。
搜索思科的一个弱口令设备

   shodan --limit 10 --fields ip_str,port "cisco -authorired port:23"
  -authorired 弱口令特性
  然后我们可以尝试使用某种长途毗连工具进行爆破毗连
  

  搜索Mongodb未授权登陆

   shodan search --limit 10 --fields ip_str "Mongodb server information -authentication" port:27017
 

  搜索Jenkins

这个插件可以完成项目标自动化测试、自动化摆设等
   要求响应头包罗"X-Jenkins" 或者 "Set-cookie:JESSIONID"
  shodan search --limit 10 --fields ip_str "X-Jenkins" OR "Set-cookie:JESSIONID" http.title:"Dashboard"
  

  

  学习毗连

shodan(1)_哔哩哔哩_bilibili 泷羽-sec


免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
回复

使用道具 举报

0 个回复

正序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

惊雷无声

金牌会员
这个人很懒什么都没写!

标签云

快速回复 返回顶部 返回列表