dolevf/Damn-Vulnerable-GraphQL-Application

GitHub: dolevf/Damn-Vulnerable-GraphQL-Application

一款故意设计存在漏洞的 GraphQL 应用,用于安全学习和演练 GraphQL 特有的安全风险及常见 Web 漏洞。

Stars: 1676 | Forks: 355

# Damn Vulnerable GraphQL Application Damn Vulnerable GraphQL Application 是一个故意存在漏洞的 Facebook GraphQL 技术实现,用于学习和实践 GraphQL 安全。

DVGA

# 目录 * [关于 DVGA](#about) * [运行模式](#operation-modes) * [场景](#scenarios) * [前置条件](#prerequisites) * [安装](#installation) * [安装 - Docker](#docker) * [安装 - Docker Registry](#docker-registry) * [安装 - 服务器](#server) * [截图](#screenshots) * [维护者](#maintainers) * [贡献者](#contributors) * [提及](#mentions) * [免责声明](#disclaimer) * [许可证](#license) # 关于 DVGA Damn Vulnerable GraphQL 是一个故意设计为薄弱和不安全的 GraphQL 实现,它提供了一个安全的环境来攻击 GraphQL 应用程序,允许开发者和 IT 专业人员测试漏洞。 ## DVGA 操作支持 - Queries(查询) - Mutations(变更) - Subscriptions(订阅) DVGA 包含大量漏洞,例如注入、代码执行、绕过、拒绝服务等。请在[场景](#scenarios)部分查看完整列表。还提供了一个公开的 [Postman collection](https://www.postman.com/devrel/workspace/ab3d0551-b65d-4588-b464-1a317e8d7e98/collection/14270212-b5875c90-d36e-43f4-8bd7-2c81b556245d?action=share&creator=14270212) 用于重放挑战的解决方案。您可以通过单击下方的 Run in Postman 按钮来导入该集合。 [![Run in Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/14270212-b5875c90-d36e-43f4-8bd7-2c81b556245d?action=collection%2Ffork&collection-url=entityId%3D14270212-b5875c90-d36e-43f4-8bd7-2c81b556245d%26entityType%3Dcollection%26workspaceId%3Dab3d0551-b65d-4588-b464-1a317e8d7e98) # 运行模式 DVGA 支持初级和专家级游戏模式,这将改变利用难度。 # 场景 * **侦察** * 发现 GraphQL * GraphQL 指纹识别 * **拒绝服务** * 批量查询攻击 * 深度递归查询攻击 * 资源密集型查询攻击 * 字段重复攻击 * 基于别名的攻击 * **信息泄露** * GraphQL 内省 * GraphiQL 接口 * GraphQL 字段建议 * 服务端请求伪造 * 堆栈跟踪错误 * **代码执行** * OS 命令注入 #1 * OS 命令注入 #2 * **注入** * 存储型跨站脚本攻击 * 日志欺骗 / 日志注入 * HTML 注入 * SQL 注入 * **授权绕过** * GraphQL JWT Token 伪造 * GraphQL 接口保护绕过 * GraphQL 查询拒绝列表绕过 * **杂项** * GraphQL 查询弱密码保护 * 任意文件写入 // 路径遍历 # 前置条件 需要以下 Python3 库: * Python3 (3.6 - 3.10) * Flask * Flask-SQLAlchemy * Flask-Sockets * Gevent * Graphene * Graphene-SQLAlchemy * Rx 有关依赖项,请参阅 [requirements.txt](requirements.txt)。 # 安装 ## Docker ### 克隆仓库 `git clone https://github.com/dolevf/Damn-Vulnerable-GraphQL-Application.git && cd Damn-Vulnerable-GraphQL-Application` ### 构建 Docker 镜像 `docker build -t dvga .` ### 从镜像创建容器 `docker run -d -t -p 5013:5013 -e WEB_HOST=0.0.0.0 --name dvga dvga` 在浏览器中,访问 http://localhost:5013 注意:如果您需要应用程序绑定到特定端口(例如 8080),请使用 **-e WEB_PORT=8080**。 ## Docker Registry ### 从 Docker Hub 拉取 docker 镜像 `docker pull dolevf/dvga` Docker Hub 镜像:[dolevf/dvga](https://hub.docker.com/r/dolevf/dvga) ### 从镜像创建容器 `docker run -t -p 5013:5013 -e WEB_HOST=0.0.0.0 dolevf/dvga` 在浏览器中,访问 http://localhost:5013 ## 服务器 ### 导航到 /opt `cd /opt/` ### 克隆仓库 `git clone git@github.com:dolevf/Damn-Vulnerable-GraphQL-Application.git && cd Damn-Vulnerable-GraphQL-Application` ### 安装依赖 `pip3 install -r requirements.txt` ### 运行应用程序 `python3 app.py` 在浏览器中,访问 http://localhost:5013。 # 截图 ![DVGA](https://github.com/dolevf/Damn-Vulnerable-GraphQL-Application/blob/master/static/screenshots/index.png) ![DVGA](https://github.com/dolevf/Damn-Vulnerable-GraphQL-Application/blob/master/static/screenshots/solution.png) ![DVGA](https://github.com/dolevf/Damn-Vulnerable-GraphQL-Application/blob/master/static/screenshots/pastes.png) ![DVGA](https://github.com/dolevf/Damn-Vulnerable-GraphQL-Application/blob/master/static/screenshots/create.png) # 维护者 * [Dolev Farhi](https://github.com/dolevf) * [Connor McKinnon](https://github.com/connormckinnon93) * [Nick Aleks](https://github.com/nicholasaleks) # 提及 * [Black Hat GraphQL - No Starch Press](https://blackhatgraphql.com) * [OWASP Vulnerable Web Applications Directory](https://owasp.org/www-project-vulnerable-web-applications-directory/) * [GraphQL Weekly](https://www.graphqlweekly.com/issues/221/#content) * [DZone API Security Weekly](https://dzone.com/articles/api-security-weekly-issue-121) * [KitPloit](https://www.kitploit.com/2021/02/damn-vulnerable-graphql-application.html) * [tl;dr sec #72](https://tldrsec.com/blog/tldr-sec-072/) * [Intigriti Blog](https://blog.intigriti.com/2021/02/17/bug-bytes-110-scope-based-recon-finding-more-idors-how-to-hack-sharepoint/) * [STÖK - Bounty Thursdays #26](https://www.youtube.com/watch?v=645Tb7ySQFk) * [Brakeing Security 2021-007](https://brakeingsecurity.com/2021-007-news-google-asking-for-oss-to-embrace-standards-insider-threat-at-yandex-vectr-discussion) * [Yes We Hack - How to Exploit GraphQL](https://blog.yeswehack.com/yeswerhackers/how-exploit-graphql-endpoint-bug-bounty/) * [GraphQL Editor](https://blog.graphqleditor.com/dvga) * [GraphQL Hacking (Portuguese)](https://www.youtube.com/watch?v=4gXOerUZ7fw) * [InQL GraphQL Scanner Demo](https://www.youtube.com/watch?v=KOCBeJmTs78) * [H4ck3d - Security Conference 2021 (Spanish)](https://youtu.be/hg_kVoy-W1s) * [Christina Hasternath - GraphQLConf 2021](https://www.youtube.com/watch?v=tPO1jl0tCKg) * [Hacking APIs (Ch14) by Corey Ball - No Starch Press](https://nostarch.com/hacking-apis) * [Hacking Simplified Part #1](https://www.youtube.com/watch?v=w0QOAacuPgQ) * [Hacking Simplified Part #2](https://www.youtube.com/watch?v=YA-mL9Z8SNI) * [Hacking Simplified Part #3](https://www.youtube.com/watch?v=kUTIFx8vGQs) # 免责声明 DVGA 是高度不安全的,因此不应部署在面向互联网的服务器上。默认情况下,应用程序监听 127.0.0.1 以避免配置错误。 DVGA 是故意设计为有缺陷和易受攻击的,因此它不附带任何保证。使用 DVGA 时,您需对使用行为承担全部责任。 # 许可证 它在 MIT 许可证下分发。有关更多信息,请参阅 LICENSE。
标签:API安全, CISA项目, Docker, DVGA, GraphQL Mutations, GraphQL Subscriptions, GraphQL安全, GraphQL注入, intentionally vulnerable, JSON输出, Postman, Python, Web安全, 代码执行, 安全培训, 安全防御评估, 拒绝服务攻击, 无后门, 漏洞靶场, 网络安全训练, 自定义脚本, 蓝队分析, 请求拦截, 逆向工具, 防御检测