0⃣ both "kernel32" and "kernel32.dll" are acceptable libnames
1⃣ padding with space chars " kernel32 "
2⃣ adding arbitrary . to the mix " kernel32 .. .. . "
Is libname actually a file path? yes
3⃣ "c:\Windows\System32\kernel32.dll"
can we use relative addressing?
4⃣ "..\..\..\..\../\..\\.\windows\system32\kernel32"
can we use file protocol?
5⃣ " file:///../../../../\/./windows/system32/Kernel32.dll ... "
can we load from a shared folder? absolutely
6⃣"\\127.0.0.1\c$\windows\system32\Kernel32.dll"
can we load our dll? yup
7⃣ "\\127.0.0.1\c$\users\poc-calc.dll"
Lesson learned:
You can heavily obfuscate libname
You can load a dll into office from a remote location🔹
gnu.org/software/bash/…
"Words of the form $'string' are treated specially. The word expands to string, with backslash-escaped characters replaced as specified by the ANSI C standard."