performing-reflected-file-download

Identifies and exploits Reflected File Download vulnerabilities in JSON and JSONP endpoints.

954|172|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/xalgord/xalgorix --skill performing-reflected-file-download
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performing-reflected-file-download
Source: https://github.com/xalgord/xalgorix/tree/main/internal/tools/skills/data/web-application-security/performing-reflected-file-download
Command: npx skills add https://github.com/xalgord/xalgorix --skill performing-reflected-file-download

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reflected File Download (RFD) vulnerabilities are frequently missed during web application penetration tests because each individual condition (reflection, filename control, permissive content handling) appears harmless in isolation. This Skill provides a systematic methodology to confirm all three conditions, weaponize the finding, and prove client-side command execution rather than reporting a theoretical risk.

Core Features & Use Cases

  • Reflection Discovery: Locate endpoints that echo attacker input into response bodies, with emphasis on JSON APIs and JSONP callbacks as the cleanest sinks.
  • Filename and Extension Control Testing: Probe trailing path segments, semicolon/matrix parameters, encoded slashes, and download parameters to determine whether the browser saves responses with attacker-controlled executable names like setup.bat.
  • Payload Crafting and Validation: Build leading-command batch payloads (e.g., ||calc||) and confirm execution in a real browser on a Windows victim VM, including OOB callback verification.
  • Use Case: During an authorized bug bounty engagement, you find a JSONP endpoint /api/data?callback= that reflects input at the body start. You confirm /api/data/setup.bat returns the same body, craft ?callback=||calc||, and demonstrate that a victim downloading and running the file executes arbitrary commands from a trusted domain.

Quick Start

Ask the AI to test the target application's JSONP callback endpoint for Reflected File Download by checking reflection, filename control via path suffixes, and Content-Disposition headers.

Frequently Asked Questions about performing-reflected-file-download

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test for Reflected File Download vulnerabilities?

Test for RFD by confirming three conditions: the endpoint reflects your input into the response body, the URL path or a parameter controls the downloaded filename and extension, and Content-Disposition does not force a safe filename. JSONP callbacks are the cleanest sink since the callback value reflects at the very start of the body.

What is a Reflected File Download attack?

Reflected File Download is a client-side attack where an endpoint echoes attacker input into a response that the browser saves with an attacker-controlled executable filename like setup.bat. When the victim runs the downloaded file, the reflected leading command executes on their machine, delivered from a trusted domain.

Does X-Content-Type-Options nosniff prevent RFD?

No, nosniff alone does not fully prevent RFD. The attack still works when the filename and extension are attacker-controlled and the user runs the downloaded file. The effective fix is forcing Content-Disposition: attachment with a fixed safe filename and rejecting executable path suffixes.

Why is JSONP the best sink for RFD exploitation?

JSONP reflects the callback parameter value at the very beginning of the response body, so a payload like ?callback=||calc|| produces a file starting with a valid batch command. When saved as a .bat file, cmd.exe executes the leading command while ignoring the JSON remainder.

What tools are needed to validate an RFD finding?

Use Burp Suite or curl to confirm reflection and inspect Content-Type and Content-Disposition headers, then validate in real browsers (Chrome, Edge, legacy IE) since download-naming heuristics differ. A Windows victim VM is required to safely detonate .bat payloads and confirm command execution.