常见的注入类型:
Injection | Description |
---|---|
OS Command Injection | 当用户输入直接用作操作系统命令的一部分时发生。 |
Code Injection | 当用户输入直接位于评估代码的函数内时发生。 |
SQL Injection | 当用户输入直接用作 SQL 查询的一部分时发生。 |
Cross-Site Scripting/HTML Injection | 当网页上显示准确的用户输入时发生。 |
… |
Detection
OS Command Injection
Character | URL-Encoded Character | Executed Command |
---|---|---|
; |
%3b |
两个都 |
\n |
%0a |
两个都 |
& |
%26 |
两者(第二个输出通常首先显示) |
| |
%7c |
两者(仅显示第二个输出) |
&& |
%26%26 |
两者(仅当第一个成功时) |
| |
%7c%7c |
第二(仅当第一失败时) |
`` |
%60%60 |
两者(仅限 Linux) |
$() |
%24%28%29 |
两者(仅限 Linux) |
Other Injection
Injection Type | Operators |
---|---|
SQL Injection | ' , ; -- /* */ |
Command Injection | ; && |
LDAP Injection | * ( ) & | |
XPath Injection | ' or and not substring concat count |
OS Command Injection | ; & | |
Code Injection | ' ; -- /* */ $() ${} #{} %{} ^ |
Directory Traversal/File Path Traversal | ../ ..\\ %00 |
Object Injection | ; & | |
XQuery Injection | ' ; -- /* */ |
Shellcode Injection | \x \u %u %n |
Header Injection | \n \r\n \t %0d %0a %09 |