首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Linux write() & exit(0) shellcode genearator with customizable text
来源:hack2web.altervista.org 作者:Stoke 发布时间:2010-04-21  

#!/usr/bin/python
# Linux write() & exit(0) shellcode genearator with customizable text
# Usage: ./generator <msg>
# Author: Stoke
# Tested on: Ubuntu 8.10
# E-mail: stoke95[at]yahoo[dot]it
# Web: hack2web.altervista.org
# Visit: blasterhacking.forumcommunity.net

import re, sys

def str2hex(string):
msg = ''
for n in string:
msg += r"\x"+hex(ord(n))[2:]
return msg


if len(sys.argv) != 2:
print "Usage: ./shellgen <msg>"
sys.exit(0)

shell = r"\xeb\x11\x31\xc0\xb0\x04\xb3\x01\x59\xb2"
shell1 = r"\xcd\x80\xb0\x01\x31\xdb\xcd\x80\xe8\xea\xff\xff\xff"

strlen = hex(len(sys.argv[1]))
hstrlen = strlen.replace("0x",r"\x")
if len(hstrlen[2:]) < 2:
hstrlen = r"\x0"+hstrlen[2]
msg = str2hex(sys.argv[1])
print shell+hstrlen+shell1+msg


 
[推荐] [评论(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
  相关文章
·Acritum Femitter v1.03 Directo
·Speed Commander 13.10 (.zip) M
·Mongoose Web Server v2.8 Multi
·Mozilla Firefox/Thunderbird/Se
·MultiThreaded HTTP Server v1.1
·Multiple Browsers Audio Tag Do
·MultiThreaded HTTP Server v1.1
·ZipGenius zgtips.dll Stack Buf
·HP Operations Manager <= v8.16
·bds/x86-bindshell on port 2525
·EasyFTP Server <= 1.7.0.2 CWD
·linux/x86 setreuid(0, 0) & exe
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved