T05 · Unauthorized Access and Privilege Escalation
- Location
INSTALL.sh:94- Finding
Installation Status Check Silently Extracts and Persists Browser Session Cookies
- Content
View full analysis
/dev/null; then AUTH=$(boss status --json 2>/dev/null || echo "") if echo "$AUTH" | grep -q '"authenticated": true'; then ``` `boss-cli/boss_cli/commands/auth.py:129-132`: ```python def status(as_json: bool, as_yaml: bool) -> None: """View current login status""" from ..auth import get_credential, verify_credential_details cred = get_credential() ``` `boss-cli/boss_cli/auth.py:867-895`: ```python def get_credential() -> Credential | None: """Try all auth methods and return credential. 1. Saved credential file 2. Environment variable (BOSS_COOKIES) 3. Browser cookie extraction """ cred = load_credential() if cred: logger.info("Loaded credential from %s", CREDENTIAL_FILE) return cred cred = load_from_env() if cred: logger.info("Loaded credential from BOSS_COOKIES env") save_credential(cred) return cred cred, _ = extract_browser_credential() if cred: logger.info("Extracted credential from browser") return cred return None ``` Representative extraction logic from `boss-cli/boss_cli/auth.py:332-371`: ```python for name in _get_browser_order(cookie_source): fn = browser_fns.get(name) if fn is None: continue if name in _CHROMIUM_BASE_DIRS: cookie_files = _iter_chrome_cookie_files(name) if not cookie_files: try: jar = fn(domain_name=".zhipin.com") except Exception as e: logger.debug("%s in-process extraction failed: %s", name, e) attempts.append(f"{name}={type(e).__na ...[truncated 3683 chars]- Remediation
View remediation
