Employer harassing and not paying salary

Dear Sir, I am employed with a big company. The HR of the company is known to harass employees and has a big ego. In the bangalore office they had installed a bio metric system, to trac employee attendance. However, no induction was given as to how to use the system. Anyway, for the last 10 months I have been employed with the company. I got my salary as per expectations until last month. A few days back I got an email from the head - hr that the bio metric system shows the my attendance is missing for the entire month of Jan and some parts of feb and march. This mail was sent to me in July. My boss has acknowledged that I was working in all these months, and I do not know why or how the biometric system is missing my attendance for Jan. Also, if my attendance was missing for an entire month, the HR should have informed me in January itself and I would have corrected my actions. However, I did not get any intimation from the HR for the same. Suddenly the HR says that they would not be paying me for the next three months because of the missing attendance details in the earlier months. I was working hard, even on weekends during these months, and did not take more than 3 day of leaves in the entire year. However just because I did not punch ( bio metric is not mentioned in my offer letter) or because there was an error in the bio metric system, I am not getting paid for my hardwork. On the top of that, this has caused me great stress and harassment. Please advice what legal action can I take ?