Endian Firewall version 3.3.25 and prior allow authenticated users to execute arbitrary OS commands via the DATE parameter to /cgi-bin/logs_log.cgi. The DATE parameter value is used to construct a file path that is passed to a Perl open() call, which allows command injection due to an incomplete regular expression validation.
Endian Firewall versions 3.3.25 and prior contain a critical command injection vulnerability in the logs_log.cgi module that allows authenticated users to execute arbitrary OS commands via the DATE parameter. The vulnerability exploits incomplete regex validation in Perl's open() function, enabling attackers with valid credentials to gain full system compromise. This poses significant risk to Saudi organizations using Endian Firewall as perimeter security, particularly in banking and government sectors where firewall integrity is critical.
IMMEDIATE ACTIONS:
1. Identify all Endian Firewall instances in your environment running version 3.3.25 or earlier
2. Restrict administrative access to /cgi-bin/logs_log.cgi to trusted IP ranges only
3. Implement network-level access controls limiting who can reach the web management interface
4. Review authentication logs for suspicious DATE parameter usage patterns
5. Monitor for command injection indicators in firewall logs (backticks, $(), pipe characters in DATE fields)
PATCHING GUIDANCE:
- Contact Endian support immediately for patch availability timeline
- If no patch available within 30 days, plan firewall replacement or upgrade
- Test patches in isolated lab environment before production deployment
COMPENSATING CONTROLS (if patch unavailable):
1. Implement Web Application Firewall (WAF) rules blocking special characters in DATE parameter: [;|`$()&<>]
2. Deploy IDS/IPS signatures detecting command injection attempts to logs_log.cgi
3. Enforce multi-factor authentication for firewall administrative access
4. Implement strict input validation at network perimeter for management traffic
5. Enable comprehensive audit logging of all CGI parameter values
6. Isolate Endian management interface on separate administrative network
7. Implement file integrity monitoring on Endian system binaries and configuration
DETECTION RULES:
- Alert on HTTP requests to /cgi-bin/logs_log.cgi containing DATE parameter with: semicolons, backticks, $(), pipe operators, command substitution syntax
- Monitor Endian process execution logs for unexpected child processes spawned from Perl interpreter
- Track failed authentication attempts followed by successful access to logs_log.cgi
- Alert on modifications to firewall log files outside normal rotation windows
الإجراءات الفورية:
1. تحديد جميع مثيلات Endian Firewall في بيئتك التي تعمل بالإصدار 3.3.25 أو أقدم
2. تقييد الوصول الإداري إلى /cgi-bin/logs_log.cgi على نطاقات IP موثوقة فقط
3. تنفيذ عناصر التحكم في الوصول على مستوى الشبكة لتحديد من يمكنه الوصول إلى واجهة إدارة الويب
4. مراجعة سجلات المصادقة للأنماط المريبة في استخدام معامل DATE
5. مراقبة مؤشرات حقن الأوامر في سجلات جدار الحماية (علامات الاقتباس العكسية، $()، أحرف الأنابيب في حقول DATE)
إرشادات التصحيح:
- اتصل بدعم Endian على الفور للحصول على جدول زمني لتوفر التصحيح
- إذا لم يكن هناك تصحيح متاح خلال 30 يوماً، خطط لاستبدال جدار الحماية أو الترقية
- اختبر التصحيحات في بيئة معملية معزولة قبل نشر الإنتاج
عناصر التحكم التعويضية (إذا لم يكن التصحيح متاحاً):
1. تنفيذ قواعد جدار تطبيقات الويب (WAF) لحظر الأحرف الخاصة في معامل DATE: [;|`$()&<>]
2. نشر توقيعات IDS/IPS للكشف عن محاولات حقن الأوامر إلى logs_log.cgi
3. فرض المصادقة متعددة العوامل لوصول إدارة جدار الحماية
4. تنفيذ التحقق الصارم من المدخلات على محيط الشبكة لحركة الإدارة
5. تفعيل تسجيل التدقيق الشامل لجميع قيم معاملات CGI
6. عزل واجهة إدارة Endian على شبكة إدارية منفصلة
7. تنفيذ مراقبة سلامة الملفات على ملفات ثنائية Endian والتكوين
قواعد الكشف:
- تنبيه على طلبات HTTP إلى /cgi-bin/logs_log.cgi تحتوي على معامل DATE يحتوي على: فواصل منقوطة، علامات اقتباس عكسية، $()، عوامل الأنابيب، بناء جملة استبدال الأوامر
- مراقبة سجلات تنفيذ عملية Endian للعمليات الفرعية غير المتوقعة التي يتم إطلاقها من مترجم Perl
- تتبع محاولات المصادقة الفاشلة متبوعة بالوصول الناجح إلى logs_log.cgi
- تنبيه على التعديلات على ملفات سجل جدار الحماية خارج نوافذ الدوران العادية