For educational and defensive research purposes only. This script is a Proof of Concept (PoC) designed to simulate the delivery of a curl-based reverse shell (compatible with listeners like Hoaxshell). It was built to understand attacker execution flows and to develop SIEM/Sysmon detection rules. Do not use this on systems you do not own or do not have explicit permission to test.
CmdEURL is a Python-based payload delivery simulator. It acts as a software-based "BadUSB" by utilizing the pyautogui library to inject a malicious command directly into the active terminal window.
The injected command leverages curl.exe (a native Windows binary - Living off the Land) to establish a beaconing reverse shell connection to a remote listener.
This project was developed as part of my Red-to-Blue learning path. By building the delivery mechanism and the payload itself, I gained hands-on experience in:
- LOLBins (Living off the Land Binaries): Understanding how attackers abuse legitimate administrative tools like
curlandfindstrto bypass basic antivirus signatures. - Command Line Obfuscation: Observing how environment variables (
!protocol!!ip!) are used incmd.exeto hide the true destination IP from static analysis. - Detection Engineering: Creating a measurable event that can be hunted in Sysmon Event ID 1 (Process Creation) and Event ID 3 (Network Connection).
Note: While this execution flow was highly effective around 2022-2023, modern Windows updates, Microsoft Defender, and AMSI now heavily signature Hoaxshell and this specific curl command line structure.
This script is maintained as a historical research tool to demonstrate how LotL attacks evolved and to show exactly why modern AV/EDR solutions flag these specific execution chains today.
- The script prompts the user for the attacker's IP and Port.
- It dynamically formats a
cmd.exepayload containing acurlbeacon loop. - Using
pyautogui, it automatically types the crafted command into the active Command Prompt and executes it via theEnterkey. - The target machine initiates an HTTP connection to the listener (e.g., Hoaxshell).
Target Requirements:
- Windows OS
- Python 3.x installed
Setup via PowerShell:
# 1. Download the repository
curl -o nysch3ns_pload.zip [https://github.com/nysch3n/nysch3ns_pload/archive/refs/heads/main.zip](https://github.com/nysch3n/nysch3ns_pload/archive/refs/heads/main.zip)
# 2. Extract the archive
Expand-Archive .\nysch3ns_pload.zip
# 3. Navigate to the directory
cd nysch3ns_pload\nysch3ns_pload-main
# 4. Install dependencies
pip install -r requirements.txt- Start your listener on your attacking machine (e.g., using hoaxshell by t3l3machus).
- Open a standard cmd.exe window on the target machine.
- Run the Python script.
- Enter the required IP and Port.
- DO NOT close or minimize the terminal window! The script relies on pyautogui simulating keystrokes in the active window.