Slide 1

Slide 1 text

Crowdsourcing Your Cisco Firewall Administration

Slide 2

Slide 2 text

Jonathan Claudius ¤  Trustwave SpiderLabs ¤  Lead Security Researcher ¤  Vulnerability Assessment Team (VAT)

Slide 3

Slide 3 text

Laura Guay ¤  Dell SecureWorks ¤  Network Security Senior Advisor ¤  (aka: Senior Platform Engineer) ¤  SME for Cisco and Imperva ¤  Former Penetration Tester

Slide 4

Slide 4 text

We hack together

Slide 5

Slide 5 text

Want to crowdsource your firewall administration?

Slide 6

Slide 6 text

Yeah… that makes no sense ¤  We tried it briefly (via Twitter) ¤  People trolled us… ¤  “debug all” ¤  “write erase” ¤  It’s a terrible idea ¤  Ideally, firewall management is limited to a set of trusted and experienced staff

Slide 7

Slide 7 text

What this talk is really about ¤  A vulnerability we found in Cisco ASA that allows SSL VPN users to gain full administrative access to the firewall. ¤  We will Cover… ¤  Vulnerability Discovery ¤  Configuration Review ¤  Vulnerability Details ¤  Live Demonstration ¤  Take Away’s (Offense/Defense)

Slide 8

Slide 8 text

Vulnerability Discovery How was this vulnerability discovered?

Slide 9

Slide 9 text

ASDM Brute-forcing is slow… ¤  DEFCON 21 ¤  Had quick conversation with Barrett Weisshaar ¤  He said ASDM brute-forcing took forever ¤  Basic Process ¤  Download the Java client ¤  Authenticate like a normal Administrator ¤  See if you get lucky before your fingers fall off

Slide 10

Slide 10 text

ASDM Brute-force MSF Module ¤  Created a Metasploit Module to make it easier

Slide 11

Slide 11 text

Cisco SSL VPN Portal ¤  Cisco SSL VPN Portal ¤  Allows remote users access to extranet type website ¤  Simple form submission authentication ¤  Created a Metasploit Aux Module for this too ¤  *Realization* ¤  ASDM and SSL VPN authentication schemes use similar authentication pattern ¤  User-Agent based (ASDM vs. Browser Agent)

Slide 12

Slide 12 text

Session Cookie Reuse Idea

Slide 13

Slide 13 text

Filed this one under “Interesting, but not likely”

Slide 14

Slide 14 text

Four months later ¤  At the kitchen table at my mom’s house over our Thanksgiving vacation. ¤  Finally revisited the idea. ¤  Set aside 15 minutes.

Slide 15

Slide 15 text

And I was…

Slide 16

Slide 16 text

Configuration Review Laura to the rescue!!!

Slide 17

Slide 17 text

SSL VPN Options on ASA ¤  Clientless (WebVPN) ¤  Web portal that requires no external clients ¤  Thin-Client ¤  Web portal combined with a small java application ¤  AnyConnect ¤  Thick-Client VPN Access

Slide 18

Slide 18 text

VPN Group Enforcement ¤  Group-policy (group-lock) ¤  Force users to connect to a specific tunnel-group ¤  Prevents unauthorized access to other VPN groups group-policy RemoteAccessVPN_GP attributes! vpn-tunnel-protocol ikev1 ssl-clientless! group-lock value RemoteAccessVPN_TG!

Slide 19

Slide 19 text

VPN User Attributes ¤  Privilege ¤  Service-type ¤  Group-policy username sslvpn_user password encrypted privilege 0! username sslvpn_user attributes! service-type remote-access! group-lock value RemoteAccessVPN_TG!

Slide 20

Slide 20 text

Authentication & Authorization ¤  AAA authentication (Local or External) ¤  Authorization aaa authentication ssh console LOCAL ! aaa authentication http console LOCAL! ! aaa authentication ssh console LDAP_SERVER LOCAL ! aaa authentication http console LDAP_SERVER LOCAL ! aaa authorization command LOCAL ! aaa authorization exec LOCAL!

Slide 21

Slide 21 text

CVE-2014-2127 ¤  Cisco ASA SSL VPN Privilege Escalation Vulnerability ¤  Bug ID: CSCul70099 ¤  Security Advisory: cisco-sa-20140409-asa ¤  Coordinated disclosure on April 9th ¤  2 days after OpenSSL Heartbleed release ¤  1 day after Windows XP EOL

Slide 22

Slide 22 text

Technical Details How the vulnerability works

Slide 23

Slide 23 text

WebVPN – Post Auth

Slide 24

Slide 24 text

How to learn the ASDM paths… ¤  Using a custom proxy listener in Burp with Redirection and Invisible Proxying to inspect the ASDM HTTPS transport layer traffic. ¤  Redirection – Bind local ports to remote ports ¤  Invisible Proxying – A transparent proxy in Burp ¤  “Reversing” Non-Proxy Aware HTTPS Thick Clients w/ Burp ¤  http://blog.spiderlabs.com/2014/02/reversing-non-proxy- aware-https-thick-clients-w-burp.htm

Slide 25

Slide 25 text

Show Version

Slide 26

Slide 26 text

Dump Config

Slide 27

Slide 27 text

Make Changes

Slide 28

Slide 28 text

Demonstration Show and tell

Slide 29

Slide 29 text

Demonstration Context (Live) ¤  Malicious Service Provider w/ VPN Access ¤  User rights limited, Grouplock, Remote Service Type, AAA enabled, LDAP Auth, etc. (aka: best practice) ¤  We will show how this user can take full control of the firewall in seconds by exploiting this vulnerability ¤  Wrote a Metasploit Module for stability reasons ¤  Browsers are too flakey (Cookie Mgmt Problems)

Slide 30

Slide 30 text

Takeaways Where do we go from here?

Slide 31

Slide 31 text

Defensive Takeaways ¤  Patch to the latest version(s) ¤  All the settings I mentioned earlier ¤  If you don’t you will still be “vulnerable”!!! 8.2(5.48) 8.4(7.15) 9.0(4.1) 8.3(2.40) 8.6(1.13) 9.1(4.5)

Slide 32

Slide 32 text

Workarounds ¤  Cisco says there are none… ¤  Host your SSL VPN / ASDM on different interfaces/port ¤  Implement ACLs for ASDM access

Slide 33

Slide 33 text

Detection Logic ¤  Monitor for these log message IDs: %ASA-7-111009: User '' executed cmd: show version! %ASA-3-113021: Attempted console login failed user 'thinclient' did NOT have appropriate Admin Rights.!

Slide 34

Slide 34 text

Offensive Takeaways Part 1 ¤  Social Engineering and MiTM ¤  LDAP – Attacking Active Directory aaa-server LDAP protocol ldap! aaa-server LDAP (inside) host 192.168.101.150! ldap-base-dn CN=Users,DC=cisco,DC=local! ldap-scope subtree! ldap-login-password MyADPassword!!! ldap-login-dn CN=Administrator,CN=Users,DC=cisco,DC=local! server-type auto-detect! ldap-attribute-map LDAP-Example!

Slide 35

Slide 35 text

Offensive Takeaways Part 2 ¤  Attack ASA modules ¤  Denial of service ¤  Drop firewall rules ¤  Capture all traffic

Slide 36

Slide 36 text

Parting Thoughts ¤  Understand the actual risk ¤  Patch your ASAs ¤  Review your ASA config

Slide 37

Slide 37 text

Thank You! ¤  Jonathan Claudius ¤  Twitter: @claudijd ¤  Email: [email protected] ¤  Laura Guay ¤  Twitter: @L_ORA ¤  Email: [email protected]