Showing posts with label How to's. Show all posts
Showing posts with label How to's. Show all posts

Thursday, May 30, 2013

About autorun file on removable medias

Whenever one insert any media like CD in his computer, it senses the new CD and looks for a file in root of CD called autorun.inf. This is the first file gets excuted on insertion of any CD. It contains the command to be run for autoplay, and the icon to be shown while veiwing on file explorer.

It's a plain text file, which can be edited using any text editor, like notepad. It basically contains key=value pair for commands. Sample of autorun.inf file:

[autorun]
open=setup.exe
icon=setup.ico

some other commands which can be written on autorun.inf file
shellexecute=[filepath\]filename
UseAutoPlay=1

This setup.exe and setup.ico should be on root directory of CD.
To test the autorun created by you, refer to Disabling autorun autoplay, to enable autorun for any particular type of drive, for example you can enable for FIXED drives and then test on your C/D/E drives.

For more information on creation of autorun file please refer to wiki page.

Sunday, August 7, 2011

Removing Autorun Newfoder.exe virus from your system



To remove this virus please follow the below steps:
  1. Search for autorun.inf file in your computer. If it's in read only mode, then change it by right clicking on it and then in properties uncheck the "Read Only" option.
  2. Now open it in notepad and delete all data in it and save it.
  3. Don't forget to change the status to "Read only" mode , so that virus can't modify it again.
  4. Click on Start -> Run -> gpedit.msc.
  5. User configuration -> Administrative template -> system -> Turn off autoplay -> Enable ( For all drives) refer to this link for more detail.
  6. Start-> Run->msconfig
  7. Startup tab & services -> search regsvr.exe and un-check all and click OK.
  8. select exit without restart.
  9. Control panel -> Scheduled tasks -> delete the Atl task, if listed there.
  10. Start -> run -> regedit
  11. Edit ->find -> search for regsvr.exe. Delete all regsvr.exe occurrences.
  12. Don't delete Explorer.exe if regsvr.exe appears with it. Delete only regsvr.exe.
  13. Goto [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] and modify value in Shell = Explorer.exe regsvr.exe and delete regsvr.exe from here.
  14. Now search for all occurrences of regsvr.exe in your system and delete them.
  15. Search for "svchost .exe" ( remember space between svchost & .exe) and delete all occurrences.
  16. Also search for "*.exe" and remove all virus affected files, don't remove any legitimate file( any installer file).
  17. Restart the system and enjoy..

For more detail on handling autorun.inf file, if you have option set for "don't show hidden files" and you are not able to see autorun.inf file then use following link for removing autorun.inf file.

Some more links you may be interested in:

Disabling Autorun/Autoplay using Registry editor


To get rid off virus affecting your system because of autoplay of drives please use below steps:
1. Type regedit on run prompt.
2. Navigate to below location:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
3. you will find a key value as "NoDriveTypeAutoRun" , which is one byte value.
4. Please set the value of key as "95" Hex value to disable autorun on removable media and Network drives.

Regedit
5. Be very careful while modifying reg values. Below table will explain you to understand the meaning of bits to set for disabling any type of media.

Value              Meaning
0x1/0x80   Disables AutoRun on drives of unknown type
0x4            Disables AutoRun on removable drives
0x8            Disables AutoRun on fixed drives
0x10          Disables AutoRun on network drives
0x20          Disables AutoRun on CD-ROM drives
0x40          Disables AutoRun on RAM disks
0xFF         Disables AutoRun on all kinds of drives


If any of the bit is set into this hex valye, that type of drive will be disabled for autorun.
Bit    Type of Drive
0/7    UNKNOWN

1       NO ROOT DIR
2       REMOVABLE
3       FIXED
4       REMOTE
5       CDROM
6       RAMDISK

For setting values you must always add 0x80 to the value of drive you want to set for.
A few examples for setting values:
for removable drives: 0x80 + 0x04 = 0x84 ( Hexadecimal addition)
for removable & fixed drives : 0x80 + 0x04 + 0x08 = 0x8C
for removable + fixed drives +CD ROM = 0x80 + 0x04 + 0x08 +0x20 = 0xAC(1010 1100)


For changing Autorun option using Group policy please refer to following links:

Disabling autoplay option in Windows XP using Group Policy
turning-off-autoplay-on-all-drives


Disabling autoplay option in Windows XP using Group Policy

Use following option to disable autoplay in ur system:
1. type gpedit.msc in run window and enter.
2. then goto Computer configuration->Administrative template -> System 




3. Then in right side u will find Turn off autoplay 





4. Double click on that and check "enabled" and select for "all drives"




5. Now click on apply and OK.
6. Similarly follow above steps step 3 to step 5 for 
    User configuration ->Administrative template -> System 


7. This setting for "User Configuration" is must. 


Steps for Advanced Users / System Admins:
if you want to Modify using registry edit then please goto this link.
Disabling Autoplay_Autorun using Registry editor for Advanced Users


Now when you insert any pendrive or any other media it will not be played automatically and you will be safe from Viruses.



Wednesday, March 30, 2011

LS: unix command for listing files and directories

ls is a command to list files and directories in Unix and unix like systems.

if it is invoked without any arguments then will list files and folders in current working directory in bare format. In this bare format its difficult to distinguish files and folders and other parameters.
FORMAT: ls [Options] [Filename]
Following are the most common options to be used with "ls".
-a :  Include all files even which are starting with "."(Hidden files in Unix ), by default they are ignored.
-l  : Long format, lists permissions in unix format, size, owner , date modified etc.
-F : Appends a character to reveal the type of file e.g. * for executables '/' for directory
-R : list recursively all the directories and files
-d : list directories instead of content
-t : sort by modification time
-h : Print size in human readable format like 1M, 4G ( Use with -l)

Example: 
For listing files and directories with their parameters like size permissions and all.
> ls -l 
For listing in as ls -l along with size in human readable format..
>ls -h -l

Note: ls can also be used in windows environment with cygwin installation.

CACLS command for windows changing mode permission


It is a command line utility which displays and modify Access Control Lists (ACLs) in windows environment(Microsoft windows NT) of files and folders. An Access Control List is a list of permissions for securable object, such as a file or folder, that controls who can access it.
 
XCACLS.exe : It's a updated version for cacls for windows 2000 and later.
 
CACLS filename [/T] [/E] [/C] [/G user:perm] [/P user:perm [...]] [/D user [...]]
 
Options:
filename: Name of the file to be modify ( * wildcard for all files )
/T            Changes ACLs of specified files in the current directory and all subdirectories.
/E            Edit ACL instead of replacing it.
/C            Continue on access denied errors.
/G user:perm  Grant specified user access rights.
/P user:perm  Replace specified user's access rights.
/D user       Deny specified user access.--
 
Perm can be:
N  None
R  Read
W  Write
C  Change (write)
F  Full control
 
Examples:
1: to replace ACL with Full access permission to current directory and all subdirectories for user "test"
>cacls * /T /P test:F
2. To edit ACL for particular user "test" with Change access for abc.text file without changing other permission.
> cacls abc.text /E test:C
 
Also look for chmod a linux command for changing file permissions.
 

Tuesday, March 8, 2011

Sending AT commands using microsoft hyperTerminal

MS Hyperterminal is a small program which can be used for sending AT commands to ur GSM/3G phone connected as modem to ur PC. For linux users minicom can be used as HyperTerminal.
for getting hyper terminal in windows Vista and 7 use this link
Hyperterminal can be found in start->programs->accessories->communications->Hyperterminal

You should first check ur device whether it's connected properly, and working fine or not.

Now you should set up ur device as modem. In Hyper terminal you can start a new connection and select the com port where your device is appearing (check in device manager).

Now you can send the AT commands to ur device.

Now you should Type "AT" in the main window.
A response "OK" should be returned from the modem.
Now type "AT+CPIN?" in the main window.
The AT command "AT+CPIN?" is used to query whether the modem is waiting for a PIN ( i.e. password). If the response is "+CPIN: READY", it means the SIM card doesn't require a PIN and its ready for use.
else you can set the PIN using "AT+CPIN=<pin>"



Alternatives for Hyper Terminal in windows vista and Windows7

for getting hyper terminal in windows Vista and 7 use this link or you can use following options:

> windows remote shell (WinRS)
> use phone and modem options if you are using Hyperterminal for modem connections (AT Command).
> Can use Putty also. Download putty.exe

For getting more info on WinRS type "winrs /?" in your command prompt.

Saturday, July 10, 2010

Get more detailed Info on your computer

Hi,
I know you want to know details about your computer's directx componets and their drivers are installed, and what they are using. this tool lets you diagnose problems and change your system settings to best. So to check more detailed info on your computer, which is not even available on My computer->Properties section, Follow the steps:
1. Open RUN Prompt.
2. type dxdiag and enter
3. Make sure you have original version version of XP because it will propmt for that.
4. Once it opens up it will show information on : System, DirectsX Files, Music, Display, Sound, Input devices etc..
5. To save this info click on "Save all information" and select the location. Information will be saved in form of .txt file.

Creating folder wothout any name

you will be wondering, how to create a folder without any name.. Have you ever tried it?? If no then try it now..

Here is the solution for this..
1. Create a folder in any directory.
2. Right click on folder and select "Rename folder" or press F2
3. Now press Alt and Type 255(ALT+255) or ALT+0160
4. Now it's done.

Monday, June 28, 2010

Turning OFF Autoplay on All Drives using Group Policy

To disable Auto play of External Drives or Internal Drives or removable Disks please follow steps below mentioned. It's actually useful to disable Auto Play so that you will not get affected by any kind of virus which gets transfered via PenDrives or external drives. Also will avoid attack of autorun.inf virus.

  • Click on Start and open run.
  • Now type gpedit.msc, and Enter.
  • Now go to "User Configuration" -> "Administrative templates" -> "System" -> "Turn Off Autoplay"
  • Now select Enable and Select "turnoff autoplay on 'All Drives' ".
  • Select OK and Now you are Done!! 
Check This Link for details on how to remove autorun.inf virus

    Monday, June 14, 2010

    Restoring mozilla's bookmarks

    Firefox 3 no longer uses bookmarks.html to store the bookmarks. It stores the bookmarks and the browser history in places.sqlite and no longer creates a HTML backup by default instead there are also JSON backups in the bookmarkbackups folder within the Firefox profile folder.
    Check for backups in following path : 
    C:\Documents and Settings\<User Name>\Application Data\Mozilla\Firefox\Profiles\<some  folder>\bookmarkbackups


    See Lost_Bookmarks (MozillaZine KB)
    You can export the bookmarks in Firefox to a HTML file: Bookmarks > Organize Bookmarks > Import & Backup > Export HTML
    You can also create a JSON backup: Bookmarks > Organize Bookmarks > Import & Backup > Backup

    If migrating to new account , then just copy the latest JSON file to new account's bookmarkbackup folder and restore it in mozilla.
    You should restore a JSON backup: Bookmarks > Organize Bookmarks > Import & Backup > Restore-> Choose file
     Restoring a JSON backup will replace all existing bookmarks. You can merge bookmarks if you import a HTML backup.

    A HTML backup doesn't support tags and annotations, so if you want to preserve those then you need to use a JSON backup.

    Wednesday, June 9, 2010

    How to remove autorun virus from Hard disk or How to open HDD by double click

    Some time you are not able to open your hard disk drives(HDD) by double clicking, so to enable that please follow following procedures:
    > open command prompt
    > type and enter "cd\", this will take you to the root of C: Drive
    > type "attrib -h -r -s autorun.inf" and enter
    > now type and enter "del autorun.inf" to delete autrun.inf file
    > Similarly follow same steps for all the drives and then restart your computer
    > Same steps can also be followed for pendrives or removable media.

    > Now just enjoy the freedom of double clicking.

    Tuesday, May 11, 2010

    Enabling Task Managaer disabled by Virus

    Method 1:
    > Open Run window and type gpedit.msc and click ENTER.
    > Now Goto location: User Configurations/Administrative Templates/System/Ctrl+Alt+Del Options

    > Double click on Remove Task Manager on right side Pane. And select the value as "Not Configured" as follow.

    Method 2:
    > start "RUN" Window and type regedit and Enter
    > GoTo this registry index: HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies\ System
    > In the right pane, find and delete the value named as DisableTaskMgr 
    > Close  Registry Editor

    Tuesday, January 19, 2010

    How to get "open command prompt" in context menu or right click

    There are two ways to get open command prompt or open shell for any particular folder. When you click on a particular folder then you may want to get "open command prompt"  option in context menu for getting command prompt at that location to avoid doing C:\>cd <folder>.

    First Method: (XP/VISTA/Windows 7)
    1. Click Start, and then click Run.
    2. In the Open box, type regedit, and then click OK
    3. Goto the key under "\HKEY_CLASSES_ROOT\Folder" and right click on "shell" say "new->key" and name it as "Command_prompt" and give name for default key value as "Open Command Prompt ".


       4. Right click on Command_prompt and say "new->key" with name "command".
       5. Double click on name "default" for command sub key and give value as     C:\WINDOWS\system32\cmd.exe "%1"



    Now you can see Open Command Prompt when you right click on any folder.


    Another method for windows XP is
    1. open My Computer -> Tools -> Folder Options
    2. Goto "File Types" Tab
    3. Select "Folder" Type
    4. Click "Advanced"
    5. New -> Action : "Open Command Prompt", application used  to perform Action: Browse : C:\WINDOWS\system32\cmd.exe




    Press OK and you are done.