Let’s get started!
Ready to extend visibility, threat detection and response?
Get a DemoWritten by: Shabtay Barel
The explosive growth of cloud-based technology in the past decade has generated a need for organizations who need effective solutions to store valuable and sensitive data. Organizations of all sizes and across fields must guarantee their data’s confidentiality and integrity, and new platforms and paradigms have offered effective data retention techniques. However, these benefits are not without their downsides.
Threat actors understand that these assets offer a significant boon to them as well. By acquiring organizations’ data, or even threatening to acquire it, they can leverage their bargaining position and maximize the impact of their attacks. This realization means that attacking single endpoints is no longer enough – attackers must also gain access to entire organizational networks to extract as much sensitive data as possible. This attack tactic is known as lateral movement.
Lateral movement is defined by the MITRE ATT&CK framework as an attacker’s behavior once they have penetrated a victim’s network to search for assets with tools and techniques that will allow them to move without being recognized by security products.
This is part of an extensive series of guides about Network Attacks
To gain an in-depth understanding of lateral movement, it’s best to analyze the attack from the attacker’s perspective. This is necessary to deal with sophisticated adversaries that occasionally form as APT groups.
Success in these attacks requires comprehensive planning and quality intelligence. Adversaries must first scout out a target based on the space, time, and resources available to them. Before carrying out an attack, they will perform several “quiet” actions:
Throughout this article, we will examine several of the lateral movement techniques and illustrate how an attacker can move laterally within a network to obtain information and execute commands. The demonstration will be performed on the MITRE ATT&CK® sub-techniques T1021.002, T1550.002, and T1550.003
Remote Services – services that aim to connect between two hosts remotely and conduct connections between them like Telnet and SSH. Adversaries with valid accounts can utilize them to perform malicious actions.
Server Message Block (SMB) – A network file-sharing protocol in Windows OS that allows users/applications to access network shares (files, folders, printers, device sharing) to apply actions to files (read, write). Adversaries with appropriate permissions can utilize SMB to move laterally throughout the network/domain and exfiltrate restricted data.
Windows Admin Shares– Network shares (Disk volumes, OS folders, Fax caches, IPC shares, Printers folders, Domain controller shares) in windows OS that are hidden and restricted in access to users who are not under administrative groups. These provide attackers with the ability to perform administrative actions in any system connected to the network. Adversaries granted administrative privileges can access network shares via authenticated SMB sessions and remotely execute commands and binaries via authenticated RPC sessions as it would execute locally.
To verify the SMB protocol is enabled for utilization, it can be tested by a basic command as follows:
Using the utility Netstat that displays protocol statistics and current TCP/IP network connections, we can simply review if RPC on port 135 is enabled:
Windows OS has multiple default network shares built in which allow files and folders to be shared between different machines.
How do we recognize Hidden Shares? They are identified by a dollar sign ($) attached at the end of the shared name.
An attacker who obtains a valid administrator account can access the hidden resources and read and write to these files or exfiltrate all the data stored within. More than that, once attackers obtain a valid admin account, they can use a simple command to elevate it to NT Authority/System account privileges. This allows them to delete, rename, copy, and overwrite system/registry key files under system privileges.
In the examples below, you will watch several of attack scenario simulations that causes alerts to be triggered. The attacks were not stopped, even though an alert was generated. It’s important to acknowledge that Cynet’s prevention capabilities have been disabled for the purpose of this article. If the prevention mechanisms were enabled, none of the attacks would have been succeeded.
Inherently built into Windows operating systems, SMB protocol enabling and windows admin shares are very common in large organizations since they allow for users who are under local computer Administrators group quick access to every disk volume within the corporate network-connected system. From there, an adversary just needs to acquire appropriate permissions and the organization is “transparent” to them. They can leak information, write malicious programs within admin hidden shares to execute commands on remote systems, schedule tasks and establish persistence.
PsExec – a lightweight telnet – is part of the PsTool suite that allows administrators to access and manage remote machines within the network, and fully interacts with a device without their users being aware. Unlike other remote control programs, PsExec doesn’t require the hassle of local installation, making it a powerful tool for lateral movement throughout the network. Once adversaries have managed to initiate access into an exploited machine and acquire appropriate privileges, a connection can be made against any remote machine on the network simply by launching a command prompt console and moving laterally, extracting information, running commands, installing software and executing processes.
Access accomplished- gain shell- from the machine(Compromised-Lab/IP 172.16.121.137) to the remote machine (Host1-Lab 172.16.121.136). As you can see, user Mauriceg (the attacker) is running on a different machine with his account:
A hacking technique known as “pass the hash” (PtH) enables an attacker to log in as a user without knowing the cleartext password, targeting LM and NTLM-enabled Windows EPS. The attack exploits a vulnerability in the authentication protocol that causes password hashes to remain identical between login sessions and to be changed only when the user changes the password. Bypassing the traditional authentication phases, this method moves directly to the authentication process using a hashed password instead of a cleartext password. Indeed, it obviates the need to use methods that target cleartext passwords (like Brute-Force) but simply exfiltrates the hash and uses it for authentication. This technique can be implemented against most servers or services that accept LM or NTLM authentication, no matter if they run under Windows, Unix, or any other operating system. However, such attacks are more popular against Windows operating systems that hash and store passwords in diverse locations such as Credential Manager, LSASS, SAM/SERVICE(under c:\Windows\System32\Config\).
How does it work? To accomplish the attack and to perform a lateral movement, an attacker must have authority to move across the network which they can obtain through admin privileges. So, the attacker must get access to a system where a domain administrator has an active session established and to steal his identity. One of the most powerful and commonly used tools used today is Mimikatz. This is an open-source hacking tool that allows dumping credentials from memory either in plain text or password hash.
Stage 1: Attacker sends phishing email to User1 that executes the malware. The attacker has rights to his account.
Stage 2: Attacker dumps the passwords stored in User1 memory, forges User2 NTLM hash and authenticates as User2.
Stage 3: Attacker dumps the passwords stored in user 2 memory, forges User3 NTLM hash and authenticates as User3.
Stage 4: Attacker dumps the passwords stored in User 3 memory, forges AD_ADM NTLM hash and authenticates as AD_ADM.
Pass the Ticket is a hacking technique to steal accounts credentials without obtaining the user’s cleartext password. It targets the active directory by manipulating the Kerberos authentication protocol. With this technique, the attacker steals the Kerberos tickets and utilizes them to move laterally throughout the network. Kerberos has two associated tickets depending on the user’s access privileges:
1)Ticket-granting ticket (TGT) – has the right to request a service ticket from the TGS.
2) Ticket Granting Service (TGS) – can get access to a particular service/resource that the user is allowed to log in to the domain.
During the PtT attack, adversaries aim to extract from LSSAS memory valid Kerberos tickets so that they can use them for authentication. They can obtain all of a specific user’s TGT and TGS tickets without admin privileges. However, once they do elevate to admin privileges they can dump from the LSSAS memory all Kerberos tickets cashed in the system
There are two exploitation methods used against Kerberos ticket types, commonly known as Golden Ticket and Silver Ticket
Golden Ticket attack – A technique that aims to forge the krbtgt account that is responsible for encrypting Kerberos tickets. A krbtgt account is generated by the third-party secret shared with Kerberos protocol named Key Distribution Center (KDC). Compromising the krbtgt password hash lets the attacker gain access to powerful capabilities, including access to the Active Directory itself, which lets them create, modify, disable users, accounts, services, resources, etc.
Silver Ticket attack– can be acquired to access services/resources or the system that hosts them using Kerberos to generate tickets for their authentication validation. An attack intended to counterfeit Ticket Granting Services (TGS) which are for a unique service. TGS tickets are protected with encryption, so the challenge for the attacker is to steal the password hash of the TGS for the particular service (SharePoint, MSSQL, etc)
To realize the lateral movement tactic, adversaries will have to use tools that let them manipulate the host and system (it will be significantly more challenging to do without them). The below scenarios show an example of how Cynet blocks the powerful hacking tool Mimikatz (which is used to forge users’ credentials and move laterally through the network). Additionally, Cynet offers an accessible user interface (UI) that records all malicious detection for further analysis.
The Cynet UI displays the alert detected with all information regarding attempted Mimikatz execution: the process tree, the user who attempted to execute, the notice that Cynet blocked the activity, etc.
Cynet UI- displays all the details about the malicious activity
SolarWinds Supply Chain Attack
It is probably ranked as one of the most widespread and well-known cyber and intelligence espionage attacks in history, affecting hundreds of private and governmental organizations worldwide. The threat actors behind the SolarWinds supply chain attack used a Backdoor loader named Reinendrop, which moved, deployed and distributed cobalt strike beacons laterally across the network.
NotPetya Ransomware
Companies and governmental organizations in France, Ukraine, Russia and Germany were hit in June 2017 by a major ransomware attack named Petya that affected the entire corporate network, impacting both computers and servers to the point of causing domain control. The ransomware was propagated via PsExec.
Masrv
A new Trickbot module recently discovered. The component, called masrv, hosts a copy of the open-source Masscan utility that can be used to scan local networks for any systems with open ports that may be exploited later on. Once it finds open ports it transmits the results to Trickbot’s C2 server, deploys modules that specialize in exploiting and moves laterally throughout the corporate network to infect additional systems.
Search results for:
Request a Quote
Fill out the form below, and we’ll provide you with a quote tailored to your requirements.
Get your practical guide to the
2023 MITRE ATT&CK Evaluation
Become our partner!
Grow your business with Cynet
See Cynet All-in-One in Action
Let’s get started
Ready to extend visibility, threat detection, and response?
See Cynet All-in-One in Action