一、首先理解一下網(wǎng)站日志 以下內(nèi)容是直接從百度搜索得來的,目的是讓大家簡單的理解什么是網(wǎng)站日志、網(wǎng)站日志的作用以及如何查看網(wǎng)站日志。 1、什么事網(wǎng)站日志? 網(wǎng)站日志是記載web效勞器接納處置懇求以及運轉(zhuǎn)時錯誤等各種原始信息的以.log結(jié)尾文件。 2、網(wǎng)站日志的作用是什么? 經(jīng)過網(wǎng)站日志能夠分明的得知用戶在什么IP、什么時間、用什么操作系統(tǒng)、什么閱讀器、什么分辨率顯現(xiàn)器的狀況下訪問了你網(wǎng)站的哪個頁面,能否訪問勝利。 關(guān)于專業(yè)從事搜索引擎優(yōu)化工作者而言,網(wǎng)站日志能夠記載各搜索引擎蜘蛛機器人匍匐網(wǎng)站的細致狀況,例如:哪個IP的百度蜘蛛機器人在哪天訪問了網(wǎng)站幾次,訪問了哪些頁面,以及訪問頁面時返回的HTTP狀態(tài)碼。 長期剖析網(wǎng)站日志中的HTTP狀態(tài)碼可以發(fā)現(xiàn)對網(wǎng)站不利的細節(jié)局部,使網(wǎng)站管理人員更好地管理和優(yōu)化網(wǎng)站。 3、如何查看網(wǎng)站日志? 網(wǎng)站日志普通寄存在網(wǎng)站根目錄下的“l(fā)og文件夾”或“l(fā)ogfiles文件夾”,文件夾稱號視各虛擬主機提供商不同而不同。能夠經(jīng)過FTP工具將網(wǎng)站日志下載下來,經(jīng)過txt文檔方式查看。不同的空間提供的日志內(nèi)容的方式可能會不同。日志文件中會有很多數(shù)字,其代表的意義請本人搜索,這里就不陳說了。 二、從網(wǎng)站日志剖析黑客如何入侵網(wǎng)站 翻開我的網(wǎng)站某一天的網(wǎng)站日志,里面和黑客行為有關(guān)的記載主要觸及到以下幾個方面: 1、嘗試訪問各種網(wǎng)頁編輯器文件,從而試圖得到上傳文件的方式或登錄方式
<table style=\"BORDER-RIGHT: #0099cc 1px solid; TABLE-LAYOUT: fixed; BORDER-TOP: #0099cc 1px solid; BORDER-LEFT: #0099cc 1px solid; BORDER-BOTTOM: #0099cc 1px solid\" cellspacing=\"0\" cellpadding=\"6\" width=\"95%\" align=\"center\" border=\"0\"> <td style=\"WORD-WRAP: break-word\" bgcolor=\"#ddedfb\"> /lavery_Edit/yxbsadmin_login.asp - - /lavery_Edit/admin_login.asp - - /CmsEditor/mzkoadmin_login.asp - - /CmsEditor/admin_login.asp - - /newsadmin/ubb/uxfmadmin_login.asp - - /newsadmin/ubb/admin_login.asp - - /asp_bin/webeditor/bogiadmin_login.asp - - /asp_bin/webeditor/admin_login.asp - - /admin/webeditor/zibbadmin_login.asp - - /admin/webeditor/admin_login.asp - - /manage/webeditor/zxpradmin_login.asp - - /manage/webeditor/admin_login.asp - - /webeditor/nkmxadmin_login.asp - - /webeditor/admin_login.asp - - /admin/SouthidcEditor/upheadmin_login.asp - - /admin/SouthidcEditor/admin_login.asp - - …… /hsvqFCKeditor/editor/filemanager/connectors/asp/upload.asp - - /FCKeditor/editor/filemanager/connectors/asp/upload.asp - - /FCKeditor/editor/filemanager/connectors/asp/upload.asp - - /kceeFCKeditor/editor/filemanager/connectors/asp/upload.asp - - /FCKeditor/editor/filemanager/connectors/asp/upload.asp - - /FCKeditor/editor/filemanager/connectors/asp/upload.asp - - …… (還有很多,限于篇幅省略了一局部記載) 從上面的記載,能夠看出,黑客訪問了目前常見各種網(wǎng)頁編輯器的登錄頁面和上傳頁面,假如這些頁面訪問勝利,那么黑客就能夠經(jīng)過默許的用戶名、密碼嘗試登錄或者上傳木馬、病毒文件,從而得到他們想要的東西。 2、直接訪問程序自帶的登錄文件或上傳文件 <table style=\"BORDER-RIGHT: #0099cc 1px solid; TABLE-LAYOUT: fixed; BORDER-TOP: #0099cc 1px solid; BORDER-LEFT: #0099cc 1px solid; BORDER-BOTTOM: #0099cc 1px solid\" cellspacing=\"0\" cellpadding=\"6\" width=\"95%\" align=\"center\" border=\"0\"> <td style=\"WORD-WRAP: break-word\" bgcolor=\"#ddedfb\"> /nhhlmanage/login.asp - - /fuqcmanage/login.asp - - /manage/login.asp - - …… /ltgiupfile_flash.asp - - /upfile_flash.asp - - /images/uppic.asp - - /admin/ougkupfile_flash.asp - - /admin/upfile_flash.asp - - /admins/dzqiupfile_flash.asp - - /include/kmbhupfile_flash.asp - - /include/upfile_flash.asp - - /admin/ddhxuppic.asp - - /admin/uppic.asp - - /images/mqpmuppic.asp - - …… (還有很多,限于篇幅省略了一局部記載) 訪問這些文件的目的和上面一項是一樣的。 3、直接訪問數(shù)據(jù)庫(主要是ACCESS方式的數(shù)據(jù)庫) <table style=\"BORDER-RIGHT: #0099cc 1px solid; TABLE-LAYOUT: fixed; BORDER-TOP: #0099cc 1px solid; BORDER-LEFT: #0099cc 1px solid; BORDER-BOTTOM: #0099cc 1px solid\" cellspacing=\"0\" cellpadding=\"6\" width=\"95%\" align=\"center\" border=\"0\"> <td style=\"WORD-WRAP: break-word\" bgcolor=\"#ddedfb\"> /hamsadmin/Databackup/New_Backup.mdb - - /admin/Databackup/New_Backup.mdb - - /uvrhGamedata/9s9djasn210dasj2.asa - - /Gamedata/9s9djasn210dasj2.asa - - /qmiwGamedata/sdfsdfaaddsfedsffdsggfhhdf.asa - - /Gamedata/sdfsdfaaddsfedsffdsggfhhdf.asa - - /adminn/Databackup/New_Backup.mdb - - /lwjcadmin863/Databackup/New_Backup.mdb - - /admin863/Databackup/New_Backup.mdb - - /admin520/Databackup/New_Backup.mdb - - …… /msmir_net.mdb - - /gxtpztqdata.mdb - - /ztqdata.mdb - - /zt/ztqdata.mdb - - /msmir/adrkmsmir.mdb - - /msmir/sdxdmsmir.mdb - - /msmir/msmir.mdb - - …… (還有很多,限于篇幅省略了一局部記載) 數(shù)據(jù)是網(wǎng)站的中心內(nèi)容之一,假如獲取了網(wǎng)站的數(shù)據(jù)庫,那相當(dāng)于得到了一半的網(wǎng)站,其重要性不須多說。 4、直接訪問網(wǎng)站的備份 <table style=\"BORDER-RIGHT: #0099cc 1px solid; TABLE-LAYOUT: fixed; BORDER-TOP: #0099cc 1px solid; BORDER-LEFT: #0099cc 1px solid; BORDER-BOTTOM: #0099cc 1px solid\" cellspacing=\"0\" cellpadding=\"6\" width=\"95%\" align=\"center\" border=\"0\"> <td style=\"WORD-WRAP: break-word\" bgcolor=\"#ddedfb\"> /aoplweb.rar - - /web.rar - - /qudxwww.rar - - /www.rar - - /qdvbwwwroot.rar - - /wwwroot.rar - - /ulvdcompany.rar - - /ylzocompany.rar - - /company.rar - - /mfssWorldClient.rar - - /WorldClient.rar - - /mirserver.rar - - /rrxwbbs.rar - - /krbfbbs.rar - - /bbs.rar - - /home.rar - - /www.zip - - /wwroot.zip - - /1.rar - - /11.rar - - /2.rar - - /2222.rar - - /00.rar - - /新建文件夾.rar - - /網(wǎng)站.rar - - /新區(qū).rar - - /備份.rar - - /效勞器.rar - - /數(shù)據(jù)庫.rar - - /FXP.rar - - /FlashFtp.rar - - /Ftp.rar - - /myziFtp.zip - - …… (還有很多,限于篇幅省略了一局部記載) 很多站長都有備份網(wǎng)站的習(xí)氣,但是備份的時分只是將整個網(wǎng)站簡單的緊縮到根目錄下,如此一來,黑客只需將這個備份下載,便能夠很簡單的得到你網(wǎng)站的全部內(nèi)容了 5、訪問網(wǎng)站的robots.txt文件 robots.txt是搜索引擎中訪問網(wǎng)站的時分要查看的第一個文件。當(dāng)一個搜索蜘蛛訪問一個站點時,它會首先檢查該站點根目錄下能否存在robots.txt,假如存在,搜索機器人就會依照該文件中的內(nèi)容來肯定訪問的范圍;假如該文件不存在,一切的搜索蜘蛛將可以訪問網(wǎng)站上一切沒有被口令維護的頁面。 robots.txt對搜索引擎友好,但是由于其內(nèi)容規(guī)則了搜索蜘蛛能夠訪問的頁面和不能訪問的頁面,那么黑客得到robots.txt文件,很容易就曉得了你網(wǎng)站的后臺文件寄存在什么目錄、一些其他的程序文件寄存在什么目錄,只需曉得了這些目錄,對其入侵網(wǎng)站就提供了指導(dǎo),防止了自覺的嘗試工作。 三、從根底工作做好預(yù)防黑客入侵 上面剖析了黑客入侵網(wǎng)站種種方式,這些方式固然都是些簡單的方式,但是卻是最常用的方式,所以我們應(yīng)該防止網(wǎng)站在這些方面被黑客隨便的入侵。那么,針對上面的入侵方式,我們就能夠得出應(yīng)對戰(zhàn)略: 1、網(wǎng)站程序運用網(wǎng)頁編輯器應(yīng)更改編輯器的默許目錄,刪除登錄文件。 2、網(wǎng)站程序本身的管理目錄應(yīng)設(shè)置的復(fù)雜,不要運用常見的“admin”、“manage”等稱號作為目錄稱號;程序本身運用的上傳文件應(yīng)防止運用簡單的“upfile”、“upload”等稱號做文件名或目錄名 3、網(wǎng)站的數(shù)據(jù)庫目錄、數(shù)據(jù)庫文件名盡量設(shè)置的復(fù)雜。 4、備份網(wǎng)站不要直接將備份文件放到網(wǎng)站的根目錄下,備份的稱號也不要運用簡單的“web”,“wwwroot”等稱號。 5、robots能不要就不要了,固然說是對搜索引擎不友好,但是這個文件的確不是什么必需的文件。