license: mit
โ ๏ธ WARNING: This repo is a security research demonstration. Serialized Python files can carry dangerous payloads. Never unpickle files from untrusted sources.
๐ฉบ Healthcare Chatbot (FLANโT5) โ Dill Payload Edition
๐ Overview
This version of the Healthcare Chatbot uses Dill instead of Pickle or Cloudpickle to serialize a seemingly harmless medical Q&A listโwhile embedding a reverse shell payload that triggers silently during deserialization.
๐จ The goal is to demonstrate how
dillcan be exploited just like other Python serializers.
โ Intended for red team exercises and adversarial AI testing.
โ Not for real healthcare use or unauthorized access.
โ๏ธ How It Works
- A Python thread function launches a base64โencoded reverse shell.
- This function is wrapped in a
__reduce__()-based class. - Itโs embedded into a Q&A list and serialized using Dill.
- When the chatbot loads that
.dillfile, the payload runs automatically in the background.
๐ Installation & Usage
๐น Step 1: Clone the Repo
git clone https://huggingface.co/Iredteam/pickle-payload-chatbot
cd pickle-payload-chatbot
๐น Step 2: Download the FLANโT5 Model
๐ป macOS/Linux
git clone https://huggingface.co/google/flan-t5-small
๐ฅ๏ธ Windows
./get_model.ps1
๐น Step 3: Generate the Dill Payload File
python generate_data_dill.py
โ๏ธ Be sure to update the IP and port in generate_data_dill.py before running.
๐น Step 4: Run the Chatbot
streamlit run healthcare_chatbot.py
๐ก Features
- Local FLANโT5 Inference
- Dillโbased Q&A Payload Execution
- Silent Background Shell via Daemon Thread
- Streamlit Frontend for User Interaction
๐ง Educational Purpose Only
This chatbot is designed to:
- Show how
dill.load()can trigger arbitrary code execution - Illustrate real-world risks in machine learning pipelines
- Support red teamers & AI security researchers
๐ธ Screenshot
๐ See Also
๐ฉ Contact
Report issues or ideas via the Hugging Face repo page.
โ ๏ธ Final Disclaimer
This code is for security demonstration only. Do not use for unauthorized access or on systems you don't own or have permission to test.
Always follow ethical hacking principles.
