certyfikaty od podszewki w oparciu o pki w windows 2008 mts 2011
DESCRIPTION
Certyfikaty od podszewki w oparciu o PKI w Windows 2008 MTS 2011TRANSCRIPT
Certyfikaty od podszewki w oparciu o PKI w Windows 2008
KRZYSZTOF BIŃKOWSKITrener / Konsultant
Agenda Cele jakie przyświecają PKI Co w certyfikacie piszczy ? 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 Przykładowa bezpieczna sieć WiFi
korzystająca z certyfikatów
Certyfikat
Budowa certyfikatu
Weryfikacja certyfikatu
Urząd Certyfikatów
Szablony certyfikatów
Dostarczanie certyfikatów
ZAUFANIE
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
Relizacja techniczna celów PKI
Poufność Szyfrowanie
Autentyczność Funkcja skrótu, podpis cyfrowy
Integralność Funkcja skrótu, podpis cyfrowy
Niezaprzeczalność Podpis cyfrowy, znaczniki czasu
Klucze szyfrujące
Typ klucza Opis
Symetryczny
Ten sam klucz stosowany do szyfrowania i deszyfrowania danych
Chroni dane przed ujawnieniem i przechwyceniem
Asymetryczny
Składa się z klucza prywatnego i publicznego
Klucz prywatny chroniony, klucz publiczny udostępniany wszystkim
Jeśli użyjemy klucza prywatnego do szyfrowania, to publiczny klucz wykorzystujemy do deszyfrowania i vice versa
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
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)
Algorytmy znane
SymetryczneDES,RC2,RC4,3DES,AES, AES-GMAC
AsymetryczneDiffie-Hellman, RSA, DSA, ECDH
HASH – funkcja skrótuMD5, SHA1, SHA256
Algorytmy zalecane przez NIST suite-B Windows 2008 R2
http://www.nsa.gov/ia/programs/suiteb_cryptography/index.shtmlSuite B PKI in Windows Server 2008 - http://www.microsoft.com/download/en/details.aspx?id=14551
Algorithm Secret Top Secret
Encryption:
Advanced Standard (AES) 128 bits 256 bits
Digital Signature:
Elliptic Curve Digital Signature Algorithm (ECDSA) 256 bit curve 384 bit curve
Key Exchange:
Elliptic Curve Diffie-Hellman (ECDH) 256 bit curve 384 bit curve
Hashing:
Secure Hash Algorithm (SHA) SHA-256 SHA-384
The best Password Cracking tool
CRYPTOOL - http://www.cryptool.org/
Tworzymy certyfikat, demo podpisu cyfrowego
Certyfikat
Certyfikat – cyfrowa tożsamość przypisana do
wystawiony i podpisany przez Urząd Certyfikatów (CA), certyfikat powiązany jest z kluczem publicznym dostarczonym przez klienta
KomputerUżytkownik Urzadzenie sieciowe
Co w certyfikacie piszczy ?
Klucz publiczny + nazwa + poświadczenie = certyfikat
Issuer
Validity
Subject
Public Key
SignatureCER
TIFI
CA
TE
Certyfikat
Zastosowanie certyfikatów
Uwierzytelnienie użytkownika Uwierzytelnienie komputera Podpis cyfrowy w dokumentach MS Office Podpis cyfrowy w wiadomościach email Szyfrowanie wiadomości email Szyfrowanie plików EFS inne
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ówWspomagający budowanie hierarchicznej struktury PKI.
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).
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
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/
Jak powstaje certyfikat
Obsługa certyfikatów przez CA
1. klient generuje klucz prywatny i publiczny
2. klient zamienia klucz na CSR (Certificate Signing Request) (online / offline)
3. klient wysyła żądanie + klucz publiczny do CA
4. CA weryfikuje klienta i podpisuje CSR
5. wynik – certyfikat klienta z kluczem publicznym podpisany cyfrowo przez CA
6. dostarczenie klientowi certyfikatu
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
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 ….
CERTMGR.MSC - x.509, certyfikatCertutil.exe –asnCertutil.exe –store –user my
Czy można bezpieczniej chronić klucz prywatny ?
SMARTCARD (PIN, BIOMETRICS) HSM
Jak bezpiecznie obchodzić się z certyfikatem ?
Kopia zapasowa Export/import certyfikatu (KPUB / KPRIV)
• Wykasowany profil użytkownika
• Reinstalacja systemu
• Uszkodzenie dysku
• Kradzież / zgubienie komputera
Klucze mogą zostać utracone poprzez:
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) = 0123Import the certificate:
certutil -user -importpfx c:\certexport.pfx
Magazyn certyfikatówexport/import
Zaufanie do CA
Dwa modele zaufania
Web of trust - każdy każdemu – PGP
Zaufanie do CA „nadrzędnej instytucji” - PKI
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”…
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
Certificate Validation Tests
Time validityThe 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 The certificate must contain certificate or application policies that an application requires
Critical extensions The application recognizes all critical extensions
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
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
PKI w Windows 2008Budujemy własne CA
Active Directory Certificate Services Windows 2008
Root, Intermediate, and Subordinate Enterprise CAs
ManualGroup Web-Based
AD CS communication
AD CS enrollment
Components of a PKI Solution
CA Digital CertificatesCRLs and Online Responders
Certificate Templates
Public Key–Enabled Applications and Services
Certificates and CA Management Tools
AIA and CDPs
How AD CS Supports PKI
CA
AD CS
CA Web Enrollment Online Responder Service NDES
SoftwareCode Signing
EncryptingFile System
Smart CardLogon
802.1x IP Security
InternetAuthentication
SecureE-mail
Applications That Use a PKI
Certificate Services
SoftwareRestriction Policy
DigitalSignatures
What Are Certification Authorities?
CA
Issues a self-signed certificate for itself
Verifies the identity of the certificate requestor
Manages certificate revocation
Issues certificates to users, computers, and services
Public vs. Private Certification AuthoritiesInternal Root CA
Subordinate CAs
Public Root CA
Issuing CAs
COMPANY
Public Third-party Root CA
Internal Employee Internet User
Types of Certification Authorities in Windows Server 2008
• 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
Root 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
Subordinate CA
Standalone vs. Enterprise CAsStand-alone CAs Enterprise CAs
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
Requires the use of AD DS
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 templatesIssues certificates based upon a certificate template
All certificate requests are kept pending until administrator approval
Supports autoenrollment for issuing certificates
• Dostępne tylko na CA typu zintegrowanego z Active Directory
• Przechowywane w Active Directory
• Zabezpieczone przed niepowołaną zmianą
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.
Certificate Templates - szablony
Certificate Template Versions
• 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 1:
• 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 2:
• 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
Version 3:
Certificate Template Categories and Purposes
Category Single Purpose Example Multiple Purposes Example
Users
Computers
Basic Encrypting File System (EFS)
Authenticated Session
Smart Card Logon
Administrator
User
Smart Card User
Web Server
IPSec
Computer
Domain Controller
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
Certificate Templates Overviewhttp://technet.microsoft.com/en-us/library/cc730826(WS.10).aspx
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
Szablony certyfikatów + logowanie SMARTCARD
Certificate Enrollment MethodsMethod 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.
Web Enrollment
Manual Enrollment
Autoenrollment
Enrollment Agents
Obtaining Certificates by Using Manual Enrollment
Certificates MMC Web Server NDES
Manual Enrollment
Enrollment / Web Enrollment
Issuing Certificates by Using AutoenrollmentStep Purpose
A certificate template is configured to allow Read, Enroll, and Autoenroll permissions for designated users.
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.
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).
The client machine receives the certificates during the next Group Policy refresh interval.
Create/configure GPO
Configure CA & template
Receive by client
Create a template
Autoenrollment - GPO
Computer autoenrollmentComputer Configuration\ Windows Settings\Security Settings\Public Key Polices\Certificate Services Client - Auto-Enrollment
User autoenrollmentUser Configuration\Windows Settings\Security Settings\Public Key Polices\Certificate Services Client - Auto-Enrollment
Zastosowanie praktyczne bezpieczna sieć WiFi w oparciu o certyfikaty
DC1 Active Directory
DNS, DHCP
AD CS
RADIUS
NPS
NPS+RADIUS+WiFi
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
Certyfikat
Budowa certyfikatu
Weryfikacja certyfikatu
Urząd Certyfikatów
Szablony certyfikatów
Dostarczanie certyfikatów
Podsumowanie
ZAUFANIE
Dziękujemy za uwagę
© 2011 Microsoft Corporation. Wszelkie prawa zastrzeżone. Microsoft, Windows oraz inne nazwy produktów są lub mogą być znakami towarowymi lub zastrzeżonymi znakami towarowymi firmy Microsoft w Stanach Zjednoczonych i innych krajach. Zamieszczone informacje mają charakter wyłącznie informacyjny. FIRMA MICROSOFT NIE UDZIELA ŻADNYCH GWARANCJI (WYRAŻONYCH WPROST LUB DOMYŚLNIE), W TYM TAKŻE USTAWOWEJ RĘKOJMI ZA WADY FIZYCZNE I PRAWNE, CO DO INFORMACJI ZAWARTYCH W TEJ PREZENTACJI.