Commit Graph

663 Commits

Author SHA1 Message Date
Brent Cook 1456bbdaec fix more whitespace issues 2018-05-01 05:23:26 -05:00
Brent Cook a5588ec174 use same datastore retry option for x86 and x64 linux stagers 2018-04-17 15:57:54 -10:00
Brent Cook 6fb6570f99 delete old feature detection code from exploit base
This deletes some old code that apparently has been broken and somewhat unused for many years.

The 'derived_implementor?' method for modules relies on the debug output from Ruby in order to tell of a class implements a method, but the regex it used didn't work properly with any modern Ruby version until 2.5.x. This caused a random sleep to get inserted into certain payload staging operations, which actively breaks staging in certain scenarios (I'm not trying to address that here).

This also removes some ancient module feature detection code, which also is entirely unused today.
2018-04-07 12:47:42 -05:00
scriptjunkie c303859c11 Fix #9827 2018-04-06 11:06:52 -05:00
bwatters-r7 d9039d43ef Land #9734, Remove unwanted 'pop RAX' from windows/x64/reverse_(win)http 2018-04-03 14:23:41 -05:00
Brent Cook b445583a14 Land #9774, use correct whitespace when patching python meterpreter 2018-04-02 23:07:36 -05:00
scriptjunkie 774ef22d08 Fix upts -> opts 2018-03-30 22:26:53 -05:00
Jeffrey Martin b509c14851 detect the whitespace needed when patching meterpreter 2018-03-27 13:24:44 -05:00
Summus6 587215affc Remove unwanted 'pop RAX' from windows/x64/reverse_(win)http 2018-03-20 11:01:10 +01:00
Jeffrey Martin 4801021aba Land #9613, add bind_named_pipe x86 2018-03-17 15:53:06 -05:00
Brent Cook d6871f5733 Land #9614, Juniper post enum module 2018-03-06 10:29:56 -06:00
bwatters-r7 0d07d44b14 ReLand #9565, Reverse TCP x64 RC4 via max3raza's rc4_x64 asm
This reverts commit 7964868fcd.
2018-03-02 16:09:52 -06:00
bwatters-r7 7964868fcd Revert "Land #9565, Reverse TCP x64 RC4 via max3raza's rc4_x64 asm"
This reverts commit fcc579377f, reversing
changes made to 95cd149378.
2018-03-02 08:29:48 -06:00
bwatters-r7 fcc579377f Land #9565, Reverse TCP x64 RC4 via max3raza's rc4_x64 asm 2018-03-02 07:34:45 -06:00
Brent Cook 4fec2e758d make fix more precise, based on https://github.com/rapid7/metasploit-framework/pull/2343 2018-03-01 08:59:55 -06:00
Brent Cook 27bd2a4a9f workaround Y2k38 issues in java certificate generation 2018-03-01 08:41:28 -06:00
h00die c7bbc6eca4 juniper post enum module 2018-02-22 21:08:21 -05:00
UserExistsError e19a071910 add bind_named_pipe x86 2018-02-22 19:03:37 -07:00
UserExistsError b3f26ea55f bind_named_pipe fixes 2018-02-18 10:31:57 -07:00
RageLtMan 80779f73ef Implement Michael Schierl's suggestions 2018-02-16 23:03:05 -05:00
RageLtMan 354eb4092a Reverse TCP x64 RC4 via max3raza's rc4_x64 asm
To round out the work done by mihi for x86 stages back in the day,
this PR provides x64 Windows stage encryption in RC4 via assembly
written/modified by max3raza during adjacent work on DNS tunneled
transport.

Stage encryption differs from encoding in that there is no decoder
stub or key materiel carried with the stage which can be used by
defensive systems to decode and identify the contents. Persistence
payloads, oob-delivered stage0, and other contexts benefit heavily
from this as their subsequent stage is difficult to detect/identify,
and the chance of accidental execution of the wrong payload/stage
is drastically reduced if separate keys are in play for individual
targets - acquiring the wrong stage will result in decryption
failure and prevent further execution.

For historical context, all of the RC4 stagers implement in-place
decryption via stage0 for the contents of stage1 using the provided
passphrase converted to a key and embedded in stage0 as part of the
payload.

Testing:
  In-house testing with Max - we got sessions, loaded extensions.

Notes:
  All credit for the work goes to Max3raza - big ups for getting
this knocked out.
2018-02-16 05:15:05 -05:00
Brent Cook 38b03fdfff Merge branch 'upstream-master' into land-9539- 2018-02-15 16:22:13 -06:00
Wei Chen 6fe8691528 Fix #9090, honoring retry counts for x86/64 payloads
Fix #9090
2018-02-15 13:52:34 -06:00
Jeffrey Martin 3811665b69 Land #7699, Add UDP handlers and payloads (redux) 2018-02-13 14:50:09 -06:00
UserExistsError 8ae8a0d94b added bind_named_pipe payload 2018-02-11 18:56:50 -07:00
ssyy201506 9ea64db26f Fix proxy authentication 2018-01-30 11:55:04 +09:00
bwatters-r7 fd4d5756bf Land #9335, Added socket bind port option for reverse tcp payload.
Merge branch 'land-9335' into upstream-master
2018-01-24 11:50:10 -06:00
RageLtMan ef1d4ddb03 Add UDP handlers and payloads (redux)
This is a repackaging effort for the work i originally pushed in
6035. This segment of the PR provides UDP session handlers for
bind and reverse sessions, a Windows Metasm stager (really the
TCP stager with a small change), and a pair of socat payloads for
testing simple UDP shells. Netcat or any scripting language with
a sockets library is sufficient to use these sessions as they are
stateless and simple.

Testing of this PR requires rex/core #1 and rex/socket #2

The SSL testing which was being done on 6035 is backed out, left
for a later time when we can do DTLS properly.
2018-01-23 02:00:55 -05:00
Brent Cook b4bb1b5ed1 fix whitespace patchups for current python meterpreter 2018-01-18 00:28:04 -06:00
b0yd 27f96110d1 Moved socket struct inside conditional 2018-01-04 21:29:49 -05:00
b0yd 0b6e41d65b Attempting to fix cached size errors. 2017-12-22 12:49:02 -05:00
b0yd 0f5ff6ead3 Added bytes to required size 2017-12-22 12:28:37 -05:00
b0yd add26ca405 Cleaned up 2017-12-22 12:17:15 -05:00
b0yd a7fbe71a93 Added socket bind port option for reverse tcp payload. 2017-12-21 14:10:41 -05:00
Brent Cook 210f137b7b Merge branch 'upstream-master' into land-9296- 2017-12-20 12:07:53 -06:00
Tim 15da7c699d Fix #7779, fix multi/meterpreter/reverse_http with web_delivery 2017-12-20 16:32:07 +08:00
Tim c4e20e01e3 iOS meterpreter 2017-12-12 23:23:21 +08:00
Brent Cook f7dfba6bae deduplicate code from python meterpreter 2017-12-12 03:12:36 -06:00
Brent Cook b7c231bb93 further normalize transport config 2017-12-12 03:12:36 -06:00
Brent Cook 528a423fc0 fix python override scheme 2017-12-12 03:12:36 -06:00
Brent Cook 8e76c4cb4f handle override at the meterpreter config layer 2017-12-12 03:12:36 -06:00
Brent Cook 636b93b026 minor simplification 2017-12-12 03:12:36 -06:00
Brent Cook 1653e31f71 Merge branch 'upstream-master' into land-9126- 2017-12-11 03:57:00 -06:00
Brent Cook ec2b5d48a6 add missing payload uuid accessors 2017-11-29 11:49:41 -06:00
Brent Cook 8645a518b3 add mettle support for custom headers 2017-11-24 20:27:34 -06:00
Brent Cook ea37196614 use cooler names c/o @timwr, make options easier to grep 2017-11-21 13:47:19 -06:00
Brent Cook 37ab771ca9 uri is not always defined, fix python stager generation 2017-11-21 13:47:19 -06:00
Brent Cook 2076db2d61 DRY up common stager and payload http and retry options 2017-11-21 13:47:19 -06:00
Brent Cook 1fd7f7c8bc prefix MeterpreterUserAgent and PayloadProxy* with Http for consistency,
this also adds aliases where needed
2017-11-21 13:47:19 -06:00
Tim a5af21fa1a add http headers to Android/Java 2017-11-21 13:47:19 -06:00