r/programminghorror • echo "Sub Mod" && :(){ :|:& };: • Oct 16 '25

Javascript Case randomization makes tracking images in emails undetected by anti-tracking software

Post image

I had this idea a few months ago. Ideally, there would be a server on the other end to display analytical data to the link creator. In reality, you don't need 128 of the same letters, as long as the spelling of the file name/image URL is consistent or visually similar across different emails.

For example, imagine if this email from "Halifax Bank" had the logo URL containing HaLiFAXbANK.png. Google's public DNS also uses case randomization.

Edit: I couldn't decide whether to link the article or not, despite being able to find that exact article easily, and the source being the same one I intended to link. Thank you for the feedback and reminding me with your comment, u/Circumpunctilious!

304 Upvotes

37 comments sorted by

View all comments

Show parent comment

3

u/MurkyWar2756 echo "Sub Mod" && :(){ :|:& };: Oct 16 '25

Sometimes, filters don't check for tracking links.

What I meant to say is essentially, "By default, Proton Mail only blocks known patterns tracking URLs. [Some URLs from the email I got regarding a Reddit TOS update a while ago slipped through the cracks, or could not be decoded into their original forms without automatically simulating a "click" on these links.] Therefore, in this case, Proton Mail probably would not detect this, so the person gets tracked unless they have images disabled entirely."

Of course, there are other places that detect tracking URLs, ads, etc. - but each one has different focuses.

1

u/wireframed_kb Oct 16 '25

The only thing required for an ID that is unique and can be assigned a user. I don’t know exactly how providers scan emails, but it seems odd if their method doesn’t differentiate between l and L, or I and l for that matter. (Uppercase I and lowercase L”). After all they’re unique values. Generating a hash seems the most obvious way, but any kind of encoding would read bitwise values.

Of course the system I built was a server-to-server principle, so instead of pulling an asset, it redirects users via a unique ID generated at time of click. Which means the link has no unique parameter, that is not generated until you hit the server and get redirected with a unique session ID. But problem is, however you build tracking, you either need to generate something to identify each user, or you need to make unique links. So given enough resources, it’s possible to guess whether there’s tracking.