简介
框架和相关术语简介:
Vulnerability:允许攻击者入侵或危害系统安全性的弱点称为漏洞,漏洞可能存在于操作系统,应用软件甚至网络协议中。
Exploit:攻击代码或程序,它允许攻击者利用易受攻击的系统并危害其安全性。每个漏洞都有对应的漏洞利用程序。Metasploit有超过 1700 个漏洞利用程序。
Payload:攻击载荷。它主要用于建立攻击者和受害者机器直接的连接,Metasploit有超过 500个有效攻击载荷。
Module:模块是一个完整的构件,每个模块执行特定的任务,并通过几个模块组成一个单元运行。这种架构的好处是可以很容易的将自己写的利用程序和工具集成到框架中。
使用方法
在MSF里面msfconsole可以说是最流行的一个接口程序。很多人一开始碰到msfconsole的时候就害怕了。那么多复杂的命令语句需要学习,但是msfconsole真的是一个强大的接口程序。Msfconsole提供了一个一体化的集中控制台。通过msfconsole,你可以访问和使用所有的metasploit的插件,payload,利用模块,post模块等等。Msfconsole还有第三方程序的接口,比如nmap,sqlmap等,可以直接在msfconsole里面使用。

大家可以直接在命令行窗口输入

msf5 > help
Core Commands
=============
    Command       Description
    -------       -----------
    ?             Help menu
    banner        Display an awesome metasploit banner
    cd            Change the current working directory
    color         Toggle color
    connect       Communicate with a host
    exit          Exit the console
    get           Gets the value of a context-specific variable
    getg          Gets the value of a global variable
    grep          Grep the output of another command
    help          Help menu
    history       Show command history
    load          Load a framework plugin
    quit          Exit the console
    repeat        Repeat a list of commands
    route         Route traffic through a session
    save          Saves the active datastores
    sessions      Dump session listings and display information about sessions
    set           Sets a context-specific variable to a value
    setg          Sets a global variable to a value
    sleep         Do nothing for the specified number of seconds
    spool         Write console output into a file as well the screen
    threads       View and manipulate background threads
    tips          Show a list of useful productivity tips
    unload        Unload a framework plugin
    unset         Unsets one or more context-specific variables
    unsetg        Unsets one or more global variables
    version       Show the framework and console library version numbers
Module Commands
===============
    Command       Description
    -------       -----------
    advanced      Displays advanced options for one or more modules
    back          Move back from the current context
    clearm        Clear the module stack
    info          Displays information about one or more modules
    listm         List the module stack
    loadpath      Searches for and loads modules from a path
    options       Displays global options or for one or more modules
    popm          Pops the latest module off the stack and makes it active
    previous      Sets the previously loaded module as the current module
    pushm         Pushes the active or list of modules onto the module stack
    reload_all    Reloads all modules from all defined module paths
    search        Searches module names and descriptions
    show          Displays modules of a given type, or all modules
    use           Interact with a module by name or search term/index
Job Commands
============
    Command       Description
    -------       -----------
    handler       Start a payload handler as job
    jobs          Displays and manages jobs
    kill          Kill a job
    rename_job    Rename a job
    
Database Backend Commands
=========================
    Command           Description
    -------           -----------
    analyze           Analyze database information about a specific address or address range
    db_connect        Connect to an existing data service
    db_disconnect     Disconnect from the current data service
    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_rebuild_cache  Rebuilds the database-stored module cache (deprecated)
    db_remove         Remove the saved data service entry
    db_save           Save the current data service connection as the default to reconnect on startup
    db_status         Show the current data service 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
search参数
你使用
先查看
msf5 > search -h Usage: search [<options>] [<keywords>:<value>] ? Prepending a value with '-' will exclude any matching results. If no options or keywords are provided, cached results are displayed. ? OPTIONS: -h Show this help information -o <file> Send output to a file in csv format -S <string> Regex pattern used to filter search results -u Use module if there is one result ? Keywords: aka : Modules with a matching AKA (also-known-as) name author : Modules written by this author arch : Modules affecting this architecture bid : Modules with a matching Bugtraq ID cve : Modules with a matching CVE ID edb : Modules with a matching Exploit-DB ID check : Modules that support the 'check' method date : Modules with a matching disclosure date description : Modules with a matching description fullname : Modules with a matching full name mod_time : Modules with a matching modification date name : Modules with a matching descriptive name path : Modules with a matching path platform : Modules affecting this platform port : Modules with a matching port rank : Modules with a matching rank (Can be descriptive (ex: 'good') or numeric with comparison operators (ex: 'gte400')) ref : Modules with a matching ref reference : Modules with a matching reference target : Modules affecting this target type : Modules of a specific type (exploit, payload, auxiliary, encoder, evasion, post, or nop) ? Examples: search cve:2009 type:exploit search cve:2009 type:exploit platform:-linux ?
通过名称查找
查找名称含有
msf5 > search name:sql

通过模块查找
Metasploit上只有三中模块可以利用:
- 
第一种是 exploit模块 ,也就是利用模块,包含主流的漏洞利用脚本,通常是对某些可能存在漏洞的目标进行漏洞利用。命名规则:操作系统/各种应用协议分类 。
- 
第二种是 auxiliary模块 ,辅助模块,辅助渗透(端口扫描、登录密码爆破、漏洞验证等)。
- 
第三种是 post模块 ,后渗透阶段模块,漏洞利用成功获得meterpreter之后,向目标发送的一些功能性指令,如:提权等。
search name:mysql type:exploit

使用一个模块
通过


使用完一个模块之后,可以使用

再次使用

使用










在

CSDN大礼包:《黑客&网络安全入门&进阶学习资源包》免费分享??
??朋友们如果有需要全套《黑客&网络安全入门&进阶学习资源包》,可以扫描下方二维码免费领取
 ?
 ?
1??零基础入门
① 学习路线
对于从来没有接触过网络安全的同学,我们帮你准备了详细的学习成长路线图。可以说是最科学最系统的学习路线,大家跟着这个大的方向学习准没问题。

② 路线对应学习视频
同时每个成长路线对应的板块都有配套的视频提供:

因篇幅有限,仅展示部分资料
2??视频配套资料&国内外网安书籍、文档
① 文档和书籍资料

② 黑客技术

因篇幅有限,仅展示部分资料
3??网络安全源码合集+工具包

4??网络安全面试题

 上述所有资料 ?? ,朋友们如果有需要全套 ??《网络安全入门+进阶学习资源包》,可以扫描下方二维码免费领取 ??
 ?