免责声明:由于传播、利用本公众号SSP安全研究所提供的信息而造成的任何直接或者间接的后果及损失,均由使用者本人负责,公众号SSP安全研究及作者不为此承担任何责任,一旦造成后果请自行承担!如有侵权烦请告知,我们会立即删除并致歉。谢谢!
前言
朋友的实训,较简单。吾实验有点取巧了,猜测本意是通过web漏洞横向,吾使用的hash横向。
信息收集
对内网ip进行扫描
发现172.20.10.10为目标主机
对其进行端口扫描
fscan -h 172.20.10.10 -np
发现目标存在thinkphp web服务
访问后发现为schoolcms
对其进行目录扫描
发现admin后台
地址为:
http://172.20.10.10/admin.php?m=Admin&c=Admin&a=LoginInfo
没有验证码 对其进行密码爆破
发现用户名密码为admin/admin888
成功登陆后台
shcoolcms getshell
站点配置-->站点设置存在文件上传点
上传图片马
使用冰蝎进行连接
内网渗透
上传frp进行内网渗透
使用fscan进行内网扫描
proxychains4 -q fscan -h 192.168.29.134 -np
192.168.29.134存在ms17010, 经过后续测试为误报 msf没有扫出来
cs上线winserver2012
成功上线
使用potato提权
成功获取到windows server2012的system权限
抓取server2012的凭据 使用凭据进行横向
成功横向到192.168.29.134 windows server 2008r2
同样使用server2012的凭据进行横向
横向到192.168.239.132这台主机
在主机C:UsersAdministratorDesktopflag.txt 找到flag
flag{5rKh6ZSZ77yM5oiR5pivd2luN+S4iueahEZsYWc=}
对192.168.239.1/24 网段进行扫描 扫到存活主机192.168.239.128
配置代理检测连通性
对192.168.239.128进行扫描 发现开放80端口
打开winserver2012的远程桌面使用获取的凭据 进行连接
成功登陆yduser用户
通过server2012的远程桌面登陆到2008r2的远程桌面
用户Administrator 密码Huawei@123321
登录成功后即可访问到192.168.239.128开放的服务
搭建stowaway多级代理对此网站进行渗透
站点为Drupal7
使用msf拿到一个session
flag1:Every good CMS needs a config file - and so do you.
flag2:<?php
/**
* flag2
* Brute force and dictionary attacks aren't the
* only ways to gain access (and you WILL need access).
* What can you do with these credentials?
*/
$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'drupaldb',
'username' => 'dbuser',
'password' => 'R0ck3t',
'host' => 'localhost',
'port' => '',
'driver' => 'mysql',
'prefix' => '',
),
),
);
修改网站密码为1234
登录后发现flag3
Special PERMS will help FIND the passwd - but you'll need to -exec that command to work out how to get what's in the shadow.
在/etc/passwd中发现flag4
Can you use this same method to find or access the flag in root?
Probably. But perhaps it's not that easy. Or maybe it is?
提权后发现最后一个flag
u0035u0072u004bu0068u0036u005au0053u005au0037u0037u0079u004du0035u006fu0069u0052u0035u0062u0043u0078u0035u0070u0069u0076u0035u0070u0079u0041u0035u0037u0075u0049u0035u0035u0071u0045u0036u0059u004bu006au0035u004cu0069u0071u005au006du0078u0068u005au0079u0045u0068
5rKh6ZSZ77yM5oiR5bCx5piv5pyA57uI55qE6YKj5LiqZmxhZyEh
防护可以部署waf和服务器防护软件
往期精彩
原文始发于微信公众号(SSP安全研究):某学校渗透测试实训小记
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论