Commit Graph

5658 Commits

Author SHA1 Message Date
Spencer McIntyre e72035f1a3 Support AES-128-CBC as an additional option for TLV encryption 2020-06-29 14:19:43 -04:00
Adam Galway babaee8c8e adds debug command with spec tests 2020-06-29 15:38:56 +01:00
Spencer McIntyre 26cbfa5d56 Land #13417, SMBv3 integration with Framework 2020-06-24 14:09:11 -04:00
OJ 3548a839b5 Java-related UINT command ID generation 2020-06-24 08:11:16 +10:00
OJ d14dac26ec Support removal of TLV strings
This first bit of code aims to add a "map" to the packet functionality
that is able to translate to and from "method strings" to "command ids".
IDs are sent across the wire, and they're now integers. This removes the
need for the strings to be present in things like native meterp, and
hence makes things a little less obvious on the wire, and way less
obvious on disk/in the payload.

Given that we need this functionality in other Meterpreters to support
the removal of strings, some code has been added that can generate
source files for Python, C# and C. This code might move, but for now
it's at least in a spot where it's used the most.
2020-06-24 08:10:54 +10:00
OJ 975ee313ff Add support for custom name/ordinal for RDI 2020-06-24 08:01:30 +10:00
Alan Foster 2439342aba Add consistent error logging for module loading 2020-06-23 11:15:08 +01:00
Adam Galway 1a2bf98222 creates standard elog & updates exisiting usages 2020-06-22 12:48:39 +01:00
Spencer McIntyre efbff6faa0 Land #13400, Change from PEM to DER for crypt TLV negotiation 2020-06-19 11:58:32 -04:00
Christophe De La Fuente 37a55b11b4 Fix issues on Mac OS X
- Update the SimpleClient#create_pipe permission from 'c' (FILE_OPEN_IF
  disposition: Open the file if it already exists; otherwise, create the file)
  to 'o' (FILE_OPEN disposition: If the file already exists, return success;
  otherwise, fail the operation).
- Remove the random offset in Rex::Proto::DCERPC::Client#write (evasion). This
  is strictly prohibited by the protocol and break on MAC OS X
2020-06-16 19:25:26 +02:00
Spencer McIntyre 7fe191a43c Land #13529, Remove the old Mimikatz extension 2020-06-16 10:36:23 -04:00
Spencer McIntyre 6ca33689ff Fix two minor errors in the powershell_session_remove command 2020-06-10 16:36:11 -04:00
Christophe De La Fuente 98ac51dd5d Improvements from code review 2020-06-09 14:18:52 +02:00
Christophe De La Fuente 24c20fe7d7 Update SimpleClient #open logic for RubySMB 2020-06-09 14:18:52 +02:00
Christophe De La Fuente 04a44d2334 Improve client error/warning/debug messages 2020-06-09 14:18:52 +02:00
Christophe De La Fuente 474d7ebbab Update SMB client
- Add SMB::AlwaysEncrypt option
- Force SMB1 for SMB fingerprint
- Update smb_netshareenumall
2020-06-09 14:18:51 +02:00
Christophe De La Fuente 6ab47eb001 Update SMB Client and SimpleClient
- multiple protocol version negotiation
- SMB 1, 2 and 3 by default
- add SMB::ProtocolVersion option to SMB Client mixin
2020-06-09 14:18:51 +02:00
OJ d1cfbb0982 Removal of unnecessary local var 2020-06-09 10:34:50 +10:00
OJ 6170f497b6 Fix TLV types and remove ones that no longer exist 2020-06-09 10:34:10 +10:00
OJ 209e463c84 Pass DER-encoed public keys instead of PEM
Just to reduce the more obvious thing going across the wire (ie. no more
"BEGIN PUBLIC KEY"). We now see binary blobs.
2020-06-09 10:34:04 +10:00
OJ 48290ac38a Fix a stupid mistake with core_patch_url
This was not originally ported to an int when it should have been.
2020-06-09 08:58:27 +10:00
OJ 10529c8b7a Fix silly typo in the android extension dispatcher 2020-06-09 08:58:27 +10:00
OJ b9013e32fa Re-remove the filter on the sniffer extension
Not sure why, but this is causing issues. Gross.
2020-06-09 08:58:27 +10:00
OJ 19f771f6ec Fix missed cases of method strings 2020-06-09 08:58:27 +10:00
OJ c08e86434b Fix more specs 2020-06-09 08:58:27 +10:00
OJ 616fdaeb60 Fix up packe spec tests 2020-06-09 08:58:27 +10:00
OJ 2ed4fa251f Somehow lost a bang!
Thanks @sempervictus
2020-06-09 08:58:26 +10:00
OJ 1fd771c092 Remove networkpug
This thing doesn't exist any more, so no need to have code referencing
it.
2020-06-09 08:58:26 +10:00
OJ 364b7fac49 Refactor of command ids into separate files 2020-06-09 08:58:26 +10:00
OJ 8070074da3 Almost final refactor of how IDs are handled 2020-06-09 08:58:26 +10:00
OJ d87cb8ca63 Java-related UINT command ID generation 2020-06-09 08:58:26 +10:00
OJ 641f298819 Support removal of TLV strings
This first bit of code aims to add a "map" to the packet functionality
that is able to translate to and from "method strings" to "command ids".
IDs are sent across the wire, and they're now integers. This removes the
need for the strings to be present in things like native meterp, and
hence makes things a little less obvious on the wire, and way less
obvious on disk/in the payload.

Given that we need this functionality in other Meterpreters to support
the removal of strings, some code has been added that can generate
source files for Python, C# and C. This code might move, but for now
it's at least in a spot where it's used the most.
2020-06-09 08:57:40 +10:00
cn-kali-team 430e06f218 Simplify code 2020-06-03 20:23:25 +08:00
cn-kali-team a55fef053c add docs 2020-05-29 01:16:29 +08:00
OJ 752119e7f2 Add a temporary redirect from mimikatz->kiwi 2020-05-28 13:42:27 +10:00
OJ 4d57f52565 Remove the mimikatz extension 2020-05-28 12:34:44 +10:00
cn-kali-team 1d39112fc7 NetSarang Encryption Decryption parser 2020-05-27 19:52:51 +08:00
Spencer McIntyre 5bb109c41a Add a dlog line when an incomplete packet is requeued 2020-05-19 10:37:26 -04:00
OJ aac9173497 Update the changes with some commentary
I renamed the queues as well.
2020-05-19 08:07:48 +10:00
OJ ea552c414f Remove from iqueue instead of pqueue 2020-05-16 02:22:53 +10:00
OJ ef172086e5 Prioritise incomplete packets in the dispatch loop
In certain cases, packets would arrive before their handlers were ready
to handle them. This resulted in packets going into the incomplete list
and being re-queued into the packet input queue. This is a problem when
MORE packets arrive while processing because the older packets end up at
the end of the queue instead of the start of the queue. This means newer
packets are processed FIRST, and hence we have an out-of-order
sequencing problem.

This commit adds an "incomplete queue" which gets prioritised over new
packets. If packets are incomplete at any point, they are added to this
queue, and are dequeued prior to the new packet queue. This results in
packet sequences being maintained.

This was causing issues with things like port forwards. BUT NOT ANY
MORE!
2020-05-16 01:58:53 +10:00
bwatters-r7 6fae8f0ad4 Land #13358, Fix packet ordering check
Merge branch 'land-13358' into upstream-master
2020-05-08 13:23:27 -05:00
Spencer McIntyre 9769e04b6e Land #13322, CVE-2020-0668 Service tracing file junction overwrite 2020-05-07 09:47:20 -04:00
Alan Foster 61e17d3a2c Land #13406, Fix multiple DNS enumeration related bugs 2020-05-07 10:38:07 +01:00
Spencer McIntyre 73994ece12 Fix send_(tc|ud)p method signatures to match parent class
Rex::Proto::DNS::Resolver inherits from Net::DNS::Resolver however it
changes the signature of the send_tcp and send_udp methods, making it
break when a method from the parent class (such as #axfr) is called.
2020-05-05 16:54:32 -04:00
dwelch-r7 6ebcf950f6 Land #13392, Fix rex http client warnings 2020-05-05 20:35:45 +01:00
Alan Foster d5ca2e54bb Fix ruby 2.7 rex http client warnings 2020-05-04 19:32:16 +01:00
Spencer McIntyre 53359a5b4c Land #13325, Expand Environment Variables In Meterpreter's ls Command
Fixes #13318
2020-05-01 09:04:19 -04:00
cn-kali-team bea51d9d9a Using PATH_EXPAND_REGEX 2020-05-01 07:18:47 +08:00
OJ ae185d7ef7 Re-add the additional pop call
`pop` blocks the thread. This is important, otherwise CPU SPIKES.
2020-04-30 17:39:12 +10:00