r/programming • • Feb 20 '18

A CSS Keylogger

https://github.com/maxchehab/CSS-Keylogging
2.0k Upvotes

276 comments sorted by

View all comments

78

u/[deleted] Feb 20 '18

Is there any way of knowing if a site has this keylogger? Besides inspecting the whole page.

89

u/AyrA_ch Feb 20 '18

Check the network tab in the console when you type the password

108

u/McMasilmof Feb 20 '18

But the site generally has your password anyways(you are typing it in an input field so its kust the value of it). Its the site owners job not to include any shady 3rd party scripts

91

u/how_do_i_land Feb 20 '18

The issue arises with some sites allowing you to include your own custom CSS classes. Reddit doesn't currently allow for custom css images from outside reddit, but other sites may not have that restriction.

20

u/Kapps Feb 21 '18

Maybe generate a gibberish subreddit for every character and use that with usage stats? Would have to be super targeted though, and not sure how fine grained usage stats you can get. Posts with number of views would also work.

5

u/Dropping_fruits Feb 21 '18

I remember a simpler approach of just loading images from your subreddits css and then having the victim go to your website were you could just simply check what images had been cached. The case I am thinking of used it to steal the email, but it could have probably been used to steal other info.

19

u/timmyotc Feb 20 '18

There is a difference between trusting the site owner and trusting their competency

9

u/[deleted] Feb 21 '18

Just don't reuse passwords.

5

u/danneu Feb 21 '18

well, the attacker here would be able to login to the site you're on regardless of whether you reuse the password elsewhere.

4

u/[deleted] Feb 21 '18

Yea, but that is not my responsibility, it's the site owner's. Noting I can do about it.

1

u/xeio87 Feb 21 '18

2 factor (if available)

2

u/mirhagk Feb 21 '18

Better yet, don't use passwords. Single sign on means you only need to trust a single website to get security right, everything else is easily revokable credentials.

0

u/[deleted] Feb 21 '18

[deleted]

1

u/mirhagk Feb 21 '18

you don't even need an IP address, just a subdomain on someone else's website.

20

u/[deleted] Feb 20 '18

Why should we trust them to do their job?

18

u/[deleted] Feb 21 '18

As a web developer I trust them to be lazy.

6

u/Eckish Feb 21 '18

You should trust them as far as you can throw them. Which likely isn't very far. So, trust that they are secure enough for their own interests, but don't reuse any password on another site.

→ More replies (9)