EKG Gadu 1.9~pre+r2855-3+b1 contains a local buffer overflow vulnerability in the username handling that allows local attackers to execute arbitrary code by supplying an oversized username string. Attackers can trigger the overflow in the strlcpy function by passing a crafted buffer exceeding 258 bytes to overwrite the instruction pointer and execute shellcode with user privileges.
CVE-2016-20047 is a local buffer overflow vulnerability in EKG Gadu 1.9 affecting username handling that allows local attackers to execute arbitrary code with user privileges. The vulnerability exploits improper bounds checking in the strlcpy function when processing usernames exceeding 258 bytes. With a CVSS score of 8.4 and no available patch, this poses a significant risk to systems running vulnerable versions, though exploitation requires local access.
Immediate Actions:
1. Inventory all systems running EKG Gadu 1.9 or earlier versions across your organization
2. Restrict local access to systems running vulnerable versions through access controls and privilege management
3. Implement application whitelisting to prevent unauthorized code execution
4. Monitor for suspicious process execution and memory access patterns
Patching Guidance:
5. Since no official patch is available, consider upgrading to alternative instant messaging solutions or newer versions if available
6. If upgrade is not immediately possible, apply the following compensating controls:
- Disable EKG Gadu if not critical to operations
- Run the application in a sandboxed environment with restricted privileges
- Implement strict input validation at the application wrapper level
Detection Rules:
7. Monitor for strlcpy function calls with buffer sizes exceeding 258 bytes
8. Alert on any process attempting to write to stack memory regions
9. Implement IDS/IPS rules to detect oversized username strings in EKG Gadu protocol traffic
10. Enable core dump analysis for EKG Gadu process crashes
الإجراءات الفورية:
1. قم بحصر جميع الأنظمة التي تقوم بتشغيل EKG Gadu 1.9 أو الإصدارات الأقدم عبر مؤسستك
2. قيد الوصول المحلي إلى الأنظمة الضعيفة من خلال عناصر التحكم في الوصول وإدارة الامتيازات
3. تطبيق قائمة بيضاء للتطبيقات لمنع تنفيذ الكود غير المصرح به
4. مراقبة تنفيذ العمليات المريبة وأنماط الوصول إلى الذاكرة
إرشادات التصحيح:
5. نظراً لعدم توفر تصحيح رسمي، فكر في الترقية إلى حلول المراسلة الفورية البديلة أو الإصدارات الأحدث إن أمكن
6. إذا لم تكن الترقية ممكنة على الفور، طبق عناصر التحكم التعويضية التالية:
- تعطيل EKG Gadu إذا لم يكن حرجاً للعمليات
- تشغيل التطبيق في بيئة معزولة برمجياً مع امتيازات مقيدة
- تطبيق التحقق الصارم من صحة الإدخال على مستوى غلاف التطبيق
قواعد الكشف:
7. مراقبة استدعاءات دالة strlcpy بأحجام مخزن مؤقت تتجاوز 258 بايت
8. تنبيه أي عملية تحاول الكتابة إلى مناطق ذاكرة المكدس
9. تطبيق قواعد IDS/IPS للكشف عن سلاسل أسماء المستخدمين الكبيرة في حركة بروتوكول EKG Gadu
10. تفعيل تحليل core dump لأعطال عملية EKG Gadu