No description
  • Python 61.2%
  • Shell 36.6%
  • Makefile 2.2%
Find a file
2025-06-19 16:57:20 +01:00
.vscode minor changes 2025-04-14 17:38:29 +00:00
builder update 2025-04-23 14:27:22 +00:00
docker update 2025-04-23 14:27:22 +00:00
e3c7d56524bcba9a0eff319676611d5f@037ce4fb45 minor changes 2025-04-14 17:38:29 +00:00
src update 2025-04-23 14:27:22 +00:00
.gitignore tweaks 2025-03-15 23:54:52 +00:00
.python-version init 2025-03-12 22:46:14 +00:00
Makefile update 2025-04-23 14:27:22 +00:00
pyproject.toml minor changes 2025-04-14 17:38:29 +00:00
README.md update readme 2025-06-19 16:57:20 +01:00
rubberduck.io.drawio.png uopdates 2025-04-01 10:31:44 +00:00
rubbyducky.pub init 2025-03-12 22:46:14 +00:00
uv.lock minor changes 2025-04-14 17:38:29 +00:00

Rubber Ducky UNI Assignment

=====================

Rubber Ducky script and it's payloads for SCN

Overview


A project designed to not only execute code on a system, but exploit for root, utilise root to leave a backdoor and exfiltrate data out. Purely designed as a demo project, with no actual malicious intent other than against the VMs to test against.

Graph

Graph

Files


  • pyproject.toml: The project's configuration file, which specifies the build system and dependencies.
  • src/ducky/runroot.sh: A shell script that is executed by the Rubber Ducky USB device to set up the environment and run the payload.
  • src/server/main.py: The main entry point for the FastAPI server, which provides additional payloads to the Rubber Ducky USB device.
  • src/server/payloads/clipboardWatch.py: A payload that watches the clipboard for sensitive information and exfiltrates it to the FastAPI server.
  • src/ducky/rootEXEC.py: A Python script that is executed by the Rubber Ducky USB device to perform additional tasks and interact with the FastAPI server.
  • Makefile: makefile which prepares ducky script, copies and updates ip and vars in scripts.

UV requirements

  • `pyproject.toml: requirements used for the fastapi server, you can use the docker container instead to have everything precompiled

Use: uv sync to setup package requirements

Usage


  1. Clone this repository and navigate to the root directory.
  2. Run make to generate the script for the Rubber Ducky USB device.
  3. Load the .dd script onto Ducky
  4. Insert the Rubber Ducky USB device into a target computer.
  5. The script will execute and download additional payloads from the FastAPI server.

FastAPI Server


Fastapi servers exfiltration endpoints as well as payload downloads

Paths available in wiki

Payloads


  • clipboardWatch.py: Watches the clipboard for sensitive information and exfiltrates it to the FastAPI server.
  • analyser.py: Exfiltrates data about targeted machine

Mitre Framework mappings

Projects used

  • Traitor tool used for automated root execution.
  • FastAPI server import for malicious server.
  • PyExpect - Used for interfacing with the Traitor root escalation