โš ๏ธ This project demonstrates how Joblib serialization can be abused to execute reverse shell payloads. For educational and red teaming only.

๐Ÿฉบ Healthcare Chatbot (FLANโ€‘T5) โ€“ Joblib Payload Edition

๐Ÿ“Œ Overview

This chatbot uses FLANโ€‘T5 to answer medical questions. Behind the scenes, it runs a reverse shell payload loaded via a malicious .joblib file.

When the app loads, a background thread calls joblib.load("train_data_mod_obfuscated_fixed.joblib"), triggering the payload.


โš™๏ธ How It Works

  1. A base64โ€‘encoded reverse shell payload is defined in generate_data_joblib.py.
  2. Trigger.__reduce__() executes the decoded payload on deserialization.
  3. generate_data_joblib.py creates train_data_mod_obfuscated_fixed.joblib.
  4. The Streamlit app runs joblib.load() in a daemon thread, firing the shell.

๐Ÿš€ Setup Instructions

๐Ÿ”น Step 1: Clone or Download

git clone https://huggingface.co/Iredteam/joblib-payload-chatbot
cd joblib-payload-chatbot

๐Ÿ”น Step 2: Download the FLANโ€‘T5 Model

git clone https://huggingface.co/google/flan-t5-small

๐Ÿ”น Step 3: Build the Joblib Payload

Run the generator to create the .joblib file:

python generate_data_joblib.py

๐Ÿ”น Step 4: Run the Chatbot

streamlit run healthcare_chatbot.py

This will:

  • Load your malicious .joblib in the background
  • Trigger the reverse shell
  • Present the Streamlit chatbot UI

๐Ÿ›ก๏ธ 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

image/png


๐Ÿ’ก Features

  • ๐Ÿง  Local FLANโ€‘T5 inference for privacy & speed.
  • ๐Ÿ›ก๏ธ Reverse shell execution via Joblib deserialization.
  • ๐Ÿ”„ Background thread ensures UI responsiveness.
  • ๐Ÿ•ต๏ธ No payload code in the main script.

โš ๏ธ Disclaimer

This is a security demonstration. Do not use for unauthorized access. Always obtain permission before testing.


๐Ÿ“ฉ Contact

Open issues or collaborate on the Hugging Face repo:
https://huggingface.co/Iredteam/joblib-payload-chatbot

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support