当前位置:网站首页>【SQL注入】联合查询(最简单的注入方法)
【SQL注入】联合查询(最简单的注入方法)
2022-07-03 04:33:00 【黑色地带(崛起)】
目录
一、介绍:
是最简单的一种注入方法
联合查询注入 报错查询注入 布尔型注入 延时注入 堆叠查询注入
二、原理:
就是可合并多个查询的结果的合集,顾名思义,就是将一个表追加到另一个表后,从而实现查询结果组合在一起。
在URL的参数位置中,将构造的语句注入到参数位置中
select (原始查询内容) union select (构造的内容)
三、前提条件
①存在注入点,即未被过滤
②有显示位,即能回显结果
③两表列数相同,即order by 或union select 去判断列 数
④数据类型相同
四、利用过程
1、判断是否存在注入点
(1)在参数位置修改参数值,eg:id=1修改为2后是否数据改变
(2)插入单、双引号的检测方法(常用),未闭合的单引号会引起SQL语句单引号未闭合的错误提示
2、判断注入点还是整形或字符型
(1)数字型:通过and 1=1
(2)字符串型:闭合单引号测试语句'and'1'='1进行判断
3、判断查询列数
order by 或 union select
4、判断显示位
报错回显,用不存在的id=-1加上union select……
或者and1=2加上union select……
下面的就都是通过报错后,在显示位构造要查找的信息
5、获取所有数据库名
6、获取数据库所有表名
7、获取字段名
8、获取字段中的数据
边栏推荐
- FISCO bcos zero knowledge proof Fiat Shamir instance source code
- JS multidimensional array to one-dimensional array
- Dismantle a 100000 yuan BYD "Yuan". Come and see what components are in it.
- Mount NFS in kubesphere
- Which code editor is easy to use? Code editing software recommendation
- [BMZCTF-pwn] 18-RCTF-2017-Recho
- Redis persistence principle
- [set theory] set identities (idempotent law | exchange law | combination law | distribution rate | De Morgan law | absorption rate | zero law | identity | exclusion law | contradiction law | complemen
- Prefix and (continuously updated)
- 重绘和回流
猜你喜欢

The simple problem of leetcode: dismantling bombs

When using the benchmarksql tool to preheat data for kingbasees, execute: select sys_ Prewarm ('ndx_oorder_2 ') error

Truncated sentences of leetcode simple questions
![[free completion] development of course guidance platform (source code +lunwen)](/img/14/7c1c822bda050a805fa7fc25b802a4.jpg)
[free completion] development of course guidance platform (source code +lunwen)

2022 new examination questions for the main principals of hazardous chemical business units and examination skills for the main principals of hazardous chemical business units

Basic use of continuous integration server Jenkins

Know that Chuangyu cloud monitoring - scanv Max update: Ecology OA unauthorized server request forgery and other two vulnerabilities can be detected

Two points -leetcode-540 A single element in an ordered array

Redis persistence principle

vulnhub HA: Natraj
随机推荐
How to retrieve the password for opening word files
redis 持久化原理
PostgreSQL database high availability Patroni source code learning - etcd class
2022 Shandong Province safety officer C certificate examination content and Shandong Province safety officer C certificate examination questions and analysis
[set theory] set operation (Union | intersection | disjoint | relative complement | symmetric difference | absolute complement | generalized union | generalized intersection | set operation priority)
C language series - Section 3 - functions
Basic use of continuous integration server Jenkins
GFS分布式文件系统(光是遇见已经很美好了)
2022 a special equipment related management (elevator) analysis and a special equipment related management (elevator) simulation test
MC Layer Target
FuncS sh file not found when using the benchmarksql tool to test kingbases
FISCO bcos zero knowledge proof Fiat Shamir instance source code
Pyqt control part (II)
2.14 summary
Library management system based on SSM
How to choose cross-border e-commerce multi merchant system
Ffmpeg tanscoding transcoding
Asp access teaching management system design finished product
金仓数据库KingbaseES 插件kdb_date_function
Dismantle a 100000 yuan BYD "Yuan". Come and see what components are in it.