Nmap 7.70 contains a denial of service vulnerability that allows local attackers to crash the application by processing malicious XML files with exponential entity expansion. Attackers can create a crafted XML file with nested entity definitions and open it through ZenMap's scan import functionality to cause the program to consume excessive system resources and crash.
CVE-2018-25282 is a denial of service vulnerability in Nmap 7.70 affecting the ZenMap GUI through XML entity expansion attacks. Local attackers can crash the application by importing malicious XML files with nested entity definitions, consuming excessive system resources. While the CVSS score is moderate (6.2), the lack of available patches and local attack vector pose operational risks to security teams relying on Nmap for vulnerability assessments.
Immediate Actions:
1. Upgrade Nmap to version 7.80 or later (released post-CVE disclosure)
2. Restrict ZenMap GUI access to trusted administrators only via file system permissions
3. Disable XML import functionality if not required for operations
Compensating Controls:
1. Implement input validation: scan and sanitize XML files before import using external XML validators
2. Run Nmap in isolated environments or containers to limit resource exhaustion impact
3. Monitor system resource usage during scan imports; set process resource limits (ulimit)
4. Use command-line Nmap instead of ZenMap GUI where possible to avoid XML parsing
5. Implement file integrity monitoring on scan result directories
Detection Rules:
1. Monitor for ZenMap process crashes or unexpected terminations
2. Alert on excessive CPU/memory consumption during XML import operations
3. Log and alert on attempts to import XML files from untrusted sources
4. Monitor for nested entity patterns in XML files: detect patterns like '<!ENTITY' appearing multiple times in single file
الإجراءات الفورية:
1. ترقية Nmap إلى الإصدار 7.80 أو أحدث (تم إصداره بعد الكشف عن CVE)
2. تقييد وصول واجهة ZenMap إلى المسؤولين الموثوقين فقط عبر أذونات نظام الملفات
3. تعطيل وظيفة استيراد XML إذا لم تكن مطلوبة للعمليات
الضوابط التعويضية:
1. تنفيذ التحقق من صحة الإدخال: فحص وتنظيف ملفات XML قبل الاستيراد باستخدام أدوات التحقق من XML الخارجية
2. تشغيل Nmap في بيئات معزولة أو حاويات لتحديد تأثير استنزاف الموارد
3. مراقبة استخدام موارد النظام أثناء استيراد المسح؛ تعيين حدود موارد العملية (ulimit)
4. استخدام سطر أوامر Nmap بدلاً من واجهة ZenMap GUI حيث أمكن لتجنب تحليل XML
5. تنفيذ مراقبة سلامة الملفات على دلائل نتائج المسح
قواعد الكشف:
1. مراقبة أعطال عملية ZenMap أو الإنهاء غير المتوقع
2. تنبيه على استهلاك CPU/الذاكرة المفرط أثناء عمليات استيراد XML
3. تسجيل والتنبيه على محاولات استيراد ملفات XML من مصادر غير موثوقة
4. مراقبة أنماط الكيانات المتداخلة في ملفات XML: الكشف عن أنماط مثل '<!ENTITY' تظهر عدة مرات في ملف واحد