Introduction to Network Security

1. Fundamental Concepts of Network Security

1.1 Definition (นิยามความปลอดภัยเครือข่าย)

ความปลอดภัยเครือข่าย (Network Security) คือ กระบวนการและเทคโนโลยีที่ออกแบบมาเพื่อปกป้องความสมบูรณ์ (Integrity) ความลับ (Confidentiality) และความพร้อมใช้งาน (Availability) ของข้อมูลและทรัพยากรในระบบเครือข่ายคอมพิวเตอร์

องค์ประกอบหลักของความปลอดภัยเครือข่าย:

ตัวอย่างสถานการณ์:

%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#282828','primaryTextColor':'#ebdbb2','primaryBorderColor':'#d65d0e','lineColor':'#98971a','secondaryColor':'#3c3836','tertiaryColor':'#504945','background':'#282828','mainBkg':'#3c3836','secondBkg':'#504945','textColor':'#ebdbb2','border1':'#d65d0e','border2':'#98971a'}}}%%
graph TB
    A[Network Security
ความปลอดภัยเครือข่าย] --> B[Confidentiality
ความลับ] A --> C[Integrity
ความสมบูรณ์] A --> D[Availability
ความพร้อมใช้] A --> E[Authentication
การพิสูจน์ตัวตน] A --> F[Non-repudiation
การไม่ปฏิเสธ] style A fill:#d65d0e,stroke:#ebdbb2,stroke-width:3px,color:#282828 style B fill:#98971a,stroke:#ebdbb2,color:#282828 style C fill:#98971a,stroke:#ebdbb2,color:#282828 style D fill:#98971a,stroke:#ebdbb2,color:#282828 style E fill:#458588,stroke:#ebdbb2,color:#282828 style F fill:#458588,stroke:#ebdbb2,color:#282828

1.2 CIA Triad (โมเดลหลัก)

CIA Triad เป็นแบบจำลองพื้นฐานที่สุดของความปลอดภัยสารสนเทศ ประกอบด้วย 3 หลักการหลัก:

1.2.1 Confidentiality (ความลับ)

คำนิยาม: การรับประกันว่าข้อมูลจะถูกเข้าถึงได้เฉพาะโดยบุคคลที่ได้รับอนุญาตเท่านั้น

วิธีการรักษาความลับ:

ตัวอย่างการละเมิดความลับ:

สูตรการวัดระดับความลับ:

C = N U N × 100 %

โดยที่:

1.2.2 Integrity (ความสมบูรณ์)

คำนิยาม: การรับประกันว่าข้อมูลจะไม่ถูกแก้ไขหรือทำลายโดยไม่ได้รับอนุญาต และสามารถตรวจสอบความถูกต้องได้

วิธีการรักษาความสมบูรณ์:

ตัวอย่างการละเมิดความสมบูรณ์:

1.2.3 Availability (ความพร้อมใช้งาน)

คำนิยาม: การรับประกันว่าข้อมูลและระบบจะพร้อมใช้งานเมื่อผู้ใช้ที่ได้รับอนุญาตต้องการเข้าถึง

การวัดความพร้อมใช้ (Availability Calculation):

A = Uptime Uptime + Downtime × 100 %

โดยที่:

SLA Standards:

%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#282828','primaryTextColor':'#ebdbb2','primaryBorderColor':'#d65d0e','lineColor':'#98971a','secondaryColor':'#3c3836','tertiaryColor':'#504945','background':'#282828','mainBkg':'#3c3836','secondBkg':'#504945','textColor':'#ebdbb2','border1':'#d65d0e','border2':'#98971a'}}}%%
graph LR
    subgraph CIA["CIA Triad"]
        C[Confidentiality
ความลับ

Encryption
Access Control
Authentication] I[Integrity
ความสมบูรณ์

Hashing
Digital Signatures
Checksums] A[Availability
ความพร้อมใช้

Redundancy
Load Balancing
DDoS Protection] end C -.-> I I -.-> A A -.-> C style C fill:#b16286,stroke:#ebdbb2,stroke-width:2px,color:#282828 style I fill:#d79921,stroke:#ebdbb2,stroke-width:2px,color:#282828 style A fill:#689d6a,stroke:#ebdbb2,stroke-width:2px,color:#282828

1.3 Risk Concepts (แนวคิดเรื่องความเสี่ยง)

ความเสี่ยงทางความปลอดภัย (Security Risk) คือ โอกาสที่จะเกิดเหตุการณ์ที่ไม่พึงประสงค์ซึ่งอาจส่งผลกระทบต่อความปลอดภัยของระบบ

สูตรการคำนวณความเสี่ยง:

Risk = Threat × Vulnerability × Impact

หรือในรูปแบบที่ใช้กันทั่วไป:

Risk = Likelihood × Impact

โดยที่:

Risk Treatment Options:

  1. Risk Avoidance (การหลีกเลี่ยง): ยกเลิกกิจกรรมที่มีความเสี่ยง
  2. Risk Mitigation (การลดความเสี่ยง): ลดโอกาสหรือผลกระทบ
  3. Risk Transfer (การถ่ายโอนความเสี่ยง): โอนความเสี่ยงให้ผู้อื่น
  4. Risk Acceptance (การยอมรับความเสี่ยง): ยอมรับความเสี่ยงและผลที่ตามมา
%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#282828','primaryTextColor':'#ebdbb2','primaryBorderColor':'#d65d0e','lineColor':'#98971a','secondaryColor':'#3c3836','tertiaryColor':'#504945','background':'#282828','mainBkg':'#3c3836','secondBkg':'#504945','textColor':'#ebdbb2','border1':'#d65d0e','border2':'#98971a'}}}%%
graph TD
    A[Risk Assessment
การประเมินความเสี่ยง] --> B[Identify Assets
ระบุทรัพย์สิน] A --> C[Identify Threats
ระบุภัยคุกคาม] A --> D[Identify Vulnerabilities
ระบุจุดอ่อน] B --> E[Risk Analysis
วิเคราะห์ความเสี่ยง] C --> E D --> E E --> F[Calculate Risk Level
คำนวณระดับความเสี่ยง] F --> G{Risk Level
ระดับความเสี่ยง} G -->|High| H[Immediate Action
ดำเนินการทันที] G -->|Medium| I[Plan Mitigation
วางแผนลดความเสี่ยง] G -->|Low| J[Monitor
ติดตาม] style A fill:#d65d0e,stroke:#ebdbb2,stroke-width:3px,color:#282828 style E fill:#98971a,stroke:#ebdbb2,stroke-width:2px,color:#282828 style F fill:#d79921,stroke:#ebdbb2,stroke-width:2px,color:#282828 style H fill:#cc241d,stroke:#ebdbb2,stroke-width:2px,color:#ebdbb2 style I fill:#d79921,stroke:#ebdbb2,stroke-width:2px,color:#282828 style J fill:#689d6a,stroke:#ebdbb2,stroke-width:2px,color:#282828

1.4 Operation Model of Security (โมเดลการปฏิบัติการความปลอดภัย)

สูตรหลัก:

Protection = Prevention + Detection + Response

1.4.1 Prevention (การป้องกัน)

มาตรการที่ออกแบบมาเพื่อหยุดภัยคุกคามก่อนที่จะเกิดขึ้น

ตัวอย่าง:

1.4.2 Detection (การตรวจจับ)

ระบบที่ช่วยระบุเมื่อมีภัยคุกคามเกิดขึ้นหรือกำลังเกิดขึ้น

เครื่องมือ:

สูตรการวัดประสิทธิภาพการตรวจจับ:

Detection Rate = True Positives True Positives + False Negatives × 100 %

1.4.3 Response (การตอบสนอง)

กระบวนการดำเนินการเมื่อตรวจพบภัยคุกคาม

ขั้นตอนการตอบสนองต่อเหตุการณ์:

  1. Preparation (เตรียมพร้อม): มี Incident Response Plan พร้อม
  2. Identification (ระบุ): ยืนยันว่าเกิดเหตุการณ์จริง
  3. Containment (กักกัน): ป้องกันไม่ให้แพร่กระจาย
  4. Eradication (กำจัด): ลบสาเหตุของเหตุการณ์
  5. Recovery (กู้คืน): นำระบบกลับมาทำงานปกติ
  6. Lessons Learned (บทเรียน): วิเคราะห์และปรับปรุง
%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#282828','primaryTextColor':'#ebdbb2','primaryBorderColor':'#d65d0e','lineColor':'#98971a','secondaryColor':'#3c3836','tertiaryColor':'#504945','background':'#282828','mainBkg':'#3c3836','secondBkg':'#504945','textColor':'#ebdbb2','border1':'#d65d0e','border2':'#98971a'}}}%%
graph LR
    A[Prevention
การป้องกัน] --> B{Threat
Detected?} B -->|No| C[Normal Operations] B -->|Yes| D[Detection
การตรวจจับ] D --> E[Response
การตอบสนอง] E --> F[Containment] F --> G[Eradication] G --> H[Recovery] H --> I[Lessons Learned] I --> A C --> A style A fill:#689d6a,stroke:#ebdbb2,stroke-width:2px,color:#282828 style D fill:#d79921,stroke:#ebdbb2,stroke-width:2px,color:#282828 style E fill:#cc241d,stroke:#ebdbb2,stroke-width:2px,color:#ebdbb2

2. Threats and Intruders

2.1 Types of Intruders (ประเภทของผู้บุกรุก)

2.1.1 Masquerader (ผู้แอบอ้าง)

คำนิยาม: บุคคลภายนอกที่ไม่ได้รับอนุญาตแต่สามารถเข้าถึงระบบได้โดยการแอบอ้างเป็นผู้ใช้ที่ถูกต้อง

วิธีการ:

การป้องกัน:

ตัวอย่าง:

2.1.2 Misfeasor (ผู้ใช้ที่มีสิทธิ์แต่กระทำผิด)

คำนิยาม: ผู้ใช้ที่ได้รับอนุญาตให้เข้าถึงระบบ แต่ใช้สิทธิ์นั้นในทางที่ผิด

ประเภท:

การป้องกัน:

ตัวอย่าง:

2.1.3 Clandestine User (ผู้ใช้ลับ)

คำนิยาม: ผู้ที่มีความสามารถสูงและพยายามหลีกเลี่ยงการตรวจจับ มักเป็นผู้ดูแลระบบที่มีอำนาจสูง

ลักษณะ:

เทคนิค:

การป้องกัน:

%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#282828','primaryTextColor':'#ebdbb2','primaryBorderColor':'#d65d0e','lineColor':'#98971a','secondaryColor':'#3c3836','tertiaryColor':'#504945','background':'#282828','mainBkg':'#3c3836','secondBkg':'#504945','textColor':'#ebdbb2','border1':'#d65d0e','border2':'#98971a'}}}%%
graph TB
    subgraph Intruders["Types of Intruders"]
        M[Masquerader
ผู้แอบอ้าง

Outsider
Stolen Credentials] MF[Misfeasor
ผู้ใช้ที่กระทำผิด

Insider
Privilege Abuse] C[Clandestine User
ผู้ใช้ลับ

Highly Skilled
Evades Detection] end M --> D1[Detection:
Login Anomalies] MF --> D2[Detection:
DLP, UAM] C --> D3[Detection:
Behavioral Analytics] style M fill:#cc241d,stroke:#ebdbb2,stroke-width:2px,color:#ebdbb2 style MF fill:#d79921,stroke:#ebdbb2,stroke-width:2px,color:#282828 style C fill:#b16286,stroke:#ebdbb2,stroke-width:2px,color:#282828

2.2 Intrusion Detection (การตรวจจับการบุกรุก)

2.2.1 Statistical Anomaly Detection

ใช้วิธีทางสถิติในการตรวจจับพฤติกรรมที่ผิดปกติ

ประเภท:

สูตรการคำนวณ Anomaly Score:

Anomaly Score = | Current Value Mean | Standard Deviation

ข้อดี:

ข้อเสีย:

2.2.2 Rule-Based Detection (Signature-Based)

ใช้ Signature หรือ Pattern ที่รู้จักในการตรวจจับ

วิธีการ:

ข้อดี:

ข้อเสีย:

%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#282828','primaryTextColor':'#ebdbb2','primaryBorderColor':'#d65d0e','lineColor':'#98971a','secondaryColor':'#3c3836','tertiaryColor':'#504945','background':'#282828','mainBkg':'#3c3836','secondBkg':'#504945','textColor':'#ebdbb2','border1':'#d65d0e','border2':'#98971a'}}}%%
graph TB
    A[Network Traffic] --> B{Detection Method}
    
    B --> C[Statistical Anomaly
Detection] B --> D[Rule-Based
Detection] C --> E[Analyze Deviation
from Baseline] D --> F[Match Against
Signatures] E --> G{Anomaly
Detected?} F --> H{Match
Found?} G -->|Yes| I[Alert: Anomaly] G -->|No| J[Normal Traffic] H -->|Yes| K[Alert: Known Threat] H -->|No| J style C fill:#98971a,stroke:#ebdbb2,stroke-width:2px,color:#282828 style D fill:#d79921,stroke:#ebdbb2,stroke-width:2px,color:#282828 style I fill:#cc241d,stroke:#ebdbb2,stroke-width:2px,color:#ebdbb2 style K fill:#cc241d,stroke:#ebdbb2,stroke-width:2px,color:#ebdbb2

3. Security Controls Framework

3.1 Types of Security Controls

3.1.1 Classification by Implementation Type

3.1.1.1 Technical Controls (Administrative Controls ทางเทคนิค)

ควบคุมโดยใช้เทคโนโลยี

ตัวอย่าง:

3.1.1.2 Administrative Controls (Managerial Controls)

ควบคุมผ่านนโยบายและขั้นตอน

ตัวอย่าง:

3.1.1.3 Physical Controls

ควบคุมทางกายภาพ

ตัวอย่าง:

3.1.2 Classification by Functional Goal

3.1.2.1 Preventive Controls

ป้องกันเหตุการณ์ที่ไม่พึงประสงค์

ตัวอย่าง:

3.1.2.2 Detective Controls

ตรวจจับเมื่อเกิดเหตุการณ์

ตัวอย่าง:

3.1.2.3 Corrective Controls

แก้ไขหลังเกิดเหตุการณ์

ตัวอย่าง:

3.1.2.4 Deterrent Controls

ยับยั้งผู้โจมตี

ตัวอย่าง:

3.1.2.5 Compensating Controls

ใช้เมื่อไม่สามารถใช้ Primary Control ได้

ตัวอย่าง:

%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#282828','primaryTextColor':'#ebdbb2','primaryBorderColor':'#d65d0e','lineColor':'#98971a','secondaryColor':'#3c3836','tertiaryColor':'#504945','background':'#282828','mainBkg':'#3c3836','secondBkg':'#504945','textColor':'#ebdbb2','border1':'#d65d0e','border2':'#98971a'}}}%%
graph TB
    subgraph ByType["By Implementation Type"]
        T[Technical
Controls] A[Administrative
Controls] P[Physical
Controls] end subgraph ByGoal["By Functional Goal"] PR[Preventive] DE[Detective] CO[Corrective] DT[Deterrent] CM[Compensating] end T -.-> PR T -.-> DE T -.-> CO A -.-> PR A -.-> DE A -.-> DT P -.-> PR P -.-> DE P -.-> DT style T fill:#458588,stroke:#ebdbb2,color:#282828 style A fill:#b16286,stroke:#ebdbb2,color:#282828 style P fill:#d79921,stroke:#ebdbb2,color:#282828 style PR fill:#689d6a,stroke:#ebdbb2,color:#282828 style DE fill:#98971a,stroke:#ebdbb2,color:#282828

3.2 Defense in Depth (การป้องกันหลายชั้น)

หลักการ: ใช้การป้องกันหลายชั้นร่วมกัน เพื่อให้ถึงแม้ชั้นหนึ่งจะถูกเจาะ ยังมีชั้นอื่นปกป้องอยู่

สูตรการคำนวณความปลอดภัยรวม:

Total Security = 1 i = 1 n ( 1 S i )

โดยที่:

ชั้นการป้องกัน:

  1. Perimeter Defense (ชั้นนอกสุด)

  2. Network Defense (เครือข่าย)

  3. Host Defense (เครื่อง)

  4. Application Defense (แอปพลิเคชัน)

  5. Data Defense (ข้อมูล)

%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#282828','primaryTextColor':'#ebdbb2','primaryBorderColor':'#d65d0e','lineColor':'#98971a','secondaryColor':'#3c3836','tertiaryColor':'#504945','background':'#282828','mainBkg':'#3c3836','secondBkg':'#504945','textColor':'#ebdbb2','border1':'#d65d0e','border2':'#98971a'}}}%%
graph TB
    subgraph L1["Layer 1: Perimeter"]
        P[Firewall
IDS/IPS
DMZ] end subgraph L2["Layer 2: Network"] N[Segmentation
VLANs
ACLs] end subgraph L3["Layer 3: Host"] H[Antivirus
Host Firewall
Patches] end subgraph L4["Layer 4: Application"] A[Input Validation
Authentication
Authorization] end subgraph L5["Layer 5: Data"] D[Encryption
DLP
Access Control] end L1 --> L2 L2 --> L3 L3 --> L4 L4 --> L5 style L1 fill:#cc241d,stroke:#ebdbb2,color:#ebdbb2 style L2 fill:#d79921,stroke:#ebdbb2,color:#282828 style L3 fill:#b8bb26,stroke:#ebdbb2,color:#282828 style L4 fill:#689d6a,stroke:#ebdbb2,color:#282828 style L5 fill:#458588,stroke:#ebdbb2,color:#282828

4. Authentication and Account Management

4.1 Authentication Factors (ปัจจัยการพิสูจน์ตัวตน)

4.1.1 Type 1: Something You Know (สิ่งที่คุณรู้)

ตัวอย่าง:

ข้อดี:

ข้อเสีย:

4.1.2 Type 2: Something You Have (สิ่งที่คุณมี)

ตัวอย่าง:

ข้อดี:

ข้อเสีย:

4.1.3 Type 3: Something You Are (สิ่งที่คุณเป็น)

ตัวอย่าง:

ข้อดี:

ข้อเสีย:

%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#282828','primaryTextColor':'#ebdbb2','primaryBorderColor':'#d65d0e','lineColor':'#98971a','secondaryColor':'#3c3836','tertiaryColor':'#504945','background':'#282828','mainBkg':'#3c3836','secondBkg':'#504945','textColor':'#ebdbb2','border1':'#d65d0e','border2':'#98971a'}}}%%
graph TB
    A[Authentication Factors] --> B[Type 1:
Something You Know] A --> C[Type 2:
Something You Have] A --> D[Type 3:
Something You Are] B --> E[Password
PIN
Security Questions] C --> F[Token
Smart Card
Mobile Device] D --> G[Fingerprint
Iris
Face Recognition] E --> H[Single Factor
Authentication] E --> I[Multi-Factor
Authentication
MFA] F --> I G --> I style A fill:#d65d0e,stroke:#ebdbb2,stroke-width:3px,color:#282828 style B fill:#458588,stroke:#ebdbb2,color:#282828 style C fill:#b16286,stroke:#ebdbb2,color:#282828 style D fill:#689d6a,stroke:#ebdbb2,color:#282828 style I fill:#98971a,stroke:#ebdbb2,stroke-width:2px,color:#282828

4.2 Multi-Factor Authentication (MFA)

คำนิยาม: การใช้ปัจจัยการพิสูจน์ตัวตนมากกว่า 1 ประเภท

ความแข็งแกร่งของ MFA:

MFA Strength = F 1 × F 2 × ... × F n

โดยที่ Fi คือ ความแข็งแกร่งของแต่ละ Factor

ประเภทของ MFA:

4.2.1 Two-Factor Authentication (2FA)

ใช้ 2 ปัจจัยจากประเภทที่ต่างกัน

ตัวอย่าง:

4.2.2 Adaptive/Risk-Based Authentication

ปรับระดับการพิสูจน์ตัวตนตามความเสี่ยง

ปัจจัยความเสี่ยง:

ตัวอย่าง:

%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#282828','primaryTextColor':'#ebdbb2','primaryBorderColor':'#d65d0e','lineColor':'#98971a','secondaryColor':'#3c3836','tertiaryColor':'#504945','background':'#282828','mainBkg':'#3c3836','secondBkg':'#504945','textColor':'#ebdbb2','border1':'#d65d0e','border2':'#98971a'}}}%%
graph TB
    A[User Login Attempt] --> B{Risk Assessment}
    
    B --> C[Analyze Context:
- Location
- Device
- Time
- Behavior] C --> D{Risk Level} D -->|Low Risk| E[Password Only] D -->|Medium Risk| F[Password + OTP] D -->|High Risk| G[Password + OTP
+ Email Verification] E --> H{Authenticated?} F --> H G --> H H -->|Yes| I[Grant Access] H -->|No| J[Deny Access] style A fill:#458588,stroke:#ebdbb2,color:#282828 style D fill:#d79921,stroke:#ebdbb2,stroke-width:2px,color:#282828 style I fill:#689d6a,stroke:#ebdbb2,color:#282828 style J fill:#cc241d,stroke:#ebdbb2,color:#ebdbb2

4.3 Password Security Best Practices

4.3.1 Password Requirements

ความยาว:

ความซับซ้อน:

การคำนวณความแข็งแกร่งของรหัสผ่าน:

Entropy = L × log 2 ( R )

โดยที่:

ตัวอย่าง:

4.3.2 Password Storage

NEVER Store Passwords in Plain Text!

วิธีการที่ถูกต้อง:

  1. Hash with Salt:
import hashlib
import os

# Generate random salt
salt = os.urandom(32)

# Hash password with salt
password = "user_password"
hash_obj = hashlib.pbkdf2_hmac('sha256', 
    password.encode('utf-8'), 
    salt, 
    100000)  # 100,000 iterations
  1. Use Modern Algorithms:

4.3.3 Password Policies

Best Practices:

ตัวอย่าง Account Lockout Policy:

4.4 Account Lifecycle Management

4.4.1 Account Lifecycle Stages

  1. Provisioning (การสร้างบัญชี): สร้างบัญชีและกำหนดสิทธิ์เริ่มต้น
  2. Maintenance (การบำรุงรักษา): อัปเดตข้อมูลและสิทธิ์ตามความจำเป็น
  3. Modification (การแก้ไข): เปลี่ยนแปลงสิทธิ์เมื่อมีการเปลี่ยนตำแหน่งงาน
  4. Deprovisioning (การปิดบัญชี): ลบหรือระงับบัญชีเมื่อไม่ใช้งานแล้ว

4.4.2 Privileged Account Management (PAM)

Best Practices:

  1. Separate Accounts: แยกบัญชีสำหรับงานปกติและงานที่ต้องการสิทธิ์สูง
  2. Just-in-Time (JIT) Access: ให้สิทธิ์เฉพาะเมื่อจำเป็น
  3. Password Vaulting: เก็บรหัสผ่านบัญชี Privileged ในระบบที่ปลอดภัย
  4. Principle of Least Privilege: ให้สิทธิ์เท่าที่จำเป็นเท่านั้น
  5. Session Monitoring: ติดตามและบันทึกการใช้งานบัญชี Privileged

4.4.3 Service Accounts Management

Best Practices:

  1. Dedicated Service Accounts: ใช้บัญชีเฉพาะสำหรับ Services
  2. Strong Passwords: ใช้รหัสผ่านที่แข็งแกร่งและเปลี่ยนเป็นระยะ
  3. Least Privilege: ให้สิทธิ์เท่าที่ Service ต้องการเท่านั้น
  4. Monitoring: ติดตามการใช้งานบัญชี Service
%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#282828','primaryTextColor':'#ebdbb2','primaryBorderColor':'#d65d0e','lineColor':'#98971a','secondaryColor':'#3c3836','tertiaryColor':'#504945','background':'#282828','mainBkg':'#3c3836','secondBkg':'#504945','textColor':'#ebdbb2','border1':'#d65d0e','border2':'#98971a'}}}%%
stateDiagram-v2
    [*] --> Provisioning: New User Request
    
    Provisioning --> Active: Account Created
    
    Active --> Modification: Job Change
    Modification --> Active: Updated
    
    Active --> Suspended: Security Incident
    Suspended --> Active: Resolved
    Suspended --> Deprovisioned: Termination
    
    Active --> Deprovisioned: Employee Leaves
    
    Deprovisioned --> Archived: 90 Days
    Archived --> [*]: Deleted

5. Models and System Security

5.1 Access Control Models

5.1.1 Discretionary Access Control (DAC)

เจ้าของทรัพยากรมีอำนาจควบคุมว่าใครสามารถเข้าถึงได้

ข้อดี:

ข้อเสีย:

5.1.2 Mandatory Access Control (MAC)

ระบบกำหนดสิทธิ์โดยอิงจากระดับความลับ

กฎการเข้าถึง:

  1. No Read Up: ห้ามอ่านข้อมูลที่มีระดับสูงกว่า
  2. No Write Down: ห้ามเขียนข้อมูลไปยังระดับที่ต่ำกว่า

สูตร:

Access Allowed Clearance ( Subject ) Classification ( Object )

5.1.3 Role-Based Access Control (RBAC)

กำหนดสิทธิ์ตาม Role (บทบาท) ของผู้ใช้

องค์ประกอบ:

Users → Roles → Permissions → Resources
%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#282828','primaryTextColor':'#ebdbb2','primaryBorderColor':'#d65d0e','lineColor':'#98971a','secondaryColor':'#3c3836','tertiaryColor':'#504945','background':'#282828','mainBkg':'#3c3836','secondBkg':'#504945','textColor':'#ebdbb2','border1':'#d65d0e','border2':'#98971a'}}}%%
graph LR
    U1[User: Alice] --> R1[Role: Doctor]
    U2[User: Bob] --> R2[Role: Nurse]
    U3[User: Carol] --> R2
    
    R1 --> P1[Read Patient Records]
    R1 --> P2[Write Prescriptions]
    
    R2 --> P1
    R2 --> P3[Update Vitals]
    
    style U1 fill:#458588,stroke:#ebdbb2
    style U2 fill:#458588,stroke:#ebdbb2
    style R1 fill:#d79921,stroke:#ebdbb2
    style R2 fill:#98971a,stroke:#ebdbb2

5.1.4 Attribute-Based Access Control (ABAC)

กำหนดสิทธิ์ตาม Attributes ของ Subject, Object, Environment

Attributes:


5.2 System & Physical Hardening

5.2.1 OS Hardening

ขั้นตอน:

  1. Update System
  2. Remove Unnecessary Services
  3. Configure Firewall
  4. Secure SSH
  5. Configure PAM
  6. Enable Audit Logging
  7. File System Hardening
  8. Kernel Hardening

ตัวอย่าง SSH Hardening:

# /etc/ssh/sshd_config
Port 2222
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes
MaxAuthTries 3
ClientAliveInterval 300
X11Forwarding no

ตัวอย่าง Firewall Configuration:

# UFW
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable

5.2.2 Physical Security

ชั้นของ Physical Security:

5.2.2.1 Perimeter Security (รอบนอก)

5.2.2.2 Building Security (อาคาร)

5.2.2.3 Room/Area Security (ห้อง)

5.2.2.4 Equipment Security (อุปกรณ์)

5.2.2.5 Environmental Security

%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#282828','primaryTextColor':'#ebdbb2','primaryBorderColor':'#d65d0e','lineColor':'#98971a','secondaryColor':'#3c3836','tertiaryColor':'#504945','background':'#282828','mainBkg':'#3c3836','secondBkg':'#504945','textColor':'#ebdbb2','border1':'#d65d0e','border2':'#98971a'}}}%%
graph TB
    subgraph Layer1["Layer 1: Perimeter"]
        L1[Fencing
Gates
Lighting] end subgraph Layer2["Layer 2: Building"] L2[Access Control
Security Desk
Guards] end subgraph Layer3["Layer 3: Room"] L3[Locked Doors
Card Access
Biometric] end subgraph Layer4["Layer 4: Equipment"] L4[Cable Locks
Asset Tags
Cages] end subgraph Core["Data Center Core"] SERVER[Servers
Storage
Network] end Layer1 --> Layer2 Layer2 --> Layer3 Layer3 --> Layer4 Layer4 --> Core style Layer1 fill:#cc241d,stroke:#ebdbb2 style Layer2 fill:#d79921,stroke:#ebdbb2 style Layer3 fill:#b8bb26,stroke:#ebdbb2 style Layer4 fill:#689d6a,stroke:#ebdbb2 style Core fill:#458588,stroke:#ebdbb2,stroke-width:3px

สรุป

เอกสาร Introduction to Network Security นี้ได้นำเสนอเนื้อหาครอบคลุมตั้งแต่แนวคิดพื้นฐานไปจนถึงการประยุกต์ใช้งานจริง ประกอบด้วย:

1. Fundamental Concepts: CIA Triad, Risk Management, และโมเดลการปฏิบัติการความปลอดภัย (Prevention + Detection + Response)

2. Threats and Intruders: การทำความเข้าใจผู้บุกรุกแต่ละประเภท (Masquerader, Misfeasor, Clandestine User) และวิธีการตรวจจับ

3. Security Controls Framework: การจำแนก Controls ตามประเภท (Technical, Administrative) และเป้าหมาย (Preventive, Detective, Corrective, Deterrent, Compensating) รวมถึงหลักการ Defense in Depth

4. Authentication & Account Management: การพิสูจน์ตัวตนที่แข็งแกร่งผ่าน Multi-Factor Authentication และการจัดการบัญชีผู้ใช้อย่างมีประสิทธิภาพตลอดวงจรชีวิตของบัญชี

5. Models and System Security: Access Control Models (DAC, MAC, RBAC, ABAC), Security Models ทางทฤษฎี (Bell-LaPadula, Biba) และการ Hardening ระบบทั้งด้าน Software (OS Hardening) และ Physical Security

ความปลอดภัยเครือข่ายเป็นกระบวนการต่อเนื่องที่ต้องอาศัยทั้งเทคโนโลยี กระบวนการ และบุคลากรทำงานร่วมกัน การนำความรู้เหล่านี้ไปประยุกต์ใช้อย่างเหมาะสมจะช่วยเพิ่มความปลอดภัยให้กับองค์กรอย่างมีประสิทธิภาพ

หลักการสำคัญที่ควรจำ:

การรักษาความปลอดภัยเครือข่ายไม่ใช่เป้าหมายปลายทาง แต่เป็นการเดินทางที่ไม่มีที่สิ้นสุด ต้องมีการปรับปรุงและพัฒนาอย่างสม่ำเสมอเพื่อรับมือกับภัยคุกคามที่เปลี่ยนแปลงตลอดเวลา