security - Is XSS dangerous even if the cookie doesn't store user credentials? -


whenever talks dangers of xss, mention 'bad guys' can access user credentials. if store session id on cookie, , authenticate user based on session id, there other ways xss can used access user credentials?

yes.

xss means foreign or malicious script running on page. there bunch of ways dangerous.

session hijacking

even if cookie doesn't store user credentials (and shouldn't). stores enough information server consider bearer of cookie particular user (http stateless use cookies/sessions remember users).

so if steals session id can use impersonate , server might none wiser.

safeguarding ip

in original question asked level of security: verifying ip address tied session. yes, cuts down attack avenue. yes, ip addresses can faked. you're no longer lowest hanging fruit attackers. @ same time security , convenience opposites legitimate users might frustrated when ip address changes no longer signed in.

other attacks

stealing cookie/session 1 easy way gain access not one.

since script running (supposedly) trusted site , user's browser. lot of things:

  • loads invisible iframe account edit page , resets password/email user
  • load keylogger, show user login page

Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -