1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-05-26 16:53:20 +02:00

85 Commits

Author SHA1 Message Date
Tim W
0d2f0f380d whitespace fixup 2021-09-22 15:48:12 +01:00
Tim W
4f49792feb fix windows wds3_search 2021-09-22 14:51:10 +01:00
Tim W
8ec7d7b254 cleanup windows fs_search 2021-09-22 13:13:27 +01:00
Tim W
027de2be9c fix windows build 2021-09-20 19:08:06 +01:00
Tim W
949b9de394 minor cleanups on windows search.c 2021-09-20 15:38:13 +01:00
test
e43f437a2c Clarified variable names 2021-09-20 15:38:13 +01:00
test
e2f9e64779 Updated search functionality 2021-09-20 15:38:13 +01:00
test
13a1b7e0b3 Source code for searching by date 2021-09-20 15:38:13 +01:00
Tim W
dc4d69d695 fix request_fs_ls on an inaccessible file 2021-03-30 19:35:16 +01:00
OJ
effe6b9827
Lots of changes + stdapi support 2020-06-25 10:30:49 +10:00
OJ
aa3b58628f
Get rid of the clang noise 2020-06-25 10:29:51 +10:00
OJ
0e9a231e8a
First pass of CMake support (MSVC specific ATM)
This commit includes a bunch of changes that are working towards being
able to build the Meterpreter source from CMake. Changes include:

* Updated `make.bat` which does the stuff that we need.
* Removed a bunch of stuff from the python extension source tree so that
  CMake generator would not include them.
* Moved a few things around in the priv extension.
* Created `CMakeFileLists.txt` for all the projects.

There are a few hacks required in things like stdapi and kiwi to ignore
files that are on disk but shouldn't be included in the build.

Initial testing indicates that sessions run, extensions load, but some
things don't work as intended. It's a start! Still much to do.
2020-04-24 13:31:16 +10:00
OJ
4ffe127f04
Begin removing the delay-load dependency
The 'common' library has been removed. The only project that actually
used it was metsrv, so the code that metsrv required from common is now
directly compiled in as part of that project.

The common folder now contains files that are importanta cross all of
the projects, with a primary focus on the new "API" style function. What
this means is that MetSrv has an API that it exposes through a function
pointer that is passed to the extension when it's initialised. This
pointer references a structure with all the API functions wired in. This
means that:

* Extensions don't need to know anything about metsrv at compile time.
* The delay loading code can be removed, which was one of the last
  instances of "metsrv.dll" as a string.
* Metsrv.dll no longer exports any functions.

More to come.
2020-04-22 13:06:40 +10:00
Brent Cook
7e2181700a update stat struct sizes 2019-02-06 17:51:21 -06:00
Tim W
783c52e118 fix windows meterpreter ls of 4gb files 2019-01-03 13:51:39 +08:00
4ntonch3
c04408081a
Update search.c
DWORD dwResult = ERROR_ACCESS_DENIED; -> DWORD dwResult; (in functions search_all_drivers, request_fs_search)
Comments in function request_fs_search were deleted
2018-11-15 15:27:03 +03:00
4ntonch3
1bc4a4902c
Add files via upload 2018-11-13 19:51:23 +03:00
Brent Cook
a8eebd18f2 remove read-only attribute on delete 2018-01-16 10:16:03 -06:00
Brent Cook
fcf69bb7ca pass file-not-found and other errors back to the caller 2017-11-29 05:30:53 -06:00
Artem
22235e228b
Update fs_win.c
Fix Error Open File VS2017 and Add Delete not empty Folder
2017-11-02 03:43:21 +03:00
OJ
b363584648
Merge branch 'upstream/master' into transport-agnostic-packet-encryption 2017-08-08 17:37:25 +10:00
Brent Cook
94f4147425 give attribution 2017-07-22 06:15:34 -07:00
Brent Cook
9118645a6e simplify and reduce logic 2017-07-22 06:12:19 -07:00
Artem
770d0f65f4 Update fs_win.c
Fix FS Stat on Windows XP
2017-07-22 06:12:13 -07:00
OJ
3554aff9de
Remove SSL from all but the python extension
Re-implement MD5 and SHA1 file hashing using CSP.
2017-06-14 21:40:20 +10:00
Brent Cook
0a2d768e77 delete Linux meterpreter support 2017-05-14 02:11:57 -05:00
Tim
db85f099c3
stdapi_fs_file_copy 2016-11-29 13:58:46 +08:00
Brent Cook
98fae3e075 change source perms back to non-executable 2015-11-09 21:10:30 -06:00
Brent Cook
ecbcb17dec
Land , add show_mount support for Windows meterpreter 2015-10-30 15:26:33 -05:00
OJ
04cb09737e More work on the meterpreter bindings for python 2015-10-30 15:23:00 -05:00
OJ
14740bfa9c Add support for the show_mount command (windows) 2015-10-29 07:22:59 +10:00
Brent Cook
d9ce138eed remove hash sizeof workaround 2015-05-14 11:29:44 -05:00
Tim
caf6c0c6c8 add TLV_TYPE_FILE_HASH 2015-05-10 14:57:03 +01:00
OJ
fe566d5f07 Moved transport stuff from core to metsrv
Lots of transported related things were in the core library which didn't make any sense given that the only thing that needed it was metsrv. This moves the functionality out into metsrv, reformats stuff and gets rid of some dead code.

TODO: Make this work with POSIX.
2015-04-23 19:41:25 +10:00
OJ
602715aaf8 Use group packets and add curlieeees
This commit just adds the braces around single-line blocks as per our "standard". This is important, especially in the case where those single lines contain macros which could expand to multiple lines.

Also added the use of the group packet functionality to make the search result code a little easier on the eye.
2015-04-07 10:02:41 +10:00
Brent Cook
21b4064a3d normalize slashes, remove debug output 2015-04-06 07:47:27 -05:00
Brent Cook
cc2dbb2045 use size_t for wcslen results 2015-04-05 20:45:52 -05:00
Brent Cook
b1dadbb98e make search_all_drives a separate function 2015-04-05 18:41:02 -05:00
Brent Cook
5c16ddf270 avoid infinite recursion when encountering a bad symlink
reduce stack usage per level
2015-04-05 18:41:01 -05:00
Brent Cook
e1148a0bca first working unicode search
refactor a few giant functions into smaller ones
2015-04-05 18:41:01 -05:00
Brent Cook
61b19560d7 cleanups, use utf8_to_wchar 2015-04-05 18:41:01 -05:00
Brent Cook
517dcfea05 convert wds queries to use unicode 2015-04-05 18:41:01 -05:00
Brent Cook
7e017d4771 move unicode helper functions to a common place 2015-04-05 18:36:36 -05:00
Brent Cook
69d6b48e67 normalize and tidy the code a bit 2015-04-05 18:36:36 -05:00
Brent Cook
eba69cf20e add short name support to filesystem listing.
Also, fix path builder order for stat.
2015-03-18 16:05:30 -05:00
Brent Cook
e8318f8c5b correct various issues listing files
* bury common _snprintf that snuck in while testing the Windows version back
   into the platform-specific code.
 * remove now-unneeded separator defines
 * don't free a stack variable on windows
2015-03-18 02:11:13 -05:00
Brent Cook
8944ca5156 modify fs_getwd so it allocates the path 2015-03-17 15:28:27 -05:00
Brent Cook
95e102a90c cast size_t on read/write to proper result for the TLV 2015-03-17 15:27:48 -05:00
Brent Cook
7c8b723c15 convert windows filesystem operations to unicode 2015-03-17 14:32:20 -05:00
Brent Cook
f0eac5877a Refactor filesystem operations
Separate the stdapi handling code from the OS-dependent code. This makes
testing and maintaining the code easier.

This also happens to fix a number of bugs as a side-effect, because it is
clearer what is happening now.
2015-03-17 14:32:20 -05:00