Upgrade to Pro — share decks privately, control downloads, hide ads and more …

F5 Big-IP Misconfigurations

Denis Kolegov
November 16, 2016

F5 Big-IP Misconfigurations

Denis Kolegov

November 16, 2016
Tweet

More Decks by Denis Kolegov

Other Decks in Research

Transcript

  1. • Team lead at Positive Technologies Application Firewall Team •

    Ex Security Test Engineer at F5 Networks • Associate professor at Tomsk State University • https://twitter.com/dnkolegov #whoami
  2. The research is not related to my current job and

    current employer The most vulnerabilities were found and fixed during my work at F5 Networks Some new vulnerabilities have been reported to F5 Networks Platform Security Team Disclaimer
  3. • Local Traffic Manager (LTM) • Access Policy Manager (APM)

    • Application Security Manger (ASM) • Application Acceleration Manager (AAM) • Advanced Firewall Manager (AFM) • Global Traffic Manager (GTM) • Link Controller (LC) • Protocol Security Module (PSM) F5 BIG-IP
  4. • BIG-IP Discovery • HTTP Server Header Information Leakage •

    Mass Enumeration using Search Engines • Access to Management Interface from Internet • LTM Information Leakage • Management IP-address Disclosure • Route Domain Disclosure • Persistence Cookie Information Leakage • APM Attacks • Session Exhaustion DoS attack • Sandbox Escaping • Clickjacking • SOP Bypass Agenda
  5. HTTP Server Header • Send a request to HTTP virtual

    server • "Server: BIG-IP" – before 11.4.0 • "Server: BigIP " – after 11.4.0 Google • inurl:"tmui/login.jsp" • intitle:"BIG-IP" inurl:"tmui" • intitle:"BIG-IP logout page" • "Thank you for using BIG-IP." Shodan • WWW-Authenticate: Basic realm=BIG-IP • BIG-IP • BigIP Metasploit • auxiliary/scanner/http/f5_mgmt_scanner BIG-IP Discovery
  6. BIGipServer<pool name> = Encoded value • <The encoded server IP>.<The

    encoded server port>.0000 • BIGipServer~DMZ_V101~web_443=1677787402.36895.0000 • vi<The full hexadecimal IPv6 address>.< The encoded server port> • BIGipServer~CORP_DC1=vi20010112000000000000000000000030.20480 • rd<The route domain ID>o00000000000000000000ffff<The hexadecimal representation of the IP address of the pool member>o<The port number> • BIGipServer~EE_ORACLE=rd5o00000000000000000000ffffc0000201o80 • rd<The route domain ID>o<The full hexadecimal IPv6 address>o<The port number> • BIGipServer~ES~test.example.com=rd3o20010112000000000000000000000030o80 LTM Persistence Cookies
  7. Tools • Metasploit - auxiliary/gather/f5_bigip_cookie_disclosure • BeEF - modules/network/ADC/f5_bigip_cookie_disclosure •

    Cookie Decipher Tool - https://devcentral.f5.com/wiki/AdvDesignConfig.CookiePersistenceDecipherT ool.ashx Protection • Bad: Cookie renaming • Good: Cookie encryption LTM Persistence Cookies
  8. • BIG-IP APM allocates a new session after the first

    unauthenticated request and deletes the session only if an access policy timeout will be expired • Metasploit module - auxiliary/dos/http/f5_bigip_apm_max_sessions APM Session Exhaustion DoS Attack
  9. APM "Sandbox" • Vectors (Fixed) • <video src=1 onerror=alert(document.cookie)> •

    <img src=1 onerror=result=document.cookie;> • BeEF module - modules/network/ADC/f5_bigip_cookie_stealing • New vectors have been reported to F5 Networks Platform Security Team APM Sandbox Escaping
  10. APM ignores application’s original Content Security Policy headers APM removes

    application’s original "X-Frame-Options: sameorigin" header, but accepts "X-Frame-Options: deny" To protect against classic Clickjacking attack it is necessary to configure LTM iRules Reproduced on BigIP 12.1.0 build 0.0.1434 APM Clickjacking
  11. APM model changes an idea of browser same-origin policy: all

    applications behind BIG-IP share the same origin http(s)://bigip:port/ All real applications origins are HEX-encoded and transmitted via URL path /f5-w-[HEX-encoded-origin]$$/path Secure configuration • Services Isolation • L4/L7 ACL Reproduced on BigIP 12.1.0 build 0.0.1434 Same-Origin Policy Bypass
  12. Same-Origin Policy Bypass <html> <body> <p>Frame: http://goodsite.com</p> <iframe src="http://goodsite.com/secret.php" name="if"></iframe>

    <script> var f = document.getElementsByName("if")[0]; f.onload = function(){ var a=fr.contentDocument; var b = a.getElementById("secretform"); console.log(b); } </script> </body> </html>