Defense: Security & Protection الدفاع: الأمن والحماية (Security & Protection)
Guarding the system. From Malware and Buffer Overflows to the Access Matrix and Protection Domains. حماية النظام. من البرمجيات الخبيثة وتجاوز سعة المخزن المؤقت (Buffer Overflows) إلى مصفوفة الوصول ونطاقات الحماية.
Security Violations الانتهاكات الأمنية
A system is secure if resources are used and accessed as intended.
Threat: Potential for violation.
Attack: Attempt to breach security (Accidental or Malicious).
يكون النظام آمناً إذا تم استخدام الموارد والوصول إليها كما هو مخطط.
تهديد (Threat): احتمالية حدوث انتهاك.
هجوم (Attack): محاولة لخرق الأمن (عرضية أو خبيثة).
- Confidentiality: Unauthorized reading. السرية (Confidentiality): قراءة غير مصرح بها.
- Integrity: Unauthorized modification. النزاهة (Integrity): تعديل غير مصرح به.
- Availability: Destruction of data. التوافر (Availability): تدمير البيانات.
- Theft of Service: Unauthorized use (e.g., crypto mining). سرقة الخدمة: استخدام غير مصرح به (مثل تعدين العملات).
- Denial of Service (DoS): Preventing legitimate use. هجوم الحرمان من الخدمة (DoS): منع الاستخدام المشروع.
- Masquerading: Pretending to be someone else. انتحال الشخصية (Masquerading): التظاهر بأنك شخص آخر.
- Replay Attack: Repeating a valid transmission. هجوم الإعادة (Replay Attack): تكرار إرسال صالح.
- Man-in-the-Middle: Intercepting/modifying data. الرجل في المنتصف (MITM): اعتراض/تعديل البيانات.
- Session Hijacking: Taking over an active session. اختطاف الجلسة: الاستيلاء على جلسة نشطة.
Program Threats تهديدات البرامج
Trojan Horse Trojan Horse (حصان طروادة)
Code segment that misuses its environment.
Looks like a useful program (e.g., game, editor) but performs malicious acts using the user's privileges.
جزء من كود يسيء استخدام بيئته.
يبدو كبرنامج مفيد (مثل لعبة، محرر نصوص) لكنه يقوم بأعمال خبيثة باستخدام صلاحيات المستخدم.
Virus Virus (فيروس)
Fragment of code embedded in a legitimate program.
Key Feature: Self-replicating. Infects other programs.
Specific to CPU architecture / OS.
جزء من كود مضمن في برنامج شرعي.
الميزة الرئيسية: تكرار ذاتي. يصيب البرامج الأخرى.
محدد بمعمارية المعالج / نظام التشغيل.
Worm Worm (دودة)
Standalone program. Uses the network to replicate itself.
Consumes system resources (CPU, Network Bandwidth) causing DoS.
Example: Morris Worm.
برنامج مستقل. يستخدم الشبكة لنسخ نفسه.
يستهلك موارد النظام (المعالج، عرض النطاق الترددي للشبكة) مسبباً DoS.
مثال: دودة Morris.
Stack & Buffer Overflow Stack & Buffer Overflow
Exploits a bug where input exceeds the buffer size.
Overwrites the Return Address on the stack to point to malicious code (Shellcode).
يستغل خطأ حيث يتجاوز الإدخال حجم المخزن المؤقت (Buffer).
يكتب فوق عنوان العودة (Return Address) في الـ Stack ليشير إلى كود خبيث (Shellcode).
Protection Mechanisms آليات الحماية
Principle of Least Privilege مبدأ الأقل امتيازاً (Least Privilege)
Programs, users, and systems should be given just enough privileges to perform their tasks.
Limits the damage if a component is compromised.
يجب منح البرامج والمستخدمين والأنظمة صلاحيات كافية فقط لأداء مهامهم.
يحد من الضرر إذا تم اختراق مكون ما.
Domain of Protection نطاق الحماية (Domain of Protection)
A computer system is a collection of processes and objects.
Domain: A set of Access Rights.
Access Right: <object-name, rights-set> (e.g., <file1, {read, write}>).
نظام الحاسوب هو مجموعة من العمليات والكائنات.
النطاق (Domain): مجموعة من حقوق الوصول.
حق الوصول: <اسم الكائن، مجموعة الحقوق> (مثال: <file1, {read, write}>).
Access Matrix مصفوفة الوصول (Access Matrix)
A general model of protection.
Rows: Domains (Users/Processes).
Columns: Objects (Files/Printers).
نموذج عام للحماية.
الصفوف: النطاقات (مستخدمون/عمليات).
الأعمدة: الكائنات (ملفات/طابعات).
| Domain / Object نطاق / كائن | File 1 | File 2 | File 3 | Printer طابعة |
|---|---|---|---|---|
| D1 | Read | Read | ||
| D2 | ||||
| D3 | Read, Write | Execute |
Access Control List (ACL) قائمة التحكم في الوصول (ACL)
Store the matrix by Column (Object).
Each object keeps a list: (Domain, Rights).
Example: File1: {(D1, Read), (D3, RW)}.
Efficient for: "Who can access this file?"
تخزين المصفوفة حسب العمود (الكائن).
يحتفظ كل كائن بقائمة: (النطاق، الحقوق).
مثال: File1: {(D1, Read), (D3, RW)}.
فعال لـ: "من يستطيع الوصول لهذا الملف؟"
Capability List قائمة القدرات (Capability List)
Store the matrix by Row (Domain).
Each domain keeps a list of objects it can access.
Example: D1: {(File1, Read), (File3, Read)}.
Efficient for: "What can this user do?" (Hard to revoke).
تخزين المصفوفة حسب الصف (النطاق).
يحتفظ كل نطاق بقائمة كائنات يمكنه الوصول إليها.
مثال: D1: {(File1, Read), (File3, Read)}.
فعال لـ: "ماذا يستطيع هذا المستخدم فعله؟" (صعب الإلغاء).
The Exam Vault خزنة الاختبار (Exam Vault)
Professor's Secrets & Trap Avoidance أسرار البروفيسور وتجنب الفخاخ
TRAP: Protection vs Security فخ: الحماية مقابل الأمن
Protection: Internal mechanism. Controls access of processes to resources (Access Matrix).
Security: External/Total mechanism. Dealing with threats (Virus, Worms, Physical theft).
Protection is a tool for Security.
الحماية (Protection): آلية داخلية. تتحكم في وصول العمليات للموارد (Access Matrix).
الأمن (Security): آلية خارجية/شاملة. التعامل مع التهديدات (فيروسات، ديدان، سرقة مادية).
الحماية هي أداة للأمن.
TRAP: Virus vs Worm فخ: الفيروس مقابل الدودة
Virus: Needs a host program to run. Infects files.
Worm: Standalone program. Uses network to spread. Does not need to infect files.
الفيروس: يحتاج لبرنامج مضيف ليعمل. يصيب الملفات.
الدودة: برنامج مستقل. تستخدم الشبكة للانتشار. لا تحتاج لإصابة ملفات.
SECRET: Revocation سر: الإلغاء (Revocation)
Revoking access in an ACL system is easy (just delete the entry from the file's list).
Revoking access in a Capability List system is hard (you have to find the user's capability pointer and delete it, which is distributed across the system).
إلغاء الوصول في نظام ACL سهل (فقط احذف الإدخال من قائمة الملف).
إلغاء الوصول في نظام Capability List صعب (يجب أن تجد مؤشر القدرة الخاص بالمستخدم وتحذفه، وهو موزع عبر النظام).
KEY CONCEPT: Lock-Key Mechanism مفهوم مفتاحي: آلية القفل والمفتاح
A compromise between ACL and Capability Lists.
Each Object has a "Lock" (bit pattern).
Each Domain has a "Key".
Access allowed only if Key matches Lock.
حل وسط بين ACL وقوائم القدرات.
كل كائن لديه "قفل" (نمط بت).
كل نطاق لديه "مفتاح".
يسمح بالوصول فقط إذا طابق المفتاح القفل.