The Attack on BigCo
local graph
Chapter 1 — The Attack on BigCo
Section titled “Chapter 1 — The Attack on BigCo”This chapter is fictional and based on a horrendous cyber-attack on BigCo and how Megan, the Chief Information Security Officer (CISO), responds. Megan will decisively stop, respond, and put measures into place that will help prevent another attack. As the saying goes, it’s not if your company will be cyber-attacked; it’s when. By the end of this chapter, you will understand how the hackers gained access to BigCo’s network, how the ransomware was deployed, and the measures that were taken in order to make the network resilient.
In this chapter, we’re going to cover the following main topics:
- BigCo – the attack
- BigCo – cross-team co-ordination
- BigCo – recovery
- BigCo – the anatomy of a ransomware attack
BigCo – the attack
Section titled “BigCo – the attack”Megan, the Chief Information Security Officer (CISO) of a multi-national corporation, gets the call at 3:00 AM about major sections of her company BigCo’s network being down. The CISO is responsible for the cybersecurity of the company, ensuring compliance, risk management, and sufficient defenses are in place. It’s the highest-level position in cybersecurity. It can be at the Director level, Vice President, or directly under the CEO, depending on the importance of cybersecurity within an organization. Megan is a Director of Information Security at BigCo with the title of CISO, and she reports to the Chief Information Officer (CIO). Typically, the CIO will exist over the information technology and information security departments. In this case, Megan reports to the CIO, Mark.
Megan knows getting a call at 3:00 AM means this outage must be bad because she typically wouldn’t be called in the middle of the night for a typical network outage. First, she quietly gets up so as not to wake her partner. She goes to her home office and calls Mark, the CIO of BigCo. Megan says, “Mark, hi. What happened?” Mark replies, “Well, from what we can tell, it wasn’t a bogus email link like last time.” “The new security awareness program you introduced is working as well as the email phishing campaign and email filtering tool we deployed. Honestly, we aren’t exactly sure how the attackers got in yet. Headquarters and three of five major data centers are down. Our human resources data and much of our critical personally identifiable information (PII) data, which includes sensitive details such as names, addresses, and social security numbers of both employees and customers, for both employee and customer data have been encrypted.”
Megan replies with, “Ugh.” She takes a deep breath in for 1, 2, 3, and holds for 3, and then breathes out for 1, 2, 3, 4, and 5. She says, “Okay, it sounds like a ransomware attack. Well, we have good backups, right? What have we lost 6 hours or…” Mark interrupts, “Well some of the backup servers were encrypted also. We have them set up as online backups and the problem with this ransomware is that it encrypts all attached USB drives and mapped drives.” Megan replies, “Sh**. We must immediately isolate the subnets affected so that the ransomware is unable to propagate through the network. Also, unplug any affected devices, so they can’t propagate to unaffected devices. It can take hours for ransomware to propagate, so we may be able to halt some of the damage. Quick! Call the IT department director and let them know.” Mark replies, “Sure, I’m on it.” Megan replies, “Okay.”
Megan says, “Let’s call an emergency meeting with all of the department heads from InfoSec, IT, and SecOps first thing in the morning so we can get aligned. We need to know where we are and what steps to take next. Oh man, I wish we had gotten the endpoint detection response (EDR) deployment completed.” Mark replies, “Actually, we were alerted by some hosts where the new EDR had been deployed. Yeah, the subnets where it was deployed were not affected.” Megan replies, “Well, that’s some good news, I guess. It also shows due diligence; we were working on the deployment. Oh, and we just signed a cyber-insurance policy.” She lets out a deep breath. Mark replies, “Yes!” Megan continues, “We’ll probably be hearing from the attackers soon. Some more advanced ransomware attackers will steal your data prior to launching the attack to ensure a payout.” Mark replies, “What? Really, this is not what we need right now. Now we are looking at potential lawsuits and fines.” Megan replies, “Yep! Let’s get Legal involved and activate our incident response retainer. We’ll also need to co-ordinate with our insurance company to check on our cyber insurance coverage. Mark replies, ”I’m on it.”
BigCo – cross-team co-ordination
Section titled “BigCo – cross-team co-ordination”Mark begins, “Thanks to all the leaders from the networking, infosec, and security ops teams for being able to make it to this meeting. You’ve probably already heard that BigCo is the victim of a ransomware attack. Currently, headquarters and three of the five major data centers are down. Our human resources data and much of our critical PII data for both employees and customers have been encrypted. We do have mostly good backups and, of course, we have backups at our disaster recovery site in case any online backups have been encrypted. There were also some online backups that were encrypted. To avoid this from happening, backups need to be offline or done intermittently since online mapped drives will also be encrypted by ransomware. Whether it is a USB drive or a cloud drive, any online connected drives will be encrypted by ransomware.” Megan says, “I’m glad we invested in that disaster recovery as a service last year.” Mark continues, “The network teams have been shutting down routers so that infected workstations can’t self-propagate the ransomware to other subnets. The teams responsible for maintaining the hosts and servers have been working through the night trying to either turn off infected hosts and servers or begin restoring from backup.” The Network Manager, Dave Brown, asks, “With COVID-19, most of our employees are working from home, so how have they been affected?” Mark replies, “Luckily, because they are on separate subnets on their home networks, they have been largely unaffected. The way they have been affected is that a server they might be trying to access may be down. A few remote employees’ computers were infected when they tried to go to a shared resource using NetBios, which has been infected. The other good news is that since we are running Office 365 in the Azure cloud, email and other documents stored in Azure are unaffected. Kudos to Megan for getting the endpoint protection software deployed. We were mid deployment, but the good news is where had deployed it; these hosts and servers were protected. We discovered the ransomware infection from an alert from one of these EDR protected endpoints.”
Megan begins, “I received a call from a ransomware group that wants us to pay a USD 10 million ransom in Bitcoin. This is typical for ransomware gangs now. They will steal your PII data before they launch the ransomware attack. By doing this, they ensure that the ransom is paid even if you have good backups. I have contacted the FBI to help us to deal with this situation. I’m also talking to a company that specializes in incident response and am negotiating with ransomware groups. In general, law enforcement does not want us to pay the ransom. But, in some circumstances, it makes sense. In many cases the ransom can be negotiated down to a lower price. I remember with the Colonial Pipeline ransomware attack a few years ago, the FBI was able to hack and get the ransom that was paid back from the ransomware gang. We are definitely following law enforcement’s lead regarding the next steps and we are dealing with the ransomware gang. Now, since we have good offline backups, we’ll continue to restore the hosts and servers from backup. The ransomware gang is threatening to dump the stolen PII data onto the dark web. This will cause not only privacy and security concerns for our employees and customers but will be damaging for BigCo’s reputation. This is another reason we brought in the FBI and are talking to a specialized incident response firm experienced in dealing with ransom attacks and these gangs. Although law enforcement, in general, advises not to pay the ransom, sometimes, it makes sense. The reason is that it ensures the safety and security of our customer and employee data.” Nate, the Director of IT, interjects, “But what if they don’t have our PII data? What if they are bluffing?” Megan responds, “Yes, you are correct; there is a chance that they did not steal our PII data. We should be able to ask for proof that they have the data. We can ask for a sample of the data they claim they have. Let us see how the FBI wants us to respond. Now, the downside is if you pay the ransom, there is a tendency for these ransomware groups to come back and hit the same company.” Nate injects, “You mean the ransomware gangs hit the same company multiple times to get the ransomware payment”? Megan replies, “Yes, the same company will get attacked by the same ransomware gang multiple times. I have a meeting set up with the FBI and the incident response firm right after this meeting. Unless you have something urgent where you can’t attend this afternoon’s call, please be available. Of course, responding to this ransomware attack and dealing with the ransomware gang is everyone’s highest priority.”
Figure 1*.1* illustrates the more sophisticated ransomware attack, where the attackers gain access to the corporate network and maneuver their way around to find high-value data such as human resources PII on all employee data. Hackers are typically looking for databases with source code, intellectual property, and PII data. Essentially, any data that your company would pay to get back and not want sold on the dark web.

Figure 1.1 – Ransomware attack
Step 1 is how most hackers gain access to a corporate network: email phishing, RDP, or SMB. Phishing is where an attacker crafts an email with either malware attached or a link to a server that will download malware. Remote desktop (RDP) is commonly used to remotely access another desktop. It uses TCP port 3389. When you configure it, you need to use two-factor authentication (X.509 certificate, Microsoft Authenticator, or Google Authenticator) along with a complex 14-character password. Ensure RDP is disabled and only enabled for specific users as needed. Moreover, privileged accounts should never be able to RDP directly to a server. They should use a jump station. Ideally, add VPN access to avoid direct access to RDP from the internet. Server message block (SMB) is used to access shared resources such as printers, files, and serial ports on the network. SMB (ports 139, 445) should be secured by the following:
- Blocking ports 139 and 445 on perimeter firewalls
- Use a VPN
- Implement filtered VLANs to isolate internal network traffic
- Use Mac address filtering
Steps 2 and 3 illustrate that hackers have found the sensitive data they want to steal and have exfiltrated it offsite (Step 3).
Step 4 illustrates the deployment of ransomware onto the network.
Step 5 shows the ransomware self-propagating over RDP and SMB, infecting other computers on the network.
Megan begins the meeting by introducing FBI Agent Smith. Megan says, “Thank you everyone for making this meeting. Agent Smith is our assigned FBI Agent who is experienced in dealing with ransomware gangs and negotiations. Agent Smith, over to you.” Agent Smith replies, “Thank you Megan. I am so glad BigCo reached out to the FBI. Dealing with these international ransomware gangs is tricky. You need our help in this. There is a trend where the attackers will find an entry point into your network using insecure RDP, SMB, or email phishing attempts. Once the attackers gain access to your network, they will quietly traverse through it. I say quietly because if their movements on your network are not carried out in such a way, then your IDS, IPS, and SIEM will alert you that something is wrong. In doing this, the hacker will search for the PII data on your network. This can be human resources data or customer data. Typically, they are looking for databases that can be compromised. The more sensitive and important the data that are exfiltrated are, then the more likely BigCo will pay the ransom to ensure that it is not leaked onto the dark web. Once the hackers find that database with the PII data, they will compromise it, gain administrator privileges, and then export the data. Again, very quietly, they will exfiltrate the data offsite to a server controlled by the hacker. Once they have secured copies of your data, they will deploy the ransomware. This way, even if you have good offline backups, you still must pay the ransom.” Agent Smith continues, “The ransomware gangs know that once the data are released on the dark web, it opens the company up to more fines such as the EU General Data Protection Regulation (GDPR). GDPR fines can go up to 4% of the company’s annual revenue, with a maximum of EUR 20 million, and these ransomware gangs know it. Also, we have to notify the EU about the breach within 72 hours. Recently we saw this with the CyrusOne breach, where the ransomware gang REvil posted on a dark web forum that they had gained access to the CyrusOne network and would sell their data to their competitors or post it on the dark web. The REvil gang even mentioned GDPR fines.”

Figure 1.2 – REvil dark web post on CyrusOne 1
Agent Smith continues, “Law enforcement recommends not to pay the ransom. In some situations, we will recommend the company pay the ransom to get the systems up quickly and avoid sensitive data from being released. You must understand that most companies only get 61% of their data decrypted even if they pay the ransom.2 I worked on the Colonial Pipeline hack, and the FBI was fortunate enough to be able to recover USD 2.3 million of the bitcoin that was paid to the ransomware gang.3 Do you remember that time in 2021 when there were long gas lines and it ended up being related to the Colonial Pipeline ransomware attack? It was all over the news. With the supply chain shortages, most people have heard of it. The breach was so bad that Colonial had to take the pipeline offline. The day Colonial realized their network had been breached, they paid the ransom which was USD 4.4 million in bitcoin. The pipeline was offline for 6 days. The only bright side was that the FBI recovered 52% of the ransom.”
Megan asks, “In BigCo’s case, what do you suggest? Should we pay the ransom?” Agent Smith responds, “In BigCo’s case, I think we should negotiate the ransom down. The original ransom was much higher for Colonial Pipeline, and we negotiated it down the ransom down considerably.” Megan replies, “Okay, sounds good. What are our next steps?” Agent Smith continues, “At this point, I’ll work with the ransomware incident response firm you are contracted with to begin negotiations with the REvil ransomware group. I’ll be in constant contact; well, as much as I can be from here on out. I’ll provide you with hourly updates as to our progress. Many times, it takes 12 hours to get a response from a ransomware gang. They want you to sweat and be ready to pay once they respond.”
BigCo – recovery
Section titled “BigCo – recovery”Later in the day, Megan gives Mark, the BigCo CIO, a call. Mark answers the phone. “Hello Megan, how are you?” Megan replies, “Hi, Mark. Well, I’m a lot better knowing that we finally got all the affected systems recovered or restored from backup. Mark replies, “Yes, that was a tough few days, but we did it. Finally, the network is back up and operational. When the ransomware was propagating, we shut down the routers on the affected subnets so that the ransomware could not self-propagate.“ Megan says, “I think we were very fortunate to have been able to recover 100% of our data between paying the ransom and our good backups. Mark replies, “Yes, and the endpoint protection (EPP) software deployment has been escalated so that it will be rolled out to all datacenters and employee laptops by the end of the month.” Megan replies, “We’ve completed our proof of concept of a segmentation solution and are now focused on getting it installed, deployed, and up and running. We’ve co-ordinated with the network and security teams to work closely on the deployment. Mark says, “Patching, operational system maintenance, and the segmentation of the network are critical to ensure ransomware can’t automatically propagate on the network. With a segmentation product, we can segment those subnets with critical assets as well as ones that have old machines and operating systems that can’t be patched. By segmenting the network, ransomware can’t propagate as easily. An unsegmented network is also called a flat network. The ransomware can easily self-propagate over RDP and SMB.”
Megan says, “Back to the Basics, as I like to say. We will review our network inventory to ensure any old operating systems, especially pre-Windows 10, have been upgraded to ensure that SMB 3.0 is in use. Making sure SMB 1.0 is disabled is imperative to ensure the self-propagation can’t occur.” Megan continues, “For the cloud, we are deploying a cloud-native application-protection program (CNAPP) that will map our cloud environment and monitor the configurations and workloads. In this way, we can stay in compliance on a continual basis. This will help us maintain PCI compliance and stay compliant with other standards, such as SOC2 Type 2 and ISO 27001. Now, about that segmentation product I’ve been talking about. We have to get our high-value data secured on separate segmented subnets and monitored so that if a network change is made that allows access to one of these high-value subnets, we receive an alert. We must step up our company’s cyber defenses.” Marks says, “Yes, more than ever since these ransomware gangs like to attack the same companies again.”
BigCo – the anatomy of an attack
Section titled “BigCo – the anatomy of an attack”In BigCo’s case, it was determined that the ransomware gang found an unsecured RDP port 3389 open to the internet, which is how they gained access to the BigCo network. In the years prior to 2020, email phishing was the number one attack vector hackers used to gain access to a customer network. Email phishing is when you get a bogus email that either has a malware-infected file or image attached or includes a hyperlink to a website controlled by the hacker. Once you click on the link, your computer goes to the hacker’s website and pulls down an infected file or malware. Companies have been vigilant in deploying email filtering solutions, so hackers have changed their tactics. By 2020, the number one attack vector was exploiting hosts with unsecured RDP port 3389s that were externally visible to the internet. How do attackers find these devices? Well, they use publicly available information from sites such as Shodan or Censys.io. In Figure 1*.3*, you can see a Censys.io search for RDP:

Figure 1.3 – Censys.io search for RDP open to the internet
You need to have an asset inventory and monitor the external devices on your internet. Hackers are targeting companies based on revenue and will leverage these publicly available assets. Ransomware will self-propagate to infect other computers on the same subnet by using SMB (ports 139 and 445) and RDP (port 3389).
Censys.io allows for several free searches for researchers each month. You can go out and query the domain of your company, such as www.cisco.com, and see what open ports exist, as well as the certificates, hosts, and devices on your company’s domain that are externally visible to the internet. The great thing about Censys.io is that it queries the entire internet. When you query Censys.io, it just carries out a database query and not a real-time scan of your network. You don’t have to be concerned about the sensors on your network going off. Censys.io has a free tool with which you can query your home network, and it will tell you if it is secure.
To find out what servers have an RDP port 3389 externally visible on the internet, a simple search on Censys.io of port 3389 can be done. I ran the query and found 3.8 million devices on the internet with port 3389 on the internet. Now, just having the ports externally visible doesn’t mean that the server is at risk. If two-factor authentication and a strong password of 12 characters or more have been configured to secure RDP, then the risk is lowered. Ideally, a jump server with VPN access to hide RDP is recommended. In addition, as part of two-factor authentication, a certificate can be configured. See the chapter on Authentication and Authorization for more detailed information on passwords.
Important note
For each recommendation in this book, I will tell you what basic security means when you are first building out your security program, and you should consider this. Moderate means that as you build your security program, the next step is to provide more security. Advanced provides the highest level of security. For example, a startup would not want to use an advanced security product. For each suggested product, there are always two other choices. Do a search on the product type and Gartner magic quadrant. If a market for a product is rather new, then there may not be a magic quadrant yet; then, go to G2 to review customer ratings of similar products. Ideally, you should research two or more products. Include your team in the discussion of what products will be used. Ask your team if they have specific products that they have experience with and conduct proof of concept on at least one product. It’s important to include your team in discussions so that they feel a part of the process. They will embrace the new product and process if they are involved.
You can use RDP if it’s secured by using one or more of the following methods:
- Use two-factor authentication (2FA) with strong passwords
- Software-based authentication token, i.e., Google Authenticator [Basic]
- Okta provides single sign-on with 2FA [Moderate]
- X.509 certificates [Moderate]
- Smartcard (Yubikey, RSA) [Advanced]
- Software-based authentication token, i.e., Google Authenticator [Basic]
- Limit privileged accounts that can log in remotely [Basic]
- By default, on Windows machines, all Admins have RDP turned on
- Turn off RDP for all administrators
- Only assign RDP access to the specific, privileged accounts that need it
- Use a jump station [Moderate]
- Use a privileged access management solution [Advanced]
- By default, on Windows machines, all Admins have RDP turned on
Now, the pendulum has swung back to where email phishing is again the top method of compromise. Even so, every company needs to review its external perimeter for open ports that can be exploited. Both email phishing and RDP should be addressed. To ensure your company has protected itself against email phishing, the following should be adhered to:
- Google Email Workspace includes email scanning and does a great job (included in subscription) [Basic]
- Email scanner
- Windows Defender for O365 (check the license because the basic level doesn’t include email scanning) [Basic]
- Mimecast email scanner [Moderate]
- ProofPoint email scanner [Advanced]
- Cisco Email Scanning Agent (ESA) [Advanced]
- Abnormal Security [Advanced] utilizes artificial intelligence to identify malicious emails that other email security systems overlook.
- Windows Defender for O365 (check the license because the basic level doesn’t include email scanning) [Basic]
- Security awareness training [Basic]
- KnowBe4
- SecurityNinja
- KnowBe4
- Email phishing campaign simulator [Moderate]
- KnowBe4
- SecurityNinja
- KnowBe4
As part of the security awareness training, you want to ensure you run phishing campaigns quarterly.
Other items to check to ensure your perimeter is secured:
- Review your firewall rules [Basic]
- Have an official pen test at least annually
- Review your firewall rules, especially those that are internet-connected
- Have an official pen test at least annually
- Prioritized vulnerability management [Moderate]
- Ensure critical devices are patched
- Ensure internet-visible hosts are patched
- Ensure critical devices are patched
- Run a scan on Censys.io of your perimeter [Moderate]
- Identify any systems at risk
- Identify any systems that are not documented
- Reduce your internet footprint and remove systems that do not have to be internet-facing
- Identify any systems at risk
Summary
Section titled “Summary”Ransomware isn’t going away anytime soon because the ransomware gangs are making so much money. In this chapter, we learned how attackers can gain access to your network and quietly move around in order to find the PII data on your network. It’s imperative to ensure you have RDP and SMB secured. You need to deploy an email scanner to prevent phishing attempts. It’s imperative to know the assets on your network and understand the assets with interfaces on the internet since hackers can easily search these open ports on sites such as Censys.io.
In the next chapter, we will be covering the importance of identification and authentication. When building out a security program, securing your passwords is paramount. We’ll be covering how to prevent 99% of account attacks in the following chapter.