Commit Graph

385 Commits

Author SHA1 Message Date
UserExistsError 6181253109 fix multi connect bug 2018-07-26 17:34:11 -06:00
UserExistsError d5ed70417b bind_named_pipe payload for ruby_smb 2018-07-17 17:46:10 -06:00
William Vu c8891206af Add vprint_status back to bind_named_pipe
I thought it was redundant with the improved handler start message, but
it broke consistency with the other print statements. Fixing.
2018-07-13 17:29:52 -05:00
Brent Cook 8680379875 fix logic bug in handler thread for bind_named_pipe 2018-07-05 10:39:20 -05:00
William Vu f0b9b1c113 Add more verbose printing to bind handlers 2018-07-03 19:41:08 -05:00
UserExistsError bbf26c66f6 bind_named_pipe fixed for simpleclient versions param 2018-06-27 16:14:53 -06:00
UserExistsError 948b07166a pipe error checks 2018-03-14 00:09:20 -06: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
Brent Cook 38b03fdfff Merge branch 'upstream-master' into land-9539- 2018-02-15 16:22:13 -06:00
Brent Cook 93450b87dd use common retry options for UDP 2018-02-15 14:36:21 -06:00
Jeffrey Martin f5768e7ced gate session reported when using bind udp
While this method here is somewhat noisy on the network it eliminates
a poor user experience when the handler is started but the payload is
not yet running on the target.

When a target is sent a udp packet and it is not rejected push down
an initial "echo syn" command that will respond with output.  This
allows framework to be aware that the payload is what is running on
the server port instead of assuming a non-existent target is a valid
session.
2018-02-13 14:44:57 -06:00
UserExistsError 8ae8a0d94b added bind_named_pipe payload 2018-02-11 18:56:50 -07: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
RageLtMan f1a1e1a357 Implement specific dispatch extensions for tunnels
All meterpreter Clients are created equal, and as such they all
include the PacketDispatcher mixin and call its init methods when
a passive dispatcher is needed. However, since tunneling protocols
have different requirements for implementation, the methods which
provide protocol-specific functionality need to be mixed into the
Client before it attempts to initialize the dispatcher.

Provide a dispatch_ext option in the has passed to the client on
init from the session handler which is an Array containing mixin
references which are sent to :extend calls in the :init_meterpreter
method just prior to calling :initialize_passive_dispatcher.

Each handler implementation can thus push chains of mixins to the
client in order to provide middleware specific to the tunnel. Down
the road, this should permit stacking C2 encapsulations or tunnel
protocols/permutators to create unique session transports on the
fly.
2017-12-29 00:56:06 -05:00
Brent Cook bb5ea540ab fix a number of TODO's in the HTTP handler, remove duplication in handlers 2017-12-12 03:12:36 -06:00
Brent Cook f49006222c remove unneeded uri 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 017374be71 pass lhost/lport back into generate_stage with reverse_http/s 2017-12-12 03:12:36 -06:00
Brent Cook 85acbadf01 more DRYing 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
OJ a78d8f83fc Add HTTP header support for Host/Cookie/Referer
This is to start the support for things like domain fronting.
2017-11-21 13:47:18 -06:00
OJ 816e78b6f6 First pass of named pipe code for pivots 2017-09-07 01:33:53 -05:00
Brent Cook 4ca68a178b switch reverse_tcp stagers to all prefer StagerRetryCount
This leaves ReverseConnectRetries as an alternate spelling.
2017-08-08 19:27:00 -05:00
Brent Cook 83212b8b6b minor code cleanup 2017-08-08 19:26:59 -05:00
darkbushido 81bcf2ca70 updating all LHOST to use the new opt type 2017-05-04 12:57:50 -05:00
William Vu af3cd18c9f Fix #8041 so it works 2017-03-16 13:27:47 -05:00
Noah Berman ad929b6427 indentation fix part 2 2017-03-09 15:44:09 -07:00
Noah Berman ef6831437a indentation fix for clarity 2017-03-09 14:55:20 -07:00
Noah Berman ccf345f696 move method to module level 2017-03-09 14:32:51 -07:00
Noah Berman 10018e2a32 spacing fix in reverse.rb 2017-03-09 12:48:36 -07:00
Noah Berman 40204703f0 remove unnecessary newline 2017-03-09 12:26:11 -07:00
Noah Berman e7b47865be ruby formatting fix 2017-03-09 12:23:02 -07:00
Noah Berman 274089a7f1 cleanup for lhost loopback warn 2017-03-09 11:33:27 -07:00
Noah Berman 2f55b5e00e reconfigure lhost warn for loopback address 2017-03-09 11:10:27 -07:00
= 27c2795632 Issue #7188 resolved along with checking for all loopback addresses. 2017-03-08 00:02:50 +05:30
Tim 870621d169 Add OverrideScheme option, fixes #7841 2017-02-08 23:30:29 +08:00
Brent Cook 99047fa8a1 be stricter in what we accept for payload uri
datastore needs to contain something to produce a valid URI
2017-01-22 10:20:04 -06:00
Brent Cook 836da6177f Cipher::Cipher is deprecated 2017-01-22 10:20:03 -06:00
Brent Cook 3808eebad8 Land #7704, Update jobs output to show TCP listener information 2017-01-02 15:44:49 -06:00
OJ 505cc19662 Update reverse_tcp to show TCP listener information
Also update the readable text to only output the listener information if
it differs from the payload information.
2016-12-12 15:56:26 +10:00
OJ e8d7a074fa Tweak to stageless handling for python payloads 2016-11-29 07:54:51 +10:00
OJ 5e8a47ac00 Merge upstream/master into universal handler work 2016-11-28 15:26:43 +10:00
OJ 496836fc06 Remove debug junk, rejig order of ops in initializer 2016-11-28 15:25:07 +10:00
OJ e8158bd200 Add multi platform type, wire into the multi stage 2016-11-28 09:34:09 +10:00
James Lee b45a36180e Don't complain when Proxies is an empty string 2016-11-22 09:29:04 -06:00
OJ 09d9733a75 Interim commit while working on multi payloads 2016-11-03 06:44:39 +10:00
OJ 494b4e67bd Refactor http/s handler & payloads
This commit moves much of the platform-specific logic from the
reverse_http handler down into the payloads. This makes the handler
a bit more agnostic of what the payload is (which is a good thing).
There is more to do here though, and things can be improved.

Handling of datastore settings has been changed to make room for the
ability to override the datastore completely when generating the
payloads. If a datastore is given via the `opts` then this is used
instead otherwise it falls back to the settings specified in the usual
datatstore location.

Down the track, we'll have a payload that supports multiple stages, and
the datastore will be generated on the fly, along with the stage itself.
Without this work, there's no other nice way of getting datastore
settings to be contained per-stager.
2016-11-02 11:33:59 +10:00
OJ 0fca4483c0 Correctly call generate_stage on native init 2016-11-02 00:52:25 +10:00