metasploit 中 exploit模块check方法简介
Exploit模块的check方法用来检测一台远程主机是否有漏洞能够被利用。
check方法默认的实施仅返回check方法不被Exploit模块支持。
当然,一个完整的代码能够从check方法返回如下表所示的信息。
如果在我们编写Exploit模块的时候没有编写check方法,当我们在Msfconsole中输入check时,会调用 Msf::Module 中定义好的check方法,并返回 Msf::Exploit::CheckCode::Unsupported 这个常量。
根据Ruby语法,当我们在Exploit模块中再次定义check方法时,便会覆盖继承的check方法,从而我们可以具体情况选择返回值,例如:
def checkif ***return Exploit::CheckCode::Vulnerableendreturn Exploit::CheckCode::Safe
end
所有的常量信息在Msf::Exploit::CheckCode模块中定义如下:
Unknown = [ 'unknown', "Cannot reliably check exploitability."] |
Can't tell if the target is exploitable or not. This is recommended if the module fails to retrieve enough information from the target machine, such as due to a timeout. |
Safe = [ 'safe', "The target is not exploitable." ] |
The target is safe and is therefore not exploitable. This is recommended after the check fails to trigger the vulnerability, or even detect the service. |
Detected = [ 'detected', "The target service is running, but could not be validated." ] |
The target is running the service in question, but the check fails to determine whether the target is vulnerable or not. |
Appears = [ 'appears', "The target appears to be vulnerable." ] |
The target appears to be vulnerable. This is recommended if the vulnerability is determined based on passive reconnaissance. For example: version, banner grabbing, or having the resource that's known to be vulnerable. |
Vulnerable = [ 'vulnerable', "The target is vulnerable." ] |
The target is vulnerable. Only used if the check is able to actually take advantage of the bug, and obtain hard evidence. For example: executing a command on the target machine, and retrieve the output. |
Unsupported = [ 'unsupported', "This exploit does not support check." ] |
The exploit does not support the check method. |
常量数组中的第二个元素即为check方法的返回值,例如:
metasploit 中 exploit模块check方法简介相关推荐
- python添加自定义模块_Python中添加自定义模块的方法
Python中添加自定义模块的方法 发布时间:2020-07-17 14:01:03 来源:亿速云 阅读:95 作者:小猪 这篇文章主要讲解了Python中添加自定义模块的方法,内容清晰明了,对此有兴 ...
- 【转】关于python中re模块split方法的使用
注:最近在研究文本处理,需要用到正则切割文本,所以收索到了这篇文章,很有用,谢谢原作者. 原址:http://blog.sciencenet.cn/blog-314114-775285.html 关于 ...
- idea中web模块导入方法
idea中web模块导入方法: 一选择要导入的web模块(复制) 二复制到自己的项目下 此时这里还没有,因为此时的模块还没有导入idea中是看不见的, 三Ctrl+Alt+Shift+s打开项目结构界 ...
- Java中Thread类的方法简介
1.新建线程 Thread t1 = new Thread(); t1.start(); 新建线程,应该调用start()方法启动线程:如果直接调用run()方法,该方法也会执行,但会被当做一个普通的 ...
- 使用metasploit中Evasion模块
简介 几天前我说了kali这次更新我最关心的是metasploit升级到了5.0,5.0中有一个新的模块叫Evasion模块,这个模块可以轻松的创建反杀毒软件的木马,今天我们就来试一试 操作 首先打开 ...
- python中serial模块的使用_python中pyserial模块使用方法
一.概述 pyserial模块封装了对串口的访问. 二.特性 在支持的平台上有统一的接口. 通过python属性访问串口设置. 支持不同的字节大小.停止位.校验位和流控设置. 可以有或者没有接收超时. ...
- Python中os模块使用方法
os模块提供了对系统环境.文件.目录等操作系统级的接口函数.本文主要描述os模块和os.path模块常用函数以及常用实例. os模块函数 os.getcwd() 获取当前工作的目录. os.listd ...
- 4. Metasploit之Exploit模块
再学Metasploit 之前学习的Metasploit没有写笔记都忘掉了,这次叫完整的学习内容记录下来 1. Active Exploit 主动的 某种服务器开放的端口,攻击者主动发起漏洞利用代码, ...
- 为您解惑:jQuery中$.getJSON( )的使用方法简介之获取JSON格式的数据.........
jQuery中的$.getJSON( )方法函数主要用来从服务器加载json编码的数据,它使用的是GET HTTP请求. 使用方法:$.getJSON( url [, data ] [, succes ...
最新文章
- c++ 返回对象的引用要小心
- 纯国产敏捷项目管理软件,可基于scrum敏捷开发落地
- set OpenCV_ROOT
- PDO操作MYSQL
- Houdini FX 14 重磅推出!(附下载方式)
- asp.net core MVC 过滤器之ExceptionFilter过滤器(一)
- 华为 android9 信任app_搭载麒麟810处理器,华为Nova5i Pro的AI跑分创新高
- OpenCV进行图像相似度对比的几种办法
- tools URL 收集
- 一张图搞定Java设计模式——工厂模式! 就问你要不要学!
- 28款数据恢复软件对比测试
- 传奇世界凤凰登陆器格式说明
- LPDDR4 与 DDR4 与 LPDDR4x 内存:有何不同?
- 算符优先分析法-java实现
- vue移动端用什么数据可视化插件_AntV F2+vue-cli构建移动端可视化视图
- 互联网项目开发版本划分
- NOI2015酱油记
- 构造数学语言的根据是什么?
- 计算当前日期到指定日期的天数
- 华为ensp模拟器借助VMware虚拟机的NAT网卡实现上网