1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-04-24 10:09:49 +02:00

24 Commits

Author SHA1 Message Date
OJ
c8aa435b3c
Finally removed delay loading from the last extension: extapi 2020-04-22 13:06:49 +10:00
Brent Cook
0a2d768e77 delete Linux meterpreter support 2017-05-14 02:11:57 -05:00
Tim
015d57d0fe fix clipboard 2016-09-04 15:12:26 +01:00
OJ
c8de66fd31 Remove extra htonq call 2015-06-27 21:44:41 +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
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
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
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
6d68699012 Add basic clipboard monitor plumbing 2013-11-22 13:28:14 +10:00
OJ
79ac562f9f Added stops for monitoring
Small commit to save interim work, way more to come.
2013-11-22 13:27:43 +10:00
OJ
b5a6bc9e80 Proper DIB offset calculation
This fixes the issue where the calculation for the offset of the image
data was incorrect. Instead of just looking at the first byte past the end
of the BITMAPINFOHEADER we now correctly calculate the offset past the
color palette and begin reading the image there. This stops the problems
where sometimes the image looked like it had been shifted, or other cases
where the image colors went retro.
2013-11-03 11:09:51 +10:00
OJ
6b1209b147 Add support for optional image download
Change includes fixes which allow for images to be downloaded optionally.
The user can specify -d to get the image. Image dimensions are shown as
well.
2013-11-02 23:05:02 +10:00
OJ
89685df6c8 Add Doxygen documnetation to extapi 2013-11-02 21:35:46 +10:00
OJ
1108917ae6 Adjust format to fit with default VS 2013 rules
VS 2013 appears to have built-in formatting for C++, so this commit tidies
up the code a bit to fit within those rules.

It also removes a few warnings which the new compiler has shown.
2013-10-29 20:36:31 +10:00
OJ
aca306f8ce Implement CF_DIB support
The clipboard code now supports the `CF_DIB` format on the clipboard. When
found, it takes the data and uses GDI+ to convert it into a JPEG. GDI+ was
used because:

* It's on every Windows machine from XP SP0 onwards (Win2k doesn't work).
* It requires linking to a small gdiplus.lib instead of a massive jpeg
  library.
* It's a really easy interface to use that interops easily with the
  Windows bitmap header information structures.

I think it'd be worth considering this approach for the other screenshot
applications as well, as it'd reduce the jpeg lib dependency and simplify
the codebase.
2013-10-21 00:02:16 +10:00
OJ
4eb8accc11 Add size (bytes) of the files on the clipboard 2013-10-16 22:53:45 +10:00
OJ
0eb2063c91 Add support for CF_HDROP to clipboard handling
Lists of files can now be downloaded from the clipboard. Downloading of
the files themselves is something that should be done by MSF as that's
already built in.
2013-10-16 17:43:14 +10:00
OJ
123010c76b Add clipboard text get/set functionality
This commit adds the beginnings of clipboard munging support. Getting and
setting of text-based data is supported. Over time, more formats will be
supported.
2013-10-15 23:55:46 +10:00