Skip to content

Latest commit

 

History

History
123 lines (53 loc) · 3.13 KB

T1552.001.md

File metadata and controls

123 lines (53 loc) · 3.13 KB

T1552.001 - Credentials In Files

Adversaries may search local file systems and remote file shares for files containing insecurely stored credentials. These can be files created by users to store their own credentials, shared credential stores for a group of individuals, configuration files containing passwords for a system or service, or source code/binary files containing embedded passwords.

It is possible to extract passwords from backups or saved virtual machines through OS Credential Dumping. (Citation: CG 2014) Passwords may also be obtained from Group Policy Preferences stored on the Windows Domain Controller. (Citation: SRD GPP)

In cloud environments, authenticated user credentials are often stored in local configuration and credential files. In some cases, these files can be copied and reused on another machine or the contents can be read and then used to authenticate without needing to copy any files. (Citation: Specter Ops - Cloud Credential Storage)

Atomic Tests


Atomic Test #1 - Extract Browser and System credentials with LaZagne

LaZagne Source

Supported Platforms: macOS

Attack Commands: Run with bash! Elevation Required (e.g. root or admin)

python2 laZagne.py all


Atomic Test #2 - Extract passwords with grep

Extracting credentials from files

Supported Platforms: macOS, Linux

Inputs:

Name Description Type Default Value
file_path Path to search String /

Attack Commands: Run with sh!

grep -ri password #{file_path}


Atomic Test #3 - Extracting passwords with findstr

Extracting Credentials from Files. Upon execution, the contents of files that contain the word "password" will be displayed.

Supported Platforms: Windows

Attack Commands: Run with powershell!

findstr /si pass *.xml *.doc *.txt *.xls
ls -R | select-string -Pattern password


Atomic Test #4 - Access unattend.xml

Attempts to access unattend.xml, where credentials are commonly stored, within the Panther directory where installation logs are stored. If these files exist, their contents will be displayed. They are used to store credentials/answers during the unattended windows install process.

Supported Platforms: Windows

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

type C:\Windows\Panther\unattend.xml
type C:\Windows\Panther\Unattend\unattend.xml