Brksec 3053
Brksec 3053
Access VPN
Ned Zaldivar, Security Consulting Systems Engineer
BRKSEC-3053
Abstract
This is an intermediate to advanced level session that will provide a technical
overview and best practices for deploying X.509 certificates for AnyConnect client.
A number of different SSLVPN use cases, including bring your own device, will be
introduced and explained. Technologies used include Cisco ASA and Cisco
AnyConnect Secure Mobility using both Cisco ISE and Microsoft public key
solutions.
By the end of the session participants should grasp the major steps in X.509
certificate deployment and be able to make informed decisions about using
certificate authentication with Cisco solutions. The target audience are security &
network administrators.
Session Objectives
Certificates excel at 2-factor authentication or mobile platform authentication
• Certificates are easy to use and deploy
• Tomorrow you will be able to deploy Advanced Use Cases for VPN!
Assumptions for ASA
• You have setup AnyConnect SSLVPN either manually or through the
ASDM/CSM SSLVPN Wizard
• PKI Overview
• CA Overview / Configuration Details
• Advanced SSLVPN with Certificates
• Troubleshooting & Management
PKI Components
Certificate
PKI Components
Certificate Authority – One source of Truth
Root CA Issuing CA
Certificate
Certificate Revocation List
Revocation
Certificate Enforcement/Validity Check
Police
Private CA
4) Client Identity Certificate
Certificate Use Cases
VPN is just one use case!
• Certificates are the gift that keeps giving
Digital Signing
Email Decrypting TLS/SSL
• PKI Overview
• CA Overview / Configuration Details
• ISE 1.3+ Certificate Authority
• Microsoft Certificate Authority
Router
MSFT
Linux
ASA
ISE
Capability / Feature
Deploy BYOD certs via VPN?
Deploy BYOD certs wired or wireless?
Deploy certs to Active Directory domain computers?
Highly Scalable?
Easily Manageable?
Cisco BU/TAC Official Support
Cisco ISE 1.3+ Certificate Authority
• Easy certificate provisioning for non Active Directory / Group Policy managed
devices (OS X, Mobile Devices, non-AD Windows)
• Enrollment via wired and wireless
• Deleting Endpoint deletes Certificate
• Manual Certificate Provision using RestAPI in 1.4 for devices that cannot do
BYOD provisioning (like Linux, PoS, Embedded Windows…etc)
• Ideal for Bring Your Own Device use case
• Deploy in addition to MS CA environment for corporate + BYOD!
PSN PSN
Certificate Provisioning
– Supports OS X, Windows,
Android, and Apple iOS
– Intended for BYOD / non Active
Directory managed clients
PSN PSN
Example Windows
Certificate Templates
Certificate Authority Lifetime Timers
Relationship between Root and Subordinate CAs
Problem: Enterprise RootCA validity period is 2 years(default). You want SubCA
lifetime of 5 years. Default SubCA template in RootCA is 5 years.
http://support.microsoft.com/kb/281557
http://blogs.technet.com/b/instan/archive/2009/01/14/using-a-custom-template-for-
subordinate-ca-s.aspx
Agenda
• PKI Overview
• CA Overview / Configuration Details
• Advanced SSLVPN with Certificates
• Architecture & Use Case Requirements
• Common Tasks
• (5) Uses Cases with and without ISE
• Troubleshooting and Management
Use Case Architecture
Cisco
Adaptive
Security
Appliance
Microsoft Certificate
9.4.(1)
Services 2012
Laptops / Desktops
Use Cases
• IOS/Android using DAP(UDID/Cert Check)
ASA SCEP Proxy and
• Windows/MAC using DAP with Cert Prefill LDAP AAA
• BYOD with User Certificate leveraging ISE for Authorization
• Corporate Machine Certificate using ISE for Authorization
• ISE CA for Delivery and ISE for OCSP & Authorization
Use Case Security Requirements
Two-Factor Authentication (certificate + password) for non Tablets / Phones
) Most common use is leveraging the CN field within the certificate and sent
over to AAA Server (ISE, LDAP/AD directly)
AAA – Dynamic Access Policies
Device ID Awareness from AnyConnect used by ASA
Windows BIOS Serial Number
Mac Device Serial Number
Linux Device Serial Number
Apple iOS UDID
Android 40byte unique ID at installation + IMEI (GSM), ESN (CDMA) +
MAC-Address
AAA – Dynamic Access Policies AnyConnect
Identity used
Device ID Awareness in AnyConnect sent to ISE
for Profiling
• Sent via Radius
• Available since ASA 9.2
• ISE 1.3 added Dictionary results
AAA – Dynamic Access Policies
Common Authorization checks using ASA (optional)
Identity
Validation/User SCEP Proxy
Cert AuthC or Cert AuthZ User
Request
OCSP/CRL
Delivery
AnyConnect Client Profile – to be pushed to clients upon connect
• %USER% as CN and/or
Email used for User
Authorization
• %USER% as CN and/or
Email used for User
Authorization
• %MACHINEID% inserted in
Department(OU) field in
order to embed device serial
number in certificate request!
Delivery
AnyConnect Phone / Tablet BYOD Use Case (CertAuthMobileProfile)
• Configure
respective Client
Profile with correct
Connection Profile
name / URL
• Must match
Connection Profile
GROUP URL
exactly
Delivery
AnyConnect Client Profiles – Server list configuration for client drop-down
• Configure
respective Client
Profile with correct
Connection Profile
name / URL
Delivery
Connection Profiles
Single
Profile for
non mobile
enrollment
and VPN
Mobile
enrollment
»With this checkbox enabled inside the Connection Profile:
Post-enroll »a device with a certificate will authenticate (and not enroll again)
mobile VPN
»a device without will be able to enroll per Group Policy settings
Delivery
Connection Profiles URLs
“CertAuthProfile”
Laptop / Desktop VPN
“CertEnrollMobile”
Phone / Tablet PKI Enrollment
“CertAuthMobile”
Phone / Tablet VPN
Delivery
Group Policy Change for SCEP Proxy
Without this setting configured:
• a device with a certificate will authenticate
• a device without a certificate will not be able to enroll
Delivery
Bind AnyConnect Client Profile to Group Policy for delivery upon connect
• After AnyConnect Client Profile created, configure Group Policy to ‘push’ it to
clients
AAA – Two Factor (User + User Certificate)
Two factor – Best practice for Non-Mobile (CertAuthProfile)
Username variable
constructed from certificate
fields!
cn= username
ou= device id
AAA – Authorization for User AD
Check if user is authorized for connection
“Authorization” check (won’t work with Mobile UUID check) will not allow connection if:
LUA Script
Endpoint.anyconnect.deviceuniqueid is
supplied by AnyConnect
AuthZ/AuthC
ASA Integration ISE Summary
ISE
can Authorize what is passed to the ASA eg. Common Name
can support authentication as well eg. OTP + Cert or AD + Cert, etc
can use AnyConnect attributes
ASA
can only send 1 Authorization
does the Authentication for the certificates
validates the Certificate using Certificate store / CRL or OCSP
ASA Configuration for AuthZ
• ISE defined as
Radius Server
• Required option
for ISE Authorize
user
ISE Configuration for Authorization
• Requires Conditions
• Device Type defined
• NAS Port Type - Virtual
ISE Configuration for Authorization
Option below is used because ASA is passing blank password
Needed for
ASA < 9.2
ISE Configuration for AuthZ
Verify User in Domain using Authorization Policy
Policy could be passed back, Like dACL, SGT (9.2), or Group Policy.
Logging – ISE 1.2 AuthZ only (Pre ASA 9.2)
• Notice ISE Authentication Logs on AuthZ from ASA show Authentication
succeeded
• Details tell the real story
Logging – ISE AuthZ Successful (ASA Pre 9.2)
• Continue on
Failed
Authentication
• Certificate
Field lookup
• What ISE is
passing back
to ASA
Logging – ISE AuthZ only (ASA Pre 9.2)
• Notice ISE Authentication Logs on AuthZ from ASA show Authentication
Failed
AAA – ISE AuthZ Failed – User Account Disabled
ISE Policy to check for
Disabled Accounts
Account is Disabled
• Failed
ASA Configuration for ISE AuthZ (>= ASA 9.2)
AAA Server Group
Configuration on ASA
Authorize Only
available in ASA 9.2
and above
ISE Authentication
policy does not need to
be modified.
ISE 1.3 Authorization Successful (>= ASA 9.2)
Authorization
only Policy
Corporate Access
Use Case 4
Corporate Access using Computer Certificate and
AD Username/Password
ASA providing Certificate Authentication / Validation
CA Public
ISE/AD Providing AAA
Only managed devices can connect!
ASA Identity Cert / Computer Cert 4
Validation/AuthC
1 2
ASA
GPO AuthZ/AuthC
for Cert Delivery 5
AD/CA
AD/CA
ISE
AAA - Authorization for Computer Account
• Or
• Host/machine_name
• Host/machine_name.domain
• Machine_name$
• Machine_name$.domain
• Distinguished name*
AAA - Authorization for Computer Account
Identity Rewrite
• Global setting in ISE, Administration>External Identity Sources > Active
Directory > Advanced Settings
Logging – ISE 1.3 AuthZ Success - Computer
Authorization Only &
Identity Rewritten in
ISE
• Publish Template
OR
Connection Profile & Selection
Connection
Profile for
Machine Auth
Parse out
group using
URL or
Certificate
map
AnyConnect Client Profile Change for Machine
AD
Native Supplicant
Provisioning
OCSP
ASA -> ISE OCSP
Intermediate
required if Sub of
MSFT CA [option]
Maps Certificate to
Correct Connect
Profile
CRYPTO_PKI: Verifying OCSP response with 1 certs in the responder chain These messages are
CRYPTO_PKI: Validating OCSP response using trusted CA cert: serial number: displayed because you
159A0691584B65BB5C9596E252F789, subject name: cn=Certificate Services
Root CA - ise13, issuer_name: cn=Certificate Services Root CA - ise13
are using a different cert
for the OCSP check. (ie
CRYPTO_PKI: Searching for ResponderID cert by keyhash
Cert MAP with Override)
CERT-C: W ocsputil.c(538) : Error #708h
CRYPTO_PKI: verifyResponseSig:3191
CRYPTO_PKI: OCSP responder cert revocation check was skipped due to configuration.
OCSP
OCSP Verification using Wireless – Good Certificate Internal CA Check
Good
Root CA check
OCSP
OCSP via ISE OCSP Logs – Good Certificate
OCSP Verification ASA -> ISE CA
Certificate Valid
CRYPTO_PKI: Verifying certificate with serial number:
15B133D2E658491F8807B95A95CE6A00, subject name:
c=US,st=TX,l=Houston,ou=ciscolive,cn=ned, issuer_name: cn=Certificate
Services Endpoint Sub CA - ise13, signature alg: SHA256/RSA.
CRYPTO_PKI: Responder cert status is not revoked
CRYPTO_PKI: response signed by the CA
CRYPTO_PKI: transaction GetOCSP completed
CRYPTO_PKI: Process next cert in chain entered with status: 1.
CRYPTO_PKI: Process next cert, valid cert.
OCSP Verification ASA -> ISE CA
Certificate Revoked
CRYPTO_PKI: Verifying certificate with serial number:
15B133D2E658491F8807B95A95CE6A00, subject name:
c=US,st=TX,l=Houston,ou=ciscolive,cn=ned, issuer_name: cn=Certificate
Services Endpoint Sub CA - ise13, signature alg: SHA256/RSA.
CRYPTO_PKI: response signed by the CA
CRYPTO_PKI: transaction GetOCSP completed
CRYPTO_PKI: Process next cert in chain entered with status: 13.
CRYPTO_PKI: Process next cert, Cert revoked: 13
OCSP Errors with ISE CA
If timing is off between ASA and ISE, OSCP will fail
• PKI Overview
• CA Overview / Configuration Details
• Advanced SSLVPN Use Cases + BYOD
• ASA
• iOS & Android / Mac & Windows
• ASA + ISE
• Corporate
• ISE as CA
Logging enable
Logging class ca console debug
Debug crypto ca 3
Debug crypto ca transaction 3
Debug crypto ca message 3
Debug webvpn 255
Debug crypto ca scep-proxy 255
Since DAP included LDAP lookup, all the LDAP attributes are
displayed
Especially useful when configuring authorization rules against
LDAP database
Event Monitoring- Cisco CSM 4.2+
Reporting – ACS5.x/ISE 1.x and CSM 4.2+
Certificate Enrollment
BYOD End user experience – Apple iPad
• Activate on import is
recommended in
AnyConnect Client Profile
for mobile devices.
• No need to MANUALLY
select the profile
Certificate Enrollment
BYOD End user experience – Windows 8.1
Client Certificate Troubleshooting
Result of Revoked Certificate or Other Causes
Certificate Configuration Error
• Missing Private Key (p7b)
• End User Privileges
• Certificate in wrong store
• Xml profile
Tools to help
• winhttpcert
• System events
• DART
Summary
• PKI Overview
• Overview and configuration of
ISE/Microsoft Certificate Authorities
• Advanced Use Cases using
Cisco AnyConnect with certificates
• Troubleshooting and Management
Q&A
Wrap up!
Certificates excel at 2-factor authentication or mobile platform authentication
• Certificates are easy to use
• Tomorrow (tonight!) you will be able to deploy Advanced Use Cases of PKI for
VPN!
• Cisco 2015 Annual Security Report
• Now available:
• cisco.com/go/asr2015
Participate in the “My Favorite Speaker” Contest
Promote Your Favorite Speaker and You Could Be a Winner
• Promote your favorite speaker through Twitter and you could win $200 of Cisco
Press products (@CiscoPress)
• Send a tweet and include
• Your favorite speaker’s Twitter handle @n3d
• Two hashtags: #CLUS #MyFavoriteSpeaker
• You can submit an entry for more than one of your “favorite” speakers
• Don’t forget to follow @CiscoLive and @CiscoPress
• View the official rules at http://bit.ly/CLUSwin
Complete Your Online Session Evaluation
• Give us your feedback to be
entered into a Daily Survey
Drawing. A daily winner
will receive a $750 Amazon
gift card.
• Complete your session surveys
though the Cisco Live mobile
app or your computer on
Cisco Live Connect.
Don’t forget: Cisco Live sessions will be available
for viewing on-demand after the event at
CiscoLive.com/Online
Continue Your Education
• Demos in the Cisco campus
• Walk-in Self-Paced Labs
• Table Topics
• Meet the Engineer 1:1 meetings
• Related sessions
Thank you
• Certificate Authentication with Prefill
Demos End User Experience
• Untrusted Certificate and Manual • http://www.youtube.com/watch?v=zyG
XCKlTxQ8
SCEP example
• http://www.youtube.com/watch?v=j6C • Debug of SCEP Proxy
S2R2x1ZY • http://www.youtube.com/watch?v=tkljG
m7Lhiw
• Getting certificate using SCEP
Proxy • Certificate Authentication with ISE
• http://www.youtube.com/watch?v=l6W Authorization
7gw3f94A • http://www.youtube.com/watch?v=sHd
34CUH68A
• Debug of Revoked Certificate
Authentication • Debug of Good Certificate
• http://www.youtube.com/watch?v=Un_ Authentication
S_uJ4M1Q • http://www.youtube.com/watch?v=i6oF
g-VsaG0
Additional Information Sources
Cisco Resources
• ASA 8.X: AnyConnect SCEP Enrollment Configuration Example
• How to obtain a Digital Certificate from a Microsoft Windows CA using ASDM on
an ASA
• www.cisco.com/go/vpn
• www.cisco.com/go/anyconnect
• www.cisco.com/go/asa
• www.cisco.com/go/ise
Extras
PKI Components
Advantages of Certificates
• Two-factor Authentication using Identity Certificate (What you need) plus
username/password (What you have)
• Less expensive TCO alternative to token solutions
• Simpler end-user experience = Happier users
• Hosted
• Cloud based SaaS offering
• Less care and feeding
• Usually more expensive
Certificate Authority Recommendations
If Mostly AD Domain Joined Computers:
• Microsoft Windows 2008 R2 Enterprise Certificate Authority
• Low cost, most Windows Server customers already own this
• User and Machine certificates can be auto deployed using Group Policy
• SCEP and Web enrollment support for mobile / non domain devices
1. Hybrid Certificates
• Multiple fields for different
• identity characteristics
• (i.e. username + device
• serial number)
How Identity Certificates Work
VPN Use Case – Exchange of Certificates
Certificate validation steps:
– Has the digital certificate been issued by a trusted CA?
– Is the certificate expired? (start + end date validity check)
– Has the certificate been revoked? (OCSP or CRL check)
– Does the VPN URL match the CN or SAN field in the certificate?
Protects against Man in the Middle Attacks
– ASA checks against a known trusted CA
Certificate Revocation Explained
• Certificate Revocation List (CRL)
• Flat text file containing serial numbers of revoked certificates
• May be retrieved via HTTP / LDAP
• Delta CRL
• CRL “update” containing only “new” revoked serial numbers since last update
• Limited Device / client support!
Subject (CN)
&
Subject
Alternative Name
(SAN) fields
How Identity Certificates Work
Forcing per user cert authentication
BYOD Certificate Deployment
SCEP Proxy “hides” CA Server from Client
Client creates public / private key pair locally before sending Certificate
Signing Request (CSR) inside of SCEP session
There are 2 ways to solve the problem (once you hit it)
• Use the NDES Service Account and using MMC -> Certificates (computer
account) and renew the certs (I did not know the password)
• Remove NDES feature from the CA (role) and re-add (this worked for me).
Best Practices is modify the service templates for CEP Encryption and
Exchange Enrollment to longer than 2 years.
Let’s Build a Root CA!
Install the 2012 R2 server
Default
Default
Workstation Template
• Required for Machine Authentication (EAP-TLS)
• Required for EAP Chaining
• Certificate Authority > Certificate Template, (right-
click) > Manage
• Certificate Template >
WorkstationAuthentication,(right-click) > Duplicate
Enable AutoEnrollment in GPO (Computer/User)
GPO Authorization
Customer disabled support for certificates in GPO
Default
Regedit for MSCEP (NDES)
• Computer\HKLM\SOFTWARE\Microsoft\Cryptography\MSCEP
• Must match desired template name exactly
• Only single template allowed for all SCEP enrollments
TemplateName
IIS Manager: IP and Domain Restrictions
Restricting SCEP Requests to Trusted Hosts (ASA)
• Add Roles and Features > Web Server (IIS) > Security > IP and Domain
Restrictions > Restart IIS Service! (GUI different from Windows 2008)
• Actions Menu> Add Allow/Deny Entry…
IIS Manager: IP and Domain Restrictions
Restricting SCEP Requests to Trusted Hosts (ASA)
• (Optional) Domain name Restrictions
• Dramatically affect server performance…. Per Microsoft…
Potential Certificate Error
• Select Certificate
Distribution Point
SCEP Required is a value that is populated true when you fail certificate
authentication and the connection profile is set for SCEP Proxy
Message Signature
1. Hash the message 1. Decrypt the signature
using the public key
2. Decrypted signature
should contain the
hash of the message
If Hashes
Are Equal
Signature Is
Verified
Advanced DAP
Example of Advanced LUA using Certficate Checks
assert(function()
for k,v in pairs(endpoint.certificate.user) do
if (EVAL(v.md5_hash, “EQ“, aaa.ldap.physicalDeliveryOfficeName, ”string”)) and
(EVAL(endpoint.certificate.user.issuer_cn, “EQ”, “Joe Smith”)) and
(EVAL (EVAL(endpoint.device.id, “EQ”, endpoint.certificate.user.subject_e, “string”) )
then
return true
end
end
return false
end)()
Management
Debug Cert
• OCSP status is being checked for certificate. serial number: 330000001594F82695C1B6609D000000000015, subject
name: e=ned@ciscolive.demo,cn=ned.
• Certificate was successfully validated. Certificate is resident and trusted, serial number:
3300000006BB5971B269ABC1CB000000000006, subject name: cn=WIN2012-SUBCA,dc=CISCOLIVE,dc=DEMO.
• Certificate was successfully validated. Certificate is resident and trusted, serial number:
7AC53A4141EF36B747B8D0F25F355E10, subject name: cn=WIN2012-ROOT-CA,dc=CISCOLIVE,dc=DEMO.
http://www.cisco.com/c/en/us/td/docs/security/ise/1-
3/admin_guide/b_ise_admin_guide_13/b_ise_admin_guide_sample_chapter_01000.html#concept_C0EDF372974E459CA8
E4A14389853525
http://technet.microsoft.com/en-us/windowsserver/dd448615.aspx
• IOS CA server
http://www.cisco.com/en/US/technologies/tk583/tk372/technologies_brief0900aecd802b6403.html
http://www.cisco.com/en/US/docs/security/asa/asa82/configuration/guide/cert_cfg.html#wp1067517
http://en.wikipedia.org/wiki/PKCS
AAA – Dynamic Access Policies
Device ID is present in LDAP (optional)
Endpoint.
anyconnect.deviceuniqueid
Requirement:
Pre-registration of Device
AAA – Dynamic Access Policies
Device not Authorized
deviceuniqueid NE ldap.extensionAttribuite1
AAA – Dynamic Access Policies
Awareness in AnyConnect sent to ISE
• With ISE 1.3 with AnyConnect 4.0 (Windows/Mac) this data can be used for
profiling.
Configuration Steps Overview
Cisco ASA: Cisco ISE:
1. Identity Certificate 1. Configure VPN as NAD
2. Install Root/Issuing CA Certs 2. Option: Configure Policy Set
3. Modify your Connection Profiles 3. Configure Authentication Policy
4. Create AnyConnect Client Profiles 4. Configure Authorization Policy
5. Modify Group Policy 5. SCEP RA Profile for MSFT CA
6. Create Dynamic Access Policy (DAP) 6. Intermediate CA Cert Integration
rules
7. ISE configured as AAA Server Microsoft Certificate Services
ISE Certificate Authority