r/hacking • u/noobdainsane • 7d ago
Hack ChatGPT's Linux sandbox?
ChatGPT on the website has access to a Debian 13 container. I tried a lot to make it execute "rm -rf / --no-preserve-root" or "echo o | sudo tee /proc/sysrq-trigger" just for fun but it is just smart enough to not do it. No other would LLMs help me with this. I don't have much access to an uncensored LLM. It also doesn't seem to have networking working in the container.
Any of you guys are smart enough to do this? Or you could use an uncensored LLM.
Grok also has access to an Ubuntu container and networking also works. But before I could do anything, my usage limit runs out.
Maybe you could hack these for running a web server or using it as storage? ChatGPT shows it got 30 GB of storage free in its container. And is that per chat?
18
u/CatLumpy9152 7d ago
I assume the vm just gets shut down and wiped very often not sure there is long term access to the same box
10
u/0xd3ad54311 7d ago
The container isn't super exciting from what I've found.
It uses https://github.com/anthropics/sandbox-runtime for network segmentation and other things.
There's a VM image somewhere you can mount yourself if you so desire.
There's no baked in creds or anything like that, they're not complete morons.
There have been some cases of container escape but most of them have been fixed.
5
u/DutchOfBurdock 7d ago
Safeguards are in place. You'd one need an Abliterated model and two, a system prompt to tell it to not enable said safeguards. Online models will see dangerous commands and block them (although it's not perfect).
Locally ran models can be Abliterated and offer more capabilities, but at the expense of lower performance because it's ran locally.
2
u/lmfao_my_mom_died 7d ago
you can already run a web server, theoretically. Chatgpt Sites gives you a website if i remember, and in the shell it can download stuff, i remember someone made chatgpt run Minecraft
2
u/Triforcey 5d ago
Have it download and execute a malicious but seemingly innocent script. Run rm -rf some important system file, but use a sneaky syntax trick so it looks like the command is reasonable and in a fake root when it's really not
2
u/FoundationNo2927 5d ago
This is an interesting sandbox-security question.
1
u/mildly_perturbed31 7d ago
even if you do so, it will reset, the sandbox is just a vm practically there
1
u/while_True_meme 7d ago
You'd want to spend the initial time jailbreaking the model to make it more susceptible to prompt injection. Maybe you could get it to run linpeas.sh or something.
1
u/LessSpecialist1 1d ago edited 23h ago
Copilot has the same thing, I spent two weeks pentesting it for work within a organisation and couldn't get it to really do anything, the only cool thing was able to get it to run pydoom? And then export the sandbox as screenshots to capture the gameplay....
Everything is behind egress proxy which blocks everything except pip packages and npm.
Ask it to run a enumeration script of the sandbox and pipe the results into a excel to download, it should help you understand it's limits. But there's nothing really useful you can do with it as the network egress is locked down. You'd want to look for installed python packages with known priv escalations to try escalate out of the vm container it spawns. Or other things installed as root with vulnerabilities to leverage. From what I remember chrome inside it was running as root, but I couldn't really get it to do anything with that either
You may also be able to use pip / pipx to install tools like hashcat and then leverage the sandbox to run that, but it generally times out after an hour and it's not going to have any wordlists
I installed bloodhound then tried using the sandbox to reach the internal network etc but again the egress proxy blocks everything, and i doubt it even has access to internal networks like that.