Public Key Infrastructure – Deep Dive PKI session SHOWING you how to embrace PKI Steve Lamb IT Pro Security Evangelist Microsoft Ltd
Agenda What can PKI enable Let’s review the theory Introducing our Demonstration Environment Secure Web Publishing Secure Secure Files Recommendations
What can PKI enable? Secure – sign and/or encrypt messages Secure browsing – SSL – authentication and encryption Secure code – authenticode Secure wireless – PEAP & EAP-TLS Secure documents – Rights Management Secure networks – segmentation via IPsec Secure files – Encrypted File System(EFS)
Let’s review the theory…
Security Defense in Depth Data and Resources Application Defenses Host Defenses Network Defenses Perimeter Defenses
Symmetric Key Cryptography Encryption “The quick brown fox jumps over the lazy dog” “AxCv;5bmEseTfid3) fGsmWe#4^,sdgfMwi %” “The quick brown fox jumps over the lazy dog” Decryption Plain-text input Plain-text output Cipher-text Same key (shared secret)
Public Key Encryption Encryption “The quick brown fox jumps over the lazy dog” “Py75c%bn&*)9|fDe^ mdFg$5knvMd’rkveg Ms” “The quick brown fox jumps over the lazy dog” Decryption Clear-text Input Clear-text Output Cipher-text Different keys Recipient’s public key Recipient’s private key private public
Hybrid Encryption (Real World) As above, repeated for other recipients or recovery agents Digital Envelope Other recipient’s or agent’s public key (in certificate) in recovery policy Launch key for nuclear missile“RedHeat”is... Symmetric key encrypted asymmetrically (e.g., RSA) Digital Envelope User’s public key (in certificate) RNG Randomly- Generated symmetric “session” key Symmetric encryption (e.g. DES) *#$fjda^ju539!3t t389E 5e%32\^kd
Introducing our demonstration environment
Network Infrastructure
Certification Authority Installed on the DC for simplicity In production use a multi-level hierarchy Enterprise Installation – integrated with AD
Secure Web Publishing
Application Layer Content ?????????????????????? A Traditional Firewall’s View of a Packet Only packet headers are inspected Application layer content appears as “black box” IP Header Source Address, Dest. Address, TTL, Checksum TCP Header Sequence Number Source Port, Destination Port, Checksum Forwarding decisions based on port numbers Legitimate traffic and application layer attacks use identical ports Internet Expected HTTP Traffic Unexpected HTTP Traffic Attacks Non-HTTP Traffic Corporate Network
ISA Server’s View of a Packet Application Layer Content MSNBC - MSNBC Front Page <link rel="stylesheet" IP Header Source Address, Dest. Address, TTL, Checksum TCP Header Sequence Number Source Port, Destination Port, Checksum Forwarding decisions based on content Only legitimate and allowed traffic is processed Internet Expected HTTP Traffic Unexpected HTTP Traffic Attacks Non-HTTP Traffic Corporate Network Packet headers and application content are inspected
Configure IIS for HTTPS Populate site Enrol for web server certificate Configure SSL
Configure ISA for SSL Copy web server cert to ISA
Publish the web server Use the Wizard! Create an SSL listener
Secure
How Exchange RPC Works ServiceUUIDPort Exchange Info Store {0E4A0156-DD5D-11D2-8C2F- 00CD4FB6BCDE} 4402 Active Directory {E B06-11D1-AB04- 00C04C2DCD2} 3544 Performance Monitor {A00C021C-2BE2-11D2-B F87A8F8E} 9233 RPC Server (Exchange) RPC Client (Outlook) TCP 135: Port for {0E4A…} Port 4402: Data The RPC server maintains a table of Universally Unique Identifiers (UUID) and assigned port 1 The client connects to TCP port 135 on the server to query for the port associated with a UUID 2 The server responds with the associated port 3 The client reconnects to server on the designated port to access Exchange Server 4 Server: Port 4402 Internet
RPC and Traditional Firewalls Open port 135 for incoming traffic Open every port that RPC might use for incoming traffic RPC Server (Exchange) RPC Client (Outlook) TCP 135: Port for {0E4A… ? Port 4402: Data Server: Port 4402 Traditional firewalls can’t provide secure RPC access Internet
RPC and ISA Server RPC Server (Exchange) RPC Client (Outlook) TCP 135: Port for {0E4A… ? Port 4402: Data Server: Port 4402 Internet Initial connection Only allows valid RPC traffic Blocks non-Exchange queries Secondary connection Only allows connection to port used by Exchange Enforces encryption ISA Server enables secure remote access using Outlook
Configure Secure Request a “user” cert Configure Outlook to use the cert Send Signed / Encrypted message
Secure Files
Protecting files (“Stop thief!”) BIOS passwords Not universally supported Pretty much no recovery if you forget! Good passwords Mitigate “pass-the-hash” attacks SysKey mode 3 Useful mostly for protecting local accounts Use system restore disk if you forget Encrypting file system (EFS) Transparent to applications and users Computationally infeasible to break (domain accts or SysKey 3) Must implement recovery agents; better with domain and PKI
EFS operation Assumptions: domain accounts, enterprise CA, Windows Server 2003, Windows XP EFS certificate request with public EFS key generate public and private EFS keys public key bound to cert; store cert and private key in profile generate file encryption key encrypt FEK with EFS key encrypt FEK with default recovery agent
Avoid EFS “gotchas” Back up that EFS certificate and the keys! You will lose access if you have no PKI or DRA CIPHER /X command store on USB drive Also export local DRA and remove from computer Eliminate plain-text “shreds” Encrypt folders, not files CIPHER /W wipe slack space: 00-FF-random Please, just use an enterprise CA Set up for auto-enrollment Configure DRA in group policy Now you won’t have any worries
Recommendations Don’t be scared of PKI! Set up a test environment to enable you to “play” Minimise the scope of your first implementation Read up on CP & CPS Document the purpose and operating procedures of your PKI
Summary Cryptography is a rich and amazingly mature field We all rely on it, everyday, with our lives Know the basics and make good choices avoiding common pitfalls Plan your PKI early Avoid very new and unknown solutions
References Visit Read sci.crypt (incl. archives) For more detail, read: Cryptography: An Introduction, N. Smart, McGraw-Hill, ISBN Practical Cryptography, N. Ferguson & B. Schneier, Wiley, ISBN Contemporary Cryptography, R. Oppliger, Artech House, ISBN (to be published May 2005, see Applied Cryptography, B. Schneier, John Wiley & Sons, ISBN Handbook of Applied Cryptography, A.J. Menezes, CRC Press, ISBN , (free PDF) PKI, A. Nash et al., RSA Press, ISBN Foundations of Cryptography, O. Goldereich, Cryptography in C and C++, M. Welschenbach, Apress, ISBN X (includes code samples CD)
Community Resources Most Valuable Professional (MVP) Newsgroups Converse online with Microsoft Newsgroups, including Worldwide /newsgroups/en-us/default.aspx /newsgroups/en-us/default.aspx User Groups - Meet and learn with your peers default.mspx default.mspx
Copyright 2004 © Project Botticelli Ltd & Microsoft Corp. E&OE. For informational purposes only. No warranties of any kind are made and you have to verify all information before relying on it. You can re-use this presentation as long as you read, agree, and follow the guidelines described in the “Comments” field in File/Properties. Thanks to Rafal Lukawiecki for providing some of the content for this presentation deck – his contact details are as follows… Strategic Consultant, Project Botticelli Ltd