当前位置:网站首页>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"
边栏推荐
猜你喜欢
随机推荐
13 【代理配置 插槽】
【Elastic-Job源码分析】——作业监听器
[Elastic-Job] Overview of Distributed Scheduling Tasks
SQL注入中数据库的判断
uni-app进阶之模版语法与数据绑定【day7】
Sword Point Offer Special Assault Edition ---- Day 2
Access数据库的查询
“档次法”——用于物品体积分布不均匀的01背包问题的求解方法
局部变量成员变量、引用类型、this,static(第五天)
了解SSRF,这一篇就足够了
Why is the redis single-threaded also so fast?
mysql启动报错The server quit without updating PID file几种解决办法
leetcode-每日一题1252. 奇数值单元格的数目(模拟优化)
File operations in C language (1)
Redis first meeting
07 【内置指令 自定义指令】
PAT_乙级_真题练习_1007_素数对猜想
碎片化NFT(Fractional NFT)
uni-app进阶之内嵌应用【day14】
【C语言3个基本结构详解——顺序、选择、循环】








