Tuesday, June 28, 2022
  • Home
  • Event
  • Technology
  • Program
  • Education
No Result
View All Result
E-Capitals
No Result
View All Result
Home Program

CSS-Based Fingerprinting | CSS-Tricks – CSS-Tricks

admin by admin
January 3, 2022
in Program
0
0
SHARES
0
VIEWS
Share on FacebookShare on Twitter

Fingerprinting is bad. It’s a term that refers to building up enough metadata about a user that you can essentially figure out who they are. JavaScript has access to all sorts of fingerprinting possibilities, which then combined with the IP address that the server has access to, means fingerprinting is all too common.

Related Posts

Great Web Development Books You Can Read Free | CSS-Tricks

Top 10 Computer Science Universities in USA

Single Element Loaders: The Bars | CSS-Tricks

Different Ways to Write CSS in React | CSS-Tricks

You don’t generally think of CSS as being a fingerprinting vector though, and thus “safe” in that way. But Oliver Brotchie has documented an idea that allows for some degree of fingerprinting with CSS alone.

Think of all the @media queries we have. We can test for pointer type with any-pointer. Imagine that for each value, we request a totally unique background-image from a server. If that image was requested, we know those @media queries were true. We can start to fingerprint with something like this:

.pointer {
  background-image: url('/unique-id/pointer=none')
}

@media (any-pointer: coarse) {
  .pointer {
    background-image: url('/unique-id/pointer=coarse')
  }
}

@media (any-pointer: fine) {
  .pointer {
    background-image: url('/unique-id/pointer=fine')
  }
}

Combine that with the fact that we can test for a dark mode preference with prefers-color-scheme, the fingerprint gets a bit clearer. In fact, it’s the current draft for CSS user prefer media queries that Oliver is most concerned about:

Not only will the upcoming draft make this method scalable, but it will also increase its precision. Currently, without alternative means, it is hard to conclusively link every request to a specific visitor as the only feasible way to determine their origin, is to group the requests by the IP address of the connection. However, with the new draft, by generating a randomised string and interpolating it into the URL tag for every visitor, we can accurately identify all requests from said visitor.

There are tons more. We can make media queries that are 1px apart and request a background image for each, perfectly guessing the visitor’s window size. There are probably a dozen or more exotic media queries that are rarely used, but are useful specifically to fingerprinting with CSS. Combine that with @supports queries for all sorts of things to essentially guess the exact browser. And combine that with the classic technique of testing for installation of specific local fonts, and you have a half-decent fingerprinting machine.

@font-face
  font-family: 'some-font'
  src: local(some font), url('some/url/some-font')

.some-font
  font-family:'some-font'

The generated CSS to do it is massive (here’s the Sass to generate it), but apparently it’s heavily reduced once we can use custom properties in URLs.

I’m not heavily worried about it, mostly because I don’t disable JavaScript and JavaScript is so much more widely capable of fingerprinting already. Plus, there are already other types of CSS security vulnerabilities, from reading visited links (which browsers have addressed), keylogging, and user generated inline styles, among others that folks have pointed out in another article on the topic.

But Oliver’s research on fingerprinting is really good and worthy of a look by everyone who knows more about web security than I do.

Next Post

Clutter be gone: This startup will sell your stuff online for a $5.99 flat rate

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Popular Posts

Technology

Fan uses Twitter and DoorDash to deliver pizza to Mariners player at Angel Stadium after brawl – GeekWire

by admin
June 27, 2022
0

Seattle Mariners outfielder Jesse Winker got a special delivery on Sunday in Anaheim, Calif. (Photos via GeekWire, Mariners) Seattle Mariners...

Read more

Fan uses Twitter and DoorDash to deliver pizza to Mariners player at Angel Stadium after brawl – GeekWire

Expedia hires chief security officer; Microsoft technical fellow departing; and more – GeekWire

Help! My Husband Resents My Summers Off

UW program supports underserved STEM students – GeekWire

Challenge Kids to Complete This Color-as-You-Go Reading Challenge

65 Tips, Tricks & Ideas

Load More

Popular Posts

Best Winter Olympics Activities for Kids in the Classroom

by admin
January 19, 2022
0

What is Packet Sniffing Attack? – Types and How to Prevent It?

by admin
December 11, 2021
0

Zain Nadella, 1996-2022: Microsoft CEO’s son remembered for love of music, bright smile, profound impact on his dad

by admin
March 1, 2022
0

Copyright © 2021 - e-Capitals.com DESIGNED AND DEVELOPED BY TEAM WORDPRESS BLOGX

No Result
View All Result
  • Home
    • Home 1
    • Home 2
    • Home 3
  • Event
  • Technology
  • Program
  • Education

Copyright © 2021 - e-capitals.com - DESIGNED AND DEVELOPED BY TEAM WORDPRESS BLOGX