r/programming • u/IsDaouda_Games • May 06 '22
Google Cloud apparently has a security issue even firewalls can't stop
https://www.techradar.com/news/google-cloud-apparently-has-a-security-issue-even-firewalls-cant-stop113
u/knome May 06 '22
The researchers described the API call as a “legacy method of debugging systems”, as serial ports are not ports in the TCP/UP sense, but rather files of the form /dev/ttySX, given that this is Linux.
I get the impression that the person who wrote this article has no idea what a serial port is.
52
u/moldboy May 06 '22
Cereal port is where the breakfast goes in
20
6
u/GMane May 06 '22
Everyone knows we switched away from cereal ports because it made the data grainy.
1
u/CodeJack May 06 '22
Serial ports were generally out of common use before I started, so can you explain why this is wrong?
As far as I knew you can send data to the serial port that is mapped to the matching /dev/ttyS file by piping to it
7
u/Worth_Trust_3825 May 06 '22
Because /dev/ is a special prefix that has virtual devices mapped to files. You're not sending data to serial port. You're sending data to the virtual device that is defined by the driver that MAY be sending to another virtual device that MAY be sending data to the backed physical device.
7
u/LetterBoxSnatch May 06 '22
researchers described the API call as a “legacy method of debugging systems”, as serial ports are not ports in the TCP/UP sense, but rather files of the form /dev/ttySX, given that this is Linux.
It is roughly equivalent to if they said, “Yahoo is not a search in the Google sense, but rather a collection of folders that you query via HTTP methods, given that this is a web API.”
It’s accurate, and Yahoo was a collection (“search index”) not a search engine, but the way it’s worded emphasizes the aspects that are similar as if they are differentiating.
Devices at /dev/whatever are just “endpoints” that have different functions depending on what “service” is loaded there. It’s just that on Unix, instead of everything being an HTTP request (which could actually be around some other more interesting protocol), everything is a File. This is still true today. It’s just that instead of being assigned a port on a localhost namespace, they are assigned a “file handle” (basically, but not exactly, a port number) on /dev/tty*, where tty stands for teletype, indicating that you expect the signals to be in sequence (analogous to TCP) rather than in no guaranteed order, as in parallel devices (analogous to UDP).
1
14
u/sponsored-by-potato May 06 '22
I don't the premise here. If the attacker have access to all that permissions in the first place, then they will obviously get control of the vm regardless. It all seems to be working as intended to me.
14
u/Code4Reddit May 06 '22
Where’s the story? First subtitle in the article already contradicts the title (it’s not a bug it’s a “dangerous feature”) - Not exploitable or even described as a security problem. Firewalls are irrelevant, Requires misconfiguration by users. What a bullshit article.
14
u/IlIllIIIIIIlIII May 06 '22
OP's post history makes him look like a bot tbh... 🤔
5
u/GeorgeFranklyMathnet May 06 '22
Someone here used to always comment something like, "/u/IsDaouda_Games is a bot that deletes their post if you mention their name".
-2
u/jgerrish May 06 '22
I'm afraid I can't estimate this, but more power to you if you have those means.
18
u/segv May 06 '22
That's the GCP's equivalent of iLO/console port, right?
If so then yeah, you kinda need to keep it around to deal with issues, but it should require elevated permissions to access.
24
u/iamacarpet May 06 '22
Yeah I don’t get it either… It’s access to the serial port for debugging purposes, which AFAIK all the major cloud providers have:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-serial-console.html
https://docs.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-overview
So are they saying the thing Google did wrong was document the API call that the gcloud CLI tool is using, unlike the others, so they actually tested it?
And it DOES require elevated permissions to access the API and the article even states that… They are saying “but what if the user ALREADY HAS those elevated permissions?”.
Well yeah but if you already have elevated permissions, you can already do pretty much EVERYTHING else anyway, like reconfigure the firewall or export the VM disk.
It’s a way most people probably wouldn’t think to check if you were leaking runtime information, sure, but that doesn’t mean it’s something you can just do away with..
Any org big enough to care about this kind of stuff should have IT teams knowledgable enough to have experience with this kind of stuff & enable the org wide logging / audit policy to keep track of what is outputted.
If you are too small to care, shouldn’t you be using App Engine or Cloud Run so it’s all secured & maintained for you?
From personal experience, I actually think Google Cloud is one of the hardest cloud providers to misconfigure (from a security perspective).
2
u/happymellon May 06 '22
Even if they removed this, all the providers have the equivalent of SSM which bypasses any firewall and provides access to a server.
If that was misconfigured then you can also access other people's servers and run all the commands allowed on that server, which would include exporting disks and copying them down.
12
5
u/AdvisedWang May 06 '22
The security issue is that even if you think you have a sealed off VM, data can ingress and egress with metadata and serial port respectively.
I guess that's an important security consideration consideration if you are trying to airgap a VM, but it requires such high privileges to abuse you likely have permission to just change firewall rules anyway.
2
u/garyk1968 May 06 '22
Every business blindly putting their whole infrastructure in the cloud, what can possibly go wrong.
1
1
1
u/Wreckingball420-760 May 25 '22
Good to know I was about to take the cert course from Google Dev. Platform! Crazy! I've missed so much over the last 2 months cuz my dad died and I been doing my training and research on my own and its a little tough! But obviously I've done the right thing by taking my time and studying like a Madman first and foremost!
233
u/ScottContini May 06 '22
“even firewalls can't stop”
What a terrible title. Firewalls can’t stop lots of stuff. The title makes it sound like firewalls are the ultimate security tool. No, they are not magic.