News for hackers. Stuff that matters.
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by 4gotunameagain on Thursday February 23, 2023 @06:55AM (#34909338)
> This patch created a honeypot: a section of data inside the game client that would never be read during normal gameplay, but that could be read by these exploits. Each of the accounts banned today read from this "secret" area in the client, giving us extremely high confidence that every ban was well-deserved.

Any speculation as to how this worked on a lower level ?

Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by HHad3 on Thursday February 23, 2023 @07:11AM (#34909431)
(Wrote anti-cheat software in the past.)

There are multiple ways to detect this. Hardware breakpoints were already mentioned, but they only work per thread, so if one is sniffing on your memory from another process or the kernel then these won't help.

The most stealthy and evil way I found was to allocate a page but never actually use it.

Windows lazily allocates physical memory for fresh memory pages when they are first used.

The detection is to periodically poll the page map from your process and check your canary pages via NtQueryVirtualMemory. If your unused page suddenly is backed by some physical memory then something happened to read from it! Bonus-points for putting such canary pages into places previously used for real game data.

This method is not foolproof: Anti-virus programs can read memory of all programs (but don't, Overwatch e.g. does not like this and crashes randomly due to this exact protection method). A bug in the program could also read from the page accidentally (e.g. out-of-bounds array read). But it's a /very/ good indicator that something is wrong when other cheat detection mechanisms also trigger.

Once you know how this works it's pretty easy to defeat unfortunately: Read the page map first, then avoid reading pages that have no backing physical memory, because those contain no useful data at best and are canary pages at worst.

Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by pixl97 on Thursday February 23, 2023 @05:29PM (#34917570)
Hmm, this sounds like you should always run your cheat tools with the executable name/faked exe information of anti-virus application.
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by rogers18445 on Thursday February 23, 2023 @05:43PM (#34917753)
I used to work on an anti-cheat briefly, and migrated away form relying on Windows API to do this as the parent comment suggested, instead we used cache timing "attacks".

Antivirus was a concern but easily solved by the fact that cheats access memory many times a second, antivirus does it rarely if ever.

Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by HHad3 on Thursday February 23, 2023 @05:46PM (#34917793)
Author of parent comment here: Interesting insight! I love (and somewhat miss) this industry because the game of cat and mice is never over.
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by HHad3 on Thursday February 23, 2023 @05:44PM (#34917773)
Oldest trick in the book, good luck faking the PE signature to match the vendor's certificate ;-)

(Jokes aside, the kernel does not provide any information about which application reads a canary page. It's best to just use this as necessary condition and take it with a good pinch of salt.)

Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by sprite on Thursday February 23, 2023 @06:11PM (#34918135)
Love this topic. I remember Everquest used to checksum areas of memory that were commonly modified from cheats. World of Warcraft used to (possibly still does, it has been forever since I looked at this) inject anti cheat code at runtime.

Obfuscation and deobfuscation is also super interesting. I think overall reverse engineering and figuring out how things work is one of the most interesting things in computer science.

https://github.com/obfuscator-llvm/obfuscator/tree/llvm-4.0/...

https://blog.quarkslab.com/deobfuscation-recovering-an-ollvm...

Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by mabbo on Thursday February 23, 2023 @08:51PM (#34919670)
World of Warcraft did something that I've always found delightful: hidden stenographic watermarking on all screenshots.

It took like a decade before anyone noticed, but all screenshots were very very very slightly modified to hide (in plain sight) a blob of data that gave the account name, date, time, server, etc.

Just in case a screenshot ever got posted and they really needed to know who took it and when.

Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by d110af5ccf on Thursday February 23, 2023 @09:10PM (#34919814)
> that I've always found delightful

Leaking user data to me is a betrayal of trust, incredibly distasteful, and probably borders on illegal (it ought to be imo). Note that this is fundamentally different than watermarking streaming content or other material that the user is not legally permitted to copy. Watermarking the game binaries themselves, for example, would be entirely different and perfectly acceptable from my perspective.

Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by FateOfNations on Friday February 24, 2023 @03:08AM (#34922164)
While WoW didn't do this, one could avoid disclosing user data to third parties by encrypting the watermark payload.
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by rany_ on Friday February 24, 2023 @06:42AM (#34923511)
This works until the encryption key is leaked.
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by ironick09 on Thursday February 23, 2023 @09:17PM (#34919882)
Do you have any resources/information you can share on this? I’d be curious to read more.
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by lights0123 on Thursday February 23, 2023 @09:45PM (#34920109)
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by rcoveson on Thursday February 23, 2023 @07:07PM (#34918734)
Kind of sad but funny to imagine like two or three nerds who got banned because they had messed with their kernel page fault readahead settings which just so happened to fault a sentinel page.
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by steakscience on Friday February 24, 2023 @05:33AM (#34923096)
How do they filter out false positives from antiviruses reading the files?
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by tobyhinloopen on Thursday February 23, 2023 @07:00AM (#34909368)
I imagined the secret area contained fake details about the game, like adding an invisible fake street to a map. If the client refers to the fake street or any location within it, you can be certain the details about that fake street were obtained using cheats.

This trick is used to catch cheaters on minecraft, by spawning in fake diamond blocks that would only be visible to specific cheats (xray). If a user suddenly were to dig to these blocks, you can be reasonably certain there's something fishy going on.

Other way to think about it, is adding an invisible field to a contact form that is only hidden through CSS

Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by toxik on Thursday February 23, 2023 @07:47AM (#34909741)
> Other way to think about it, is adding an invisible field to a contact form that is only hidden through CSS

Watch out for autocomplete though.

Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by tough on Thursday February 23, 2023 @07:50AM (#34909783)
And as a consumer, watch out for auto-completed css hidden credit card details
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by albert_e on Thursday February 23, 2023 @09:57PM (#34920202)
oh wow.

do current browsers not prevent this by only filling in credit card numbers when that particular field in focus?

Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by alickz on Friday February 24, 2023 @06:59AM (#34923622)
I believe current browsers ask for authentication before filling in credit card details.

Whenever I focus on a CC field and autocomplete Chrome throws up a biometric auth before it will fill out the textfields

Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by jfengel on Thursday February 23, 2023 @10:15AM (#34911605)
A nice callback to the "trap streets" used in actual paper maps to catch people violating copyright:

https://en.wikipedia.org/wiki/Trap_street

Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by cptcobalt on Thursday February 23, 2023 @12:22PM (#34913481)
Or just call it what it is, a honeypot: https://en.wikipedia.org/wiki/Honeypot_(computing)
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by TheAdamist on Thursday February 23, 2023 @07:05AM (#34909402)
Windows lets you configure guard pages where you get notified on access, normally used to detect stack growth and such. Although that should be an easy and normal thing to avoid for av/cheats.

https://learn.microsoft.com/en-us/windows/win32/memory/creat...

Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by ed_mercer on Thursday February 23, 2023 @07:07AM (#34909410)
I wonder if this can be circumvented by running Dota in a VM.
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by poizan42 on Thursday February 23, 2023 @07:42AM (#34909694)
Not helping as long as the page fault is triggered and handled by the process. You could just not do a regular read of the page though. No need for a VM for that, just call VirtualQueryEx and check MEMORY_BASIC_INFORMATION.AllocationProtect for the PAGE_GUARD flag.
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by userbinator on Thursday February 23, 2023 @08:32PM (#34919502)
It could be bypassed by running the cheat outside the VM.

Of course, there's plenty of detection techniques for VMs too.

Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by wrren on Thursday February 23, 2023 @07:23AM (#34909531)
VAC probably sets up a hardware breakpoint conditioned to trigger when the start of that memory region is read. When triggered, a function registered via AddVectoredExceptionHandler will be called. It probably just sets some flag somewhere indicating that the memory region was accessed before resuming flow. You can guard entire pages of memory using a similar approach (https://dzone.com/articles/memory-access-breakpoint-large).
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by jsnell on Thursday February 23, 2023 @07:05AM (#34909399)
I'd do it by read-protecting the page, and install a fault handler that records the access and then unprotects the page (to avoid detection when the cheat causes the game to crash).
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by larschdk on Thursday February 23, 2023 @07:04AM (#34909397)
You could possibly query the OS for whether physical pages have been allocated or not. Physical pages would only be allocated on the first page fault, when the pages are read.
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by throwaway40602 on Thursday February 23, 2023 @07:02AM (#34909377)
there was a convar in the game for 6+ years that let you see particles in the fog of war; 99% of cheats forced this convar on. source lets you request CVars from the client and the value, so they simply did that.

to be clear, this was not a honeypot, but they claimed it to be

Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by kuroguro on Thursday February 23, 2023 @07:06AM (#34909404)
Do the particles alone w/o any cheats give an advantage?
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by throwaway40602 on Thursday February 23, 2023 @07:09AM (#34909424)
yes, you can tell where enemies are in fog of war
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by kuroguro on Thursday February 23, 2023 @07:15AM (#34909462)
Hmm, well I wouldn't permaban people for using a known... built in setting, even if it gives an unfair advantage.
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by throwaway40602 on Thursday February 23, 2023 @07:19AM (#34909501)
it was restricted, you couldn't force it without cheats
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by kuroguro on Thursday February 23, 2023 @07:22AM (#34909522)
Ah, yeah sounds plausible then. I somehow don't buy the guard page/hw breakpoint explanations.
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by jamesfinlayson on Thursday February 23, 2023 @07:25PM (#34918901)
Yeah if you ran with the software renderer in Counter-Strike I think the smoke grenade's smoke didn't work properly.
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by russelg on Thursday February 23, 2023 @09:35PM (#34920043)
According to people on r/dota2, that specific cheat has still not been patched. Doesn't sound like that's the way they are detecting it.
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by blibble on Thursday February 23, 2023 @06:59AM (#34909355)
hardware breakpoint maybe?
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by ohgodplsno on Thursday February 23, 2023 @07:03AM (#34909385)
Take the player info struct:

    struct player_info {
       std::string name;
       vector4 position;
       vector3 orientation;
       int level;
       ...
    }
and dump in something like `report_when_accessed<std::list<player_info>> oops_here_are_all_the_other_players_and_their_position_i_am_only_for_debug_please_remove_me`. Your client will never, ever access this list: it's your honeypot. The moment you get any access on list[i], it gets noted down and reported (like sudo does, straight to the naughty list). Cheat makers will see this and, if it doesn't smell of a too obvious honeypot, cannot pass such a golden opportunity: literally free maphack, just locate where the player struct is in memory and read it all!
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by pedrovhb on Thursday February 23, 2023 @07:15AM (#34909456)
It doesn't necessarily have to be useful information. They mentioned they understood how the cheat application worked, so it's possible it was doing something like indiscriminately accessing certain memory regions; this would make it possible to detect without any changes to the cheating program.
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by throwaway40602 on Thursday February 23, 2023 @07:09AM (#34909426)
how do you expect to be able to tell when someone has read one of your pages outside of working set watches/guard pages?
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by jstanley on Thursday February 23, 2023 @08:10PM (#34919302)
But why bother using `report_when_accessed<>` when you can simply use `automatically_ban_cheaters<>`?
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by elzbardico on Thursday February 23, 2023 @07:58AM (#34909887)
I don't think it needs something deeply clever involving hardware breakpoints, sniffing for virtual pages backed by real memory or something like that. And probably that's why it is described as a honeypot.

It can just be something exposing a data structure that gives the player some unfair advantage and them watching the players that could only have achieved some very unlikely advantage in the game by exploiting this information.

In a FPS for example, if a player consistently anticipates their adversaries sneaking behind a wall, well beyond what would be dictated by probability laws, there's a very high chance that he is cheating in a way that allows him to "see" their adversaries behind walls.

Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by pandog on Thursday February 23, 2023 @08:13AM (#34910088)
Implementing what you describe sounds to me way more "clever" and less robust than the canary page approach described above.

Specifically - I wouldn't fancy writing the "consistently anticipates their adversaries sneaking behind a wall" heuristic you describe but the earlier post describes the API that already exposes the "has read canary page" functionality.

Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by bmitc on Thursday February 23, 2023 @10:02AM (#34911437)
How does that work with latency? For example, if someone has extremely fast internet and a low ping, they are going to "see" around walls more often than opponents.
Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by tester756 on Thursday February 23, 2023 @05:39PM (#34917720)
15 years ago in Tibia there was concept of let's call it - changing network payloads.

I know it only from stories, so forgive me mistakes.

So basically

action X at patch Y sends instruction Q1

and then

action X at patch Y+1 sends instruction Q2

but cheating/botting software when ran straight after the update still sends old instruction Q1,

which is now impossible to be generated by legit player and this way you can instantly mark player as botter.

but I think it cannot be it since modern cheater wouldnt be this stupid, right?

Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by dark-star on Thursday February 23, 2023 @06:27PM (#34918306)
You can mark a page as inaccessible (not present), and then, in the page fault handler, note somewhere that it was accessed and then allocate it/make it readable.

you might not trigger the cheater-flag on a single access (because of, as mentioned, antivirus etc.) but if your page gets accessed over and over again, you can be quite certain that someone is reading it who probably shouldn't...

Re:Valve permabans 40,000+ dota2 accounts using honeypot patch by Dwedit on Thursday February 23, 2023 @08:45PM (#34919623)
Your injected code can just as easily read the protection status of a memory page.