You are on page 1of 64

Access Control

System
อาจารย ์ ธนัญชัย ตรีภาค
ภาควิชาวิศวกรรมคอมพิวเตอร ์
คณะวิศวกรรมศาสตร ์
สถาบันเทคโนโลยีพระจอมเกล ้าเจ ้าคุณ
ทหารลาดกระบัง
access control หมายถึง

 คุณลักษณะการอนุ ญาตให ้เฉพาะผูใ้ ช ้งาน โปรแกรม โพ


รเซส หรือระบบใดๆ เข ้าถึงและใช ้งานทรัพยากรได ้
 ้
การให ้หรือไม่ให ้สิทธิจะขึนอยู
ก ่ บ
ั security model ทีใช่ ้
งานโดยจะอนุ ญาตให ้ใช ้งานทรัพยากรอย่างเหมาะสม
 ประกอบด ้วยการทางานร่วมกันของฮาร ์ดแวร ์ ซอฟต ์แวร ์
และผูด้ แู ลระบบในการมอนิ เตอร ์การเข ้าถึง การระบุ
่ ้าใช ้งานทร ัพยากร การ
ผูใ้ ช ้งาน บันทึกการร ้องขอเพือเข
อนุ ญาต หรือไม่อนุ ญาตให ้ใช ้งานตามกฎทีตั ่ งขึ
้ น้
สามารถสร ้าง Access Control ได้
อย่างไร
 Hardware
 Software
 Application
 Protocol (Kerberos, IPSec)
 Physical
 Logical (policies)
AC ป้ องก ันอะไรบ้าง

 ่
ป้ องกันข ้อมูล จากการเข ้าดูข ้อมูล การเปลียนแปลง
หรือการทาซาข ้ ้อมูลโดยไม่มส ี ท
ิ ธิ
 ่
ป้ องกันระบบ จากการเข ้าใช ้งาน การเปลียนแปลง
ระบบงานต่างๆ โดยไม่มส ี ท
ิ ธิ รวมถึงการโจมตีระบบงาน
Proactive access control

 การฝึ กอบรมด ้านการตระหนักรู ้ต่างๆ (Awareness


training)
 การตรวจสอบภูมห ิ ลัง (Background checks)
 การแบ่งแยกหน้าที่ (Separation of duties)
 ้
การแบ่งเนื อหาเป็ นส่วนย่อยๆ (Split knowledge)
 การกาหนดนโยบาย (Policies)
 การจัดกลุม
่ ข ้อมูล (Data classification)
 การลงทะเบียนผูใ้ ช ้งาน (Effective user registration)
 การกาหนดกระบวนการควบคุมการเปลียนแปลง ่ (Change
control procedures)
Physical access control

 Guards
 Locks
 Mantraps
 ID badges
 CCTV, sensors, alarms
 Biometrics
 Fences
 Card-key and tokens
 Guard dogs
Access Control & privacy issues

 อาจมีความไม่สอดคล ้องกันในประเด็น Access Control


กับ Privacy
 การทา AC อาจจาเป็ นต ้องมีการมอนิ เตอร ์ต่างๆ ใน
ระบบเช่นการใช ้งานอินเตอร ์เน็ ต หรือ E-mail ในการ
ร ักษาความปลอดภัย
 ่
หน้า Login ควรมีการแจ ้งรายละเอียดเกียวกั บนโยบาย

ด ้านความเป็ นส่วนตัว และระดับของการมอนิ เตอร ์เพือ
ความปลอดภัยกับผูใ้ ช ้งานด ้วย
ชนิ ดของ Access Control

 Discretionary Access Control (DAC)


 สามารถกาหนดรูปแบบการปกป้ องและการแชร ์
ทร ัพยากรได ้โดยผูใ้ ช ้งานแต่ละคน
 Mandatory Access Control (MAC)
 ระบบงานเป็ นผูก้ าหนดว่าทร ัพยากรนั้นจะปกป้ อง
และแชร ์ได ้อย่างไร
Mandatory Access Control

 กาหนดระดับความสาคัญและชือเรี ่ ยกของทร ัพยากรต่างๆ


 ทุกๆ object ทีมี ่ การกาหนดระดับการเข ้าถึง ต ้องสามาถ
่ สจ
เข ้าถึงได ้เฉพาะผูใ้ ช ้งานทีพิ ู น์แล ้วว่าอยูใ่ นระดับการเข ้าถึง
นั้นๆ
 ี่
ผูด้ แู ลระบบจะเป็ นผูท้ สามารถเปลี ่ object level ได ้ ไม่ใช่
ยน
เจ ้าของ object
 จะปลอดภัยกว่า DAC
 ใช ้ในระบบทีให ่ ้ความสาคัญกับการร ักษาความปลอดภัยเช่น
การทหาร
 ่
เป็ นระบบงานทีสามารถสร ้ าได ้ยาก
้างและตังค่
Mandatory Access Control

 ทาให ้ performance ลดลง


 ้
ขึนอยู ก
่ บ
ั แต่ละระบบงานทีจะก่ าหนดวิธก ี ารควบคุมการ
เข ้าถึง
 เช่นระบบไฟล ์ถูกจัดกลุม ่ ในระดับ “ปกปิ ด(Confidential)”
MAC จะป้ องกันไม่ให ้มีการเขียนข ้อมูลในระดับ “เป็ น
ความลับ(Secret)” และระดับ “ลับทีสุ ่ ด (Top Secret)
 ทุกๆ อุปกรณ์ output เช่น print jobs, floppies หรือ
อุปกรณ์อนๆ ื่ ต ้องมีการกาหนดชือ่ (label) และ ระดับการ
ร ักษาความปลอดภัยเช่นกัน
Discretionary Access Control

 การกาหนดการเข ้าถึงทร ัพยากรโดยขึนอยู้ ก


่ บ
ั การกาหนด
สิทธิให ้กับผูใ้ ช ้งาน
 วัตถุประสงค ์หลักในการใช ้งานคือแบ่งแยกและป้ องกัน
ผูใ้ ช ้งานจาก unauthorized data
 มีการใช ้งานในหลากหลายระบบเช่น Unix, NT, NetWare,
Linux, etc.
 กาหนดโดยเจ ้าของ object ในการควบคุมการเข ้าถึง
3 types Authentication

 Something you know - Password, PIN,


passcode, fraternity chant
 Something you have - ATM card, smart
card, token, key, ID Badge, driver license,
passport
 Something you are - Fingerprint, voice
scan, iris scan, retina scan, DNA
Multi-factor authentication

 ่
เพิมระดั
บการร ักษาความปลอดภัยโดยใช ้ 2-factor , 3-
factor authentication.
 2-factor authentication
 ATM card + PIN
 Credit card + signature
 PIN + fingerprint
 Username + Password (NetWare, Unix, NT
default)
 3-factor authentication
 Username + Password + Fingerprint
ปั ญหาของรหัสผ่าน

 ไม่ปลอดภัยหากใช ้รหัสผ่านทีจ่ าได ้ง่าย เดาได ้ง่ายเช่น ชือ่



ตนเอง ชือญาติ ่ ตว ์เลียง
ชือสั ้ หมายเลขโทรศพท ์ วันเกิด
งานอดิเรก เป็ นต ้น
 สามารถโจมตีได ้ง่าย โดยใช ้โปรแกรมเช่น SmartPass,
PWDUMP, NTCrack & l0phtcrack ซึงสามารถ ่
ถอดรหัสของรหัสผ่านในระบบ Unix, NetWare และ NT
ได ้
 ไม่สะดวกในการบริหารจัดการเช่นการแจกจ่ายรหัสผ่าน

และสร ้างรหัสผ่านเพือแจกจ่ ายโดยใช ้คอมพิวเตอร ์ซึง่
ผูใ้ ช ้งานไม่สามารถจดจาได ้
 สามารถปฏิเสธการทางานนั้นๆ ได ้เนื่ องจากรหัสผ่านไม่ได ้
Classic password rules

 รหัสผ่านทีดี ่ คอื รหัสผ่านที่ จาง่าย crack โดยใช ้ directory


attack ได ้ยาก
 รหัสผ่านทีดี ่
 ยาวมากกว่า 8 ตัวอักษร
 ไม่มใ ี น dictionary
 มีตวั เลขอย่างน้อย 1 ตัว
 มีตว ั อักขระพิเศษอย่างน้อย 1 ตัว
Password management

 กาหนดให ้ระบบงานมีการใช ้งาน passwords


 กาหนดอายุรหัสผ่าน และความยาวของรหัสผ่าน
 กาหนดจานวน unsuccessful logins
 จากัดจานวน concurrent connections
 เปิ ดใช ้งานการ auditing
 ่
กาหนดนโยบายในการรีเซตค่ารหัสผ่านและเปลียนรหั
สผ่าน
 ใช ้ last login dates ในแบนเนอร ์
Password Attacks

 Brute force
 l0phtcrack
 Dictionary
 Crack
 John the Ripper
 Trojan horse login program
Biometrics

 พิสจ ู น์ตวั ตนโดยใช ้ human characteristics


 ตรวจสอบคุณลักษณะทางกายภาพเพือพิ ่ สจ ู น์ตวั บ่ว
ชีต่้ างๆ
(identification) ของผูใ้ ช ้งาน
 Fingerprint
 Iris
 retina
 voice
 face
 DNA, blood
ข้อดีของ fingerprint-based
biometrics
 ไม่สามารถยืมกันได ้ และไม่ลมื
 ่
คุ ้มค่าเมือประเมิ
นถึงความง่ายในการใช ้งาน ต ้นทุนของ
เทคโนโลยี และความแม่นยาของการใช ้งาน
 Fingerprint มีรายละเอียดและความหลากหลายมาก
เพียงพอในการระบุตวั ตนของผูใ้ ช ้งานในระบบขนาดใหญ่
 มีอายุการใช ้งานยาวนานมาก
ข้อเสียของ Biometric

 ่ ามาใช ้งานส่วนตัว
ราคาแพงเมือน
 ผลิตภัณฑ ์ยังมีการพัฒนาอย่างต่อเนื่ อง มีผลิตภัณฑ ์
ใหม่ๆ ออกมาเสมอ เทคโนโลยียงั ไม่นิ่ง
 ไม่มี common API หรือมาตรฐาน
 ผู้ใช ้งานยังไม่ม่นใจที
ั ่
จะยอมร ับใช ้งาน
Tokens

 ใช ้ในการสร ้างระบบ one-time passwords


 ใช ้อุปกรณ์คอื
 Physical card
 SecurID
 S/Key
 Smart card
 Access token
Access Control Topics
 กาหนดผู้ใช ้งานระบบ
 กาหนดค่าทร ัพยากรทีต่ ้องการควบคุม
 กาหนดรูปแบบการใช ้งานระบบ
 กาหนดความสัมพันธ ์ระหว่างผู้ใช ้งาน รูปแบบการใช ้งาน
กับทร ัพยากร (Access Control)
Access Control Matrix
File System Access Control
Matrix
Access Control Matrix
 เป็ นหลักการแรกๆ ในการอธิบายการควบคุมการใช ้งาน
ทร ัพยากร
 ใช ้ควบคุมการใช ้งานทร ัพยากรทีไม่่ ซ ับซ ้อน
 กรณี ทใชี่ ้ในระบบเครือข่าย ซึงมี
่ กระบวนการทางานที่
ซ ับซ ้อนการใช ้ Access Control Matrix โดยตรงจึงไม่
เหมาะสม
Access control lists (ACL)

 ไฟล ์ต่างๆ จะมีการใช ้ access control system ในการ


ระบุวา่ ใครจะสามารถ access ได ้ ด ้วยกระบวนการใด และ
เวลาไหน
 OS ทีต่ ่ างกันจะมี ACL terms ทีต่
่ างกัน
 ชนิ ดของการ access:
 Read  Modify

 Write  Delete

 Create  Rename

 Execute
Access Control ในเครือข่าย
 ใน Cisco ใช ้ Access Control List ในการควบคุม
การใช ้งานระบบเครือข่าย
 Standard ACL ใช ้ควบคุมแบบไม่ซ ับซ ้อน
 Extended ACL ใช ้ควบคุมแบบซ ับซ ้อน

Access Control ในระบบอืนๆ
 กาหนด Identity ในระบบ
 การพิสจ
ู น์ตวั ตน
 กาหนดสิทธิการใช ้งานของผูใ้ ช ้งานให ้กับ Identity นั้นๆ
ตามนโยบาย
การควบคุมการใช้งานผู ใ้ ช้งาน
ระบบ

 Identification

 Authentication

 Authorization
Identification
 หมายถึงการระบุตวั ตนของสิงต่ ่ างๆในระบบ
 ่ นหลักฐานแสดงตัวตน
มีการแจ ้งข ้อมูลบางอย่างเพือเป็
(Identity)
 Identity ทีดี่ ควรปลอมแปลงยาก เป็ นสิงบ่
่ งบอก
เอกลักษณ์ของ object ต่างๆในระบบได ้
Authentication
 หมายถึงการพิสจ ู น์วา่ ผู้ใช ้งานทีเข่ ้าใช ้งานระบบคือ
ผูใ้ ช ้งานคนนั้นๆ ในระบบจริงหรือไม่
 เนื่ องจากเป็ นการทางานระยะไกล จึงต ้องส่งข ้อมูล
บางอย่างเพือพิ่ สจ ู น์วา่ เป็ นผู้ใช ้งานจริงๆ (Logical
Authentication)
 มักใช ้การพิสจ ู น์หลักฐานการเป็ นบุคคล คนเดียวกันกับ
ผู้ใช ้งานระบบคนนั้นๆ
Authorization
 พิสจู น์สท
ิ ธิการใช ้งานระบบ
 มี / ไม่มี สิทธิในระบบนั้นๆ
 ้ าในระบบก่อนการพิสจ
สิทธิจะถูกตังค่ ู น์สท
ิ ธิ
การทา Access Control
 Identity
 Identity-management

 Directory และ LDAP

 การทา Single Sign-On


Identity
 ในระบบต่างๆ Identity มักประกอบด ้วย
 Username / User ID
 ่
Credential (Password, Certificate, และอืน)
 Directory Attribute (Name , E-Mail , Phone ,

Address, และอืนๆ)
 Organization
 Group
 Application Right
 Policy
Identity Management
 เนื่ องจากผู้ใช ้งานมีการใช ้งานในหลายระบบ แต่ละระบบ
จะจัดเก็บ Identity ของผูใ้ ช ้งานเอง การบริหารจัดการ
ระบบจึงทาได ้ยาก
 Identity Management Software จึงทาหน้าทีเป็ ่ น
ตัวกลางในการประสานงาน Update ข ้อมูลต่างๆให ้
Authentication and
Authorization Infrastructure
 ่
ดาเนิ นการเกียวกับ
identification/authentication กับผูใ้ ช ้งานระบบ
 หาข ้อมูล identity ของผูใ้ ช ้งาน (attributes);
 ทาการให ้สิทธิการใช ้งานกับผูใ้ ช ้งานระบบ(apply
and release attributes);
 ทาการตรวจสอบความถูกต ้องในทุกๆ สิทธิการใช ้งาน
และ Identity ต่างๆ
 ่ าคัญทีสุ
สิงส ่ ดใน AAI คือ ‘trust’.
Federation คืออะไร
 Framework for trust across associated
organizations
 ้
ใช ้ common set of attributes , ขันตอนการท างาน
และนโยบายในการแลกเปลียนข ่ ้อมูลของผูใ้ ช ้งานและ

ทร ัพยากรในระบบเพือสร ้างการทางานร่วมกันได ้
 ใช ้ในการ sharing resources
 ่
การทางานเกียวกั บการทางาน 2 ส่วนคือ
 procedures/policies (fe. schema, trust, …)
 technical implementation (fe. pki, eduperson,
metadata, technology)
 ต ้องมีมาตรฐานในการกาหนดให ้เกิด Federation เช่น
SAML/Liberty/WS* เป็ นต ้น
Why federate?
 AAI สาหรับการใช ้งานระดับต่างๆ :
 Faculty (local management of identities)
 University (centralize identities / setup IdM!)
 National (federate)
 International (con-federate)

 ่ านวน service providers และ inter-institutional


เมือจ

communication มีมากขึนจะท าให ้เกิดความสัมพันธ ์
แบบ 1 to N relationships...
Why federate?

A B wanted ? C D

Identity provider
service provider
central components for federation
Single Sign-On

 ใช ้รหัสผ่านเดียวในทุกๆ ระบบงาน
 ระบบต ้องทาให ้บัญชีผูใ้ ช ้สามารถสร ้าง/ลบ ได ้อย่าง
รวดเร็ว
 Implement ให ้ทางานจริงได ้ยาก
 แยกส่วน Authentication / Authorization ออก
จากส่วนของการให ้บริการของ Application
 สามารถทาได ้โดยใช ้ผลิตภัณฑ ์ในท ้องตลาด เช่น
Kerberos, CA-Unicenter, Memco Proxima,
IntelliSoft SnareWorks, Tivoli Global Sign-
On, x.509
SSO Scenario
Federation Scenario
ผลิตภัณฑ ์ Single Sign-On
 ่ า IdM และ SSO แล ้วจึงพัฒนา
ผลิตภัณฑ ์ทีท
Federation ภายหลัง
 Oracle Federated Identity Solution
 IBM Tivoli Federated Identity Manager
 Sun Java System Federation Manager
 CA eTrust SiteMinder Federation Security
Services
 HP OpenView Select Federation
 Active Directory Federation Service (ADFS)
ผลิตภัณฑ ์ Single Sign-On
 ่ า Federation Service โดยเฉพาะ
ผลิตภัณฑ ์ทีท
 Ping Federation
 Federated Access Manager
Open Source SSO
 Shibboleth
 OpenSAML
 SourceID toolkits
 Guanxi
 OpenSSO
Kerberos
What is Kerberos?
 พัฒนาโดย MIT
 ใช ้งาน secret-based ร่วมกัน
 มีจดุ เด่นด ้าน 3rd party authentication
 สามารถนามาสร ้างระบบ sign-on ได ้
 ไม่มก ี ารส่งรหัสผ่านข ้ามเครือข่าย
องค ์ประกอบของ Kerberos

Ticket
Granting
Service Service
Provider

Key
Distribution
Center

Authen-
Tication
Client Service
User
“Kerberos Server”
Kerberos Terms

Authentication Service (AS): เป็ นบริการทีร่ ันอยูบ


่ น
Key Distribution Center (KDC) server. ทาหน้าทีพิ่ สจู น์

ตนเมือเครื ่ กข่ายทาการ logon และทาการออก Ticket
องลู
Granting Ticket (TGT) ในการพิสจ
ู น์ตนในภายหลัง
Ticket Granting Service (TGS): เป็ นบริการทีร่ ันอยูบ
่ น

KDC server ซึงจะออกtickets ให ้กับ TGT holding clients
สาหร ับ application server or resource เฉพาะ

Ticket Granting Ticket (TGT): เป็ น ticket ทีจะได ้ร ับ
่ TGT จะมี
จาก Authentication Service (SA) ซึงใน
รายละเอียดของ Privilege Attribute Certificate (PAC)
่ กข่าย
ของเครืองลู
Kerberos Terms


Ticket: เป็ นข ้อมูลทีจะได ่ นข ้อมูลสาหร ับการ
้ร ับจาก TGS ทีเป็
พิสจ
ู น์ตนและขอใช ้งาน application server หรือทร ัพยากร
ต่างๆ
่ ้สาหร ับระบุ session สาหร ับ
Session Key: เป็ นคีย ์เฉพาะทีใช
่ กข่ายกับทร ัพยากรต่างๆ
เครืองลู
Privilege Attribute Certificate (PAC): เป็ นใบร ับรองที่
เก็บข ้อมูลต่างๆ เช่นuser’s Security ID (SID), group
membership SIDs และสิทธิของผูใ้ ช ้งานของผูใ้ ช ้งานดัง
กล่าง
Ticket
Granting
XYZ Service “Kerberos Server” Service

Key
Distribution
Center

Authen-
Tication
Service

Susan’s
Desktop
Susan Computer
Ticket
Granting
XYZ Service Represents something Service
requiring Kerberos
authentication (web
server, ftp server, ssh Key
server, etc…) Distribution
Center

Authen-
Tication
Service

Susan’s
Desktop
Susan Computer
Ticket
Granting
XYZ Service Service

Key
“I’d like to be allowed to Distribution
get tickets from the Center
Ticket Granting Server,
please.
Authen-
Tication
Service

Susan’s
Desktop
Susan Computer
Ticket
Granting
XYZ Service Service
“Okay. I locked this box with
your secret password. If you
can unlock it, you can use its Key
contents to access my Ticket Distribution
Granting Service.” Center

Authen-
Tication
Service

Susan’s
Desktop
Susan Computer
Ticket
Granting
XYZ Service Service

Key
Distribution
Center

Authen-
Tication
TGT Service

Susan’s
Desktop
Susan Computer
Ticket-Granting Ticket (TGT)
 ต ้องนา Ticket-Granting Ticket (TGT) ส่งให ้กับ Ticket
Granting Service เพือร ่ ้องขอ “service tickets” ในการ
ขอใช ้บริการต่างๆ ผ่าน Kerberos authentication.
 TGT ไม่มข
ี ้อมูลรหัสผ่านอยู่ภายใน

TGT
“Let me prove I am
Susan to XYZ Service. Ticket
Granting
XYZ Service Here’s a copy of my Service
TGT!”

Key
Distribution
Center

Authen-
TGT Tication
TGT
Service

Susan’s
Desktop
Susan Computer
Hey XYZ:
Susan is Susan. Ticket
CONFIRMED: TGS
Granting
XYZ Service Service
You’re Susan.
Here, take this.
Key
Distribution
Center

Authen-
Tication
TGT
Service

Susan’s
Desktop
Susan Computer
Ticket
Granting
XYZ Service I’m Susan. I’ll prove
Service
it. Here’s a copy of
my legit service ticket
for XYZ.
Key
Distribution
Center

Authen-
Hey XYZ:
Hey XYZ: Tication
Susan is Susan.
Susan is Susan.
TGT
CONFIRMED: TGS Service
CONFIRMED: TGS

Susan’s
Desktop
Susan Computer
That’s Susan alright. Let me
determine if she is
Ticket
authorized to use me.
Granting
XYZ Service Service

Hey XYZ:
Susan is Susan. Key
CONFIRMED: TGS Distribution
Center

Authen-
Hey XYZ:
Tication
Susan is Susan. TGT
CONFIRMED: TGS Service

Susan’s
Desktop
Susan Computer
การทา Authorization
 ่
การให ้สิทธิการใช ้งานจะเป็ นหน้าทีของ XYZ
service…
 ไม่ได ้หมายความว่า authenticated โดย
Kerberos จะได ้ร ับสิทธิในการใช ้งาน XYZ service.
หมายเหตุ
 Tickets ใดๆ (TGT และ service-specific
้ าวันหมดอายุโดยผูด้ แู ลระบบ
tickets) มีการตังค่
local system administrator(s). ซึง่ ticket ที่
หมดอายุจะไม่สามารถใช ้งานได ้
 ้ ้
ถ ้า ticket ยังไม่หมดอายุ จะสามารถใช ้งานซาได
Ticket
ME AGAIN! I’ll prove it. Granting
XYZ Service Service
Here’s another copy of
my legit service ticket
for XYZ.
Key
Distribution
Center

Authen-
Hey XYZ:
Hey XYZ: Tication
Susan is Susan.
Susan is Susan.
TGT
CONFIRMED: TGS Service
CONFIRMED: TGS

Susan’s
Desktop
Susan Computer
That’s Susan… again. Let
me determine if she is
Ticket
authorized to use me.
Granting
XYZ Service Service

Hey XYZ:
Susan is Susan. Key
CONFIRMED: TGS Distribution
Center

Authen-
Hey XYZ:
Tication
Susan is Susan. TGT
CONFIRMED: TGS Service

Susan’s
Desktop
Susan Computer

You might also like