蝙蝠與飛蛾的啟示

2021-04-08 22:55:49 字數 1796 閱讀 4260

我刪了防毒軟體,只用windows自帶的防火牆擋擋風雨。結果在網上晃悠幾天,電腦都成馬廄了。什麼亂七八糟的木馬都有。簡單一點的還好處理,用程序管理器找到程序,搜尋相關檔案,刪!但現在都流行dll注入的了。在程序列表裡找不到。只好查詢程序呼叫的模組。但是模組實在太多了。用tasklist   /m 命令一看,密密麻麻的幾頁呢。但我發現注入的module大多都是臨時寫寫,很少還會提供乙個版本資訊資料。而正規的程式或動態鏈結庫一般都有版本資訊的。於是就可以通過版本資訊對module的政治面目進行初步判斷了。(這是不是有點像飛蛾兩翼側的那兩個聽覺細胞?簡單對抗複雜!)呵呵!結果還真的發現了兩匹野馬!

/* this code had been complied and tested in follow enviroment:   */

/*  complier: lcc3.3           */

/* operation system: windows xp       */

/*  this sample provide some idea of trojan horse detective. */

/* so it has few exception determine.*/

#include

#include

#include

#include

#include

int winapi winmain (hinstance hinst, hinstance hpreinst, lpstr pszcmdline,int ncmdshow)

}closehandle(hsnapmodule);

hsnapmodule = createtoolhelp32snapshot(th32cs_snapmodule, pe.th32processid);

if(module32first(hsnapmodule, &me))

}closehandle(hsnapmodule);}}

sprintf(pchtemp,"/nmodbasesize  = %d; /t", pme->modbasesize);

// lstrcat(pchtemp,pme->szmodule);

lstrcat(pchtemp,text(" szexepath=/0"));

lstrcat(pchtemp,pme->szexepath);

int itemp = lstrlen(pchtemp);

if(writefile(hfile, pchtemp, itemp, null, povlap )==0)

return false;

povlap->offset += itemp;

free(pchtemp);

return true;

}sprintf(pchtemp," /n/n/ncntusage = %d; /nth32processid = %d; /ncntthreads = %d;  /nth32parentprocessid = %d; /nszexefilepath= /0",ppe->cntusage,ppe->cntthreads,ppe->th32parentprocessid);

lstrcat(pchtemp,ppe->szexefile);

int itemp = lstrlen(pchtemp);

if(writefile(hfile, pchtemp, itemp, null, povlap )==0)

return false;

povlap->offset += itemp;

free(pchtemp);

return true;

}

電梯的啟示

轉眼間已經工作大半年了,今天這個日子,寫一篇隨筆,算是對逝去的日子做乙個懷念,對未來的日子做乙個呼喚。我是去年7月份去a公司上班的,10月28日被派去了b公司工作。這裡只想對b公司的4個月的生活中很有懷念意義的爬樓梯事件留下自己的切身感悟。這個軟體園有23層,我們就在上班,也就是大家常常開玩笑時候調...

遊戲的啟示

首先推薦乙個小遊戲 遊戲的正式名稱我至今不知道,但它的規則很簡單,有點像五子棋,有點像跳棋,又有點像圍棋。可以選中一子,跳或長。長是向相鄰的格仔增長 原來的那個子不動,生 出乙個 跳是向不相鄰的格仔跳躍。到達一格後,與這格仔相鄰的所有格仔內的 敵方 的子就轉化為你的子。是不是很簡單?可是我有段時間卻...

蝴蝶的啟示

一天,乙隻繭上裂開了乙個小口,有乙個人正好看到這一幕,他一直在觀察著,蝴蝶艱難地將身體從那個小口中一點點地掙扎出來,幾個小時過去了 接下來,蝴蝶似乎沒有任何進展。看樣子它似乎已經竭盡全力,不能再前進一步了 這個人實在看得心疼,決定幫助一下蝴蝶 他拿來一把剪刀,小心翼翼地將繭破開。蝴蝶很容易地掙脫出來...