2. Agenda
Cele jakie przyświecają PKI
Dostarczanie
Co w certyfikacie piszczy ?
certyfikatów
Gdzie się chowa certyfikat w Windows ?
Jak bezpiecznie obchodzić się z certyfikatem ?
Dlaczego ufamy certyfikatom ?
Jak zweryfikować certyfikat ?
PKI w Windows 2008
Tworzymy własne certyfikaty w PKI Windows 2008
Dostarczamy certyfikaty użytkownikom i komputerom
Szablony
Przykładowa bezpieczna sieć WiFi
certyfikatów
korzystająca z certyfikatów
Certyfikat
Budowa
certyfikatu
Weryfikacja
certyfikatu
ZAUFANIE
Urząd
Certyfikatów
3. Cele jakie przyświecają PKI
• Szyfrowanie informacji
– poufność – gwarantuje nam, że informacja zostanie odczytana tylko
przez właściwą osobę/urządzenie
• Podpisywanie wiadomości poczty elektronicznej, które zapewniają nam:
– integralność - która daje nam pewność, że informacja nie została
zmieniona w drodze do odbiorcy
– niezaprzeczalność - gwarantuje nam iż informacja została podpisana
przez właściwą osobę posiadającą klucz prywatny
– autentyczność – zapewnia, iż nadawca jest tą osobą, za kogo się
podaje
5. Klucze szyfrujące
Typ klucza
Opis
Ten sam klucz stosowany do szyfrowania i deszyfrowania
danych
Chroni dane przed ujawnieniem i przechwyceniem
Symetryczny
Składa się z klucza prywatnego i publicznego
Klucz prywatny chroniony, klucz publiczny udostępniany
wszystkim
Asymetryczny
Jeśli użyjemy klucza prywatnego do szyfrowania, to publiczny
klucz wykorzystujemy do deszyfrowania i vice versa
6. Jak działa szyfrowanie asymetryczne ?
Wymagania
Proces
1. Pobieramy klucz publiczny odbiorcy
2. Szyfrujemy dane z wykorzystaniem klucza symetrycznego
3. Klucz symetryczny jest szyfrowany kluczem publicznym
odbiorcy
4. Zaszyfrowany klucz symetryczny oraz zaszyfrowane dane są
przesyłane do odbiorcy
5. Odbiorca deszyfruje klucz symetryczny przy pomocy swojego
klucza prywatnego
6. Deszyfrujemy dane za pomocą klucza symetrycznego
7. Jak działa podpisywanie cyfrowe ?
Proces
Proces
1. Dane są przetwarzane za pomocą algorytmu hash’ujacego
i w wyniku uzyskujemy wartość skrótu (hash)
2. Skrót (hash) jest szyfrowany za pomocą klucza
prywatnego nadawcy
3. Certyfikat nadawcy, zaszyfrowany hash oraz dane są
przesyłane do odbiorcy
4. Odbiroca deszyfruje wartość skrótu (hash) wykorzystując
klucz publiczny nadawcy
5. Dane są przetwarzane za pomocą algoytmu hash’ujacego
i w wyniku uzyskujemy wartość skrótu (hash) która jest
porównana z odszyfrowaną wartością skrótu (hash)
9. Algorytmy zalecane przez NIST suite-B Windows 2008 R2
Algorithm
Secret
Top Secret
128 bits
256 bits
256 bit curve
384 bit curve
256 bit curve
384 bit curve
SHA-256
SHA-384
Encryption:
Advanced Standard (AES)
Digital Signature:
Elliptic Curve Digital Signature Algorithm (ECDSA)
Key Exchange:
Elliptic Curve Diffie-Hellman (ECDH)
Hashing:
Secure Hash Algorithm (SHA)
http://www.nsa.gov/ia/programs/suiteb_cryptography/index.shtml
Suite B PKI in Windows Server 2008 - http://www.microsoft.com/download/en/details.aspx?id=14551
12. Certyfikat
Certyfikat – cyfrowa tożsamość przypisana do
Użytkownik
Komputer
Urzadzenie sieciowe
wystawiony i podpisany przez Urząd Certyfikatów
(CA), certyfikat powiązany jest z kluczem publicznym
dostarczonym przez klienta
13. Co w certyfikacie piszczy ?
Klucz publiczny + nazwa + poświadczenie = certyfikat
CERTIFICATE
Issuer
Validity
Subject
Public Key
Signature
16. Format certyfikatu X.509 (v1,v2,v3)
X.509 to standard definiujący schemat dla:
• certyfikatów,
• kluczy publicznych,
• unieważnień certyfikatów
• atrybutów certyfikatów
Wspomagający budowanie hierarchicznej
struktury PKI.
17. OID
OID (ang. Object IDentifier) - unikatowy identyfikator obiektu, służy do odróżnienia
obiektu od innych obiektów oraz do tworzenia odwołań do tego obiektu przez system.
Użytkownik posługuje się nazwą obiektu, natomiast system zamienia ją na
identyfikator.
Np.
Client Authentication (1.3.6.1.5.5.7.3.2)
Server Authentication (1.3.6.1.5.5.7.3.1)
Secure Email (1.3.6.1.5.5.7.3.4)
0-ITU-T Telecommunication Standardization Sector, 1 – ISO, 2 – ISO/ITU-T
Drzewo przydzielone dla Polski ma numer 1.2.616 i jest zarządzane przez Krajowy Rejestr Identyfikatorów
Obiektów (KRIO).
18. Certyfikat X.509 od środka
Metoda opisu struktur danych
ASN.1 (Abstract Syntax Notation One )
standard służący do opisu struktur przeznaczonych do reprezentacji,
kodowania, transmisji i dekodowania danych
Kodowania i formaty
Base64
DER (Distinguished Encoding Rules) - modyfikacja BER (Basic
Encoding Rules)
binarny, zwarty
PEM
tekstowy, do publikacji i przesyłania e-mailem
19. Standardy PKCS
PKCS (Public Key Cryptography Standards)
(RSA Data Security Inc.)
PKCS #1: RSA Cryptography Standard
PKCS #3: Diffie-Hellman Key Agreement Standard
PKCS #5: Password-Based Cryptography Standard
PKCS #6: Extended-Certificate Syntax Standard
PKCS #7: Cryptographic Message Syntax Standard (.p7b, .p7c , .cer, .crt, .der )
PKCS #8: Private-Key Information Syntax Standard
PKCS #9: Selected Attribute Types
PKCS #10: Certification Request Syntax Standard (.req)
PKCS #11: Cryptographic Token Interface Standard (smartcard)
PKCS #12: Personal Information Exchange Syntax Standard (.pfx , .p12)
PKCS #13: Elliptic Curve Cryptography Standard
PKCS #15: Cryptographic Token Information Format Standard
http://www.rsasecurity.com/rsalabs/pkcs/
20. Jak powstaje certyfikat
Obsługa certyfikatów przez CA
1.
2.
3.
4.
5.
6.
klient generuje klucz prywatny i publiczny
klient zamienia klucz na CSR (Certificate Signing Request) (online / offline)
klient wysyła żądanie + klucz publiczny do CA
CA weryfikuje klienta i podpisuje CSR
wynik – certyfikat klienta z kluczem publicznym podpisany cyfrowo przez CA
dostarczenie klientowi certyfikatu
21. Gdzie się ukrywa certyfikat w Windows ?
certificate store (magazyn certyfikatów)
MMC + Certificates SNAP-in (User, Computer, Service)
Certmgr.msc
Certutil.exe –store –user my
IE - INTERNET OPTIONS -> CONTENT -> Certificates
22. Certyfikaty
Personal – certyfikaty do których mamy klucze prywatne
Trusted Root Certification Authorities – certyfikaty CA, którym
ufamy bezwarunkowo
Trusted Publishers – zaakceptowane certyfikaty serwerów
Untrusted Certificates – „blacklista”
Trusted People – zaakceptowane certyfikaty osób
Other People – certyfikaty osób
….
25. Jak bezpiecznie obchodzić się z certyfikatem ?
Klucze mogą zostać utracone poprzez:
• Wykasowany profil użytkownika
• Reinstalacja systemu
• Uszkodzenie dysku
• Kradzież / zgubienie komputera
Kopia zapasowa
Export/import certyfikatu (KPUB / KPRIV)
26. Eksport Certyfikatów i kluczy prywatnych
•
Certificates MMC snap-in
•
Certification Authority MMC snap-in
•
Certutil.exe
•
Microsoft Outlook
•
Internet Explorer
Export a single certificate:
certutil -f -p Password1 -user -exportpfx 0123 c:certexport.pfx
certificate ID (serial number) = 0123
Import the certificate:
certutil -user -importpfx c:certexport.pfx
28. Zaufanie do CA
Dwa modele zaufania
Web of trust - każdy każdemu – PGP
Zaufanie do CA „nadrzędnej instytucji” - PKI
29. Hierarchia drzewa certyfikacji
Drzewo certyfikacji
„StartCom CA” poświadcza „StartCom C2 PIC CA”
„ StartCom C2 PIC CA” poświadcza „Krzysztof Binkowski”
Korzeń drzewa („root”)
Samopoświadczenie
„Autocertyfikat”
Skąd wiemy że „StartCom CA” jest autentyczne?
„anchor - kotwica zaufania”…
30. Weryfikacja certyfikatów
Certificate discovery – odczytywany i budowany jest cały
łańcuch zaufania, aż po ROOT CA
Path validation – weryfikowane są wszystkie certyfikaty
w łańcuchu zaufania, aż po ROOT CA
Revocation checking – sprawdzanie czy certyfikat/y nie
zostały odwołane
31. Certificate Validation Tests
Time validity
The current date falls between the start and expiration
date of the certificate
Certificate recognition
The certificate uses a valid X.509 format
Certificate contents
All required fields are completed
Signature check
The contents of the certificate are not modified
Revocation check
The certificate is not revoked
Root check
The certificate is chained to a trusted root CA
Policy validation
Critical extensions
The certificate must contain certificate or application
policies that an application requires
The application recognizes all critical extensions
32. What Are CRLs and CDPs?
Purpose of CRLs:
• List of revoked certificates
• Publish periodically or on demand
• Can be retrieved and cached by client computers
Purpose of CDPs:
• Distribution point for CRLs
• Distributed as part of a certificate
• Can be updated but won’t affect issued certificates
33. What Is an Online Responder?
Uses OCSP validation and revocation checking using
HTTP
Receives and responds dynamically to individual
requests
Supports only Windows Server 2008 or Windows
Server 2008 R2 and Windows Vista or Windows 7
computers
Functions as a responder to multiple CAs
35. Active Directory Certificate Services Windows 2008
Root, Intermediate, and Subordinate Enterprise CAs
AD CS enrollment
Manual
Group
Web-Based
AD CS communication
36. Components of a PKI Solution
CA
Digital Certificates
Public Key–Enabled
Applications and Services
Certificate Templates
Certificates and CA
Management Tools
CRLs and Online
Responders
AIA and CDPs
37. How AD CS Supports PKI
AD CS
CA
CA Web Enrollment
Online Responder Service
NDES
38. Applications That Use a PKI
Digital
Signatures
Encrypting
File System
Smart Card
Logon
Secure
E-mail
Internet
Authentication
Certificate Services
Software
Code Signing
Software
Restriction Policy
802.1x
IP Security
39. What Are Certification Authorities?
CA
Issues a selfsigned certificate
for itself
Verifies the identity of
the certificate requestor
Issues certificates to users,
computers, and services
Manages certificate
revocation
40. Public vs. Private Certification Authorities
Internal
Root CA
Public
Root CA
Subordinate
CAs
Issuing CAs
Public Third-party Root CA
Internal Employee
COMPANY
Internet User
41. Types of Certification Authorities in Windows Server 2008
Root CA
• Is the most trusted type of CA in a PKI
• Has a self-signed certificate
• Issues certificates to other subordinate CAs
• Certificate issuance policy is typically more
rigorous than subordinate CAs
• Requires enhanced physical security
Subordinate CA
• Its certificate is issued by another CA
• Addresses specific usage policies, organizational or
geographical boundaries, load balancing, and fault
tolerance
• Issues certificates to other CAs to form a hierarchical
PKI
42. Standalone vs. Enterprise CAs
Stand-alone CAs
Enterprise CAs
Requires the use of AD DS
Stand-alone CA must be used if any CA
(root / intermediate / policy) is offline,
because a stand-alone CA is not joined to an
AD DS domain
Can use Group Policy to propagate
certificate to trusted root CA certificate
store
Users provide identifying information and
specify type of certificate
Publishes user certificates and CRLs to
AD DS
Does not require certificate templates
Issues certificates based upon a
certificate template
All certificate requests are kept pending
until administrator approval
Supports autoenrollment for issuing
certificates
43. Certificate Templates - szablony
Szablony Certyfikatów są zestawem zasad i ustawień które są konfigurowalne
po stronie urzedu certyfikacji (CA). Zasady te i ustawienia są wykorzystywane
w procesie wydawania certyfikatów.
• Dostępne tylko na CA typu zintegrowanego z Active Directory
• Przechowywane w Active Directory
• Zabezpieczone przed niepowołaną zmianą
44. Certificate Template Versions
Version 1:
• Introduced in Windows 2000, provided for backward compatibility in later versions
• Created by default when a CA is installed
• Cannot be modified (except for permissions) or removed but can be duplicated to become version
2 or 3 templates (which can then be modified)
Version 2:
• Default template introduced with Windows 2003
• Allows customization of most settings in the template
• Several preconfigured templates are provided when a CA is installed
Version 3:
•
•
•
•
Supports advanced Suite B cryptographic settings
Includes advanced options for encryption, digital signatures, key exchange, and hashing
Only supports Windows Server 2008 and Windows Server 2008 R2 servers
Only supports Windows Vista and Windows 7 client computers
45. Certificate Template Categories and Purposes
Category
Single Purpose Example
Basic Encrypting File System
(EFS)
Authenticated Session
Users
Smart Card Logon
Multiple Purposes Example
Administrator
User
Smart Card User
Web Server
IPSec
Computers
Computer
Domain Controller
46. Default templates in Windows Server 2008
Administrator
Authenticated Session
Basic EFS
CA Exchange
CEP Encryption
Code Signing
Computer
Cross-Certification Authority
Directory E-mail Replication
Domain Controller
Domain Controller Authentication
EFS Recovery Agent
Enrollment Agent
Enrollment Agent (Computer)
Exchange Enrollment Agent (Offline request)
Exchange Signature Only
Exchange User
IPSec
IPSec (Offline request)
Kerberos Authentication
Key Recovery Agent (KRA)
OCSP Response Signing
Remote Access Service (RAS) and Internet Authentication Service (IAS) Server
Root CA
Router (Offline request)
Smart Card Logon
Smart Card User
Subordinate CA
Trust List Signing
User
User Signature Only
Web Server
Workstation Authentication
Certificate Templates Overview
http://technet.microsoft.com/en-us/library/cc730826(WS.10).aspx
49. Certificate Enrollment Methods
Method
Use
•
To automate the request, retrieval, and storage of certificates for domain-based computers. Users
do not have to take any action to be issued a certificate via Autoenrollment.
•
To manually request certificates by using the Certificates console or Certreq.exe when the
requestor cannot communicate directly with the CA.
•
To request certificates from a Web site located on a CA.
•
To issue certificates when Autoenrollment is not available.
•
To provide a user account the right to request certificates on behalf of another user. The user
account must have an enrollment agent certificate.
Autoenrollment
Manual Enrollment
Web Enrollment
Enrollment Agents
50. Obtaining Certificates by Using Manual Enrollment
Manual Enrollment
Certificates MMC
Web Server
NDES
52. Issuing Certificates by Using Autoenrollment
Step
Purpose
A certificate template is configured to allow Read, Enroll, and Autoenroll permissions for designated
users.
Create a template
The CA is configured to follow the settings in the template and the template is configured to not have
any approvals or signatures. Additionally, the template is configured to enroll without requiring user
input during the process.
Configure CA & template
An Active Directory Group Policy Object (GPO) is created to enable Autoenrollment. The GPO is linked to
the appropriate site, domain, or organizational unit (OU).
Create/configure GPO
The client machine receives the certificates during the next Group Policy refresh interval.
Receive by client
56. Checklist: Implementing 802.1X Authenticated Wireless Access
Task
Reference
Install and configure the following required fundamental network services: Active
Directory Domain Services (AD DS), the Domain Name System (DNS) server role, the
Dynamic Host Configuration Protocol (DHCP) server role. Install the Network Policy
Server (NPS) component of the Network Policy and Access Services server role and
authorize NPS in AD DS.
Windows Server 2008 Foundation Network Guide, available for download in Word
format at the Microsoft Download Center:
http://go.microsoft.com/fwlink/?LinkId=105231, and in HTML format in the Windows
Server 2008 Technical Library: http://go.microsoft.com/fwlink/?LinkId=106252
Purchase, and then physically install wireless access points (APs) on your network.
See your wireless AP hardware documentation
Join wireless computers to the domain and create user accounts in AD DS for all your
domain users.
Windows Server 2008 Foundation Network Guide, available for download in Word
format at the Microsoft Download Center:
http://go.microsoft.com/fwlink/?LinkId=105231, and in HTML format in the Windows
Server 2008 Technical Library: http://go.microsoft.com/fwlink/?LinkId=106252
If you are using PEAP-MS-CHAP v2, and have not already done so, auto enroll a server
certificate to NPS servers or purchase and install server certificates on your NPS
servers.
Foundation Network Companion Guide: Deploying Server Certificates and Obtaining
and Installing a VeriSign WLAN Server Certificate for PEAP-MS-CHAP v2 Wireless
Authentication (http://go.microsoft.com/fwlink/?LinkId=33675)
If you are using EAP-TLS or PEAP-TLS without smart cards, auto enroll a server
certificate to NPS server, and auto enroll client or computer certificates to domain
member client computers.
Foundation Network Companion Guide: Deploying Server Certificates and Foundation
Network Companion Guide: Deploying Computer and User Certificates
Follow the steps in this guide to deploy 802.1X authenticated wireless access.
Deploying 802.1X Authenticated Wireless Access
http://technet.microsoft.com/en-us/library/dd283023(WS.10).aspx