<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://doc.ycharbi.fr/index.php?action=history&amp;feed=atom&amp;title=Mitmproxy</id>
	<title>Mitmproxy - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="https://doc.ycharbi.fr/index.php?action=history&amp;feed=atom&amp;title=Mitmproxy"/>
	<link rel="alternate" type="text/html" href="https://doc.ycharbi.fr/index.php?title=Mitmproxy&amp;action=history"/>
	<updated>2026-05-27T19:06:22Z</updated>
	<subtitle>Historique des versions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://doc.ycharbi.fr/index.php?title=Mitmproxy&amp;diff=1533&amp;oldid=prev</id>
		<title>Ycharbi : Corrections de fautes de français + légère mise en forme + ajout de la section &quot;Sources&quot;</title>
		<link rel="alternate" type="text/html" href="https://doc.ycharbi.fr/index.php?title=Mitmproxy&amp;diff=1533&amp;oldid=prev"/>
		<updated>2024-08-15T15:42:16Z</updated>

		<summary type="html">&lt;p&gt;Corrections de fautes de français + légère mise en forme + ajout de la section &amp;quot;Sources&amp;quot;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 15 août 2024 à 15:42&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Ligne 1 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 1 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Services_mandataire]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Services_mandataire]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[https://mitmproxy.org/ Mitmproxy] est un mandataire (&#039;&#039;proxy&#039;&#039;) destiné au débogage, tests, notamment de pénétrations ainsi qu&#039;aux &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;évaluation &lt;/del&gt;des mesures de protections d&#039;un système d&#039;information.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[https://mitmproxy.org/ Mitmproxy] est un mandataire (&#039;&#039;proxy&#039;&#039;) destiné au débogage, tests, notamment de pénétrations ainsi qu&#039;aux &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;évaluations &lt;/ins&gt;des mesures de protections d&#039;un système d&#039;information.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Il est extrêmement utile pour comprendre le fonctionnement d&amp;#039;un programme officiant au travers de sessions &amp;#039;&amp;#039;HTTPS&amp;#039;&amp;#039; puisqu&amp;#039;il permet de réunir les éléments nécessaires à l&amp;#039;inspection des trames chiffrées par &amp;#039;&amp;#039;TLS&amp;#039;&amp;#039;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Il est extrêmement utile pour comprendre le fonctionnement d&amp;#039;un programme officiant au travers de sessions &amp;#039;&amp;#039;HTTPS&amp;#039;&amp;#039; puisqu&amp;#039;il permet de réunir les éléments nécessaires à l&amp;#039;inspection des trames chiffrées par &amp;#039;&amp;#039;TLS&amp;#039;&amp;#039;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Il peut, en outre, servir à espionner la navigation &#039;&#039;HTTPS&#039;&#039; des utilisateurs d&#039;un réseau limité (obligeant l&#039;accès au &#039;&#039;WAN&#039;&#039; par l&#039;intermédiaire d&#039;un mandataire). À l&#039;issue de la lecture de ce document, vous devriez être sensibilisé à ne jamais réaliser d&#039;opérations personnelles sur ce genre de réseau (connexion à un &#039;&#039;Webmail&#039;&#039; ou à tout portail nécessitant un identifiant personnel par exemple).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Il peut, en outre, servir à espionner la navigation &#039;&#039;HTTPS&#039;&#039; des utilisateurs d&#039;un réseau &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;à accès &lt;/ins&gt;limité (obligeant l&#039;accès au &#039;&#039;WAN&#039;&#039; par l&#039;intermédiaire d&#039;un mandataire). À l&#039;issue de la lecture de ce document, vous devriez être sensibilisé à ne jamais réaliser d&#039;opérations personnelles sur ce genre de réseau (connexion à un &#039;&#039;Webmail&#039;&#039; ou à tout portail nécessitant un identifiant personnel par exemple).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Cette documentation explique brièvement comment se servir de l&amp;#039;outil pour enregistrer les clés de sessions &amp;#039;&amp;#039;TLS&amp;#039;&amp;#039; et présente un cas pratique avec le déchiffrement d&amp;#039;un &amp;lt;code&amp;gt;docker pull&amp;lt;/code&amp;gt;. Les trames capturées via [[Tcpdump]] pourront alors être examinées par un outil graphique comme [[Wireshark]].&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Cette documentation explique brièvement comment se servir de l&amp;#039;outil pour enregistrer les clés de sessions &amp;#039;&amp;#039;TLS&amp;#039;&amp;#039; et présente un cas pratique avec le déchiffrement d&amp;#039;un &amp;lt;code&amp;gt;docker pull&amp;lt;/code&amp;gt;. Les trames capturées via [[Tcpdump]] pourront alors être examinées par un outil graphique comme [[Wireshark]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l13&quot;&gt;Ligne 13 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 13 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  apt install --no-install-recommends mitmproxy&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  apt install --no-install-recommends mitmproxy&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Le fait de lancer &amp;lt;code&amp;gt;mitmproxy&amp;lt;/code&amp;gt; créé automatiquement le répertoire &amp;lt;code&amp;gt;~/.mitmproxy&amp;lt;/code&amp;gt; contenant les éléments secrets utilisés dans une transaction &#039;&#039;TLS&#039;&#039;. Il est alors possible d&#039;importer le certificat serveur dans la base local du client à espionner ou générer son propre certificat via [[openssl|OpenSSL]]. Afin d&#039;agrémenter la démonstration, la seconde solution sera utilisée. Outre l&#039;aspect didactique, générer votre propre certificat est indispensable lorsque l&#039;interception &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;de &lt;/del&gt;la communication d&#039;une application exigeante en terme de vérification &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;est utilisée &lt;/del&gt;(ce pourquoi [[Docker]] est utilisé en guise d&#039;exemple). Il est en effet nécessaire dans ce cas d&#039;ajouter des noms alternatifs dans la section &amp;lt;code&amp;gt;subjectAltName&amp;lt;/code&amp;gt; du [https://fr.wikipedia.org/wiki/X.509 certificat X.509] afin de spécifier les adresses signées par celui-ci.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Le fait de lancer &amp;lt;code&amp;gt;mitmproxy&amp;lt;/code&amp;gt; créé automatiquement le répertoire &amp;lt;code&amp;gt;~/.mitmproxy&amp;lt;/code&amp;gt; contenant les éléments secrets utilisés dans une transaction &#039;&#039;TLS&#039;&#039;. Il est alors possible d&#039;importer le certificat serveur dans la base local du client à espionner ou générer son propre certificat via [[openssl|OpenSSL]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Afin d&#039;agrémenter la démonstration, la seconde solution sera utilisée. Outre l&#039;aspect didactique, générer votre propre certificat est indispensable lorsque l&#039;interception &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;concerne &lt;/ins&gt;la communication d&#039;une application exigeante en terme de vérification (ce pourquoi [[Docker]] est utilisé en guise d&#039;exemple). Il est en effet nécessaire dans ce cas d&#039;ajouter des noms alternatifs dans la section &amp;lt;code&amp;gt;subjectAltName&amp;lt;/code&amp;gt; du [https://fr.wikipedia.org/wiki/X.509 certificat X.509] afin de spécifier les adresses signées par celui-ci.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Configuration des clés==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Configuration des clés==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l34&quot;&gt;Ligne 34 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 36 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Le point d&#039;intérêt principal de ces opérations et qui devra être personnalisé en fonction du cas à traiter est la sous commande &amp;lt;code&amp;gt;printf &quot;subjectAltName=DNS:*.ycharbi.fr,DNS:*.docker.io,DNS:*.cloudflare.docker.com,IP:127.0.0.1&quot;&amp;lt;/code&amp;gt; présente à la ligne numéro 8. Utilisez les domaines que vous voulez voir validé par &#039;&#039;TLS&#039;&#039; lors de la poignée de main entre une application cliente et votre mandataire.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Le point d&#039;intérêt principal de ces opérations et qui devra être personnalisé en fonction du cas à traiter est la sous&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;-&lt;/ins&gt;commande &amp;lt;code&amp;gt;printf &quot;subjectAltName=DNS:*.ycharbi.fr,DNS:*.docker.io,DNS:*.cloudflare.docker.com,IP:127.0.0.1&quot;&amp;lt;/code&amp;gt; présente à la ligne numéro 8. Utilisez les domaines que vous voulez voir validé par &#039;&#039;TLS&#039;&#039; lors de la poignée de main entre une application cliente et votre mandataire.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Tests de fonctionnement==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Tests de fonctionnement==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l42&quot;&gt;Ligne 42 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 44 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;où :&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;où :&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;SSLKEYLOGFILE= &amp;#039;&amp;#039;&amp;#039; : emplacement du fichier contenant les clés négociées lors des différentes sessions &amp;#039;&amp;#039;TLS&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;SSLKEYLOGFILE= &amp;#039;&amp;#039;&amp;#039; : emplacement du fichier contenant les clés négociées lors des différentes sessions &amp;#039;&amp;#039;TLS&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;--certs *= &#039;&#039;&#039; : emplacement du certificat chaîné serveur pour signer le domaine spécifié dans la commande (ici &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; pour tout les domaines). Il peut y avoir plusieurs fois ce paramètre pour mettre autant de &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;certificat &lt;/del&gt;que de domaines au besoin&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;--certs *= &#039;&#039;&#039; : emplacement du certificat chaîné serveur pour signer le domaine spécifié dans la commande (ici &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; pour tout les domaines). Il peut y avoir plusieurs fois ce paramètre pour mettre autant de &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;certificats &lt;/ins&gt;que de domaines au besoin&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Les clients &amp;#039;&amp;#039;HTTP&amp;#039;&amp;#039; communs peuvent êtres utilisés pour tester le fonctionnement de la solution&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Les clients &amp;#039;&amp;#039;HTTP&amp;#039;&amp;#039; communs peuvent êtres utilisés pour tester le fonctionnement de la solution&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l55&quot;&gt;Ligne 55 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 57 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Pour que cela fonctionne, il faut :&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Pour que cela fonctionne, il faut :&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* un certificat avec les bons domaines renseignés dans le champ &amp;lt;code&amp;gt;subjectAltName&amp;lt;/code&amp;gt; (fait dans l&amp;#039;étape préparatoire)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* un certificat avec les bons domaines renseignés dans le champ &amp;lt;code&amp;gt;subjectAltName&amp;lt;/code&amp;gt; (fait dans l&amp;#039;étape préparatoire)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* ajouter ce certificat dans la configuration du registre d&#039;image Docker dont l&#039;adresse sera remplacée par celle de notre mandataire (la commande de tirage de l&#039;image reste identique)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* ajouter ce certificat dans la configuration du registre d&#039;image &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&lt;/ins&gt;Docker&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039; &lt;/ins&gt;dont l&#039;adresse sera remplacée par celle de notre mandataire (la commande de tirage de l&#039;image reste identique)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* configurer &amp;#039;&amp;#039;Docker&amp;#039;&amp;#039; pour utiliser notre mandataire&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* configurer &amp;#039;&amp;#039;Docker&amp;#039;&amp;#039; pour utiliser notre mandataire&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* ajouter ce même certificat dans la base interne du système client&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* ajouter ce même certificat dans la base interne du système client&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;mettre à jour &lt;/del&gt;la configuration de &#039;&#039;Systemd&#039;&#039; et relancer le démon &#039;&#039;Docker&#039;&#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;rafraîchir &lt;/ins&gt;la configuration de &#039;&#039;Systemd&#039;&#039; et relancer le démon &#039;&#039;Docker&#039;&#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Installation des paquets==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Installation des paquets==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l64&quot;&gt;Ligne 64 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 66 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  apt install --no-install-recommends docker.io tcpdump&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  apt install --no-install-recommends docker.io tcpdump&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Le premier servira d&#039;application &#039;&#039;TLS&#039;&#039; cliente&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/del&gt;le second&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/del&gt;capturera le trafic chiffré. Celui-ci sera par la suite déchiffré par &#039;&#039;Wireshark&#039;&#039; à l&#039;aide des clés enregistrées par &#039;&#039;Mitmproxy&#039;&#039; pendant la communication.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Le premier servira d&#039;application &#039;&#039;TLS&#039;&#039; cliente &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;et &lt;/ins&gt;le second capturera le trafic chiffré. Celui-ci sera par la suite déchiffré par &#039;&#039;Wireshark&#039;&#039; à l&#039;aide des clés enregistrées par &#039;&#039;Mitmproxy&#039;&#039; pendant la communication.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Configuration de l&amp;#039;environnement==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Configuration de l&amp;#039;environnement==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l99&quot;&gt;Ligne 99 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 101 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Deuxième console===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Deuxième console===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Exécuté &lt;/del&gt;l&#039;enregistreur de trames&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Exécuter &lt;/ins&gt;l&#039;enregistreur de trames&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  tcpdump -ni any -w /tmp/tls.pcap port not 22&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  tcpdump -ni any -w /tmp/tls.pcap port not 22&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l106&quot;&gt;Ligne 106 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 108 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  docker pull alpine&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  docker pull alpine&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Si tout est bon, votre image a été récupérée par &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;tcpdump&amp;lt;/code&amp;gt; a enregistré l&#039;échange chiffré et &amp;lt;code&amp;gt;mitmproxy&amp;lt;/code&amp;gt; a journalisé les sessions en plus d&#039;avoir enregistré les clés &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;de sessions &lt;/del&gt;&#039;&#039;TLS&#039;&#039;. Il ne reste plus qu&#039;à quitter les programmes des deux premières consoles pour en envoyer les fichiers de capture et de clés à une machine graphique possédant &amp;lt;code&amp;gt;wireshark&amp;lt;/code&amp;gt; pour déchiffrement et analyse.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Si tout est bon, votre image a été récupérée par &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;tcpdump&amp;lt;/code&amp;gt; a enregistré l&#039;échange chiffré et &amp;lt;code&amp;gt;mitmproxy&amp;lt;/code&amp;gt; a journalisé les sessions en plus d&#039;avoir enregistré les clés &#039;&#039;TLS&#039;&#039; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;de celles-ci&lt;/ins&gt;. Il ne reste plus qu&#039;à quitter les programmes des deux premières consoles pour en envoyer les fichiers de capture et de clés à une machine graphique possédant &amp;lt;code&amp;gt;wireshark&amp;lt;/code&amp;gt; pour déchiffrement et analyse.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  scp /tmp/tls.pcap /tmp/clés_tls_mitm.txt ycharbi@\[2001:db8::1\]:/tmp/&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  scp /tmp/tls.pcap /tmp/clés_tls_mitm.txt ycharbi@\[2001:db8::1\]:/tmp/&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l113&quot;&gt;Ligne 113 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 115 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Les paquets &amp;#039;&amp;#039;TLS&amp;#039;&amp;#039; se déchiffrent instantanément, laissant apparaître les paquets &amp;#039;&amp;#039;HTTP&amp;#039;&amp;#039; qu&amp;#039;ils masquaient. Vous pouvez ainsi observer les &amp;#039;&amp;#039;URL&amp;#039;&amp;#039; que le client &amp;#039;&amp;#039;Docker&amp;#039;&amp;#039; requêtes pour récupérer ses images.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Les paquets &amp;#039;&amp;#039;TLS&amp;#039;&amp;#039; se déchiffrent instantanément, laissant apparaître les paquets &amp;#039;&amp;#039;HTTP&amp;#039;&amp;#039; qu&amp;#039;ils masquaient. Vous pouvez ainsi observer les &amp;#039;&amp;#039;URL&amp;#039;&amp;#039; que le client &amp;#039;&amp;#039;Docker&amp;#039;&amp;#039; requêtes pour récupérer ses images.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=Sources=&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* https://docs.mitmproxy.org/stable/&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;** https://docs.mitmproxy.org/stable/howto-wireshark-tls/&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;** https://docs.mitmproxy.org/stable/concepts-options/&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* https://medium.com/@ifeanyiigili/how-to-setup-a-private-docker-registry-with-a-self-sign-certificate-43a7407a1613&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* https://betterprogramming.pub/deploy-a-docker-registry-using-tls-and-htpasswd-56dd57a1215a&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ycharbi</name></author>
	</entry>
	<entry>
		<id>https://doc.ycharbi.fr/index.php?title=Mitmproxy&amp;diff=1532&amp;oldid=prev</id>
		<title>Ycharbi : Page créée avec « Category:Services_mandataire  [https://mitmproxy.org/ Mitmproxy] est un mandataire (&#039;&#039;proxy&#039;&#039;) destiné au débogage, tests, notamment de pénétrations ainsi qu&#039;aux évaluation des mesures de protections d&#039;un système d&#039;information. Il est extrêmement utile pour comprendre le fonctionnement d&#039;un programme officiant au travers de sessions &#039;&#039;HTTPS&#039;&#039; puisqu&#039;il permet de réunir les éléments nécessaires à l&#039;inspection des trames chiffrées par &#039;&#039;TLS&#039;&#039;.  Il... »</title>
		<link rel="alternate" type="text/html" href="https://doc.ycharbi.fr/index.php?title=Mitmproxy&amp;diff=1532&amp;oldid=prev"/>
		<updated>2024-08-15T15:20:21Z</updated>

		<summary type="html">&lt;p&gt;Page créée avec « &lt;a href=&quot;/index.php/Cat%C3%A9gorie:Services_mandataire&quot; title=&quot;Catégorie:Services mandataire&quot;&gt;Category:Services_mandataire&lt;/a&gt;  [https://mitmproxy.org/ Mitmproxy] est un mandataire (&amp;#039;&amp;#039;proxy&amp;#039;&amp;#039;) destiné au débogage, tests, notamment de pénétrations ainsi qu&amp;#039;aux évaluation des mesures de protections d&amp;#039;un système d&amp;#039;information. Il est extrêmement utile pour comprendre le fonctionnement d&amp;#039;un programme officiant au travers de sessions &amp;#039;&amp;#039;HTTPS&amp;#039;&amp;#039; puisqu&amp;#039;il permet de réunir les éléments nécessaires à l&amp;#039;inspection des trames chiffrées par &amp;#039;&amp;#039;TLS&amp;#039;&amp;#039;.  Il... »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:Services_mandataire]]&lt;br /&gt;
&lt;br /&gt;
[https://mitmproxy.org/ Mitmproxy] est un mandataire (&amp;#039;&amp;#039;proxy&amp;#039;&amp;#039;) destiné au débogage, tests, notamment de pénétrations ainsi qu&amp;#039;aux évaluation des mesures de protections d&amp;#039;un système d&amp;#039;information.&lt;br /&gt;
Il est extrêmement utile pour comprendre le fonctionnement d&amp;#039;un programme officiant au travers de sessions &amp;#039;&amp;#039;HTTPS&amp;#039;&amp;#039; puisqu&amp;#039;il permet de réunir les éléments nécessaires à l&amp;#039;inspection des trames chiffrées par &amp;#039;&amp;#039;TLS&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Il peut, en outre, servir à espionner la navigation &amp;#039;&amp;#039;HTTPS&amp;#039;&amp;#039; des utilisateurs d&amp;#039;un réseau limité (obligeant l&amp;#039;accès au &amp;#039;&amp;#039;WAN&amp;#039;&amp;#039; par l&amp;#039;intermédiaire d&amp;#039;un mandataire). À l&amp;#039;issue de la lecture de ce document, vous devriez être sensibilisé à ne jamais réaliser d&amp;#039;opérations personnelles sur ce genre de réseau (connexion à un &amp;#039;&amp;#039;Webmail&amp;#039;&amp;#039; ou à tout portail nécessitant un identifiant personnel par exemple).&lt;br /&gt;
&lt;br /&gt;
Cette documentation explique brièvement comment se servir de l&amp;#039;outil pour enregistrer les clés de sessions &amp;#039;&amp;#039;TLS&amp;#039;&amp;#039; et présente un cas pratique avec le déchiffrement d&amp;#039;un &amp;lt;code&amp;gt;docker pull&amp;lt;/code&amp;gt;. Les trames capturées via [[Tcpdump]] pourront alors être examinées par un outil graphique comme [[Wireshark]].&lt;br /&gt;
&lt;br /&gt;
=Mise en œuvre=&lt;br /&gt;
==Installation==&lt;br /&gt;
Installation de l&amp;#039;outil&lt;br /&gt;
 apt install --no-install-recommends mitmproxy&lt;br /&gt;
&lt;br /&gt;
Le fait de lancer &amp;lt;code&amp;gt;mitmproxy&amp;lt;/code&amp;gt; créé automatiquement le répertoire &amp;lt;code&amp;gt;~/.mitmproxy&amp;lt;/code&amp;gt; contenant les éléments secrets utilisés dans une transaction &amp;#039;&amp;#039;TLS&amp;#039;&amp;#039;. Il est alors possible d&amp;#039;importer le certificat serveur dans la base local du client à espionner ou générer son propre certificat via [[openssl|OpenSSL]]. Afin d&amp;#039;agrémenter la démonstration, la seconde solution sera utilisée. Outre l&amp;#039;aspect didactique, générer votre propre certificat est indispensable lorsque l&amp;#039;interception de la communication d&amp;#039;une application exigeante en terme de vérification est utilisée (ce pourquoi [[Docker]] est utilisé en guise d&amp;#039;exemple). Il est en effet nécessaire dans ce cas d&amp;#039;ajouter des noms alternatifs dans la section &amp;lt;code&amp;gt;subjectAltName&amp;lt;/code&amp;gt; du [https://fr.wikipedia.org/wiki/X.509 certificat X.509] afin de spécifier les adresses signées par celui-ci.&lt;br /&gt;
&lt;br /&gt;
==Configuration des clés==&lt;br /&gt;
Création du répertoire d&amp;#039;accueil des éléments secrets&lt;br /&gt;
 mkdir -p ~/.mitmproxy/certs&lt;br /&gt;
&lt;br /&gt;
Génération desdits éléments&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
# Génération de la clé privée de l&amp;#039;autorité de certification (AC)&lt;br /&gt;
openssl genrsa -out ~/.mitmproxy/certs/ca.key 2048&lt;br /&gt;
# Génération du couple de clés du serveur mandataire&lt;br /&gt;
openssl req -new -x509 -days 365 -key ~/.mitmproxy/certs/ca.key -subj &amp;quot;/C=CN/ST=GD/L=SZ/O=Acme, Inc./CN=Acme Root CA&amp;quot; -out ~/.mitmproxy/certs/ca.crt&lt;br /&gt;
# Création d&amp;#039;un fichier de demande de certificat auprès de l&amp;#039;AC&lt;br /&gt;
openssl req -newkey rsa:2048 -nodes -keyout ~/.mitmproxy/certs/serveur.key -subj &amp;quot;/C=CN/ST=GD/L=SZ/O=Acme, Inc./CN=*&amp;quot; -out ~/.mitmproxy/certs/serveur.csr&lt;br /&gt;
# Génération d&amp;#039;un certificat signé par l&amp;#039;AC et intégrant la liste des domaines à certifier&lt;br /&gt;
openssl x509 -req -extfile &amp;lt;(printf &amp;quot;subjectAltName=DNS:*.ycharbi.fr,DNS:*.docker.io,DNS:*.cloudflare.docker.com,IP:127.0.0.1&amp;quot;) -days 365 -in ~/.mitmproxy/certs/serveur.csr -CA ~/.mitmproxy/certs/ca.crt -CAkey ~/.mitmproxy/certs/ca.key -CAcreateserial -out ~/.mitmproxy/certs/serveur.crt&lt;br /&gt;
&lt;br /&gt;
# Chaînage du certificat avec la clé associée pour mitmproxy&lt;br /&gt;
cat ~/.mitmproxy/certs/serveur.crt ~/.mitmproxy/certs/serveur.key &amp;gt; ~/.mitmproxy/certs/cert.pem&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Le point d&amp;#039;intérêt principal de ces opérations et qui devra être personnalisé en fonction du cas à traiter est la sous commande &amp;lt;code&amp;gt;printf &amp;quot;subjectAltName=DNS:*.ycharbi.fr,DNS:*.docker.io,DNS:*.cloudflare.docker.com,IP:127.0.0.1&amp;quot;&amp;lt;/code&amp;gt; présente à la ligne numéro 8. Utilisez les domaines que vous voulez voir validé par &amp;#039;&amp;#039;TLS&amp;#039;&amp;#039; lors de la poignée de main entre une application cliente et votre mandataire.&lt;br /&gt;
&lt;br /&gt;
==Tests de fonctionnement==&lt;br /&gt;
Afin de tester notre préparation, nous pouvons lancer &amp;lt;code&amp;gt;mitmproxy&amp;lt;/code&amp;gt; de la façon suivante :&lt;br /&gt;
 SSLKEYLOGFILE=&amp;quot;/tmp/clés_tls_mitm.txt&amp;quot; mitmproxy --certs *=~/.mitmproxy/certs/cert.pem&lt;br /&gt;
&lt;br /&gt;
où :&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;SSLKEYLOGFILE= &amp;#039;&amp;#039;&amp;#039; : emplacement du fichier contenant les clés négociées lors des différentes sessions &amp;#039;&amp;#039;TLS&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;--certs *= &amp;#039;&amp;#039;&amp;#039; : emplacement du certificat chaîné serveur pour signer le domaine spécifié dans la commande (ici &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; pour tout les domaines). Il peut y avoir plusieurs fois ce paramètre pour mettre autant de certificat que de domaines au besoin&lt;br /&gt;
&lt;br /&gt;
Les clients &amp;#039;&amp;#039;HTTP&amp;#039;&amp;#039; communs peuvent êtres utilisés pour tester le fonctionnement de la solution&lt;br /&gt;
 curl --proxy 127.0.0.1:8080 --cacert ~/.mitmproxy/certs/cert.pem https://doc.ycharbi.fr/index.php/Mitmproxy&lt;br /&gt;
 wget -e https_proxy=127.0.0.1:8080 --ca-certificate ~/.mitmproxy/certs/cert.pem https://doc.ycharbi.fr/index.php/Mitmproxy&lt;br /&gt;
&lt;br /&gt;
L&amp;#039;exploitation du fichier de clés est expliqué dans le cas pratique de la section suivante.&lt;br /&gt;
&lt;br /&gt;
=Cas pratique=&lt;br /&gt;
Comme énoncé en introduction, nous allons utiliser notre outil pour analyser les requêtes effectuées par un &amp;lt;code&amp;gt;docker pull&amp;lt;/code&amp;gt;. Cet outil étant particulièrement chiant avec &amp;#039;&amp;#039;HTTPS&amp;#039;&amp;#039; (comme la majorité des applications écrites en &amp;#039;&amp;#039;Golang&amp;#039;&amp;#039;), la mise en œuvre de notre capture représente un bon exercice.&lt;br /&gt;
&lt;br /&gt;
Pour que cela fonctionne, il faut :&lt;br /&gt;
* un certificat avec les bons domaines renseignés dans le champ &amp;lt;code&amp;gt;subjectAltName&amp;lt;/code&amp;gt; (fait dans l&amp;#039;étape préparatoire)&lt;br /&gt;
* ajouter ce certificat dans la configuration du registre d&amp;#039;image Docker dont l&amp;#039;adresse sera remplacée par celle de notre mandataire (la commande de tirage de l&amp;#039;image reste identique)&lt;br /&gt;
* configurer &amp;#039;&amp;#039;Docker&amp;#039;&amp;#039; pour utiliser notre mandataire&lt;br /&gt;
* ajouter ce même certificat dans la base interne du système client&lt;br /&gt;
* mettre à jour la configuration de &amp;#039;&amp;#039;Systemd&amp;#039;&amp;#039; et relancer le démon &amp;#039;&amp;#039;Docker&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==Installation des paquets==&lt;br /&gt;
Installation de &amp;#039;&amp;#039;Docker&amp;#039;&amp;#039; et de &amp;#039;&amp;#039;Tcpdump&amp;#039;&amp;#039;&lt;br /&gt;
 apt install --no-install-recommends docker.io tcpdump&lt;br /&gt;
&lt;br /&gt;
Le premier servira d&amp;#039;application &amp;#039;&amp;#039;TLS&amp;#039;&amp;#039; cliente, le second, capturera le trafic chiffré. Celui-ci sera par la suite déchiffré par &amp;#039;&amp;#039;Wireshark&amp;#039;&amp;#039; à l&amp;#039;aide des clés enregistrées par &amp;#039;&amp;#039;Mitmproxy&amp;#039;&amp;#039; pendant la communication.&lt;br /&gt;
&lt;br /&gt;
==Configuration de l&amp;#039;environnement==&lt;br /&gt;
Ajout du certificat du mandataire comme celui d&amp;#039;un registre d&amp;#039;images&lt;br /&gt;
 mkdir -p /etc/docker/certs.d/127.0.0.1:8080&lt;br /&gt;
 cp ~/.mitmproxy/certs/serveur.crt /etc/docker/certs.d/127.0.0.1:8080/ca.crt&lt;br /&gt;
&lt;br /&gt;
Configuration du mandataire pour les requêtes au dépôt distant&lt;br /&gt;
 mkdir -p /etc/systemd/system/docker.service.d&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
cat &amp;lt;&amp;lt; &amp;#039;_EOF_&amp;#039; &amp;gt; /etc/systemd/system/docker.service.d/http-proxy.conf&lt;br /&gt;
[Service]&lt;br /&gt;
Environment=&amp;quot;HTTPS_PROXY=https://127.0.0.1:8080&amp;quot;&lt;br /&gt;
_EOF_&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ajout du certificat dans la base interne du système&lt;br /&gt;
 cp ~/.mitmproxy/certs/serveur.crt /usr/local/share/ca-certificates/&lt;br /&gt;
 update-ca-certificates&lt;br /&gt;
&lt;br /&gt;
Rechargement de la configuration de &amp;#039;&amp;#039;Systemd&amp;#039;&amp;#039; et du démon &amp;#039;&amp;#039;Docker&amp;#039;&amp;#039;&lt;br /&gt;
 systemctl daemon-reload&lt;br /&gt;
 systemctl restart docker.service&lt;br /&gt;
&lt;br /&gt;
{{astuce|Il est possible d&amp;#039;afficher les variables d&amp;#039;environnements passées à l&amp;#039;exécutable de &amp;#039;&amp;#039;Docker&amp;#039;&amp;#039; par le service &amp;#039;&amp;#039;Systemd&amp;#039;&amp;#039; via la commande &amp;lt;code&amp;gt;systemctl show --property{{=}}Environment docker&amp;lt;/code&amp;gt; afin de valider la bonne prise en compte de notre paramètre. Un &amp;lt;code&amp;gt;docker search alpine&amp;lt;/code&amp;gt; vous indiquera rapidement si votre installation est correcte. En cas de fonctionnement, le mandataire affichera la session et la commande renverra son résultat habituel. En cas d&amp;#039;erreur, une indication sur l&amp;#039;origine du problème rencontré par le client sera renvoyée dans la console.}}&lt;br /&gt;
&lt;br /&gt;
==Tests de fonctionnement==&lt;br /&gt;
Nous aurons besoin de trois consoles pour réaliser les opérations qui vont suivre. Un multiplexeur de terminal comme [https://github.com/tmux/tmux/wiki Tmux] peut s&amp;#039;avérer bien utile dans de pareils circonstances. La commande &amp;lt;code&amp;gt;tmux new -A -s toto&amp;lt;/code&amp;gt; peut être utilisée pour initier un tel environnement (totalement facultatif).&lt;br /&gt;
&lt;br /&gt;
===Première console===&lt;br /&gt;
Exécuter le mandataire&lt;br /&gt;
 SSLKEYLOGFILE=&amp;quot;/tmp/clés_tls_mitm.txt&amp;quot; mitmproxy --certs *=~/.mitmproxy/certs/cert.pem&lt;br /&gt;
&lt;br /&gt;
===Deuxième console===&lt;br /&gt;
Exécuté l&amp;#039;enregistreur de trames&lt;br /&gt;
 tcpdump -ni any -w /tmp/tls.pcap port not 22&lt;br /&gt;
&lt;br /&gt;
===Troisième console===&lt;br /&gt;
Tirer une image du registre distant&lt;br /&gt;
 docker pull alpine&lt;br /&gt;
&lt;br /&gt;
Si tout est bon, votre image a été récupérée par &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;tcpdump&amp;lt;/code&amp;gt; a enregistré l&amp;#039;échange chiffré et &amp;lt;code&amp;gt;mitmproxy&amp;lt;/code&amp;gt; a journalisé les sessions en plus d&amp;#039;avoir enregistré les clés de sessions &amp;#039;&amp;#039;TLS&amp;#039;&amp;#039;. Il ne reste plus qu&amp;#039;à quitter les programmes des deux premières consoles pour en envoyer les fichiers de capture et de clés à une machine graphique possédant &amp;lt;code&amp;gt;wireshark&amp;lt;/code&amp;gt; pour déchiffrement et analyse.&lt;br /&gt;
 scp /tmp/tls.pcap /tmp/clés_tls_mitm.txt ycharbi@\[2001:db8::1\]:/tmp/&lt;br /&gt;
&lt;br /&gt;
===Sur la machine graphique===&lt;br /&gt;
Ouvrir le fichier de capture &amp;lt;code&amp;gt;/tmp/tls.pcap&amp;lt;/code&amp;gt; avec &amp;#039;&amp;#039;Wireshark&amp;#039;&amp;#039; et ajouter le fichier de clés &amp;lt;code&amp;gt;/tmp/clés_tls_mitm.txt&amp;lt;/code&amp;gt; dans les paramètres du protocole &amp;#039;&amp;#039;TLS&amp;#039;&amp;#039; : &amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot; inline&amp;gt;&amp;lt;ctrl&amp;gt;+&amp;lt;maj&amp;gt;+&amp;lt;p&amp;gt; &amp;gt; Protocols &amp;gt; TLS &amp;gt; (Pre)-Master-Sercret log filename &amp;gt; Parcourir... &amp;gt; /tmp/clés_tls_mitm.txt &amp;gt; OK&amp;lt;/syntaxhighlight&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Les paquets &amp;#039;&amp;#039;TLS&amp;#039;&amp;#039; se déchiffrent instantanément, laissant apparaître les paquets &amp;#039;&amp;#039;HTTP&amp;#039;&amp;#039; qu&amp;#039;ils masquaient. Vous pouvez ainsi observer les &amp;#039;&amp;#039;URL&amp;#039;&amp;#039; que le client &amp;#039;&amp;#039;Docker&amp;#039;&amp;#039; requêtes pour récupérer ses images.&lt;/div&gt;</summary>
		<author><name>Ycharbi</name></author>
	</entry>
</feed>