WeChall - Factor 2

Challenge

Two-factor authentication bypass. A German ordering application ("Gurroga") has login + auth token (2FA). Need to order a "special article" without valid credentials.

Solution

源码审计(GitHub gizmore/gwf3)发现 2FA 绕过:

  1. 登录流程:POST /backend/api/login.php → 返回用户信息和文章列表
  2. 认证流程:POST /backend/api/authenticate.php → 验证 token
  3. 订单流程:POST /backend/api/bestellen.php不需要认证!

关键漏洞:订单 API 不验证用户是否已通过 2FA 认证,直接接受 userid 参数。

找到特殊文章:查询其他用户的订单历史(/backend/api/bestellhistorie.php?user=6),发现 user 6 订购了 "Challenge solution for Factor 2"(ID: 5678363)。

1
2
curl -X POST -d 'user=1&id=5678363&amt=1' \
'https://www.wechall.net/en/challenge/gizmore/factor2/backend/api/bestellen.php'
5678363