metasploit 中的DB
发布日期:2021-09-08 01:45:05 浏览次数:41 分类:技术文章

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

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

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

metasploit 中的DB操作

msf > help databaseDatabase 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.105Services========host           port  proto  name  state  info----           ----  -----  ----  -----  ----192.168.0.105  21    tcp    ftp   open   220 (vsFTPd 2.0.6)\x0d\x0a192.168.0.105  22    tcp    ssh   open   SSH-2.0-OpenSSH_4.7p1 Debian-8192.168.0.105  631   tcp    ipp   open   RHOSTS => 192.168.0.105msf > services -p 21Services========host           port  proto  name  state  info----           ----  -----  ----  -----  ----192.168.0.105  21    tcp    ftp   open   220 (vsFTPd 2.0.6)\x0d\x0a

 

 

转载地址:https://blog.csdn.net/weixin_34310369/article/details/85600598 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:[3D跑酷] GameManager
下一篇:使用SetUnhandledExceptionFilter转储程序崩溃时内存DMP .

发表评论

最新留言

初次前来,多多关照!
[***.217.46.12]2024年04月17日 00时54分11秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章

SpringMVC快速入门(2)商品列表的加载 2019-04-26
SpringMVC快速入门(3)默认组件加载 2019-04-26
SpringMVC快速入门(4)SpringMVC整合Mybatis,SpringMVC参数绑定 2019-04-26
Java 解决SpringMVC的post请求乱码的问题 2019-04-26
SpringMVC快速入门(5)高级参数的绑定,@RequestMapping注解的用法,Controller方法返回值,SpringMVC当中的异常处理 2019-04-26
Java SSM 项目实战 day02 功能介绍,SSM整合,数据库和IDEA的maven工程搭建,产品信息查询和添加 2019-04-26
Java SSM 项目实战 day03 功能介绍,订单的操作,订单的增删改查 2019-04-26
Java SSM 项目实战 day04 功能介绍,订单的操作,订单的增删改查,实现登录功能 2019-04-26
Android Studio 实现登录注册-源代码 (连接MySql数据库) 2019-04-26
C/C++语言数据结构快速入门(一)(代码解析+内容解析)数据结构基本内容和线性表 2019-04-26
Android Studio 实现登录注册-源代码 二(Servlet + 连接MySql数据库) 2019-04-26
Java SSM 项目实战 day05 用户操作 2019-04-26
第七届 互联网+大赛 报名详细流程 全国大学生创业网 (保姆级指南:如何同意对方邀请) 2019-04-26
Java SSM 项目实战 day06 角色操作,资源权限操作 2019-04-26
Java SSM 项目实战 day07 SpringSecurity源码分析 2019-04-26
Android Studio 实现实现学生信息的查询 -源代码 三(Servlet + 连接MySql数据库) (JSON通信) 2019-04-26
Android Studio 实现实现学生信息的增删改查 -源代码 四(Servlet + 连接MySql数据库) 2019-04-26
Java SSM 项目实战 day07用户角色关联操作,添加角色,以及添加权限 2019-04-26
Java SSM 项目实战 day08 方法级别的权限操作 服务器端的权限控制(JSR-250注解)(支持表达式的注解)(@Secured)以及页面端的权限控制 2019-04-26
(精华)2020年6月25日 JavaScript高级篇 对象属性 2019-04-26