Commit Graph

16101 Commits

Author SHA1 Message Date
Brent Cook 0ed09cc9bf
Land #11927, Add Brocade post module and config parser 2019-09-24 05:59:21 -05:00
Brent Cook b668e1fa5b
Land #12283, Add exploit module for CVE-2019-0708 / BlueKeep 2019-09-23 11:22:36 -05:00
Brent Cook 5b36b6ed71 add docs, simplify some areas 2019-09-23 04:50:54 -05:00
Brent Cook 0715b7688a use client_random, add notes 2019-09-22 17:20:58 -05:00
Brent Cook 0d34de7d2f support sending license requests 2019-09-22 16:47:08 -05:00
Brent Cook 963489e196 add further license PDU parsing 2019-09-20 08:15:07 -05:00
Metasploit 6d1ee46bba
Bump version of framework to 5.0.50 2019-09-19 12:04:38 -05:00
Brent Cook 3174af03e4 add initial license packet handler 2019-09-19 06:09:41 -05:00
Brent Cook d2da56bd90 use specified RDP_CLIENT_NAME 2019-09-19 06:05:08 -05:00
Spencer McIntyre 0a05ee6577 Use the rdp connect/disconnect methods for WinXP 2019-09-19 06:05:08 -05:00
Brent Cook ab631044af adjust rdp fingerprint code to match self.rdp_sock changes in exploit mixin 2019-09-19 06:05:08 -05:00
OJ f479ed2d73 Small refactors, comments and tidying up 2019-09-19 06:05:08 -05:00
OJ edcc423eea Lots more RDP mixin changes, and first pass of ruby exploit
This code is at the point where we SHOULD see a crash (given that the
payloads in use for kernel/user are both just As and Bs (deliberate at
this point).

Unforunately the exploit does not result in a crash. Things just keep
on going! I've looked at the difference in the traffic across the two
different exploits (py and rb) and what's clear is that the mixin is
doing a lot more work at the start.

Also, the mixin generates packets of smaller size in the way that it
encodes data (ie. it doesn't always use 2 bytes for a short value, it'll
use 1 instead if only 1 is required).

Pretty sure that the size issues aren't the problem, I think there's
something else in play. I'm at the point where diving into the RDP stuff
even more isn't inspiring so I'm hoping that opening this up to collab
will help us move forward.
2019-09-19 06:05:08 -05:00
OJ 1d6e319ac2 Refactor of RDP mixin to make it more configurable
Slowly moving away from a huge hard-coded blob of inflexible bytes
towards a more data-driven approach that allows configuration of various
elements of the packets that are generated.
2019-09-19 06:05:08 -05:00
OJ eb9088a588 Refactor RDP mixin to hide socket details
When dealing with the RDP mixin it makes more sense to not expose
TCP-level things, instead it's better to talk RDP. This changeset makes
it so that consumers of the RDP mixin talk RDP only. They can access the
socket through the `rdp_socket` member if required, but the changes made
here mean they don't have to. Ultimately, this new member should be
`private` instead of `protected`, but I'm leaving it like this for now
in case it is required down the track.

I've also made the assumption that all RDP connects want TCP_NODELAY
set. This might be wrong, but I don't think it is.

From here, users can call `rdp_connect` and `rdp_disconnect` to manage
connectivity to the RDP endpoint. The `rdp_connect` function does not
register the TCP client socket as the global `sock` member on the TCP
module instance, this is to prevent the mixin from clashing with other
users of the TCP client in a given module.
2019-09-19 06:04:58 -05:00
James Lee 440c82b3e2
Fix broken `ps1` and `powershell` transform 2019-09-18 12:20:16 -05:00
Metasploit 18f21bb3a7
Bump version of framework to 5.0.49 2019-09-16 09:21:03 -05:00
Tim W 4d9780f070
Land #12239, fix search path separator 2019-09-13 17:08:57 +08:00
Metasploit f48a065d6d
Bump version of framework to 5.0.48 2019-09-12 12:05:18 -05:00
bwatters-r7 6703e9b06b
Land #11984, add meterpreter keyevent api for virtual key strokes
Merge branch 'land-11984' into upstream-master
2019-09-10 14:32:43 -05:00
Brent Cook 73eab2c34a
Land #12286, RDP lib: lower SSL security level for compatibility with older implementations 2019-09-09 23:11:15 -05:00
h00die d25d8e77b8 12291 sempervictus words 2019-09-07 23:54:19 -04:00
Clément Notin 579ea56f3b
RDP_TLS_SECURITY_LEVEL default value is 0 (less secure) 2019-09-07 18:39:59 +02:00
Clément Notin 49a991891c
Add RDP_TLS_SECURITY_LEVEL advanced option 2019-09-07 17:19:59 +02:00
Brent Cook a985da9318 expand scope of errors caught to include all StandardErrors 2019-09-07 07:38:37 -04:00
Brent Cook 1d91e7f53c make payload generation failures at boot time non-fatal
Currently, if any payload fails to generate that has a dynamic size, it causes a Framework instance to throw an exception on start. This can happen for a number of reasons, and more often than not it is enviromental (files missing, Y2k38 bugs, etc.). Instead of failing entirely, catch the exception and log as an error, don't register the payload, but continue booting.
2019-09-07 07:21:40 -04:00
Clément Notin d4e2ac696a
RDP lib: lower SSL security level for compatibility with stock Win7 2019-09-07 01:17:22 +02:00
bwatters-r7 e2815a997b
Land #12251, Unify SSL cert generate interfaces
Merge branch 'land-12251' into upstream-master
2019-09-05 16:45:31 -05:00
Metasploit ea6ab34c32
Bump version of framework to 5.0.47 2019-09-05 12:13:53 -05:00
Adam Cammack 2ee5ec97e4
Use smallest stager size
Since these stagers can shrink based on the expected size of the next
stage, do our best to anticipate a small size. This makes the cached
payload size consistent for now, though if the x64 mettle stager grows
past 128 bytes I think we'll see the stager start oscillating in size
again. If you run into that and are reading this, sorry :(
2019-09-04 16:06:44 -05:00
Adam Cammack bb0f1b02ac
Fully golf the x86 read size 2019-09-04 14:54:48 -05:00
RageLtMan 04e750024c Clean up linux/x86/rev_tcp asm per acammack
Push read_size to edx as suggested by Adam, optimize shellcode a
bit by selecting using dx instead of edx for sizes under 64K.

Testing:
  Internal only, creates session on every try instead of every 5th.
2019-09-04 01:51:54 -04:00
RageLtMan 80522a5712 Clean up linux/x64/rev_tcp asm per acammack
Address Adam's comments on the PR - remove redundantly pushed
size from mmap section.
2019-09-03 15:01:52 -04:00
Clément Notin 72672c82f9
Fix syntax 2019-09-03 15:17:28 +02:00
RageLtMan 97943261ed Linux x86 reverse_tcp should read known # of bytes
See notes for x64.

This part does not appear to be working properly yet - stages
generated with this commit recv 102b on the first call to read(),
but subsequently things seem to go off the rails after the
intermediate stage is loaded.

Needs testing and fixup at present for x86 (no worse than before
in terms of success rate however).
2019-09-03 01:55:12 -04:00
RageLtMan 05944ba8c1 Linux x64 reverse_tcp should read known # of bytes
The linux x64 reverse tcp stager is hardcoded to read 4K off the
socket. When a small intermediate stager is used, this can result
in reading part of the next stage as well, which means that the
intermediate stager will never recv the # of bytes it needs and
hang indefinitely.

Break out the mettle piece to use separate methods for assembly and
binary payload generation as well as actually putting the product
on the existing session socket.

Change the first part of the stage to check for the intermediate
stager generation method, and use the size of the produced stager
in the recvfrom call or fall back to the prior 4K read size.

Testing:
  None yet

Ping @bcook-r7, @acammack-r7, @OJ, @ZeroSteiner
2019-09-03 01:27:27 -04:00
Metasploit ea14054c0d
Bump version of framework to 5.0.46 2019-08-30 16:09:29 -05:00
Adam Cammack b98327472a
Correct realname calls in the cache to fullname 2019-08-30 15:38:45 -05:00
Metasploit 378b685478
Bump version of framework to 5.0.45 2019-08-30 14:15:42 -05:00
William Vu 2ea5e90764
Land #12223, module deprecation by alias 2019-08-30 11:36:50 -05:00
Adam Cammack 991639c493
Unify SSL cert generate interfaces
After this and rex-socket#19 the interfaces should be compatible again.
2019-08-30 00:01:55 -05:00
Metasploit c00ef799b4
Bump version of framework to 5.0.44 2019-08-29 12:11:39 -05:00
Clément Notin caafac3455
meterpreter, fs/file.rb: use client's separator instead of '\\' 2019-08-27 18:12:47 +02:00
Clément Notin f8b7100565
meterpreter UI, fs.rb: use client's separator instead of '\\' 2019-08-27 17:58:51 +02:00
Adam Cammack bcccfd86b8
Teach module cache about `realname`
Also uses the class refname where appropriate since an instances refname
reflects the alias currently in use and if a module is reloaded while
using an alias the old behavior would generate spurious cache entries
that would not be cleaned up or modified. Specifically, this could
register a self-referential alias that would cause a stack overflow when
trying to `use` such an alias.

Additionally, some other `fullname`s were changed to `realname`s for
clarity.
2019-08-26 13:26:48 -05:00
Adam Cammack 6a8f6d7a57
Unify spec and lib 2019-08-22 18:03:13 -05:00
Adam Cammack 948918dacb
Use alias when reloading aliased module
Also speeds up module reloads by avoiding module instance creating
without a type.

Fixes #12026
2019-08-22 17:58:20 -05:00
Adam Cammack d8e8a33b46
Rewrite Msf::Module::Deprecated w/ alerts, aliases
Less janky, and allows module moves without copying!
2019-08-22 17:58:20 -05:00
Adam Cammack 969ad7aa8a
Add Msf::Module::Alert for alerting users 2019-08-22 17:58:20 -05:00
Metasploit 1c4d9cfff6
Bump version of framework to 5.0.43 2019-08-22 10:08:14 -07:00