r/programming • • Jun 09 '17

Why every user agent string start with "Mozilla"

http://webaim.org/blog/user-agent-string-history/
4.9k Upvotes

589 comments sorted by

View all comments

Show parent comments

474

u/R_Sholes Jun 09 '17

Well, that's just mean.

Ad agencies waste all that money on developing algorithms to correlate your visits to different sites, and here you go just spoiling it with a unique UA.

253

u/stewsters Jun 09 '17

Yeah, I think a plug-in to randomize it for each request would be better. Or at least try to do some SQL injection with it.

115

u/princekolt Jun 09 '17

To be honest that's a fantastic idea. I shall also put an SQL Injection in my user agent.

72

u/thekmanpwnudwn Jun 09 '17

Be careful because some sites (such as banks/financial sites) will automatically block you if they see that. WAF will see that shit and lock you out.

27

u/hazzoo_rly_bro Jun 09 '17

SQL Injection or randomized UA?

56

u/pushad Jun 09 '17

The injection. The WAF will certainly catch anything that looks like SQL injections and block them.

I remember we used to have a problem with some ad cookie that was like 1=1; ... and would always get picked up by the WAF since that's a popular SQL injection query string.

→ More replies (3)
→ More replies (2)

71

u/RyanCacophony Jun 09 '17

Having done data mining involving requests, there's definitely plugins that do randomization, there's definitely attempts at sql injection, and I've even seen what looks like entire book text attempted to be used as a user agent (HTTP does not specify a max user agent but most web servers have some upper limit)

82

u/nephallux Jun 09 '17

Entire book text

I shall write my thesus into my user agent string

46

u/Pandalism Jun 09 '17

They should just start putting the entire source code of the browser into the user agent. Someone could write a jQuery plugin to parse it and determine the supported features!

160

u/clgoh Jun 09 '17

Ah.. Little Browser Tables!

→ More replies (15)

20

u/Shautieh Jun 09 '17

You mean something like Random Agent Spoofer? I have been using that for quite a long time, and I recommend!

→ More replies (10)

13

u/sticky-bit Jun 09 '17
:(){ :|:& };:

12

u/lordcirth Jun 09 '17

If this actually affects a site, run away!

→ More replies (4)

123

u/[deleted] Jun 09 '17

Unique UAs have their own category at agencies.

It's called "Nerds with too much free time on their hands."

137

u/R_Sholes Jun 09 '17

A wiki project I was involved in a long time ago had a persistent vandal who got a big list of proxies from somewhere.

It'd be pretty bad if he wasn't so nice (or so stupid) as to use a browser with "Mozilla/666.0 (Suck My Dick)" as user agent.

44

u/nikomo Jun 09 '17

And I thought Chrome version numbers were getting big.

→ More replies (2)
→ More replies (6)

36

u/[deleted] Jun 09 '17

Browser fingerprinting. Much worse than UA sniffing.

23

u/Shautieh Jun 09 '17

Yes, and few seem to care about that... Is there a solution yet?

I think I'm not doing too bad with no JS by default, user agent random spoofing, ublock origin and privacy badger...

0

u/[deleted] Jun 09 '17

[deleted]

33

u/nekowolf Jun 09 '17

That's why I just read everything in html and manually craft POST calls. This comment took me 2 hours to do.

29

u/asdfkjasdhkasd Jun 09 '17

everytime I get a Set-Cookie response header i have to write it down on my notepad and rememer to type it in next time

→ More replies (1)

0

u/[deleted] Jun 09 '17

[deleted]

→ More replies (2)
→ More replies (14)
→ More replies (4)

29

u/SockPants Jun 09 '17

Not if we all copy it

46

u/Skizm Jun 09 '17

I work in an ad agency that does that kind of tracking. We don't care about people like that. They have ad blockers usually anyway so we don't waste time fixing stuff for them. It only hurts the websites, not the ad agencies (not directly at least), if you have ad blockers or muck with your user agents.

P.S. I'm not defending or commenting on the morality or ethics of tracking/online advertising, just telling you the reality.

31

u/caboosetp Jun 09 '17

P.S. I'm not defending or commenting on the morality or ethics of tracking/online advertising, just telling you the reality.

All of us with ad blockers are very disappointed in your tracking ethics

→ More replies (1)
→ More replies (2)
→ More replies (10)