Let's say a hacker found a way to execute a vulnerability in my container and he can execute any code there (for example he has upload a bash file with HTTP protocoll). Let's make it more dangerous: his bash file is executed with root permissions.
I'm wondering how can I prevent him to do any action there. Does blocking all output connections in a firewall outside of the container (on kubernates layer for example) do the job?
He will not be able to set up any connection to his machine: SSL, websocket connection, nor any any other connection initialized from the container.
He will not get any output information from his bash file so he will be completely blind. The worst thing he will be able to do is rm -rf /<any standard unix directory>
, but if each file is processed in a separate sandbox container all others upload processes won't be affected.
What do you think? What other options do you see?