Guerilla Security

  • Published on
    26-May-2015

  • View
    389

  • Download
    0

Embed Size (px)

Transcript

<ul><li> 1. SEC 318 Guerilla Security Securing Exchange 2000 and 2003 Infrastructures Fred Baumhardt and Rab Thynne Senior and Partner Strategy Consultant Microsoft UK</li></ul> <p> 2. Why do we call this Guerilla </p> <ul><li>Guerilla as a type of warfare is exactly what we face in Internet Security </li></ul> <ul><li>Expect attacks from anywhere, with any device, at any time, from the inside </li></ul> <ul><li>Defences must be built exactly the same way, good monitoring, competent security forces, and ruthless execution of security policy on attackers </li></ul> <p> 3. Session Overview </p> <ul><li>Core Security Concepts applied to Exchange </li></ul> <ul><li>The Exchange Server Security Model </li></ul> <ul><li>Implementing End to End Exchange Security</li></ul> <ul><li><ul><li>Implications of Client Selection </li></ul></li></ul> <ul><li><ul><li>Securing Client/Server to Server Communications </li></ul></li></ul> <ul><li><ul><li>Network Layer Security </li></ul></li></ul> <ul><li><ul><li>Exchange Host Server Security </li></ul></li></ul> <ul><li>Questions </li></ul> <p>. 4. The Big Picture </p> <ul><li>Exchange is an Infrastructure product ergo: it is only as secure as the infrastructure </li></ul> <ul><li>So design of Supporting Infra is critical : </li></ul> <ul><li><ul><li>DMZ design </li></ul></li></ul> <ul><li><ul><li>DCs and their configuration </li></ul></li></ul> <ul><li><ul><li>DNS infrastructure </li></ul></li></ul> <ul><li><ul><li>Server Build </li></ul></li></ul> <ul><li><ul><li>Management and Operations </li></ul></li></ul> <p> 5. Internet Security Roots and Mail </p> <ul><li>Lets be honest from a security perspective: IPv4 Sucks not designed for Security </li></ul> <ul><li><ul><li>Internet used to require Sec clearance to use physical access was restricted no need for protocol security</li></ul></li></ul> <ul><li><ul><li>Resistance to Nuclear attack was more important than protecting traffic as people on the network were trusted </li></ul></li></ul> <ul><li>TCP/IP was thus designed without security in mind added as a bolt-on- SMTP has almost none </li></ul> <ul><li>SMTP takes anonymous un-authenticated messages from the dirty world and puts them into heart of your network </li></ul> <ul><li>No one thought mail storage would be mission critical </li></ul> <p>. 6. Core Security Concepts applied to Exchange </p> <ul><li>The OS is only one component of security ANDFirewalls are not a Panacea </li></ul> <ul><li>Getting into the bank branch doesnt mean you get into the vault </li></ul> <ul><li>In the real world security relies on multiple things. It should also do this in the IT world </li></ul> <ul><li><ul><li>People and Process </li></ul></li></ul> <ul><li><ul><li>Internal and Edge Technologies</li></ul></li></ul> <ul><li><ul><li>Management and Operations </li></ul></li></ul> <ul><li>Securing your Exchange system is securing your core systems there is no silver bullet wizard </li></ul> <p>. 7. Your Attack Sources for Comms </p> <ul><li>Answer:Everyone inside and out </li></ul> <ul><li>The majority of attacks originate internally </li></ul> <ul><li><ul><li>Corporate espionage </li></ul></li></ul> <ul><li><ul><li>People with Inside knowledge </li></ul></li></ul> <ul><li><ul><li>Your Users playing with stuff they dont understand </li></ul></li></ul> <ul><li>Externallycould be anyone </li></ul> <ul><li><ul><li> Script kiddies armed with widely accessible tools </li></ul></li></ul> <ul><li><ul><li>More serious attackers fun or profit </li></ul></li></ul> <p> 8. Exchange Comms Architecture . 9. Internal DMZ Firewall Ports </p> <ul><li>TCP 80 for HTTP143 for IMAP110 for POP 25 for SMTP</li></ul> <ul><li>691 for Link State Algorithm routing protocol</li></ul> <ul><li>TCP/UDP port 389 for LDAP to Directory Service</li></ul> <ul><li>TCP port 3268 for LDAP to Global Catalog Server</li></ul> <ul><li>TCP/UDP port 88 for Kerberos authentication</li></ul> <ul><li>TCP/UDP port 53 - DNS </li></ul> <ul><li>TCP port 135 - RPC endpoint mapper</li></ul> <ul><li>TCP ports 1024+ - RPC service ports(unless DC and Exchange Restricted) </li></ul> <ul><li>If you use IPSec between the front-end and back-end, open the appropriate ports. If the policy you configure only uses AH, you do not need to allow ESP, and vice versa.</li></ul> <ul><li>UDP port 500 </li></ul> <ul><li>RPC over HTTP can reduce this 600-2 and 593 </li></ul> <p>. 10. Exchange Defence-in-Depth Orchestration </p> <ul><li>Perimeter Defences:Packet Filtering, Stateful Inspection of Packets, Intrusion Detection </li></ul> <ul><li>NetworkDefences :VLAN Access Control Lists, Internal Firewall, Auditing, Intrusion Detection </li></ul> <ul><li>Host Defences:Server Hardening, Host Intrusion Detection, IPSec Filtering, Auditing </li></ul> <ul><li>Application Defences:AV, Content Scanning, Layer 7 (URL) Switching Source, Secure IIS, Secure Exchange </li></ul> <ul><li>Data and Resources:ACLs on PFs, Correct mail permissions, Data, Relay Permissions </li></ul> <p>. Data &amp; Resources Application Defences Host Defences Network Defences Perimeter Defences Assume Prior Layers Fail 11. Connection Strategies Full in None Out Medium/Low Full RPC over HTTP Medium High Low Medium/ High Complexity Full Full Secure RPC with ISA Full Full VPN PPTPv2 Full Moderate OWA via SSL with ISA Medium Basic POP3/IMAP4 via SSL with SMTP Security Experience Method 12. POP3/IMAP4 with SMTP </p> <ul><li>Uses SSL to secure POP or IMAP connection </li></ul> <ul><li>Does not authenticate at front end </li></ul> <ul><li>Requires SMTP at front-end to send mail OR separate SMTP relay (watch for relay spam) </li></ul> <ul><li>Removes much of the rich functionality </li></ul> <ul><li>Public Folder access can be tricky </li></ul> <ul><li>Dont enable unless you absolutely have to </li></ul> <p>. 13. OWA via SSL with ISA </p> <ul><li>OWA is lightweight and available anywhere </li></ul> <ul><li>Not totally functional but close </li></ul> <ul><li>No Offline facility but great usability </li></ul> <ul><li>SSL is an easy and proven security tool </li></ul> <ul><li><ul><li>Can be terminated at ISA with Feature Pack </li></ul></li></ul> <ul><li><ul><li>Only used to Front-end server not FE-BE in 2000 2003 can use Kerberos for delegation </li></ul></li></ul> <ul><li><ul><li>Pre-authentication with ISA is very strong </li></ul></li></ul> <p>. 14. Protecting HTTPS for OWA Web server prompts for authentication any Internet user can access this prompt SSL tunnels through traditional firewalls because it is encrypted which allows viruses and worms to pass through undetected and infect internal servers! Basic authentication delegation ISA Server pre-authenticates users, eliminating multiple dialog boxes and only allowing valid traffic through URLScan for ISA Server ISA Server can decrypt and inspect SSL traffic inspected traffic can be sent to the internal server re-encrypted or in the clear. URLScan for ISA Server URLScan for ISA Server can stop Web attacks at the network edge, even over encrypted SSL . Traditional firewall OWAclient SSL ISA Server with Feature Pack 1 SSL or HTTP SSL Internet 15. VPN Inbound </p> <ul><li>Dedicated HW/SW VPN infrastructure </li></ul> <ul><li>Requires opening of ports for VPN and authentication </li></ul> <ul><li>Provides Full and Rich Network Access </li></ul> <ul><li>Can be costly for enterprises to implement </li></ul> <ul><li>RPC over HTTP can reduce need also secure RPC publishing with ALF </li></ul> <p>. 16. Using ISA for RPC Publishing </p> <ul><li>ISA Can Securely Publish RPC </li></ul> <ul><li><ul><li>Opens 135 and listens (can block by source) </li></ul></li></ul> <ul><li><ul><li>Only Allows Specific UUID for Outlook (configurable) </li></ul></li></ul> <ul><li><ul><li>Dynamically Port Filters subsequent connections </li></ul></li></ul> <ul><li><ul><li>Can require Encrypted RPC only </li></ul></li></ul> <ul><li>Outlook can have full functionality without VPN </li></ul> <p>. 17. RPC Outlook to Exchange RPC 101 RPC server (Exchange) RPC client (Outlook) RPC services grab random high ports when they start, server maintains table Client connects to portmapper on server (port 135/tcp) Client knows UUID of service it wants {12341234-1111} Client accesses application over learned port Client asks, What port is associated with my UUID? Server matches UUID tothe current port 4402/tcp Portmapper responds with the port and closes the connection </p> <ul><li>Due to the random nature of RPC, this is not feasible over the Internet </li></ul> <ul><li><ul><li>All 64,512 high ports &amp; port 135 must be opened on traditional firewalls </li></ul></li></ul> <p>. Port UUID Service 9233 {19283746-7777 MMC 3544 {01020304-4444 AD replication 4402 {12341234-1111 Exchange 135/tcp 4402/tcp 18. Securing the Front Side </p> <ul><li><ul><li>Exchange 2000 SP2+ doesnt require RPC for DSAccess from Front-end to Backend; However. </li></ul></li></ul> <ul><li><ul><li>RPC is still required for IIS authentication (OWA), POP-IMAP </li></ul></li></ul> <ul><li><ul><li>Exchange DMZ Tradeoff: is it better to </li></ul></li></ul> <ul><li><ul><li><ul><li>Allow RPC packets from the DMZ inward, or </li></ul></li></ul></li></ul> <ul><li><ul><li><ul><li>IPSec Tunnel through Firewall (Bypass it), (no NAT Firewalls) </li></ul></li></ul></li></ul> <ul><li><ul><li><ul><li>Allow anonymous requests from the FE to the BE? </li></ul></li></ul></li></ul> <p>Swiss Cheesed or Bypassed Firewall TCP 443: HTTPS Stateful Packet Filtering Firewall Front End Server Internet TCP 443: HTTPS (OWA) RPC: Outlook SMTP, POP3, IMAP4 Back End Server RPC and/or Defined Port HTTP (TCP80) . 19. Best Practice for the Front Side </p> <ul><li><ul><li>A Flat DMZ Design </li></ul></li></ul> <ul><li><ul><li>ISA layer 7 switching (OWA) or RPC filtration (Outlook) </li></ul></li></ul> <ul><li><ul><li>No Firewalls between front-end and backend servers </li></ul></li></ul> <ul><li><ul><li>Front-end and backend servers authenticate clients </li></ul></li></ul> <ul><li><ul><li>IPSec if required between front-end and backend </li></ul></li></ul> <p>Exchange Server TCP 443: HTTPS Stateful Packet Filtering Firewall Application Filtering Firewall (ISA Server) TCP 80: HTTP Internet TCP 443: HTTPS Or . 20. Is This Less Secure ? </p> <ul><li>Same numbers of firewalls to defeat </li></ul> <ul><li>RPC or tunnelling can negate firewalls anyway </li></ul> <ul><li>Attacks come at Data Layer </li></ul> <ul><li>This is a shift in thinking as Firewalls move up the stack and switches start port filtering </li></ul> <p>. 21. Secure Networking Internet Redundant Routers ISA Firewalls VLAN NIC teams/2 switches Intrusion Detection Intrusion Detection Intrusion Detection First Tier Firewalls URL Filtering for OWA RPC Termination for Outlook Switches Implement VLANs and Control Inter-VLAN Traffic like Firewalls do . VLAN DC + Infrastructure VLAN Front-end VLAN Backend 22. Client Security from Internet </p> <ul><li>Every time you connect into a network you extend the security perimeter </li></ul> <ul><li>RPC Publishing and VPN both require great care at the client </li></ul> <ul><li>Harden your clients on the Internet or hackers will attack clients and ride the VPN </li></ul> <ul><li>Require RPC encryption for Outlook </li></ul> <ul><li>Client Based IDS systems </li></ul> <p> 23. General Member Server Hardening </p> <ul><li>Role-based Hardening </li></ul> <ul><li><ul><li>OU Structure to hold FE-BE servers by role </li></ul></li></ul> <ul><li><ul><li>Security Templates from Exchange Security Operations Guide </li></ul></li></ul> <ul><li>AD is a great Security Tool </li></ul> <p> 24. IIS Lockdown Changes </p> <ul><li>File ACLs- denies relevant permissions on home directory </li></ul> <ul><li>Also sets ACL on (ExchDirectory)ExchWeb</li></ul> <ul><li>Denies execute access to all system utilities, such as cmd.exe, in the c:winntsystem32 folder.</li></ul> <ul><li>Changes by IISLockdown can be overwritten by Group Policy </li></ul> <p> 25. Front-end OWA Server Hardening </p> <ul><li>Run IISLockdown w/ Template for Exchange; see Q309508</li></ul> <ul><li><ul><li>Removes all unnecessary script mappings Vdirs, and applications </li></ul></li></ul> <ul><li><ul><li><ul><li>Disables password change (HTR) so hide in UI to avoid confusion (Q297121) </li></ul></li></ul></li></ul> <ul><li>Configure URLScan </li></ul> <ul><li><ul><li>Blocks special characters, extensions and canonicalisation.../%&amp;</li></ul></li></ul> <ul><li>DSAccess uses RPC to contact Netlogon for authentication </li></ul> <ul><li><ul><li>Limit RPC ports on all DCs &amp; allow this through the internal firewall </li></ul></li></ul> <ul><li><ul><li>Use ISA to securely publish RPC from FE in the DMZ to BE if applicable </li></ul></li></ul> <ul><li>Use MetaEdit to change the SMTP banner </li></ul> <ul><li>Run EDSLock to lockdown folder and mailbox store group access </li></ul> <ul><li>Dismount the Mailbox Store and delete the Public Folder Store</li></ul> <p>. 26. Front-end OWA Server Hardening </p> <ul><li>Disable the following Exchange Services </li></ul> <ul><li><ul><li>Exchange IMAP4, POP3 </li></ul></li></ul> <ul><li><ul><li>Exchange Information Store </li></ul></li></ul> <ul><li><ul><li>Microsoft Search </li></ul></li></ul> <ul><li><ul><li>Exchange Event,Site Replication Service </li></ul></li></ul> <ul><li><ul><li>Exchange Management, Exchange MTA </li></ul></li></ul> <ul><li>Disable all other unnecessary services Messenger, Alerter, etc. Network Bindings </li></ul> <p> 27. Front End OWA Server Hardening </p> <ul><li>Ensure the following are enabled </li></ul> <ul><li><ul><li>Exchange Routing Engine </li></ul></li></ul> <ul><li><ul><li>IPSEC Policy Agent </li></ul></li></ul> <ul><li><ul><li>RPC Locator </li></ul></li></ul> <ul><li><ul><li>IIS Admin Service </li></ul></li></ul> <ul><li><ul><li>World Wide Web Publishing Service </li></ul></li></ul> <p> 28. Backend Server Hardening </p> <ul><li>Enabled Exchange Services </li></ul> <ul><li><ul><li>Information Store </li></ul></li></ul> <ul><li><ul><li>Exchange Management </li></ul></li></ul> <ul><li><ul><li>Exchange Management Instrumentation</li></ul></li></ul> <ul><li><ul><li>Exchange System Attendant</li></ul></li></ul> <ul><li><ul><li>Exchange Routing Engine</li></ul></li></ul> <ul><li>Disabled Exchange Services </li></ul> <ul><li><ul><li>IMAP4 </li></ul></li></ul> <ul><li><ul><li>POP </li></ul></li></ul> <ul><li><ul><li>Exchange Event Service (If E2K only) </li></ul></li></ul> <ul><li><ul><li>Exchange Site Replication Service(If E2K only) </li></ul></li></ul> <ul><li><ul><li>Exchange MTA Stacks (If E2K only and no X.400) </li></ul></li></ul> <p> 29. Backend Server Hardening </p> <ul><li>Exchange Required O/S Services </li></ul> <ul><li><ul><li>WWW Service (OWA comms) </li></ul></li></ul> <ul><li><ul><li>IIS Admin Service (Exchange Routing) </li></ul></li></ul> <ul><li><ul><li>SMTP </li></ul></li></ul> <ul><li><ul><li>RPC Locator (DC comms) </li></ul></li></ul> <ul><li><ul><li>IPSEC Policy Agent</li></ul></li></ul> <ul><li>System Attendant Depends on </li></ul> <ul><li><ul><li><ul><li>Event Log </li></ul></li></ul></li></ul> <ul><li><ul><li><ul><li>NTLM Security Support Provider </li></ul></li></ul></li></ul> <ul><li><ul><li><ul><li>RPC </li></ul></li></ul></li></ul> <ul><li><ul><li><ul><li>RPC Locator </li></ul></li></ul></li></ul> <ul><li><ul><li><ul><li>Server </li></ul></li></ul></li></ul> <ul><li><ul><li><ul><li>Workstation </li></ul></li></ul></li></ul> <p> 30. Generic Exchange Server Hardening </p> <ul><li>Filesystem ACLs </li></ul> <p>. Yes Everyone: Full Everyone:Full %systremdrive%Inetpub ntpfile oot Yes Domain Admins: FullLocal System: Full Everyone: Full %systremdrive%Inetpub ntpfile Yes Domain Admins: FullLocal System: Full Everyone: Full %systremdrive%InetpubMailroot Applied to Subdirectories? New ACL Old ACL Directory 31. Business Continuity </p> <ul><li>Security planning also needs to cover breaches </li></ul> <ul><li>Think through disaster recovery strategy </li></ul> <ul><li>Backup and Recovery Strategy critical </li></ul> <ul><li>Critical Incident Management Procedure </li></ul> <p> 32. Physical Server Access </p> <ul><li>Physical Infrastructure access must be strictly controlled </li></ul> <ul><li>Access to Domain Controllers can cripple networks in seconds </li></ul> <ul><li>We often find mission critical machines under desks </li></ul> <p> 33. Additional Security Protection </p> <ul><li>Antivirus applications are critical to exchange </li></ul> <ul><li>SMTP Screening software is becoming increasingly important </li></ul> <ul><li>Content Blocking Appropriate E-mails </li></ul> <p> 34. Maintaining Security </p> <ul><li>Microsoft Baseline Security Analyzer </li></ul> <ul><li><ul><li>V1.2 Scans Exchange and Windows </li></ul></li></ul> <ul><li>Software Update Services simplified patch management and control free tool </li></ul> <ul><li>Not enterprise focused tools SMS 2003 is better option </li></ul> <ul><li>Use Group Policy to enforce configuration </li></ul> <p>. 35. Top 10 Ways to Get Secure </p> <ul><li>Implement theSecurity Operations Guidesfor Windows and Exchange </li></ul> <ul><li><ul><li>http://msdn.microsoft.com/practices </li></ul></li></ul> <ul><li>Use MBSA to identify missing patches </li></ul> <ul><li>Implement IISLockdown based on role </li></ul> <ul><li>Secure Infrastructure Assets </li></ul> <ul><li>Use the EDSLock script to restrict groups </li></ul> <p>. 36. Top 10 Ways To Get Secure </p> <ul><li>Get adequate antivirus protection for servers and desktops </li></ul> <ul><li>Use perimeter SMTP scanning </li></ul> <ul><li>Automate Patch Management </li></ul> <ul><li>Use SSL, IPsec, and MAPI encryption where appropriate </li></ul> <ul><li>Plan your response to an intrusion before it happens </li></ul> <p> 37. Exchange Security Resources </p> <ul><li>Exchange Security Operations Guide </li></ul> <ul><li>Windows Security Operations Guide </li></ul> <ul><li>NSA Security Guides </li></ul> <ul><li>Microsoft Systems Architecture EDC-IDC </li></ul> <ul><li>Microsoft Operations Framework </li></ul> <p>. 38. Other Links </p> <ul><li>Exchange 2000 EDS Lockdownhttp://support.microsoft.com/ default.aspx ? scid =http:// support.microsoft.com :80/support/ kb /articles/Q313/8/07.asp&amp; NoWebContent =1 </li></ul> <ul><li>Exchange Libraryhttp://www.microsoft.com/exchange/library </li></ul> <ul><li>Exchange Securityhttp://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=D286E9A7-FE36-4A02-A0F8-75D4F9EB8D2D </li></ul> <p> 39. In Closing </p> <ul><li>Thanks for coming! </li></ul> <ul><li>Feel free to send comments or feedback </li></ul> <ul><li><ul><li>[email_address] </li></ul></li></ul> <ul><li><ul><li>[email_address] </li></ul></li></ul> <ul><li>PLEASE fill out your evaluations! </li></ul> <p>. 40. evaluations 41. 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.</p>