Using an ATM card or online banking of a deceased person is illegal and constitutes a criminal offence. If you encounter such a situation, it is crucial to file a First Information Report (FIR) with the police and inform the bank immediately. As a legal heir, you can lodge a criminal complaint against the perpetrator, who may face charges under the Indian Penal Code.