News for hackers. Stuff that matters.
Re:Show HN: A CSS Keylogger by dmitrygr on Tuesday February 20, 2018 @02:23PM (#16423226)
No, since it matches only the last character, you watch the requests it makes IN order to get the entire password. As you type "qwerty", it will request "Q", "W", "E", "R", "T", and finally "Y"

no permutations needed

Re:Show HN: A CSS Keylogger by gsnedders on Tuesday February 20, 2018 @02:32PM (#16423350)
Assuming the server receives the requests in the same order as the requests were sent, which on mobile networks isn't anywhere near so certain.
Re:Show HN: A CSS Keylogger by Francute on Tuesday February 20, 2018 @02:55PM (#16423580)
Not an efficient keylogger, however, if you know the pressed keys, you can just generate permutations ordered using probabilities, and that would be a lot faster than brute force.

The real deal here is, it depends on some js code updating the dom for each key press, which is BAAAD. Not an useless keylogger, because it reminds a vulnerability product of choosing a bad decision.

Re:Show HN: A CSS Keylogger by netsharc on Tuesday February 20, 2018 @11:56PM (#16426965)
Interestingly the password "BAAAD" would generate 3 requests to the logging server, since it wouldn't request the background image for the letter "A" more than one time. Or shouldn't, anyway.
Re:Show HN: A CSS Keylogger by early on Wednesday February 21, 2018 @03:02AM (#16427758)
That depends on cache headers sent from the server, which the attacker controls
Re:Show HN: A CSS Keylogger by X-Istence on Tuesday February 20, 2018 @03:46PM (#16424035)
> it depends on some js code updating the dom for each key press

Like React with JSX?

Re:Show HN: A CSS Keylogger by tmerse on Tuesday February 20, 2018 @07:40PM (#16425759)
It may be easier to XSS CSS than JS.
Re:Show HN: A CSS Keylogger by plopz on Tuesday February 20, 2018 @02:58PM (#16423614)
Even if the attacker got them out of order, it would let them be able to brute force guess in a small number of attempts.
Re:Show HN: A CSS Keylogger by hinkley on Tuesday February 20, 2018 @04:13PM (#16424261)
For example, there are about 41,000 possible passwords for a given set of 8 characters, out of around 96^8 possible 8 character passwords (in the ASCII character set).
Re:Show HN: A CSS Keylogger by roywiggins on Tuesday February 20, 2018 @08:11PM (#16425946)
And if any of those are words or almost words, you'd guess that first and probably have it.
Re:Show HN: A CSS Keylogger by brailsafe on Tuesday February 20, 2018 @04:54PM (#16424574)
Where does 41000 come from?
Re:Show HN: A CSS Keylogger by eterm on Tuesday February 20, 2018 @05:02PM (#16424651)
It's 8! (8 factorial) which is 40320.

This is 127,286,426,869 (~128bn) times smaller than 92^8.

Edit: Note that if you have a repeated character in your 8 charcter password then the number of permutations of the set of 8 (7 distinct) characters is further halved to 20,160.

Re:Show HN: A CSS Keylogger by Klathmon on Tuesday February 20, 2018 @06:38PM (#16425388)
And just by doubling the amount of selectors you could always check for a repeated character! (AKA [value$=aa], [value$=bb], etc...)
Re:Show HN: A CSS Keylogger by ohmatt on Tuesday February 20, 2018 @04:37PM (#16424449)
Well it would also not come in the correct order if someone types their password wrong, deletes letters and re-types them, etc. But I assume the idea would be that you'd have a much easier time figuring out the password if you had all the keys they pressed.
Re:Show HN: A CSS Keylogger by spyder on Wednesday February 21, 2018 @04:30AM (#16428123)
You can just add the two (or more) letter permutations to the CSS to help to identify the previous characters. ( like [value$="aa"] )
Re:Show HN: A CSS Keylogger by regularhackerer on Tuesday February 20, 2018 @02:53PM (#16423569)
Or the user corrects a typo by moving the cursor or using backspace. However I think the idea is that the keylogger will work on some or most users.
Re:Show HN: A CSS Keylogger by cag_ii on Tuesday February 20, 2018 @02:42PM (#16423459)
It'd be simple enough to add an 'order' identifier (request timestamp, etc) to the requests.

Edit: nm. My mistake, not as easy as that using only css!

Re:Show HN: A CSS Keylogger by usrusr on Tuesday February 20, 2018 @02:47PM (#16423509)
Simple enough, in CSS?
Re:Show HN: A CSS Keylogger by cag_ii on Tuesday February 20, 2018 @03:13PM (#16423756)
My mistake, I guess I didn't really think that through...
Re:Show HN: A CSS Keylogger by gall0ws on Wednesday February 21, 2018 @04:12AM (#16428043)
Maybe with counter-reset?
Re:Show HN: A CSS Keylogger by ateesdalejr on Tuesday February 20, 2018 @06:53PM (#16425476)
Why would you even need an order identifier? All you need to do is check the request logs for your server everything should be already in order.
Re:Show HN: A CSS Keylogger by cag_ii on Tuesday February 20, 2018 @08:20PM (#16426005)
I was replying to the comment above which pointed out correctly that the order in which the server receives the requests may differ from the order in which they were sent.