SlideShare uma empresa Scribd logo
1 de 58
Securing Apache Web Servers  with Mod Security  & CIS Benchmark Ralph Durkee , CISSP, GSEC, GCIH, GSNA, GPEN Principal Security Consultant [email_address]
Sep 21, 2009 www.RD1.net About Ralph Durkee ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sep 21, 2009 www.RD1.net Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sep 21, 2009 www.RD1.net Center for Internet Security Benchmarks ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Need A Secure Foundation Sep 21, 2009 www.RD1.net
Sep 21, 2009 www.RD1.net ,[object Object],[object Object],[object Object],[object Object],[object Object],Secure Foundation – OS Security
Sep 21, 2009 www.RD1.net Secure Foundation – DNS Cache Poisoning Attacks ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Dan Kaminsky’s - DNS Attack ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Sep 21, 2009 www.RD1.net
Sep 21, 2009 www.RD1.net Apache User Account ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sep 21, 2009 www.RD1.net Set Minimal Permissions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sep 21, 2009 www.RD1.net Set Minimal Permissions (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sep 21, 2009 www.RD1.net Subscribe to Security Advisories ,[object Object],[object Object],[object Object],[object Object],[object Object]
Minimize the Attack Surface Sep 21, 2009 www.RD1.net
Sep 21, 2009 www.RD1.net Disable Unnecessary Modules ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sep 21, 2009 www.RD1.net Use only Necessary Modules ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sep 21, 2009 www.RD1.net Check Config Include Directories ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sep 21, 2009 www.RD1.net Remove Any Default Files ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sep 21, 2009 www.RD1.net Other Resources for Modules ,[object Object],[object Object],[object Object],[object Object],[object Object]
Sep 21, 2009 www.RD1.net Options  Directive Apache 2.2 docs Description:  Configures what features are available in a particular directory Syntax:  Options [+|-]option [[+|-]option] ... Default : Options All  Context : server config, virtual host, directory, .htaccess Override : Options  Module : core
Sep 21, 2009 www.RD1.net Options Directive Example 1 - Top Level Root <Directory />   . . . Options None </Directory> Example 2 – cgi-bin Directory ScriptAlias /mailman/ /usr/lib/mailman/cgi-bin/ <Directory /usr/lib/mailman/cgi-bin/> . . . Options ExecCGI </Directory>
Sep 21, 2009 www.RD1.net Options Directive ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Access Controls Sep 21, 2009 www.RD1.net
Auth and Authz Modules ,[object Object],[object Object],Sep 21, 2009 www.RD1.net
Sep 21, 2009 www.RD1.net Access Control Directives (1) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sep 21, 2009 www.RD1.net Access Control Directives (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sep 21, 2009 www.RD1.net HTTP Basic Authentication  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sep 21, 2009 www.RD1.net HTTP Basic Authentication (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sep 21, 2009 www.RD1.net HTTP Digest Authentication ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
New ChrootDir Directive Description : Directory for apache to run chroot(8) after startup. Syntax : ChrootDir  /path/to/directory Default : none Context : server config Module : event, prefork, worker Compatibility : Available in Apache 2.2.10 and later Example:  ChrootDir  /var/www/chroot Sep 21, 2009 www.RD1.net
New ChrootDir Directive (2) Apache Disclaimer: Note  that running the server under chroot is not simple, and requires additional setup, particularly if you are running scripts such as CGI or PHP. Please make sure you are properly familiar with the operation of chroot before attempting to use this feature. Sep 21, 2009 www.RD1.net
New ChrootDir Directive (3) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Sep 21, 2009 www.RD1.net
Apache and SELinux  an Alternative to chroot  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Sep 21, 2009 www.RD1.net
Apache SELinux Polices ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Sep 21, 2009 www.RD1.net
Checking SELinux Labels ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Sep 21, 2009 www.RD1.net
Limiting HTTP Request Methods Sep 21, 2009 www.RD1.net
HTTP Request Methods? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Sep 21, 2009 www.RD1.net
Sep 21, 2009 www.RD1.net Limiting HTTP Request Methods ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sep 21, 2009 www.RD1.net Deny HTTP Trace Mod_Rewrite Technique  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sep 21, 2009 www.RD1.net Deny HTTP Trace New TraceEnable Directive Description : Determines the behavior on TRACE requests  Syntax : TraceEnable [on|off|extended]  Default : TraceEnable on  Context : server config  Module : core  Compatibility : Available in Apache 1.3.34, 2.0.55 and later Example: TraceEnable off
Mod Security – The Web Application Firewall Sep 21, 2009 www.RD1.net
Sep 21, 2009 www.RD1.net Mod_Security Features ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sep 21, 2009 www.RD1.net Mod_Security Features (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sep 21, 2009 www.RD1.net Mod_security Configuration ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sep 21, 2009 www.RD1.net Mod_security Configuration (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sep 21, 2009 www.RD1.net Mod_security Filters (1) Basic Recommended Filters # Require HTTP_USER_AGENT and HTTP_HOST headers SecFilterSelective &quot;HTTP_USER_AGENT|HTTP_HOST&quot; &quot;^$&quot; # Only accept request encodings we how handle # we exclude GET requests because some (automated) # clients supply &quot;text/html&quot; as Content-Type SecFilterSelective REQUEST_METHOD &quot;!^GET$&quot; chain SecFilterSelective HTTP_Content-Type  &quot;!(^$|^application/x-www-form-urlencoded$|^multipart/form-data)&quot;
Sep 21, 2009 www.RD1.net Mod_security Filters (2) More Basic Recommended Filters # Require Content-Length to be provided with # every POST request SecFilterSelective REQUEST_METHOD &quot;^POST$&quot; chain SecFilterSelective HTTP_Content-Length &quot;^$&quot; # Don't accept transfer encodings we don't handle SecFilterSelective HTTP_Transfer-Encoding &quot;!^$&quot;
Logging and Monitoring Sep 21, 2009 www.RD1.net
Sep 21, 2009 www.RD1.net Logging Directives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sep 21, 2009 www.RD1.net Logging Directives (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sep 21, 2009 www.RD1.net Log Monitoring ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Log Monitoring (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Sep 21, 2009 www.RD1.net
Abuse Reports  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Sep 21, 2009 www.RD1.net
Abuse Reports – How to (2) ,[object Object],[object Object],[object Object],[object Object],Sep 21, 2009 www.RD1.net
Abuse Reports (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],Sep 21, 2009 www.RD1.net
Abuse Reports (3) ,[object Object],[object Object],[object Object],Sep 21, 2009 www.RD1.net
Abuse Responses From: Amazon EC2 Abuse  [email_address] Thank you for submitting your abuse report. We have received your report of Intrusion Attempts originating from our network. We have completed an initial investigation of the issue and learned that the activity you noticed did indeed originate from an Amazon EC2 instance. These intrusion attempts that you report were not, however, initiated by Amazon. One of the biggest advantages of Amazon EC2 is that developers are given complete control of their instances.  . . . That said, we do take reports of unauthorized network activity from our environment very seriously. It is specifically forbidden in our terms of use. This instance has since been terminated. Sep 21, 2009 www.RD1.net
OSSEC.net ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Sep 21, 2009 www.RD1.net
Durkee Consulting, Inc.  www.rd1.net  [email_address] Questions?

Mais conteúdo relacionado

Mais procurados

CONFidence 2018: Attacking web servers via run time configuration (Eldar "Wir...
CONFidence 2018: Attacking web servers via run time configuration (Eldar "Wir...CONFidence 2018: Attacking web servers via run time configuration (Eldar "Wir...
CONFidence 2018: Attacking web servers via run time configuration (Eldar "Wir...PROIDEA
 
Keeping DNS server up-and-running with “runit
Keeping DNS server up-and-running with “runitKeeping DNS server up-and-running with “runit
Keeping DNS server up-and-running with “runitMen and Mice
 
Squid proxy-configuration-guide
Squid proxy-configuration-guideSquid proxy-configuration-guide
Squid proxy-configuration-guidejasembo
 
Oracle Database on Docker
Oracle Database on DockerOracle Database on Docker
Oracle Database on DockerFranck Pachot
 
Software Packaging with RPM
Software Packaging with RPMSoftware Packaging with RPM
Software Packaging with RPMSchalk Cronjé
 
Word Press Security
Word Press SecurityWord Press Security
Word Press SecurityRandall Rode
 
Configure, Pack and Distribute: An RPM Creation Workshop
Configure, Pack and Distribute: An RPM Creation WorkshopConfigure, Pack and Distribute: An RPM Creation Workshop
Configure, Pack and Distribute: An RPM Creation WorkshopNovell
 
RIPE 71 and IETF 94 reports webinar
RIPE 71 and IETF 94 reports webinarRIPE 71 and IETF 94 reports webinar
RIPE 71 and IETF 94 reports webinarMen and Mice
 
What is new in BIND 9.11?
What is new in BIND 9.11?What is new in BIND 9.11?
What is new in BIND 9.11?Men and Mice
 
Kea DHCP – the new open source DHCP server from ISC
Kea DHCP – the new open source DHCP server from ISCKea DHCP – the new open source DHCP server from ISC
Kea DHCP – the new open source DHCP server from ISCMen and Mice
 
Apache web server installation/configuration, Virtual Hosting
Apache web server installation/configuration, Virtual HostingApache web server installation/configuration, Virtual Hosting
Apache web server installation/configuration, Virtual Hostingwebhostingguy
 
BIND 9 logging best practices
BIND 9 logging best practicesBIND 9 logging best practices
BIND 9 logging best practicesMen and Mice
 
Bundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMBundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMAlexander Shopov
 
Firebird Performance counters in details
Firebird Performance counters in detailsFirebird Performance counters in details
Firebird Performance counters in detailsMind The Firebird
 
Apache Web server Complete Guide
Apache Web server Complete GuideApache Web server Complete Guide
Apache Web server Complete Guidewebhostingguy
 

Mais procurados (20)

CONFidence 2018: Attacking web servers via run time configuration (Eldar "Wir...
CONFidence 2018: Attacking web servers via run time configuration (Eldar "Wir...CONFidence 2018: Attacking web servers via run time configuration (Eldar "Wir...
CONFidence 2018: Attacking web servers via run time configuration (Eldar "Wir...
 
Keeping DNS server up-and-running with “runit
Keeping DNS server up-and-running with “runitKeeping DNS server up-and-running with “runit
Keeping DNS server up-and-running with “runit
 
Squid proxy-configuration-guide
Squid proxy-configuration-guideSquid proxy-configuration-guide
Squid proxy-configuration-guide
 
Oracle Database on Docker
Oracle Database on DockerOracle Database on Docker
Oracle Database on Docker
 
Software Packaging with RPM
Software Packaging with RPMSoftware Packaging with RPM
Software Packaging with RPM
 
Word Press Security
Word Press SecurityWord Press Security
Word Press Security
 
Apache Web Server Setup 4
Apache Web Server Setup 4Apache Web Server Setup 4
Apache Web Server Setup 4
 
Configure, Pack and Distribute: An RPM Creation Workshop
Configure, Pack and Distribute: An RPM Creation WorkshopConfigure, Pack and Distribute: An RPM Creation Workshop
Configure, Pack and Distribute: An RPM Creation Workshop
 
Apache Web Server Setup 1
Apache Web Server Setup 1Apache Web Server Setup 1
Apache Web Server Setup 1
 
RIPE 71 and IETF 94 reports webinar
RIPE 71 and IETF 94 reports webinarRIPE 71 and IETF 94 reports webinar
RIPE 71 and IETF 94 reports webinar
 
What is new in BIND 9.11?
What is new in BIND 9.11?What is new in BIND 9.11?
What is new in BIND 9.11?
 
Kea DHCP – the new open source DHCP server from ISC
Kea DHCP – the new open source DHCP server from ISCKea DHCP – the new open source DHCP server from ISC
Kea DHCP – the new open source DHCP server from ISC
 
DNSTap Webinar
DNSTap WebinarDNSTap Webinar
DNSTap Webinar
 
Squid
SquidSquid
Squid
 
Apache web server installation/configuration, Virtual Hosting
Apache web server installation/configuration, Virtual HostingApache web server installation/configuration, Virtual Hosting
Apache web server installation/configuration, Virtual Hosting
 
BIND 9 logging best practices
BIND 9 logging best practicesBIND 9 logging best practices
BIND 9 logging best practices
 
Bundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMBundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPM
 
Firebird Performance counters in details
Firebird Performance counters in detailsFirebird Performance counters in details
Firebird Performance counters in details
 
Apache Web server Complete Guide
Apache Web server Complete GuideApache Web server Complete Guide
Apache Web server Complete Guide
 
Apache Web Server Setup 3
Apache Web Server Setup 3Apache Web Server Setup 3
Apache Web Server Setup 3
 

Destaque

Destaque (7)

Web Servers
Web ServersWeb Servers
Web Servers
 
Semantic Web Servers
Semantic Web ServersSemantic Web Servers
Semantic Web Servers
 
DUE DATE 3/1/06
DUE DATE 3/1/06DUE DATE 3/1/06
DUE DATE 3/1/06
 
Understanding
Understanding Understanding
Understanding
 
Attachment D
Attachment DAttachment D
Attachment D
 
Securing Public Web Servers
Securing Public Web ServersSecuring Public Web Servers
Securing Public Web Servers
 
Crawler-Friendly Web Servers
Crawler-Friendly Web ServersCrawler-Friendly Web Servers
Crawler-Friendly Web Servers
 

Semelhante a Securing Apache Web Servers

Ch 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet ServersCh 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet Serverswebhostingguy
 
AEM (CQ) Dispatcher Security and CDN+Browser Caching
AEM (CQ) Dispatcher Security and CDN+Browser CachingAEM (CQ) Dispatcher Security and CDN+Browser Caching
AEM (CQ) Dispatcher Security and CDN+Browser CachingAndrew Khoury
 
Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011pundiramit
 
Intro to development sites and site migration
Intro to development sites and site migrationIntro to development sites and site migration
Intro to development sites and site migrationR-Cubed Design Forge
 
Install and configure linux
Install and configure linuxInstall and configure linux
Install and configure linuxVicent Selfa
 
Apache2 BootCamp : Getting Started With Apache
Apache2 BootCamp : Getting Started With ApacheApache2 BootCamp : Getting Started With Apache
Apache2 BootCamp : Getting Started With ApacheWildan Maulana
 
apresentacao_apache2..
apresentacao_apache2..apresentacao_apache2..
apresentacao_apache2..webhostingguy
 
apresentacao_apache2..
apresentacao_apache2..apresentacao_apache2..
apresentacao_apache2..webhostingguy
 
Apache Server Tutorial
Apache Server TutorialApache Server Tutorial
Apache Server TutorialJagat Kothari
 
How do I securely deploy Internet websites in PHP on my IBMi?
How do I securely deploy Internet websites in PHP on my IBMi?How do I securely deploy Internet websites in PHP on my IBMi?
How do I securely deploy Internet websites in PHP on my IBMi?Zend by Rogue Wave Software
 
PowerPoint Presentation
PowerPoint PresentationPowerPoint Presentation
PowerPoint Presentationwebhostingguy
 
DevOPS training - Day 1/2
DevOPS training - Day 1/2DevOPS training - Day 1/2
DevOPS training - Day 1/2Vincent Mercier
 
Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Ben Hall
 

Semelhante a Securing Apache Web Servers (20)

Durkee apache 2009_v7
Durkee apache 2009_v7Durkee apache 2009_v7
Durkee apache 2009_v7
 
Ch 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet ServersCh 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet Servers
 
AEM (CQ) Dispatcher Security and CDN+Browser Caching
AEM (CQ) Dispatcher Security and CDN+Browser CachingAEM (CQ) Dispatcher Security and CDN+Browser Caching
AEM (CQ) Dispatcher Security and CDN+Browser Caching
 
Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011
 
Apache ppt
Apache pptApache ppt
Apache ppt
 
Intro to development sites and site migration
Intro to development sites and site migrationIntro to development sites and site migration
Intro to development sites and site migration
 
Install and configure linux
Install and configure linuxInstall and configure linux
Install and configure linux
 
Apache2 BootCamp : Getting Started With Apache
Apache2 BootCamp : Getting Started With ApacheApache2 BootCamp : Getting Started With Apache
Apache2 BootCamp : Getting Started With Apache
 
apresentacao_apache2..
apresentacao_apache2..apresentacao_apache2..
apresentacao_apache2..
 
apresentacao_apache2..
apresentacao_apache2..apresentacao_apache2..
apresentacao_apache2..
 
Dot netnuke
Dot netnukeDot netnuke
Dot netnuke
 
Apache
ApacheApache
Apache
 
Apache
ApacheApache
Apache
 
Apache Server Tutorial
Apache Server TutorialApache Server Tutorial
Apache Server Tutorial
 
How do I securely deploy Internet websites in PHP on my IBMi?
How do I securely deploy Internet websites in PHP on my IBMi?How do I securely deploy Internet websites in PHP on my IBMi?
How do I securely deploy Internet websites in PHP on my IBMi?
 
Apache Ppt
Apache PptApache Ppt
Apache Ppt
 
PowerPoint Presentation
PowerPoint PresentationPowerPoint Presentation
PowerPoint Presentation
 
DevOPS training - Day 1/2
DevOPS training - Day 1/2DevOPS training - Day 1/2
DevOPS training - Day 1/2
 
Apache Web Server Setup 2
Apache Web Server Setup 2Apache Web Server Setup 2
Apache Web Server Setup 2
 
Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016
 

Mais de webhostingguy

Running and Developing Tests with the Apache::Test Framework
Running and Developing Tests with the Apache::Test FrameworkRunning and Developing Tests with the Apache::Test Framework
Running and Developing Tests with the Apache::Test Frameworkwebhostingguy
 
MySQL and memcached Guide
MySQL and memcached GuideMySQL and memcached Guide
MySQL and memcached Guidewebhostingguy
 
Novell® iChain® 2.3
Novell® iChain® 2.3Novell® iChain® 2.3
Novell® iChain® 2.3webhostingguy
 
Load-balancing web servers Load-balancing web servers
Load-balancing web servers Load-balancing web serversLoad-balancing web servers Load-balancing web servers
Load-balancing web servers Load-balancing web serverswebhostingguy
 
SQL Server 2008 Consolidation
SQL Server 2008 ConsolidationSQL Server 2008 Consolidation
SQL Server 2008 Consolidationwebhostingguy
 
Master Service Agreement
Master Service AgreementMaster Service Agreement
Master Service Agreementwebhostingguy
 
PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PHP and MySQL PHP Written as a set of CGI binaries in C in ...PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PHP and MySQL PHP Written as a set of CGI binaries in C in ...webhostingguy
 
Dell Reference Architecture Guide Deploying Microsoft® SQL ...
Dell Reference Architecture Guide Deploying Microsoft® SQL ...Dell Reference Architecture Guide Deploying Microsoft® SQL ...
Dell Reference Architecture Guide Deploying Microsoft® SQL ...webhostingguy
 
Managing Diverse IT Infrastructure
Managing Diverse IT InfrastructureManaging Diverse IT Infrastructure
Managing Diverse IT Infrastructurewebhostingguy
 
Web design for business.ppt
Web design for business.pptWeb design for business.ppt
Web design for business.pptwebhostingguy
 
IT Power Management Strategy
IT Power Management Strategy IT Power Management Strategy
IT Power Management Strategy webhostingguy
 
Excel and SQL Quick Tricks for Merchandisers
Excel and SQL Quick Tricks for MerchandisersExcel and SQL Quick Tricks for Merchandisers
Excel and SQL Quick Tricks for Merchandiserswebhostingguy
 
Parallels Hosting Products
Parallels Hosting ProductsParallels Hosting Products
Parallels Hosting Productswebhostingguy
 
Microsoft PowerPoint presentation 2.175 Mb
Microsoft PowerPoint presentation 2.175 MbMicrosoft PowerPoint presentation 2.175 Mb
Microsoft PowerPoint presentation 2.175 Mbwebhostingguy
 

Mais de webhostingguy (20)

File Upload
File UploadFile Upload
File Upload
 
Running and Developing Tests with the Apache::Test Framework
Running and Developing Tests with the Apache::Test FrameworkRunning and Developing Tests with the Apache::Test Framework
Running and Developing Tests with the Apache::Test Framework
 
MySQL and memcached Guide
MySQL and memcached GuideMySQL and memcached Guide
MySQL and memcached Guide
 
Novell® iChain® 2.3
Novell® iChain® 2.3Novell® iChain® 2.3
Novell® iChain® 2.3
 
Load-balancing web servers Load-balancing web servers
Load-balancing web servers Load-balancing web serversLoad-balancing web servers Load-balancing web servers
Load-balancing web servers Load-balancing web servers
 
SQL Server 2008 Consolidation
SQL Server 2008 ConsolidationSQL Server 2008 Consolidation
SQL Server 2008 Consolidation
 
What is mod_perl?
What is mod_perl?What is mod_perl?
What is mod_perl?
 
What is mod_perl?
What is mod_perl?What is mod_perl?
What is mod_perl?
 
Master Service Agreement
Master Service AgreementMaster Service Agreement
Master Service Agreement
 
Notes8
Notes8Notes8
Notes8
 
PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PHP and MySQL PHP Written as a set of CGI binaries in C in ...PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PHP and MySQL PHP Written as a set of CGI binaries in C in ...
 
Dell Reference Architecture Guide Deploying Microsoft® SQL ...
Dell Reference Architecture Guide Deploying Microsoft® SQL ...Dell Reference Architecture Guide Deploying Microsoft® SQL ...
Dell Reference Architecture Guide Deploying Microsoft® SQL ...
 
Managing Diverse IT Infrastructure
Managing Diverse IT InfrastructureManaging Diverse IT Infrastructure
Managing Diverse IT Infrastructure
 
Web design for business.ppt
Web design for business.pptWeb design for business.ppt
Web design for business.ppt
 
IT Power Management Strategy
IT Power Management Strategy IT Power Management Strategy
IT Power Management Strategy
 
Excel and SQL Quick Tricks for Merchandisers
Excel and SQL Quick Tricks for MerchandisersExcel and SQL Quick Tricks for Merchandisers
Excel and SQL Quick Tricks for Merchandisers
 
OLUG_xen.ppt
OLUG_xen.pptOLUG_xen.ppt
OLUG_xen.ppt
 
Parallels Hosting Products
Parallels Hosting ProductsParallels Hosting Products
Parallels Hosting Products
 
Microsoft PowerPoint presentation 2.175 Mb
Microsoft PowerPoint presentation 2.175 MbMicrosoft PowerPoint presentation 2.175 Mb
Microsoft PowerPoint presentation 2.175 Mb
 
Reseller's Guide
Reseller's GuideReseller's Guide
Reseller's Guide
 

Securing Apache Web Servers

  • 1. Securing Apache Web Servers with Mod Security & CIS Benchmark Ralph Durkee , CISSP, GSEC, GCIH, GSNA, GPEN Principal Security Consultant [email_address]
  • 2.
  • 3.
  • 4.
  • 5. Need A Secure Foundation Sep 21, 2009 www.RD1.net
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13. Minimize the Attack Surface Sep 21, 2009 www.RD1.net
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19. Sep 21, 2009 www.RD1.net Options Directive Apache 2.2 docs Description: Configures what features are available in a particular directory Syntax: Options [+|-]option [[+|-]option] ... Default : Options All Context : server config, virtual host, directory, .htaccess Override : Options Module : core
  • 20. Sep 21, 2009 www.RD1.net Options Directive Example 1 - Top Level Root <Directory /> . . . Options None </Directory> Example 2 – cgi-bin Directory ScriptAlias /mailman/ /usr/lib/mailman/cgi-bin/ <Directory /usr/lib/mailman/cgi-bin/> . . . Options ExecCGI </Directory>
  • 21.
  • 22. Access Controls Sep 21, 2009 www.RD1.net
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29. New ChrootDir Directive Description : Directory for apache to run chroot(8) after startup. Syntax : ChrootDir /path/to/directory Default : none Context : server config Module : event, prefork, worker Compatibility : Available in Apache 2.2.10 and later Example: ChrootDir /var/www/chroot Sep 21, 2009 www.RD1.net
  • 30. New ChrootDir Directive (2) Apache Disclaimer: Note that running the server under chroot is not simple, and requires additional setup, particularly if you are running scripts such as CGI or PHP. Please make sure you are properly familiar with the operation of chroot before attempting to use this feature. Sep 21, 2009 www.RD1.net
  • 31.
  • 32.
  • 33.
  • 34.
  • 35. Limiting HTTP Request Methods Sep 21, 2009 www.RD1.net
  • 36.
  • 37.
  • 38.
  • 39. Sep 21, 2009 www.RD1.net Deny HTTP Trace New TraceEnable Directive Description : Determines the behavior on TRACE requests Syntax : TraceEnable [on|off|extended] Default : TraceEnable on Context : server config Module : core Compatibility : Available in Apache 1.3.34, 2.0.55 and later Example: TraceEnable off
  • 40. Mod Security – The Web Application Firewall Sep 21, 2009 www.RD1.net
  • 41.
  • 42.
  • 43.
  • 44.
  • 45. Sep 21, 2009 www.RD1.net Mod_security Filters (1) Basic Recommended Filters # Require HTTP_USER_AGENT and HTTP_HOST headers SecFilterSelective &quot;HTTP_USER_AGENT|HTTP_HOST&quot; &quot;^$&quot; # Only accept request encodings we how handle # we exclude GET requests because some (automated) # clients supply &quot;text/html&quot; as Content-Type SecFilterSelective REQUEST_METHOD &quot;!^GET$&quot; chain SecFilterSelective HTTP_Content-Type &quot;!(^$|^application/x-www-form-urlencoded$|^multipart/form-data)&quot;
  • 46. Sep 21, 2009 www.RD1.net Mod_security Filters (2) More Basic Recommended Filters # Require Content-Length to be provided with # every POST request SecFilterSelective REQUEST_METHOD &quot;^POST$&quot; chain SecFilterSelective HTTP_Content-Length &quot;^$&quot; # Don't accept transfer encodings we don't handle SecFilterSelective HTTP_Transfer-Encoding &quot;!^$&quot;
  • 47. Logging and Monitoring Sep 21, 2009 www.RD1.net
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56. Abuse Responses From: Amazon EC2 Abuse [email_address] Thank you for submitting your abuse report. We have received your report of Intrusion Attempts originating from our network. We have completed an initial investigation of the issue and learned that the activity you noticed did indeed originate from an Amazon EC2 instance. These intrusion attempts that you report were not, however, initiated by Amazon. One of the biggest advantages of Amazon EC2 is that developers are given complete control of their instances. . . . That said, we do take reports of unauthorized network activity from our environment very seriously. It is specifically forbidden in our terms of use. This instance has since been terminated. Sep 21, 2009 www.RD1.net
  • 57.
  • 58. Durkee Consulting, Inc. www.rd1.net [email_address] Questions?