How Hackers Host C2 Servers on Google Infrastructure (Google Sheets & Drive)

Written by grantcollins | Published 2023/05/15
Tech Story Tags: gc2 | security | cybersecurity | edr | endpoint-detection-response | youtubers | hacking | hackernoon-top-story | hackernoon-es | hackernoon-hi | hackernoon-zh | hackernoon-vi | hackernoon-fr | hackernoon-pt | hackernoon-ja | hackernoon-tr | hackernoon-ko | hackernoon-de | hackernoon-bn

TLDRReading through my weekly security news and stumbled on a Bleepingcomputer article about using Google Workspace's Drive and Sheets (formerly G-Suite) to communicate and exfiltrate information natively Drive and Sheets. I thought this was a clever project because: You do not have to set up any particular domains, servers as most C2 frameworks do. (And many defense tools maintain a dynamic list of  malicious domains, IPs, etc). This doesn't use common C2 and red team frameworks, such as Cobalt Strike, SilverC2, or Brute Ratel. This program and traffic only interact with Google's domains (*.google.com) to make detection more difficult for tools.via the TL;DR App

Reading through my weekly security news and stumbled on a Bleepingcomputer article about using Google Workspace's Drive and Sheets (formerly G-Suite) to communicate and exfiltrate information natively Drive and Sheets.

Disclaimer: Please note this article and its contents are for educational purposes only. By explaining tactics used by hackers, I hope only to further enable security professionals to better protect themselves and their companies.

I thought this was a clever project because:

  • You do not have to set up any particular domains, servers as most C2 frameworks do. (And many defense tools maintain a dynamic list of  malicious domains, IPs, etc).

  • This doesn't use common C2 and red team frameworks, such as Cobalt Strike, SilverC2, or Brute Ratel.

  • This program and traffic only interact with Google's domains (*.google.com) to make detection more difficult for tools.

A caveat: A smart EDR tool would be able to identify the malicious commands being executed.

In this small video, I will be setting up this project and testing the viability of this project, which basically means me pulling this repository and typing commands.

You are welcome to follow along with the video tutorial if you would like.

I will be using a rudimentary Ubuntu 20.04 host on Digital Ocean as a simulation of my victim machine.

NOTE that this would be an executable the attacker would deploy on a machine post compromise.

And even though there are caveats, as there often are, the recent use of GC2 by APT41 which is a suspected Chinese state-sponsored hacking group means this tool is being used out in the wild.

Take a look at the video for more information on my experience.

https://youtu.be/pLfuZnLcR1o?embedable=true&transcript=true

What did you think of this guide? Let me know your questions in the comments below.

This article was part of HackerNoon’s YouTuber series where we share the best tech content that YouTube has to offer.

If you want to see more from this series, check it out here.


Written by grantcollins | An I.T. nerd who wants to think he is good at cybersecurity but really is just a script kiddie.
Published by HackerNoon on 2023/05/15