User Rights Assignment (การมอบสิทธิ์ผู้ใช้) ใน Windows
ควบคุมสิทธิ์การทำงานเฉพาะของ User/Group บนเครื่องหรือ Domain ผ่าน Group Policy
วิธีเปิด User Rights Assignment
- Win + R > พิมพ์
gpedit.msc> Enter (Local Group Policy Editor) - ไปที่: Computer Configuration > Windows Settings > Security Settings > Local Policies > User Rights Assignment
- หรือใช้ Group Policy Management Console (GPMC) สำหรับ Domain:
gpmc.msc
สิทธิ์สำคัญที่ควรทราบ (Key User Rights)
| Policy Name | คำอธิบาย | ค่าเริ่มต้น / แนะนำ |
|---|---|---|
| Log on as a service | อนุญาตให้ Service Account ล็อกอินเป็นบริการ | Service Accounts เท่านั้น |
| Log on as a batch job | อนุญาตรัน Scheduled Tasks / Batch Jobs | Service Accounts, Scheduled Tasks |
| Allow log on locally | อนุญาตล็อกอินที่คอนโซล (Physical/RDP Console) | Users, Administrators |
| Allow log on through Remote Desktop Services | อนุญาต RDP | Remote Desktop Users, Administrators |
| Access this computer from the network | เข้าถึง Share, RPC, IIS จากเครือข่าย | Everyone, Authenticated Users |
| Deny access to this computer from the network | บล็อกการเข้าถึงจากเครือข่าย (Override Allow) | Guests, Anonymous |
| Shut down the system | สิทธิ์ปิดเครื่อง/รีสตาร์ท | Administrators, Users (Workstation) |
| Change the system time | เปลี่ยนเวลาระบบ (สำคัญสำหรับ Kerberos/Logs) | Administrators, LOCAL SERVICE |
| Back up files and directories | Backup ทุกไฟล์ (Ignore NTFS Permissions) | Administrators, Backup Operators |
| Restore files and directories | Restore ไฟล์ (Ignore NTFS Permissions) | Administrators, Backup Operators |
| Take ownership of files or other objects | ยึด Ownership ของ Object | Administrators |
| Debug programs | Debug Process (อันตราย - ให้เฉพาะ Dev/Debug) | Administrators |
| Load and unload device drivers | ติดตั้ง/ลบ Driver | Administrators |
Best Practice: การมอบสิทธิ์
- Least Privilege: ให้สิทธิ์แค่พอทำงาน
- ใช้ Group: สร้าง Security Group → ใส่ User → มอบสิทธิ์ให้ Group (จัดการง่ายกว่า)
- Deny Win Over Allow: Deny จะชนะ Allow เสมอ ใช้ Deny อย่างระมัดระวัง
- Audit ก่อน Enforce: เปิด Audit Policy (Success/Failure) ดู Impact ก่อน
- Document ทุกการเปลี่ยนแปลง: Change Management
Disk Quotas (โควตา đĩa) - จำกัดพื้นที่ผู้ใช้
ใช้ได้กับ NTFS Volumes เท่านั้น
เปิดใช้งาน Disk Quotas
- คลิกขวา Drive (เช่น D:) > Properties > แท็บ Quota
- ติ๊ก Enable quota management
- ติ๊ก Deny disk space to users exceeding quota limit (บล็อกเขียนเมื่อเกิน)
- ตั้ง Limit disk space to (เช่น 10 GB) และ Set warning level to (เช่น 8 GB)
- เลือก Log event when user exceeds quota limit / warning level
- กด Apply > OK
ตั้งค่า Quota เฉพาะ User/Group (Quota Entries)
- ที่แท็บ Quota > กด Quota Entries
- เมนู Quota > New Quota Entry
- เลือก User/Group > ตั้ง Limit และ Warning Level แยกต่างหาก
PowerShell สำหรับ Quota (Automation)
# Enable Quota on D:
Enable-DiskQuota -DriveLetter D -Limit 10GB -Warning 8GB
# Set specific user quota
Set-DiskQuota -DriveLetter D -User "DOMAIN\User" -Limit 50GB -Warning 40GB
Software Restriction / App Control (ควบคุมซอฟต์แวร์)
- AppLocker (Enterprise/Edu): กฎตาม Path, Publisher, Hash, File Version - ควบคุม .exe, .dll, .ps1, .msi, AppX
- Windows Defender Application Control (WDAC): Code Integrity Policy, แบบ Kernel-level, แข็งแกร่งกว่า AppLocker
- Software Restriction Policies (SRP): Legacy (Deprecated) ใช้ Hash/Path/Certificate
สรุป Checklist การ Setup Network Security สำหรับ User Management
- ออกแบบ Security Groups ตาม Role (RBAC)
- ตั้งค่า User Rights Assignment ตาม Least Privilege
- Enable Disk Quotas บน Volume ที่เก็บข้อมูล User
- Deploy AppLocker / WDAC ป้องกัน Executable ไม่ได้รับอนุมัติ
- ตั้งค่า Audit Policies (Logon/Logoff, Object Access, Policy Change)
- Centralized Log Collection (SIEM / Windows Event Forwarding)
- Review และ Recertify สิทธิ์เป็นประจำ (Quarterly)