Blog

ユーザー名の列挙を回避する方法 | セキュア・コード・ウォリアー

October 9, 2017
ピーター・ド・クレマー

サイドチャネル攻撃とは、ハッカーがアルゴリズムの理論上の弱点やソフトウェアのコードのバグではなく、ソフトウェアシステムの物理的な実装から情報を収集できる攻撃です。

これをより明確にするために私が使いたい例は、ユーザー名の列挙を行う方法です。ユーザー名の列挙とは何か、なぜそれが悪いのかを知りたい場合は、当社のウェブサイトにアクセスしてください。 ビデオ説明 または チャレンジをプレイ コードで識別できるかどうかを確認してください。

ここで、サイドチャネル攻撃によってユーザー名の列挙がどのように行われるかを理解するには、現代のウェブアプリケーションにおけるパスワードの処理方法 (または少なくとも処理すべき方法) についてある程度理解しておく必要があります。優れた Web アプリケーションはユーザーのパスワードを知らないため、パスワードをどこにも保存したり保存したりしません。では、入力した内容が正しく、実際にパスワードが正しいことをどうやって知ることができるのでしょうか。さて、パスワードはハッシュ化されています。

ハッシュ関数は、一方向に実行するのは簡単ですが (計算コストはいくぶん高くなりますが)、逆にするのが非常に難しい数学演算です。優れたハッシュアルゴリズムでは、出力は入力によって異なります。ウェブサイトに登録すると、パスワードそのものではなく、そのハッシュが安全に保存されます。つまり、ログインするたびに、ウェブアプリケーションは入力内容をハッシュし、ハッシュされた結果を格納されているハッシュと比較します。詳細を知りたい場合 安全なパスワードストレージ、私たちのプラットフォームでそれを行うことができます。

入力のハッシュ化はコンピューター上では時間がかかるため、開発者はユーザーがスムーズに操作できるように、常に書き込むものをすべて最適化しようとします。プログラムを高速化する方法の 1 つは、ハッシュが不要なときはハッシュ処理をスキップすることです。たとえば、ユーザー名が存在しない (パスワードを確認する必要がない) 場合、ユーザーはすぐにユーザーに応答できます。こうすることで、パスワードのハッシュ処理という時間のかかる計算を省略できます。ユーザー名が正しければ、入力されたパスワードをハッシュし、保存されているハッシュと比較します。

この時点で、どこで問題が発生する可能性があるかを推測できたかもしれません。実際にはハッシュには数ミリ秒しかかかりませんが、ハッカーはこの追加された遅延を利用して、入力したユーザー名が正しいかどうかを確認できます。間違ったユーザー名を入力すると、ハッシュ処理が行われていないため、応答が少し速くなるためです。この種のサイドチャネル攻撃はタイミング攻撃と呼ばれ、機能以外のさまざまな要件が互いにどのように相殺されるかを示す好例です。コードの高速化と安全性を同時に実現できない場合があります。

そのため、パスワードは完璧に処理され、表示されるメッセージは一般的なもので、パスワードまたはユーザー名が間違っていたかどうかを知らせるものではありませんが、システムは依然として脆弱です。解決策は簡単で、常にパスワードをハッシュするか、ハッシュにかかる時間だけ返信の送信を遅らせることです。

攻撃者は、取得した情報を利用して、システム上のユーザーのリストを取得する可能性があります。この情報は、ブルートフォース攻撃やデフォルトのユーザー名/パスワード攻撃などを通じて Web アプリケーションを攻撃するために使用される可能性があります。

https://www.owasp.org/index.php/Testing_for_User_Enumeration_and_Guessable_User_Account_(OWASP-AT-002)

キャッチフレーズ

Govern AI-driven development before it ships

Measure AI-assisted risk, enforce secure coding policy at commit, and accelerate secure delivery across your SDLC.

book a demo
キャッチフレーズ

Explore more blogs

これは、オーラが射手と鼻の穴を広げることによって、腸管を熱的に発芽させ、臭いを帯びていることを防ぐためのものです。

browse all
Case Study
Filter Label
This is some text inside of a div block.

Supercharged Security Awareness: How Tournaments are Inspiring Developers at Erste Group

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.

Learn More
Case Study
Filter Label
This is some text inside of a div block.

Security as culture: How Blue Prism cultivates world-class secure developers

Learn how Blue Prism, the global leader in intelligent automation for the enterprise, used Secure Code Warrior's agile learning platform to create a security-first culture with their developers, achieve their business goals, and ship secure code at speed

Learn More
Case Study
Filter Label
This is some text inside of a div block.

One Culture of Security: How Sage built their security champions program with agile secure code learning

Discover how Sage enhanced security with a flexible, relationship-focused approach, creating 200+ security champions and achieving measurable risk reduction.

Learn More
Blog
Filter Label
This is some text inside of a div block.

Enabler 7: Developer Recognition

Recognition fuels participation. Enabler 7 celebrates developer achievement loudly, with rewards and exclusive swag that mark real, earned secure coding wins.

Learn More
Blog
Filter Label
This is some text inside of a div block.

Named in the Gartner® Hype Cycle™ for Application Security 2026

Secure Code Warrior is named in the Gartner® Hype Cycle™ for Application Security, 2026 for Agentic Coding Security and Secure Coding Training. Here's why.

Learn More
Blog
Filter Label
This is some text inside of a div block.

Are you a CISO or Engineering Leader worried about the Security and Cost of LLM code generation?

Review the SCW AI Trust Index, our proprietary LLM benchmarking data, before going all-in on an AI model.

Learn More

Secure AI-driven development before it ships

See developer risk, enforce policy, and prevent vulnerabilities across your software development lifecycle.

デモを予約する
No items found.