Serveur Web Apache. Jean-Marc Robert Génie logiciel et des TI



Documents pareils
OWASP Open Web Application Security Project. Jean-Marc Robert Génie logiciel et des TI

Présentation de la solution Open Source «Vulture» Version 2.0

Les utilités d'un coupe-feu applicatif Web

Supervision et infrastructure - Accès aux applications JAVA. Document FAQ. Page: 1 / 9 Dernière mise à jour: 15/04/12 16:14

Instructions pour mettre à jour un HFFv2 v1.x.yy v2.0.00

RULE 5 - SERVICE OF DOCUMENTS RÈGLE 5 SIGNIFICATION DE DOCUMENTS. Rule 5 / Règle 5

WEB page builder and server for SCADA applications usable from a WEB navigator

1. Formation F5 - Local Traffic Manager Configuring (LTM)

Mon Service Public - Case study and Mapping to SAML/Liberty specifications. Gaël Gourmelen - France Telecom 23/04/2007

Tom Pertsekos. Sécurité applicative Web : gare aux fraudes et aux pirates!

La Sécurité des Données en Environnement DataCenter

DOCUMENTATION - FRANCAIS... 2

Module 7 : Configuration du serveur WEB Apache

Topologies et Outils d Alertesd

SÉCURITÉ DES APPLICATIONS WEB LA SOLUTION D ANALYSE IDÉALE POUR LES APPLICATIONS WEB

Aide à la Détection de Faiblesses d un site Web Mandataire inverse, Modsecurity

Préparation d un serveur Apache pour Zend Framework

Sécuriser les applications web

Quick Start Guide This guide is intended to get you started with Rational ClearCase or Rational ClearCase MultiSite.

Installation UpdatEngine serveur (CentOs apache2 / MySQL)

WDpStats Procédure d installation

Sécurité des systèmes d exploitation

Paxton. ins Net2 desktop reader USB

Cedric Dumoulin (C) The Java EE 7 Tutorial

Sécurité des sites Web Pas un cours un recueil du net. INF340 Jean-François Berdjugin

Web Application Firewalls (WAF)

DOCUMENTATION - FRANCAIS... 2

Audits de sécurité, supervision en continu Renaud Deraison

Visualisation et Analyse de Risque Dynamique pour la Cyber-Défense

Guide Installation Serveur Extensive Testing

Editing and managing Systems engineering processes at Snecma

Sécurité des applications web. Daniel Boteanu

Outils d'analyse de la sécurité des réseaux. HADJALI Anis VESA Vlad

Gérer ses environnements de développement avec Vagrant RMLL 2012

Sécuriser les applications web de l entreprise

TP LINUX : LINUX-SAMBA SERVEUR DE FICHIERS POUR UTILISATEURS WINDOWS

Practice Direction. Class Proceedings

Rapport de certification ANSSI-CSPN-2010/05. ModSecurity v2.5.12

Le serveur web Apache

Guide Installation Serveur Extensive Testing

APPENDIX 6 BONUS RING FORMAT

TP HTTP. Université Pierre Mendès France U.F.R. Sciences de l Homme et de la Société Master IC²A

Supplément de renseignements : Examens d applications et pare-feux d applications web clarifiés Normes : Normes en matière de sécurité des données de

Firewall IDS Architecture. Assurer le contrôle des connexions au. Sécurité 1

Groupe Eyrolles, 2004, ISBN :

Sécurité de la ToIP Mercredi 16 Décembre CONIX Telecom

AMENDMENT TO BILL 32 AMENDEMENT AU PROJET DE LOI 32

Vanilla : Virtual Box

«Evolution des menaces de sécurité et lutte contre les cyber attaques» Mathieu Vialetay, CISSP. Security Consultant, North Africa Tlemcen, juin 2013

BIG DATA APPLIQUÉES À LA SÉCURITÉ. Emmanuel MACÉ Akamai Technologies

2011 Hakim Benameurlaine 1

Cheque Holding Policy Disclosure (Banks) Regulations. Règlement sur la communication de la politique de retenue de chèques (banques) CONSOLIDATION

RAPID Prenez le contrôle sur vos données

Netdays Comprendre et prévenir les risques liés aux codes malicieux

INSTALLATION DE WINDOWS 2000 SERVER POUR BCDI3. par. G.Haberer, A.Peuch, P.Saadé

Garage Door Monitor Model 829LM

Les techniques de la télémaintenance

laposte.net) Ministère de l'éducation nationale Atelier sécurité Rabat RALL 2007

Etude de la pertinence et de l'intérêt des appliances WAF (IPS web) à l'inria

PUPPET. Romain Bélorgey IR3 Ingénieurs 2000

NOM ENTREPRISE. Document : Plan Qualité Spécifique du Projet / Project Specific Quality Plan

L analyse de logs. Sébastien Tricaud Groupe Resist - Toulouse 2013

CLIM/GTP/27/8 ANNEX III/ANNEXE III. Category 1 New indications/ 1 re catégorie Nouvelles indications

SERVEUR DÉDIÉ DOCUMENTATION

APPENDIX 2. Provisions to be included in the contract between the Provider and the. Holder

Bitdefender GravityZone

Instructions Mozilla Thunderbird Page 1

VTP. LAN Switching and Wireless Chapitre 4

Atelier Sécurité / OSSIR

Principales failles de sécurité des applications Web Principes, parades et bonnes pratiques de développement

Comment Accéder à des Bases de Données MySQL avec Windows lorqu'elles sont sur un Serveur Linux

iqtool - Outil e-learning innovateur pour enseigner la Gestion de Qualité au niveau BAC+2

Panorama des bonnes pratiques de reporting «corruption»

SNMP for cloud Jean Parpaillon. SNMP4cloud - 1

Ocs Inventory et GLPI s appuie sur un serveur LAMP. Je vais donc commencer par installer les paquets nécessaires.

that the child(ren) was/were in need of protection under Part III of the Child and Family Services Act, and the court made an order on

TABLE DES MATIERES A OBJET PROCEDURE DE CONNEXION

Surveillance stratégique des programmes malveillants avec Nessus, PVS et LCE

Lieberman Software Corporation

Improving the breakdown of the Central Credit Register data by category of enterprises

AUDIT COMMITTEE: TERMS OF REFERENCE

APT / Cryptolockers. Pierre Poggi WatchGuard France pierre.poggi@watchguard.com

TEST D INTRUISION. Document Technique

Internet Group Management Protocol (IGMP) Multicast Listener Discovery ( MLD ) RFC 2710 (MLD version 1) RFC 3810 (MLD version 2)

SQL Parser XML Xquery : Approche de détection des injections SQL

Exemple PLS avec SAS

Les Portfolios et Moodle Petit inventaire

Extension SSO Java. Cette note technique décrit la configuration et la mise en œuvre du filtre de custom SSO Java.

Réseau - Sécurité - Métrologie - Data Center. Le leader du marché allemand des UTM débarque en France avec des arguments forts!

Notes pour l'installation d'une version de Eprints sur une machine CentOS4.2 Stéphanie Lanthier Le jeudi 17 février 2006

titre : CENTOS_CUPS_install&config Système : CentOs 5.7 Technologie : Cups Auteur : Charles-Alban BENEZECH

Contents Windows

Une approche positive du filtrage applicatif Web. Didier «grk» Conchaudron Sébastien «blotus» Blot

If the corporation is or intends to become a registered charity as defined in the Income Tax Act, a copy of these documents must be sent to:

L installation a quelque peu changée depuis les derniers tutos, voici une actualisation.

Transcription:

Serveur Web Apache Jean-Marc Robert Génie logiciel et des TI

Popularité http://news.netcraft.com/ Jean-Marc Robert, ETS MTI 719 - Apache - A13 v1.0 2

Serveur Web Apache Installation et Configuration DISA STIG Pare-feu et Système de détection/prévention d intrusions (IDPS) ModSecurity Tests OWASP Vulnérabilites nikto2 Jean-Marc Robert, ETS MTI 719 - Apache - A13 v1.0 3

Installation et Configuration Installation Sources ou binaires? Binaires statiques ou dynamiques? Localisation des répertoires Configuration et Sécurisation Compte usager: httpd Binaires: root Configuration par défaut Allow /var/www/htdocs Deny all Scripts exécutables Exec /var/www/cgi-bin Fichiers journaux Limites Fuites d information Changer l identité du serveur Enlever tout contenu par défaut. Changer la bannière (?). Mettre le serveur Apache en jail Utiliser mod_security Jean-Marc Robert, ETS MTI 719 - Apache - A13 v1.0 4

Installation et Configuration APACHE SERVER 2.2 pour Unix Security Technical Implementation Guide de la Defense Information Systems Agency 55 recommandations HIGH: Server side includes (SSIs) must run with execution capability disabled. The Options directive configures the web server features that are available in particular directories. The IncludesNOEXEC feature controls the ability of the server to utilize SSIs while disabling the exec command, which is used to execute external scripts. If the full includes feature is used it could allow the execution of malware leading to a system compromise. http://www.stigviewer.com/stig/aa9a9e638ee181b23a293064c2b2618d3ccd8555/ Jean-Marc Robert, ETS MTI 719 - Apache - A13 v1.0 5

Installation et Configuration APACHE SERVER 2.2 pour Unix Security Technical Implementation Guide de la Defense Information Systems Agency 55 recommandations MEDIUM: The httpd.conf MaxClients directive must be set properly. These requirements are set to mitigate the effects of several types of denial of service attacks. Although there is some latitude concerning the settings themselves, the requirements attempt to provide reasonable limits for the protection of the web server. If necessary, these limits can be adjusted to accommodate the operational requirement of a given system. http://www.stigviewer.com/stig/aa9a9e638ee181b23a293064c2b2618d3ccd8555/ Jean-Marc Robert, ETS MTI 719 - Apache - A13 v1.0 6

ModSecurity Open Source Web Application Firewall ou Web Application Intrusion Prevention System Fonctionnalités Trafic HTTP journalisation complète Vie privée? Possibilité de masquer certains champs Surveillance et détection d attaques en temps réel Prévention d attaques Dynamique Statique Modèle de sécurité négatif : Pointage pour les anomalies, les comportements inhabituels et les attaques habituelles. Bloquer les connexions à pointage élevé. Modèle de sécurité positif : N accepter que les requêtes qui sont valides. Rejeter toute autre requête. Mises-à-jour virtuelles Corriger les faiblesses et les vulnérabilités connues des applications du serveur. Jean-Marc Robert, ETS MTI 719 - Apache - A13 v1.0 7

ModSecurity IDS/IPS HTTP Analyse complète du protocole Requêtes Réponses Entêtes et charges utiles Intégrer au serveur Web SSL ne représente pas une barrière Règles de filtrage Techniques anti-évasion Validation de l encodage Règles pour détecter les requêtes invalides Réactions aux requêtes invalides Jean-Marc Robert, ETS MTI 719 - Apache - A13 v1.0 8

ModSecurity OWASP ModSecurity Core Rule Set Project ModSecurity is a web application firewall engine that provides very little protection on its own. In order to become useful, ModSecurity must be configured with rules. In order to enable users to take full advantage of ModSecurity out of the box, the OWASP Defender Community has developed and maintains a free set of application protection rules called the OWASP ModSecurity Core Rule Set (CRS). Unlike intrusion detection and prevention systems, which rely on signatures specific to known vulnerabilities, the CRS provides generic protection from unknown vulnerabilities often found in web application. https://www.owasp.org/index.php/category:owasp_modsecurity_core_rule_set_project Jean-Marc Robert, ETS MTI 719 - Apache - A13 v1.0 9

ModSecurity OWASP ModSecurity Core Rule Set Project HTTP Protection - detecting violations of the HTTP protocol and a locally defined usage policy. Real-time Blacklist Lookups - utilizes 3rd Party IP Reputation Web-based Malware Detection - identifies malicious web content by check against the Google Safe Browsing API. HTTP Denial of Service Protections - defense against HTTP Flooding and Slow HTTP DoS Attacks. Common Web Attacks Protection - detecting common web application security attack. Jean-Marc Robert, ETS MTI 719 - Apache - A13 v1.0 10

ModSecurity OWASP ModSecurity Core Rule Set Project Automation Detection - Detecting bots, crawlers, scanners and other surface malicious activity. Integration with AV Scanning for File Uploads - detects malicious files uploaded through the web application. Tracking Sensitive Data - Tracks Credit Card usage and blocks leakages. Trojan Protection - Detecting access to Trojans horses. Identification of Application Defects - alerts on application misconfigurations. Error Detection and Hiding - Disguising error messages sent by the server. Jean-Marc Robert, ETS MTI 719 - Apache - A13 v1.0 11

ModSecurity Exemple de règle: Injection SQL # OR 1# # DROP sampletable;-- # admin'-- # DROP/*comment*/sampletable # DR/**/OP/*bypass blacklisting*/sampletable # SELECT/*avoid-spaces*/password/**/FROM/**/Members # SELECT /*!32302 1/0, */ 1 FROM tablename # or 1=1# # or 1=1-- - # or 1=1/* # ' or 1=1;\x00 # 1='1' or-- - # ' /*!50000or*/1='1 # ' /*!or*/1='1 # 0/**/union/*!50000select*/table_name`foo`/**/ https://github.com/spiderlabs/owasp-modsecurity-crs Jean-Marc Robert, ETS MTI 719 - Apache - A13 v1.0 12

ModSecurity Exemple de règle: Injection SQL SecRule REQUEST_COOKIES!REQUEST_COOKIES:/ utm/ REQUEST_COOKIES_NAMES ARGS_NAMES ARGS XML:/* "(/\*!? \*/ [';]-- --[\s\r\n\v \f] (?:--[^-]*?-) ([^\-&])#.*?[\s\r\n\v\f] ;?\\x00)" "phase:2,rev:'2',ver:'owasp_crs/ 2.2.8',maturity:'8',accuracy:'8',id:'981231',t:none,t:urlDecodeUni,block,msg:'SQL Comment Sequence Detected.',severity:'2',capture,logdata:'Matched Data: %{TX.0} found within % {MATCHED_VAR_NAME}: %{MATCHED_VAR}',tag:'OWASP_CRS/WEB_ATTACK/ SQL_INJECTION',tag:'WASCTC/WASC-19',tag:'OWASP_TOP_10/ A1',tag:'OWASP_AppSensor/CIE1',tag:'PCI/6.5.2',setvar:tx.anomaly_score=+% {tx.critical_anomaly_score},setvar:tx.sql_injection_score=+1,setvar:'tx.msg=% {rule.msg}',setvar:tx.%{rule.id}-owasp_crs/web_attack/sql_injection-% {matched_var_name}=%{tx.0}" https://github.com/spiderlabs/owasp-modsecurity-crs Jean-Marc Robert, ETS MTI 719 - Apache - A13 v1.0 13

Vulnérabilités OWASP Testing Guide Version 3, 2008, 349 pages. Ouf! Configuration Management Testing Authentication Testing Session Management Testing Authorization Testing Business Logic Testing Data Validation Testing Denial of Service Testing Web Services Testing Ajax Testing https://www.owasp.org/images/5/56/owasp_testing_guide_v3.pdf La version 4 est en cours de développement. https://www.owasp.org/index.php/owasp_testing_guide_v4_table_of_contents Jean-Marc Robert, ETS MTI 719 - Apache - A13 v1.0 14

Vulnérabilités nikto2 Scanneur de vulnérabilités Serveur et logiciel Mauvaises configurations Versions non mises à jour Fichiers et programmes par défaut Fichiers et programmes non-sécurisés Base de données Reconnaissance de 1250 serveurs Problèmes spécifiques sur 270 serveurs 6500 fichiers/cgis problématiques Jean-Marc Robert, ETS MTI 719 - Apache - A13 v1.0 15

Vulnérabilités nikto2 : Exemple + Server: Apache/2.2.3 (CentOS) - Allowed HTTP Methods: GET, HEAD, POST, OPTIONS, TRACE + OSVDB-877: HTTP method ('Allow' Header): 'TRACE' is typically only used for debugging and should be disabled. This message does not mean it is vulnerable to XST. + OSVDB-0: Retrieved X-Powered-By header: PHP/4.4.7 + PHP/4.4.7 appears to be outdated (current is at least 5.2.5) + Apache/2.2.3 appears to be outdated (current is at least Apache/2.2.6). Apache 1.3.39 and 2.0.61 are also current. + OSVDB-0: GET /index.php?module=my_egallery : My_eGallery prior to 3.1.1.g are vulnerable to a remote execution bug via SQL command injection. + OSVDB-0: GET /config.php : PHP Config file may contain database IDs and passwords. + OSVDB-877: TRACE / : TRACE option appears to allow XSS or credential theft. See http://www.cgisecurity.com/whitehat-mirror/whitepaper_screen.pdf for details + OSVDB-12184: GET /index.php?=phpb8b5f2a0-3c92-11d3- A3A9-4C7B08C10000 : PHP reveals potentially sensitive information via certain HTTP requests which contain specific QUERY strings. + OSVDB-3092: GET /db/ : This might be interesting... Jean-Marc Robert, ETS MTI 719 - Apache - A13 v1.0 16

Vulnérabilités nikto2 : Exemple + OSVDB-3092: GET /includes/ : This might be interesting... + OSVDB-3093: GET /index.php?base=test%20 : This might be interesting... has been seen in web logs from an unknown scanner. + OSVDB-3093: GET /index.php?idadmin=test : This might be interesting... has been seen in web logs from an unknown scanner. + OSVDB-3093: GET /index.php?pymembs=admin : This might be interesting... has been seen in web logs from an unknown scanner. + OSVDB-3093: GET /index.php?sqlquery=test%20 : This might be interesting... has been seen in web logs from an unknown scanner. + OSVDB-3093: GET /index.php?tampon=test%20 : This might be interesting... has been seen in web logs from an unknown scanner. + OSVDB-3093: GET /index.php? topic=<script>alert(document.cookie)</script>%20 : This might be interesting... has been seen in web logs from an unknown scanner. + OSVDB-3268: GET /icons/ : Directory indexing is enabled: /icons + OSVDB-3268: GET /images/ : Directory indexing is enabled: /images + OSVDB-3268: GET /docs/ : Directory indexing is enabled: /docs + OSVDB-3233: GET /icons/readme : Apache default file found. Jean-Marc Robert, ETS MTI 719 - Apache - A13 v1.0 17

Références Ivan Ristic, Apache Security, O Reilly, 2005. En ligne : Chapitre 2 Installation and Configuration http://www.apachesecurity.net/download/apachesecurity-ch02.pdf Ryan C. Barnett, Preventing Web Attacks with Apache, Addison-Wesley, 2006. Jean-Marc Robert, ETS MTI 719 - Apache - A13 v1.0 18