Skip to main content

Training Update v0.109

blank
blank

Monday is here and we are back at it again with THM!

Today we take on the Phishing room which is part of the THM CompTIA Pentest+ pathway!

blank
blank
blank
blank
blank
blank
blank
blank
blank
blank
blank
blank
blank
blank
blank
blank
blank
blank
blank
blank
blank
blank
blank
blank
blank
blank
blank
blank

We are going to take a little side-step here and do the Hacking with PowerShell room on THM as It is recommended before we do the Windows Local Persistence room & because it’s always good to refresh these topics!

blank

xfreerdp3 /u:Administrator /p:BHN2UVw0Q /v:10.10.90.188 /dynamic-resolution

blank
blank
blank
blank
blank
blank
blank
blank
blank

Get-Command -CommandType Cmdlet | Measure-Object
blank

Get-FileHash -Algorithm MD5 .\interesting-file.txt.txt

blank

In PowerShell, you can use the Invoke-WebRequest cmdlet to make a request to a web server.

Invoke-WebRequest -Uri "http://example.com"
blank
blank
blank
Get-LocalUser | ForEach-Object {
$sid = (New-Object System.Security.Principal.NTAccount($_.Name)).Translate([System.Security.Principal.SecurityIdentifier]).Value
[PSCustomObject]@{
UserName = $_.Name
SID      = $sid
}
} | Format-Table -AutoSize
blank

$users = Get-LocalUser | Where-Object { $_.PasswordRequired -eq $false }

$user.Count

blank

Get-NetIPAddress

blank

PS C:> Get-NetTCPConnection -State Listen | ForEach-Object {

$port = $_.LocalPort
$processId = $_.OwningProcess
$service = Get-Service | Where-Object { $_.Id -eq $processId }
[PSCustomObject]@{
Port        = $port
ProcessId   = $processId
ServiceName = $service.Name
State       = $_.State
}

} | Format-Table -AutoSize

Get-NetTCPConnection -LocalPort 445

blank
Get-HotFix
blank
Get-ChildItem -Path C:\ -Include *.bak* -File -Recurse -ErrorAction SilentlyContinue
blank
Get-ChildItem C:\* -recurse | Select-String -pattern API_KEY
blank
Get-Scheduledtask -TaskName new-sched-task
blank

Get-ACL C:\

blank
blank
blank
blank
$path = 'C:\Users\Administrator\Desktop\emails\*'
$magic_word = 'password'
$exec = Get-ChildItem $path -recurse | Select-String -pattern $magic_word
echo $exec
blank
blank
blank
for($i=130; $i -le 140; $i++){
Test-NetConnection localhost -Port $i
}
blank
blank

After this room I was ranked #1 within the Gold league, however my regin will end very soon!

blank

Now we move on to Windows Local Persistence room on THM!

blank
blank
blank
blank
blank
blank
blank
blank
blank
blank
blank

blank

Was unable to perfom these actions via the user1 as it kept timing out but hey It doesn’t really matter.

blank
blank
blank
blank
blank

Flag – THM{FLAG_BACKED_UP!}

We will finish this off tomorrow!

blank
blank

Until next time & don’t sleepwalk through life!

Paalam