Kerberos survival guide SPS Kansas City
Upcoming SlideShare
Loading in...5
×
 

Kerberos survival guide SPS Kansas City

on

  • 1,982 views

 

Statistics

Views

Total Views
1,982
Views on SlideShare
1,979
Embed Views
3

Actions

Likes
0
Downloads
10
Comments
0

2 Embeds 3

http://www.techgig.com 2
http://paper.li 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Kerberos survival guide SPS Kansas City Kerberos survival guide SPS Kansas City Presentation Transcript

    • Kerberos Survival Guide
      Presented by:
      JD Wade
      Senior SharePoint Consultant, MCTS, MCITP
      Mail: jd.wade@hrizns.com
      Blog: http://wadingthrough.com
      LinkedIn: JD Wade
      Twitter: http://twitter.com/JDWade
    • Who is JD Wade?
      • SharePoint Consultant since 2007
      • Certified KnowledgeLake Partner
      • With Horizons since 2005
      • Member of SharePoint 2007 and 2010 TAP
      • Over 10 years of IT experience
      • Technical Editor for book SharePoint 2010 Disaster Recovery http://tinyurl.com/SPDRBook2010
      • Loves anything related to sound
      • Probably has one of the driest senses of humor in the room
    • Agenda
      • Overview
      • Logon Process
      • Accessing a Web Site
      • Troubleshooting Kerberos
      • Delegation
    • Kerberos
      Massachusetts Institute of Technology
    • Details Out of Scope
      • Renewing tickets
      • Ticket expiration
      • Keys
      • Authenticator
      • TGT Structure
      • Service Ticket Structure
      • Encryption/Decryption
      • Multiple domains/forests
    • Dependencies
      SPN
    • Service Principal Name
      Service Class
      Host Name
      Port
      HTTP/website:80
    • Service Classes allowed by host
      alerter
      http
      policyagent
      scm
      appmgmt
      ias
      protectedstorage
      seclogon
      browser
      iisad
      rasman
      snmp
      cifs
      min
      remoteaccess
      spooler
      cisvc
      messenger
      replicator
      Tapisrv
       
       
      clipsrv
      msiserver
      rpc
      time
      dcom
      mcsvc
      rpclocator
      trksvr
      dhcp
      netdde
      rpcss
      trkwks
      dmserver
      netddedsm
      rsvp
      ups
      dns
      netlogon
      samss
      w3svc
      dnscache
      netman
      scardsvr
      wins
      eventlog
      nmagent
      scesrv
      www
      eventsystem
      oakley
      Schedule
      fax
      plugplay
    • Kerberos
      • Benefits
      • Delegated Authentication
      • Interoperability
      • More Efficient Authentication
      • Mutual Authentication
      • IIS – Chatty by default
      • IIS6 – See MS KB 917557
      • IIS7 – See MS KB 958473
    • Logon Process
    • KDC
    • KDC
    • KDC
      SPN
    • KDC
    • Access Web Site
    • 401
    • SPN
    • <system.webServer>   <security>      <authentication>         <windowsAuthentication enabled="true" useAppPoolCredentials="true" />      </authentication>   </security></system.webServer>
    • TroubleshootingKerberos
    • Tools
      • Knowledge
      • SetSPN
      • Windows Security Logs
      • Windows 2008 ADUC or ADSIEdit
      • Kerbtray or Klist
      • Netmon and Fiddler
      • IIS Logs and IIS7 Failed Request Tracing
      • LDP
      • Kerberos Logging
      • Event Logging and/or Debug Logs
    • Common Issues that break Kerberos
      • Times are out of sync – authenticators contain current time
      • Missing SPN
      • Duplicate SPN
      • SPN assigned to wrong service account
      • IIS Providers are incorrect (For IIS 5 or 6, see http://support.microsoft.com/kb/215383)
      • IIS 7 – remember Kernel mode authentication and check settings
      • Client TGT expired (7 days expiration – have user logon and logoff, no reboot required)
      • IE and non-default ports
    • Delegation
    • FBA
      Kerberos
    • References
      • Ken Schaefer’s Multi-Part Kerberos Blog Posts:http://www.adopenstatic.com/cs/blogs/ken/archive/2006/10/20/512.aspx
      • What Is Kerberos Authentication?http://technet.microsoft.com/en-us/library/cc780469%28WS.10%29.aspx
      • How the Kerberos Version 5 Authentication Protocol Workshttp://technet.microsoft.com/en-us/library/cc772815%28WS.10%29.aspx
      • Explained: Windows Authentication in ASP.NET 2.0http://msdn.microsoft.com/en-us/library/ff647076.aspx
    • References
      • Kerberos Authentication Tools and Settingshttp://technet.microsoft.com/en-us/library/cc738673%28WS.10%29.aspx
      • How To: Use Protocol Transition and Constrained Delegation in ASP.NET 2.0http://msdn.microsoft.com/en-us/library/ff649317.aspx
      • Spence Harbar’s Bloghttp://www.harbar.net
    • Q & A
    • Appendix
      • Kerberos is an open authentication protocol. Kerberos v5 was invented in 1993 at MIT.
      • Authentication is the process of proving your identity to a remote system.
      • Your identity is who you are, and authentication is the process of proving that. In many systems your identity is your username, and you use a secret shared between you and the remote system (a password) to prove that your identity.
      • User password is encrypted as the user key. User key is stored in credentials cache. Once the logon session key is received, the user key is discarded.
      • Service password is encrypted as the service key.
      • KDCs are found through a DNS query. Service registered in DNS by DCs.
      • Showing detail behind what is happening inside of KDC but for day-to-day, use can just remember KDC
      • Another reason for simplification: encryption upon encryption upon encryption…just remember it is encrypted
      • This is a Windows-centric Kerberos presentation
      • Load balanced solutions need service account
      • All web applications hosted using the same SPN have to be hosted with the same account
      • Use A records, not CNAME records
      • Terms
      • Key Distribution Center (KDC) – In Windows AD, KDC lives on domain controllers (DC), KDCs share a long term key across all DCs.
      • KDC security account database – In Windows, it is Active Directory
      • Authorization Service (AS) – part of the KDC
      • Ticket Granting Service (TGS) – part of the KDC
      • Ticket Granting Ticket (TGT) - A user's initial ticket from the authentication service, used to request service tickets, and meant only for use by the ticket granting service. Keeps the user from having to enter password each time a ticket is requested.
    • Tickets
      • Ticket Granting Ticket (TGT)
      • A user's initial ticket from the authentication service
      • Used to request service tickets
      • Meant only for use by the ticket-granting service.
      • Service ticket for the KDC (service class = krbtgt)
      • Service Ticket
      • Enables the ticket-granting service (TGS) to safely transport the requester's credentials to the target server or service.
    • Tools
      • Knowledge
      • SetSPN
      • Windows Security Logs
      • Windows 2008 ADUC or ADSIEdit
      • Kerbtray or Klist
      • Netmon and Fiddler
      • IIS Logs and IIS7 Failed Request Tracing
      • LDP
      • Kerberos Logging
      • Event Logging and/or Debug Logs
      • Troubleshooting
      • Have user logon and logoff if they don’t regularly: TGTs are only renewable for so long and then they expire (7 day default), then password has to be re-entered.
      • Remember that authenticators contain the current time. Check for time sync issues.
      • Request TGT (Remember there is even more complexity)
      User (client) logs into workstation entering their password.
      Client builds an authentication service request containing the user’s username (KPN), the SPN of the TGS, and encrypts the current time using the user’s password as an authenticator.
      Client sends these three items to the KDC.
      KDC get user’s password from AD, decrypts time and verifies it is valid.
      AS generates a logon session key and encrypts with the user’s password. AS generates a service ticket which contains a logon session key and the user’s KPN encrypted with the AS shared key. This is a special service ticket called a Ticket Granting Ticket (TGT).
      • Request TGT (Remember there is even more complexity)
      KDC sends both to the client.
      Client decrypts logon session key using its password and stores the logon session key in cache. The client stores the TGT in cache.
      • Access Service (Remember there is even more complexity)
      User (client) encrypts the current time using the logon session key in cache creating an authenticator and sends the authenticator, the user’s KPN, the name of the target service (SPN), and the TGT to the TGS.
      TGS decrypts the TGT using its shared key to access the logon session key. The logon session key is used to decrypt the authenticator and confirms the time is valid.
      TGS extracts the user’s KPN from the TGT. TGS generates a service session key and encrypts the service session key using the logon session key. TGS uses server session key to generate service ticket and encrypts it using service’s password.
      TGS sends service session key and the service ticket to the client.
      • Access Service (Remember there is even more complexity)
      Client decrypts service session key using cached logon session key, adds current time (as well as other items), and encrypts with the service session key to create an authenticator.
      Client sends ticket and authenticator to remote server which runs service.
      Service decrypts service ticket accessing the server session key and the KPN. Using the service session key, the service decrypts the authenticator and confirms the current time is valid. A Windows access token is generated
      (Optional) If client requests mutual authentication, service encrypts current time using the service session key creating an authenticator and sends to the client.
      Clients decrypts authenticator and validates time.
    • Troubleshooting Tools
      • Patience – Test methodically and
      • Knowledge - Know your Forests, Domains, Trusts, Functional Levels…get a basic lay of the land.
      • Always test from a different machine than the web server or domain controller!
      • SetSPN
      • Windows Security Logs
      • Windows 2008 ADUC
      • Kerbtray
      • Netmon and Fiddler
      • IIS Logs and IIS7 Failed Request Tracing
      • Kerberos Logging
      • Event Logging and/or Debug Logs
    • Common Issues that break Kerberos
      • Times are out of sync – authenticators contain current time
      • Missing SPN
      • Duplicate SPN
      • SPN assigned to wrong service account
      • IIS Providers are incorrect (For IIS 5 or 6, see http://support.microsoft.com/kb/215383)
      • IIS 7 – remember Kernel mode authentication and check settings
      • Client TGT expired (7 days expiration – have user logon and logoff, no reboot required)
      • IE and non-default ports