1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-03-24 18:16:24 +01:00

30 Commits

Author SHA1 Message Date
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
c6bdc26a55 Update Meterpreter to use the RDI submodule 2013-11-27 14:01:45 +10:00
OJ
70d958b729 Remove last of the warnings/errors after merging 2013-11-14 19:33:20 +10:00
OJ
1c09ac08d5 Merge branch 'master' into warning_removal 2013-11-14 19:20:27 +10: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
3b40f1abd0 Command refactor for clean shutdown + inline calls
This work contains a bunch of changes around command dispatching. The
goals for this bit of work were to:

* Provide the ability for commands to be executed on the same thread as
  the server rather than always creating new threads and executing them on
  those threads.
* Have the means for _special_ commands, such as `exit` and `migrate` to
  shut down the server cleanly without having to rely on signalling across
  threads or by doing brutal thread termination via shared global handles.
  This should not only fix the dirty shutdown problem on Windows which
  leaves tasks dangling (or based on the prior attempt at fixing, crashing
  stuff as well), it should also help clean up the shutdown process in
  POSIX.

These changes hit a very important part of Meterpreter and so should be
reviewed with intense scrutnity. I expect this PR to garner a log of
critique and most likely a number of changes before being included in the
main line.

The `PacketDispatcher` was modified to include a new function pointer
called an `inline_handler`. This new member indicates that there's a
handler which should be invoked inline. While this sits alongside the
existing `handler`, they are actually mutually exclusive. If an
`inline_handler` is specified then the `handler` is ignored and it is
assumed that the command is intended to be handled inline. The signature
of the inline handler is different to the standard handler, and this is
why a new function pointer was added rather than a simple flag. Addition of
this parameter meant that the basic command structure changed, and that
obviously affects all of the extensions and their respective commands.
This changeset therefore updates each of those command declarations so
that they use the new macros that hide this detail.

Other things to be mindful of:

* This version of the code reads the command's `method` prior to invoking
  any other function, and after that the command itself is passed around to
  the threaded or non-threaded routes for invocation. An extra thread
  parameter was included as as result, and an overload for the
  `thread_create` function was added which supported this new parameter.
  This was named `thread_create3` because
  `thread_create_with_another_paramter` sounded a bit crap.
* The migration code, which originally had a `thread_kill` and an event
  wait once the new meterpreter session had been created, has been modified
  to not do any waiting at all. Instead it finishes execution as fast as
  possible and returns control to the server which should respond by
  shutting down in a clean way.
* Originally the code always attempted to call a command handler in the
  base command list and then, if found, would also call an "overload" in
  the extension commands list. From the investigation that I did, it
  appears that the overloaded methods did nothing in the base (they'd
  early out during invocation). As a result, the new way of doing things
  acts like a 'true' overload in that the extension commands are searched
  first, and if one is found this is the command that is executed. Any
  base commands with the same method name will not get executed. In the
  case where there is no extension command found, the base command list is
  then queried. If a command is found that command is instead invoked.
* The POSIX version still compiles cleanly, but I've never been able to
  build a version that runs on my machines. I'm not sure if there's a
  trick to getting POSIX builds to run, and if there is I don't know it.
  Whoever scrutinises this build should make sure that the POSIX version
  that they build can still run and (hopefully) exit cleanly.

I've added lots of documentation, but there's always room for improvement.

Hopefully this will fix the `*_tcp` side of Redmine 8438.

Bring on the feedback!
2013-10-17 22:36:49 +10:00
OJ
99771d367e Removal of more warnings in compilation 2013-09-15 00:06:49 +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
8ae670cfaf Fix C++11 make_pair errors and U_CHAR problem
* make_pair() changed in C++11 so this change fixes the code so that the
  compiler doesn't complain any more.
* Compiler was also complaining about redefinition of U_CHAR. Undefining
  before redefining resolves the issue.
2013-09-02 12:07:50 +10:00
Meatballs
d5b8577d6a Fix warning 2013-04-27 12:52:38 +01:00
Meatballs
73a386f49c CSV escape quotes 2013-04-27 12:43:53 +01:00
Meatballs
f06807c4d5 Fix x64 2013-04-22 10:42:50 +01:00
Meatballs
da4c1fc650 Refactor to support custom commands 2013-04-22 10:06:35 +01:00
Meatballs
19b1d95df8 Modify ssp output 2013-04-21 10:33:16 +01:00
Meatballs
997cbe64ce tidy and add notes 2013-04-21 00:28:39 +01:00
Meatballs
57f9217ccb More licence fixes 2013-04-21 00:21:10 +01:00
Meatballs
6c47be2163 Correct wcout 2013-04-21 00:08:38 +01:00
Meatballs
37101896e9 Update licencing 2013-04-20 23:20:52 +01:00
Meatballs
ff8dbb3226 Refactoring 2013-04-20 18:12:37 +01:00
Meatballs
f061ceba31 Add all methods 2013-04-20 17:28:00 +01:00
Meatballs
c36f4c1c89 Add msv 2013-04-20 16:32:31 +01:00
Meatballs
0fd0f2b878 Prevents crashing on reattempts 2013-04-20 15:06:18 +01:00
Meatballs
36b0aeeeaa Tidy output 2013-04-20 12:21:48 +01:00
Meatballs
d0822e5f19 Working comms 2013-04-20 11:14:37 +01:00
Meatballs
fd7b6eadbb Normalized output 2013-04-20 10:31:13 +01:00
Meatballs
09f2085e97 Working output to file 2013-04-20 01:26:57 +01:00
Meatballs
39872d239b Working comms 2013-04-19 22:18:44 +01:00
Meatballs
21e2b1fecf Tidy 2013-04-19 21:45:33 +01:00
Meatballs
979e22f774 Compiles with Release 2013-04-19 19:36:40 +01:00