Skip to main content
QUICK REVIEW

[論文レビュー] Don't Leak Your Keys: Understanding, Measuring, and Exploiting the AppSecret Leaks in Mini-Programs

Yue Zhang, Yuqing Yang|arXiv (Cornell University)|Jun 13, 2023
Advanced Malware Detection Techniques被引用数 4
ひとこと要約

本論文は、345万件のWeChatミニアプリのうち4万880件がマスターキー(AppSecret)を漏洩させ、攻撃者がユーザーのアカウントを乗っ取り、プロmotionを悪用し、有料サービスを盗難する可能性があることを明らかにした。著者らはクローラーとキーチェックツールを開発し、漏洩の広がりを測定した。その後、Tencentに報告し、その提言に基づき新たな防御APIが開発された。

ABSTRACT

Mobile mini-programs in WeChat have gained significant popularity since their debut in 2017, reaching a scale similar to that of Android apps in the Play Store. Like Google, Tencent, the provider of WeChat, offers APIs to support the development of mini-programs and also maintains a mini-program market within the WeChat app. However, mini-program APIs often manage sensitive user data within the social network platform, both on the WeChat client app and in the cloud. As a result, cryptographic protocols have been implemented to secure data access. In this paper, we demonstrate that WeChat should have required the use of the "appsecret" master key, which is used to authenticate a mini-program, to be used only in the mini-program back-end. If this key is leaked in the front-end of the mini-programs, it can lead to catastrophic attacks on both mini-program developers and users. Using a mini-program crawler and a master key leakage inspector, we measured 3,450,586 crawled mini-programs and found that 40,880 of them had leaked their master keys, allowing attackers to carry out various attacks such as account hijacking, promotion abuse, and service theft. Similar issues were confirmed through testing and measuring of Baidu mini-programs too. We have reported these vulnerabilities and the list of vulnerable mini-programs to Tencent and Baidu, which awarded us with bug bounties, and also Tencent recently released a new API to defend against these attacks based on our findings.

研究の動機と目的

  • WeChatミニアプリにおけるマスターキー(AppSecret)漏洩の広がりと影響を理解すること。
  • どの程度のミニアプリが信頼できないフロントエンドにマスターキーを露出しているかを測定すること。
  • 漏洩したAppSecretsによって可能な実世界の攻撃、特にアカウント乗っ取りとサービス盗難を示すこと。
  • 特に著名な開発者たちにおけるキーレイクの根本的原因を分析すること。
  • 対策を提案・検証し、Tencentによる新たな防御APIの設計に影響を与えること。

提案手法

  • 345万586件のWeChatミニアプリを収集・分析するためのミニアプリクローラーを構築した。
  • 静的および動的解析を用いたマスターキー漏洩検出ツールを開発し、フロントエンドコードにAppSecretsが含まれるかを特定した。
  • WeChatの暗号化データおよび有料サービスへのAPIアクセスをテストすることで、検出されたキーチェックを検証した。
  • 生産環境コードにキーレイクが存在するかを確認するため、有名なミニアプリを手動で分析した。
  • 脆弱性と脆弱なアプリのリストをTencentおよびBaiduに報告し、責任ある報告と報奨金の発動を促した。
  • Tencentと協働し、将来的な攻撃を防ぐ新たなセキュリティAPIの設計に影響を与えた。
Figure 1 . Sensitive data access protocols in WeChat mini-programs
Figure 1 . Sensitive data access protocols in WeChat mini-programs

実験結果

リサーチクエスチョン

  • RQ1WeChatミニアプリにおけるマスターキー(AppSecret)漏洩はどの程度広がっているか?
  • RQ2ミニアプリエコシステムにおける漏洩したAppSecretsの実世界のセキュリティ的影響は何か?
  • RQ3リスクが周知されているにもかかわらず、なぜ開発者が意図せずフロントエンドにマスターキーを露出してしまうのか?
  • RQ4著名で人気の高いミニアプリは、AppSecret漏洩の影響をどの程度受けているか?
  • RQ5将来的にこのような漏洩を防ぐための体系的かつ技術的対策は何か?

主な発見

  • 分析対象の345万586件のWeChatミニアプリのうち、4万880件がマスターキーを漏洩させ、漏洩率は1.18%であった。
  • この脆弱性は、有名でない開発者に限らず、ネスレ、HP、Tencent自身を含む著名なベンダーにも影響を及ぼしている。
  • 攻撃者は漏洩したAppSecretsを用いて、電話番号、個人番号、配送先住所など、ユーザーが暗号化したデータを復号できる。
  • 漏洩したキーにより、グループ購入プロmotionを操作し、キャッシュバックやクーポンを不正に獲得する金融的悪用が可能になる。
  • 攻撃者は被害者の代わりに有料サービス(例:OCR)を消費でき、サービス盗難と財務的損失を引き起こす。
  • Tencentは、著者らの提言に基づき、新たな防御APIをリリースした。これにより、研究の実用的影響が裏付けられた。
Figure 2 . Cloud services access protocols in WeChat mini-programs
Figure 2 . Cloud services access protocols in WeChat mini-programs

より良い研究を、今すぐ始めましょう

論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。