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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\documentclass[12pt,a4paper]{article}
|
| 2 |
+
\usepackage[utf8]{inputenc}
|
| 3 |
+
\usepackage[T1]{fontenc}
|
| 4 |
+
\usepackage[french]{babel}
|
| 5 |
+
\usepackage{geometry}
|
| 6 |
+
\usepackage{graphicx}
|
| 7 |
+
\usepackage{tcolorbox}
|
| 8 |
+
\usepackage{float}
|
| 9 |
+
\usepackage{hyperref}
|
| 10 |
+
\usepackage{fancyhdr}
|
| 11 |
+
\usepackage{titlesec}
|
| 12 |
+
\usepackage{xcolor}
|
| 13 |
+
\usepackage{enumitem}
|
| 14 |
+
\usepackage{tabularx}
|
| 15 |
+
\usepackage{booktabs}
|
| 16 |
+
\usepackage{tikz}
|
| 17 |
+
\usetikzlibrary{calc, shapes.symbols, positioning, arrows.meta}
|
| 18 |
+
\usepackage{listings}
|
| 19 |
+
|
| 20 |
+
\geometry{left=2.5cm,right=2.5cm,top=3cm,bottom=3cm}
|
| 21 |
+
|
| 22 |
+
% Couleurs professionnelles
|
| 23 |
+
\definecolor{primarycolor}{RGB}{25,55,90}
|
| 24 |
+
\definecolor{secondarycolor}{RGB}{70,130,180}
|
| 25 |
+
\definecolor{accentcolor}{RGB}{245,245,250}
|
| 26 |
+
\definecolor{textcolor}{RGB}{40,40,40}
|
| 27 |
+
\definecolor{sparkcolor}{RGB}{230,85,30}
|
| 28 |
+
\definecolor{techgradient1}{RGB}{15,45,80}
|
| 29 |
+
\definecolor{techgradient2}{RGB}{50,110,160}
|
| 30 |
+
\definecolor{codegreen}{RGB}{0,128,0}
|
| 31 |
+
\definecolor{codegray}{RGB}{128,128,128}
|
| 32 |
+
\definecolor{codeblue}{RGB}{0,0,180}
|
| 33 |
+
|
| 34 |
+
% Configuration des liens
|
| 35 |
+
\hypersetup{
|
| 36 |
+
colorlinks=true,
|
| 37 |
+
linkcolor=primarycolor,
|
| 38 |
+
citecolor=secondarycolor,
|
| 39 |
+
urlcolor=secondarycolor,
|
| 40 |
+
pdftitle={TP 4 - Attaques Brute Force - DVWA},
|
| 41 |
+
pdfauthor={Ahlam EL BECHARI}
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
% Configuration listings
|
| 45 |
+
\lstset{
|
| 46 |
+
basicstyle=\ttfamily\small,
|
| 47 |
+
backgroundcolor=\color{accentcolor},
|
| 48 |
+
frame=single,
|
| 49 |
+
rulecolor=\color{secondarycolor},
|
| 50 |
+
breaklines=true,
|
| 51 |
+
breakatwhitespace=true,
|
| 52 |
+
showstringspaces=false,
|
| 53 |
+
keywordstyle=\color{codeblue}\bfseries,
|
| 54 |
+
commentstyle=\color{codegreen},
|
| 55 |
+
stringstyle=\color{sparkcolor},
|
| 56 |
+
numbers=none,
|
| 57 |
+
xleftmargin=5mm,
|
| 58 |
+
framexleftmargin=5mm
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
% Style des titres
|
| 62 |
+
\titleformat{\section}
|
| 63 |
+
{\color{primarycolor}\normalfont\Large\bfseries}
|
| 64 |
+
{\thesection}{1em}{}
|
| 65 |
+
[\color{secondarycolor}\titlerule]
|
| 66 |
+
|
| 67 |
+
\titleformat{\subsection}
|
| 68 |
+
{\color{secondarycolor}\normalfont\large\bfseries}
|
| 69 |
+
{\thesubsection}{1em}{}
|
| 70 |
+
|
| 71 |
+
% En-tête et pied de page
|
| 72 |
+
\pagestyle{fancy}
|
| 73 |
+
\fancyhf{}
|
| 74 |
+
\fancyhead[L]{\small\color{primarycolor}Innovation et AMOA }
|
| 75 |
+
\fancyhead[R]{\small\color{primarycolor}INE 2 S2 - 2025/2026}
|
| 76 |
+
\fancyfoot[C]{\thepage}
|
| 77 |
+
\renewcommand{\headrulewidth}{0.5pt}
|
| 78 |
+
\renewcommand{\footrulewidth}{0.5pt}
|
| 79 |
+
|
| 80 |
+
% Boîtes d'information
|
| 81 |
+
\newtcolorbox{infobox}{
|
| 82 |
+
colback=accentcolor,
|
| 83 |
+
colframe=secondarycolor,
|
| 84 |
+
boxrule=1pt,
|
| 85 |
+
arc=3mm,
|
| 86 |
+
left=5mm,
|
| 87 |
+
right=5mm,
|
| 88 |
+
top=3mm,
|
| 89 |
+
bottom=3mm,
|
| 90 |
+
breakable
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
\newtcolorbox{notebox}[1]{
|
| 94 |
+
colback=white,
|
| 95 |
+
colframe=primarycolor,
|
| 96 |
+
boxrule=1.5pt,
|
| 97 |
+
arc=2mm,
|
| 98 |
+
title={\textbf{#1}},
|
| 99 |
+
fonttitle=\color{white}\bfseries,
|
| 100 |
+
coltitle=white,
|
| 101 |
+
colbacktitle=primarycolor,
|
| 102 |
+
left=4mm,
|
| 103 |
+
right=4mm,
|
| 104 |
+
top=2mm,
|
| 105 |
+
bottom=2mm,
|
| 106 |
+
breakable
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
\newtcolorbox{keyconceptbox}{
|
| 110 |
+
colback=yellow!10,
|
| 111 |
+
colframe=sparkcolor,
|
| 112 |
+
boxrule=2pt,
|
| 113 |
+
arc=2mm,
|
| 114 |
+
left=4mm,
|
| 115 |
+
right=4mm,
|
| 116 |
+
top=3mm,
|
| 117 |
+
bottom=3mm,
|
| 118 |
+
breakable
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
% Page de garde personnalisée
|
| 122 |
+
\renewcommand{\maketitle}{%
|
| 123 |
+
\begin{titlepage}
|
| 124 |
+
\begin{tikzpicture}[remember picture, overlay]
|
| 125 |
+
% Arrière-plan avec gradient
|
| 126 |
+
\fill[primarycolor] (current page.south west) rectangle (current page.north east);
|
| 127 |
+
\fill[techgradient1] ([xshift=2cm]current page.south west) rectangle ([xshift=8cm,yshift=10cm]current page.south west);
|
| 128 |
+
\fill[techgradient2] ([xshift=4cm,yshift=5cm]current page.south west) rectangle ([xshift=12cm,yshift=15cm]current page.south west);
|
| 129 |
+
|
| 130 |
+
% Cercles décoratifs
|
| 131 |
+
\foreach \i in {1,...,20} {
|
| 132 |
+
\fill[white, opacity=0.05]
|
| 133 |
+
(rand*20, rand*20) circle (0.5+rand*1.5);
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
% Lignes de circuit
|
| 137 |
+
\foreach \i in {1,...,10} {
|
| 138 |
+
\draw[white, opacity=0.1, line width=0.5pt]
|
| 139 |
+
(rand*20, rand*20) -- ++(rand*3, rand*3);
|
| 140 |
+
}
|
| 141 |
+
\end{tikzpicture}
|
| 142 |
+
|
| 143 |
+
\vspace*{1cm}
|
| 144 |
+
|
| 145 |
+
\begin{center}
|
| 146 |
+
|
| 147 |
+
|
| 148 |
+
\vspace{1.5cm}
|
| 149 |
+
|
| 150 |
+
% Titre principal
|
| 151 |
+
{\fontsize{24}{28}\selectfont\bfseries\color{white}
|
| 152 |
+
TP 4 - Attaques Brute Force
|
| 153 |
+
\\
|
| 154 |
+
}
|
| 155 |
+
{\fontsize{18}{28}\selectfont\bfseries\color{white}
|
| 156 |
+
\emph{}
|
| 157 |
+
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
\vspace{0.8cm}
|
| 161 |
+
|
| 162 |
+
% Sous-titre
|
| 163 |
+
{\fontsize{16}{20}\selectfont\color{white!90}
|
| 164 |
+
SECURE WEB AND MOBILE APPLICATION\\[0.2cm]
|
| 165 |
+
\emph{Innovation et AMOA - INE 2}
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
+
\vspace{2cm}
|
| 169 |
+
|
| 170 |
+
% Cadre pour les auteurs
|
| 171 |
+
\begin{tcolorbox}[
|
| 172 |
+
enhanced,
|
| 173 |
+
colback=white,
|
| 174 |
+
colframe=white,
|
| 175 |
+
arc=5pt,
|
| 176 |
+
boxrule=0.5pt,
|
| 177 |
+
shadow={2pt}{-2pt}{0pt}{gray!30},
|
| 178 |
+
width=0.8\textwidth,
|
| 179 |
+
center
|
| 180 |
+
]
|
| 181 |
+
\centering
|
| 182 |
+
{\fontsize{14}{18}\selectfont\bfseries\color{primarycolor}
|
| 183 |
+
RÉALISÉ PAR}\\[0.5cm]
|
| 184 |
+
|
| 185 |
+
{\fontsize{16}{20}\selectfont\color{textcolor}
|
| 186 |
+
Ahlam \textsc{EL BECHARI}
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
\vspace{1cm}
|
| 190 |
+
|
| 191 |
+
{\fontsize{12}{14}\selectfont\bfseries\color{primarycolor}
|
| 192 |
+
ENCADRÉ PAR}\\[0.3cm]
|
| 193 |
+
|
| 194 |
+
{\fontsize{14}{16}\selectfont\color{textcolor}
|
| 195 |
+
Mr. ABDELAHAY \textsc{HAQIQ}
|
| 196 |
+
}
|
| 197 |
+
\end{tcolorbox}
|
| 198 |
+
|
| 199 |
+
\vspace{5cm}
|
| 200 |
+
|
| 201 |
+
% Date et informations
|
| 202 |
+
\begin{tikzpicture}
|
| 203 |
+
\draw[white, line width=1.5pt] (-4,0) -- (4,0);
|
| 204 |
+
\end{tikzpicture}
|
| 205 |
+
|
| 206 |
+
\vspace{0.5cm}
|
| 207 |
+
|
| 208 |
+
{\fontsize{14}{16}\selectfont\color{white}
|
| 209 |
+
Année Universitaire 2025/2026\\[0.2cm]
|
| 210 |
+
\emph{Institut National des Postes et Télécommunications}
|
| 211 |
+
}
|
| 212 |
+
|
| 213 |
+
\vfill
|
| 214 |
+
|
| 215 |
+
% Pied de page décoratif
|
| 216 |
+
\begin{tikzpicture}
|
| 217 |
+
\fill[white, opacity=0.2] (0,0) rectangle (8,0.2);
|
| 218 |
+
\fill[sparkcolor, opacity=0.8] (3.5,0) rectangle (4.5,0.2);
|
| 219 |
+
\node[anchor=center, white] at (4,0.1) {\small\textbf{DVWA}};
|
| 220 |
+
\end{tikzpicture}
|
| 221 |
+
\end{center}
|
| 222 |
+
\end{titlepage}
|
| 223 |
+
}
|
| 224 |
+
|
| 225 |
+
% Pour éviter que le maketitle ne crée une page blanche supplémentaire
|
| 226 |
+
\let\oldmaketitle\maketitle
|
| 227 |
+
\renewcommand{\maketitle}{\oldmaketitle\thispagestyle{empty}}
|
| 228 |
+
|
| 229 |
+
\begin{document}
|
| 230 |
+
|
| 231 |
+
\maketitle
|
| 232 |
+
|
| 233 |
+
\newpage
|
| 234 |
+
\tableofcontents
|
| 235 |
+
|
| 236 |
+
\newpage
|
| 237 |
+
\section{Introduction}
|
| 238 |
+
|
| 239 |
+
La sécurité des applications web constitue un enjeu majeur dans le domaine des technologies de l'information. Face à la multiplication des services en ligne et à l'augmentation des cyberattaques, la protection des mécanismes d'authentification est devenue une préoccupation centrale pour les développeurs, les administrateurs système et les professionnels de la cybersécurité.
|
| 240 |
+
|
| 241 |
+
Les formulaires de connexion représentent la première ligne de défense d'une application web. Ils constituent la porte d'entrée vers les données sensibles des utilisateurs et les fonctionnalités critiques du système. Toutefois, ces mécanismes d'authentification peuvent présenter des vulnérabilités exploitables par des attaquants, notamment via les \textbf{attaques par force brute} (\textit{brute force attacks}).
|
| 242 |
+
|
| 243 |
+
Ce travail pratique s'inscrit dans le cadre du module \textit{Secure Web and Mobile Application} et a pour objectif de comprendre en profondeur les techniques d'attaque par force brute appliquées aux formulaires d'authentification web. À travers l'utilisation de la plateforme \textbf{DVWA} (Damn Vulnerable Web Application) et de l'outil \textbf{Burp Suite}, nous allons :
|
| 244 |
+
|
| 245 |
+
\begin{itemize}[leftmargin=*]
|
| 246 |
+
\item Analyser le fonctionnement des formulaires d'authentification vulnérables ;
|
| 247 |
+
\item Mener des attaques par dictionnaire en utilisant différents modes de Burp Suite Intruder ;
|
| 248 |
+
\item Contourner les protections partielles mises en place aux niveaux Medium et High ;
|
| 249 |
+
\item Étudier les empreintes réseau des attaques et les techniques de détection ;
|
| 250 |
+
\item Proposer des contre-mesures robustes pour sécuriser l'authentification.
|
| 251 |
+
\end{itemize}
|
| 252 |
+
|
| 253 |
+
L'importance de ce type de test réside dans sa capacité à révéler les faiblesses concrètes des systèmes d'authentification. En effet, malgré les recommandations de sécurité largement diffusées, de nombreuses applications restent vulnérables à ces attaques en raison de l'absence de mécanismes de protection tels que le verrouillage de compte, le CAPTCHA ou l'authentification multifacteur.
|
| 254 |
+
|
| 255 |
+
\newpage
|
| 256 |
+
\section{Définition de l'attaque Brute Force}
|
| 257 |
+
|
| 258 |
+
\subsection{Définition}
|
| 259 |
+
|
| 260 |
+
Une \textbf{attaque par force brute} est une méthode cryptanalytique qui consiste à essayer systématiquement toutes les combinaisons possibles jusqu'à trouver la bonne. Appliquée à l'authentification web, cette technique vise à deviner les identifiants d'accès (nom d'utilisateur et/ou mot de passe) d'un utilisateur en testant un grand nombre de combinaisons de manière automatisée.
|
| 261 |
+
|
| 262 |
+
Le terme \og brute force \fg{} englobe en réalité un ensemble de techniques qui diffèrent par leur approche et leur niveau de sophistication, allant de l'essai exhaustif pur à des méthodes plus ciblées et optimisées.
|
| 263 |
+
|
| 264 |
+
\subsection{Types d'attaques par force brute}
|
| 265 |
+
|
| 266 |
+
\begin{table}[H]
|
| 267 |
+
\centering
|
| 268 |
+
\begin{tabularx}{\textwidth}{l X}
|
| 269 |
+
\toprule
|
| 270 |
+
\textbf{Type d'attaque} & \textbf{Description et exemple} \\
|
| 271 |
+
\midrule
|
| 272 |
+
\textbf{Brute Force pure} & Essai exhaustif de toutes les combinaisons possibles. Exemple : \texttt{aaa}, \texttt{aab}, \texttt{aac}, etc. \\
|
| 273 |
+
\addlinespace
|
| 274 |
+
\textbf{Attaque par dictionnaire} & Utilise une liste prédéfinie de mots de passe courants. Exemple : \texttt{rockyou.txt}, \texttt{SecLists}. \\
|
| 275 |
+
\addlinespace
|
| 276 |
+
\textbf{Attaque hybride} & Combine dictionnaire et règles de transformation. Exemple : \texttt{Password1!}. \\
|
| 277 |
+
\addlinespace
|
| 278 |
+
\textbf{Credential Stuffing} & Réutilisation de couples login/mot de passe issus de fuites de données. \\
|
| 279 |
+
\addlinespace
|
| 280 |
+
\textbf{Password Spraying} & Un mot de passe commun testé contre de nombreux comptes. \\
|
| 281 |
+
\addlinespace
|
| 282 |
+
\textbf{Rainbow Table} & Tables précalculées de hachages pour retrouver un mot de passe. \\
|
| 283 |
+
\addlinespace
|
| 284 |
+
\textbf{Reverse Brute Force} & Un mot de passe fixe testé contre plusieurs noms d'utilisateur. \\
|
| 285 |
+
\bottomrule
|
| 286 |
+
\end{tabularx}
|
| 287 |
+
\caption{Taxonomie des attaques par force brute}
|
| 288 |
+
\end{table}
|
| 289 |
+
|
| 290 |
+
\subsection{Pourquoi ces attaques fonctionnent encore aujourd'hui}
|
| 291 |
+
|
| 292 |
+
Malgré les avancées en cybersécurité, les attaques par force brute restent efficaces pour plusieurs raisons :
|
| 293 |
+
|
| 294 |
+
\begin{itemize}[leftmargin=*]
|
| 295 |
+
\item \textbf{Mots de passe faibles} : des mots de passe comme \texttt{password}, \texttt{123456} ou \texttt{admin} figurent encore dans le top 10 mondial ;
|
| 296 |
+
\item \textbf{Absence de verrouillage de compte} (\textit{account lockout}) sur de nombreuses applications ;
|
| 297 |
+
\item \textbf{Listes de mots enrichies} : la wordlist \texttt{rockyou.txt} contient plus de 14 millions de mots de passe réels ;
|
| 298 |
+
\item \textbf{Puissance de calcul croissante} : les GPU modernes testent des milliards de hachages par seconde ;
|
| 299 |
+
\item \textbf{Réutilisation des mots de passe} : environ 65\% des utilisateurs réutilisent le même mot de passe ;
|
| 300 |
+
\item \textbf{Credential stuffing} : des milliards de couples identifiants/mots de passe circulent sur le darkweb.
|
| 301 |
+
\end{itemize}
|
| 302 |
+
|
| 303 |
+
\newpage
|
| 304 |
+
\section{Méthodologie}
|
| 305 |
+
|
| 306 |
+
\subsection{Environnement utilisé}
|
| 307 |
+
|
| 308 |
+
\begin{notebox}{Environnement technique}
|
| 309 |
+
\begin{itemize}[leftmargin=*]
|
| 310 |
+
\item \textbf{DVWA} (Damn Vulnerable Web Application) : application web volontairement vulnérable, déployée localement via XAMPP ;
|
| 311 |
+
\item \textbf{Burp Suite Community Edition} : proxy d'interception et outil de test de sécurité web ;
|
| 312 |
+
\item \textbf{Python 3} : langage de script pour le contournement du token CSRF au niveau High ;
|
| 313 |
+
\item \textbf{Navigateur web} (Firefox/Chrome) : configuré pour router le trafic via le proxy Burp Suite ;
|
| 314 |
+
\item \textbf{Wordlists} : listes de mots de passe issues de \texttt{SecLists} et \texttt{rockyou.txt}.
|
| 315 |
+
\end{itemize}
|
| 316 |
+
\end{notebox}
|
| 317 |
+
|
| 318 |
+
\subsection{Objectif global du TP}
|
| 319 |
+
|
| 320 |
+
L'objectif principal est de comprendre et démontrer les différentes phases d'une attaque par force brute sur un formulaire d'authentification, depuis la reconnaissance jusqu'à l'exploitation et la mise en place de contre-mesures.
|
| 321 |
+
|
| 322 |
+
\subsection{Démarche adoptée}
|
| 323 |
+
|
| 324 |
+
\begin{enumerate}[leftmargin=*]
|
| 325 |
+
\item \textbf{Reconnaissance et analyse} : cartographie du module, capture et analyse des requêtes HTTP, étude du code source vulnérable ;
|
| 326 |
+
\item \textbf{Exploitation avec Burp Suite Intruder} : attaques en modes Sniper, Cluster Bomb et Pitchfork ;
|
| 327 |
+
\item \textbf{Contournement des protections partielles} : bypass du délai (Medium) et du token CSRF (High) ;
|
| 328 |
+
\item \textbf{Détection et contre-mesures} : analyse de l'empreinte réseau et implémentation de protections.
|
| 329 |
+
\end{enumerate}
|
| 330 |
+
|
| 331 |
+
\newpage
|
| 332 |
+
\section{Partie 1 : Reconnaissance et cartographie de la cible}
|
| 333 |
+
|
| 334 |
+
\subsection{Introduction de la partie}
|
| 335 |
+
|
| 336 |
+
La première étape de tout test de pénétration consiste à effectuer une phase de \textbf{reconnaissance}. L'objectif est d'analyser le module Brute Force de DVWA en niveau \textit{Low} afin de collecter toutes les informations nécessaires à la configuration d'une attaque automatisée efficace.
|
| 337 |
+
|
| 338 |
+
\subsection{Étapes réalisées}
|
| 339 |
+
|
| 340 |
+
\subsubsection{Accès au module Brute Force et configuration initiale}
|
| 341 |
+
|
| 342 |
+
\begin{figure}[H]
|
| 343 |
+
\centering
|
| 344 |
+
\includegraphics[width=0.85\textwidth]{images/1.png}
|
| 345 |
+
\caption{Accès au module Brute Force de DVWA --- formulaire de connexion}
|
| 346 |
+
\end{figure}
|
| 347 |
+
|
| 348 |
+
\noindent L'image ci-dessus montre l'interface du module Brute Force de DVWA. On observe le formulaire d'authentification avec les champs \texttt{Username} et \texttt{Password}. Le niveau de sécurité est réglé sur \textit{Low}, ce qui signifie qu'aucune protection contre le brute force n'est implémentée.
|
| 349 |
+
|
| 350 |
+
\begin{figure}[H]
|
| 351 |
+
\centering
|
| 352 |
+
\includegraphics[width=0.85\textwidth]{images/2.png}
|
| 353 |
+
\caption{Vérification du niveau de sécurité DVWA sur Low}
|
| 354 |
+
\end{figure}
|
| 355 |
+
|
| 356 |
+
\noindent Cette capture confirme que le niveau de sécurité de DVWA est bien positionné sur \textit{Low}. Cette configuration permet de mener l'attaque sans aucune protection.
|
| 357 |
+
|
| 358 |
+
\subsubsection{Configuration de Burp Suite et interception du trafic}
|
| 359 |
+
|
| 360 |
+
\begin{figure}[H]
|
| 361 |
+
\centering
|
| 362 |
+
\includegraphics[width=0.85\textwidth]{images/3.png}
|
| 363 |
+
\caption{Configuration de Burp Suite --- interface proxy et interception}
|
| 364 |
+
\end{figure}
|
| 365 |
+
|
| 366 |
+
\noindent Cette capture montre l'interface de Burp Suite avec le module \textit{Proxy} activé. L'interception est en mode \textit{ON}, ce qui signifie que chaque requête HTTP envoyée par le navigateur sera capturée et affichée dans Burp avant d'��tre transmise au serveur.
|
| 367 |
+
|
| 368 |
+
\subsubsection{Capture et analyse de la requête d'authentification}
|
| 369 |
+
|
| 370 |
+
\begin{figure}[H]
|
| 371 |
+
\centering
|
| 372 |
+
\includegraphics[width=0.85\textwidth]{images/4.png}
|
| 373 |
+
\caption{Requête GET interceptée par Burp Suite --- paramètres d'authentification}
|
| 374 |
+
\end{figure}
|
| 375 |
+
|
| 376 |
+
\noindent L'image montre la requête HTTP interceptée. On identifie :
|
| 377 |
+
\begin{itemize}
|
| 378 |
+
\item \textbf{Méthode HTTP} : \texttt{GET} --- les paramètres sont dans l'URL ;
|
| 379 |
+
\item \textbf{Paramètres} : \texttt{username=admin}, \texttt{password=wrongpassword}, \texttt{Login=Login} ;
|
| 380 |
+
\item \textbf{Cookie} : \texttt{PHPSESSID} --- session active obligatoire ;
|
| 381 |
+
\item \textbf{Host} : \texttt{localhost}.
|
| 382 |
+
\end{itemize}
|
| 383 |
+
|
| 384 |
+
\begin{figure}[H]
|
| 385 |
+
\centering
|
| 386 |
+
\includegraphics[width=0.85\textwidth]{images/5.png}
|
| 387 |
+
\caption{Détails des paramètres de la requête dans Burp Suite}
|
| 388 |
+
\end{figure}
|
| 389 |
+
|
| 390 |
+
\noindent Cette vue détaillée montre les paramètres de la requête dans l'onglet \textit{Params} de Burp Suite.
|
| 391 |
+
|
| 392 |
+
\subsubsection{Identification des indicateurs de succès et d'échec}
|
| 393 |
+
|
| 394 |
+
\begin{figure}[H]
|
| 395 |
+
\centering
|
| 396 |
+
\includegraphics[width=0.85\textwidth]{images/6.png}
|
| 397 |
+
\caption{Réponse en cas d'échec d'authentification --- message d'erreur}
|
| 398 |
+
\end{figure}
|
| 399 |
+
|
| 400 |
+
\noindent En cas d'échec, l'application retourne : \og \texttt{Username and/or password incorrect.} \fg{}. La réponse a un Content-Length d'environ 4290 octets.
|
| 401 |
+
|
| 402 |
+
\begin{figure}[H]
|
| 403 |
+
\centering
|
| 404 |
+
\includegraphics[width=0.85\textwidth]{images/7.png}
|
| 405 |
+
\caption{Réponse en cas de succès d'authentification --- message de bienvenue}
|
| 406 |
+
\end{figure}
|
| 407 |
+
|
| 408 |
+
\noindent En cas de succès, la réponse contient \og \texttt{Welcome to the password protected area, admin} \fg{} avec un Content-Length d'environ 4490 octets. Critères de détection :
|
| 409 |
+
\begin{itemize}
|
| 410 |
+
\item \textbf{Option A} : Grep Match sur \texttt{Welcome} ;
|
| 411 |
+
\item \textbf{Option B} : différence de taille de réponse ;
|
| 412 |
+
\item \textbf{Option C} : absence du mot \texttt{incorrect}.
|
| 413 |
+
\end{itemize}
|
| 414 |
+
|
| 415 |
+
\begin{figure}[H]
|
| 416 |
+
\centering
|
| 417 |
+
\includegraphics[width=0.85\textwidth]{images/8.png}
|
| 418 |
+
\caption{Comparaison côte à côte des réponses succès vs échec dans Burp Suite}
|
| 419 |
+
\end{figure}
|
| 420 |
+
|
| 421 |
+
\noindent La fonctionnalité \textit{Comparer} de Burp Suite met en évidence les différences textuelles entre les deux types de réponses.
|
| 422 |
+
|
| 423 |
+
\subsubsection{Navigation dans l'historique HTTP et envoi à Intruder}
|
| 424 |
+
|
| 425 |
+
\begin{figure}[H]
|
| 426 |
+
\centering
|
| 427 |
+
\includegraphics[width=0.85\textwidth]{images/9.png}
|
| 428 |
+
\caption{Historique HTTP dans Burp Suite --- liste des requêtes capturées}
|
| 429 |
+
\end{figure}
|
| 430 |
+
|
| 431 |
+
\noindent L'historique HTTP montre toutes les requêtes interceptées. Un clic droit puis \og \textit{Send to Intruder} \fg{} (ou \texttt{Ctrl+I}) prépare la phase d'attaque.
|
| 432 |
+
|
| 433 |
+
\subsubsection{Analyse du code source PHP vulnérable}
|
| 434 |
+
|
| 435 |
+
\begin{figure}[H]
|
| 436 |
+
\centering
|
| 437 |
+
\includegraphics[width=0.85\textwidth]{images/10.png}
|
| 438 |
+
\caption{Code source PHP du module Brute Force --- niveau Low}
|
| 439 |
+
\end{figure}
|
| 440 |
+
|
| 441 |
+
\noindent Le code source révèle : aucune limite de tentatives, aucun délai, aucun CAPTCHA, méthode GET, et vulnérabilité à l'injection SQL.
|
| 442 |
+
|
| 443 |
+
\begin{figure}[H]
|
| 444 |
+
\centering
|
| 445 |
+
\includegraphics[width=0.85\textwidth]{images/11.png}
|
| 446 |
+
\caption{Analyse détaillée des vulnérabilités identifiées dans le code source}
|
| 447 |
+
\end{figure}
|
| 448 |
+
|
| 449 |
+
\noindent Cette capture complète l'analyse en montrant la récupération directe des paramètres \texttt{\$\_GET}, le hachage MD5 obsolète, et la requête SQL par concaténation.
|
| 450 |
+
|
| 451 |
+
\subsection{Analyse}
|
| 452 |
+
|
| 453 |
+
\begin{table}[H]
|
| 454 |
+
\centering
|
| 455 |
+
\begin{tabularx}{\textwidth}{l X}
|
| 456 |
+
\toprule
|
| 457 |
+
\textbf{Élément} & \textbf{Valeur identifiée} \\
|
| 458 |
+
\midrule
|
| 459 |
+
Méthode HTTP & \texttt{GET} \\
|
| 460 |
+
Paramètres cibles & \texttt{username}, \texttt{password} \\
|
| 461 |
+
Paramètre statique & \texttt{Login=Login} \\
|
| 462 |
+
Cookie requis & \texttt{PHPSESSID} (session active) \\
|
| 463 |
+
Indicateur de succès & \texttt{Welcome to the password protected area} \\
|
| 464 |
+
Indicateur d'échec & \texttt{Username and/or password incorrect.} \\
|
| 465 |
+
Taille réponse succès & $\sim$4490 octets \\
|
| 466 |
+
Taille réponse échec & $\sim$4290 octets \\
|
| 467 |
+
\bottomrule
|
| 468 |
+
\end{tabularx}
|
| 469 |
+
\caption{Résumé de la reconnaissance}
|
| 470 |
+
\end{table}
|
| 471 |
+
|
| 472 |
+
\subsection{Problèmes rencontrés}
|
| 473 |
+
|
| 474 |
+
La principale difficulté réside dans la configuration initiale de Burp Suite comme proxy et la gestion des certificats SSL.
|
| 475 |
+
|
| 476 |
+
\subsection{Solutions apportées}
|
| 477 |
+
|
| 478 |
+
Configuration du navigateur sur \texttt{127.0.0.1:8080}, installation du certificat Burp, et vérification régulière du cookie \texttt{PHPSESSID}.
|
| 479 |
+
|
| 480 |
+
\newpage
|
| 481 |
+
\section{Partie 2 : Attaque par dictionnaire avec Burp Suite Intruder}
|
| 482 |
+
|
| 483 |
+
\subsection{Introduction de la partie}
|
| 484 |
+
|
| 485 |
+
L'objectif est de retrouver les mots de passe des comptes DVWA en utilisant trois modes d'attaque : \textbf{Sniper}, \textbf{Cluster Bomb} et \textbf{Pitchfork}.
|
| 486 |
+
|
| 487 |
+
\subsection{Étapes réalisées}
|
| 488 |
+
|
| 489 |
+
\subsubsection{Envoi de la requête à Intruder}
|
| 490 |
+
|
| 491 |
+
\begin{figure}[H]
|
| 492 |
+
\centering
|
| 493 |
+
\includegraphics[width=0.85\textwidth]{images/12.png}
|
| 494 |
+
\caption{Envoi de la requête capturée vers Burp Suite Intruder}
|
| 495 |
+
\end{figure}
|
| 496 |
+
|
| 497 |
+
\noindent Depuis l'onglet \textit{HTTP History}, un clic droit sur la requête cible permet de sélectionner \og \textit{Send to Intruder} \fg{}.
|
| 498 |
+
|
| 499 |
+
\subsubsection{Attaque Sniper --- Mot de passe d'un utilisateur connu}
|
| 500 |
+
|
| 501 |
+
\begin{figure}[H]
|
| 502 |
+
\centering
|
| 503 |
+
\includegraphics[width=0.85\textwidth]{images/16.png}
|
| 504 |
+
\caption{Configuration du mode Sniper --- position d'injection sur password}
|
| 505 |
+
\end{figure}
|
| 506 |
+
|
| 507 |
+
\noindent Dans l'onglet \textit{Positions}, le type d'attaque est réglé sur \textbf{Sniper}. Après avoir cliqué sur \og \textit{Clear \S{}} \fg{}, on sélectionne la valeur du paramètre \texttt{password} et on clique sur \og \textit{Add \S{}} \fg{}. La requête résultante montre : \texttt{username=admin\&password=\S{}wrongpassword\S{}\&Login=Login}.
|
| 508 |
+
|
| 509 |
+
\begin{figure}[H]
|
| 510 |
+
\centering
|
| 511 |
+
\includegraphics[width=0.85\textwidth]{images/17.png}
|
| 512 |
+
\caption{Configuration des payloads --- chargement de la wordlist}
|
| 513 |
+
\end{figure}
|
| 514 |
+
|
| 515 |
+
\noindent Dans l'onglet \textit{Payloads}, la wordlist est chargée via \og \textit{Load...} \fg{} avec les mots de passe courants.
|
| 516 |
+
|
| 517 |
+
\begin{figure}[H]
|
| 518 |
+
\centering
|
| 519 |
+
\includegraphics[width=0.85\textwidth]{images/18.png}
|
| 520 |
+
\caption{Configuration du Grep Match --- détection automatique du succès}
|
| 521 |
+
\end{figure}
|
| 522 |
+
|
| 523 |
+
\noindent La section \textit{Grep - Match} est configurée avec \texttt{Welcome to the password protected area}.
|
| 524 |
+
|
| 525 |
+
\begin{figure}[H]
|
| 526 |
+
\centering
|
| 527 |
+
\includegraphics[width=0.85\textwidth]{images/19.png}
|
| 528 |
+
\caption{Résultats de l'attaque Sniper --- identification du mot de passe valide}
|
| 529 |
+
\end{figure}
|
| 530 |
+
|
| 531 |
+
\noindent La ligne correspondant à \texttt{password} présente une taille de réponse différente et la colonne \textit{Welcome} cochée. Le mot de passe du compte \texttt{admin} est \texttt{password}.
|
| 532 |
+
|
| 533 |
+
\begin{figure}[H]
|
| 534 |
+
\centering
|
| 535 |
+
\includegraphics[width=0.85\textwidth]{images/20.png}
|
| 536 |
+
\caption{Tri des résultats par taille de réponse (Length)}
|
| 537 |
+
\end{figure}
|
| 538 |
+
|
| 539 |
+
\noindent Le tri par \textit{Length} permet d'identifier rapidement les succès.
|
| 540 |
+
|
| 541 |
+
\begin{figure}[H]
|
| 542 |
+
\centering
|
| 543 |
+
\includegraphics[width=0.85\textwidth]{images/21.png}
|
| 544 |
+
\caption{Détail de la réponse de succès --- message Welcome confirmé}
|
| 545 |
+
\end{figure}
|
| 546 |
+
|
| 547 |
+
\noindent Le message \texttt{Welcome to the password protected area, admin} confirme le résultat.
|
| 548 |
+
|
| 549 |
+
\subsubsection{Attaque Cluster Bomb --- Énumération multi-comptes}
|
| 550 |
+
|
| 551 |
+
\begin{figure}[H]
|
| 552 |
+
\centering
|
| 553 |
+
\includegraphics[width=0.85\textwidth]{images/22.png}
|
| 554 |
+
\caption{Configuration du mode Cluster Bomb --- positions sur username et password}
|
| 555 |
+
\end{figure}
|
| 556 |
+
|
| 557 |
+
\noindent Deux positions d'injection sont définies : \texttt{username=\S{}admin\S{}\&password=\S{}wrongpassword\S{}\&Login=Login}.
|
| 558 |
+
|
| 559 |
+
\begin{figure}[H]
|
| 560 |
+
\centering
|
| 561 |
+
\includegraphics[width=0.85\textwidth]{images/23.png}
|
| 562 |
+
\caption{Configuration du Payload Set 1 --- liste des noms d'utilisateur}
|
| 563 |
+
\end{figure}
|
| 564 |
+
|
| 565 |
+
\noindent Le \textit{Payload set 1} contient les noms d'utilisateur DVWA.
|
| 566 |
+
|
| 567 |
+
\begin{figure}[H]
|
| 568 |
+
\centering
|
| 569 |
+
\includegraphics[width=0.85\textwidth]{images/24.png}
|
| 570 |
+
\caption{Configuration du Payload Set 2 --- liste des mots de passe}
|
| 571 |
+
\end{figure}
|
| 572 |
+
|
| 573 |
+
\noindent Le \textit{Payload set 2} contient les mots de passe candidats. Total : 7 $\times$ 15 = 105 requêtes.
|
| 574 |
+
|
| 575 |
+
\begin{figure}[H]
|
| 576 |
+
\centering
|
| 577 |
+
\includegraphics[width=0.85\textwidth]{images/25.png}
|
| 578 |
+
\caption{Résultats de l'attaque Cluster Bomb --- tous les comptes valides identifiés}
|
| 579 |
+
\end{figure}
|
| 580 |
+
|
| 581 |
+
\noindent Les cinq comptes DVWA sont retrouvés : \texttt{admin/password}, \texttt{gordonb/abc123}, \texttt{1337/charley}, \texttt{pablo/letmein} et \texttt{smithy/password}.
|
| 582 |
+
|
| 583 |
+
\subsubsection{Attaque Pitchfork --- Credential Stuffing}
|
| 584 |
+
|
| 585 |
+
\begin{figure}[H]
|
| 586 |
+
\centering
|
| 587 |
+
\includegraphics[width=0.85\textwidth]{images/28.png}
|
| 588 |
+
\caption{Configuration du mode Pitchfork --- listes parallèles}
|
| 589 |
+
\end{figure}
|
| 590 |
+
|
| 591 |
+
\noindent Le mode Pitchfork teste les listes ligne par ligne : requête 1 = \texttt{admin/password}, requête 2 = \texttt{gordonb/abc123}, etc.
|
| 592 |
+
|
| 593 |
+
\begin{figure}[H]
|
| 594 |
+
\centering
|
| 595 |
+
\includegraphics[width=0.85\textwidth]{images/29.png}
|
| 596 |
+
\caption{Payload Set 1 du mode Pitchfork --- noms d'utilisateur}
|
| 597 |
+
\end{figure}
|
| 598 |
+
|
| 599 |
+
\noindent Les noms d'utilisateur issus de la fuite simulée.
|
| 600 |
+
|
| 601 |
+
\begin{figure}[H]
|
| 602 |
+
\centering
|
| 603 |
+
\includegraphics[width=0.85\textwidth]{images/30.png}
|
| 604 |
+
\caption{Payload Set 2 du mode Pitchfork --- mots de passe associés}
|
| 605 |
+
\end{figure}
|
| 606 |
+
|
| 607 |
+
\noindent Les mots de passe associés dans l'ordre correspondant.
|
| 608 |
+
|
| 609 |
+
\begin{figure}[H]
|
| 610 |
+
\centering
|
| 611 |
+
\includegraphics[width=0.85\textwidth]{images/31.png}
|
| 612 |
+
\caption{Résultats de l'attaque Pitchfork --- validation des couples}
|
| 613 |
+
\end{figure}
|
| 614 |
+
|
| 615 |
+
\noindent Les 5 couples sont validés en seulement 5 requêtes, contre 105 pour le Cluster Bomb.
|
| 616 |
+
|
| 617 |
+
\subsection{Analyse}
|
| 618 |
+
|
| 619 |
+
\begin{keyconceptbox}
|
| 620 |
+
\textbf{Comparaison des modes d'attaque Intruder}
|
| 621 |
+
|
| 622 |
+
\begin{tabularx}{\textwidth}{l c c X}
|
| 623 |
+
\toprule
|
| 624 |
+
\textbf{Mode} & \textbf{Requêtes} & \textbf{Efficacité} & \textbf{Cas d'usage} \\
|
| 625 |
+
\midrule
|
| 626 |
+
Sniper & $n$ & Élevée & Username connu \\
|
| 627 |
+
Cluster Bomb & $n_1 \times n_2$ & Exhaustive & Aucune info préalable \\
|
| 628 |
+
Pitchfork & $\max(n_1, n_2)$ & Maximale & Credential stuffing \\
|
| 629 |
+
\bottomrule
|
| 630 |
+
\end{tabularx}
|
| 631 |
+
\end{keyconceptbox}
|
| 632 |
+
|
| 633 |
+
\subsection{Problèmes rencontrés}
|
| 634 |
+
|
| 635 |
+
\begin{itemize}[leftmargin=*]
|
| 636 |
+
\item Limitation de Burp Community ($\sim$1 req/s) ;
|
| 637 |
+
\item Session DVWA pouvant expirer durant les attaques longues ;
|
| 638 |
+
\item Encodage des caractères spéciaux dans les payloads.
|
| 639 |
+
\end{itemize}
|
| 640 |
+
|
| 641 |
+
\subsection{Solutions apportées}
|
| 642 |
+
|
| 643 |
+
Utilisation de wordlists réduites, renouvellement de la session avant chaque attaque, et activation de l'option \textit{URL-encode these characters}.
|
| 644 |
+
|
| 645 |
+
\newpage
|
| 646 |
+
\section{Partie 3 : Contournement des protections partielles (Medium \& High)}
|
| 647 |
+
|
| 648 |
+
\subsection{Introduction de la partie}
|
| 649 |
+
|
| 650 |
+
Le niveau Medium implémente un délai de 2 secondes après chaque échec. Le niveau High ajoute un token anti-CSRF rendant chaque requête unique.
|
| 651 |
+
|
| 652 |
+
\subsection{Étapes réalisées}
|
| 653 |
+
|
| 654 |
+
\subsubsection{Niveau Medium --- Analyse et contournement du délai}
|
| 655 |
+
|
| 656 |
+
\begin{figure}[H]
|
| 657 |
+
\centering
|
| 658 |
+
\includegraphics[width=0.85\textwidth]{images/32.png}
|
| 659 |
+
\caption{Passage au niveau de sécurité Medium dans DVWA}
|
| 660 |
+
\end{figure}
|
| 661 |
+
|
| 662 |
+
\noindent Le niveau Medium active un \texttt{sleep(2)} en cas d'échec d'authentification.
|
| 663 |
+
|
| 664 |
+
\begin{figure}[H]
|
| 665 |
+
\centering
|
| 666 |
+
\includegraphics[width=0.85\textwidth]{images/33.png}
|
| 667 |
+
\caption{Code source PHP du niveau Medium --- délai sleep(2) visible}
|
| 668 |
+
\end{figure}
|
| 669 |
+
|
| 670 |
+
\noindent La seule différence avec le niveau Low est l'ajout de \texttt{sleep(2)} dans la branche échec. Avec 1000 mots de passe : $\sim$33 minutes au lieu de $\sim$20 secondes.
|
| 671 |
+
|
| 672 |
+
\begin{figure}[H]
|
| 673 |
+
\centering
|
| 674 |
+
\includegraphics[width=0.85\textwidth]{images/34.png}
|
| 675 |
+
\caption{Configuration de Burp Intruder pour le niveau Medium --- timeout augmenté}
|
| 676 |
+
\end{figure}
|
| 677 |
+
|
| 678 |
+
\noindent Le \textit{Request timeout} est augmenté à 30 secondes dans les paramètres du \textit{Request Engine}.
|
| 679 |
+
|
| 680 |
+
\begin{figure}[H]
|
| 681 |
+
\centering
|
| 682 |
+
\includegraphics[width=0.85\textwidth]{images/35.png}
|
| 683 |
+
\caption{Lancement de l'attaque Sniper sur le niveau Medium}
|
| 684 |
+
\end{figure}
|
| 685 |
+
|
| 686 |
+
\noindent L'attaque progresse normalement malgré le délai.
|
| 687 |
+
|
| 688 |
+
\begin{figure}[H]
|
| 689 |
+
\centering
|
| 690 |
+
\includegraphics[width=0.85\textwidth]{images/36.png}
|
| 691 |
+
\caption{Résultats de l'attaque en niveau Medium --- succès malgré le délai}
|
| 692 |
+
\end{figure}
|
| 693 |
+
|
| 694 |
+
\noindent Le mot de passe \texttt{password} est retrouvé : le \texttt{sleep(2)} seul ne suffit pas.
|
| 695 |
+
|
| 696 |
+
\begin{figure}[H]
|
| 697 |
+
\centering
|
| 698 |
+
\includegraphics[width=0.85\textwidth]{images/37.png}
|
| 699 |
+
\caption{Comparaison des temps d'exécution : niveau Low vs Medium}
|
| 700 |
+
\end{figure}
|
| 701 |
+
|
| 702 |
+
\noindent Le résultat final est identique : tous les comptes sont compromis, seule la durée change.
|
| 703 |
+
|
| 704 |
+
\subsubsection{Niveau High --- Bypass du token anti-CSRF}
|
| 705 |
+
|
| 706 |
+
\begin{figure}[H]
|
| 707 |
+
\centering
|
| 708 |
+
\includegraphics[width=0.85\textwidth]{images/38.png}
|
| 709 |
+
\caption{Passage au niveau High --- identification du token anti-CSRF dans le HTML}
|
| 710 |
+
\end{figure}
|
| 711 |
+
|
| 712 |
+
\noindent Un champ caché \texttt{user\_token} est généré à chaque chargement de page.
|
| 713 |
+
|
| 714 |
+
\begin{figure}[H]
|
| 715 |
+
\centering
|
| 716 |
+
\includegraphics[width=0.85\textwidth]{images/39.png}
|
| 717 |
+
\caption{Code source PHP du niveau High --- vérification du token CSRF}
|
| 718 |
+
\end{figure}
|
| 719 |
+
|
| 720 |
+
\noindent La fonction \texttt{checkToken()} valide le token. Un \texttt{sleep(rand(0,3))} ajoute un délai aléatoire.
|
| 721 |
+
|
| 722 |
+
\begin{figure}[H]
|
| 723 |
+
\centering
|
| 724 |
+
\includegraphics[width=0.85\textwidth]{images/40.png}
|
| 725 |
+
\caption{Échec de l'attaque Intruder simple en niveau High --- token invalide}
|
| 726 |
+
\end{figure}
|
| 727 |
+
|
| 728 |
+
\noindent L'attaque Intruder classique échoue car le token CSRF est périmé à chaque requête.
|
| 729 |
+
|
| 730 |
+
\begin{figure}[H]
|
| 731 |
+
\centering
|
| 732 |
+
\includegraphics[width=0.85\textwidth]{images/41.png}
|
| 733 |
+
\caption{Configuration de Burp Intruder avec Recursive Grep pour le token}
|
| 734 |
+
\end{figure}
|
| 735 |
+
|
| 736 |
+
\noindent La fonctionnalité \textit{Recursive Grep} extrait automatiquement le token de chaque réponse.
|
| 737 |
+
|
| 738 |
+
\begin{figure}[H]
|
| 739 |
+
\centering
|
| 740 |
+
\includegraphics[width=0.85\textwidth]{images/42.png}
|
| 741 |
+
\caption{Configuration des positions : password et user\_token}
|
| 742 |
+
\end{figure}
|
| 743 |
+
|
| 744 |
+
\noindent Deux marqueurs : \texttt{password=\S{}wrongpass\S{}} et \texttt{user\_token=\S{}TOKEN\S{}}. Mode \textbf{Pitchfork}, 1 seul thread obligatoire.
|
| 745 |
+
|
| 746 |
+
\begin{figure}[H]
|
| 747 |
+
\centering
|
| 748 |
+
\includegraphics[width=0.85\textwidth]{images/43.png}
|
| 749 |
+
\caption{Configuration du Payload Set 2 --- type Recursive Grep}
|
| 750 |
+
\end{figure}
|
| 751 |
+
|
| 752 |
+
\noindent Le Payload Set 2 extrait dynamiquement le token depuis chaque réponse.
|
| 753 |
+
|
| 754 |
+
\begin{figure}[H]
|
| 755 |
+
\centering
|
| 756 |
+
\includegraphics[width=0.85\textwidth]{images/44.png}
|
| 757 |
+
\caption{Résultats de l'attaque en niveau High --- bypass CSRF réussi}
|
| 758 |
+
\end{figure}
|
| 759 |
+
|
| 760 |
+
\noindent Le mot de passe \texttt{password} est identifié malgré la protection CSRF.
|
| 761 |
+
|
| 762 |
+
\subsubsection{Script Python pour le bypass du niveau High}
|
| 763 |
+
|
| 764 |
+
\begin{figure}[H]
|
| 765 |
+
\centering
|
| 766 |
+
\includegraphics[width=0.85\textwidth]{images/45.png}
|
| 767 |
+
\caption{Script Python brute\_force\_high.py --- code source principal}
|
| 768 |
+
\end{figure}
|
| 769 |
+
|
| 770 |
+
\noindent Le script implémente deux requêtes par tentative : extraction du token puis authentification.
|
| 771 |
+
|
| 772 |
+
\begin{figure}[H]
|
| 773 |
+
\centering
|
| 774 |
+
\includegraphics[width=0.85\textwidth]{images/46.png}
|
| 775 |
+
\caption{Configuration des paramètres du script --- URL cible, session, wordlist}
|
| 776 |
+
\end{figure}
|
| 777 |
+
|
| 778 |
+
\noindent Les paramètres incluent l'URL cible, le \texttt{PHPSESSID}, le nom d'utilisateur et la wordlist.
|
| 779 |
+
|
| 780 |
+
\begin{figure}[H]
|
| 781 |
+
\centering
|
| 782 |
+
\includegraphics[width=0.85\textwidth]{images/47.png}
|
| 783 |
+
\caption{Exécution du script Python --- progression de l'attaque}
|
| 784 |
+
\end{figure}
|
| 785 |
+
|
| 786 |
+
\noindent Chaque tentative nécessite deux requêtes HTTP, doublant le trafic par rapport au niveau Low.
|
| 787 |
+
|
| 788 |
+
\begin{figure}[H]
|
| 789 |
+
\centering
|
| 790 |
+
\includegraphics[width=0.85\textwidth]{images/48.png}
|
| 791 |
+
\caption{Résultat final du script --- mot de passe trouvé avec statistiques}
|
| 792 |
+
\end{figure}
|
| 793 |
+
|
| 794 |
+
\noindent Le mot de passe \texttt{password} est trouvé. Le token CSRF seul ne protège pas contre le brute force.
|
| 795 |
+
|
| 796 |
+
\begin{figure}[H]
|
| 797 |
+
\centering
|
| 798 |
+
\includegraphics[width=0.85\textwidth]{images/49.png}
|
| 799 |
+
\caption{Vérification manuelle --- connexion réussie}
|
| 800 |
+
\end{figure}
|
| 801 |
+
|
| 802 |
+
\noindent La connexion manuelle avec \texttt{admin}/\texttt{password} en niveau High affiche le message de bienvenue.
|
| 803 |
+
|
| 804 |
+
\begin{figure}[H]
|
| 805 |
+
\centering
|
| 806 |
+
\includegraphics[width=0.85\textwidth]{images/50.png}
|
| 807 |
+
\caption{Analyse du trafic réseau lors de l'attaque en niveau High}
|
| 808 |
+
\end{figure}
|
| 809 |
+
|
| 810 |
+
\noindent Le double volume de requêtes est visible : une pour le token, une pour l'authentification.
|
| 811 |
+
|
| 812 |
+
\begin{figure}[H]
|
| 813 |
+
\centering
|
| 814 |
+
\includegraphics[width=0.85\textwidth]{images/51.png}
|
| 815 |
+
\caption{Comparaison des niveaux de protection --- Low, Medium et High}
|
| 816 |
+
\end{figure}
|
| 817 |
+
|
| 818 |
+
\noindent Les protections partielles sont insuffisantes face à un attaquant déterminé.
|
| 819 |
+
|
| 820 |
+
\begin{figure}[H]
|
| 821 |
+
\centering
|
| 822 |
+
\includegraphics[width=0.85\textwidth]{images/52.png}
|
| 823 |
+
\caption{Récapitulatif des résultats d'attaque sur les trois niveaux}
|
| 824 |
+
\end{figure}
|
| 825 |
+
|
| 826 |
+
\noindent Tous les comptes DVWA ont été compromis sur les trois niveaux de sécurité.
|
| 827 |
+
|
| 828 |
+
\subsection{Analyse}
|
| 829 |
+
|
| 830 |
+
\begin{table}[H]
|
| 831 |
+
\centering
|
| 832 |
+
\begin{tabularx}{\textwidth}{l c c X}
|
| 833 |
+
\toprule
|
| 834 |
+
\textbf{Niveau} & \textbf{Protection} & \textbf{Temps estimé} & \textbf{Contournement} \\
|
| 835 |
+
\midrule
|
| 836 |
+
Low & Aucune & $\sim$20 secondes & Attaque directe \\
|
| 837 |
+
Medium & sleep(2) & $\sim$33 minutes & Augmenter le timeout \\
|
| 838 |
+
High & Token CSRF & $\sim$45 minutes & Recursive Grep ou Python \\
|
| 839 |
+
\bottomrule
|
| 840 |
+
\end{tabularx}
|
| 841 |
+
\caption{Comparaison des protections et temps d'attaque pour 1000 mots de passe}
|
| 842 |
+
\end{table}
|
| 843 |
+
|
| 844 |
+
\subsection{Problèmes rencontrés}
|
| 845 |
+
|
| 846 |
+
\begin{itemize}[leftmargin=*]
|
| 847 |
+
\item Token CSRF invalide avec Intruder simple ;
|
| 848 |
+
\item Recursive Grep impose 1 seul thread ;
|
| 849 |
+
\item Délai aléatoire \texttt{sleep(rand(0,3))} en niveau High.
|
| 850 |
+
\end{itemize}
|
| 851 |
+
|
| 852 |
+
\subsection{Solutions apportées}
|
| 853 |
+
|
| 854 |
+
Configuration du Recursive Grep, développement du script Python, augmentation des timeouts, et limitation à 1 thread.
|
| 855 |
+
|
| 856 |
+
\newpage
|
| 857 |
+
\section{Partie 4 : Détection et empreinte réseau des attaques}
|
| 858 |
+
|
| 859 |
+
\subsection{Introduction de la partie}
|
| 860 |
+
|
| 861 |
+
Cette partie analyse l'\textbf{empreinte réseau} d'une attaque brute force et les techniques de détection dans les logs.
|
| 862 |
+
|
| 863 |
+
\subsection{Étapes réalisées}
|
| 864 |
+
|
| 865 |
+
\subsubsection{Analyse des logs serveur durant une attaque}
|
| 866 |
+
|
| 867 |
+
\begin{figure}[H]
|
| 868 |
+
\centering
|
| 869 |
+
\includegraphics[width=0.85\textwidth]{images/53.png}
|
| 870 |
+
\caption{Analyse des logs Apache durant une attaque brute force}
|
| 871 |
+
\end{figure}
|
| 872 |
+
|
| 873 |
+
\noindent Les patterns caractéristiques : même IP source, URL identique avec paramètre variable, fréquence élevée, taux d'erreur anormal, absence de ressources statiques.
|
| 874 |
+
|
| 875 |
+
\begin{figure}[H]
|
| 876 |
+
\centering
|
| 877 |
+
\includegraphics[width=0.85\textwidth]{images/54.png}
|
| 878 |
+
\caption{Extraction et filtrage des tentatives de brute force dans les logs}
|
| 879 |
+
\end{figure}
|
| 880 |
+
|
| 881 |
+
\noindent Les commandes \texttt{grep}/\texttt{awk}/\texttt{sort} extraient les lignes correspondant aux tentatives. Indicateurs : taux de requêtes ($>$100 req/min), ratio d'erreurs ($>$90\%), User-Agent identique, intervalle régulier.
|
| 882 |
+
|
| 883 |
+
\subsubsection{Techniques d'évasion et contre-détection}
|
| 884 |
+
|
| 885 |
+
\begin{figure}[H]
|
| 886 |
+
\centering
|
| 887 |
+
\includegraphics[width=0.85\textwidth]{images/55.png}
|
| 888 |
+
\caption{Techniques d'évasion des systèmes de détection}
|
| 889 |
+
\end{figure}
|
| 890 |
+
|
| 891 |
+
\noindent Principales techniques : ralentissement (\textit{low and slow}), distribution d'IP via proxies/Tor, variation du User-Agent, Password Spraying, et Credential Stuffing distribué via botnets.
|
| 892 |
+
|
| 893 |
+
\subsection{Analyse}
|
| 894 |
+
|
| 895 |
+
Les attaques brute force non sophistiquées laissent des traces significatives. Des attaquants expérimentés peuvent contourner la détection basée sur des seuils simples.
|
| 896 |
+
|
| 897 |
+
\subsection{Problèmes rencontrés}
|
| 898 |
+
|
| 899 |
+
Accès aux logs Apache (\texttt{C:\textbackslash xampp\textbackslash apache\textbackslash logs\textbackslash access.log}) limité par les droits d'accès.
|
| 900 |
+
|
| 901 |
+
\subsection{Solutions apportées}
|
| 902 |
+
|
| 903 |
+
Utilisation de commandes adaptées à l'environnement et exécution en tant qu'administrateur.
|
| 904 |
+
|
| 905 |
+
\newpage
|
| 906 |
+
\section{Résultats}
|
| 907 |
+
|
| 908 |
+
\subsection{Comptes découverts}
|
| 909 |
+
|
| 910 |
+
\begin{table}[H]
|
| 911 |
+
\centering
|
| 912 |
+
\begin{tabular}{l l l}
|
| 913 |
+
\toprule
|
| 914 |
+
\textbf{Nom d'utilisateur} & \textbf{Mot de passe} & \textbf{R��le} \\
|
| 915 |
+
\midrule
|
| 916 |
+
\texttt{admin} & \texttt{password} & Administrateur \\
|
| 917 |
+
\texttt{gordonb} & \texttt{abc123} & Utilisateur \\
|
| 918 |
+
\texttt{1337} & \texttt{charley} & Utilisateur \\
|
| 919 |
+
\texttt{pablo} & \texttt{letmein} & Utilisateur \\
|
| 920 |
+
\texttt{smithy} & \texttt{password} & Utilisateur \\
|
| 921 |
+
\bottomrule
|
| 922 |
+
\end{tabular}
|
| 923 |
+
\caption{Comptes DVWA découverts par les attaques brute force}
|
| 924 |
+
\end{table}
|
| 925 |
+
|
| 926 |
+
\subsection{Performance des attaques}
|
| 927 |
+
|
| 928 |
+
\begin{table}[H]
|
| 929 |
+
\centering
|
| 930 |
+
\begin{tabularx}{\textwidth}{l c c c X}
|
| 931 |
+
\toprule
|
| 932 |
+
\textbf{Niveau} & \textbf{Mode} & \textbf{Requêtes} & \textbf{Durée} & \textbf{Résultat} \\
|
| 933 |
+
\midrule
|
| 934 |
+
Low & Sniper & $\sim$15 & $\sim$15s & admin/password trouvé \\
|
| 935 |
+
Low & Cluster Bomb & $\sim$105 & $\sim$2min & 5/5 comptes trouvés \\
|
| 936 |
+
Low & Pitchfork & 5 & $\sim$5s & 5/5 couples validés \\
|
| 937 |
+
Medium & Sniper & $\sim$15 & $\sim$30s & admin/password trouvé \\
|
| 938 |
+
High & Recursive Grep & $\sim$30 & $\sim$5min & admin/password trouvé \\
|
| 939 |
+
High & Script Python & $\sim$30 & $\sim$3min & admin/password trouvé \\
|
| 940 |
+
\bottomrule
|
| 941 |
+
\end{tabularx}
|
| 942 |
+
\caption{Synthèse des performances d'attaque par niveau et par mode}
|
| 943 |
+
\end{table}
|
| 944 |
+
|
| 945 |
+
\subsection{Efficacité globale}
|
| 946 |
+
|
| 947 |
+
\begin{itemize}[leftmargin=*]
|
| 948 |
+
\item \textbf{Pitchfork} : le plus efficace (5 requêtes pour 5 comptes) ;
|
| 949 |
+
\item \textbf{Cluster Bomb} : le plus exhaustif ($n_1 \times n_2$) ;
|
| 950 |
+
\item \textbf{Sniper} : bon compromis pour un compte ciblé ;
|
| 951 |
+
\item \textbf{Script Python} : plus flexible pour les niveaux avancés.
|
| 952 |
+
\end{itemize}
|
| 953 |
+
|
| 954 |
+
\newpage
|
| 955 |
+
\section{Analyse de sécurité}
|
| 956 |
+
|
| 957 |
+
\subsection{Vulnérabilités identifiées}
|
| 958 |
+
|
| 959 |
+
\begin{notebox}{Vulnérabilités critiques}
|
| 960 |
+
\begin{enumerate}[leftmargin=*]
|
| 961 |
+
\item Absence de verrouillage de compte (niveaux Low, Medium, High) ;
|
| 962 |
+
\item Absence de CAPTCHA ;
|
| 963 |
+
\item Méthode HTTP GET pour l'authentification ;
|
| 964 |
+
\item Hachage MD5 des mots de passe (obsolète) ;
|
| 965 |
+
\item Vulnérabilité à l'injection SQL (niveau Low) ;
|
| 966 |
+
\item Protection CSRF insuffisante (niveau High).
|
| 967 |
+
\end{enumerate}
|
| 968 |
+
\end{notebox}
|
| 969 |
+
|
| 970 |
+
\subsection{Pourquoi le système est vulnérable}
|
| 971 |
+
|
| 972 |
+
\begin{itemize}[leftmargin=*]
|
| 973 |
+
\item Approche de défense monocouche ;
|
| 974 |
+
\item Absence de défense en profondeur ;
|
| 975 |
+
\item Pas de journalisation ni d'alerte ;
|
| 976 |
+
\item Mots de passe extrêmement faibles ;
|
| 977 |
+
\item Pas de MFA.
|
| 978 |
+
\end{itemize}
|
| 979 |
+
|
| 980 |
+
\newpage
|
| 981 |
+
\section{Contre-mesures}
|
| 982 |
+
|
| 983 |
+
\subsection{Account Lockout --- Verrouillage de compte}
|
| 984 |
+
|
| 985 |
+
\begin{infobox}
|
| 986 |
+
\textbf{Implémentation recommandée :}
|
| 987 |
+
\begin{itemize}
|
| 988 |
+
\item Maximum 5 tentatives échouées avant verrouillage ;
|
| 989 |
+
\item Durée de verrouillage de 15 minutes ;
|
| 990 |
+
\item Compteur persistant en base de données ;
|
| 991 |
+
\item Réinitialisation après connexion réussie ;
|
| 992 |
+
\item Notification par e-mail.
|
| 993 |
+
\end{itemize}
|
| 994 |
+
\end{infobox}
|
| 995 |
+
|
| 996 |
+
\subsection{CAPTCHA --- Différenciation humain/robot}
|
| 997 |
+
|
| 998 |
+
\begin{infobox}
|
| 999 |
+
\textbf{Solutions recommandées :}
|
| 1000 |
+
\begin{itemize}
|
| 1001 |
+
\item Google reCAPTCHA v3 (invisible, score $\geq 0.5$ = humain probable) ;
|
| 1002 |
+
\item hCaptcha (alternative respectueuse de la vie privée) ;
|
| 1003 |
+
\item CAPTCHA adaptatif (activé après 2-3 échecs).
|
| 1004 |
+
\end{itemize}
|
| 1005 |
+
\end{infobox}
|
| 1006 |
+
|
| 1007 |
+
\subsection{MFA --- Authentification multifacteur}
|
| 1008 |
+
|
| 1009 |
+
\begin{infobox}
|
| 1010 |
+
\textbf{Méthodes MFA courantes :}
|
| 1011 |
+
\begin{itemize}
|
| 1012 |
+
\item TOTP (Google Authenticator, code 6 chiffres, valide 30s) ;
|
| 1013 |
+
\item SMS/E-mail (moins sécurisé, risque de SIM-swapping) ;
|
| 1014 |
+
\item Clé de sécurité physique FIDO2/WebAuthn.
|
| 1015 |
+
\end{itemize}
|
| 1016 |
+
\end{infobox}
|
| 1017 |
+
|
| 1018 |
+
\subsection{Rate Limiting --- Limitation du débit}
|
| 1019 |
+
|
| 1020 |
+
\begin{infobox}
|
| 1021 |
+
\textbf{Niveaux d'implémentation :}
|
| 1022 |
+
\begin{itemize}
|
| 1023 |
+
\item Nginx/Apache : \texttt{limit\_req\_zone}, 5 req/min sur la page de login ;
|
| 1024 |
+
\item Redis : compteur par IP et par username, fenêtre de 10 minutes ;
|
| 1025 |
+
\item WAF/Firewall : détection et blocage automatique.
|
| 1026 |
+
\end{itemize}
|
| 1027 |
+
\end{infobox}
|
| 1028 |
+
|
| 1029 |
+
\subsection{Protection CSRF}
|
| 1030 |
+
|
| 1031 |
+
\begin{keyconceptbox}
|
| 1032 |
+
\textbf{Approche de défense en profondeur recommandée :}
|
| 1033 |
+
\begin{enumerate}
|
| 1034 |
+
\item Token anti-CSRF + méthode POST
|
| 1035 |
+
\item Account lockout après 5 échecs
|
| 1036 |
+
\item Rate limiting par IP et par compte
|
| 1037 |
+
\item CAPTCHA adaptatif après 3 échecs
|
| 1038 |
+
\item MFA obligatoire
|
| 1039 |
+
\item Politique de mots de passe forts
|
| 1040 |
+
\item Journalisation et alertes en temps réel
|
| 1041 |
+
\end{enumerate}
|
| 1042 |
+
\end{keyconceptbox}
|
| 1043 |
+
|
| 1044 |
+
\newpage
|
| 1045 |
+
\section{Conclusion}
|
| 1046 |
+
|
| 1047 |
+
Ce travail pratique a permis d'explorer en profondeur les mécanismes des attaques par force brute contre les formulaires d'authentification web.
|
| 1048 |
+
|
| 1049 |
+
\textbf{Résumé des travaux réalisés :}
|
| 1050 |
+
|
| 1051 |
+
\begin{enumerate}[leftmargin=*]
|
| 1052 |
+
\item \textbf{Phase de reconnaissance} : cartographie de la cible et identification des vulnérabilités du code source PHP ;
|
| 1053 |
+
\item \textbf{Exploitation avec Burp Suite Intruder} : les trois modes d'attaque ont permis de retrouver les cinq comptes DVWA ;
|
| 1054 |
+
\item \textbf{Contournement des protections} : le délai \texttt{sleep(2)} et le token anti-CSRF ont été contournés ;
|
| 1055 |
+
\item \textbf{Analyse de la détection} : les empreintes caractéristiques des attaques ont été identifiées dans les logs.
|
| 1056 |
+
\end{enumerate}
|
| 1057 |
+
|
| 1058 |
+
\textbf{Importance des protections :}
|
| 1059 |
+
|
| 1060 |
+
Ce TP démontre qu'une protection monocouche est insuffisante. Seule l'approche de \textbf{défense en profondeur}, combinant account lockout, CAPTCHA, MFA, rate limiting et protection CSRF, offre une résistance efficace.
|
| 1061 |
+
|
| 1062 |
+
\textbf{Retour d'expérience :}
|
| 1063 |
+
|
| 1064 |
+
Ce travail pratique a permis de développer une compréhension concrète des attaques par force brute, tant du point de vue de l'attaquant que du défenseur. Les compétences acquises constituent un socle fondamental pour les tests de pénétration web et l'audit de sécurité applicative.
|
| 1065 |
+
|
| 1066 |
+
\end{document}
|