metasploit-framework/external/source
RageLtMan 36b989e6d7 Initial import of .NET compiler and persistence
Add Exploit::Powershell::DotNet namespace with compiler and
runtime elevator.

Add compiler modules for payloads and custom .NET code/blocks.

==============

Powershell-based persistence module to compile .NET templates
with MSF payloads into binaries which persist on host.
Templates by @hostess (way back in 2012).

C# templates for simple binaries and a service executable with
its own install wrapper.

==============

Generic .NET compiler post module

Compiles .NET source code to binary on compromised hosts.
Useful for home-grown APT deployment, decoy creation, and other
misdirection or collection activities.

Using mimikatz (kiwi), one can also extract host-resident certs
and use them to sign the generated binary, thus creating a
locally trusted exe which helps with certain defensive measures.

==============

Concept:

Microsoft has graciously included a compiler in every modern
version of Windows. Although executables which can be easily
invoked by the user may not be present on all hosts, the
shared runtime of .NET and Powershell exposes this functionality
to all users with access to Powershell.

This commit provides a way to execute the compiler entirely in
memory, seeking to avoid disk access and the associated forensic
and defensive measures. Resulting .NET assemblies can be run
from memory, or written to disk (with the option of signing
them using a pfx cert on the host). Two basic modules are
provided to showcase the functionality and execution pipeline.

Usage notes:

Binaries generated this way are dynamic by nature and avoid sig
based detection. Heuristics, sandboxing, and other isolation
mechanisms must be defeated by the user for now. Play with
compiler options, included libraries, and runtime environments
for maximum entropy before you hit the temmplates.

Defenders should watch for:
Using this in conjunction with WMI/PS remoting or other MSFT
native distributed execution mechanism can bring malware labs
to their knees with properly crafted templates.
The powershell code to generate the binaries also provides a
convenient method to leave behind complex trojans which are not
yet in binary form, nor will they be until execution (which can
occur strictly in memory avoiding disk access for the final
product).

==============

On responsible disclosure: I've received some heat over the years
for prior work in this arena. Everything here is already public,
and has been in closed PRs in the R7 repo for years. The bad guys
have had this for a while (they do their homework religiously),
defenders need to be made aware of this approach and prepare
themselves to deal with it.
2016-10-08 14:05:53 -05:00
..
DLLHijackAuditKit Resolve #4326, remove msfpayload & msfencode. Use msfvenom instead! 2015-06-08 11:30:04 -05:00
ReflectiveDLLInjection@88e8e5f109 Add RDI submodule, port Kitrap0d 2013-11-27 16:04:41 +10:00
byakugan Fix typo in license text 2013-01-07 23:29:49 -06:00
cmdstager/debug_asm big commit - lots of cmdstager changes 2010-05-26 22:39:56 +00:00
dllinject update comment 2008-05-26 10:27:22 +00:00
exploits Add LPE exploit module for the capcom driver flaw 2016-09-27 22:37:45 +10:00
flash_detector Add AS2 flash detection code 2015-07-13 18:26:02 -05:00
flash_exploiter Update flash exploiter 2015-07-15 18:32:45 -05:00
ipwn Adds auto-execute support (hex edit the binary and change the # * 8192 to a list of commands, separated by newlines, ending with a NULL byte, keeping the same buffer size). 2007-10-23 23:22:27 +00:00
javapayload Remove javapayload source 2013-06-12 10:57:23 -05:00
meterpreter Remove meterpreter source 2013-06-11 16:42:30 -05:00
metsvc crossing fingers, big cr removal batch 2009-12-30 22:24:22 +00:00
msfJavaToolkit expound on java signer build instructions 2015-02-12 16:13:08 -06:00
osx Move C source to exploits folder 2014-11-30 20:42:53 -06:00
passivex Commit the PassiveX DLL updated to build with Visual Studio C++ 2008. Removed some compiler warnings. Use VirtualProtect to make second stage RWX. Use WSASocketA() over socket() for second stage compatibility. Seems to now work with the shell stage (Tested on XPSP2/IE7) but still not working with meterpreter. 2009-11-11 00:39:38 +00:00
psh_exe Initial import of .NET compiler and persistence 2016-10-08 14:05:53 -05:00
pxesploit Adds scriptjunkie's multilingual admin fie for pxexploit 2011-12-23 12:24:45 -06:00
shellcode Add MIPS O32 Linux support (big and little endian) 2016-07-05 11:24:54 -05:00
tightvnc Adding TightVNC's java viewer to external/source. vnc.html works, it just needs to have the path set correctly. 2010-02-25 23:18:42 +00:00
unixasm Add BSD license to unixasm, thanks Ramon! 2012-09-04 15:02:00 -05:00
vncdll Rapid7 Comma Inc 2014-03-13 09:46:20 -05:00
win_kernel_common Add LPE exploit module for the capcom driver flaw 2016-09-27 22:37:45 +10:00
DLLHijackAuditKit.zip Remove the duplicate copy 2010-08-25 19:22:02 +00:00