Skip to content

Stealth code randomizes hardwareConcurrency and deviceMemory on every access #354

@TheTechRobo

Description

@TheTechRobo

I was surprised to learn how brozzler's stealth JavaScript handles deviceMemory and hardwareConcurrency:

Object.defineProperty(navigator, 'deviceMemory', {
get: () => getRandomInt(4, 32)
});
Object.defineProperty(navigator, 'hardwareConcurrency', {
get: () => getRandomInt(4, 32)
});

Every call to either property returns a random value, so even simply [navigator.hardwareConcurrency, navigator.hardwareConcurrency] will have two different values in the array. Why is this? Why not pick a random number at the start and use that one? (Or even pick a common constant value like 4 or 8 so it's the same across page loads.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions