Commit Graph

4463 Commits (b6e2c34b11a877d733a38a7ea029b3cca083610c)

Author SHA1 Message Date
Spencer McIntyre 1de5a464e7 Fix reply status codes and domainname addresses 2018-05-25 20:14:03 -04:00
Spencer McIntyre 6859856101 Refactor the socks5 code into multiple files 2018-05-25 20:14:03 -04:00
Spencer McIntyre 7f9fe971cb Add initial udp associate support 2018-05-25 20:14:03 -04:00
Spencer McIntyre 04bec0bdf0 Progress on the socks5 proxy module 2018-05-25 20:14:02 -04:00
Spencer McIntyre 6fa0831bcb Start the socks5 backend 2018-05-25 20:14:02 -04:00
William Vu 6f1e75e097 Remove loopback restriction
It's occasionally useful, and we already warn when setting it.
2018-05-24 15:44:32 -05:00
William Vu da3df23f03 Fix Socket#getifaddrs with ::
Rex::Socket#getifaddrs doesn't exist.
2018-05-24 14:53:41 -05:00
Brent Cook 86a5b951aa
Land #9990, add SOCKS5 proxy support 2018-05-23 17:31:09 -05:00
Aaron Soto 8a72e7181a
Added username/password-based authentication 2018-05-22 20:42:23 -05:00
Aaron Soto 72efe66403
Refactored for better logging, IPv6 support, and prep for auth 2018-05-22 18:57:00 -05:00
Matthew Kienow cf8d0bd172
Remove unnecessary class declaration 2018-05-22 12:25:04 -04:00
Kevin Kirsche f2549a1a83 Make domain name conditional 2018-05-19 09:53:06 -04:00
Kevin Kirsche 164f3ef48d Add CVE-2018-1111 exploit 2018-05-18 12:47:08 -04:00
Aaron Soto ac2f7b96f5
Added IPv6 support 2018-05-15 12:07:54 -05:00
Aaron Soto 3ce05e54c6
Added DNS resolution support 2018-05-14 10:55:53 -05:00
Hypnoze57 08b81a418f Customization of Golden Ticket Duration
- Post exploitation module updated
- Kiwi extention updated

Using mimikatz /startoffset and /endin params
Duration in hours, default already 10 years
2018-05-09 17:44:55 +02:00
Brent Cook 02849bcfd0
Land #9986, initial ruby_smb simple client integration 2018-05-07 14:02:22 -05:00
Brent Cook d3e6e93d6a the fastest code is that which does not exist 2018-05-07 10:13:38 -05:00
Brent Cook 3e7e1e59df style updates, expand constants 2018-05-07 00:24:38 -05:00
Brent Cook a9094d6b97 style updates 2018-05-07 00:24:38 -05:00
Jacob Robles 534d05ff44 simpleclient versions option 2018-05-07 00:24:38 -05:00
Jacob Robles ff202a5f5b Simpleclient/SMB2 support 2018-05-07 00:24:38 -05:00
Jacob Robles d54992674f Response code, Write fix 2018-05-07 00:24:38 -05:00
dmohanty-r7 f2cf4fd1dc remove case for open smb file packet field 2018-05-07 00:24:38 -05:00
dmohanty-r7 960c733f16 Remove references to TreeId and FileID 2018-05-06 11:35:54 -05:00
dmohanty-r7 5f7b050173 Get psexec and enumshares to stable state 2018-05-06 11:27:11 -05:00
dmohanty-r7 e25a718861 Simplify 2018-05-06 11:27:11 -05:00
dmohanty-r7 e9b78095be Psexec works 2018-05-06 11:27:11 -05:00
dmohanty-r7 a9019585fe Replace simpleclient's client with ruby_smb client 2018-05-06 11:27:11 -05:00
Aaron Soto 2cd0d3d90a
Rudamentary SOCKS5 functionality, CONNECT, IPv4, non-DNS only 2018-05-04 14:44:03 -05:00
Brent Cook fcc38b75bf style updates 2018-04-30 18:40:07 -05:00
Brent Cook 1214f4d6c9 more optimizations 2018-04-30 18:25:25 -05:00
Kent Gruber 89ab409a1a remove unnecessary object allocation and regex
The regex can be removed with the default split method. The val object
can be removed by adding to the secs object directly on the result of
the case statement.
2018-04-27 23:10:28 -04:00
Jeffrey Martin 2487314821
Land #9869, Add support for shellcode encryption for msfvenom 2018-04-25 15:51:05 -05:00
Wei Chen 3611a1dfe4 Update rex-text version 2018-04-18 10:40:11 -05:00
Wei Chen ff9c55207e Move crypto methods to Rex::Crypto namespace 2018-04-17 20:12:26 -05:00
James Barnett 68ad91763a Merge branch 'rapid7/master' into MS-3062_workspaces 2018-04-16 15:33:59 -05:00
Aaron Soto b9d71b7147
Renamed 'mask' to 'glob' 2018-04-11 14:50:27 -05:00
Aaron Soto 21467d7938
Update stdapi/fs help output to match searching/masking parameters 2018-04-11 14:19:33 -05:00
James Barnett e51f41fa34
Merge remote-tracking branch 'msf_jbarnett/fix_services_bugs' into MS-3062_workspaces 2018-04-10 13:35:33 -05:00
Brent Cook 7a95024062 remove more ring operations 2018-04-06 13:49:16 -05:00
Brent Cook 2ee7b1ec5c Fix native 'readline' (msfconsole -L) support for Ruby 2.5 onward 2018-04-03 08:00:08 -05:00
Brent Cook bd3c00dfd0
Land #9726, add simple Rex::Tar wrapper for consistency with other archive types 2018-04-02 23:35:22 -05:00
Brent Cook 428233b82d
Land #7949, Format binary registry data nicely on display 2018-04-02 23:11:25 -05:00
James Barnett ecbbf1d940
Pass workspace when using db_nmap 2018-03-30 15:27:32 -05:00
William Vu f5025cb84e Add Rex::Tar
This just inherits from Gem::Package::Tar{Reader,Writer} at the moment.
We may want to build out higher-level methods than what the inherited
code already provides. Or don't inherit at all.
2018-03-27 14:57:57 -05:00
Brent Cook 1610db482a minor style nits 2018-03-25 07:34:45 -05:00
Brent Cook 7c5c5513eb Merge remote-tracking branch 'upstream/master' into land-9586- 2018-03-25 07:29:55 -05:00
Brent Cook f662049b27 clarify screenshot on android scenario 2018-03-25 07:29:39 -05:00
b0yd 7e0c255591 Formatted reg binary type to hex when displaying query results. 2018-03-23 15:56:12 -04:00
Jon Hart f09c5eafc7 Appease hound 2018-02-27 04:12:58 -06:00
Jon Hart 46299dff00 The DRDOS mixin operates on strings, so make the bindata'd NTP classes cooperate 2018-02-27 04:12:57 -06:00
Brent Cook 99965c142b remove duplicate check 2018-02-20 04:42:49 -06:00
Brent Cook bb3a11dd20 use ctrl-d to cancel input instead 2018-02-20 04:40:00 -06:00
Tim W 5083150002 fix #9112, improve error message on failure 2018-02-20 18:06:03 +08:00
Brent Cook f5f7b4d25a handle sessions still open 2018-02-20 03:31:20 -06:00
Brent Cook e995ccfc33 make this a little easier to read 2018-02-20 03:27:55 -06:00
Brent Cook e26fb49c99 if we have no more input from the console, quit 2018-02-20 03:27:38 -06:00
Brent Cook 3d8451e616
Land #8997, add local 'ls' support to Meterpreter sessions 2018-02-19 23:21:59 -06:00
Brent Cook 4e9d900a17
Land #9507, Expand paths for meterpreter's cp, mv, and rm commands 2018-02-19 21:26:03 -06:00
UserExistsError b3f26ea55f bind_named_pipe fixes 2018-02-18 10:31:57 -07:00
Brent Cook bd2af0143a properly handle when there is no stat callback specified on upload 2018-02-16 16:14:09 -06:00
Brent Cook 289277c613
Land #9516, Support Bash-Style Continuation Lines 2018-02-16 10:53:58 -06:00
Brent Cook 38b03fdfff Merge branch 'upstream-master' into land-9539- 2018-02-15 16:22:13 -06:00
a1exdandy 7e03bf838b Fix src_size view 2018-02-15 17:44:41 +05:00
a1exdandy a0c473f29e Upload memory usage optimization
Optimize xor_bytes memory usage, use small buffer for upload,
add verbosity
2018-02-15 17:05:22 +05:00
UserExistsError 8ae8a0d94b added bind_named_pipe payload 2018-02-11 18:56:50 -07:00
Spencer McIntyre 214c137b4a Don't use parenthesis around pgets 2018-02-07 15:53:11 -05:00
Spencer McIntyre 0ad7d10e05 Use a continuation flag to disable tab completion 2018-02-06 14:44:55 -05:00
Spencer McIntyre 6d7579d907 Support breaking commands into multiple lines 2018-02-06 14:29:11 -05:00
Spencer McIntyre 8b56bbc541 Update mkdir as well for path expansion 2018-02-05 16:16:53 -05:00
Spencer McIntyre c70bcb5869 Use a constant for the regex and update rmdir too 2018-02-05 16:06:16 -05:00
Spencer McIntyre f441306036 Expand paths for meterpreter's cp, mv, and rm cmds 2018-02-05 15:22:05 -05:00
Brent Cook d5ae2bb55b Fix pivot handler to not consume all packets
Packet handlers should only return true if they consume a packet.
Otherwise, they should return false so something else can consume it.
This fixes port forwards by allowing the socket handler to see packets
that were otherwise being discarded in the pivot handler.
2018-02-02 18:01:05 -06:00
zerosum0x0 c8ff2adf06 added support for smb client 2018-01-27 20:49:17 -07:00
Brent Cook 03d1523d43
Land #6611, add native DNS to Rex, MSF mixin, sample modules 2018-01-22 23:54:32 -06:00
Brent Cook 9a35c324c0
Land #9352, Pull out HTTP-specific code from PacketDispatcher 2018-01-22 16:52:24 -06:00
Pearce Barry ba75d19d34
Fix failing spec. 2018-01-19 15:52:25 -06:00
Pearce Barry 2a6b3671bf
Add connection addr+port info to http response object.
Update owa_login to use this instead of doing lookups on its own.
2018-01-19 13:37:33 -06:00
William Vu 2916c5ae45 Rescue Rex::Proto::SunRPC::RPCTimeout
Coincidentally, this also fixes the rescue in the library, since
rescuing Timeout instead of Timeout::Error does nothing.
2018-01-12 19:34:59 -06:00
RageLtMan c65c03722c Migrate native DNS services to Dnsruby data format
Dnsruby provides advanced options like DNSSEC in its data format
and is a current and well supported library.
The infrastructure services - resolver, server, etc, were designed
for a standalone configuration, and carry entirely too much weight
and redundancy to implement for this context. Instead of porting
over their native resolver, update the Net::DNS subclassed Rex
Resolver to use Dnsruby data formats and method calls.
Update the Msf namespace infrastructure mixins and native server
module with new method calls and workarounds for some instance
variables having only readers without writers. Implement the Rex
ServerManager to start and stop the DNS service adding relevant
alias methods to the Rex::Proto::DNS::Server class.

Rex services are designed to be modular and lightweight, as well
as implement the sockets, threads, and other low-level interfaces.
Dnsruby's operations classes implement their own threading and
socket semantics, and do not fit with the modular mixin workflow
used throughout Framework. So while the updated resolver can be
seen as adding rubber to the tire fire, converting to dnsruby's
native classes for resolvers, servers, and caches, would be more
like adding oxy acetylene and heavy metals.

Testing:
  Internal tests for resolution of different record types locally
and over pivot sessions.
2018-01-12 05:00:00 -05:00
jgor 51e5fb450f Detect and return on bad VNC negotiations 2018-01-05 10:12:13 -06: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
RageLtMan d420bf1a6a Pull out HTTP-specific code from PacketDispatcher
PacketDispatcher has some hardcoded assumptions about utilizing
HTTP services as the async resource. With C2 and DNS tunnels in
the pipeline, these elements need to be separated from the core
functions of async packet dispatch and moved into their own module.

This creates a new namespace for Meterpreter::HttpPacketDispatcher,
meant to be mixed in after PacketDispatcher. The module implements
only three of the original module's methods - init, shutdown, and
the :on_passive_request callback; with the first two using :super,
with the expectation of having a PacketDispatcher mixin or API
compatible namespace already in the mix.
2017-12-28 23:37:01 -05:00
Brent Cook c2bb144d0f
Land #9302, Implement ARD auth and add remote CVE-2017-13872 (iamroot) module 2017-12-28 14:11:26 -06:00
Jon Hart 962bc71d10
Merge branch 'feature/mqtt' into feature/mqtt-login 2017-12-20 18:58:36 -08:00
Jon Hart cf21d13b2e
Resolve conflict 2017-12-20 18:58:16 -08:00
William Vu 1975713a92
Land #9333, get_cookies_parsed using CGI::Cookie 2017-12-20 20:08:33 -06:00
Jon Hart d0b3abc14b
Better handling of MQTT endpoints which don't require authentication
Arguably this is working around LoginScanner's inability to provide
blank usernames AND passwords
2017-12-20 18:02:52 -08:00
Jon Hart 2e62d77e36
Add new method for fetching parsed cookies from an HTTP response
This fixed #9332.
2017-12-20 16:19:44 -08:00
Brent Cook 3b78302868
Land #9327, restore transport enum used in TLVs 2017-12-20 16:11:04 -06:00
Jon Hart 741d08f604
Style cleanup 2017-12-20 13:33:47 -08:00
Jon Hart f15309bc48
Add basic framework for interacting with MQTT 2017-12-20 12:28:02 -08:00
Jeffrey Martin 9719ede3f0
restore transport enum used in TLVs 2017-12-20 13:12:24 -06:00
Brent Cook 32c486023c
Land #9308, Ensure tab completion in HWBridge sessions works 2017-12-20 11:29:11 -06:00
Puru bfa0cad8a5
Fix clipboard typo 2017-12-20 20:49:36 +05:45
Brent Cook 90b97d6581 Merge branch 'upstream-master' into land-9151- 2017-12-15 14:15:14 -06:00
Pearce Barry 084dc4470d
Ensure tab completion in HWBridge sessions works as expected. 2017-12-15 12:19:26 -06:00
jgor b99f044de5 Implement VNC security type 30 (Apple Remote Desktop) authentication 2017-12-14 13:57:38 -06:00
bwatters-r7 9ea7747a5c
Land #9233, Fix #9232 corruption of non-latin characters in W methods
Merge branch 'land-9233' into upstream-master
2017-12-14 11:54:36 -06:00