In the evening, the Maharashtra Police department said it was partially hit by the ransomware.
"Cyber experts have been engaged to fix the systems," a senior police officer said.
The red-coloured 'critical alert' was issued by the Computer Emergency Response Team of India (CERT-In), the nodal agency to combat hacking, phishing and to fortify security- related defences of the Indian Internet domain.
"It has been reported that a new ransomware named as Wannacry is spreading widely. Wannacry encrypts the files on infected Windows systems. This ransomware spreads by using a vulnerability in implementations of server message block (SMB) in Windows systems.
More From This Section
It said the ransomware called 'WannaCry' or 'WannaCrypt' encrypts the computer's hard disk drive and then spreads laterally between computers on the same local area network (LAN).
"The ransomware also spreads through malicious attachments to emails," it said.
A huge extortion cyber attack had hit dozens of nations yesterday, holding computer data for ransom at hospitals, telecommunications firms and other companies.
Following the alert, the Gujarat government began equipping its state computer systems with anti-virus softwares and upgrading its Microsoft operating systems.
Computers linked to the Gujarat State Wide Area Network (GSWAN), one of country's largest IP-based IT infrastructure connecting taluka-level government offices to the state capital with around 45,000 computers, are being monitored closely, said Science and Technology Department Secretary Dhananjay Dwivedi.
The cyber sleuths agency advised users to apply patches to their Windows systems in order to prevent its infection and spread.
The ransomware virus is such lethal and smart that "it also drops a file named '!Please Read Me!.Txt' which contains the text explaining what has happened (to the computer) and how to pay the ransom."
'WannaCry' encrypts files with the following extensions, appending .WCRY to the end of the file name like .Lay6, .Sqlite3, .Sqlitedb, .Accdb, .Java and .Docx among others.
Check regularly for the integrity of the information stored in the databases, regularly check the contents of backup files of databases for any unauthorised encrypted contents of data records, do not open attachments in unsolicited emails even if they come from people in your contact list and never click on a URL contained in an unsolicited email, even if the link seems benign.
"In cases of genuine (universal resource locators) URLs, close out the email and go to the organisation's website directly through browser," it said.
The most important advisory by the CERT-In stated "individuals or organisations are not encouraged to pay the ransom as this does not guarantee files will be released.