Commit Graph

1574 Commits

Author SHA1 Message Date
RageLtMan 3870dad3d1 Fix handler type copy pasta 2019-06-24 13:55:53 -04:00
RageLtMan 510b2f5aac Trim reverse ssh cmd payload 2019-06-23 21:27:48 -04:00
RageLtMan d1eaac9932 Implement native reverse SSH via openssh binary
Implement a reverse SSH shell using nothing but the on-target SSH
client and a fifo in the same manner as used by netcat payloads.
This is not forensically sound as the fifo will be caught by HIDS,
filesystem snapshots, and other defensive measures. However, it
does provide a way out from almost any modern POSIX system as they
nearly all have an SSH client in one form or another.

Convert existing Ruby reverse SSH payloads to use dynamic cached
payload sizing.
2019-06-23 05:48:50 -04:00
RageLtMan c339662fed SshCommandSession and Ruby Payloads
Implement a command-only session type over the HrrRbSsh client
Connection Channels' file descriptors, adjust from base command
session to deal with the separate reader/writer IOs. Technically,
a TTY session works out of the box here as well.

Implement a pair of showcase Ruby payloads using net/ssh to call
back to the handler, create a shell channel, and loop piping I/O
between framework session and client via the Ruby backtick exec.

Next Steps:
  Command payloads need to be written for every major interpreted
language as well as some sort of bashism a la openssl_double if
it comes to that, but preferably single socket implementation.

Testing:
  Very minimal, needs a good run through by the community and R7
2019-06-23 05:20:04 -04:00
Brent Cook 20d21bb7cc update specs, add a few more compat modules 2019-06-11 12:56:11 -05:00
Brent Cook 4d6e0e9892 https 2019-06-11 04:48:52 -05:00
Brent Cook 44dfc3506d add udpsockedi, tag compatible payloads
Not all payloads compatible with TCP stagers are compatible with UDP
stagers, so assuming sockedi is not sufficient to ensure compatibility.
This adds a udpsockedi which pairs compatible payloads together.
2019-06-11 04:19:14 -05:00
bwatters-r7 bee013a18c update cache size and fix an assignment 2019-06-04 07:13:34 -05:00
RageLtMan ff1630ad14 Implement bind TCP with RC4 decryption for x64
Update metasm generated shellcode blocks to cobble together an
RC4 decryption routine with a bind-socket handler for x64 targets.
Expose via new payload module
2019-06-03 18:06:53 -04:00
CCob aaa017e9cd Fix issue where Linux x64 shell_find_port did not set the sockaddr_len value 2019-06-02 09:23:09 +01:00
Brent Cook b9af69a5be update payloads 2019-05-31 09:32:44 -05:00
bwatters-r7 efaacbeb2a Land #11797, Added to code to remove payload once run.
Merge branch 'land-11797' into upstream-master
2019-05-28 11:12:00 -05:00
苇子 8af7ed9526 Update shell_bind_tcp.rb
fix a mistake in payloads/singles/linux/armle/shell_bind_tcp.rb
2019-05-25 17:51:30 +08:00
William Vu 9d0cf0661c Land #11857, cmd/unix/reverse_bash_udp payload 2019-05-24 02:19:44 -05:00
bcoles 2d6847ab5e Add alternative cmd payload 2019-05-24 16:33:44 +10:00
William Vu eb006fd2b3 Send to the socket to initiate the session 2019-05-24 00:01:06 -05:00
bwatters-r7 068ba6e3f2 Update Payload cache sizes 2019-05-21 12:40:27 -05:00
Brendan Coles 652fc1340e Add cmd/unix/reverse_bash_udp payload 2019-05-20 07:57:01 +00:00
Brent Cook 930952e994 Land #11374, add super-small version of bind tcp random payload 2019-05-17 03:13:40 -07:00
Brent Cook 9ae01c98c9 merge super-tiny payload into tiny payload, invoke on available size 2019-05-17 03:12:01 -07:00
bigendiansmalls f1a5711c0f Fixed Size 2019-04-30 12:15:47 -05:00
bigendiansmalls e79a9ed04b Added to code to remove payload once run.
The original payload left the binary behind, which could be
then used by someone else intentionally or otherwise. This
addition cleans up the module by removing it after running.
2019-04-30 11:32:40 -05:00
Jacob Robles f195c4bde3 Update payload cache sizes 2019-04-26 08:40:07 -05:00
Brent Cook 5f75dd1bd2 bump payload sizes 2019-04-18 09:40:12 -05:00
Brent Cook e7974e4955 bump mettle and other gems 2019-04-11 17:26:15 -05:00
bwatters 2820da5e1b Update Cache Sizes 2019-02-11 15:41:04 -06:00
bcoles 1e3be0fd3f Update modules/payloads/singles/linux/x86/shell_bind_tcp_super_small_random_port.rb
Co-Authored-By: Ekzorcist <infosecurity@ya.ru>
2019-02-10 22:32:00 +03:00
bcoles 346a73d52a Update modules/payloads/singles/linux/x86/shell_bind_tcp_super_small_random_port.rb
Co-Authored-By: Ekzorcist <infosecurity@ya.ru>
2019-02-10 22:31:23 +03:00
Ekzorcist 0b768d32be Add metasm format of code for Super small Shell Bind TCP Random Port Payload 2019-02-09 15:28:56 +03:00
Ekzorcist d327dc79f0 Add Super Small Shell Bind TCP Random Port Payload (x86) 2019-02-08 15:46:31 +03:00
Brent Cook eab31eba4a update to latest mettle with dylib support 2019-02-07 09:33:36 -06:00
Brent Cook 5fc7167beb Merge remote-tracking branch 'upstream/master' into land-10812- 2019-02-07 09:31:02 -06:00
Brent Cook e0f597f25f fix license URL 2019-02-07 08:18:04 -06:00
Brent Cook cb6d7fa210 Land #11165, Fix intermittent problem with native osx stager 2019-02-06 22:39:07 -06:00
Brent Cook 4a344093a4 bump payloads 2019-02-06 22:32:24 -06:00
bwatters 239cce53ea Land #11039, Add linux x64 ipv6 reverse shell
Merge branch 'land-11039' into upstream-master
2019-02-01 16:21:24 -06:00
Jeffrey Martin 5a63e629e4 update payload sizes for mettle 0.5.4 2019-01-31 00:12:45 -06:00
bwatters 6c9a5b3fea Update Cache Sizes 2019-01-28 15:53:19 -06:00
Brendan Coles 24f807490f revisionism 2019-01-10 19:19:14 +00:00
bwatters 9e109c7e7c Update cache size 2018-12-28 16:08:15 -06:00
Tim W 58aebb6dec fix #11133, sleep to avoid the second stage being read too early 2018-12-24 19:26:10 +08:00
Jeffrey Martin bf4bb0a5b9 bump metasploit-payloads gem
Update metasploit-payloads gem to 1.3.57 to pick up
fix for Python Meterpreter PTY Leak from rapid7/metasploit-payloads#319
2018-12-19 18:19:24 -06:00
Wei Chen f7eb3452be Land #11083, set user agent in Windows reverse_http(s) stagers 2018-12-19 11:38:12 -06:00
LouDnl 2a69fffa6b fix for ReverseTcp error
Update vax shell_reverse_tcp.rb to fix ReverseTcp NameError
Error:
/opt/metasploit-framework/embedded/framework/modules/payloads/singles/bsd/vax/shell_reverse_tcp.rb:24:in `initialize': uninitialized constant Msf::Handler::ReverseTcp (NameError)

After adding this line the error dissapeared for me and I was able to run msfconsole again.
2018-12-17 19:28:07 +01:00
epi cb3ea8dfed Remove binding.pry from bind payload.
In response to
https://github.com/rapid7/metasploit-framework/pull/11039#discussion_r241890477.
2018-12-14 16:32:19 -06:00
Brent Cook 0ce05f0c07 update payload sizes 2018-12-08 06:24:02 -06:00
Brent Cook 0345c8f66c update mettle payloads
This is a large update to mettle payloads including:

 * Adds globbing support to the `ls` command (https://github.com/rapid7/mettle/pull/139)
 * Fixes crashes on iOS platforms when cryptTLV is enabled (https://github.com/rapid7/mettle/pull/142)
 * Fixes display of the OS version on macOS and iOS (https://github.com/rapid7/mettle/pull/143)
 * Fixes the local port handling for pivoted client network connections (https://github.com/rapid7/mettle/pull/144)
 * Fixes an unaligned memory access in TLV packet handling, needed for some CPUs (https://github.com/rapid7/mettle/pull/145)
 * Fixes some compatibility issues building on Solaris (https://github.com/rapid7/mettle/pull/147)
 * Updated libpcap, mbedtls, and libcurl to the latest versions (https://github.com/rapid7/mettle/pull/146)
2018-12-06 21:16:41 -06:00
epi c3a40d3752 Remove trailing whitespace at EOL. 2018-12-06 20:18:21 -06:00
epi 392ad18dba Implement reverse_ipv6 shellcode via metasm in lib.
Per the linked request
    https://github.com/rapid7/metasploit-framework/pull/11039#issuecomment-443915955
Rewrote previous version of payload module to make use of metasm for
more reusable shellcode.
2018-12-06 20:10:07 -06:00
epi f728b46a80 WIP on add-linux-x64-ipv6-bind-shell: 87fa3af6b9 Implement shellcode via metasm in lib. 2018-12-06 16:23:20 -06:00