漏洞知识库
点击放大


<!--
A 'Thank you' from us / YesWeHack
MC0tPjA0wLS8qPjxpbWcyoqLy1hbG+
Test it:
-->
<di="center">
<h1><img src="./img/ywhlogo.png" alt="YWH Logo" width="24" height="auto"> Code Snippets</h1>
<img src="./img/.gif" alt=" code snippet () banner YesWeHack Github repository" >
</div>
<p align="center">
<a href="#"></a> |
<a href="#programming-languages">Programming languages</a> |
<a href="#run-a-">Run a code snippet</a> |
<a href="#installation">Installation</a> |
<a href="#update">Update</a>
</p>
YesWeHack present code snippets containing several different to practice your code analysis in a safe dockerized en. The code snippets are suitable for all skill levels.
~ New code snippet at Twitter every Friday! 🗒
> If you want to see something special or if you just have an idea about a code snippet, feel free to create a "New Issue" where you explain your idea, no idea is stupid.
---
⚠️ Be aware
> Be sure to run this in a secure en, as the code is and is intended to be used for learning code analysis!
By default, all code snippets contain a docker setup that isolates the code from your host system and make it safe to run (*read more in the section : "Run a code snippet"*).
| ID | | Description |
|---|---|---|
📜#1 | SQLi & XSS | Backslash filter collide
📜#2 | Improper file access & XSS | Invalid char and regex
📜#3 | Log Forging injection, Path tra & Code injection | Poor filter and improper include() handling
📜#4 | XSS | Invalid user input filter
📜#5 | SSRF & Broken authorization | Trusted user input and client IP from header
📜#6 | SSTI | Mixed input format
📜#7 | SQLi | Use of invalid within statement
📜#8 | CSRF | No CSRF token included
📜#9 | Open Redirect | Invalid regex handler
📜#10 | DOM XSS | Backend filter collide with client side Ja
📜#11 | CORS | Misconfigured Access-Control-Allow header
📜#12 | CSRF/ClickJacking | GET request CSRF with insecure delete process / ClickJacking - X-Frame-Options set in HTML meta tag
📜#13 | Path Tra/Unrestricted File Upload | Poor Path Tra and file upload protection results in a code injection
📜#14 | DOS | Incorrect operator handler in "for loop"
📜#15 | Weak Password Recovery Mechanism for Forgotten Password | Weak hash for password recovery
📜#16 | IDOR | insecure if statement leads to improper access control
📜#17 | Insecure deserialization | Execute trusted user input inside pickle function loads()
📜#18 | Path Tra | Improper user of filename
📜#19 | Open Redirect | Invalid handling of user-controlled input "*location.hash*"
📜#20 | SQL injection | Invalid use of function replace(), The char is only replaced once
📜#21 | PostMessage DOM XSS | No origin , leading to PostMessage DOM XSS
📜#22 | XSS/OpenRedirect | The filter protection does not filter all special characters that can be used to exploit the
📜#23 | Buffer o | Take user's STDIN input with the gets() function without checking the buffer size
📜#24 | SQL injection | Incorrect use of the PHP function addslashes()
📜#25 | XSS - CSP bypass | No of user input along with insecure handling of nonce
📜#26 | Path Tra | The filter provided by the PHP function "preg_replace()" is limited to filtering only the first 10 characters
📜#27 | Web Cache Poisoning | The HTTP header Referer is reflected in the cached response body without being filtered
📜#28 | Business logic | An attacker can withdraw negati to increase the o balance of their account
📜#29 | IDOR | An attacker can gain access to sensitive data from other users by performing a *Forced browsing* attack
📜#30 | Insecure deserialization | Use of a dangerous function (exec) that can be controlled by the user, resulting in an RCE
📜#31 | LFI | No proper character escaping or filter . The include() function executes all PHP code in the given file, no matter the file extension, resulting in code injection
📜#32 | Format injection! | Format a string containing provided by the client, resulting in a format injection
📜#33 | SQL injection (second order) | All SQL queries use prepared statements except the last one. This statement extracts a value from the database that was once controlled by the user and adds it to the SQL query, leading to an SQL injection (second order)
📜#34 | Regular expression Denial of Service (ReDoS) | Poorly configured regex pattern used to filter user-controlled input
📜#35 | XSS | Trusted user input in GET parameter
📜#36 | Unrestricted File Upload | Insufficient of the file extension of the uploaded file and missed of the file content
📜#37 | SSRF | Insecure handling of the proxy header X-Forwarded-Host and cURL leading to a full SSRF
📜#38 | Code injection | The user can write customised content to a selected file which is then launched on the system
📜#39 | LFI | Exploitation of an LFI make it possible to run the tool *pearcmd* resulting in a remote code execution
📜#40 | Unrestricted File Upload | The php3 extension can be used to execute php code due to the configuration in the Apache proxy.
📜#41 | Command injection | Invalid usage of escapeshellcmd lead to a command injection
📜#42 | Command injection | No of user input is performed, leading to a command injection
📜#43 | SSTI | Improper usage of templte engine leading to a SSTI which result in an RCE
__Also included__
---
docker-compose.yml file. To start a in an isolated docker en simply run the following command:or
~ H4v3 y0u f0und th3 E4st3r 3gg y3t? 🐇🪺
For questions, help or if you ha a problem with the code. Contact us on Twitter: 📬
开发语言:PHP
Star 数:1180
该项目属于漏洞知识库方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕Twitter vulnerable snippets展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。
从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。
1. 下载源码压缩包,解压到本地环境。
2. 根据项目类型准备对应的运行环境与依赖。
3. 按照 README 中的步骤完成配置与部署。
4. 在隔离的测试环境中运行验证,避免影响生产系统。
本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。
| 资源标题 | vulnerable-code-snippets - Twitter vulnerable snippets |
| 所属分类 | 漏洞知识库 |
| 发布作者 | admin |
| 发布时间 | 2026-10-06 01:02:24 |
| 下载权限 | 免费下载 |
| 附件数量 | 2 个下载链接 |
| 浏览次数 | 454 |
| 讨论数量 | 0 |
| 主题状态 | 正常讨论中 |