rapid7/metasploit-framework — pull request #4391 by hmoore-r7 (2014-12-13 19:56:15+00:00)
Title: Merge: More shellcode golf

This is a rework of PR #3078. This brings in the source changes from @shierlm and I used these to rebuild the binary blobs in the changed payloads.

The following uses of block_api were not updated, as they were using an older version and @shierlm's changes were not directly applicable without a rework:

* modules/payloads/singles/windows/dns_txt_query_exec.rb
* modules/payloads/singles/windows/download_exec.rb
* modules/payloads/stagers/windows/reverse_hop_http.rb
* lib/msf/util/exe.rb

Testing this should be straight-forward, since the changes should be transparent to the payloads, and if they work in one payload, they should likely work across all of them.

The updated modules include:
* modules/payloads/singles/windows/shell_hidden_bind_tcp.rb
* modules/payloads/singles/windows/dns_txt_query_exec.rb
* modules/payloads/singles/windows/shell_reverse_tcp.rb
* modules/payloads/singles/windows/shell_bind_tcp.rb
* modules/payloads/stagers/windows/reverse_https.rb
* modules/payloads/stagers/windows/reverse_hop_http.rb
* modules/payloads/stagers/windows/reverse_https_proxy.rb
* modules/payloads/stagers/windows/bind_tcp_rc4.rb
* modules/payloads/stagers/windows/reverse_tcp_rc4.rb
* modules/payloads/stagers/windows/reverse_tcp_dns.rb
* modules/payloads/stagers/windows/reverse_http.rb
* modules/payloads/stagers/windows/reverse_tcp_rc4_dns.rb
* modules/payloads/stagers/windows/bind_tcp.rb
* modules/payloads/stagers/windows/reverse_tcp_allports.rb
* modules/payloads/stagers/windows/bind_ipv6_tcp.rb
* modules/payloads/stagers/windows/reverse_ipv6_tcp.rb
* modules/payloads/stagers/windows/reverse_tcp.rb

This also updates the PrependMigrate stub and kernel injection stubs.