Please enable JavaScript to use CodeHS

Cybersecurity & Online Safety

What to Do If Your Account Gets Hacked A Step-by-Step Recovery Plan

It happens to kids, adults, and security experts. The good news: there is a clear order of steps that locks the hacker out. Learn the warning signs, run the first hour like a pro, and watch the alert light change from red to green.

~20 min Beginner friendly 3 interactives Defense only
incident-0417 · your accountlive
Alert levelActive breach
Doors open to the hacker5 of 5
Recovery steps done0 of 7

Right now every door is open. Jump to the triage game and close them in the right order.

Start here

Take a breath. This is fixable.

A hacked account is an account that someone else can now use without your permission. They might be a stranger, a scammer, or a bot (a program that runs on its own). Most hacked accounts can be recovered, especially when you move fast and in the right order.

Getting hacked does not mean you are dumb. Attackers trick careful people every day with fake emails, leaked passwords, and fake login pages. What matters most is what you do next.

Security teams call a hack an incident, and the quick sorting of what to do first is called triage. Doctors do triage too: stop the worst problem first. This page borrows the same idea. You will see a status light at the top of the page. It starts red. Your job is to turn it green.

Every app words things a little differently. The names of buttons change, like "Sign out everywhere" or "Log out of all devices." The ideas on this page stay the same. When in doubt, search the service's own help page by typing its address yourself.


Step 0: notice

Signs your account may be compromised

The sooner you notice, the less damage happens. Watch for these signs. One sign alone can be a mistake or a glitch. Two or three together mean it is time to act.

  • Sign-ins you do not recognizeA new device, a new place, or a time when you were asleep.
  • Emails you did not ask for"Reset your password," "New sign-in," or a code arriving when you did nothing.
  • You cannot log inYour password suddenly stops working, even though you typed it right.
  • Messages or posts you did not writeFriends say "that link you sent looks weird."
  • Settings changedA different recovery email or phone number, new forwarding rules, or a new name.
  • Apps you never approvedA strange app listed as having access to your account.

Some of these signs are only visible if you look. Most services have an activity page that lists recent sign-ins and changes. Try reading one below.

Try it: spot the signs

Account activity log inspector

This is a pretend activity log. It is a toy example with made-up data. Tap every row you think is suspicious to flag it. Then press Check my flags to see how you did.

activity-log · student@example.org

0 flagged

Which events were probably NOT you? Flag them.

    Flag at least one row, then check.

    Not sure about an event? Ask yourself: did I do that, on a device I know, around the time I was awake? If you cannot answer yes, treat it as suspicious and keep going with the plan. A false alarm costs a few minutes. A missed hack can cost a lot more.


    The plan

    The first hour: seven steps, in this order

    The order is the secret. Each step makes the next one work. Here is the plan and the reason behind each step.

    1. Change your password from a device you trustUse your own phone or a school computer, not the device you think has a problem or a public computer. Pick a long, brand-new password you have never used anywhere. A password manager can make and remember it for you.
    2. Sign out of all sessionsA session is a device that is currently signed in. The hacker may be signed in right now. Do this after the new password, so they cannot just sign back in with the old one.
    3. Turn on 2-step verification or a passkeyThis adds a second lock that a stolen password cannot open. Learn more in What Is Two-Factor Authentication? and What Is a Passkey?
    4. Check recovery email, recovery phone, and forwarding rulesHackers sneak in backdoors. If they changed your recovery email, they can reset your password later. If they set a forwarding rule, copies of your mail keep flowing to them. Put back your own details and delete rules you did not make.
    5. Tell a trusted adultA parent, guardian, or teacher can help you, call the school or service, and watch for money or identity problems. Do it early. You are not in trouble for being targeted.
    6. Fix other accounts that used the same passwordHackers try a stolen password on other sites. Change it everywhere you used it, starting with email, because email can reset almost everything else. See Password Reuse and Credential Stuffing.
    7. Report itUse the app's "report a hacked account" or help page, and tell your school if it is a school account. Reports help the service lock the hacker out and protect other people.

    Step 5 can happen any time, and the sooner the better. Steps 1 to 4 must stay in order. You will find out why in the game below.

    Try it: triage the incident

    Incident triage game

    Your account has just been hacked. Five doors are open to the attacker. Pick actions one at a time. Some actions work. Some only work if you did something else first. Some are traps. Read the feedback after every move. It is a safe toy model, so you can make mistakes and try again.

    triage-console

    Active breach

    What do you do next? (Tap an action.)

      Doors open to the hacker

        Moves 0Mistakes 0Steps 0/7
        • Feedback will show up here.

        Did you notice the "sign out" trap? Signing everyone out before changing the password feels strong, but the hacker still knows the old password and walks right back in. Order matters because each step depends on the last.


        Try it: blast radius

        How one reused password spreads

        Your email, school account, games, and social apps are all separate accounts. If you use the same password on several of them, one leak opens all of them. That is called password reuse. The damage zone is the blast radius.

        Here is a toy map. Choose which website gets breached, then switch reuse on and off. Watch the red spread. This is a harmless model of how data breaches can chain together.

        blast-radius-map

        accounts exposed

        Which site gets breached?

        Uses the same password

        Extra protection

        Taken over At risk (reset by email) Safe

        Email is the master key. Most "forgot password" links go to your email. If a hacker gets into email and there is no second lock, even accounts with unique passwords can be reset. That is why email gets the best protection and why step 4 checks it so carefully.

        Avoid these

        What NOT to do

        Panic leads to bad moves, and some bad moves help the hacker. Tap each card to see why.

        Watch out for "recovery helpers." Strangers in comments or direct messages who say they can get your account back are very often scammers. Only use help from the official service, your school, or an adult you trust.


        Check your understanding

        Maya's half-finished recovery

        Think

        What did Maya miss?

        Maya's friends say she sent strange links. She logs in and changes her password. Then she goes back to her day, thinking she is done. What could still go wrong? Name at least three things before you peek.

        Possible gaps: the hacker may still be signed in (she did not sign out all sessions), the recovery email or phone might still be theirs, a forwarding rule may still copy her mail, there is no second lock like 2-step verification, other accounts may share the old password, and no adult or report has happened yet. A new password is a great first step, but it is only step 1.

        Key vocabulary

        Words to know

        Compromised
        An account or device that someone else can access without permission.
        Session
        A device or browser that is currently signed in to your account.
        2-step verification (2FA)
        A second proof, like a code or approval on your phone, on top of your password.
        Passkey
        A login that uses your device unlock instead of a password. Hard to steal or fake.
        Recovery email / phone
        The backup contact a service uses to help you get back in. Attackers love to swap it.
        Forwarding rule
        A mail setting that sends copies of your messages somewhere else.
        Credential stuffing
        Trying a leaked password on many other sites to see where it also works.
        Blast radius
        How many things are harmed when one thing is breached.
        Quick answers

        Common questions

        How do I know if my account has been hacked?

        Look for sign-ins you do not recognize, security emails you did not ask for, changed passwords or recovery details, messages you did not write, and unfamiliar apps with access. One odd sign can be a mistake. Several together are a real problem. Check the account's activity page.

        Is changing my password enough?

        No. The attacker may still be signed in, or may have changed your recovery details or set up forwarding. Also sign out all sessions, turn on 2-step verification or a passkey, check recovery details and forwarding rules, and fix any other account that used the same password.

        Will I get in trouble if I tell an adult?

        Being hacked happens to people of every age and is not a punishment-worthy event by itself. A trusted adult can contact the school or service and watch for money or identity problems. Telling early helps. Hiding it usually gives the attacker more time.

        What if I cannot sign in at all?

        Type the service's official website address yourself and use its account recovery page. Do not use links from messages. For a school account, ask your teacher or school IT staff, since an administrator can often reset it. Never pay or give codes to anyone who offers to get it back.

        Recovery steps differ by service, and this page cannot see your accounts. If money, ID numbers, or private photos might be involved, an adult should also contact the bank or the proper authorities.


        Check Yourself

        Quick quiz

        1. You think a hacker is signed in to your account. What should you do first?

        2. You used one password on a game site and on your email. The game site leaks its passwords. Why is your email in danger?

        3. Someone messages: "I can get your account back. Just send me the code that was texted to you." What is the best move?

        Lock it down for next time

        You now know the signs, the order, and the traps. Make the next hack much harder with a password manager, a second lock, and a sharp eye for fake emails.

        Related: Don't Fall for a Phishing Email · What Is a Data Breach?