渗透测试任务中,主机/服务/漏洞等信息如果手动维护,会带来巨大的工作量。

在metasploit中,这部分工作已经被封装的非常好,每次调用内部模块执行的任务结果都会自动存入DB.通过简单的指令即可以方便的查看。

metasploit 中的DB操作

msf > help database

Database Backend Commands
========================= Command Description
------- -----------
creds List all credentials in the database
db_connect Connect to an existing database
db_disconnect Disconnect from the current database instance
db_export Export a file containing the contents of the database
db_import Import a scan result file (filetype will be auto-detected)
db_nmap Executes nmap and records the output automatically
db_status Show the current database status
hosts List all hosts in the database
loot List all loot in the database
notes List all notes in the database
services List all services in the database
vulns List all vulnerabilities in the database
workspace Switch between database workspaces
msf auxiliary(ssh_version) > show options Module options (auxiliary/scanner/ssh/ssh_version):    Name     Current Setting                        Required  Description
   ----     ---------------                        --------  -----------
   RHOSTS   file:/root/DailyPentest/IPSrc/example  yes       The target address range or CIDR identifier
   RPORT    22                                     yes       The target port
   THREADS  1                                      yes       The number of concurrent threads
   TIMEOUT  30                                     yes       Timeout for the SSH probe msf auxiliary(ssh_version) > set RHOSTS file:/root/DailyPentest/IPSrc/aa
RHOSTS => file:/root/DailyPentest/IPSrc/aa
msf auxiliary(ssh_version) > run [*] 124.127.106.5:22, SSH server version: SSH-1.99-OpenSSH_5.8p2
[*] Scanned 1 of 9 hosts (011% complete)
[*] 124.127.106.3:22, SSH server version: SSH-1.99-OpenSSH_3.9p1
[*] Scanned 2 of 9 hosts (022% complete)
[*] Scanned 3 of 9 hosts (033% complete)
[*] Scanned 4 of 9 hosts (044% complete)
[*] Scanned 5 of 9 hosts (055% complete)
[*] Scanned 6 of 9 hosts (066% complete)
[*] Scanned 7 of 9 hosts (077% complete)
[*] 167.124.236.145:22, SSH server version: SSH-2.0-ArrayOS
[*] Scanned 8 of 9 hosts (088% complete)
[-] 167.124.236.184:22, SSH server version detection failed!
[*] Scanned 9 of 9 hosts (100% complete)
[*] Auxiliary module execution completed
msf auxiliary(ssh_version) > services Services
======== host             port  proto  name          state  info
----             ----  -----  ----          -----  ----
167.124.236.145  22    tcp    ssh           open   SSH-2.0-ArrayOS
167.124.236.243  22    tcp    ssh           open   SSH-2.0-ArrayOS
124.127.106.3    22    tcp    ssh           open   SSH-1.99-OpenSSH_3.9p1
124.127.106.5    22    tcp    ssh           open   SSH-1.99-OpenSSH_5.8p2
192.168.0.104    135   tcp    msrpc         open   
192.168.0.104    554   tcp    rtsp          open   
192.168.0.104    445   tcp    microsoft-ds  open   Windows 7 Ultimate 7601 Service Pack (Build 1) (language: Unknown) (name:WIN-R2OU7BR820S) (domain:WORKGROUP)
192.168.0.104    139   tcp    netbios-ssn   open   
192.168.0.105    21    tcp    ftp           open   220 (vsFTPd 2.0.6)\x0d\x0a
192.168.0.105    22    tcp    ssh           open   SSH-2.0-OpenSSH_4.7p1 Debian-8
192.168.0.105    631   tcp    ipp           open    msf auxiliary(ssh_version) > services -p 22 Services
======== host             port  proto  name  state  info
----             ----  -----  ----  -----  ----
167.124.236.145  22    tcp    ssh   open   SSH-2.0-ArrayOS
167.124.236.243  22    tcp    ssh   open   SSH-2.0-ArrayOS
124.127.106.3    22    tcp    ssh   open   SSH-1.99-OpenSSH_3.9p1
124.127.106.5    22    tcp    ssh   open   SSH-1.99-OpenSSH_5.8p2
192.168.0.105    22    tcp    ssh   open   SSH-2.0-OpenSSH_4.7p1 Debian-8

可以用db_nmap 取代nmap, 因为其结果会直接导入DB, 可以及其方便的用指令查看

msf > services -R 192.168.0.105

Services
======== host port proto name state info
---- ---- ----- ---- ----- ----
192.168.0.105 tcp ftp open (vsFTPd 2.0.)\x0d\x0a
192.168.0.105 tcp ssh open SSH-2.0-OpenSSH_4.7p1 Debian-
192.168.0.105 tcp ipp open RHOSTS => 192.168.0.105 msf > services -p Services
======== host port proto name state info
---- ---- ----- ---- ----- ----
192.168.0.105 tcp ftp open (vsFTPd 2.0.)\x0d\x0a

metasploit 中的DB的更多相关文章

  1. 扩展SQLite使其能从apk文件中读取db

    游戏中会大量使用到配置文件,每个项目组根据自己不同的需求会选择不同的存储格式,比如使用Json或者SQLite来存储数据.此处我们只对使用SQLite的情况来做讨论.一般情况下会选择把它放在可读写目录 ...

  2. grails项目中(DB的相关操作)

    grails项目中(DB的相关操作) save:保存Domain对象的数据到对应的库表中(可能是insert也可能是update) findBy: 动态方法,查找并返回第一条记录,方法名可以变化 eg ...

  3. Metasploit中aggregator插件无法使用

    Metasploit中aggregator插件无法使用   aggregator是Metasploit自带的一个插件,用来管理会话Session.该插件使用metasploit-aggreator库. ...

  4. 在myeclipse中配置DB Driver(数据库用MySql),并在myeclipse执行sql语句操作

    在myeclipse中配置DB Driver(数据库用MySql),并在myeclipse执行sql语句操作 MyEclipse6.5    ,  mysq驱动jar包为mysql-connector ...

  5. Kail Linux渗透测试教程之在Metasploit中扫描

    Kail Linux渗透测试教程之在Metasploit中扫描 在Metasploit中扫描 在Metasploit中,附带了大量的内置扫描器.使用这些扫描器可以搜索并获得来自一台计算机或一个完整网络 ...

  6. [书接上一回]在Oracle Enterprise Linux (v5.7) 中安装DB - (3/4)

    安装p10404530_112030_Linux-x86-64_6of7.zip解压下的example. 修改软件路径,为dbhome_1. 安装好数据,则可以进行快照操作! 删除安装文件. 输入db ...

  7. [书接上一回]在Oracle Enterprise Linux (v5.7) 中安装DB - (1/4)

    在上一回中,我们安装了OEL了,现在就要安装Oracle数据. 首先登录root用户,输入账号密码或,输入命令行:startx,启动图形界面. 先将虚拟机中插入光碟(Enterprise-R5-U7- ...

  8. [书接上一回]在Oracle Enterprise Linux (v5.7) 中安装DB - (2/4)

    在最后一行,书写shmfs /dev/shm tmpfs size=2g 0 用来调高数据库运行是的内存分配问题. 创建需要的路径和分配权限. 设置 oracle 用户环境参数. 修改标头显示的部分. ...

  9. [书接上一回]在Oracle Enterprise Linux (v5.7) 中安装DB - (4/4)

    选择自己创建的安装数据库路径. Sample Schemas 打钩. 调整内存大小. 选择官方建议的字符集编码. 是否创建创建的脚本,如需要请打钩. 脚本生成成功. 创建成功,如需要,则可以管理数据库 ...

随机推荐

  1. 通过URI返回File文件

    /** * 通过Uri返回File文件 * 注意:通过相机的是类似content://media/external/images/media/97596 * 通过相册选择的:file:///stora ...

  2. 如何安装Node.js环境

    一.在Windows系统下安装Node.js环境 1. 下载地址:官网http://nodejs.org/ 2.   安装nodejs,根据自己情况,安装路径 D:\Program Files\nod ...

  3. Ogre 编辑器一(MyGUI+Ogre整合与主界面)

    在查看Ogre例子时,想看材质要里的纹理,着色器代码都需要每个去查找,非常麻烦.也想看更新每个Ogre里的对象后有什么效果.然后看到Compositor组件与粒子组件时,想到能实时编辑着色器代码实时更 ...

  4. chromedriver与chrome版本映射表(更新至v2.30)

    在 chrome://help/ 查看浏览器版本号 看到网上基本没有最新的chromedriver与chrome的对应关系表,便兴起整理了一份如下,希望对大家有用: chromedriver版本 支持 ...

  5. 三个支持正则表达式的行处理的工具: grep/sed/awk

    grep: 全称Global Regular Expression Print, 是干什么的,不多说了: 用法:grep [-options] [pattern] [filename] 选项: -c: ...

  6. 图形界面至少要有一个顶级Swing容器

    图形界面至少要有一个顶级Swing容器 顶级Swing容器为其它Swing组件在屏幕上的绘制和处理事件提供支持 常用的顶级容器: JFrame(框架):表示主程序窗口 JDialog(对话框):每个J ...

  7. 嵌入式开发之zynq——zynq开发环境搭建

    http://blog.csdn.net/shushm/article/details/51728690 http://www.cnblogs.com/fpga/p/4593602.html http ...

  8. ViewBag和ViewDate以及TempDate的区别

    简单的说,就是   ViewBag 和  ViewData 是数据共享的(他们都是共享 ViewData 的数据),ViewBag 实际就是对 ViewData的一个操作的封装.  区别 : View ...

  9. IDEA VS 快捷键 大全

    [参考]IntelliJ IDEA 常用 黄金 快捷键  总结 不断更新     一.VS常用快捷键 (01).快速插入foreach.try等循环:Tab + Tab; (02).回到光标前一位置: ...

  10. pycharm环境下:同文件夹下文件(.py)之间的调用,出现红线问题

    只要将pycharm下打开项目后: 将你运行文件(.py)的项目设置为根目录,就不会出现红色线: