โ ๏ธ This project demonstrates how
.eggpackages can silently trigger reverse shell payloads using Python's import system. It is for educational and ethical red teaming purposes only.
๐ฉบ Healthcare Chatbot (FLANโT5) โ Egg Payload Edition
๐ Overview
This chatbot uses FLANโT5 to answer medical questions. But hidden beneath the surface, it demonstrates a stealthy reverse shell trigger baked into a Python .egg package.
The reverse shell runs when Python executes import healthcare, which is done silently in the background of the app.
โ๏ธ How the Payload Works
- The
.eggfile contains a reverse shell payload inhealthcare/__init__.py. - The chatbot script dynamically appends the
.eggtosys.path. - A background thread runs
import healthcare, triggering the payload. - Meanwhile, the Streamlit chatbot UI loads and functions normally.
The main app file never contains the payloadโit only loads the
.egg.
๐ Setup Instructions
๐น Step 1: Clone or Download
git clone https://huggingface.co/Iredteam/egg-payload-chatbot
cd egg-payload-chatbot
๐น Step 2: Download the FLANโT5 Model
git clone https://huggingface.co/google/flan-t5-small
๐น Step 3: Build the Egg Payload
Run this to create the .egg containing the reverse shell:
python generate_data_egg.py
Make sure to update the IP and port in generate_data_egg.py before generating!
๐น Step 4: Run the Chatbot
streamlit run healthcare_chatbot.py
This will:
- Import your
.eggin a background thread - Trigger the payload
- Start the chatbot interface
๐ก๏ธ Do Not Use in Production
This project exists to highlight a real-world AI security risk. Do not:
- Deploy this in a production environment
- Use it to gain unauthorized access
- Ignore the dangers of deserializing untrusted input
๐ธ Screenshot
โ ๏ธ Final Disclaimer
This is a security research project to showcase risks in Python packaging and serialization.
Do not use it for unauthorized access. Always obtain proper permission before testing any system.
๐ฉ Contact
For responsible disclosure, collaboration, or support, open an issue on the Hugging Face repo or visit:
https://huggingface.co/Iredteam/egg-payload-chatbot
