rapid7/metasploit-framework — pull request #4434 by wchen-r7 (2014-12-19 19:53:18+00:00)
Title: Fix jcxz to jecxz for x86_64 in metasm

This fixes "invalid opcode near 'jecxz'" for x64 metasm encoding. The bug report for this is #4405, but I decided not to tag it because the best solution (based on @jlee-r7's feedback) is to create a gem for metasm. However before that happens, I think it's easier to just merge this patch first, that way we at least have a working x64 PrependMigrate.

## Verification

It's VERY easy to do.

- [ ] Please just follow this demonstration:

```
$ ./msfconsole -q
msf > use exploit/multi/handler
msf exploit(handler) > set payload windows/x64/meterpreter/reverse_tcp
payload => windows/x64/meterpreter/reverse_tcp
msf exploit(handler) > set lhost [IP]
lhost => [IP]
msf exploit(handler) > set prependmigrate true
prependmigrate => true
msf exploit(handler) > run
```

- [ ] If you don't have the patch you will get: "Exploit failed: invalid opcode near "jecxz" at "\"\"" line 42"
- [ ] If you have the patch, the listener should start.