1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-01-08 14:36:22 +01:00
Commit Graph

99 Commits

Author SHA1 Message Date
Spencer McIntyre
f9e62ba042 Add a Debug configuration to include debug logs 2020-12-18 16:07:04 -05:00
OJ
fdb785dcee
Few more build fix ups and removal of warnings 2020-06-25 10:30:53 +10:00
OJ
effe6b9827
Lots of changes + stdapi support 2020-06-25 10:30:49 +10:00
OJ
e6441ad2fa
Remove DLL exports from Meterpreter
Add support for loading RDI-related stuff using ordinals instead of
function names. Remove exports from the extensions/etc. This is another
step in the direction to make the DLLs less obvious.

Extensions no longer have their own name in the library metadata.
They're all "extension.dll". Metsrv is now "server.dll" and the two
non-extensions are "plugin.dll". I was going for something a little less
obvious.

This required changes to the RDI functionality.
2020-06-25 10:28:36 +10:00
OJ
ab36130546
Fix Release build def files 2020-06-22 08:25:49 +10:00
OJ
c9ca614313
Remove DLL exports from Meterpreter
Add support for loading RDI-related stuff using ordinals instead of
function names. Remove exports from the extensions/etc. This is another
step in the direction to make the DLLs less obvious.

Extensions no longer have their own name in the library metadata.
They're all "extension.dll". Metsrv is now "server.dll" and the two
non-extensions are "plugin.dll". I was going for something a little less
obvious.

This required changes to the RDI functionality.
2020-06-22 08:25:30 +10:00
OJ
3dbff1e401
Clean and working builds with CMake 2020-04-24 13:31:34 +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
24e6067b51
Update RDI, remove metsrv references/libs from extensions 2020-04-22 13:13:56 +10:00
OJ
eb81e43b03
Remove the common vcxproj and all references to it 2020-04-22 13:06:49 +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
OJ
23b7a7b9ad
Finalise support for building on all the toolsets. 2020-04-21 09:37:11 +10:00
OJ
74c9c79892
Enable multie-CPU builds
Added /MP for parallel builds, and removed precompiled headers as /Yc
isn't compat with /MP.

Not enabled for the Powershell extension because of it's .NET-ness.
2020-04-16 15:30:17 +10:00
OJ
100ffd6d5b
First round of VS2019 changes 2020-04-14 10:28:08 +10:00
Tim W
01d8aacc0f audio output for windows 2018-07-14 23:40:34 +08: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
OJ
2b9aac9c45
Add support for listing of loaded drivers 2016-10-04 11:30:12 +10:00
OJ
bd5ecc8acd Remove all debug builds from the Windows projects
The debug builds of Meterpreter compiled fine, but the resulting binaries were never functional. No debugging is really ever done with the debug builds anyway, so instead of carry them forward, this commit removes both `debug` and `r7_debug` from the source.
2015-11-03 11:05:42 +10:00
OJ
14740bfa9c Add support for the show_mount command (windows) 2015-10-29 07:22:59 +10:00
Brent Cook
9a71a575b7 use OpenSSL with Windows builds for now
LibreSSL does not yet work well with Windows meterpreter for 2 reasons:
  1. because its built with mingw/gcc, it does not have SAFESEH, requiring that
	 protection to be disabled for the whole stack. It could, it just needs a
	 way to be built with MSVS instead.
  2. OpenSSL 1.0.1 and Libressl both make metsrv about 50% larger.

When transports are more abstracted and LibreSSL can build with MSVS, we will
revisit this.
2015-03-25 09:12:11 -05:00
Brent Cook
4ec9205eb0 update openssl refs 2015-03-24 10:56:33 -05:00
OJ
85783773d5 Land #137 : filesystem refactor and initial unicode support 2015-03-18 18:01:05 +10: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
OJ
aaa384b51d Remove compiler warning, set warnings as errors 2015-03-13 20:47:30 +10:00
Brent Cook
0d59fc7447 support building on newer Linux systems and Makefile cleanups
- try to share some bits between different makefiles, make modifying
   global compiler flags not such a huge pain.
 - directly specify we should be using the gold rather than bpf linker
 - make compiler output largely quiet except where we care - allow
   warnings to actually be visible
 - don't delete downloaded tarballs with --really-clean
 - add missing dependencies between libraries
   (--no-add-needed/--no-copy-dt-needed-entries causes lots of trouble)
 - update readme to show what to install to build

I made minimal changes to the loader makefile - it breaks easily.
 -Os prevents if from being able to load libc, for instance
2015-01-13 16:33:56 -06:00
OJ
a7f2458a4e Force "warnings as errors" in stdapi
This should have been done ages ago, not sure why I need to do it again.
2014-01-24 21:53:50 +10:00
OJ
c6bdc26a55 Update Meterpreter to use the RDI submodule 2013-11-27 14:01:45 +10:00
OJ
5a1d5bbbe9 Set "warnings as errors"
Now that the build is clean, warnings are now errors to keep it clean.
2013-11-20 11:35:43 +10:00
OJ
1c09ac08d5 Merge branch 'master' into warning_removal 2013-11-14 19:20:27 +10:00
James Lee
07aec8068b Land #40, fix for ipv6 ipconfig 2013-11-07 14:44:27 -06:00
OJ
7702724fd2 Remove all warnings resulting in totally clean builds
Does as it says on the tin. Various tweaks made to source and to project
files to make the builds come out with ZERO warnings.

Let's keep it clean from here!
2013-11-06 19:02:50 +10:00
OJ
5986ccf235 Add the getproxy command
This allows for system proxy setting to be pulled out. Windows-only at
this point.
2013-10-30 17:25:51 +10:00
OJ
103eedf550 Merge branch 'master' into ipconfig_ipv6 2013-10-30 13:42:54 +10:00
OJ
288b2bad41 Upgrade to VS 2013 2013-10-29 13:46:46 +10:00
OJ
8fe249dd52 Fix ipconfig command to show IPv6
This commit also contains fixes for proper extraction of subnet masks
based on operating system.
2013-10-29 10:21:09 +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
Meatballs
4090e197aa Merge branch 'master' of github.com:rapid7/meterpreter into ip_resolv 2013-09-17 19:19:51 +01:00
Meatballs
4f1c2fe1ed Dont build in nix 2013-09-17 19:18:44 +01:00
James Lee
e031cc37f1 Land #19, add 'x86' to output filenames
Conflicts:
	workspace/ext_server_mimikatz/ext_server_mimikatz.vcxproj
	workspace/ext_server_sniffer/ext_server_sniffer.vcxproj
2013-09-16 23:56:52 -05:00
OJ
b442d17082 Change output file names
As per @jlee-r7's request I've changed the output of both 32 and 64 bit
components so that the platform is included in the file name.

I also added "make clean" to the make script.
2013-09-17 07:24:27 +10:00
OJ
73c3a2cfcd Support Rapid7 internal builds, fix sniffer ext
* r7_debug and r7_release configurations added.
* Make now detects if the appropriate libraries are on disk and will build
  whatever it can. If PSSDK is present in the appropriate location then it
  will attempt to build ext_server_sniffer.
* ext_server_sniffer is now buildable with VS 2012 with all the settings
  correct.
* ext_server_sniffer was failing to load once built. The cause of this was
  that the hMetSrv handle wasn't being set to a valid value prior to the
  command_register calls happening, it was being set too late. I'm not
  sure why this results in a crash, but moving this one call to a location
  prior to the command_register calls does resolve that problem.
2013-09-15 00:00:20 +10:00
OJ
35bef0be11 Post-build event changes
* Copy output to different locations for different builds
2013-09-03 17:22:18 +10:00
OJ
87031e0d00 Work towards a clean build
* Various code fixes to keep the compiler warnings down.
* Adjustments to project files.
2013-09-03 16:49:09 +10:00
OJ
89d2326901 Fix winmm library inclusion issue
* ext_server_stdapi wasn't including winmm.lib, despite the pragma
  included in the source of audio.c. Adding the library as a link
  input resolves the problem.
2013-09-02 11:37:45 +10:00
OJ
30928305e9 Fix project platform settings
* Make all the debug builds use /MTd instead of /MT.
* Make all builds use v110_xp for the platform (allows XP support).
2013-09-02 10:28:21 +10:00
OJ
5c5e95eb73 Upgrade from VS2010 to VS 2012
* Perform the upgrade of the projects using the VS wizard.
* Exclude the ext_server_pivot project for now as it doesn't exist on
  disk.

Note: this changeset will not compile.
2013-09-02 09:49:50 +10:00
James Lee
7cafff29f5 Fix compilation on Linux
Doesn't work, but at least it compiles
2013-04-17 18:08:14 -05:00
Meatballs
87dae3d449 Add file and project changes 2013-04-14 11:09:12 +01:00
James Lee
bdf7ae3acd Make the Debug config work
Also changes the output filename for most projects to make x86 match
x64, e.g. ext_server_stdapi.x86.dll
2013-04-03 13:33:04 -05:00