Skip to content

Instantly share code, notes, and snippets.

@zkxs
Last active October 6, 2021 20:45
Show Gist options
  • Save zkxs/eac4183fd526c2677d98943cd6e23902 to your computer and use it in GitHub Desktop.
Save zkxs/eac4183fd526c2677d98943cd6e23902 to your computer and use it in GitHub Desktop.
Neos User Impersonation MITM Attack Writeup

Neos User Impersonation MITM Attack

Who am I?

I'm "runtime" in-game. U-runtime if you need my user id. zkxs#1039 on Discord. Feel free to reach out to me if you've got questions.

What have I found?

An exploit allowing a malicious actor to join sessions while impersonating another user via the use of a MITM (man-in-the-middle) attack.

How did I find it?

I am specifically searching for exploits with large security impacts due to the new issue bounty policy.

How serious do you think this is?

I believe this to be at least a medium severity issue. It has the following impact:

  • A malicious actor can join sessions while impersonating another user, but only if the target user is in a session hosted by the malicious actor. This can pivot into the following attacks:
    • Forced entry into Contacts/Contacts+ sessions if the malicious actor knows the session ID
    • Forced entry into Private sessions if the impersonated user has a valid invite and the malicious user knows the session ID
    • SimpleAvatarProtection bypass as an attacker can become whoever's asset they're trying to steal. This allows equipping/saving/spawning protected avatars as the impersonated user

A PoC (proof-of-concept) implementation has been created and verified to be working in Neos version 2021.9.3.1281. This PoC is a Neos plugin that causes the malicious actor's client to perform the MITM when joining sessions.

Timeline

This timeline will include:

  • Important research milestones
  • Disclosure to various parties
  • Conversation with the Neos team
  • Reward payouts

2021-09-02 21:00 -05:00

Exploit is conceptualized and appears promising. PoC development begins.

2021-09-03 13:00 -05:00

I believe the PoC to be nearly ready. seif1 and Khosumi are informed that I have an impersonation exploit I need help to test, but are not given specifics on how the exploit works. We begin testing the PoC to see if it works in practice.

2021-09-03 18:19 -05:00

The PoC has been fully debugged and is now working. I begin writing my moderation report, and Khosumi records a video to attach.

2021-09-03 18:55 -05:00

The moderation report is submitted as ticket #687383.

2021-09-03 23:23 -05:00

I am informed that the ticket is being looked into by the moderation team.

2021-09-20 17:20 -05:00

A fix is announced in the #neos-updates Discord channel, and is live in Neos version 2021.9.20.1334.

2021-09-20 17:36 -05:00

The moderation ticket is marked as resolved.

2021-09-21 02:35 -05:00

This writeup is made public.

2021-10-03 14:16 -05:00

A staff member informs me via Discord that a reward is being considered.

2021-10-06 14:58 -05:00

I receive an email receipt for a 10,000 CDFT reward, the maximum amount.

Logs

The logs from both the host the attacker joins and the impersonated user show nothing out of the ordinary. The logs of the attacker are somewhat unusual, as expected, due to the use of a plugin.

Replication steps

Background

  • When you first log into Neos, your client generates a random public/private keypair. The public key is sent to the Neos cloud, and is viewable at the https://api.neos.com/api/users/<userid>/status endpoint.
  • When a user connects to a session the session host issues a join challenge. This join challenge is a nonce that must be signed by the connecting user's private key. The host then validates this signature using the public key from the Neos cloud. If the signature is invalid, the connecting user is disconnected.

The Characters

  • "Sally" is hosting a session named "SallyWorld"
  • "Eve" is a malicious actor who wants to gain access to SallyWorld
  • "John" is a user in a session hosted by Eve.
  • John has access to join SallyWorld, but Eve does not.

The Attack

  1. John is in a session hosted by Eve
  2. Eve connects to SallyWorld using John's username and userid
  3. Sally issues a JoinChallenge to Eve
  4. Eve forwards this JoinChallenge on to John
  5. John signs the JoinChallenge with his private key, and sends the JoinAuthenticate response back to Eve
  6. Eve forwards this JoinAuthenticate response to Sally
  7. Sally accepts Eve into the world as John

Screenshots & Videos

Shows that there are two Khosumi's in the world. One is the real Khosumi, and one is runtime impersonating him: exploit screenshot

A video filmed by Khosumi demonstrating runtime joining Khosumi's private session while impersonating seif1. Seif1 was invited, runtime was not.
https://youtu.be/GFH5zpU11OE?t=177

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment