SlideShare a Scribd company logo
Locking Down CF Servers
Pete Freitag, Foundeo Inc.
foundeo.com | hackmycf.com | fuseguard.com
About Pete Freitag
✤ Owner of Foundeo Inc.
✤ HackMyCF - Remote ColdFusion Security Scanner
✤ FuseGuard - Web App Firewall for CFML
✤ Consulting - Install, Configure, Review, CFML Dev
✤ 17+ Years working with CF
✤ Author of CF9-11 Lockdown Guides, CFMX Cookbook (SAMs)
✤ blog: petefreitag.com twitter: @pfreitag slack: @foundeo
Our FocusToday
✤ Securing your ColdFusion Server Install
✤ Not covering:
✤ Hardening Your Operating System
✤ Database Security
✤ Securing your Application Source Code
Agenda
✤ Guiding Principals
✤ Installation
✤ Post Installation Lockdown
✤ ColdFusion Administrator Configuration
✤ Tomcat Configuration
Heavily Based on:
✤ Adobe ColdFusion 11 Lockdown Guide: http://bit.ly/cf11lockdown
✤ Adobe ColdFusion 10 Lockdown Guide: http://bit.ly/cf10lockdown
✤ Adobe ColdFusion 9 Lockdown Guide: http://bit.ly/cf9lockdown
✤ This talk assumes CF11, but is mostly the same for CF10 as well
✤ CF9 and below are no longer supported (no more security patches)
Why Do I need
to Lockdown
my install?
Can't the installer do everything for me?
What is secure?
What tradeoffs are acceptable?
(cc) http://www.flickr.com/photos/toddler/4169974226/
Principal of
Least Privilege
Grant only the minimum permission
required to accomplish a task.
(cc) http://www.flickr.com/photos/dvanzuijlekom/8279837896/in/photostream/
Defense in
Depth
Multiple Layers of Redundant Security.
(cc) http://www.flickr.com/photos/flygraphix/4791988161/
Reduce Attack Surface
ColdFusion
ASP.NET
PHP
DNS
FTP
Web Server
ColdFusion
Web Server
vs.
Reduce Attack Surface
Avoid Defaults
Avoid using defaults for configurable
options such as paths, usernames, etc.
Services I Like:
✤ Duo Security: Two Factor
Authentication
✤ (RDP, SSH)
✤ Dome9: Cloud Firewall
✤ Easily grant temporary
access to administrative
ports.
Pre-Installation
✤ Lockdown and Patch OS
✤ OS Vendors have Lockdown Guides as well.
✤ https://access.redhat.com/documentation/en-US/
Red_Hat_Enterprise_Linux/6/html/Security_Guide/
✤ Windows Security Compliance Toolkit: http://
technet.microsoft.com/en-us/library/cc677002.aspx
✤ Ensure network firewall in place.
✤ Remove all unnecessary software.
Pre-Installation
✤ Windows: Create multiple
partitions OS, CF, Web Root.
✤ Limits impact of a path
traversal vulnerability.
✤ Create a user account for CF
to run as.
Installation
Installation
Install only necessary subcomponents
Installation
Disable unneeded Servlets
Installation
Installation
Installation
Installation
Installation
Post-Install
✤ Install any/all CF security
hotfixes and updates.
✤ Install / Update Web Server
connectors
✤ Configure administrator
settings.
Accessing CF Administrator
✤ Setup webserver (IIS / Apache)
✤ IP Restrictions, SSL, Additional User Auth
✤ or Use Builtin Web Server
Using BuiltinWeb Server
✤ Pro: Easy /CFIDE block
✤ Con: Harder to configure SSL, Virtual Directories, IP Restrictions
✤ Works well if using RDP to access from localhost, or setting up ssh
tunneling on unix
✤ If you need to access from public network, create a dedicated site,
use SSL, IP restrictions, etc.
Block /CFIDE
✤ If possible block all CFIDE
✤ If partially required block everything else.
✤ Block server wide, not by virtual host
✤ Always Restrict:
✤ /CFIDE/administrator
✤ /CFIDE/adminapi
✤ CF11 no longer has /CFIDE/GraphData.cfm
X
Red = Should be blocked
Orange = Block if possible
Yellow = Low risk but can be blocked
Apache
✤ RedirectMatch 404 (?i).*/CFIDE.*
✤ <LocationMatch "(?i).*/CFIDE">
IIS Request Filtering
✤ Block or whitelist URIs
✤ Block or whitelist by file extension
✤ Block or whitelist HTTP verbs
✤ Request Limits
✤ Content Length
✤ URL Length
✤ Query String Length
IIS Request Filtering
Application Pool Defaults
Block unused servlet mappings
✤ /cfform-gateway
✤ /cfform-internal
✤ /rest
✤ /CFIDE/main/rds.cfm
✤ /CFIDE/GraphData.cfm
(cfchart on CF10)
✤ /WSRPProducer
✤ /CFFileServlet
✤ /CFFormGateway
✤ /flashservices/gateway
✤ /flex2gateway
✤ See web.xml
Restrict File Extensions
✤ By Folder (user upload directories):
✤ Eg: Restrict folder to serve only jpg, png, gif files.
✤ Can be done globally or on site specific as well
✤ The /jakarta virtual directory needs dll extension
Dedicated User Account
✤ Windows: Change Service Log On identity. Otherwise CF runs with
full permission to everything.
✤ Unix: The installer allows you to specify a user to run CF as.
✤ The default nobody user is probably not the best choice as other
services might share this account.
File System Permissions
Path CF User Permissions
Web Server User
Permissions
Web Root
Read Only
Additional as needed
 Read Only
CF Root
Full
Can be restricted further
/CFIDE
CF
Connector
Read
Read
Write (Logs)

File System Permissions
✤ /CFIDE and other directories under CF root can be restricted read
only permission by the cf user to prevent runtime change.
✤ Run CF10/CF11 hotfix installer from command line as administrator.
✤ java -jar {coldfusion-home}cfusionhf-updateshotfix_XXX.jar
Update JVM
✤ Update to latest supported JVM (1.8 currently for CF10-11)
✤ Java 1.6 & 1.7 (as of 4/15) no longer supported by Oracle!
✤ Adobe recommends you run the latest supported JVM (eg 1.8.
{highest number}) instead of specific version numbers.
Sandbox Security
✤ Disable Unnecessary Risks, eg: cfexecute, cfregistry
✤ More flexible on Enterprise but still works on standard.
Session Mechanism
Feature J2EE CF
Configure in Application.cfc No Yes
Token size configurable Yes No
Configure in web.xml Yes No
Interoperates with J2EE applications Yes No
SessionRotate No Yes
SessionInvalidate No Yes
CF10-11/tomcat
web.xml Servlet Mappings
Tomcat
✤ Shutdown port / password
✤ Changing port on windows causes CF service stop to fail.
✤ Connector settings:
✤ connector secret (have to redo when updating connector)
✤ Tomcat 7 Security Configuration Guide: http://tomcat.apache.org/
tomcat-7.0-doc/security-howto.html
ColdFusion Administrator
ColdFusion Administrator
✤ Default ScriptSrc Directory
✤ Setup an alias so /CFIDE/scripts/ -> /some-folder/
✤ Allows you to block /CFIDE
✤ If you don’t use cfform, cfajaxproxy, etc you can skip.
✤ If you use the builtin web server you need to configure an alias
ColdFusion Administrator
✤ Allowed file extensions for CFInclude tag
✤ Mitigates directory traversal / path injection that leads to code
execution attack.
✤ Comma separated list of file extensions that execute, typically can
be set to just cfm
ColdFusion Administrator
Additional Settings
AdditionalTools
✤ HackMyCF
✤ FuseGuard
✤ CF Unofficial Updater (CF9 and
below)
Questions?
foundeo.com | hackmycf.com | fuseguard.com

More Related Content

PDF
Keep Applications Online
PDF
ColdFusion builder plugins
PDF
Realtime with-websockets-2015
PDF
Hidden gems in cf2016
PDF
PDF
10 common cf server challenges
PDF
Realtime with websockets
PDF
Instant ColdFusion with Vagrant
Keep Applications Online
ColdFusion builder plugins
Realtime with-websockets-2015
Hidden gems in cf2016
10 common cf server challenges
Realtime with websockets
Instant ColdFusion with Vagrant

What's hot (20)

PDF
Securing applications
PDF
Become a Security Rockstar with ColdFusion 2016
PDF
Super Fast Application development with Mura CMS
PDF
Locking Down CF Servers
PPTX
Load Balancing, Failover and Scalability with ColdFusion
PDF
Cfml features modern_coding
PPT
Restful API's with ColdFusion
PDF
Scale ColdFusion with Terracotta Distributed Caching for Ehchache
PPTX
My Database Skills Killed the Server
PDF
Dev objective2015 lets git together
PPTX
10 Reasons ColdFusion PDFs should rule the world
PPTX
Workflows and Digital Signatures
PDF
Can you contain the future - Docker, Container Technologies, The Future, and You
PDF
Hidden Gems in ColdFusion 2016
PDF
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
PDF
Hack & Fix, Hands on ColdFusion Security Training
PDF
Php Performance On Windows
PPTX
PHP Enhancement with Windows Server 2008
PDF
Migration to ColdFusion 11 – making it seamless and easy anit
PDF
Expand Your ColdFusion App Power with AWS
Securing applications
Become a Security Rockstar with ColdFusion 2016
Super Fast Application development with Mura CMS
Locking Down CF Servers
Load Balancing, Failover and Scalability with ColdFusion
Cfml features modern_coding
Restful API's with ColdFusion
Scale ColdFusion with Terracotta Distributed Caching for Ehchache
My Database Skills Killed the Server
Dev objective2015 lets git together
10 Reasons ColdFusion PDFs should rule the world
Workflows and Digital Signatures
Can you contain the future - Docker, Container Technologies, The Future, and You
Hidden Gems in ColdFusion 2016
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
Hack & Fix, Hands on ColdFusion Security Training
Php Performance On Windows
PHP Enhancement with Windows Server 2008
Migration to ColdFusion 11 – making it seamless and easy anit
Expand Your ColdFusion App Power with AWS
Ad

Similar to Locking Down CF Servers (20)

PDF
Cold fusion Security-How to Secure Coldfusion Server
PDF
Cf camp 2019 cfconfig - a new way to manage your cold-fusion engine config
PPT
"Running CF in a Shared Hosting Environment"
PDF
Whats new in CF10, 11, 2016
PDF
CFDJ_6-9_ALEX
PPTX
ColdFusion Internals
PDF
ColdFusion for Penetration Testers
PDF
Hidden Gems in ColdFusion 11
PDF
Securing Legacy CFML Code
PDF
Setting up your Multi Engine Environment - Apache Railo and ColdFusion
PDF
Security practices with CFEngine: Config Management Camp 2016
PDF
Security_Practices_with_CFEngine-cfgcamp_2016
PPTX
Upgrade to cf 2016 1
PDF
Secure your Secrets and Settings in ColdFusion
PDF
Setting up your multiengine environment Apache Railo ColdFusion
PPTX
Securing your web applications in CF 2016
PPTX
The app server, web server and everything in between
PDF
Updating hotfixing ColdFusion
PDF
Accessing ColdFusion Services From Flex Applications
PPT
Coldfusion
 
Cold fusion Security-How to Secure Coldfusion Server
Cf camp 2019 cfconfig - a new way to manage your cold-fusion engine config
"Running CF in a Shared Hosting Environment"
Whats new in CF10, 11, 2016
CFDJ_6-9_ALEX
ColdFusion Internals
ColdFusion for Penetration Testers
Hidden Gems in ColdFusion 11
Securing Legacy CFML Code
Setting up your Multi Engine Environment - Apache Railo and ColdFusion
Security practices with CFEngine: Config Management Camp 2016
Security_Practices_with_CFEngine-cfgcamp_2016
Upgrade to cf 2016 1
Secure your Secrets and Settings in ColdFusion
Setting up your multiengine environment Apache Railo ColdFusion
Securing your web applications in CF 2016
The app server, web server and everything in between
Updating hotfixing ColdFusion
Accessing ColdFusion Services From Flex Applications
Coldfusion
 
Ad

More from ColdFusionConference (20)

PDF
Api manager preconference
PDF
PDF
Building better SQL Server Databases
PDF
API Economy, Realizing the Business Value of APIs
PDF
Don't just pdf, Smart PDF
PDF
Crafting ColdFusion Applications like an Architect
PDF
Security And Access Control For APIS using CF API Manager
PDF
Monetizing Business Models: ColdFusion and APIS
PDF
ColdFusion in Transit action
PDF
Developer Insights for Application Upgrade to ColdFusion 2016
PDF
Where is cold fusion headed
PDF
ColdFusion Keynote: Building the Agile Web Since 1995
PDF
Instant ColdFusion with Vagrant
PPT
Restful services with ColdFusion
PDF
Build your own secure and real-time dashboard for mobile and web
PDF
Why Everyone else writes bad code
PDF
Testing automaton
PDF
Rest ful tools for lazy experts
PDF
Herding cats managing ColdFusion servers with commandbox
PDF
Everyones invited! Meet accesibility requirements with ColdFusion
Api manager preconference
Building better SQL Server Databases
API Economy, Realizing the Business Value of APIs
Don't just pdf, Smart PDF
Crafting ColdFusion Applications like an Architect
Security And Access Control For APIS using CF API Manager
Monetizing Business Models: ColdFusion and APIS
ColdFusion in Transit action
Developer Insights for Application Upgrade to ColdFusion 2016
Where is cold fusion headed
ColdFusion Keynote: Building the Agile Web Since 1995
Instant ColdFusion with Vagrant
Restful services with ColdFusion
Build your own secure and real-time dashboard for mobile and web
Why Everyone else writes bad code
Testing automaton
Rest ful tools for lazy experts
Herding cats managing ColdFusion servers with commandbox
Everyones invited! Meet accesibility requirements with ColdFusion

Recently uploaded (20)

PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Cloud computing and distributed systems.
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Modernizing your data center with Dell and AMD
PDF
Empathic Computing: Creating Shared Understanding
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Electronic commerce courselecture one. Pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Cloud computing and distributed systems.
Digital-Transformation-Roadmap-for-Companies.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
“AI and Expert System Decision Support & Business Intelligence Systems”
Understanding_Digital_Forensics_Presentation.pptx
Network Security Unit 5.pdf for BCA BBA.
Per capita expenditure prediction using model stacking based on satellite ima...
Advanced methodologies resolving dimensionality complications for autism neur...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Mobile App Security Testing_ A Comprehensive Guide.pdf
MYSQL Presentation for SQL database connectivity
Chapter 3 Spatial Domain Image Processing.pdf
Approach and Philosophy of On baking technology
Modernizing your data center with Dell and AMD
Empathic Computing: Creating Shared Understanding
Dropbox Q2 2025 Financial Results & Investor Presentation
Spectral efficient network and resource selection model in 5G networks
Electronic commerce courselecture one. Pdf

Locking Down CF Servers

  • 1. Locking Down CF Servers Pete Freitag, Foundeo Inc. foundeo.com | hackmycf.com | fuseguard.com
  • 2. About Pete Freitag ✤ Owner of Foundeo Inc. ✤ HackMyCF - Remote ColdFusion Security Scanner ✤ FuseGuard - Web App Firewall for CFML ✤ Consulting - Install, Configure, Review, CFML Dev ✤ 17+ Years working with CF ✤ Author of CF9-11 Lockdown Guides, CFMX Cookbook (SAMs) ✤ blog: petefreitag.com twitter: @pfreitag slack: @foundeo
  • 3. Our FocusToday ✤ Securing your ColdFusion Server Install ✤ Not covering: ✤ Hardening Your Operating System ✤ Database Security ✤ Securing your Application Source Code
  • 4. Agenda ✤ Guiding Principals ✤ Installation ✤ Post Installation Lockdown ✤ ColdFusion Administrator Configuration ✤ Tomcat Configuration
  • 5. Heavily Based on: ✤ Adobe ColdFusion 11 Lockdown Guide: http://bit.ly/cf11lockdown ✤ Adobe ColdFusion 10 Lockdown Guide: http://bit.ly/cf10lockdown ✤ Adobe ColdFusion 9 Lockdown Guide: http://bit.ly/cf9lockdown ✤ This talk assumes CF11, but is mostly the same for CF10 as well ✤ CF9 and below are no longer supported (no more security patches)
  • 6. Why Do I need to Lockdown my install? Can't the installer do everything for me? What is secure? What tradeoffs are acceptable? (cc) http://www.flickr.com/photos/toddler/4169974226/
  • 7. Principal of Least Privilege Grant only the minimum permission required to accomplish a task. (cc) http://www.flickr.com/photos/dvanzuijlekom/8279837896/in/photostream/
  • 8. Defense in Depth Multiple Layers of Redundant Security. (cc) http://www.flickr.com/photos/flygraphix/4791988161/
  • 11. Avoid Defaults Avoid using defaults for configurable options such as paths, usernames, etc.
  • 12. Services I Like: ✤ Duo Security: Two Factor Authentication ✤ (RDP, SSH) ✤ Dome9: Cloud Firewall ✤ Easily grant temporary access to administrative ports.
  • 13. Pre-Installation ✤ Lockdown and Patch OS ✤ OS Vendors have Lockdown Guides as well. ✤ https://access.redhat.com/documentation/en-US/ Red_Hat_Enterprise_Linux/6/html/Security_Guide/ ✤ Windows Security Compliance Toolkit: http:// technet.microsoft.com/en-us/library/cc677002.aspx ✤ Ensure network firewall in place. ✤ Remove all unnecessary software.
  • 14. Pre-Installation ✤ Windows: Create multiple partitions OS, CF, Web Root. ✤ Limits impact of a path traversal vulnerability. ✤ Create a user account for CF to run as.
  • 23. Post-Install ✤ Install any/all CF security hotfixes and updates. ✤ Install / Update Web Server connectors ✤ Configure administrator settings.
  • 24. Accessing CF Administrator ✤ Setup webserver (IIS / Apache) ✤ IP Restrictions, SSL, Additional User Auth ✤ or Use Builtin Web Server
  • 25. Using BuiltinWeb Server ✤ Pro: Easy /CFIDE block ✤ Con: Harder to configure SSL, Virtual Directories, IP Restrictions ✤ Works well if using RDP to access from localhost, or setting up ssh tunneling on unix ✤ If you need to access from public network, create a dedicated site, use SSL, IP restrictions, etc.
  • 26. Block /CFIDE ✤ If possible block all CFIDE ✤ If partially required block everything else. ✤ Block server wide, not by virtual host ✤ Always Restrict: ✤ /CFIDE/administrator ✤ /CFIDE/adminapi ✤ CF11 no longer has /CFIDE/GraphData.cfm
  • 27. X Red = Should be blocked Orange = Block if possible Yellow = Low risk but can be blocked
  • 28. Apache ✤ RedirectMatch 404 (?i).*/CFIDE.* ✤ <LocationMatch "(?i).*/CFIDE">
  • 29. IIS Request Filtering ✤ Block or whitelist URIs ✤ Block or whitelist by file extension ✤ Block or whitelist HTTP verbs ✤ Request Limits ✤ Content Length ✤ URL Length ✤ Query String Length
  • 32. Block unused servlet mappings ✤ /cfform-gateway ✤ /cfform-internal ✤ /rest ✤ /CFIDE/main/rds.cfm ✤ /CFIDE/GraphData.cfm (cfchart on CF10) ✤ /WSRPProducer ✤ /CFFileServlet ✤ /CFFormGateway ✤ /flashservices/gateway ✤ /flex2gateway ✤ See web.xml
  • 33. Restrict File Extensions ✤ By Folder (user upload directories): ✤ Eg: Restrict folder to serve only jpg, png, gif files. ✤ Can be done globally or on site specific as well ✤ The /jakarta virtual directory needs dll extension
  • 34. Dedicated User Account ✤ Windows: Change Service Log On identity. Otherwise CF runs with full permission to everything. ✤ Unix: The installer allows you to specify a user to run CF as. ✤ The default nobody user is probably not the best choice as other services might share this account.
  • 35. File System Permissions Path CF User Permissions Web Server User Permissions Web Root Read Only Additional as needed
 Read Only CF Root Full Can be restricted further /CFIDE CF Connector Read Read Write (Logs)

  • 36. File System Permissions ✤ /CFIDE and other directories under CF root can be restricted read only permission by the cf user to prevent runtime change. ✤ Run CF10/CF11 hotfix installer from command line as administrator. ✤ java -jar {coldfusion-home}cfusionhf-updateshotfix_XXX.jar
  • 37. Update JVM ✤ Update to latest supported JVM (1.8 currently for CF10-11) ✤ Java 1.6 & 1.7 (as of 4/15) no longer supported by Oracle! ✤ Adobe recommends you run the latest supported JVM (eg 1.8. {highest number}) instead of specific version numbers.
  • 38. Sandbox Security ✤ Disable Unnecessary Risks, eg: cfexecute, cfregistry ✤ More flexible on Enterprise but still works on standard.
  • 39. Session Mechanism Feature J2EE CF Configure in Application.cfc No Yes Token size configurable Yes No Configure in web.xml Yes No Interoperates with J2EE applications Yes No SessionRotate No Yes SessionInvalidate No Yes CF10-11/tomcat
  • 41. Tomcat ✤ Shutdown port / password ✤ Changing port on windows causes CF service stop to fail. ✤ Connector settings: ✤ connector secret (have to redo when updating connector) ✤ Tomcat 7 Security Configuration Guide: http://tomcat.apache.org/ tomcat-7.0-doc/security-howto.html
  • 43. ColdFusion Administrator ✤ Default ScriptSrc Directory ✤ Setup an alias so /CFIDE/scripts/ -> /some-folder/ ✤ Allows you to block /CFIDE ✤ If you don’t use cfform, cfajaxproxy, etc you can skip. ✤ If you use the builtin web server you need to configure an alias
  • 44. ColdFusion Administrator ✤ Allowed file extensions for CFInclude tag ✤ Mitigates directory traversal / path injection that leads to code execution attack. ✤ Comma separated list of file extensions that execute, typically can be set to just cfm
  • 46. AdditionalTools ✤ HackMyCF ✤ FuseGuard ✤ CF Unofficial Updater (CF9 and below)