Friday, February 3, 2023
  • Events
  • Interviews
  • Jobs
  • Opinion
  • Whitepapers
  • Glossary
  • Community Forum
  • Web Hosting Directory
  • Login
  • Register
Cloud7 News
  • Cloud Computing
  • Web Hosting
  • Data Center
  • Linux
  • Cybersecurity
  • More
    • Network/Internet
    • Windows
    • Software
    • Hardware
    • Blockchain
    • Policy/Legislation
    • How-Tos
    • Troubleshooting
No Result
View All Result
Cloud7 News
  • Cloud Computing
  • Web Hosting
  • Data Center
  • Linux
  • Cybersecurity
  • More
    • Network/Internet
    • Windows
    • Software
    • Hardware
    • Blockchain
    • Policy/Legislation
    • How-Tos
    • Troubleshooting
No Result
View All Result
Cloud7 News
No Result
View All Result

Home > Cloud Computing > A wrong configuration of Google Cloud allows complete VM takeover

A wrong configuration of Google Cloud allows complete VM takeover

Google Cloud Platform has a dangerous function that allows attackers to gain full control of target virtual machines.


Rusen Gobel Rusen Gobel
May 6, 2022
3 min read
A wrong configuration of Google Cloud allows complete VM takeover

The cloud incident response company Mitiga has published a whitepaper regarding a security flaw by design; allowing attackers to read and write data, effectively gaining full control over the targeted virtual machine instances. The company describes the security issue as “dangerous functionality”.

Not a usual TCP/IP port

According to Mitiga, the getSerialPortOutput API, which lets users retrieve output from serial ports for debugging systems, is not configured as TCP/IP ports in Linux systems; they are stored as files in /dev/ttySX (X means between 0 and 3). Google Cloud Platform exposes many APIs and getSerialPortOutput is one of them, for debugging systems.

The cloud incident response experts of Mitiga have seen the opportunity and tried creating a virtual machine in Google Cloud Platform that is completely firewalled for all inbound and outbound traffic, and continuously writing data to the serial ports. After that, the experts managed to read the data from the serial port. This particular traffic has been reflected as GOOGLE_INTERNAL in Google Cloud Platform’s network monitoring interface. But when the API calls are checked, the abuse of the getSerialPortOutput API can be seen.

While the getSerialPortOutput API alone creates a security risk, accompanying it with setMetadata API makes it even worse; allowing a potential attacker to write data to the system. Those two combined allow both reading and writing data on the VM instance which can effectively end up to a complete takeover by leveraging. And, a Google Cloud Platform credential is the only requirement for achieving it. Mitiga has envisioned two potential attack scenarios.

Attack scenario #1

  • An attacker gains access to GCP credentials with appropriate API permissions for both setMetadata and getSerialPortOutput on one or more VMs
  • Using traditional network-based methods of lateral movement, the attacker installs malware on the system that communicates using the GCP API
  • The attacker sends commands to the victim machine by inserting them into custom metadata using a predetermined key
  • The victim system continually reads the key looking for commands; when one is found, the command is executed, and the output is sent to a predetermined serial port
  • The adversary continually reads from the serial port and waits to receive the output of the command

Attack scenario #2

  • An attacker gains access to GCP credentials with appropriate API permissions for setMetadata, getSerialPortOutput, and reset (that is, compute.instances.reset permissions) on one or more VMs
  • The adversary inserts the API-abusing malware into the victim’s system user data
  • The adversary “resets” the system, forcing a reboot. Upon reboot, the system will run user data as the administrative user
  • The attacker sends commands to the victim machine by inserting them into custom metadata using a predetermined key
  • The victim system continually reads the key looking for commands; when one is found, the command is executed, and the output is sent to a predetermined serial port
  • The adversary continually reads from the serial port and waits to receive the output of the command

Mitiga also advises the Google Cloud Platform users to take the following actions for better security:

  • Don’t use built-in roles. Instead, assign specific permissions as needed to users in adherence with the principle of least privilege.
  • Evaluate whether dangerous functionalities such as setMetadata (and similar APIs such as setCommonInstanceMetadata) are necessary. If not, ensure that cloud credentials are configured to lack such permissions.
  • Ensure systems only allow remote access via approved remote administration methods, such as SSH or RDP.
  • Where possible, run applications or services using low-privileged users. Where possible, harden systems such that service accounts cannot write to serial ports.
  • If you do not use the compute.instances.getSerialPortOutput feature, consider adding an IAM deny policy for Compute users for that permission.

See more Cloud Computing News


Tags: Google CloudMitiga
Rusen Gobel

Rusen Gobel

Rusen Gobel is a news editor at Cloud7 News. With more than 10 years of experience, Rusen worked as a hardware and software news editor for technology sites such as Shiftdelete, Teknokolis, Hardware Plus, BT Haber. In addition, Rusen publishes consumer product reviews on his YouTube channel. While consumer electronics has been his main focus for years, now Rusen is more interested in WordPress and software development. He had contributed different web application projects in his professional career. Rusen had graduated from Istanbul University, department of Computer Engineering. Rusen has a very high passion for learning and writing for every kind of technology. That's why he has been working as a tech editor for more than ten years on several different technology magazines and online news portals.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

I agree to the Terms & Conditions and Privacy Policy.

Next Post
Heroku's internal customer database is breached

Heroku's internal customer database is breached

Related News

NTT to add Palo Alto Networks' solution to its portfolio

NTT to add Palo Alto Networks’ solution to its portfolio

February 3, 2023 3:00 pm
Gcore announces partnership with Super Protocol to add new capabilities

Gcore announces partnership with Super Protocol

February 3, 2023 2:30 pm
Gcore introduces per-minute billing for video streaming

Gcore introduces per-minute billing for video streaming

February 1, 2023 5:45 pm
F5 reports first quarter financial results

F5 reports first quarter financial results

February 1, 2023 2:00 pm
Get free daily newsletters from Cloud7 News Get the Cloud7 Newsletter
Select list(s):

Check your inbox or spam folder to confirm your subscription.

By subscribing, you agree to our
Copyright Policy and Privacy Policy

Get the free newsletter

Subscribe to receive the latest IT business updates straight to your inbox.

Select list(s):

Check your inbox or spam folder to confirm your subscription.

Editor's Choice

What’s new in Linux kernel 6.2 rc6?

10 Best Web Hosting Services of 2023

Ubuntu 22.04 LTS is available for download. What is new?

CERN and Fermilab recommend AlmaLinux

7 best hosting control panels of 2023

How to update Linux Kernel without rebooting?

7 best Linux mail servers of 2023

7 best cPanel alternatives for 2023

7 best Linux web browsers for 2023

7 best CentOS alternatives

7 best Linux server distros of 2023

Interview with Igor Seletskiy on AlmaLinux

How to create a VM on VMware Workstation

Recent News

  • LockBit encryptor source code is updated
  • LibreOffice 7.5 Community is released. What’s new?
  • NTT to add Palo Alto Networks’ solution to its portfolio
  • Gcore announces partnership with Super Protocol
  • Fortinet is expanding its SOC offerings portfolio

Cloud7 News
Cloud7 is a news source that publishes the latest news, reviews, comparisons, opinions, and exclusive interviews to help tech users of high-experience levels in the IT industry.

EXPLORE

  • Web Hosting
  • Cloud Computing
  • Data Center
  • Cybersecurity
  • Linux
  • Network/Internet
  • Software
  • Hardware
  • How-Tos
  • Troubleshooting

RESOURCES

  • Events
  • Interviews
  • Jobs
  • Opinion
  • Whitepapers
  • Glossary
  • Community Forum
  • Web Hosting Directory

Get the Cloud7 Newsletter

Get FREE daily newsletters from Cloud7 delivering the latest news and reviews.

  • About
  • Privacy & Policy
  • Copyright Policy
  • Contact

© 2023, Cloud7 News. All rights reserved.

No Result
View All Result
  • Cloud Computing
  • Web Hosting
  • Data Center
  • Linux
  • Cybersecurity
  • More
    • Network/Internet
    • Windows
    • Software
    • Hardware
    • Blockchain
    • Policy/Legislation
    • How-Tos
    • Troubleshooting
  • Events
  • Interviews
  • Jobs
  • Opinion
  • Whitepapers
  • Glossary
  • Community Forum
  • Web Hosting Directory

© 2023, Cloud7 News. All rights reserved.

Welcome Back!

Sign In with Facebook
Sign In with Google
Sign In with Linked In
OR

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Sign Up with Facebook
Sign Up with Google
Sign Up with Linked In
OR

Fill the forms below to register

*By registering into our website, you agree to the Terms & Conditions and Privacy Policy.
All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In
This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.