問題情景:有朋友問爲什麼他的雲服務器連續2天自動關機
分析:如果不是人爲原因造成的關機,這種必須進入系統調出系統日誌分析下才能知道。
這位朋友機器是關機狀態,跟他說必須開機並提供密碼才能進系統分析日誌定位非人爲關機原因。
他開了機,提供了root密碼爲qwer!@#$,看到這個密碼時我很驚詫,電話問他是否密碼一直是這個,他說是的。
這種十有八九不用排查了,我已經猜到怎麼回事了,這種就好比買了衣服不穿玩裸奔走光了,過來質問賣衣服的怎麼回事一樣可笑。
http://pastie.org/private/3hymqya3krcfn2xic3qikg
***讓你訪問這個鏈接,鏈接內容如下:
Your machine has been hacked, your files have been sent to a server that we control and then they were deleted. You can retrieve your files in a tarball for a price of 3 BTC.
……
大意是你的機器被黑了,趕快交錢贖回數據,否則p2p、torrent公之於衆。
舉例說明爲什麼不能設置簡單密碼,比如john可以暴力破解本地密碼,在centos中,假如我設置瞭如下幾個用戶和密碼,正好這些密碼都在暴力破解詞典裏,不到1秒就被破解了,***有更厲害的網絡暴力破解工具。
root/12345
user1/mother
user2/sister
user3/scott
user4/tiger
安裝john後,用一個password.lst就很容易破解你設置的簡單密碼,只要這個password.lst中包含了這些最簡單的密碼,那肯定就把你的密碼破解了。
# yum install gcc make auto autoconf -y
# cd
# wget http://www.openwall.com/john/j/john-1.8.0.tar.gz
# tar zxvf john-1.8.0.tar.gz
# cd john-1.8.0/src/
# make
# make clean linux-x86-64
# cd ../run
# ./unshadow /etc/passwd /etc/shadow > passwd.txt
# grep --color bash passwd.txt
# chmod 600 passwd.txt
# ./john -wordlist=password.lst passwd.txt
# ./john --show passwd.txt