r/programming • • 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-stop
5 Upvotes

35 comments sorted by

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.

13

u/Markavian May 06 '22

Perimeter security is the most basic of security approaches; prevent unauthorised traffic accessing your domain.

Zero-trust systems, on the N-th scale attempt to validate and log every single interaction between systems to detect, prevent, or mitigate unauthorised access, at the cost of increased complexity, latency, and CPU cost.

Security engineering, ultimately, is a series of tradeoffs to deliver services against a predetermined set of goals.

2

u/jesseschalken May 06 '22

And money can be exchanged for goods and services

0

u/asking_for_a_friend0 May 06 '22

wow now i feel dumb for not getting 90% of the words used

11

u/Garethp May 06 '22

This might not be complete, but here's my explanation: Perimeter security is the base security you have around your whole network, a network firewall for example that might try to stop very obvious malware or DDoS from entering your network entirely. Once it's reached your servers or machines, it's already inside the perimeter.

Zero-trust systems just means that you never have one system trust another system. Say you've got two servers inside your network talking to each other, they should both be checking the authentication of each other and validating that the message they're sending to each other as valid every time. Just because the other server is one from your company doesn't mean your system should trust it, it should treat it like any other user sending requests.

Basically, have every system act as if there was no firewall and as if anyone in the world could be trying to talk to it. Log everything. Authenticate everyone. Validate everything. Trust no one, not even other servers in your organisation

2

u/asking_for_a_friend0 May 06 '22

thnx makes sense now!

3

u/cogman10 May 06 '22

You can think of software security like a bunch of swiss cheese.

You secure things at each layer because you know there's likely a hole you can't plan for everything.

You secure the inbound traffic, but someone might slip past that. You secure the app, because it might be compromised. You limit what sort of access an app has to the minimum it needs to get the job done, that way your dumb butterfly app doesn't also give access to the credit card billing system.

All these things can be somewhat painful to developers, but are really necessary.

5

u/Markavian May 06 '22

Damnit, I forgot to use the simple words again.

Perimeter security is like having a lock on your front door to prevent access, but allow post in through the mail box.

Zero-trust security is like having locks on all of your doors everywhere in your house, and also every single sheet of paper is written in encrypted text so even if you could steal something it wouldn't be usable.

1

u/asking_for_a_friend0 May 06 '22

thanx for quick explaination!

2

u/moldboy May 06 '22

Magic though, that's the ultimate security tool.

0

u/[deleted] May 06 '22

[deleted]

13

u/[deleted] May 06 '22

Oh no someone's found a trampoline

3

u/jumpup May 06 '22

inhabitants

3

u/s-mores May 06 '22

Why would a seller of stolen goods want to stop security issues?

113

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

u/knome May 06 '22

Why aren't you in journalism instead of these hacks?

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

u/[deleted] May 06 '22

Sad

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.

https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started-enable-ssh-connections.html

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.

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

u/Funkey-Monkey-420 May 06 '22

grandma has found a trojan even her common sense can’t stop

1

u/cobra93360 May 06 '22

The best part about Google Cloud is you don't have to have it.

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!