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

View all comments

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.

23

u/SuperConductiveRabbi Apr 28 '18

And useful if partner sites use the same fingerprinting algorithm (available anytime they install a "share this on Reddit" button).

18

u/nachos420 Apr 29 '18

just re-read this and found it rather relevant(also uncheck everything if you haven't):

Reddit personalizes content and advertisements for you based on what we think you may like. Personalization may occur based on your use of Reddit, including clicks, subscriptions, and subreddit visits; based on information from third-party sites that integrate our services, including our widgets and buttons; and based on information we receive from third-parties, including advertisers.

"Allow Reddit to use data provided by third-parties to show you more relevant advertisements on Reddit."

"Allow Reddit to use information from third-party websites that integrate with our services to personalize your experience on Reddit."

https://www.reddit.com/personalization

I wonder how they link the data... heh

→ More replies (1)

102

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

[Comment removed]

39

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

also found the end fingerprint result function:

(new Fingerprint2).getSync().fprint

test in console

you can look at a lot of the functions results with this..

ex: (new Fingerprint2).getWebglFp();

80

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

[Comment removed]

50

u/nachos420 Apr 28 '18

My webgl fingerprint:

16: Object { key: "webgl", value: "data:image/png;base64,[BASE64 ENCODED DATA REMOVED... lol too large]~extensions:ANGLE_instanced_arrays;EXT_blend_minmax;EXT_color_buffer_half_float;EXT_frag_depth;EXT_sRGB;EXT_shader_texture_lod;EXT_texture_filter_anisotropic;OES_element_index_uint;OES_standard_derivatives;OES_texture_float;OES_texture_float_linear;OES_texture_half_float;OES_texture_half_float_linear;OES_vertex_array_object;WEBGL_color_buffer_float;WEBGL_compressed_texture_s3tc;WEBGL_compressed_texture_s3tc_srgb;WEBGL_debug_renderer_info;WEBGL_debug_shaders;WEBGL_depth_texture;WEBGL_draw_buffers;WEBGL_lose_context~webgl aliased line width range:[1, 1]~webgl aliased point size range:[1, 1024]~webgl alpha bits:8~webgl antialiasing:yes~webgl blue bits:8~webgl depth bits:24~webgl green bits:8~webgl max anisotropy:16~webgl max combined texture image units:32~webgl max cube map texture size:16384~webgl max fragment uniform vectors:1024~webgl max render buffer size:16384~webgl max texture image units:16~webgl max texture size:16384~webgl max varying vectors:30~webgl max vertex attribs:16~webgl max vertex texture image units:16~webgl max vertex uniform vectors:4096~webgl max viewport dims:[32767, 32767]~webgl red bits:8~webgl renderer:Mozilla~webgl shading language version:WebGL GLSL ES 1.0~webgl stencil bits:0~webgl vendor:Mozilla~webgl version:WebGL 1.0~webgl unmasked vendor:Google Inc.~webgl unmasked renderer:ANGLE (Intel(R) HD Graphics 530 Direct3D11 vs_5_0 ps_5_0)~webgl vertex shader high float precision:23~webgl vertex shader high float precision rangeMin:127~webgl vertex shader high float precision rangeMax:127~webgl vertex shader medium float precision:23~webgl vertex shader medium float precision rangeMin:127~webgl vertex shader medium float precision rangeMax:127~webgl vertex shader low float precision:23~webgl vertex shader low float precision rangeMin:127~webgl vertex shader low float precision rangeMax:127~webgl fragment shader high float precision:23~webgl fragment shader high float precision rangeMin:127~webgl fragment shader high float precision rangeMax:127~webgl fragment shader medium float precision:23~webgl fragment shader medium float precision rangeMin:127~webgl fragment shader medium float precision rangeMax:127~webgl fragment shader low float precision:23~webgl fragment shader low float precision rangeMin:127~webgl fragment shader low float precision rangeMax:127~webgl vertex shader high int precision:0~webgl vertex shader high int precision rangeMin:31~webgl vertex shader high int precision rangeMax:30~webgl vertex shader medium int precision:0~webgl vertex shader medium int precision rangeMin:31~webgl vertex shader medium int precision rangeMax:30~webgl vertex shader low int precision:0~webgl vertex shader low int precision rangeMin:31~webgl vertex shader low int precision rangeMax:30~webgl fragment shader high int precision:0~webgl fragment shader high int precision rangeMin:31~webgl fragment shader high int precision rangeMax:30~webgl fragment shader medium int precision:0~webgl fragment shader medium int precision rangeMin:31~webgl fragment shader medium int precision rangeMax:30~webgl fragment shader low int precision:0~webgl fragment shader low int precision rangeMin:31~webgl fragment shader low int precision rangeMax:30" }

also apparently it thinks I don't use adblock(I have router dns blocking + ublock), and that I lied about my OS. and it is aware of DNT:

"Object { key: "do_not_track", value: "1" }"

64

u/Craftkorb Apr 28 '18

and it is aware of DNT:

"Object { key: "do_not_track", value: "1" }"

That's my favorite part

0

u/[deleted] Apr 28 '18

[deleted] — view deleted comment

37

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

[Comment removed]

4

u/[deleted] Apr 30 '18

you need to stop using the website if you don't want to be tracked.

Whelp, see you guys later..

→ More replies (12)

4

u/Ramast Apr 29 '18

I am using firefox with no adblock whatsoever, just have noscripts (configured to trust reddit domain) and I selected "don't track me" in my firefox settings.

Tracking code is automatically blocked https://imgur.com/a/tTBPsSY

→ More replies (5)

0

u/[deleted] Apr 28 '18

[deleted] — view deleted comment

8

u/yawkat Apr 28 '18

Large parts of the code base had already been closed source and there was no way to verify what was running anyway

12

u/lucasban Apr 28 '18

Any more on this? Are they going to be opening it back up after they clean up?

132

u/Aro2220 Apr 28 '18

hahahahahahahaha....no.

Reddit is part of the same 'control public speech patterns online' group orgies that youtube/google, facebook and twitter have all joined.

→ More replies (2)

26

u/exmachinalibertas Apr 28 '18

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

24

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

[Comment removed]

39

u/RenaKunisaki Apr 28 '18

This kind of thing is why I feel we need to replace the whole damn browser/web infrastructure. Maybe you can hack on it to give false data for things like screen size, battery life, list of available fonts, CPU speed (as measured by operations per second by a script), GPU capabilities, mouse motion... But the browser, and the underlying tech, were never designed with privacy in mind, and they've only gotten worse since all the browsers were bought out by ad companies.

0

u/[deleted] Apr 29 '18

[deleted] — view deleted comment

19

u/mrcaptncrunch Apr 29 '18

Hm, I guess Google does have Ads, Microsoft does have ads, Opera is now Chinese owned.

Firefox doesn’t have ads, but lately they’ve been doing some weird/shady/odd things like adding pocket the mr robot extension thing (that could be seen like an ad but not in the normal sense).

...

Shit... Fuck.

→ More replies (4)
→ More replies (1)

6

u/OleCarnivorous Apr 28 '18

Lay man here, are they able to use this info to day allow another site to identify you? IE is it something they can sell or share for gain?

13

u/nachos420 Apr 28 '18

technically, yes, but identifying info seems to be hashed together, as far as I know, to build a smaller ID that would be unique to reddit unless the other website used the same code as reddit to hash and collect all the data.

I personally don't like my browser sending requests somewhat constantly about how much I scrolled, or that i'm making a response or whatever else(screenview_events, loid_events, scroll_events, idle heartbeat event) or the many tracking pixel .gifs

→ More replies (1)
→ More replies (1)
→ More replies (6)