Think you've been hacked? What to do first

Stop entering passwords or payment details on a device you suspect is infected. If it belongs to your employer or school, contact its IT or security team through a known channel. For your own device, start by identifying what happened: a browser warning, an account alert, and files being encrypted call for different responses.

This guide organizes public guidance from the UK NCSC, Microsoft, Google, and the joint CISA-led StopRansomware Guide. Source review updated November 25, 2026. The review covers first response, account recovery, device cleanup, and escalation. It does not establish what happened on your device; that requires your alerts, account records, and, where needed, an investigation.

Choose the response that matches the evidence

What you see First action What to establish next
A browser page says you have a virus and must call a number. Close the browser; use independently found support if needed. Did you only view it, or also install software, share information, or permit remote access?
An unexpected sign-in alert or changed account settings. Open the service's official app or website independently and review security activity. Was access successful, and do you recognize the device and changes?
An antivirus detection or a suspicious program you ran. Stop sensitive activity; notify IT on a managed device. What did the security product detect, and did it block, quarantine, or fail to remove it?
A ransom note, newly unreadable files, or several affected devices. Coordinate immediate network isolation and get response help. Which devices, shared files, and accounts are affected?

A warning displayed inside a website can be a support scam. Microsoft advises closing the browser and ignoring phone numbers in such warnings. Account alerts should be checked against the provider's security activity, as Google's compromised-account guidance explains. See Microsoft's scam guidance for the browser-warning case.

Immediate checklist

1. Contact the right person before changing a managed device

For an employer's or school's laptop, phone, or account, tell its IT or security team promptly, including when you are unsure whether anything ran. Use a saved helpdesk number or another established contact route. NCSC explicitly advises contacting IT when a suspicious message arrives on work equipment. NCSC: If you've shared sensitive information

Give them the device name, your contact details, approximate time, and a short account of the event. For example: "I opened an attachment at 10:15, approved an installer, and then received a security alert." This is more useful than guessing a malware family from a search result.

Let responders direct scans, restarts, software removal, and recovery. An investigation may need records that cleanup changes. Do not factory reset a managed device, delete business files, or disconnect shared infrastructure on your own initiative. If the suspect mailbox cannot be trusted, call through the known channel instead.

Managed security tools can isolate a device and collect investigation material. Microsoft documents these actions, their platform and subscription limits, and how administrators review action results. A requested action still needs its outcome checked. Microsoft Defender for Endpoint response actions

2. Limit exposure when malware may be active

For a personal computer showing an active infection or ransomware symptoms, unplug Ethernet and disconnect Wi-Fi. Check for other network connections, such as a mobile hotspot. Leave backup drives disconnected and avoid opening shared storage from the suspect computer. These are containment steps; they do not remove an infection.

For ransomware, the joint CISA, FBI, NSA, and MS-ISAC guide recommends isolating affected systems. It allows powering down affected devices when they cannot otherwise be disconnected from the network, while warning that this loses evidence held in memory. On managed systems, coordinate that decision with responders. This exception is specific to stopping further ransomware spread; there is no universal instruction to keep every suspect device running or shut every device down. Joint StopRansomware Guide, page 21

An account-only alert does not establish that your whole home network is infected. Follow the account recovery steps and investigate device symptoms separately. If several devices or shared files are affected, use the ransomware containment and recovery checklist with the people responsible for those systems.

3. Save a useful record without opening more suspicious content

Write down what you observed while it is fresh. A small record helps a support person distinguish the original event from later recovery activity:

Record Useful detail
Time Date, approximate time, and time zone; mark estimates as estimates.
Device or account Device name, operating system, affected service, and account identifier.
Alert Exact detection or warning, file path if shown, and the product's reported action.
Your interaction Whether you opened a link, ran a file, entered a password, approved a sign-in, paid, or granted remote access.
Response Who you contacted, what changed, when it changed, and the result.

If convenient, photograph the displayed alert using another device. Keep the original suspicious message available for IT's approved reporting process. Avoid forwarding its attachment to friends or posting private account records publicly.

A home user does not need to learn memory acquisition before seeking help. For an organizational investigation, let a qualified responder decide what logs, disk images, or memory captures are appropriate. The joint guide addresses preservation of volatile evidence and selected affected-system captures; those are investigation activities requiring context. Joint StopRansomware Guide, page 25

4. Recover accounts from a device you trust

Use a separate device you have reason to trust for sensitive recovery work, rather than typing replacement credentials into a possibly infected computer. If you have only the suspect computer, obtain help cleaning it before using it for password changes. Microsoft's recovery instructions explicitly put malware cleanup before password changes on an affected PC. Microsoft account recovery

Open the provider's official website or app yourself. Start with your email account if it is affected, because it may receive recovery messages for other services. If locked out, use the provider's account recovery process. Follow its identity checks and keep recovery codes private.

After regaining access, change the compromised password and any reused copies. Review email forwarding and filters, then use the provider's controls to sign devices and apps out. Set up two-step verification where available. NCSC's hacked-account recovery steps cover these actions and checking for unauthorized purchases.

Review recent security events, unfamiliar devices, recovery phone numbers, recovery email addresses, and other security settings. Correct changes you did not make. Google's compromised-account guide provides its specific sequence. Use the equivalent provider instructions for another service.

If a suspicious program ran and may have stolen saved credentials, tell IT or support which accounts were used on that device. The infostealer response guide covers sessions, permissions, and exposed credentials in more detail.

5. Respond to what you shared or approved

Do not wait for a malware finding before addressing information you knowingly gave away.

NCSC maps shared banking details, passwords, work messages, and installed software to these response paths. NCSC phishing response guidance

Save relevant transaction references and messages. A bank or qualified adviser can address your specific financial situation. For business or personal-data exposure, the organization's responsible person should obtain advice on applicable notification rules; a symptom alone does not determine its legal obligations.

6. Scan your own Windows PC using official tools

Once the immediate containment and account work is addressed, use the installed security product's supported cleanup process. NCSC recommends updating a personal PC and its programs, running antivirus, and following its advice. A scan is a normal diagnostic and recovery step. NCSC: How to recover an infected device

For a Windows PC using Microsoft Defender Antivirus:

  1. Open Windows Security from Start, then Virus & threat protection.
  2. Check Protection updates for current security intelligence when a safe connection is available.
  3. Open Scan options, choose the appropriate scan, and follow the reported remediation actions. A full scan checks all files and programs.
  4. If an offline scan is appropriate, select Microsoft Defender Antivirus (offline scan). Save open work first: it deliberately restarts into the Windows Recovery Environment and restarts again afterward.
  5. Review Protection history for the offline scan's results and any remaining actions.

These options and restart behavior are documented in Microsoft's Windows Security guide. If a managed computer is under investigation, follow IT's instructions before starting them.

Avoid installing cleanup tools offered by a warning page. A scan result reports what that product found; account activity still needs its own review.

7. Escalate persistent symptoms and plan recovery

If malware cannot be removed, detections return, security tools cannot run, or you cannot safely use the browser, get help from the device maker or a qualified support provider. NCSC recommends reinstalling a PC's operating system when antivirus cannot clean it. For an infected phone or tablet, its guidance describes factory reset and seeking expert help if that fails. NCSC infected-device recovery

Before erasing anything, understand the effect on your files, account access, and available backups. A reset is a deliberate recovery decision. Use the platform's official instructions and installation sources, and involve IT for managed equipment.

Restore personal files from a backup known to predate the infection after recovery. NCSC warns that rescuing files from an infected device can carry an infection forward. If the backup's condition or date is uncertain, ask support before restoring it.

For persistent browser changes, review unwanted extensions and use your browser's own removal instructions. Google's malware-removal guidance distinguishes Windows, Mac, Chromebook, and extension cleanup. A Windows scan menu is not a procedure for every operating system.

8. Check recovery before returning to normal use

Keep a short completion record: the device cleanup or reinstall performed, scan results, updates applied, accounts recovered, sessions signed out, and settings corrected. Record unresolved questions as well as completed actions.

Check that security protection is running, required updates are installed, and the original symptoms have stopped. Review account activity again for unfamiliar sign-ins or changes. If contacts received scam messages from your account, warn them through a trusted channel. NCSC account recovery guidance

For work systems, the response team should authorize reconnection and continued use. For your own device, recurring symptoms or new account misuse are reasons to reopen the investigation with support. The absence of a new warning is only one observation; retain the recovery record so someone can assess what has already been checked.

The Defensive Cybersecurity Hub links to more focused guides. Use the malware family directory for background on a reported detection, while retaining the security product's original label and evidence.

Frequently Asked Questions

Does a virus pop-up mean I have been hacked?

A warning inside a web page may be a support scam. Close the browser and ignore its phone number. If you installed software, shared details, or allowed remote access, follow the relevant device and account steps above.

Should I restart or turn off my computer?

Follow IT's directions on managed equipment. On a personal Windows PC, an official offline scan deliberately restarts. During ransomware containment, the joint guide permits shutdown when network disconnection cannot be achieved, with loss of volatile evidence. The circumstances determine the action.

Can a clean scan settle an account alert?

Review the service's sign-in activity and security settings as well. A device scan and an account review answer different questions. Use the provider's recovery process for unauthorized access, even if your antivirus reports no threats.