In the unfortunate case your metamask got compromised what is the next thing to do?
Well the next step also depends how your metamask got compromised?
In most general terms I can classify this in two broad categories.
Check the damage
Though this can be left for later but it could be reassuring to see if your funds are safe.
For this open your metamask and check under the activity section
If there are no out word movement of funds that is a good sign and you can do a number of things to protect your funds.
steps to do if you clicked on a phishing link
The way this would work is you click on a phishing link or connect your metamaskwallet to a suspicious site.
This way it has access to your wallet an may prompt you to authorize the transaction.
So it is very important to double check how much funds you are sending and to whom.
Sometimes some sites prompt you to sign a transaction but in this garb withdraw your funds when you think you are only signing a transaction and not authorizing a fund transfer.
Use the lock out option
Under your account there is a lock option that would lock you and anyone else from the metamask instance.
This should work for phishing scams as the person or bot behind the scam would not have access to your password (unless you give it to them).
To protect your funds you can revoke access that you may have inadvertently granted to a site.
how to revoke access to a site
Use the 3 dots to access the menu which shows the site list to whom you have given access to metamask wallet.
View the connected sites
By clicking on the connected site list you would get a list like the following
This list shows the sites that have been granted access by you.
Click on the click bin icon for sites to which you want to revoke access to.
Send out your funds and assets
Sent out your funds and assets to another wallet so that someone cannot use your funds and NFT's to his her own wallet.
This steps is specially useful if you feel someone has access to your private keys.
Get your self a hardwarewallet
Securing your funds with a hardware wallet is a good way to minimize the risk of loss.
A hardware wallet is a handy device which would protect your funds and ask you to validate each and every out going transaction.