Scripts and Tasks for Hivestorm
https://untrustednetwork.net/files/russinovich-malware-hunting-with-the-sysinternals-tools.pdf
Get-WindowsUpdate
Install-WindowsUpdate -AcceptAll -AutoReboot
Get-LocalUser | Where-Object { $_.Enabled -eq $true -and $_.Name -notin @("Administrator", "DefaultAccount", "Guest") }
Get-LocalUser
Disable-LocalUser -Name "Username"
Remove-LocalUser -Name "Username"
gpedit.msc
Get-GPOReport -All -ReportType HTML -Path "C:\GPOReport.html"
AuditPol /set /subcategory:"Logon" /success:enable /failure:enable
Get-EventLog -LogName Security -Newest 100
Get-LocalUser | Select-Object Name, PasswordLastSet, PasswordNeverExpires
net accounts /maxpwage:90
Get-LocalUser | Select-Object Name, PasswordLastSet, PasswordNeverExpires
Get-NetFirewallProfile
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True
Set-NetFirewallProfile: This cmdlet modifies the settings of the Windows Firewall profiles.
-
Profile Domain,Public,Private: Specifies that the changes should apply to all three firewall profiles: Domain, Public, and Private.
-
Enabled True: Sets the Enabled property to True, effectively turning on the firewall for the specified profiles.
Get-InstalledModule
nmap -sV -O <VM_IP_Address>
Get-NetTCPConnection | Select-Object LocalAddress, LocalPort, State
Stop-Service -Name "ServiceName"
Set-Service -Name "ServiceName" -StartupType Disabled
Start-MpScan -ScanType QuickScan
Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall* | Select-Object DisplayName, DisplayVersion
Get-WmiObject -Query "SELECT * FROM Win32_Product WHERE Name = 'SoftwareName'" | ForEach-Object { $_.Uninstall() }