ITCS 401 · Cyber-Physical Systems Security
Chapter 6: Authentication, Authorization & Accounting
الفصل السادس: المصادقة والتفويض والمحاسبة في أنظمة CPS
AAA Framework TACACS+ & RADIUS Bilingual Study Booklet · ملزمة ثنائية اللغة
ACADEZI
Detailed Teaching Guide · دليل تدريس مفصّل
مخرجات التعلم (Learning Outcomes) What students must be able to do after this chapter §1
  • فهم مفهوم المصادقة في أنظمة CPS: كيف يُتحقق من هوية المستخدمين والأجهزة قبل السماح لهم بالوصول.Understand authentication in CPS: how users/devices are verified before access is granted.
  • شرح دور التفويض في التحكم بالوصول: كيف يُحدد ما يُسمح للمستخدم المُصادق عليه فعله داخل النظام.Explain the role of authorization in controlling access to CPS resources.
  • تحديد التهديدات التي تؤثر على التوفر: التعرف على الهجمات والمخاطر التي تستهدف استمرارية عمل أنظمة CPS.Identify threats that affect system availability in CPS environments.
  • تقييم دور المحاسبة في الأمن: كيف تدعم المحاسبة إدارة الأمن والامتثال والتحقيق في الحوادث.Evaluate how accounting supports security management, compliance, and incident investigation.
ما هو إطار AAA؟ — المقدمة What is the AAA Framework? – Introduction §2
AAA هو إطار أمني أساسي في أنظمة الشبكات وأنظمة CPS. يتكون من ثلاثة مكونات متكاملة: Authentication (المصادقة) للتحقق من الهوية، Authorization (التفويض) للتحكم في الأذونات، وAccounting (المحاسبة) لتتبع الأنشطة وتسجيلها. معاً يشكّلون درع الأمن الكامل لأي نظام.
AAA is a fundamental security framework in networking and CPS. It consists of three integrated components: Authentication to verify identity, Authorization to control permissions, and Accounting to track and record activities. Together they form a complete security shield for any system.
🔐
Authentication
المصادقة
السؤال: من أنت؟
التحقق من هوية المستخدم أو الجهاز قبل السماح بالوصول.
Key Q: Who are you?
Verifying identity before granting access.
🛂
Authorization
التفويض
السؤال: ماذا يُسمح لك بفعله؟
تحديد الموارد والإجراءات المتاحة للمستخدم.
Key Q: What are you allowed to do?
Determining permitted actions/resources.
📋
Accounting
المحاسبة
السؤال: ما الذي تم فعله ومتى؟
تتبع وتسجيل جميع أنشطة النظام.
Key Q: What was done and by whom?
Tracking and recording all system activities.
جدول مقارنة AAA الشامل Comprehensive AAA Comparison Table §3
الجانب
Aspect
🔐 المصادقة
Authentication
🛂 التفويض
Authorization
📋 المحاسبة
Accounting
التعريفDefinition التحقق من هوية مستخدم أو جهاز قبل السماح بالوصولVerifying the identity of a user or device before granting access تحديد الإجراءات أو الموارد التي يُسمح للمستخدم المُصادق عليه الوصول إليهاDetermining what actions/resources an authenticated user is allowed to access تتبع وتسجيل أنشطة النظام لأغراض المراقبة والمراجعةTracking and recording system activities for monitoring and auditing
الغرض الرئيسيMain Purpose تأكيد الهويةConfirm identity التحكم في أذونات الوصولControl access permissions مراقبة وتسجيل استخدام النظامMonitor and record system usage
وظيفة الأمانSecurity Function منع المستخدمين غير المصرح لهم من الدخولPrevents unauthorized users from entering the system منع إساءة استخدام موارد النظام بتقييد الأذوناتPrevents misuse of system resources by limiting permissions الكشف عن السلوك المشبوه ودعم التحقيقDetect suspicious behavior and support auditing & investigation
التقنيات الشائعةCommon Techniques كلمات المرور، القياسات الحيوية، الشهادات الرقمية، MFAPasswords, biometrics, digital certificates, multi-factor authentication التحكم في الوصول القائم على الأدوار (RBAC)، قوائم التحكم (ACL)Role-Based Access Control (RBAC), Access Control Lists (ACL) ملفات السجل، مسارات التدقيق، أدوات المراقبةLog files, audit trails, monitoring tools
تصنيف المصادقة — أربعة عوامل Authentication Classification – The 4 Factors §4
يمكن تصنيف المصادقة بناءً على أربعة عوامل رئيسية. كل عامل يمثل نوعاً مختلفاً من الدليل الذي يُثبت به المستخدم هويته للنظام. استخدام أكثر من عامل معاً يُعطي مصادقة متعددة العوامل (MFA) أقوى بكثير.
Authentication is classified into four main factors. Each factor represents a different type of proof a user provides to the system. Combining more than one factor creates Multi-Factor Authentication (MFA), which is significantly stronger.
Factor 1 – Something You KNOW
🧠 شيء تعرفه
الهوية الشخصية (ID)، رقم التعريف الشخصي (PIN)، كلمة المرور (Password). هذا هو العامل الأكثر شيوعاً لكنه الأضعف لأنه يمكن سرقته أو تخمينه.
Personal ID, PIN, Password. Most common factor but weakest alone — can be stolen, guessed, or phished.
Factor 2 – Something You HAVE
🔑 شيء تمتلكه
بطاقات Token مثل SecureID، البطاقات الذكية (Smart Cards)، حلقات Java. شيء مادي في حوزتك يُثبت هويتك.
Token cards (SecureID), smart cards, Java rings. A physical item in your possession that proves identity.
Factor 3 – Something You ARE
🫆 شيء أنت عليه (البيومترية)
بصمة الأصابع، التعرف على الصوت، مسح الشبكية، التعرف على الوجه. صفة بيولوجية فريدة لا يمكن نسيانها أو سرقتها بسهولة.
Fingerprints, speech recognition, retina scan, facial recognition. Biological characteristics unique to the individual — hard to steal or forget.
Factor 4 – Something You BELONG TO
🏢 شيء تنتمي إليه
الشهادات الرقمية والتوقيعات الرقمية التي تُثبت انتماءك لبنية تحتية رقمية مؤسسية. تُستخدم في بيئات PKI والشبكات المؤسسية.
Digital certificates and digital signatures proving membership in a digital enterprise infrastructure. Used in PKI and enterprise networks.
⭐ المصادقة متعددة العوامل (MFA): تجمع بين أكثر من عامل لتحقيق أمان أقوى. مثال: PIN (شيء تعرفه) + بطاقة SecureID (شيء تمتلكه). إذا سُرق أحد العاملين، لا يزال المهاجم بحاجة للعامل الآخر.
⭐ Multi-Factor Authentication (MFA): Combines more than one factor for stronger security. Example: PIN (something you know) + SecureID card (something you have). If one factor is compromised, the attacker still needs the other.
أنماط المصادقة — محلية مقابل معتمدة على خادم Authentication Modes – Local AAA vs Server-Based AAA §5
Local AAA Authentication
🖥 المصادقة المحلية
يخزّن الراوتر قاعدة بيانات المستخدمين محلياً في ذاكرته.

الآلية: المستخدم يتصل → الراوتر يطلب اسم المستخدم وكلمة المرور → يُقارنها بقاعدة البيانات المحلية → يمنح الوصول أو يرفضه.

المميزات: بسيطة، لا تحتاج خادم خارجي.
العيوب: غير قابلة للتوسع، صعوبة الإدارة المركزية.
Router stores user database locally in memory.
Flow: User connects → Router prompts credentials → Compares to local DB → Grants/denies.
Pros: Simple, no external server needed.
Cons: Not scalable, no central management.
Server-Based AAA Authentication
☁ المصادقة القائمة على الخادم
يُعيد الراوتر توجيه طلبات المصادقة إلى خادم AAA مركزي (مثل Cisco Secure ACS).

الآلية: المستخدم يتصل → الراوتر يطلب البيانات → يُرسلها لـ ACS Server → الخادم يُصادق → يُرجع النتيجة للراوتر → الراوتر يمنح الوصول.

المميزات: قابل للتوسع، إدارة مركزية، تسجيل شامل.
العيوب: تعقيد أعلى، يتطلب خادماً مخصصاً.
Router forwards auth requests to a central AAA server (e.g., Cisco Secure ACS).
Flow: User connects → Router forwards to ACS → ACS authenticates → Returns result → Router grants/denies.
Pros: Scalable, centralized, full logging.
Cons: More complex, requires dedicated server.
تهيئة المصادقة المحلية — الخطوات العملية Configuring Local AAA Authentication – Practical Steps §6
1
إضافة أسماء المستخدمين وكلمات المرور لقاعدة البيانات المحلية
Add usernames & passwords to the local router database
إضافة المستخدمين الذين يحتاجون وصولاً إدارياً للراوتر إلى قاعدة البيانات المحلية.
Add users who need administrative access to the local router database.
2
تفعيل AAA على الراوتر بشكل عام
Enable AAA globally on the router
تفعيل خدمات AAA على مستوى الجهاز بأكمله قبل تهيئة أي معاملات.
Enable AAA services at the device level before configuring any parameters.
3
تهيئة معاملات AAA على الراوتر
Configure AAA parameters on the router
تحديد طرق المصادقة (الافتراضية أو المسماة) وترتيب أولوياتها.
Define authentication methods (default or named) and their priority order.
4
التحقق من تهيئة AAA واستكشاف الأخطاء
Confirm and troubleshoot the AAA configuration
اختبار الإعدادات والتحقق من صحتها، ومعالجة أي أخطاء في التهيئة.
Test settings, verify correctness, and fix any configuration errors.
Cisco IOS – Local AAA Configuration Commands
# الخطوة 1: إضافة مستخدم محلي / Step 1: Add local user Router(config)# username admin privilege 15 secret StrongPass123 # الخطوة 2: تفعيل AAA / Step 2: Enable AAA globally Router(config)# aaa new-model # الخطوة 3: تهيئة طريقة المصادقة الافتراضية / Step 3: Configure default auth method Router(config)# aaa authentication login default local # الخطوة 4: التحقق / Step 4: Verify configuration Router# show aaa local user lockout Router# show aaa sessions
مفهوم التفويض بالتفصيل Authorization – In Depth §7
بعد أن يثبت المستخدم هويته (المصادقة)، يأتي دور التفويض لتحديد ماذا يُسمح له بفعله. التفويض هو عملية منح أو حجب الوصول إلى موارد وإجراءات محددة بناءً على سياسات معرّفة مسبقاً. في أنظمة CPS، هذا أمر بالغ الأهمية لأن السماح لشخص غير مؤهل بالوصول لوحدة تحكم صناعية قد يؤدي لكوارث.
After a user proves their identity (authentication), authorization determines what they are allowed to do. It is the process of granting or denying access to specific resources and actions based on predefined policies. In CPS, this is critical — allowing unauthorized access to an industrial controller could be catastrophic.
الفرق الجوهري بين المصادقة والتفويض:
المصادقة تُجيب على: "هل أنت من تدّعي أنك؟" — التحقق من الهوية.
التفويض تُجيب على: "هل مسموح لك بفعل هذا؟" — التحكم في الأذونات.
يجب أن يسبق التفويضَ دائماً مصادقةٌ ناجحة.
Key Difference:
Authentication asks: "Are you who you claim to be?" — Identity verification.
Authorization asks: "Are you allowed to do this?" — Permission control.
Authorization must always follow successful authentication.
التحكم في الوصول القائم على الأدوار (RBAC) Role-Based Access Control (RBAC) §8
RBAC هو أحد أشهر نماذج التفويض. بدلاً من منح الأذونات لكل مستخدم بشكل فردي، يتم تعريف أدوار (Roles) لكل منها مجموعة من الأذونات، ثم يُعيَّن كل مستخدم لدور أو أكثر. هذا يبسّط الإدارة ويُقلل الأخطاء.
RBAC is one of the most common authorization models. Instead of assigning permissions to individual users, roles are defined with sets of permissions, then users are assigned to one or more roles. This simplifies management and reduces errors.
الدورRoleالأذونات الممنوحةGranted Permissionsمثال في CPSCPS Example
مسؤول النظام (Admin)System Administratorوصول كامل: قراءة، كتابة، حذف، إعدادFull access: read, write, delete, configureإدارة وحدات التحكم الصناعيةManaging industrial controllers
مشغّل (Operator)Operatorقراءة وتشغيل العمليات فقطRead and start/stop operations onlyتشغيل الأجهزة في خط الإنتاجOperating production line machines
مراقب (Monitor)Monitorقراءة فقط — لا تعديلRead-only — no modificationsمراقبة لوحات البياناتViewing dashboards and sensor data
ضيف (Guest)Guestوصول محدود للغايةVery limited accessالاطلاع على التقارير العامة فقطView public reports only
قوائم التحكم في الوصول (ACL) — نهج آخر للتفويض Access Control Lists (ACL) – Another Authorization Approach §9
قائمة التحكم في الوصول (ACL) هي مجموعة من القواعد تحدد من يمكنه الوصول إلى موارد محددة وبأي طريقة. تُستخدم على مستوى الشبكة (تصفية حزم البيانات) أو على مستوى الموارد (الملفات، المجلدات، الأجهزة). كل قاعدة تحدد: المصدر، الوجهة، الإجراء (سماح أو رفض).
An ACL is a set of rules defining who can access specific resources and in what manner. Used at the network level (packet filtering) or resource level (files, folders, devices). Each rule specifies: source, destination, action (permit or deny).
Cisco IOS – ACL Example
# مثال على ACL ترقيمية / Numbered ACL Example Router(config)# access-list 10 permit 192.168.1.0 0.0.0.255 Router(config)# access-list 10 deny any # تطبيق ACL على الواجهة / Apply ACL to interface Router(config-if)# ip access-group 10 in # مثال AAA Authorization / AAA Authorization Example Router(config)# aaa authorization exec default group tacacs+ local
التفويض في AAA: عند تفعيل AAA Authorization، يسأل الراوتر خادم AAA: "هل يُسمح لهذا المستخدم بتنفيذ هذا الأمر أو الوصول لهذا المورد؟" الخادم يرد بـ Permit أو Deny بناءً على السياسات المعرّفة.
AAA Authorization: When AAA Authorization is enabled, the router asks the AAA server: "Is this user allowed to execute this command or access this resource?" The server responds with Permit or Deny based on defined policies.
TACACS+ مقابل RADIUS في التفويض TACACS+ vs RADIUS in Authorization §10
TACACS+ Authorization
TACACS+ والتفويض
يُفصل بين المصادقة والتفويض والمحاسبة. يمنح تحكماً دقيقاً على مستوى كل أمر CLI. مثالي لإدارة الأجهزة وتهيئتها.
Separates authentication from authorization. Provides granular control at the per-command CLI level. Ideal for device management and configuration.
RADIUS Authorization
RADIUS والتفويض
لا يُفصل بين المصادقة والتفويض — يجمعهما في نفس العملية. مناسب لتفويض الوصول للشبكة بشكل عام (VPN، شبكات لاسلكية).
Does NOT separate authentication from authorization — combines them. Suitable for general network access authorization (VPN, wireless networks).
مفهوم المحاسبة في AAA وأنظمة CPS AAA Accounting – Concept & Role in CPS §11
المحاسبة في AAA هي العملية التي تُسجّل وتتبّع جميع أنشطة المستخدمين على أجهزة CPS والشبكات. تُجيب على الأسئلة: من وصل؟ ماذا فعل؟ متى؟ وكم استغرق؟ هي الطبقة الثالثة والأخيرة في إطار AAA، ولا تمنع الوصول بل تُوثّق كل ما يحدث.
Accounting in AAA is the process that records and tracks all user activities on CPS devices and networks. It answers: Who accessed? What did they do? When? How long? It is the third and final layer of AAA — it doesn't prevent access but documents everything that happens.
أغراض المحاسبة في CPS:
① تسجيل أنشطة المستخدمين في النظام  ② تتبع الأوامر التي نفّذها المشغّلون  ③ مراقبة الوصول لأجهزة CPS مثل وحدات التحكم الصناعية وأجهزة IoT والشبكات الذكية  ④ دعم متطلبات التدقيق والامتثال التنظيمي  ⑤ الكشف المبكر عن الأنشطة غير المصرح بها أو المشبوهة.
AAA Accounting Purposes in CPS:
① Log user activities in the system  ② Track commands executed by operators  ③ Monitor access to CPS devices (industrial controllers, smart grid, IoT)  ④ Support security auditing and regulatory compliance  ⑤ Detect unauthorized or suspicious activities early.
مكونات سجل المحاسبة Components of an Accounting Record §12
المكوّنComponentالوصفDescriptionمثالExample
هوية المستخدمUser Identityاسم المستخدم أو الجهاز الذي وصل للنظامUsername or device that accessed the systemadmin / device-plc-01
وقت تسجيل الدخولLogin Timeالطابع الزمني لبداية الجلسةTimestamp when the session started2024-03-15 08:32:11
وقت تسجيل الخروجLogout Timeالطابع الزمني لنهاية الجلسةTimestamp when the session ended2024-03-15 10:15:44
الأوامر المُنفَّذةCommands Executedالإجراءات التي اتخذها المستخدمActions performed by the usershow run / conf t / reload
الجهاز الذي تم الوصول إليهDevice Accessedجهاز CPS أو النظام الفرعي المُستخدمWhich CPS device or subsystem was usedRouter-HQ / PLC-Line-3
أنواع المحاسبة في AAA — ستة أنواع Types of AAA Accounting Information – 6 Types §13
Network Accounting
🌐 محاسبة الشبكة
تتبع استخدام موارد الشبكة وجلسات الاتصال (بروتوكول PPP، SLIP).
Tracks network resource usage and communication sessions (PPP, SLIP).
Connection Accounting
🔗 محاسبة الاتصال
تسجيل معلومات الاتصالات الصادرة من الجهاز (Telnet، SSH، rlogin).
Records outbound connections from the device (Telnet, SSH, rlogin).
EXEC Accounting
💻 محاسبة EXEC
تتبع جلسات المستخدم في واجهة سطر الأوامر (بداية ونهاية الجلسة).
Tracks user EXEC shell sessions (start and end of CLI sessions).
System Accounting
⚙ محاسبة النظام
تسجيل أحداث النظام (إعادة التشغيل، تحميل الإعدادات، أحداث النظام).
Records system-level events (reloads, config loads, system events).
Command Accounting
📝 محاسبة الأوامر
تسجيل كل أمر CLI يُنفّذه المستخدم مع مستوى صلاحيته (Privilege Level).
Records every CLI command executed, with the user's privilege level.
Resource Accounting
📊 محاسبة الموارد
تتبع استهلاك الموارد (وقت المعالج، الذاكرة، عرض النطاق الترددي).
Tracks resource consumption (CPU time, memory, bandwidth used).
أهمية المحاسبة في أمن أنظمة CPS Why Accounting Matters in CPS Security §14
🔍 إمكانية التتبع
Traceability
توفّر المحاسبة سجلاً كاملاً بأفعال كل مشغّل، مما يُتيح التتبع الدقيق لأي تغيير أو حادثة.
Provides a complete record of every operator's actions, enabling precise tracking of any change or incident.
🕵 الكشف عن التهديدات الداخلية
Insider Threat Detection
تساعد في اكتشاف إساءة الاستخدام من الداخل — مثل مشغّل يُنفّذ أوامر خارج نطاق مهامه.
Helps detect internal misuse — e.g., an operator executing commands outside their role scope.
🔬 دعم التحقيق في الحوادث
Incident Investigation
توفّر السجلات أدلة موثّقة لفهم ما حدث أثناء حادثة أمنية وكيفية الاستجابة لها.
Provides documented evidence to understand what happened during a security incident and how to respond.
📋 الامتثال والمساءلة
Compliance & Accountability
تُلبّي متطلبات الامتثال التنظيمي وتُعزّز مساءلة الأفراد عن أفعالهم في النظام.
Meets regulatory compliance requirements and enforces individual accountability for system actions.
خصائص AAA المعتمدة على الخادم Server-Based AAA Characteristics & Benefits §15
في بيئات المؤسسات الكبيرة، تُصبح AAA المحلية غير كافية. AAA المعتمدة على الخادم تستخدم بروتوكولات موحّدة للتواصل بين الراوتر وخادم AAA المركزي، مما يُتيح إدارة مركزية لآلاف الأجهزة والمستخدمين.
In large enterprise environments, local AAA becomes insufficient. Server-based AAA uses standardized protocols for communication between the router and a central AAA server, enabling centralized management for thousands of devices and users.
✅ مزايا AAA المعتمدة على الخادم
Benefits of Server-Based AAA
• إدارة مركزية لجميع الأجهزة
• قاعدة بيانات موحّدة للمستخدمين
• تسجيل شامل ومركزي
• سهولة التوسع مع نمو الشبكة
• دعم سياسات أمان متقدمة
• Centralized management of all devices
• Unified user database
• Comprehensive centralized logging
• Scales with network growth
• Supports advanced security policies
🏛 Cisco Secure ACS
Cisco Secure ACS Server
Cisco Secure ACS (Access Control Server) هو الخادم المركزي الذي يُنفّذ سياسات AAA. يدعم كلاً من TACACS+ و RADIUS، ويُوفّر واجهة مركزية لإدارة المستخدمين والصلاحيات وسجلات المحاسبة.
Cisco Secure ACS is the central server executing AAA policies. Supports both TACACS+ and RADIUS, providing a central interface for managing users, permissions, and accounting logs.
مقارنة تفصيلية: TACACS+ مقابل RADIUS Detailed Comparison: TACACS+ vs RADIUS §16
الجانبAspectTACACS+RADIUS
المطوّرDeveloperسيسكو (Cisco)Cisco proprietaryمعيار مفتوح (RFC)Open standard (RFC 2865/2866)
بروتوكول النقلTransportTCP (المنفذ 49) — موثوقTCP (Port 49) — reliableUDP (المنفذ 1645/1646 أو 1812/1813)UDP (Port 1645/1646 or 1812/1813)
التشفيرEncryptionيُشفّر كامل حزمة البياناتEncrypts the entire packet bodyيُشفّر كلمة المرور فقطEncrypts password only
الفصل بين المكوناتAAA Separationيُفصل بين A, A, A بشكل كاملSeparates A, A, A completelyيجمع المصادقة والتفويضCombines authentication + authorization
دعم أوامر CLICLI Command Authorizationنعم — تحكم دقيق على كل أمرYes — granular per-command controlلا — لا يدعم التحكم بالأوامرNo — does not support per-command control
الاستخدام المثاليBest Use Caseإدارة أجهزة الشبكة (Routers, Switches)Network device managementمصادقة مستخدمي الشبكة (VPN، WiFi)Network user auth (VPN, wireless)
دعم متعدد البروتوكولاتMulti-protocol Supportخاص بشبكات IPIP networks primarilyيدعم بروتوكولات متعددةSupports multiple protocols
عملية مصادقة TACACS+ — خطوة بخطوة TACACS+ Authentication Process – Step by Step §17
USER / Client
Flow
ROUTER (NAS)
Phase 1 – Connection & Username Request
Connect
User initiates connection →
Receives
← START packet sent to TACACS+ server
→ ACS
← REPLY: prompt for username
← ACS
Phase 2 – Username & Password Exchange
username
User enters username →
→ ACS
← REPLY: prompt for password
← ACS
password
User enters password →
→ ACS
Phase 3 – Authentication Result
← ACCEPT / REJECT / ERROR / CONTINUE
← ACS
Access ✔
← Access Granted (if ACCEPT)
Grant
عملية مصادقة RADIUS — خطوة بخطوة RADIUS Authentication Process – Step by Step §18
يختلف RADIUS عن TACACS+ في أنه يُرسل اسم المستخدم وكلمة المرور معاً في رسالة واحدة (Access-Request) إلى خادم RADIUS. الخادم يرد بـ: Accept أو Reject أو Challenge (طلب معلومات إضافية).
RADIUS differs from TACACS+ in that it sends the username and password together in one message (Access-Request) to the RADIUS server. The server responds with: Accept, Reject, or Challenge (request for additional information).
USER
Messages
ROUTER (NAS)
Step 1 – User Connects & Provides Credentials
Connect + credentials
Username + Password →
Receives
Step 2 – Router Sends Access-Request to RADIUS Server
Access-Request (user + encrypted pwd) →
→ RADIUS
Step 3 – RADIUS Server Responds
← Access-Accept (with attributes)
← RADIUS
Access ✔
← Access Granted
Grant
Access-Accept يحتوي على: مستوى الصلاحية، مهلة الجلسة، عنوان IP المخصص، وأي قيود إضافية. هذه المعلومات تُحدد حدود ما يستطيع المستخدم فعله بعد الدخول.
Access-Accept contains: Privilege level, session timeout, assigned IP address, and any additional restrictions. This information defines the boundaries of what the user can do after login.
تهيئة AAA المعتمدة على الخادم — TACACS+ Configuring Server-Based AAA with TACACS+ §19
1
تفعيل AAA على الراوتر
Enable AAA globally
الأمر الأول الذي يجب تنفيذه قبل أي تهيئة AAA.
Must be the first command before any AAA configuration.
2
تحديد عنوان IP لخادم TACACS+
Specify the TACACS+ server IP address
إخبار الراوتر بمكان خادم AAA المركزي.
Tell the router where the central AAA server is located.
3
تهيئة المفتاح السري المشترك (Secret Key)
Configure the shared secret key
كلمة سر مشتركة بين الراوتر وخادم TACACS+ لتشفير الاتصال بينهما.
Shared secret between router and TACACS+ server to encrypt their communication.
4
تهيئة المصادقة لاستخدام خادم TACACS+
Configure authentication to use TACACS+ server
توجيه طلبات المصادقة إلى خادم TACACS+ مع احتياطي محلي في حالة عدم الوصول.
Direct authentication requests to TACACS+ server with local fallback if unreachable.
Cisco IOS – TACACS+ Server-Based AAA Configuration
# الخطوة 1: تفعيل AAA / Enable AAA Router(config)# aaa new-model # الخطوة 2: تحديد خادم TACACS+ / Specify TACACS+ server Router(config)# tacacs-server host 192.168.1.100 # الخطوة 3: المفتاح السري / Shared secret key Router(config)# tacacs-server key SecretKey2024 # الخطوة 4: تهيئة المصادقة / Configure authentication Router(config)# aaa authentication login default group tacacs+ local # تهيئة التفويض / Configure authorization Router(config)# aaa authorization exec default group tacacs+ local # تهيئة المحاسبة / Configure accounting Router(config)# aaa accounting exec default start-stop group tacacs+
تهيئة AAA المعتمدة على الخادم — RADIUS Configuring Server-Based AAA with RADIUS §20
Cisco IOS – RADIUS Server-Based AAA Configuration
# الخطوة 1: تفعيل AAA / Enable AAA Router(config)# aaa new-model # الخطوة 2: تحديد خادم RADIUS / Specify RADIUS server Router(config)# radius-server host 192.168.1.200 # الخطوة 3: المفتاح السري / Shared secret key Router(config)# radius-server key RadiusSecret2024 # الخطوة 4: تهيئة المصادقة / Configure authentication Router(config)# aaa authentication login default group radius local # التحقق من التهيئة / Verify configuration Router# show aaa servers Router# debug radius authentication
الضبط الدقيق لتهيئة المصادقة Fine-Tuning the Authentication Configuration §21
بعد التهيئة الأساسية لـ AAA، يمكن ضبطها بدقة أعلى لتحسين الأمان وإدارة المستخدمين المحظورين ومعرفة معرّفات الجلسات. هذا مهم لاستكشاف الأخطاء وتصحيحها في بيئات الإنتاج.
After basic AAA configuration, it can be fine-tuned for enhanced security, managing locked-out users, and tracking session IDs. Essential for troubleshooting in production environments.
Fine-Tuning Commands
# قفل المستخدم بعد محاولات فاشلة / Lock user after failed attempts Router(config)# aaa local authentication attempts max-fail 3 # عرض المستخدمين المحظورين / Display locked-out users Router# show aaa local user lockout # إلغاء قفل مستخدم / Unlock a specific user Router# clear aaa local user lockout username admin # عرض معرّف جلسة فريد / Show unique session ID Router# show aaa sessions # ضبط مهلة انتظار المصادقة / Set authentication timeout Router(config-line)# login authentication default Router(config-line)# exec-timeout 10 0 # 10 دقائق
طرق المصادقة الافتراضية والمسمّاة Default and Named Authentication Methods §22
الطريقة الافتراضية (Default): تُطبَّق على جميع واجهات الخط (Line interfaces) ما لم تُحدَّد طريقة مسمّاة. الطريقة المسمّاة (Named): تُطبَّق فقط على الواجهات التي تُشير إليها صراحةً. تُتيح سياسات مصادقة مختلفة لخطوط مختلفة.
Default method: Applied to all line interfaces unless a named method is specified. Named method: Applied only to interfaces that explicitly reference it. Allows different authentication policies for different lines.
Default vs Named Methods
# طريقة افتراضية / Default method (applies everywhere) Router(config)# aaa authentication login default group tacacs+ local # طريقة مسمّاة / Named method (for specific lines only) Router(config)# aaa authentication login CONSOLE-AUTH local # تطبيق الطريقة المسمّاة على خط Console / Apply to console line Router(config)# line console 0 Router(config-line)# login authentication CONSOLE-AUTH # تطبيق الطريقة الافتراضية على خطوط VTY / Default on VTY lines Router(config)# line vty 0 4 Router(config-line)# login authentication default
تهيئة محاسبة AAA — أوامر عملية Configuring AAA Accounting – Practical Commands §23
AAA Accounting Configuration Commands
# محاسبة EXEC (جلسات المستخدمين) / EXEC Accounting Router(config)# aaa accounting exec default start-stop group tacacs+ # محاسبة الأوامر (مستوى صلاحية 15) / Command Accounting (privilege 15) Router(config)# aaa accounting commands 15 default start-stop group tacacs+ # محاسبة الشبكة / Network Accounting Router(config)# aaa accounting network default start-stop group radius # محاسبة النظام / System Accounting Router(config)# aaa accounting system default start-stop group tacacs+ # عرض إحصائيات المحاسبة / Show accounting statistics Router# show aaa accounting # أنواع السجلات: start-stop | stop-only | none # start-stop → يُسجّل بداية ونهاية الجلسة # stop-only → يُسجّل نهاية الجلسة فقط # none → لا تسجيل
أنواع سجلات المحاسبة:
start-stop يُرسل سجل عند بداية الجلسة وآخر عند نهايتها — الأكثر شمولاً.
stop-only يُرسل سجلاً واحداً فقط عند انتهاء الجلسة.
none لا يُرسل أي سجلات — يُلغي المحاسبة.
Accounting Record Types:
start-stop Sends a record at session start AND end — most comprehensive.
stop-only Sends one record only at session end.
none No records sent — disables accounting.
أسئلة التدريب (مع الإجابات الصحيحة) Practice Questions – With Correct Answers Highlighted §24
Q1
ما الغرض الرئيسي للمصادقة في أنظمة CPS؟
What is the main purpose of authentication in CPS?
A. مراقبة نشاط المستخدم / Monitor user activity
B. التحقق من هوية مستخدم أو جهاز / Verify the identity of a user or device
C. إدارة عرض النطاق الترددي / Manage network bandwidth
D. تشفير الاتصالات / Encrypt communication
Q2
ما الغرض الرئيسي للتفويض (Authorization)؟
What is the main purpose of authorization?
A. التحقق من الهوية / Verifying identity
B. تشفير البيانات / Encrypting data
C. تحديد الإجراءات المسموح للمستخدم تنفيذها / Determining what actions a user can perform
D. تسجيل سجلات الشبكة / Recording network logs
Q3
أي أسلوب للتحكم في الوصول يُستخدم شائعاً في التفويض؟
Which access control method is commonly used in authorization?
A. التحكم في الوصول القائم على الأدوار (RBAC) / Role-Based Access Control
B. مفاتيح التشفير / Encryption Keys
C. جدران الحماية / Firewalls
D. تصفية الحزم / Packet Filtering
Q4
ما غرض المحاسبة في إطار AAA؟
What is the purpose of accounting in AAA?
A. تشفير نقل البيانات / Encrypt data transmissions
B. تتبع وتسجيل أنشطة النظام / Track and record system activities
C. مصادقة المستخدمين / Authenticate users
D. منع أعطال الشبكة / Prevent network failures
Q5
ماذا تستخدم مصادقة AAA المحلية للتحقق من هوية المستخدمين؟
What does Local AAA authentication use to verify users?
A. قاعدة بيانات سحابية / Cloud server database
B. قاعدة بيانات الراوتر المحلية / Local router database
C. سياسات جدار الحماية / Firewall policies
D. خادم مصادقة خارجي / External authentication server
Q6
أي البروتوكولات تُستخدم شائعاً في مصادقة AAA المعتمدة على الخادم؟
Which protocols are commonly used for server-based AAA authentication?
A. FTP و HTTP
B. TCP و UDP
C. TACACS+ و RADIUS
D. SSL و TLS
ملخص الفصل — النقاط الرئيسية للمراجعة Chapter Summary – Key Takeaways §25
  • AAA = المصادقة + التفويض + المحاسبة — ثلاث طبقات أمان متكاملة لا غنى عنها في أنظمة CPS.AAA = Authentication + Authorization + Accounting — three integrated security layers essential for CPS.
  • عوامل المصادقة الأربعة: شيء تعرفه + شيء تمتلكه + شيء أنت عليه + شيء تنتمي إليه. MFA يجمع أكثر من عامل.4 auth factors: Know + Have + Are + Belong to. MFA combines 2+ factors for stronger security.
  • AAA محلية مقابل معتمدة على خادم: المحلية بسيطة لكن غير قابلة للتوسع؛ المعتمدة على الخادم أقوى وأكثر مرونة.Local AAA: simple but not scalable. Server-based AAA: stronger, centralized, scalable.
  • TACACS+: بروتوكول سيسكو، TCP، يُشفّر كامل الحزمة، يُفصل AAA، مثالي لإدارة الأجهزة.TACACS+: Cisco protocol, TCP, full packet encryption, separates AAA, ideal for device management.
  • RADIUS: معيار مفتوح، UDP، يُشفّر كلمة المرور فقط، يجمع المصادقة والتفويض، مناسب للشبكات اللاسلكية والـ VPN.RADIUS: open standard, UDP, password-only encryption, combines auth+authz, good for VPN/WiFi.
  • أنواع محاسبة AAA الستة: شبكة + اتصال + EXEC + نظام + أوامر + موارد.6 accounting types: Network, Connection, EXEC, System, Command, Resource.
  • أهمية المحاسبة في CPS: تتبع الأنشطة + كشف التهديدات الداخلية + دعم التحقيق + الامتثال.Accounting importance: activity tracking + insider threat detection + incident investigation + compliance.