A spoofed browser API is caught by an instanceof check when the spoof hands back an object it built itself instead of the one the browser makes. Ask a real Chrome for navigator.getBattery() and the promise resolves with a BatteryManager; ask a script that returns { charging: true, level: 0.8 } and result instanceof BatteryManager is false. We shipped four of these in our JavaScript fallback layer, and every one of them failed three checks at once.
How a spoofed API is detected: instanceof and two more checks
A page does not need a fingerprinting library to run these. It needs three lines:
Object.prototype.toString.call(x) // "[object BatteryManager]" or "[object Object]"
x instanceof BatteryManager // true or false
Object.keys(x) // [] or ["charging", "level", ...]
The first reads the object's tag, which a real platform object carries on its prototype. The second walks the prototype chain. The third lists own enumerable properties, and this is the one people forget: on a real BatteryManager, charging and level are getters on BatteryManager.prototype, so the object itself has no own keys at all. A literal has every value as its own key, because that is what a literal is.
You can work your way round the first two with more overrides. Set the prototype and add a Symbol.toStringTag and the tag and instanceof come out right. The keys are still own properties, though, and the getters a page can pull off the prototype with Object.getOwnPropertyDescriptor still belong to the real class and still refuse your object. Each fix to a stand-in uncovers the next difference, because the stand-in is a different object.
Every profile is drawn from one real computer, not from separate listsIn Mosaic: Machines that exist. GPU, screen, CPU and fonts from one real device. Free covers 3 profiles with no card, and Pro is $25 a month for any number of them.
Mosaic is a desktop app
Email yourself the link and open it on your computer.
How it works: Machines that exist
Four APIs that handed back a stand-in
Our engine moves these values inside the browser itself. Beside it sits a script that does the same job by injection, for a stock Chromium without our changes. When we audited it, four APIs were returning objects we had made ourselves:
getClientRectsreturned a plainArraywith an arrow function calleditemhung on it.toStringsaid[object Array]where every browser says[object DOMRectList],instanceof DOMRectListwas false, and the array had an own enumerableitemthat noDOMRectListhas.getBatteryresolved with a literal carryingcharging,level, the two times, three no-op event methods and fournullhandlers: eleven own keys against the real object's none.toStringsaid[object Object].enumerateDevicesbuilt{ deviceId, kind, label, groupId, toJSON }objects instead ofMediaDeviceInfo(andInputDeviceInfofor inputs). Four own enumerable keys that no real entry has, on a call that fingerprinting scripts commonly make.navigator.pluginsrebuiltPluginobjects with noMimeTypeentries in them, so a page walkingplugin[i]readundefinedfor every field.
None of these values was wrong as a number. The battery level was plausible and the device list had the right kinds. A detector did not have to know what the true values were. It only had to notice that the object was not the kind of object Chrome makes.
What replaced each one
The rule we wrote down afterwards: if the engine already produces the object, change what it says, not what it is. In practice that came to three moves.
Override the prototype accessor. The four battery numbers are now getters defined on BatteryManager.prototype. getBattery() resolves with the engine's own object, so its class, its EventTarget behaviour and its empty key list are Chrome's, and only charging, level, chargingTime and dischargingTime read differently. Where a build does not expose BatteryManager at all, there is nothing safe to override and the real API is left alone.
Proxy the real instance. getClientRects now returns a Proxy whose target is the real DOMRectList. The class, brand and property shape come from the target. Only the rectangles read out of it are the adjusted ones. One detail cost us a broken page before we found it: Reflect.get has to pass the target as the receiver, not the proxy. length and the indexed getters are brand-checked, and handed a proxy as this they throw Illegal invocation on every element of the page.
Use the real list, or delete the spoof. enumerateDevices first went to filtering the engine's own list, because before a permission is granted Chrome already returns one unlabelled placeholder per kind and there is nothing to hide. Then the filter went too. It could only ever remove a kind, so its one effect was to drop the camera from the list on a draw that claimed a cameraless desktop, while getUserMedia still opened the real one. Our stock-Chrome comparison caught it, intermittently, since it showed only on some draws:
stock audioinput,videoinput,audiooutput
ours audioinput,audiooutput
The list is the engine's, untouched, now. The plugins rebuild was removed outright: Chrome's real list is already the five PDF viewer entries we were imitating, which is the story in why every Chrome lists the same five PDF plugins.
Why a Proxy is not the end of it
A Proxy keeps the shape, but the functions you install still have to look native when a page prints them, and they have to look native from a second realm too. A fresh iframe has its own Function.prototype.toString, and on one profile it read the real source of 33 of our replaced functions. That measurement, and the fix of making each replacement a Proxy over the real native, is in why we change fingerprints inside the engine, not JavaScript. The four-line version of the iframe check a page runs is in how a page checks that a function is really native.
The same reasoning sits under half a spoof, where we cut spoofs that changed one route to a value and left another. A stand-in object is a contradiction of the same kind. The value says one machine and the object's class says no browser at all.
Where this leaves our engine
Tesseract Chrome, the Chromium that ships in Mosaic, runs no injected fingerprint script. Its changes set values inside the engine, where getBattery builds its BatteryManager and Blink builds its DOMRectList, so every frame and worker gets the engine's own object carrying the profile's numbers. The JavaScript fallback is where we learned the rule, and the engine is where we could follow it all the way down: there is no stand-in to find, because nothing above the engine builds one.






