Story image

The cyber kill chain: Moving laterally in Active Directory

04 Mar 2019

Article by ManageEngine marketing manager Ram Vaidyanathan

Every company is susceptible to a data breach.

Given the number of endpoints an organisation usually has and how often employees are manipulated by social engineering and malware-laden emails, attackers can easily gain an initial foothold in a company's network.

This can happen even if a company performs extensive risk assessments and utilises perimeter protection devices like firewalls.

Perimeter protection has proven to be necessary, but not entirely sufficient for defence.

How else can we explain some of the biggest data breaches that large corporations have had to face? 

More often than not, cybercriminals get into a network using malware.

They will then usually start compiling a list of target domain controllers with credential information, or database servers that hold valuable data assets.

In due course, they will develop an attack map that details a clear path of burrowing deeper.

Using different techniques, they will move laterally through the network, gaining more and more privileged access until they gain entry to their target domain controllers.

This lateral movement is the part of the cyber kill chain in which attackers are most vulnerable and exposed.

At this phase, they are actively trying to jump from one machine to another.

So how do cybercriminals move laterally through a network?

What exactly do they do after getting in?

And what can companies do to stop them in their tracks?

The anatomy of an attack

There are numerous ways an attacker can move through a network, and it's important to understand how this is generally done.

While the tools used to carry out an attack may be different, the steps are usually the same. Understanding how an attack progresses and getting into the criminal's mind will help companies better defend themselves.

Another key thing to remember is that companies can use the same tools hackers use to perform penetration tests.

After gaining an initial foothold, the first thing an attacker might do is a network scan.

A network scan will show them the list of active hosts on the network along with their IP addresses.

They can then use a technique called port scanning to send messages to each port on a machine one by one.

If they receive a response, the attacker will assume the port is in use and may decide to probe it further for vulnerabilities.

A port scan will also help the attacker figure out what services run on what machines.

Using this information, they may decide to exploit the known vulnerabilities of those services.

The next thing the attacker may do is attempt to figure out the logical and physical structure of the company's Active Directory (AD).

One of the simplest ways to do this is by using PowerShell, a tool that is provided by Microsoft itself. PowerShell is a task-based, command-line scripting language built on .NET that lets admins manage computers using cmdlets (pronounced “command lets”).

Since PowerShell is trusted by the Windows environment, actions carried out using PowerShell scripting usually don't raise any alarms.

Using the right cmdlets, a threat actor can look at group memberships, observe service accounts, find out password policies, and identify important servers like domain controllers.

PowerShell also has the flexibility to work in remote desktop connections, which further complicates the problem.

Attackers may use tools like PowerSploit to make their attacks more sophisticated.

After all this investigating, the attacker will know exactly what machines to target to begin moving laterally.

Attackers also use tools like BloodHound that use graph theory to reveal hidden and often unintended relationships within AD environments.

BloodHound displays probable attack paths in its graph drawing area.

BloodHound, co-founder Andy Robbins says "An attacker would be interested in effective privileges for other users. BloodHound gives this information about every user in the domain. What local admin rights and group memberships does a particular user have?"

The tool is simple enough for the script novice yet suave enough for the more serious operator.

If the attacker gains access to a system where a user is a local admin and there are active sessions in that system, they can steal the credentials of those active sessions.

To steal credentials, attackers use popular tools like Mimikatz, which is used to perform pass-the-hash and pass-the-ticket attacks.

Using these techniques, they can move from one computer to the next and ultimately gain domain administrator privileges.

How can companies defend themselves against lateral movement?

Real-time event log correlation and augmented threat intelligence systems are critical to prevent attackers from moving laterally through a network.

These tools can process nearly 25,000 logs per second and detect attacks in real time.

These tools alert security professionals the moment certain risky conditions are detected.

For example, if there is an unusually high number of logon failures from a particular user, membership to an important organisational unit or privileged group changes, or GPOs or GPO links are modified, security professionals would instantly receive an alert, as these could be tell-tale signs of an attacker attempting to escalate privileges.

Another aspect that plays a critical role in defending against lateral movement is user behaviour analytics, or UEBA. UEBA tools apply machine learning to create a baseline of normal activities that are specific to each user and notify security personnel when there is a deviation from this norm.

For example, a user who consistently accesses a critical server outside of business hours won't trigger an alert for this activity, because that behaviour is typical for that user.

If they try to access that server during a time they've never accessed it before—even if it falls within business hours—this activity will be considered unusual and will raise an alert.

Apart from using the right tools, companies must educate users about the importance of security hygiene.

Conducting regular red team-blue team exercises is an important part of penetration testing and will allow security teams to get familiar with using some of the above tools.

And all of this needs to be a coordinated effort under the authority of a central risk team, who, in turn, works under the guidance of a chief risk officer.

Using data science to improve threat prevention
With a large amount of good quality data and strong algorithms, companies can develop highly effective protective measures.
General staff don’t get tech jargon - expert says time to ditch it
There's a serious gap between IT pros and general staff, and this expert says it's on the people in IT to bridge it.
ZombieLoad: Another batch of flaws affect Intel chips
“This flaw can be weaponised in highly targeted attacks that would normally require system-wide privileges or a complete subversion of the operating system."
Forget endpoints—it’s time to secure people instead
Security used to be much simpler: employees would log in to their PC at the beginning of the working day and log off at the end. That PC wasn’t going anywhere, as it was way too heavy to lug around.
DimData: Fear finally setting in amongst vulnerable orgs
New data ranking the ‘cybermaturity’ of organisations reveals the most commonly targeted sectors are also the most prepared to deal with the ever-evolving threat landscape.
IXUP goes "post-quantum" with security tech upgrade
The secure analytics company has also partnered with Deloitte as a reseller, and launched a SaaS offering on Microsoft Azure.
Infoblox appoints channels head for A/NZ
Kenneth Cartwright’s appointment extends Infoblox’s position in secure cloud-managed network services throughout the region.
ExtraHop’s new partner program for enterprise security
New accreditations and partner portal enable channel partners to fast-track their expertise and build their security businesses.