<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Shell | AlexIn Tech</title><link>https://alexin.tech/fr/tag/shell/</link><atom:link href="https://alexin.tech/fr/tag/shell/index.xml" rel="self" type="application/rss+xml"/><description>Shell</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>fr</language><lastBuildDate>Fri, 17 Dec 2021 00:00:00 +0000</lastBuildDate><image><url>https://alexin.tech/media/icon_hu_69c804372a707b16.png</url><title>Shell</title><link>https://alexin.tech/fr/tag/shell/</link></image><item><title>Log4J scanner en PowerShell &amp; Shell pour Windows et Linux</title><link>https://alexin.tech/fr/2021/12/17/log4j-scanner-en-powershell-shell-pour-windows-et-linux/</link><pubDate>Fri, 17 Dec 2021 00:00:00 +0000</pubDate><guid>https://alexin.tech/fr/2021/12/17/log4j-scanner-en-powershell-shell-pour-windows-et-linux/</guid><description>&lt;div class="article-story">
&lt;h1 id="log4j-scanner-en-powershell--shell-pour-windows-et-linux">Log4J scanner en PowerShell &amp;amp; Shell pour Windows et Linux&lt;/h1>
&lt;p>Hello ! Alors aujourd&amp;rsquo;hui je voulais juste vous partager un petit scanner de vulnérabilités qui a été développé par l&amp;rsquo;entreprise Genevoise &lt;a href="https://www.e-xpertsolutions.com/" target="_blank" rel="noopener">e-Xpert Solutions&lt;/a> et qui permet de détecter les vulnérabilités liées à Log4J pour vos serveurs .&lt;/p>
&lt;p>&lt;a href="https://github.com/e-XpertSolutions/atdefense-research" target="_blank" rel="noopener">https://github.com/e-XpertSolutions/atdefense-research&lt;/a>&lt;/p>
&lt;p>Ce script a été développé par :
&lt;a href="https://github.com/peacand" target="_blank" rel="noopener">Michael Molho&lt;/a>
David Routin&lt;/p>
&lt;p>Et j&amp;rsquo;ai contribué à ce projet en ajoutant le check de la version 2.15 qui contient un faille de type DoS.
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="github-contributor" srcset="
/fr/2021/12/17/log4j-scanner-en-powershell-shell-pour-windows-et-linux/image_hu_72441eec43a25a0.webp 400w,
/fr/2021/12/17/log4j-scanner-en-powershell-shell-pour-windows-et-linux/image_hu_d12ddba33affff4c.webp 760w,
/fr/2021/12/17/log4j-scanner-en-powershell-shell-pour-windows-et-linux/image_hu_9797acdc25320c2f.webp 1200w"
src="https://alexin.tech/fr/2021/12/17/log4j-scanner-en-powershell-shell-pour-windows-et-linux/image_hu_72441eec43a25a0.webp"
width="235"
height="137"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>Ouai je suis assez fier pour le coup, car je n&amp;rsquo;avais encore jamais participé à un projet sur GitHub. Donc de voir mon nom dans les &amp;ldquo;Contributors&amp;rdquo;, ça fait plaisir.&lt;/p>
&lt;p>&lt;em>Update 20.12.2021 : La version 2.16 est aussi vulnérable à une faille de type DoS, j&amp;rsquo;ai effectué une nouvelle pull request afin de maj le script PowerShell.&lt;/em>&lt;/p>
&lt;p>Voici comment l&amp;rsquo;utiliser sur Windows :&lt;/p>
&lt;ol>
&lt;li>Tu télécharges handle.exe (un outil des sysinternals) ici : &lt;a href="https://docs.microsoft.com/en-us/sysinternals/downloads/handle" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/sysinternals/downloads/handle&lt;/a>&lt;/li>
&lt;li>Tu déposes le script sur ton serveur&lt;/li>
&lt;li>Tu le lances en admin en utilisant cette commande :&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-powershell" data-lang="powershell">&lt;span class="line">&lt;span class="cl">&lt;span class="n">powershell&lt;/span> &lt;span class="n">-ExecutionPolicy&lt;/span> &lt;span class="n">Bypass&lt;/span> &lt;span class="o">-File&lt;/span> &lt;span class="n">log4find&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="py">ps1&lt;/span> &lt;span class="n">-HandlePath&lt;/span> &lt;span class="p">&amp;lt;&lt;/span>&lt;span class="n">handle&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">exe_filepath&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Et tu auras des résultats colorés :&lt;/p>
&lt;ul>
&lt;li>vert : t&amp;rsquo;es bon&lt;/li>
&lt;li>rouge : attention, tu as une ou les deux vulnés sur ton serveur&lt;/li>
&lt;li>jaune : le check n&amp;rsquo;a pas réussi, vas faire un check à la mano.&lt;/li>
&lt;/ul>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img src="./featured.png" alt="Capture d&amp;rsquo;écran PoSh Log4Find" loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>Dans le cas ou le check a raté, je te conseille d&amp;rsquo;utiliser &amp;ldquo;everything&amp;quot;de &lt;a href="https://www.voidtools.com/" target="_blank" rel="noopener">voidtools&lt;/a> . C&amp;rsquo;est un search engine pour Windows qui est vraiment incroyable de part sa vitesse.&lt;/p>
&lt;p>Pour utiliser Everything, il te suffit de le lancer en admin et ensuite tu tapes ta recherche.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">log4*
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>L&amp;rsquo;&lt;strong>astérisque&lt;/strong> &amp;ldquo;*&amp;rdquo; sert de wildcard.
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="everything screenshot" srcset="
/fr/2021/12/17/log4j-scanner-en-powershell-shell-pour-windows-et-linux/image-1_hu_f9a657d8e5cebe1.webp 400w,
/fr/2021/12/17/log4j-scanner-en-powershell-shell-pour-windows-et-linux/image-1_hu_fd511ab9175bad4e.webp 760w,
/fr/2021/12/17/log4j-scanner-en-powershell-shell-pour-windows-et-linux/image-1_hu_5cabb5cb13a48b88.webp 1200w"
src="https://alexin.tech/fr/2021/12/17/log4j-scanner-en-powershell-shell-pour-windows-et-linux/image-1_hu_f9a657d8e5cebe1.webp"
width="760"
height="248"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>Dans mon cas, y a pas de java sur ma machine, juste 1000 scripts PowerShell et des fichiers/dossiers en lien avec ces scripts de détection de Log4J.&lt;/p>
&lt;p>Voilà. enjoy !&lt;/p>
&lt;/div></description></item></channel></rss>