Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do password managers know when I've logged in successfully?

So you know how you are presented with a login screen and then, you fill it out, and then the browser loads the next page? At this point, somehow the password manager bar pops up for LastPass, 1Password, or some other extension, asking if you want to save the password. How do they know you've just logged in successfully??

  • Forms are sometimes submitted and other times the js intercepts the form submit and sends AJAX.
  • The response comes back and may set a new cookie, but sometimes the existing session cookie continues to be used (allows session fixation attacks but some implementations do that).
  • A new location is loaded or reloaded but sometimes the javascript reloads a portion of the document instead

But somehow these password managers DETECT that I've logged into a site successfully! How? Is it because I entered something in a password field, and then some form was submitted or some network request was sent? But how do they know it was successful?

Anyone familiar with these password managers able to give some useful info?

The reason I ask is that I want to develop an extension that detects when you've logged in and somehow tries to extract your user id from the service. It is for the purposes of sharing your user id with friends automatically, and letting them know (with your permission) what sites you are using a lot.

Any hints on techniques to extract the logged-in user's id on the service would also be helpful.

like image 486
Gregory Magarshak Avatar asked Dec 13 '16 17:12

Gregory Magarshak


1 Answers

They aren't actually aware of a successful login in most cases. They are aware that a form with a password field was submitted, and the response was a 200OK. This may still be a page displaying an error message.

As for extracting user IDs, I'm pretty sure you mean profile pages or something similar. That will have to be done on a site by site basis as sites will have their own APIs and route structures.

like image 92
AkkarinZA Avatar answered Sep 29 '22 23:09

AkkarinZA