1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-04-12 04:12:05 +02:00

75 Commits

Author SHA1 Message Date
Tim
015d57d0fe fix clipboard 2016-09-04 15:12:26 +01:00
OJ
a7ef4b91e3 Add powershell interactive prompt 2016-03-14 20:23:44 +10:00
Brent Cook
98fae3e075 change source perms back to non-executable 2015-11-09 21:10:30 -06:00
Brent Cook
600ed34f1e merge and cleanup @stufus's pageantjacker extension into extapi
see https://github.com/rapid7/meterpreter/pull/164 for details
2015-09-20 20:18:02 -05:00
OJ
c8de66fd31 Remove extra htonq call 2015-06-27 21:44:41 +10:00
Brent Cook
ba86e968d7 fix broken partial-batch / eof handling 2015-06-22 03:58:24 -05:00
Brent Cook
9ff7339644 move ntds parser from priv to extapi 2015-06-22 03:58:24 -05:00
OJ
e9b7ec97c0 Implement support for ssl cert verify toggling
Querying of the status of SSL cert verification is now possible. This commit allows for this to be enabled and disabled on the fly.
2015-04-06 14:42:38 +10:00
OJ
0393927159 Add extension names, enuemrators, etc
This commit contains a bunch of code tidying (formatting, spaces, naming, etc) as well as new exports for each of the modules so that the extension can be identified. The plan is for the loader to know which modules are loaded so that when stageless meterpreter fires up MSF can query the existing extensions and load the appropriate functionality on the client side.
2015-03-09 21:28:27 +10:00
OJ
5e0fbedd30 Make state destruction set pointers to NULL 2015-01-31 08:23:54 +10:00
OJ
c9d9e5978c Fix issue with double-start of clipboard
If a user attempts to start the clipboard monitor when it is already started then the code path that is taken results in the current clipboard monitor state pointers being lost. The net effect of this is that the existing monitor thread will never be shut down. Not a good thing!

This code fixes that case so that the monitor doesn't create a new monitor thread and doesn't reset important pointers to NULL.

This change also results in a "success" status being returned to the caller. This means it looks like the clipboard monitor has been started even if it was already running. I think this is acceptable and is better than an obscure error.
2015-01-31 07:00:06 +10:00
OJ
061439edb2 Final tweaks to adsi 2014-12-09 14:27:50 -06:00
OJ
76a492ab56 Fix silly typo 2014-12-09 14:27:50 -06:00
OJ
c7a8645709 Update adsi to use group functionality
Now includes group nesting which will require work on the MSF side to
fully support it. But this option is way better as we don't lose info
thanks to serialising to strings.
2014-12-09 14:27:50 -06:00
OJ
fe70c6a733 Updated service enumeration to use group tlv api 2014-12-09 14:27:50 -06:00
OJ
3aeda7ed2a Refactor group Tlv usage in window enumeration 2014-12-09 14:27:50 -06:00
OJ
e40f1a0eaf Fix missing field on x64, use packet groups
Despite rigorous testing, the x64 version seemed to be dropping a column
from the result set. This would appear to be due to the differences in
the way the x86 version of the API handles the ubound parameter of the
enumeration.

x86 ubounds are inclusive, where as x64 are exclusive. Hence in the case
of x86 we need to subtract one from the field set, but not in x64.
2014-03-21 17:22:46 +10:00
Tod Beardsley
fae26b4b3d Land , Service control support
This also wants 
2014-03-19 08:39:45 -05:00
Tod Beardsley
ef6411271b Land , adds Group Packets to Meterpreter 2014-03-19 08:39:24 -05:00
Tod Beardsley
bea18dd6f0 Land , Expand ADSI types 2014-03-19 08:39:04 -05:00
OJ
a54e37f301 Remove unused defintion 2014-03-12 06:58:47 +10:00
OJ
f7468732ec Fix incorrect comment for the WMI query function 2014-03-12 06:58:19 +10:00
OJ
49877fda24 Fix comment type and reverse ternary condition 2014-03-12 06:53:05 +10:00
OJ
f1fbf2064f Enable service control and status in queries.
This commit adds service status to the query functionality for a single
service so that it doesn't have to be found in the full list of services.

It also adds the ability for the caller to control services using the
typical start/stop/pause/resume/restart style functions. To use these
functions the caller has to have appropriate rights.
2014-03-11 14:49:19 +10:00
OJ
a4beeba7bc Rejig service initialisation
Gathering of function pointers is now done during initialisation. This
means that it doesn't have to be done each time a function is called
and allows for reuse across other functions.
2014-03-11 09:37:36 +10:00
OJ
d8f86c1806 Merge branch 'upstream/master' into wmi_query_support
Conflicts:
	make.bat
	workspace/ext_server_extapi/ext_server_extapi.vcxproj
2014-03-07 08:11:35 +10:00
OJ
a7927a4105 Added the notion of "group packets"
A group packet is a special packet that is to be used as a group of TLVs that
will live under another packet. Using this functionality means that we can
easily nest groupings of data to arbitrary depths, which wasn't something we
were able to do before easily.

The MSF side is easily capable of handling this scenario, but this side had
always been lacking.

The clipboard dump code has been updated to show how this can be used.
2014-03-04 19:38:15 +10:00
OJ
62140f8fa1 Pulled in master and added a fallback for the SID stuff
I just realised I shouldn't have done that in a merge commit.

Conflicts:
	workspace/ext_server_extapi/ext_server_extapi.vcxproj
2014-02-28 13:32:37 +10:00
OJ
256e43cde3 Change the binary->string converter, add SID, warnings as errors
The existing implementation wasn't really solid and I never liked it
anyway. Egypt rightfully pointed out flaws in the code, so it has
been changed so that it allocates the required memory up front
and returns that string to the caller, who then has to free it up.

Added a function to render SIDS.

Made the build set warnings as errors. Still no idea why this wasn't
the case already.
2014-02-28 13:21:33 +10:00
OJ
ce9cfa6c2e Fix silly typo in header comment 2014-02-21 13:01:59 +10:00
OJ
94468e1313 One last tweak to remove all evidence of stupidity 2014-02-05 23:06:10 +10:00
OJ
cca2f14835 Fix number of issues revealed in x64 testing
Thanks to sinner being on the ball, x64 was broken and causing some
crazy things to happen. The CPU would peg at 100% despite x86 being
quite happy. It turns out, I suck at C, so I had to fix that up.

This commit includes the following changes:

* Fix up the WNDPROC callback so that the parameters are in the right
  order.
* Specify the correct array size for wait handles in the monitor thread.
* Add extra debugging.
* Handle WM_* messages correctly and add WM_NCCREATE.
* Correctly use the CREATESTRUCT to pass in the state.

"How on earth did this ever work?"

Fixed now, thanks again sinner!
2014-02-05 22:37:55 +10:00
OJ
2cebe3c19e INCLUDE the resume event in the monitored array
I am clearly stupid. How did this ever work? This change tells the
wait call to include the signal handle for the resume event.
2014-02-05 07:54:08 +10:00
OJ
2c56a1bcb1 Add documentation to the functionality 2014-01-29 15:51:57 +10:00
OJ
54b596674d Add purge and dump functionality, remove dup caps
This no longer captures duplicate content if the user does the same
thing twice.
2014-01-29 14:51:27 +10:00
OJ
3ec5aaca3f Fix small indexing issue resulting in a crash 2014-01-23 10:19:33 +10:00
OJ
5b1007e940 Merge branch 'upstream/master' into clipboard_monitor
Conflicts:
	source/ReflectiveDLLInjection
	source/extensions/extapi/extapi.c
	source/extensions/extapi/extapi.h
	workspace/ext_server_extapi/ext_server_extapi.vcxproj
2014-01-22 22:53:29 +10:00
OJ
2918920b15 Handle NULL values when clipboard is cleared 2014-01-22 22:49:03 +10:00
OJ
d691124cd3 Changes and tweaks to make clipboard monitor work 2014-01-22 22:07:33 +10:00
OJ
e12b0e2dce Add a bit of debug info 2014-01-22 10:31:16 +10:00
OJ
3cde9b69c2 Update ADSI code to support more types
When non-supported types were returned in queries, ADSI just pooped
itself and tore down the Meterpreter session. This a happy tester
Meterpreter does not make!

This code includes more support for ADSI types with attempts to be
semi-sane in stringifying them.

Plus, Meterpreter no longer crashes.
2014-01-22 10:09:42 +10:00
OJ
da194e07b4 Add error message return support
The errors returned still aren't nice though.
2014-01-17 11:43:32 +10:00
OJ
0472814b7f Last tweak to x64 for WMI 2014-01-17 09:13:08 +10:00
OJ
316ae95ac8 Last part of WMI support
There's some messy code in here, but that's what you get for dealing
with COM and nested variant arrays!
2014-01-16 21:48:33 +10:00
OJ
af5d6bd908 First pass of WMI support
Not quite working, but a good deal done.
2014-01-16 13:34:15 +10:00
OJ
d7b0e6d3fd Default to a sensible page size if not given 2014-01-07 17:19:53 +10:00
OJ
fda91a3f1d Last debug code, force valid result
Sometimes results can be success values but not S_OK, so this change
contains code which will force the result to S_OK in those cases so that
the caller doesn't get an indication which makes it believe that there is
an error.
2014-01-05 19:59:43 +10:00
OJ
e0da82d12b Extra debug info, force adsi limit
The ADSI API is supposed to support the notion of only returning
a fixed number of results from AD when we specify the
ADS_SEARCHPREF_SIZE_LIMIT value in the search parameters, but it
doesn't appear to do that (at least not my Win2k setup).

This change includes a bit more debugging output and keeps track of
the number of rows processed so that the maximum site is actually
honoured.
2014-01-05 19:46:52 +10:00
OJ
fa685928ed Fix incorrect comment 2014-01-03 13:39:28 +10:00
OJ
015c92ddf6 Merge branch 'master' into basic_asdi_support
Conflicts:
	source/ReflectiveDLLInjection
2013-12-20 10:36:48 +10:00