Auf dieser Seite wird beschrieben, wie Sie mit der Funktion zur Erkennung von Passwortlecks von reCAPTCHA Enterprise Passwortlecks und gehackte Anmeldedaten erkennen, um Kontoübernahmen (Account Takeovers, ATOs) und Credential Stuffing-Angriffe zu verhindern. Mit reCAPTCHA Enterprise können Sie im Rahmen jeder Prüfung Nutzeranmeldedaten (Passwörter) regelmäßig prüfen, um sicherzustellen, dass diese nicht gehackt oder gehackt wurden. Für diese Prüfungen verwendet Google den Passwortcheck.
Hinweise
Die Abrechnung für das Google Cloud-Projekt muss aktiviert sein.
Für reCAPTCHA Enterprise muss die Abrechnung für das Projekt verknüpft und aktiviert sein, um die Funktion zur Erkennung von Passwortlecks nutzen zu können. Sie können die Abrechnung aktivieren, indem Sie entweder eine Kreditkarte oder eine vorhandene Abrechnungs-ID eines Google Cloud-Projekts verwenden. Wenn Sie Unterstützung bei der Abrechnung benötigen, wenden Sie sich an den Cloud Billing-Support.
Auf gehackte und gehackte Anmeldedaten prüfen
Wenn Sie prüfen möchten, ob ein Satz von Anmeldedaten gehackt wurde, nutzen Sie die Erkennung von Passwortlecks, wenn Sie Prüfungen für Aktionen wie Anmeldungen, Passwortänderungen und Passwortzurücksetzungen erstellen.
Führen Sie die folgenden Schritte aus, um nach Passwortlecks und gehackten Anmeldedaten zu suchen:
- Anfrageparameter generieren:
- Bewertung erstellen, um Passwortlecks zu erkennen
- Verifizieren Sie gehackte Anmeldedaten aus einer Bewertung.
- Ergebnis interpretieren und Maßnahmen ergreifen:
Anfrageparameter generieren
Berechnen Sie die erforderlichen Anfrageparameter mithilfe der kryptografischen Funktionen, die für das High-Privacy-Protokoll erforderlich sind. reCAPTCHA Enterprise bietet Java- und TypeScript-Bibliotheken, um diese Felder zu generieren:
Für Bestätigungen durch die Passwortprüfung müssen Sie ein
PasswordCheckVerifier
-Objekt erstellen.PasswordCheckVerifier verifier = new PasswordCheckVerifier();
Rufen Sie
PasswordCheckVerifier#createVerification
an, um eine Bestätigung einzuleiten. Bei dieser Methode werden der Nutzername und das Passwort verwendet, um die Parameter für die Passwortprüfung zu berechnen.PasswordCheckVerification verification = verifier.createVerification("username", "password").get();
Erstellen Sie mithilfe der Bestätigungsparameter eine Bewertung.
byte[] lookupHashPrefix = verification.getLookupHashPrefix(); byte[] encryptedUserCredentialsHash = verification.getEncryptedUserCredentialsHash();
Die Bytearrays
lookupHashPrefix
undencryptedUserCredentialsHash
enthalten die Parameter, die zum Starten einer PasswortprüfungAssessment
erforderlich sind.
Bewertung zur Erkennung von Passwortlecks erstellen
Verwenden Sie die Methode projects.assessments.create
.
Bevor Sie die Anfragedaten verwenden, ersetzen Sie die folgenden Werte:
- PROJECT_ID: Ihre Google Cloud-Projekt-ID
- LOOKUP_HASH_PREFIX: Präfix des SHA-256-Hash-Präfix des Nutzernamens
- ENCRYPTED_USER_CREDENTIALS_HASH: verschlüsselte Nutzeranmeldedaten, Scrypt-Hash
HTTP-Methode und URL:
POST https://recaptchaenterprise.googleapis.com/v1/projects/PROJECT_ID/assessments
JSON-Text der Anfrage:
{ "private_password_leak_verification": { "lookup_hash_prefix": "LOOKUP_HASH_PREFIX", "encrypted_user_credentials_hash": "ENCRYPTED_USER_CREDENTIALS_HASH" } }
Wenn Sie die Anfrage senden möchten, wählen Sie eine der folgenden Optionen aus:
curl
Speichern Sie den Anfragetext in einer Datei mit dem Namen request.json
und führen Sie den folgenden Befehl aus:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://recaptchaenterprise.googleapis.com/v1/projects/PROJECT_ID/assessments"
PowerShell
Speichern Sie den Anfragetext in einer Datei mit dem Namen request.json
und führen Sie den folgenden Befehl aus:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://recaptchaenterprise.googleapis.com/v1/projects/PROJECT_ID/assessments" | Select-Object -Expand Content
Sie sollten in etwa folgende JSON-Antwort erhalten:
{ "name": "projects/698047609967/assessments/fb22000000000000", "score": 0, "reasons": [], "privatePasswordLeakVerification": { "lookupHashPrefix": "zoxZwA==", "encryptedUserCredentialsHash": "AyRihRcKaGLj/FA/r2uqQY/fzfTaDb/nEcIUMeD3Tygp", "reencryptedUserCredentialsHash": "Aw65yEbLM39ww1ridDEfx5VhkWo11tzn/R1B88Qqwr/+" "encryptedLeakMatchPrefixes": [ "n/n5fvPD6rmQPFyb4xk=", "IVQqzXsbZenaibID6OI=", ..., "INeMMndrfnlf6osCVvs=", "MkIpxt2x4mtyBnRODu0=", "AqUyAUWzi+v7Kx03e6o="] } }
Gehackte Anmeldedaten aus einer Bewertung prüfen
Extrahieren Sie aus der Bewertungsantwort die Felder reEncryptedUserCredentials
und encryptedLeakMatchPrefixes
und übergeben Sie sie an das Verifizierungsobjekt, um festzustellen, ob die Anmeldedaten gehackt wurden.
PasswordCheckResult result = verifier.verify(verification,
result.getReEncryptedUserCredentials(),
result.getEncryptedLeakMatchPrefixes()
).get();
System.out.println("Credentials leaked: " + result.areCredentialsLeaked());
Beurteilung interpretieren und Maßnahmen ergreifen
Die Antwort der Bewertung zeigt, ob die Anmeldedaten gehackt wurden, und liefert Ihnen Informationen, mit denen Sie geeignete Maßnahmen zum Schutz Ihrer Nutzer ergreifen können.
Die folgende Tabelle enthält die empfohlenen Maßnahmen, die Sie ergreifen können, wenn ein gehacktes Passwort erkannt wird:
Gehacktes Passwort erkannt | Maßnahmen zum Schutz Ihrer Nutzer |
---|---|
Bei der Anmeldung |
|
Bei der Kontoerstellung oder dem Zurücksetzen des Passworts |
|
Wenn Sie auf Ihrer Website noch keinen MFA-Anbieter verwenden, können Sie die MFA-Funktion von reCAPTCHA Enterprise nutzen.
Codebeispiel
Java
Richten Sie Standardanmeldedaten für Anwendungen ein, um sich bei reCAPTCHA Enterprise zu authentifizieren. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.
Node.js (TypeScript)
Richten Sie Standardanmeldedaten für Anwendungen ein, um sich bei reCAPTCHA Enterprise zu authentifizieren. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.
Nächste Schritte
- Multi-Faktor-Authentifizierung (MFA) verwenden
- Nutzerkonten mit dem Account Defender von reCAPTCHA Enterprise schützen