当前位置:网站首页>web渗透测试是什么_渗透实战
web渗透测试是什么_渗透实战
2022-07-06 16:29:00 【Java架构师必看】
大家好,我是架构君,一个会写代码吟诗的架构师。今天说一说web渗透测试是什么_渗透实战,希望能够帮助大家进步!!!
学习一整套的web渗透测试实验对以后的测试工作很有帮助,所以我把学习环境中的实现写下来,提供对整个网站测试的经验。
目的: (1)了解黑客是如何通过漏洞入侵网站,并获得服务器权限; (2)学习渗透测试完整过程 原理: 黑客通过挖掘网站的注入漏洞,进而获得管理员账号密码进去后台,通过数据库备份,拿到webshell;然后黑客登录shell,通过2003服务器的提权exp拿下服务器的权限。
1.检测网站安全性
进入测试网站http://192.168.1.3界面
寻找漏洞,我们先用软件扫描,然后找到链接来测试,在浏览器打开http://192.168.1.3/see.asp?ID=461&titleID=86这个链接
在链接后面加 ‘ ,页面报错
由上图可知直接提示数据库错误界面,判断可能存在注入漏洞。我们在浏览器输入http://192.168.1.3/see.asp?ID=461&titleID=86 and 1=
我们再在浏览器输入http://192.168.1.3/see.asp?ID=461&titleID=86 and 1=2
返回错误页面,在链接尾部输入and 1=1 和and 1=2返页面不同,由此我们判断这个站点存在SQL注入漏洞。
2.使用工具激活成功教程管理员用户、密码
打开啊D注入工具
把存在注入点的URL复制到啊D注入工具中,选择左侧的SQL注入检测,点击检测,在数据库的下方会提示我们数据库的类型等内容
点击检测表段,就是检测数据库所有表名
我们点击admin表,然后点检测字段
选择password和admin字段,再点击检测内容,暴出字段内容即激活成功教程用户名和密码
3.使用工具激活成功教程MD5密码
我们得到的密码是用MD5加密的,我们通过MD5激活成功教程软件进行激活成功教程
由此,我们得到网站管理员的账号密码为linhai 123456
4.登录网站管理后台
我们用软件来探测网站管理后台,打开御剑后台扫描工具
把网站URL http://192.168.1.3输入工具中,点击开始扫描
通过扫描结果,我们猜测后台登录URL为http://192.168.1.3/admin/Login.asp
用激活成功教程的管理员账号linhai和密码123456成功登录后台
5.拿到网站webshell
我们进入到网站管理后台,我们需要拿到webshell,本例中先打开系统管理,选择文章管理,打开上传图
我们直接上传asp木马试试
我们把木马后缀名改为mm.jpg
上传成功后,右键照片属性,看下它上传的位置记录下来,http://192.168.1.3/admin/Upfiles/201873091139.jpg
我们上传成功后,因为上传的是图片,不能解析成木马脚本,正好我们这个网站有备份数据库功能,我们可以通过数据备份的方式,重新命名脚本文件,使其能够作为木马脚本被执行。我们点击左侧的数据管理,选择备份/恢复数据库
在备份数据库中,数据库路径后面,填上我们刚刚上传图片的地址:../admin/Upfiles/201873091139.jpg;在备份的数据库路径后面填写../db/1.aspx。这样做的目的是把我们上传的jpg后缀的木马,重新备份成aspx文件,使我们的木马能够正常运行。
我们点击备份后,访问http://192.168.1.3/db/1.aspx就是我们的木马地址了,木马的密码是77169,至此,我们就拿到了这个网站的webshell
6.拿到服务器权限
进入webshell后,我们需要执行dos命令来添加管理员。点击webshell上端的命令行,进入执行命令模式
尝试执行whoami命令,查看下我们是什么权限
我们发现回显的是network service权限,在此权限下是不能直接添加管理员账户的,我们添加账户时,回显是空白,证明我们无法添加用户
点击端口扫描,再点击扫描,发现系统开放着43958端口,即server-u服务
点击SU提权,在cmdshell中输入命令net user aaa 123456 /add,然后点击执行
在cmdshell中输入命令net localgroup administrators aaa /add,然后点击执行
在cmdshell中输入命令net user,然后点击执行,查看aaa用户是否添加成功
在cmdshell中输入命令net user aaa,然后点击执行,查看aaa用户属于administrators用户组
点击开始->运行->mstsc->192.168.1.3->输入账号aaa和密码123456,点击登录
今天文章到此就结束了,感谢您的阅读,Java架构师必看祝您升职加薪,年年好运。
边栏推荐
- 在docker中快速使用各个版本的PostgreSQL数据库
- SuperSocket 1.6 创建一个简易的报文长度在头部的Socket服务器
- 【无人机】多无人协同任务分配程序平台含Matlab代码
- The worse the AI performance, the higher the bonus? Doctor of New York University offered a reward for the task of making the big model perform poorly
- MATLIB reads data from excel table and draws function image
- Experiment 6: installing eve-ng
- 快手的新生意,还得靠辛巴吆喝?
- The best sister won the big factory offer of 8 test posts at one go, which made me very proud
- 【自动化测试框架】关于unittest你需要知道的事
- Talking about the current malpractice and future development
猜你喜欢
若依请求url中带有jsessionid的解决办法
DAY SIX
Close unregistering application XXX with Eureka with status down after Eureka client starts
The programmer refused the offer because of low salary, HR became angry and netizens exploded
Penetration test --- database security: detailed explanation of SQL injection into database principle
基于SSM框架实现的房屋租赁管理系统
leetcode:236. The nearest common ancestor of binary tree
11 preparations for Web3 and Decentralization for traditional enterprises
Zero code and high return. How to use 40 sets of templates to meet 95% of the reporting needs in the work
app通用功能測試用例
随机推荐
Laravel8 uses passport authentication to log in and generate a token
Master binary tree in one article
The programmer said, "I'm 36 years old, and I don't want to be rolled, let alone cut."
Matplotlib draws a histogram and adds values to the graph
英国都在试行4天工作制了,为什么BAT还对996上瘾?
基础图表解读“东方甄选”爆火出圈数据
Can async i/o be implemented by UDF operator and then called by SQL API? At present, it seems that only datastre can be seen
Do you still have to rely on Simba to shout for a new business that is Kwai?
openresty ngx_lua子请求
js对JSON数组的增删改查
Design of short chain
PostgreSQL高可用之repmgr(1主2从+1witness)+Pgpool-II实现主从切换+读写分离
内网穿透zerotier 外网(手机、电脑等)访问内网设备(树莓派、NAS、电脑等)
Zero code and high return. How to use 40 sets of templates to meet 95% of the reporting needs in the work
CRMEB 商城系统如何助力营销?
求帮助xampp做sqlilab是一片黑
Wind chime card issuing network source code latest version - commercially available
Per capita Swiss number series, Swiss number 4 generation JS reverse analysis
亚朵三顾 IPO
[unmanned aerial vehicle] multi unmanned cooperative task allocation program platform, including Matlab code