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)|2023. 06. 13.
Advanced Malware Detection Techniques인용 수 4
한 줄 요약

이 논문은 345만 개의 WeChat 미니프로그램 중 40,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를 도입하는 데 이르는 것.

제안 방법

  • 3,450,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유명하고 인기 있는 미니프로그램은 마스터 키 泄露에 얼마나 영향을 받는가?
  • RQ5향후 유사한 泄露를 방지하기 위한 체계적이고 기술적인 대응 조치는 무엇인가?

주요 결과

  • 분석한 3,450,586개의 WeChat 미니프로그램 중 40,880개가 마스터 키를 泄露하여 1.18%의 泄露 비율을 보였다.
  • 이 취약성은 알려지지 않은 개발자뿐 아니라 Nestle, HP, Tencent 자체와 같은 유명한 벤더에게도 영향을 미쳤다.
  • 공개된 키를 악용하면 사용자가 암호화한 데이터를 해독할 수 있으며, 전화번호, 신분증 번호, 배송 주소와 같은 민감한 정보를 노출할 수 있다.
  • 공개된 키를 통해 그룹 구매 프로모션을 조작하여 환급금과 쿠폰을 유인하는 금전적 악용이 가능하다.
  • 악성 사용자는 피해자의 대리로 유료 서비스(예: OCR)를 소비함으로써 서비스 훔침과 재정적 손실을 유발할 수 있다.
  • Tencent는 저자들의 권고에 기반하여 새로운 방어 API를 출시하여 발견 결과의 실질적 영향을 검증함.
Figure 2 . Cloud services access protocols in WeChat mini-programs
Figure 2 . Cloud services access protocols in WeChat mini-programs

더 나은 연구,지금 바로 시작하세요

논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.