bugku

BUGKU

WEB

web9

  • 考点是PHP全局变量

提示flag在变量中,看下面的代码,意思时传入一个变量,然后进行正则匹配,如果变量不是字符串,就输出变量。php有个全局变量的概念 ‘GLOBALS’ 带入参数args=GLOBALS
即可获得flag

https://www.cnblogs.com/borage/p/3645285.html

WEB10

发送到reperter,多点几次send

image-20210110161649976

web11

提示后门,dirsearch扫描网站:

image-20210110163425860

访问shell.php,得到提示需要登陆密码,测试了sql注入,未能绕过,尝试弱口令

image-20210110163528750

image-20210110163559320

web12

随便输入登陆,提示IP禁止访问

image-20210110164026339

拉到底部,有个base64加密字段,解密是test123,应该就是登陆密码

接下来就是怎么绕过ip限制,加上X-Forwarded-For:127.0.0.1,密码是test123

image-20210110164322489

web13

随便输入,提示看源代码

image-20210110165859353

image-20210110165910344

意思是var1 + %35%34%61%61%32解码的数据 + var2

有3段url编码数据,解码后:

p1:
function checkSubmit(){var a=document.getElementById("password");if("undefined"!=typeof a){if("67d709b2b

%35%34%61%61%32
54aa2

p2:
aa648cf6e87a7114f1"==a.value)return!0;alert("Error");a.focus();return!1}}document.getElementById("levelQuest").onsubmit=checkSubmit;

image-20210110170229176

意思是67d709b2b54aa2aa648cf6e87a7114f1为值是,返回才不会为0,就会返回flag

填写到输入框:

image-20210110170332311

web14

来到页面image-20210110172629284

点击click,看到index.php,并且url尾部是file=文件名,猜想是文件包含

image-20210110172802909

测试直接包含,链接会被重置,可以用base64加密试一下

image-20210110172902617

http://114.67.246.176:14918/index.php?file=php://filter/read=convert.base64-encode/resource=index.php

得到一行base64加密的字符串

image-20210110173029809

解密得到:

image-20210110173050349

web15

来到页面,提示需要密码五位数,那就爆破吧,脚本生成

image-20210110173811402

image-20210110173732627

image-20210110173826272

bp爆破,得到密码:

image-20210110174056985

image-20210110174127888

web16

提示备份,直接dirsearch扫描

image-20210110175617913

访问的,下载,打开

image-20210110175643906

意思就是让两个值不相等,但是他们的MD5相等,并且会把key值替换为空,双写绕过。

百度一下,原来考点是php的弱类型

附上一篇写php弱类型的文章,很详细

https://www.cnblogs.com/Mrsm1th/p/6745532.html

定值:key1=QNKCDZO key2=s878926199a

http://114.67.246.176:17617/index.php?kekeyy1=QNKCDZO&kekeyy2=s878926199a

image-20210110180232842

原文地址:https://www.cnblogs.com/liyu8/p/14252114.html