当前位置:网站首页>Judgment of database in SQL injection
Judgment of database in SQL injection
2022-07-31 05:52:00 【not used to having you】
Note: For technical discussion only, do not use for other purposes, all consequences have nothing to do with me.
Foreword: For penetration testing, we can use the corresponding statements and functions for penetration only if we know the database corresponding to the website.
Common databases:
Oracle, MySQL, SQL Server, Access, MSsql, Postgresql, mongodb, etc.
Oracle—Oracle Corporation—Commercial Large Databases
MySQL—Oracle Corporation (Acquisition)—— Open source small and medium databases
SQL SERVER—Microsoft Corporation—Commercial medium and large databases
Access—Microsoft Corporation—Commercial small databases
DB2—IBM Corporation—Commercial large databases
According to the port
Oracle: default port 1521
SQL Server: default port 1433
MySQL: default port 3306
The type corresponding to the backend language and database:
asp:sql server,Access
.net :sql server
php:PostgreSQL,Mysql
java:Oracle,Mysql
Website scripts, WEB service programs. Common combinations of database service programs include:
PHP+Apache+MYSQL
ASP+Microsoft IIS+ACCSECC
ASP+Microsoft IIS+mssql
ASPX+Microsoft IIS+Mssql
JSP+TOMCAT+Oracle(relatively rare)
Signature information of each database:
sql server: [email protected]@version –
Oracle:select banner from v$version
mysql:select @@version, version() –, length(user)>0 normal
postgresql:selectversion() –
For string handling
sql server : id=1 and 'a'+'b'='ab' –
mysql: id=1 and 'a'+'b'='ab' , 'ab'=concat('a','b')
oracle: id=1 and 'a'+'b'='a'||'b' ,'ab'=concat('a','b')
postgresql : id=1 and 'a'+'b'='a'||'b' ,'ab'=concat('a','b')
Special functions
len() and length() functions
length()/char_length(): for mysql database
len(): for sql sever database
lengthb()/length(): for useFor oracle database
length()/char_length(): for postgresql database
Special symbols, judgment of comments
Access: includes double hyphen (–), C style (/* . . . */)
MySQL: "#", means single-line comment, syntax "#comment content"
"-", means single-line comment, syntax "-- comment content"
"/**/", means multiple linesComment, syntax "/comment content/"
Oracle: "/**/", means multi-line comment, syntax "/comment content/"
"-", means single-line comment, syntax "-- comment content"
边栏推荐
猜你喜欢
07 【内置指令 自定义指令】
Year-end summary - the years are quiet~
02 【el和data的两种写法 MVVM模型】
DeFi 项目中的治理Token
Linux修改MySQL数据库密码
【uiautomation】微信好友列表获取(存储到txt中)
【云原生】SQL(及存储过程)跑得太慢怎么办?
Qt Creator + CMake 运行调试总会自动 build 所有目标
Error: Cannot find module ‘D:\Application\nodejs\node_modules\npm\bin\npm-cli.js‘
最新MySql安装教学,非常详细
随机推荐
闭包(三)----执行环境
2021 Mianjing - Embrace Change
11 【组件通信】
Memcached :安装
【云原生】微服务Nacos的简单介绍与使用
Swordsman Offer Special Assault Edition ---- Day 6
Redis 事务学习有感
Flink sink redis writes to Redis
GUCCI、LV等奢侈品巨头如何布局元宇宙的,其他品牌应该跟上吗?
The process and specific code of sending SMS verification code using flask framework
MySQL高级语句(一)
【云原生】原来2020.0.X版本开始的OpenFeign底层不再使用Ribbon了
MySql创建数据表
leetcode-2321. 拼接数组的最大分数(差分+枚举)
Redis:安装使用
Error: Cannot find module ‘D:\Application\nodejs\node_modules\npm\bin\npm-cli.js‘
【Elastic-Job】分布式调度任务概览篇
年终总结——岁月静好~
07 【内置指令 自定义指令】
leetcode-每日一题745. 前缀和后缀搜索(哈希和字典树)