Getting hacked is a serious concern. If your e-mail, Facebook, or any other social media account gets hacked, there’s a good chance that your sensitive and valuable information will end up in the wrong hands.

The ramifications are severe. Payments could be made by cybercriminals, potentially emptying your bank account, any secretive company information could get leaked and your private data could be leveraged as blackmail.

It’s important to understand how this can occur. One way involves large-scale account hacks. Recently, these sort of hacks have been committed against a number of big corporations, most notably Sony and Ashley Madison.

Millions of passwords and log-in details of its users were stolen. Since many people use the same username and password for multiple accounts, the hackers also suddenly had access to many other facets of their lives. It’s also possible to expose yourself via phishing (fake e-mails that coax the recipient into giving up their details) as well as malicious software that infiltrates your computer and gathers data in the background.

If you are the victim of hacking, try not to panic. There are a number of steps you can take to regain control and ensure that the fallout is minimal.

Reset your passwords

Immediately change the passwords of the affected accounts and any other accounts that had the same details. It’s important to get into the habit of changing your passwords on a regular basis anyway¬†but now is more urgent than ever. Also, make sure that your passwords are strong and complicated and not merely your surname with a number thrown on at the end. You need a long password that contains a mixture of upper and lowercase letters, numbers, and symbols. Since remembering multiple secure passwords is challenging, using a password manager is worthwhile, since you only have to remember a single master password.

Activate your antivirus software

If it’s malware that got into your system you’re going to need to track it down and quash it if you can. If you haven’t already (you really should have), download a solid anti-virus program and run a scan for any and all viruses. There are a number of free antivirus programs out there, but if you want a more thorough scan, it’s advisable to pay for something more high end.

Set up a two-factor authentication

This is a preventative measure for the future. A two-factor authentication is a double security system that, in addition to your usual login details, will ask you for a separate password when trying to activate your account.

The code is usually sent to you via SMS and means that even if your account is hacked in the future, the cybercriminals won’t be able to find out the second code, leading to a significantly more secure account or device. Google even offers a USB security key, taking two-factor authentication to even more stringent level of security.