Issue #4 acceptanceIndexTreeResultsG1G2G3G4G5G6G7G8

G5 Password step and login CSRF

Index | Tree | Markdown version: G5.md

Security of the password step: a login-CSRF attack that silently signs the victim into an attacker account is defeated by the password step, plus wrong password, login lockout shared with the login form, a forged confirm form, and the "not you, sign out" line.

A22 Login-CSRF attack is defeated

Language: EN | Mode: login | Status: PASS | Repo spec: GOL S9

attack story, one victim video: victim signed in to own account W (name VICTIM), then signed out (the core login ignores a POST while someone is signed in) -> attacker page (fake origin attacker.example.test, served by page.route) auto-POSTs the login of attacker account X (same email as the victim's guest order, name ATTACKER) -> victim is now silently signed in as ATTACKER -> victim opens the genuine link: only the password step "You're signed in as ATTACKER (V)", order stays unlinked. DB/DOM manipulation: both accounts renamed via UPDATE oc_customer.firstname for readability (spec uses E2E), link row inserted directly instead of read from a mail

01. victim signed in to own account
01. victim signed in to own account
02. attacker page auto posts login
02. attacker page auto posts login
03. victim is now signed in as attacker account
03. victim is now signed in as attacker account
04. password step names attacker account nothing linked
04. password step names attacker account nothing linked
Video: A22-login-csrf-defeated-victim

A23 Wrong password

Language: EN | Mode: login | Status: PASS | Repo spec: GOL S9

same victim video: wrong password gives "The password is incorrect. Please try again.", state stays confirm, link unused, order unlinked, 1 failed attempt counted

01. wrong password error
01. wrong password error
Video: A22-login-csrf-defeated-victim

The video for this scenario is the shared A22 victim video (see A22).

A24 Lockout shared with the login form

Language: EN | Mode: login | Status: PASS | Repo spec: GOL S9

same victim video: failed-login counter set to 1000 by DB manipulation (oc_customer_login); right password refused with "Too many incorrect password attempts. Please try again in 1 hour."; counter then set to 2 by DB and the right password links 1 order (success shot is in this prefix)

01. lockout message right password refused
01. lockout message right password refused
02. below limit right password links one order
02. below limit right password links one order
Video: A22-login-csrf-defeated-victim

The video for this scenario is the shared A22 victim video (see A22).

A25 Forged confirm form

Language: EN | Mode: login | Status: PASS | Repo spec: GOL S9 (request.post without csrf)

DOM manipulation (hidden csrf set to "forged" before submit, simulating a cross-site/stale form) with the right password: error "Your session has expired. Please try again.", data-state stays confirm, link unused, order unlinked; reopening the step and submitting the genuine form links 1 order. Link row inserted via DB

01. password step
01. password step
02. csrf replaced password typed
02. csrf replaced password typed
03. session expired error nothing linked
03. session expired error nothing linked
04. genuine form succeeds
04. genuine form succeeds
Video: A25-forged-confirm

A26 "If this isn't your account, sign out"

Language: EN | Mode: login | Status: PASS | Repo spec: GOL S1 (href only)

password step -> click "sign out" -> logout page -> reopening the confirm route leads to the login page (token kept in session, not re-tested past login here). Link row inserted via DB

01. not you line
01. not you line
02. password step full page
02. password step full page
03. logged out
03. logged out
04. reopening confirm leads to login
04. reopening confirm leads to login
Video: A26-not-you-sign-out