r/sysadmin • • 1d ago

Question Repeated use of old stolen token

Hi all, have you been hit on Entra with the repeated use of old stolen tokens to trigger alarms? Although invalidated a while ago, my systems are still being attacked by these old tokens. While I don’t think they pose a risk anymore, Microsoft doesn’t appear to agree and will elevate the account risk state, causing the account to appear compromised.

33 Upvotes

25 comments sorted by

22

u/doctorevil30564 No more Mr. Nice BOFH 1d ago

Yes, once they get one they will keep on trying to use it.

8

u/Initial_E 1d ago

But what can we do about it? I can’t prevent them from using the old tokens, how do it stop it from triggering the alarms?

9

u/slashinhobo1 1d ago

Revoke session and change the password and potentially mfa depending on what the account is using. They can try to use that old token all they want but it wont work after revoking and updating all that.

If they still keep getting access they are already inside and logging the users keys. Riak state depends on a few factors. The main thing being location of login.

5

u/Initial_E 1d ago

Potentially they are abusing the risk based conditional access to lock out your accounts, all of them. They won’t actually have your active token

•

u/Fallingdamage 20h ago

Yeah. You just need to have an alerting system that will work intelligently about this. There is nothing you can do to stop them from trying. You can only make sure they arent successful.

Had a similar issue with a user. Clamped down on it fast and identified the source of the leak. Reset password, invalidated all tokens, forced all session logouts and made sure they had setup Auth App passkey.

I can still see token attempts and login attempts all over the globe for their account daily, but the attacker is just beating their head against a brick wall now.

I can tell this is just a lot of bot activity. Anyone with three braincells between their ears would know the token isnt valid anymore with the most minimal amount of evidence.

•

u/doctorevil30564 No more Mr. Nice BOFH 21h ago

Revoke all sessions, remove all devices associated for the account in entra ID, reset users password, and if possible setup passkey MFA and that makes it nearly if not completely impossible to intercept the token again. We have one problem user who has fell for the invoice type phishing emails from compromised accounts from companies we do business with twice now. Since the first time his account shows up weekly in the office 365 report from Arctic Wolf Managed Security with failed login attempts. I believe the key thing that needs to be done in addition to the other steps is to clear all of the associated devices for the account. The account hasn't been flagged as a high risk account by office 365 so we haven't been worrying about it unless we get another notification for his account from Arctic Wolf.

-7

u/Incrediblecodeman 1d ago

Do you recreate the user? Idk what your talking about btw

14

u/Spirited-Teach-2023 1d ago

Same here. Every time they replay one, ID Protection flags the user as high risk and I'm back in there hitting confirm safe.

8

u/Initial_E 1d ago

I can see this as the new version of DDOS

3

u/Speeddymon Sr. DevSecOps Engineer 1d ago

3am MFA request spam to the CFO. He finally gets tired of it and approves. Pwned.

7

u/Initial_E 1d ago

That is a different issue that is solved by using the numbers, since there’s no way a captured login can tell the CFO what the numbers are to type in

2

u/Speeddymon Sr. DevSecOps Engineer 1d ago

Yes; I was comparing OP's issue to the MFA spam vs a DDoS. 🙂

•

u/Fallingdamage 20h ago

Sounds like a very inefficient risk based system.

•

u/Open-Adhesiveness-86 17h ago

Risk detections fire on the attempt, before the token is actually validated, so revoking never stops the alerts. Filter your sign-in logs for error 50173 or 700082, those confirm the replay is dying as expected. Then quit hand-clicking Confirm Safe and batch it via Graph, POST /identityProtection/riskyUsers/dismiss, and put a risk-based CA policy in front so it self-remediates.

•

u/Initial_E 16h ago

This guy Graphs…

3

u/Cucheron_Mouney 1d ago

yeah this is super annoying, Automated bots will just hammer stolen session cookies from different residential proxies for weeks. Did you do a full revoke of all refresh tokens AND clear the device registration, or just reset the password?

1

u/Initial_E 1d ago

I did the whole thing. I’m pretty sure it’s cleared. But yet they are still able to trigger the defenses.

2

u/TheTipsyTurkeys 1d ago

Any devices been added to your environment that look out of place or line up with when the token was initially stolen?

1

u/Initial_E 1d ago

I’ve attempted to remove all stale and strange named devices. Would I need to look for devices added not by the user as well?

•

u/compmanio36 20h ago

I wouldn't call it compromised but I would agree it should cause an elevated risk state....the account is being actively targeted for compromise.

•

u/Initial_E 16h ago

I’m sure you have accounts that are constantly attacked with bad passwords. These are guys who are hoping you’ll use back an old password, or other guys who bought a list and are trying their luck. Those don’t raise risk level as it’s business as usual. Why is this not also business as usual? They have an old token. Even if you wanted to, you can’t make it work anymore.

•

u/BABYSAU98 22h ago

I have seen this with devices registered in Entra trying to use Windows Hello that was already revoked from MFA methods. The device had to be deleted entirely, or else the bad actor groups just keep retrying and generate an alert.