1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-02-22 03:19:04 +01:00

473 Commits

Author SHA1 Message Date
OJ
cc862ea96e Final fixes to previous mistake 2013-11-06 20:07:12 +10:00
OJ
0656a34115 Last tiday of extapi project file 2013-11-06 19:53:37 +10:00
OJ
419078c966 Remove final warning from the build 2013-11-06 19:44:10 +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
524b61eb80 Update to VS2013
This brings things up to date with the VS2013 main line.
2013-10-29 20:07:10 +10:00
OJ
ae71841817 Merge branch 'vs2013' into ext_server_extapi 2013-10-29 20:05:18 +10:00
OJ
288b2bad41 Upgrade to VS 2013 2013-10-29 13:46:46 +10:00
Tod Beardsley
91f96cb394 Explicitly apt-get update every time?
Trying to fix the failing travis build,

https://travis-ci.org/rapid7/meterpreter/builds/13001986
2013-10-24 15:40:40 -05:00
Tod Beardsley
6a446637b5 Land #32, strcpy cleanup
Housekeeping against potential BOFs.
2013-10-24 14:07:38 -05: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
6f8a2755f1 Better errors when formatmessage fails in railgun
Previous change stopped the session from crashing on NULL, but this change
actually has more realistic messages coming back intead of always
indicating that things happened correctly. It's still up to the caller to
check the return code to make sure it's ok
2013-10-18 07:23:50 +10:00
OJ
4a6661bd0a Fix railgun crash on XP SP3
Fix issue where the railgun API was relyling on FormatMessage returning a
valid pointer when the error is `ERROR_SUCCESS`. On some platforms, such
as XP SP3, the function would return a NULL pointer for this case. This
fix makes sure that in the case of a NULL pointer the error message is set
to a value that matches that found on other platforms.

[FixRM 8505]
2013-10-17 20:25:25 +10:00
James Lee
259545172f Whitespace 2013-10-16 20:03:47 -05:00
James Lee
648d341588 Land #29, new 'bare' extension
Replaces 'boiler'
2013-10-16 20:00:06 -05:00
James Lee
12140d10b4 Land #31, doxygen 2013-10-16 19:44:03 -05:00
OJ
29ffd4c1d1 Fix exclude config to ignore unnecessary content
Updated to use `EXCLUDE_PATTERNS` instead of `EXCLUDE_PATHS`. This
properly excludes the source of the libraries we use and also the
generated output on POSIX.

Thanks again to @jlee-r7 for the catch.
2013-10-17 10:39:13 +10:00
Tod Beardsley
1fc10a8664 Resolve PR #31 conflict
Conflicts:
	.gitignore
2013-10-16 09:39:47 -05: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
9feec64d96 Remove strcpy calls, proper use of strncpy/strcpy_s
Replaced all usages of `strcpy` with `strncpy` or `strcpy_s`.

Make sure that all usages of `strncpy` specified the correct buffer size.
2013-10-16 11:55:29 +10:00
OJ
4b0a6a5102 Update .gitignore to avoid conflict 2013-10-16 08:43:56 +10:00
Tod Beardsley
23019408d1 Correct links for source and framework 2013-10-15 09:29:56 -05: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
OJ
a61bbc5a7d Add child window enumeration and flag
Enumeration of child windows is now possible if the appropriate TLV is
included in the request message.

Inclusion of "unknown" windows is also possible now, again if the
appropriate TLV is included.
2013-10-15 17:52:51 +10:00
OJ
2c865a4a37 Documented base.* and core.*
Big job, this documentation lark. Also modified the prototype the
packet_is_tlv_null_terminated function, which used to take a Packet
instance as well as the TLV, but never used the packet in its
implementation.
2013-10-15 16:14:39 +10:00
OJ
a2407de59a Update the build icon URL
Now that @bturner-r7 has got the CI going on metasploit.com the build
icon needs to point to the new server.
2013-10-15 10:12:53 +10:00
OJ
984880d8b2 Add service_query to ext_server_extapi
Once the user has queried the list of services they can now use the
`service_query` function to get more detail about a specific service.
2013-10-11 01:01:47 +10:00
OJ
f720ca7bdb Add service_enum to the ext_server_extapi extension
This commit adds the ability to enumerate services on the target machine,
showing the PID, the service name, the display name and an indication of
the service's ability to interact with the desktop.

Some other small code tidies were done too.
2013-10-10 21:20:23 +10:00
OJ
2902bf3406 Free up user32 when we're done with it 2013-10-10 18:31:22 +10:00
OJ
52e13ad2d3 New extended API extension with window enum
Decided to kick off a new extended API extension with mubix and
kernelsmith to include some more advanced enumeration stuff. The goal of
this extension is to take stuff that wouldn't be part of the std api but
is rather useful for enumeration of a target once meterpreter has been
established.

This commit kicks things off with enumeration of top level windows on the
current desktop.
2013-10-09 22:16:47 +10:00
OJ
35aada915f Fix debug build of various components
No idea why they were broken, but they shouldn't have been. This fixes
them up and tidies a few other things up, especially the guts of the
stdapi project.
2013-10-09 17:20:58 +10:00
OJ
bab7340a3f Doc changes, project fixes 2013-10-09 15:54:39 +10:00
OJ
7f2fc483dc New ext docs, remove boiler from solution
Documentation now includes how to create a new extension using the bare
extension as a sample.
2013-10-09 15:26:19 +10:00
OJ
a10ee71e1c Remove boiler extension and create 'bare' extension
The boiler extension wasn't used and was old so it was removed. I've added
a new "bare" extension which is, as it says, just bare and doesn't do
anything. This can be used to create new extension projets just by copying
and pasting, then editing a couple of small things.

This will be added to the documentation.
2013-10-09 15:08:09 +10:00
OJ
ebf13ffaa7 Even more docs 2013-10-04 18:03:35 +10:00
OJ
a143c274e6 More documnetation work 2013-10-04 14:41:00 +10:00
OJ
ea3b9155b2 Fix railgun multi functionality
The main issue with things being broken was because the calling
convention was not defaulting to "stdapi" and hence the call would
fail. Adding the default fixed it.

While fixing this, I brought the mulit-call functionality up to speed
with the error message functionality, so the calls all return the
properly formatted error message.
2013-10-04 12:01:59 +10:00
James Lee
50b7557290 Land #26, Railgun error messages
See rapid7/metasploit-framework#2443 and rapid7/metasploit-framework#740
2013-10-01 16:39:01 -05:00
Tod Beardsley
adbb8ad2ce Don't lie in the README.md 2013-09-30 16:18:57 -05:00
Tod Beardsley
f629cc4b89 Land #22, more doc and proj updates
Again, tested with a successful run of the build.
2013-09-30 16:16:39 -05:00
Tod Beardsley
0406a2f336 Land #20, update docs and project files.
Tested by merging and running a build, as proscribed by the README.md.
12 succeeded, 0 dailed, 2 skipped.
2013-09-30 16:15:31 -05:00
jvazquez-r7
864917b32d Land #24, @OJ's patch to add posix depends .gitignore 2013-09-26 18:22:40 -05:00
jvazquez-r7
07a45634bb Land #21, @OJ's fix for PIP_ADAPTER_PREFIX Length check 2013-09-26 17:46:32 -05:00
OJ
60b4a5778d Better fix for the XP SP0 problem
Thanks to @jvazquez-r7 doing some investigation we have a better solution
to this crash. This commit implements this fix and removes the need to
check the status of the memory that's being read.
2013-09-27 08:32:31 +10:00
OJ
78d4dc0c7b Add posix temp folder to gitignore 2013-09-26 15:29:33 +10:00
OJ
08793782d1 Add doxygen, begin documenting, kitrap0d tidy
* Added the doxygen binaries and configuration.
* Added a `make docs` which generates documentation to the `docs` folder.
* Added some documentation to various areas of the source that I was
  working with. Over time I'll be adding more and more rather than trying
  to do it all in one hit.
* Refactored the kitrap0d code a bit to try to reduce code size.
2013-09-26 14:29:46 +10:00
OJ
895a580cb5 Last code tidy for the kitrap0d fix
Tidies up the API to be more intuitive, including conversion of the
first parameter to a char pointer (removing MAX_PATH) and renaming
the second parameter to be more indicative of what it means.

Thanks to @jvazquez-r7 for the great discussion!
2013-09-26 11:35:05 +10:00