aboutsummaryrefslogtreecommitdiff
path: root/CodeExecution/DemoReflectiveDLL/DemoDLL/DemoDLL.cpp
diff options
context:
space:
mode:
authorMatt Graeber <mattgraeber@gmail.com>2013-05-31 19:35:26 -0400
committerMatt Graeber <mattgraeber@gmail.com>2013-05-31 19:35:26 -0400
commitdfec277813bfbc956dcac45345a9158093d68343 (patch)
treef205c4c4d6e81f33ace8086bbf63881ffc12dd51 /CodeExecution/DemoReflectiveDLL/DemoDLL/DemoDLL.cpp
parent6e5338c8a34ade0ec0a4704031109fb5187620f8 (diff)
downloadPowerSploit-dfec277813bfbc956dcac45345a9158093d68343.tar.gz
PowerSploit-dfec277813bfbc956dcac45345a9158093d68343.zip
Added Invoke-ReflectivePEInjection
Another awesome addition from Joe Bialek. Invoke-ReflectivePEInjection is a vast improvement over Invoke-ReflectiveDllInjection. It adds the following features: * Now supports loading exe files in memory * Supports reflective dll injection into a remote process * Additional sample Visual Studio solutions
Diffstat (limited to 'CodeExecution/DemoReflectiveDLL/DemoDLL/DemoDLL.cpp')
-rw-r--r--CodeExecution/DemoReflectiveDLL/DemoDLL/DemoDLL.cpp60
1 files changed, 0 insertions, 60 deletions
diff --git a/CodeExecution/DemoReflectiveDLL/DemoDLL/DemoDLL.cpp b/CodeExecution/DemoReflectiveDLL/DemoDLL/DemoDLL.cpp
deleted file mode 100644
index 61380d3..0000000
--- a/CodeExecution/DemoReflectiveDLL/DemoDLL/DemoDLL.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// DemoDLL.cpp : Defines the exported functions for the DLL application.
-//
-
-#include "stdafx.h"
-#include "DemoDLL.h"
-
-using namespace std;
-
-
-extern "C" __declspec( dllexport ) char* StringFunc()
-{
- ostream *outputStream = NULL;
-
- //If you want to output to cout, simply set outputStream to &cout. This allows you to write a program that can switch between outputting to string or to cout.
- //outputStream = &cout;
-
- ostringstream *stringStream = new ostringstream();
- outputStream = stringStream;
-
- (*outputStream) << "String DLL function is working" << endl << endl;
-
- string output = (*stringStream).str();
- const char* outputStr = output.c_str();
-
- char* out = new char[output.size()+1];
- strcpy(out, outputStr);
- out[output.size()] = '\0';
-
-
- return out;
-}
-
-extern "C" __declspec( dllexport ) void VoidFunc()
-{
- printf("Void DLL function is working, using printf to display. You will only see this if you run locally.\n\n");
- return;
-}
-
-extern "C" __declspec( dllexport ) wchar_t* WStringFunc()
-{
- wostream *outputStream = NULL;
-
- //If you want to output to wcout, simply set outputStream to &cout. This allows you to write a program that can switch between outputting to wstring or to wcout.
- outputStream = &wcout;
-
- wostringstream *stringStream = new wostringstream();
- outputStream = stringStream;
-
- (*outputStream) << L"WString DLL function is working" << endl << endl;
-
- wstring output = (*stringStream).str();
- const wchar_t* outputStr = output.c_str();
-
- wchar_t* out = new wchar_t[output.size()+1];
- wcscpy(out, outputStr);
- out[output.size()] = '\0';
-
-
- return out;
-} \ No newline at end of file