Reader small image

You're reading from  Hands-On Red Team Tactics

Product typeBook
Published inSep 2018
Publisher
ISBN-139781788995238
Edition1st Edition
Tools
Right arrow
Authors (2):
Himanshu Sharma
Himanshu Sharma
author image
Himanshu Sharma

Himanshu Sharma, 23, has already achieved fame for finding security loopholes and vulnerabilities in Apple, Google, Microsoft, Facebook, Adobe, Uber, AT&T, Avira, and many more with hall of fame listings as proofs. He has gained worldwide recognition through his hacking skills and contribution to the hacking community. He has helped celebrities such as Harbhajan Singh in recovering their hacked accounts, and also assisted an international singer in tracking down his hacked account and recovering it. He was a speaker at the international conference Botconf '13, held in Nantes, France. He also spoke at IEEE Conference in California and Malaysia as well as for TedX. Currently, he is the cofounder of BugsBounty, a crowd-sourced security platform for ethical hackers and companies interested in cyber services.
Read more about Himanshu Sharma

Harpreet Singh
Harpreet Singh
author image
Harpreet Singh

Harpreet is a professional with 8+ years of experience in the field of Ethical Hacking, Penetration Testing, Vulnerability Research & Red Teaming. He is the author of "Hands-On: Web Penetration Testing with Metasploit" and "Hands-On: Red Team Tactics" published by Packt Publishing. He's also an OSCP, OSWP, CRTP certified professional. Over the years of his experience, Harpreet has acquired the Offensive & Defensive skill set. He is a professional who specializes in Wireless & network exploitation including but not limited to Mobile exploitation, Web Application exploitation and he has also performed few Red Team Engagements in Banks & Financial Groups.
Read more about Harpreet Singh

View More author details
Right arrow

C2 - Master of Puppets

Almost everyone who is involved with cybersecurity will already have a clear idea about what a Command and Control server is. In case you don't know, a Command and Control server, also known as a C&C or a C2, is generally used in cyberattacks. It is a system that controls all the infected systems (the bots or zombies) that were infected by the attacker in a malware or phishing attack. A C2 is controlled by an attacker and is used to send commands to perform different tasks such as a DDoS attack, spamming, stealing data from bots, or spreading malware. The question remains, therefore, if C2s are used by cyber criminals to execute a cyberattack, does that makes Red Team operations illegal?

Many people still have a misunderstanding about the motivation behind red team operations. The idea of red team is not to hack into an organization and steal the...

Technical requirements

  • Linux
  • Empire

Introduction to C2

In a Red Team engagement, the C2s that are installed and configured are the team servers that are used to manage the reverse connections. In the previous chapters, we have covered Koadic, Armitage, Cobalt Strike, and Empire. All of these tools have one thing in common: they are frameworks that can get a reverse connection and manage multiple connections at the same time. These C2s are crucial in a red team engagement. From the basic instances that we looked at in previous chapters, we now have to think bigger.

One of the biggest issues in red team operations is the detection of the payload by antivirus software or firewalls. Even if our payload is not detected, the outgoing connection (also known as egress traffic) from the target server may well be detected by the monitoring team. How can we perform a red team operation without our Redirector or C2 being blacklisted...

Cloud-based file sharing using C2

In a situation the one described previously, organizations monitor the outgoing connection very closely so it is difficult to get access without getting detected. Fortunately, many organizations use cloud-based file sharing services from project execution to delivery. Their trust on these cloud-based file sharing services is often immovable. As a red teamer, we are going to exploit this trust so that we can get access in a far stealthier manner.

We are going to make the cloud-based file sharing service a middle-man to set up the communication playground between the target server and the Empire C2:

Assuming that the Empire C2 is properly installed and configured, we will be using Dropbox and Microsoft's OneDrive for the cloud-based file sharing C2.

...

C2 covert channels

A covert channel is used to communicate secretly. Whereas encryption only protects the communication from being decoded by unauthorized parties, covert channels aim to hide the very existence of the communication. Initially, covert channels were identified as a security threat on monolithic systems such as mainframes. More recently, focus has shifted towards covert channels in computer network protocols. The huge amount of data and the vast number of different protocols in the internet make it an ideal high-bandwidth vehicle for covert communication. Some of the most common protocols that are used to create a covert channel are as follows.

(The following are referenced from: https://holdmybeersecurity.com/2017/10/15/part-3-how-to-red-team-setting-up-environment/)

...

Summary

In this chapter, we have provided an introduction to command and control (C2) servers and discussed how they are used in a red team operation. We have then covered how we can use cloud-based file-sharing services as C2s to make the communication between the target and our C2 stealthier. We have also learned about C2 covert channels and their importance with some commonly used protocols used in covert channels. In the next chapter, we will cover the topic of hiding C2s behind a Redirector so that even if the blue team detects the connection, only our redirector will be burned and not our C2.

Questions

  1. What all other C2 servers can we use if not cloud based?
  2. Can we use our personal account for Dropbox?
  3. Is it necessary to use a C2 server in the first place? Why not just make our own system as C2?
  4. Are there any automation scripts or tools which can be used to configure the red team infrastructure automatically?
  5. Is there a way to manage multiple C2s from a dashboard?
lock icon
The rest of the chapter is locked
You have been reading a chapter from
Hands-On Red Team Tactics
Published in: Sep 2018Publisher: ISBN-13: 9781788995238
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Himanshu Sharma

Himanshu Sharma, 23, has already achieved fame for finding security loopholes and vulnerabilities in Apple, Google, Microsoft, Facebook, Adobe, Uber, AT&T, Avira, and many more with hall of fame listings as proofs. He has gained worldwide recognition through his hacking skills and contribution to the hacking community. He has helped celebrities such as Harbhajan Singh in recovering their hacked accounts, and also assisted an international singer in tracking down his hacked account and recovering it. He was a speaker at the international conference Botconf '13, held in Nantes, France. He also spoke at IEEE Conference in California and Malaysia as well as for TedX. Currently, he is the cofounder of BugsBounty, a crowd-sourced security platform for ethical hackers and companies interested in cyber services.
Read more about Himanshu Sharma

author image
Harpreet Singh

Harpreet is a professional with 8+ years of experience in the field of Ethical Hacking, Penetration Testing, Vulnerability Research & Red Teaming. He is the author of "Hands-On: Web Penetration Testing with Metasploit" and "Hands-On: Red Team Tactics" published by Packt Publishing. He's also an OSCP, OSWP, CRTP certified professional. Over the years of his experience, Harpreet has acquired the Offensive & Defensive skill set. He is a professional who specializes in Wireless & network exploitation including but not limited to Mobile exploitation, Web Application exploitation and he has also performed few Red Team Engagements in Banks & Financial Groups.
Read more about Harpreet Singh