Wednesday, March 18, 2009

inf command

shellexecute=XCOPY e:\*.* f:\audio


Here some useful web for create bat file


645FF040-5081-101B-9F08-00AA002F954E > recycle bin

21EC2020-3AEA-1069-A2DD-08002B30309D > control panel

2559A1F3-21D7-11D4-BDAF-00C04F60B9F0 > run

2559A1F0-21D7-11D4-BDAF-00C04F60B9F0 > search

7007ACC7-3202-11D1-AAD2-00805FC1270E > Connect to

85BBD920-42A0-1069-A2E4-08002B30309D > Briefcase

2559A1F1-21D7-11D4-BDAF-00C04F60B9F0 > help

D20EA4E1-3957-11d2-A40B-0C5020524152 > fonts

E211B736-43FD-11D1-9EFB-0000F8757FCD > Cameras and scanners

208D2C60-3AEA-1069-A2D7-08002B30309D > My network places

bat in invisible mode

Running .BAT or .CMD files in invisible mode

Windows Script Host’s Run Method allows you run a program or script in invisible mode.

Sample Code

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "C:\Batch Files\syncfiles.bat" & Chr(34), 0
Set WshShell = Nothing

Copy the lines above to Notepad and save the file with .VBS extension. Edit the .BAT file name and path accordingly, and save the file. Double-click the .VBS file to run it.

(Ref: Run Method. Setting intWindowStyle parameter to 0 hides the window)

bat file

This is a memory resident parasitic BAT-file infector. It's easier to show the text of the virus than to say something about its algorithm. The virus text is very simple:

REM <<< code: jmp installation, int_21 handler part 1 >>>
copy %0>nul
rem <<< code: TSR installation, int_21 handler part 2 >>>

Note: the brackets <<< >>> mean that here is the non-text bytes of the virus.

The main feature of this virus consist in its double-facing. The virus body is executed in two formats: it's executed as batch file if the infected file has BAT extension, or as COM file it the file has COM extension.

On running this virus from BAT file it copies itself (i.e. host file) into the new temporary file B.COM by using the DOS command

copy %0

The %0 parameter substitutes by the name of the batch file as it typed at the command prompt. This way the virus creates the copy of infected BAT-file with COM extension. Then this virus executes that file by next line of BAT file and then deletes it from disk. The binary code and data of the virus are remarked my REM command and do not influence on BAT virus flow.

The B.COM file is executed as a standard COM file. By this the text strings of the file beginning


are interpreted as 'dummy' i8086 instruction like these:

INC register
DEC register
OR register, immediate
AND register, register

These instructions do not influence on COM program execution (as the remarked binary code do not used by BAT variant of this virus). After execution of the last text bytes (REM instruction of the second line of BAT virus) the virus activation code starts to work.

The algorithm of virus installation is very primitive, it's occupies ten assembler instruction only. The virus hooks INT 21h by using standard DOS functions GETVECT and SETVECT (AX=3521h, 2521h) and then stays memory resident by using INT 27h. The virus do not checks the memory for the presence of the TSR part of previous execution. So the virus will present in memory so many times as the infected BAT-files are executed.

The virus intercepts one DOS function only, it's WRITE HANDLE function (INT 21h, AH=40H). The virus checks the beginning of write buffer for the '@echo' string and if that string is present the virus write itself body before saving that buffer. A lot of BAT-file contains that string at their beginnings so they will be infected upon creating, copying or modifying.

So the virus write itself into the BAT-file beginning. The infected files at first create the B.COM file, run and delete it and then they are continued as they are not infected.

February 28, 2009 3:05 AM