Account Manipulation

Account manipulation may aid adversaries in maintaining access to credentials and certain permission levels within an environment. Manipulation could consist of modifying permissions, modifying credentials, adding or changing permission groups, modifying account settings, or modifying how authentication is performed. These actions could also include account activity designed to subvert security policies, such as performing iterative password updates to subvert password duration policies and preserve the life of compromised credentials. In order to create or manipulate accounts, the adversary must already have sufficient permissions on systems or the domain.

Exchange Email Account Takeover

The Add-MailboxPermission PowerShell cmdlet, available in on-premises Exchange and in the cloud-based service Office 365, adds permissions to a mailbox.[1] This command can be run, given adequate permissions, to further access granted to certain user accounts. This may be used in persistent threat incidents as well as BEC (Business Email Compromise) incidents where an adversary can assign more access rights to the accounts they wish to compromise. This may further enable use of additional techniques for gaining access to systems. For example, compromised business accounts are often used to send messages to other accounts in the network of the target business while creating inbox rules so the messages evade spam/phishing detection mechanisms.[2]

Azure AD

In Azure, an adversary can set a second password for Service Principals, facilitating persistence.[3]

AWS

AWS policies allow trust between accounts by simply identifying the account name. It is then up to the trusted account to only allow the correct roles to have access.[4]

ID: T1098
Tactic: Credential Access, Persistence
Platform: Windows, Office 365, Azure, GCP, Azure AD, AWS
System Requirements: Exchange email account takeover: Sufficient permission to run the Add-MailboxPermission PowerShell cmdlet (depending on parameters used, may require more permission)
Permissions Required: Administrator
Data Sources: Authentication logs, API monitoring, Windows event logs, Packet capture
Contributors: Jannie Li, Microsoft Threat Intelligence Center (MSTIC); Praetorian; Tim MalcomVetter
Version: 2.0

Procedure Examples

Name Description
APT3

APT3 has been known to add created accounts to local admin groups to maintain elevated access.[11]

Calisto

Calisto adds permissions and remote logins to all users.[7]

Dragonfly 2.0

Dragonfly 2.0 added newly created accounts to the administrators group to maintain elevated access.[12][13]

Lazarus Group

Lazarus Group malware WhiskeyDelta-Two contains a function that attempts to rename the administrator’s account.[9][10]

Magic Hound

Magic Hound granted compromised email accounts read access to the email boxes of additional targeted accounts. The group then was able to authenticate to the intended victim's OWA (Outlook Web Access) portal and read hundreds of email communications for information on Middle East organizations.[14]

Mimikatz

The Mimikatz credential dumper has been extended to include Skeleton Key domain controller authentication bypass functionality. The LSADUMP::ChangeNTLM and LSADUMP::SetNTLM modules can also manipulate the password hash of an account without knowing the clear text value.[5][6]

Skeleton Key

Skeleton Key is used to patch an enterprise domain controller authentication process with a backdoor password. It allows adversaries to bypass the standard authentication system to use a defined password for all accounts authenticating to that domain controller.[8]

Mitigations

Mitigation Description
Multi-factor Authentication

Use multi-factor authentication for user and privileged accounts.

Network Segmentation

Configure access controls and firewalls to limit access to critical systems and domain controllers. Most cloud environments support separate virtual private cloud (VPC) instances that enable further segmentation of cloud systems.

Operating System Configuration

Protect domain controllers by ensuring proper security configuration for critical servers to limit access by potentially unnecessary protocols and services, such as SMB file sharing.

Privileged Account Management

Do not allow domain administrator accounts to be used for day-to-day operations that may expose them to potential adversaries on unprivileged systems.

Detection

Collect events that correlate with changes to account objects on systems and the domain, such as event ID 4738.[15] Monitor for modification of accounts in correlation with other suspicious activity. Changes may occur at unusual times or from unusual systems. Especially flag events where the subject and target accounts differ[16] or that include additional flags such as changing a password without knowledge of the old password.[17]

Use of credentials may also occur at unusual times or to unusual systems or services and may correlate with other suspicious activity.

Monitor for unusual Exchange and Office 365 email account permissions changes that may indicate excessively broad permissions being granted to compromised accounts.

A larger volume of emails sent from an account than normal and the discovery of similar phishing emails being sent from real accounts within a network may be signs that an account may have been compromised and attempts to leverage access with modified email permissions is occurring.

References