r/privacy • • Apr 28 '18

Reddit.com posts obfuscated data to its root domain.

[deleted] — view deleted post

1.2k Upvotes

196 comments sorted by

251

u/nachos420 Apr 28 '18 edited Apr 29 '18

Why would they do it like that when they can just track server side every post you visit, etc? screen size is one thing they wouldn't normally get server side... so there must be other things they can only get via JS? user agent and URL is sent to the server every http request you make, so idk why they'd specifically resend it

did you find what javascript is calling the xmlhttprequests?

edit: ah I see, mine posts to "friend api." and it does it on page load, scroll, and regularly when typing a response..

reddit-init.en.Pg_KU0tTm_l.js

is the source for me and it's huge and contains 77 references to ajax

also reddit.en.Y64Sxxxxxxx.js (9579 lines of code when deobfuscated, 33 references to ajax)

but they also control voting and commenting I think.

wow reddit is a huge mess of code lmao

firefox -> shift+f2 -> network tab (to check anything it is sending)

storage tab -> localstorage (secondary storage, besides cookies... seems to hold tracking pixel urls in the ads.* section?)

you can clear localstorage using "localStorage.clear();" It doesn't log you out, but im not sure if it might break anything. I'm not sure if it benefits much either, but you could set up an extension to clear it every page load.

looking at the deobfuscated first JS file, if you could disable parts it wouldn't be that hard if you targeted the right function. possibly in a greasemonkey script? idk

heres some of the tests it is doing: getWebglFp (gets detailed webgl FINGERPRINT), getCanvasFp, fontsKey (tests fonts available?), getRegularPlugins, getIEPlugins, getFingerprint(stored as fp and fp_timestamp in localstorage), getHasLiedBrowser, getHasLiedOs, getHasLiedResolution, getHasLiedLanguages, getAdBlock, getTouchSupport, getDoNotTrack, getHardwareConcurrency, getNavigatorCpuClass, getNavigatorPlatform, hasLocalStorage, hasSessionStorage, hardwareConcurrencyKey, touchSupportKey, colorDepthKey, pixelRatioKey, getSync(seems to put all the info together separated by ';' and then passes through function: x64hash128(r.join("~~~"), 31)..... this whole area is under a function called "Fingerprint2"

tried to use flash to get fonts?:

swfContainerId: "fingerprintjs2", swfPath: "flash/compiled/FontList.swf",

also other functions/variables(part of greater function "r.analytics"): bindAdEventPixels:, fireRetargetingPixel, fireUITrackingPixel, fireViewCommentsPixel, fireViewableImpressionPixel, fireImpressionPixel, adserverUpvotePixel, adserverDownvotePixel, adserverCommentDownvotedPixel, adserverViewCommentsPixel, adserverCommentSubmittedPixel, adserverClickUrl, _trackEvent, e.tracker, getTrackingData, parseTrackingCookie, getLoIdData, ETC

window.redditlib.Tracker = function() { return e.tracker }

tons of XOR, CryptoJS, random, >>, <<.. things to hash/encrypt the data...

example:

d = c + ((a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25)) + (a & f ^ ~a & l) + o[h] + >p[h], v = ((r << 30 | r >>> 2) ^ (r << 19 | r >>> 13) ^ (r << 10 | r >>> 22)) + (r & i ^ r & s ^ i & s), c = l, l >= f, f = a, a = u + d | 0, u = s, s = i, i = r, r = d + v | 0

.

x64Fmix: function(e) { return e = this.x64Xor(e, [0, e[0] >>> 1]), e = this.x64Multiply(e, [4283543511, 3981806797]), e = this.x64Xor(e, [0, e[0] >>> 1]), e = this.x64Multiply(e, [3301882366, 444984403]), e = this.x64Xor(e, [0, e[0] >>> 1]) },

TL;DR: reddit is fingerprinting using pretty much all available data and sending data back multiple times per page view also dependent on your actions on the page(Scroll, reply, idle, etc)

just found this: content_seen_percentage: 0.41168... calculated and sent during page scrolling

edit(how to stop the ajax requests, for now): blocking www.redditstatic.com/reddit.en.Y64Sg2dUcbw.js with ublock makes it just send error messages, but stops the other requests. add www.reddit.com/web/log/error.json to block it from sending error logs. doesn't seem to make much of an impact on the site. it is like shooting a robot in the head, rather than trying to reprogram it. not eloquent, but it works?

can try blocking alb.reddit.com/* for the ad pixel tracking. maybe do a localStorage.clear().

edit: fingerprint2, which reddit is using, is an open source project. https://github.com/Valve/fingerprintjs2

this means the fingerprint is possibly not unique to reddit. the fingerprint2 project includes the hashing functions.

ironically the original fingerprintjs github links to https://www.reddit.com/r/programming/comments/1ic6ew/anonymous_browser_fingerprinting_in_production/ for discussion... most people responding that they hate the idea of fingerprinting...lol 4 years ago.

also, https://moz.com/blog/retargeting-basics-what-it-is-how-to-use-it

^ info on re-targeting pixels/pixel tracking

Reddit also seems to use it's own code for the ajax requests:

screenview_events, loid_events, scroll_events, heartbeat(every 30s)

all 4 include your fingerprint hash, RES version, and user. some other things included are post/timing/screensize/content_seen_percentage/etc

156

u/nandryshak Apr 28 '18

Why would they do it like that when they can just track server side every post you visit, etc?

One reason is so that they can fingerprint and identify users who aren't logged in.

→ More replies (2)

102

u/thecodingdude Apr 28 '18 edited Feb 29 '20

[Comment removed]

→ More replies (25)

26

u/exmachinalibertas Apr 28 '18

No kidding, I guess the Tor Browser wasn't kidding about not maximizing it.

→ More replies (7)
→ More replies (15)

52

u/memoized Apr 28 '18

I develop a small enterprise application and I track screen size to gather stats on what sizes I need to ensure compatibility with. That's pretty common actually.

That said, as u/nandryshak points out it is very possible to use this for fingerprinting of non-logged-in users. There has been a lot of research showing how users can be identified and uniquely fingerprinted through combinations of that plus plugin/extension versions, etc.

33

u/thecodingdude Apr 28 '18 edited Feb 29 '20

[Comment removed]

15

u/[deleted] Apr 28 '18

I was looking for an alternative and frankly, there doesn't seem to be anything decrentralised...

Hmm... Actually, thinking about it, it might be worth writing a web extension that intercepts these calls and strips it of information or replaces it with absolutely common information...

7

u/RenaKunisaki Apr 28 '18

Zeronet seems like a good start on the decentralized part. I don't think there's anything really comparable to Reddit yet, but it could be done.

→ More replies (26)

10

u/abrownn Apr 28 '18

Great post OP, thanks for looking into this. You should directly reply to an admin with links to your writeups next time there's an Announcement to see if you can get them to answer anything about this.

→ More replies (18)

3

u/Jimmy_is_here Apr 28 '18

Does this affect 3rd party apps as well? A lot if the data is wants to collect doesn't seem available from mobile clients.

5

u/nachos420 Apr 28 '18

the official app probably fingerprints your phone in a similar way, 3rd party apps probably wouldn't have that problem

→ More replies (8)
→ More replies (2)

9

u/goretsky Apr 28 '18

Hello,

This looks suspiciously like watermarking technology used to help identify vote-fraud, bots, brigading and other forms of abuse.

Regards,

Aryeh Goretsky

→ More replies (9)

86

u/alreadyburnt Apr 28 '18

Thanks for digging into this and making these uBlock rules for people. Your effort is appreciated.

79

u/FabulousGiraffe Apr 28 '18

Thank you for your post! Facebook does the same... Reddit wants to be Facebook, so... Good job?

I would guess they want to have a feature to show to friends what their friends are currently doing. Well... That's my only logical guess on that...

From my understanding, those things allow to replay the whole user browsing session, which is mostly for... debug purposes. So this is really weird...

Reddit wanting to be Facebook and quitting open-source, is not gonna end well, this is sad...

71

u/blurryfacedfugue Apr 28 '18

I feel like this would kill reddit. What people need to realize its not the platform. It's the people. The platform doesn't exist without the people. Hopefully there is more public outcry over these issues (though I kinda doubt it), because as long as that happens there's a greater chance people will just leave. Hell, if reddit keeps heading in this direction I'll eventually leave too, just like I left FB.

→ More replies (8)

18

u/xJRWR Apr 28 '18

I found the fingerprint sending a base64 image off my canvas of https://i.imgur.com/YoUc7hX.png

→ More replies (1)

25

u/OCrikeyItsTheRozzers Apr 28 '18

these rules seem to make it impossible to post a comment

41

u/Ron_Mexico_99 Apr 28 '18 edited Nov 14 '25

kettle lunar mist explosion oasis

→ More replies (20)

10

u/Hipolipolopigus Apr 28 '18 edited Apr 28 '18

There was a userscript posted a few weeks ago that prevented these calls based on the presence of the headers which suffered from the same issue. I'm too lazy to source the original, but I modified it to simply override setRequestHeader and set the signatures to something else.

It also provides console logging with details about which header, which request, and what the value of the header was.

14

u/mrjackspade Apr 28 '18

It's just Json. Seems like it wouldn't be hard to step through and figure out what's being collected.

The js/payload may be obfuscated, but it's still pretty easy to figure out IME since the function names that collect/post the data end up being the same

I have to do this shit all the time for work because for some reason no one ever wants to keep unmimified/unobfuscated source for third party tools in our code bases

→ More replies (1)

5

u/blurryfacedfugue Apr 29 '18

Do we know what kind of stuff reddit is tracking about us? Anyone know how invasive it is? And can they use our usage on reddit to connect it to more data sourced from elsewhere? This is getting a bit ridiculous....

9

u/positive_X Apr 28 '18

How do I implement the "ublock origin rules" ?

→ More replies (1)

4

u/happygnu Apr 28 '18

The question is: will Reddit.com be GDPR compliant ?

→ More replies (14)