What to do when users create multiple accounts to abuse your AI

2026-12-01来源 dev.toEnglish
What to do when users create multiple accounts to abuse your AI

In late October someone made six Google accounts: reqaccv1, reqaccv2, all the way to reqaccv6. Not subtle. When the first one hit my $5 daily limit, they opened a private window and logged in with the next one. My AI Werewolf game caught them four times in a row. Then they switched to another network in another city, and the fifth account walked right in and played a full game on my dime. Total damage: about $20. The money is nothing. What bothered me is that it worked. And that I had no idea how to stop this.

A user can fake an email, change an IP, all the browser data, wipe cookies - what can I possibly do? Well. A lot.

That felt like I was being hacked

Why would anyone do this? Because AI isn't free. In my previous article I showed what it really costs me to run the game. So, like any other AI app, my game puts AI usage limits on free users. They have to pay to get more. Or hack me for unlimited usage.

I needed to build a solution that can detect duplicates and link them together. So they share the same quota and limits. And their owner sees "Nice try". Easier said than done.

Why it's hard

How would you detect multi-accs in theory? Let's think.

We need something that stays unchanged every time the same user registers again. Something that all reqaccv1-6 accs share with no way to change it. This something is what truly represents a user in the system. What can it be?

Compromise on privacy

A bored guard scans a QR code tattooed on a tired man's forehead with a red laser, while a queue of people, and one werewolf in a hoodie, wait with QR codes on their foreheads too

This is where the ideas of a real ID verification or creating a universal digital ID are coming from. If every user can upload something that uniquely identifies them with no way to cheat, it solves all the problems. A tattoo with your personal QR code or something like that. Very convenient until someone hacks this whole system. Or abuses the trust in it.

Compromise on time and retention

Another simple idea is to overwhelm users with the required information and verifications. Just make it so hard to create accounts that they will stop after the first one.

How about no compromises?

Can we actually do something that people won't hate immediately? To be honest, most of my users would prefer having no accounts at all. Just open the page and play. And I'm about to give them that - I'm shipping guest support right now. I used to think you'd have to log in eventually, because an account is the part of your identity in my game that you control. Now I'm not so sure. More on that later.

SSO login and what information it shares

I tried to make login as simple as possible. I used Google and GitHub SSO - it takes 2 clicks. It's still a big NO for some guests. Because sharing the information is scary these days. I'll train my Werewolf bots on your data and then what do you do?

So, what I learn when you log in

  1. email - this is the account key
  2. display name - whatever you put as your name in Google or GitHub
  3. avatar URL

Google SSO

  • A permanent Google account id
  • Whether the email is verified
  • First and last name separately
  • The Workspace domain, if it is a company or school account

GitHub SSO

  • A permanent numeric id; these are issued in order, so the number itself shows roughly how old the account is
  • The username
  • Account creation date
  • Counts of public repositories, followers and following
  • Optional profile fields: company, location, bio

Not much if you ask me.

And we already have the problem right in front of us: if I log in with both Google and GitHub SSO in different tabs - how to tell that both sessions are the same user - me? Especially if I have different emails and names in both accounts. There is literally nothing that can link them together.

Browser ID

A werewolf in a hoodie sneaks out of a kitchen at night with the whole cookie jar and a broom to sweep the crumbs, leaving one cookie with a red tag on the counter, while a security camera watches

There is an ancient technique - put something into the user's browser cookie and read it back next time. All browser sessions for the same domain (my website) will share this thing. I need to assign a unique ID to each user in my system anyway - so I can put that into the cookies. I call it a browser ID.

In my scenario:

  • I first log in with Google => this registers me in the system, creates a new ID, saves it in DB and adds to my browser cookie
  • I then log in with GitHub. My browser already has the ID in the cookies, it is sent to the backend => the backend knows that it's an existing user who uses a different account
  • Two accounts are linked in DB via the same ID

There are cookies that cannot be edited by the user - httpOnly. We'll use that. A user can delete them though. So, we'll use the local storage as well - the ID can live in both, each restores the other. Still weak - a user can clean both at the same time.

And what about using a different browser? Or the incognito mode?

IP address

A werewolf in a trench coat, fedora, sunglasses and a fake moustache waits at a club door while a bouncer squints at the return address on his envelope; behind him a winding road leads back to houses, a cell tower and an office

Let's try something else.

From the HTTP request itself I can learn a lot about where it came from. How exactly it works:

  1. My server is hosted on Vercel. The browser opens a connection to Vercel's nearest edge server. Every connection has a source address, because the replies have to be sent back to it. The routers in between only forward packets. They don't replace the source address, so the edge server sees it directly.
  2. The edge server writes that address into a request header and passes the request to our code. Vercel overwrites whatever the client put in that header, so a browser cannot forge it.

Very convenient. Although, the IP I see is not really a user's IP. It's the last public IP before the Vercel edge server. It can be:

  • Home network: the home router's; everyone in the house shares it
  • Mobile data: the carrier's shared address; thousands of phones can share one
  • Office or campus: the organization's gateway
  • VPN: my arch-enemy

So... still not enough.

This is where simple techniques end

At least, this is where I stopped at first. I used the ID in cookies + IP, and I thought it was a good start. To beat this, you need multiple browsers + VPN + multiple accounts.

Guess what?

It wasn't challenging at all - the moment I asked Simona to scan my users for possible duplicates, she found multiple combo-breakers. Like the reqaccv1-6 one.

Buckle up, we are going to the dark side.

What else the client's browser can reveal

My game is a website. A website has client code that runs in a user's browser. This client code can interact with the browser and ask for some information. This is where things get interesting.

Your browser doesn't willingly share your private information. But we can be creative.

  1. Every page includes a small component (DeviceProvider). When the page finishes loading, it runs the collector (collect-browser-signals.ts).
  2. The collector asks the browser a series of standard questions, the same ones any website may ask, with no permission prompt. The visitor sees nothing.
  3. It sends the answers to our server in one call, together with the browser ID.
  4. The server cleans the values, computes the hashes and stores the last five distinct sets on the device record.

What the game reads today:

Information How the script gets it
OS and version The browser describes itself: "Chrome 142 on macOS 15". Chrome and Edge answer a direct question about platform and version; Safari and Firefox put it in a text line that the script parses.
Browser and version Same self-description.
Graphics card The script opens a hidden 3D drawing context and asks which hardware renders it. The answer is a name like "Apple M3 Pro" or "NVIDIA GeForce RTX 4070".
Canvas hash The page draws a hidden picture and hashes the result; it differs slightly by hardware and drivers.
Cores and memory Two plain browser properties. Memory is rounded by the browser, and Safari and Firefox do not report it.
Screen Width, height, colour depth and pixel ratio, also plain properties.
Phone or desktop, touch The browser says whether it is a mobile one and how many touch points the screen has.
Timezone The system clock setting, which is why a VPN does not change it.
Languages The browser's language list.

What more a browser gives without asking permission:

Signal What it tells Worth
Installed fonts detected by measuring how test text renders good on Macs and PCs
System voices the list of text-to-speech voices good on Macs
Audio fingerprint tiny differences in how the machine processes sound moderate
Graphics details the full list of 3D features and limits, not just the card name moderate
Device model on Android Chrome reports the phone model good; separates phones
CPU architecture Intel or ARM, 32 or 64 bit small
Counts of cameras, microphones, speakers numbers only, no names small
Display preferences dark mode, reduced motion, contrast small, changes often
Keyboard layout Chrome only small
Ad blocker present by testing whether a bait element loads small
Real IP behind some proxies through the browser's video-call machinery sometimes strong; most VPNs block it, and it is the most intrusive item here

Look what you made me do!

A guilty-looking spy with a magnifying glass peeks through a browser window at a werewolf happily playing on his laptop, surrounded by doodles of what he collects: a clock, a screen with a ruler, a chip, a keyboard, a speaker and a globe with a pin

I wanted to open a window and shout this to the world. Collecting so much info feels evil.

On the other hand, it's not some spying software installed with an npm package. It's your browser talking to everyone who asks. Any website can get this information. They warn you about cookies and data sharing with Google - how nice. There is no warning about reading your keyboard layout.

And for the record: all of this stays in my database. I don't share it with anyone, and I don't use it to follow you around other websites. It's only there to catch multi-accounts in my game.

Soft, Machine, and Setup Keys

We use those signals to build more keys that describe a user.

Soft key Machine key Setup key
Made of OS family, timezone, first language, phone or desktop, touch points soft key + graphics card, screen, cores, memory machine key + fonts, system voices, audio fingerprint
Answers is this the same kind of setup in the same region? is this the same model of computer? is this the same person's computer?
Stable over time almost always very less
Survives Brave yes no no
Strong on a PC no yes yes
Strong on a Mac no no probably
Strong on a phone no no no, phones have little to customize

Only Soft key works in Brave.

Here is my detection algorithm

  1. Same browser ID as an older account → linked. This catches a second account in the same browser, and a private window on the same network within 12 hours. It is the lazy case and the most common one.
  2. Classify the device: PC with a named graphics card, Mac, phone, or Brave. The class sets how much the next steps are worth.
  3. Machine key matches an older account's browser: -- PC, seen within 72 hours → linked -- Mac or phone → one weak sign, go on
  4. Setup key matches (Mac or PC) → linked. This step is new and unproven.
  5. Collect the weak signs: same IP within 7 days, sibling name, a soft key shared by few accounts. A different OS family or timezone against the candidate cancels the IP sign.
  6. Two independent weak signs → linked. One → flagged only.
  7. Nothing matched. If the visit has two of these marks: no browser ID, Brave, system timezone unlike the IP's, or a datacenter IP, the account is unverifiable and gets the smaller start. Otherwise it is an ordinary new account with the full start.
  8. A brand-new, empty GitHub account is treated as unverifiable whatever else is true.

Wow, this is complicated. Is it really worth it?

After going deep into the weeds, I realized that having a user login is not that important. The Google SSO info or an email don't give me much. It doesn't simplify duplicate accounts detection, so why bother? I can treat guests as the free tier users as long as I can prevent the abuse.

So yeah, it's worth it. If it works. Complicated stuff has this tendency to be buggy and to have unexpected side-effects. We'll see.

Background data analysis

That's not it. I ask Simona to go over the user data and analyze it once a week or so. She might notice some patterns the algorithm misses. Or mistakes.

I keep monitoring those users who played tricks earlier. I'm not banning or punishing anyone - it's actually good that they spend their time on finding the holes in my app. I appreciate this and accept the challenge.

A few days ago, I noticed one of those active users hit their $20/month limit, and then a new registration from Peru appeared. "This must be a VPN" - I thought. No. Simona checked: the two accounts used different languages and were playing at the same time. One person playing two games in two languages at once? Possible, but unlikely.

As far as I know, every limit abuser I've seen so far is handled now. Their new accounts either share one budget with the old ones or don't get the free start. I'm waiting for their next move.

Conclusion

The amount of the information your browser can reveal about you is overwhelming. I didn't expect that. None of it can identify you, though. Each signal on its own is close to useless. It's either easy to change or shared by many people.

The good news for privacy: the tools you already have work. Brave does a very good job hiding and scrambling a lot of this data. A private window throws away the browser ID. A VPN hides the IP. Together, they take away my two most reliable signals. If you really don't want to be recognized, you mostly won't be.

A werewolf in a hoodie frowns over a chessboard at night, holding a red knight, while a relaxed man across the table leans back with his arms crossed and a coffee, waiting for the move

原文:https://www.a8q9.cn/en/article/what-to-do-when-users-create-multiple-accounts-to-abuse-your-ai-013b4c.html

相关文章