shodan批量检测漏洞+VNC

目录

声明

一、批量查找并验证cve-2019-0708漏洞

1. 漏洞介绍

2. 漏洞原理

3. 漏洞特征

4. shodan收集漏洞ip和下载解压

5. msf批量漏洞利用

二、shodan结合VNC

1. count命令

2. honeyscore

3. 查看ip地址的历史数据

4. VNC空密码


声明

学习视频来自 B 站up主泷羽sec,如涉及侵权马上删除文章。

笔记的只是方便各位师傅学习知识,以下网站只涉及学习内容,其他的都与本人无关,切莫逾越法律红线,否则后果自负。

B站地址:https://space.bilibili.com/350329294

一、批量查找并验证cve-2019-0708漏洞

1. 漏洞介绍

CVE-2019-0708,也被称为BlueKeep,是一个影响Windows远程桌面服务(RDP:Remote Desktop Protocol)的远程代码执行漏洞。这个漏洞允许未经身份验证的攻击者通过网络发送特制的请求来执行远程代码。

2. 漏洞原理

存在漏洞的远程桌面服务器,在接收到特殊数据包时会释放一个内部信道 MS_T120 的控制结构体,但并未将指向该结构体的指针删除,而且在远程桌面连接结束之后还会调用 MS_T120 结构体内的一个函数指针,若攻击者可通过远程发送数据重新占据被释放的 MS_T120,并为结构体内的函数指针赋恰当的值,即可实现远程命令执行。

影响版本

Windows 7
Windows Server 2008
Windows Server 2008 R2
Windows Server 2003
Windows XP

Windows 8 和 windows10 以及之后的版本不受此漏洞影响

3. 漏洞特征

十六进制漏洞特征:"\x03\x00\x00\x0b\x06\xd0\x00\x00\x124\x00"
影响系统:windows
关键词:Remote Desktop Protocol
端口:3389

4. shodan收集漏洞ip和下载解压

    • 方法一 根据漏洞指纹
shodan search --limit 10 --fields ip_str,port'"\x03\x00\x00\x0b\x06\xd0\x00\x00\x124\x00"'

选一个ip进行远程桌面连接

    • 方式二 根据端口号和关键字
shodan search --limit 10 --fields ip_str,port "port:3389 Remote Desktop Protocol os:windows"

此方式搜出来就没有这么精准

    • 方式三 利用vuln参数

需要shodan高级会员

shodan search --limit 10 --fields ip_str vuln:"CVE-2019-0708"
    • shodan下载和解压

download帮助文档

shodan parse -h

Usage: shodan parse [OPTIONS] <filenames>

  Extract information out of compressed JSON files.

Options:
  --color / --no-color
  --fields TEXT         List of properties to output.
  -f, --filters TEXT    Filter the results for specific values using key:value
                        pairs.
  -O, --filename TEXT   Save the filtered results in the given file (append if
                        file exists).
  --separator TEXT      The separator between the properties of the search
                        results.
  -h, --help            Show this message and exit.

下载命令

基本用法:shodan download <文件名> <搜索查询> [选项]

shodan download cve0708 --limit 10 --fields ip_str,port' "\x03\x00\x00\x0b\x06\xd0\x00\x00\x124\x00"'
该命令表示将符合条件的搜索结果下载到名为的cve0708文件中,限制结果数量为10条,

下载之后需要解压,拉到windows系统或者利用prase命令都可以进行解压,这里利用prase命令

parse帮助文档

shodan parse -h

Usage: shodan parse [OPTIONS] <filenames>

  Extract information out of compressed JSON files.

Options:
  --color / --no-color
  --fields TEXT         List of properties to output.
  -f, --filters TEXT    Filter the results for specific values using key:value
                        pairs.
  -O, --filename TEXT   Save the filtered results in the given file (append if
                        file exists).
  --separator TEXT      The separator between the properties of the search
                        results.
  -h, --help            Show this message and exit.

解压命令

基本用法:shodan parse --fields ip_str <解压前的文件名> >> <解压后的文件名>
shodan parse --fields ip_str '../../cve0708.json.gz' > cve0708.txt

5. msf批量漏洞利用

启动msf

查找并选择poc

需要设置攻击ip,show options是查看配置信息

输入命令check即可验证,其中[+] 表示漏洞确认,可以利用,[*] 表示正在执行操作,结果不确定。

二、shodan结合VNC

1. count命令

Shodan的count命令用于返回特定搜索查询的结果数量。这个命令可以帮助用户了解在Shodan数据库中与特定查询条件相匹配的设备数量。

shodan count -h

Usage: shodan count [OPTIONS] <search query>

  Returns the number of results for a search

Options:
  -h, --help  Show this message and exit.                                                                                  
基本用法:shodan count <搜索语句>
shodan count '"\x03\x00\x00\x0b\x06\xd0\x00\x00\x124\x00"'

2. honeyscore命令

Shodan的honeyscore用于检查一个IP地址是否可能是一个蜜罐

命令行工具无法使用,web端:https://honeyscore.shodan.io/

3. 查看ip地址的历史数据

shodan host xx.xx.xx.xx --history

4. VNC空密码

VNC简介:

VNC(Virtual Network Computing)是一种流行的远程桌面协议,允许用户通过图形界面远程访问和控制另一台计算机。

使用Shodan搜索没有启用身份验证的VNC服务,这个查询会返回最多30个结果,每个结果都包含一个IP地址(ip_str),这些IP地址对应的设备运行着VNC服务,并且VNC服务的描述中包含“authentication disabled”(身份验证已禁用)的字样,同时这些服务监听在5900端口上。

搜索命令:
shodan search --limit 30 --fields ip_str "authentication disabled" port:5900

下载命令:
shodan download vnc --limit 30 --fields ip_str "authentication disabled" port:5900

解压命令:
shodan parse --fields ip_str 'vnc.json.gz' > vnc.txt

利用vnc进行连接成功

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值