Metasploit使用简介(1)

 show命令

msfconsole中键入show,系统会显示Metasploit的所有模块,若想显示某一类型的模块可以加入模块名称,最常用的主要有一下三个:show payloadsshow exploitsshow auxiliary

msf>show auxiliary

 

Auxiliary

=========

 

   Name                                              Rank       Description

   ----                                              ----       -----------

   admin/backupexec/dump                             normal     Veritas Backup Exec Windows Remote File Access

   admin/backupexec/registry                         normal     Veritas Backup Exec Server Registry Access

……

show auxiliary显示Metasploit中的可用辅助模块列表,这些辅助模块包括scannerdosfuzzer

show exploits 显示Metasploit中包含的所有可以利用的攻击类型列表。

show payloads 显示Metasploit中可以在不同平台中可以在远程主机执行的代码,即shellcode注:在使用具体的exploit时,只显示该平台支持的payload,例如:在使用ms08-067时,只显示windows平台可以使用的payload

 show options 显示可利用模块exploit的设置、条件、描述等。在具体的模块中使用,后面use命令中会有实例。

show targets 显示可利用模块exploit支持的目标类型(操作系统、软件版本等)。在具体的模块中使用,后面use命令中会有实例。

show advanced 显示可利用模块exploit高级信息,自定义利用程序时使用。在具体的模块中使用,后面use命令中会有实例。

show encoders 显示可利用模块exploit的编码方式,在具体的模块中使用,后面set命令中会有实例。

  search命令

search 命令是最常用的命令之一,用于查找各种exploitpayloadauxiliary等,命令支持基于正则表达式的模糊查询。如下为查找ms08-067实例:

msf > search ms08-067

[*] Searching loaded modules for pattern 'ms08-067'...

 

Exploits

========

    Name                         Rank   Description

   ----                         ----   -----------nption

info命令

info用于显示特殊模块的详细信息,显示内容包括该模块的选项、目标及其它信息。以下是使用info命令显示ms08-067实例:

msf > info windows/smb/ms08_067_netapi

        Name: Microsoft Server Service Relative Path Stack Corruption

    Version: 9839

   Platform: Windows

 Privileged: Yes

    License: Metasploit Framework License (BSD)

       Rank: Great

 Provided by:

  hdm <hdm@metasploit.com>

  Brett Moore <brett.moore@insomniasec.com>

 Available targets:

  Id  Name

  --  ----

  0   Automatic Targeting

  1   Windows 2000 Universal

 ………

  60  Windows XP SP3 Turkish (NX)

 

Basic options:

  Name     Current Setting  Required  Description

  ----     ---------------  --------  -----------

  RHOST                     yes       The target address

  RPORT    445              yes       Set the SMB service port

  SMBPIPE  BROWSER          yes       The pipe name to use (BROWSER, SRVSVC)

 

Payload information:

  Space: 400

  Avoid: 8 characters

 

Description:

  This module exploits a parsing flaw in the path canonicalization

  code of NetAPI32.dll through the Server Service. This module is

  ……

  on 2003, along with other platforms, is still in development.References:

  http://cve.mitre.org/cgi-bin/cvename.cgi?name=2008-4250

use命令

use命令用于使用特殊的模块,如利用程序、shellcode或辅助模块等。以ms08-067为例,模块名称必须包含完整的路径,可以通过search命令搜索,以下还演示了show optionsshow targets命令的使用。

 

msf > use windows/smb/ms08_067_netapi

msf exploit(ms08_067_netapi) > show options

 

Module options:

 

   Name     Current Setting  Required  Description

   ----     ---------------  --------  -----------

   RHOST                     yes       The target address

   RPORT    445              yes       Set the SMB service port

   SMBPIPE  BROWSER          yes       The pipe name to use (BROWSER, SRVSVC)

 

Exploit target:

 

   Id  Name

   --  ----

   0   Automatic Targeting

 

msf exploit(ms08_067_netapi) > show targets

 

Exploit targets:

 

   Id  Name

   --  ----

   0   Automatic Targeting

………

  60  Windows XP SP3 Turkish (NX)

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值