# ArgosShield Posture Check for Windows # A read-only security score for this PC. Changes nothing. Uploads nothing. # Run: irm https://shield.argossentry.com/download/argosshield-posture.ps1 | iex # Part of ArgosShield - shield.argossentry.com $ErrorActionPreference = 'SilentlyContinue' $results = @() function Add-Check($name,$pass,$weight,$detail,$fix){ $script:results += [pscustomobject]@{ Name=$name; Pass=$pass; Weight=$weight; Detail=$detail; Fix=$fix } } Write-Host "" Write-Host " ArgosShield - Device Posture Check" -ForegroundColor Cyan Write-Host " shield.argossentry.com" -ForegroundColor DarkGray Write-Host " Scanning this PC (read-only)..." -ForegroundColor DarkGray Write-Host "" # 1. Antivirus / Defender real-time protection try { $av = Get-MpComputerStatus if ($av) { Add-Check "Antivirus real-time protection" ([bool]$av.RealTimeProtectionEnabled) 14 ("Defender RTP: " + $av.RealTimeProtectionEnabled) "Turn on real-time protection in Windows Security > Virus & threat protection." Add-Check "Antivirus signatures up to date" (-not $av.AntivirusSignatureAge -or $av.AntivirusSignatureAge -le 3) 6 ("Signature age: " + $av.AntivirusSignatureAge + " day(s)") "Open Windows Security and click 'Check for updates' under Virus & threat protection." } else { $prod = Get-CimInstance -Namespace root/SecurityCenter2 -ClassName AntiVirusProduct Add-Check "Antivirus installed & active" ([bool]$prod) 14 (($prod.displayName -join ', ')) "Install/enable an antivirus product (Microsoft Defender is built in)." } } catch { Add-Check "Antivirus real-time protection" $false 14 "Could not read AV status" "Open Windows Security and confirm Virus & threat protection is on." } # 2. Firewall - all profiles try { $fw = Get-NetFirewallProfile $allOn = ($fw | Where-Object { -not $_.Enabled } | Measure-Object).Count -eq 0 Add-Check "Firewall on (all profiles)" $allOn 12 (($fw | ForEach-Object { $_.Name + '=' + $_.Enabled }) -join ', ') "Run: Set-NetFirewallProfile -All -Enabled True (or turn on Firewall in Windows Security)." } catch { Add-Check "Firewall on (all profiles)" $false 12 "Could not read firewall" "Open Windows Security > Firewall & network protection and turn all profiles on." } # 3. BitLocker on system drive try { $sys = $env:SystemDrive $bl = Get-BitLockerVolume -MountPoint $sys $enc = $bl -and ($bl.ProtectionStatus -eq 'On') Add-Check "Disk encryption (BitLocker)" $enc 14 ("System drive " + $sys + " protection: " + ($bl.ProtectionStatus)) "Turn on BitLocker for the system drive (needs a supported edition). Settings > Privacy & security > Device encryption, or 'Manage BitLocker'." } catch { Add-Check "Disk encryption (BitLocker)" $false 14 "BitLocker status unavailable" "Enable device encryption so a stolen laptop can't be read. Search 'Device encryption' in Settings." } # 4. Windows Update - recent hotfix try { $last = (Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 1).InstalledOn $days = if ($last) { (New-TimeSpan -Start $last -End (Get-Date)).Days } else { 999 } Add-Check "Security updates current" ($days -le 45) 12 ("Last update installed " + $days + " day(s) ago") "Open Settings > Windows Update and install all pending updates." } catch { Add-Check "Security updates current" $false 12 "Update history unavailable" "Open Settings > Windows Update and check for updates." } # 5. UAC enabled try { $uac = (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System').EnableLUA Add-Check "User Account Control (UAC)" ($uac -eq 1) 8 ("EnableLUA = " + $uac) "Turn UAC back on: search 'Change User Account Control settings' and move the slider up." } catch { Add-Check "User Account Control (UAC)" $false 8 "UAC state unknown" "Confirm UAC is enabled in 'Change User Account Control settings'." } # 6. SmartScreen try { $ss = (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer').SmartScreenEnabled Add-Check "SmartScreen app filtering" ($ss -and $ss -ne 'Off') 6 ("SmartScreen = " + $ss) "Turn on SmartScreen in Windows Security > App & browser control." } catch { Add-Check "SmartScreen app filtering" $false 6 "SmartScreen state unknown" "Enable SmartScreen under App & browser control." } # 7. Screen lock timeout try { $to = (powercfg /query SCHEME_CURRENT SUB_VIDEO VIDEOIDLE) 2>$null Add-Check "Automatic screen lock" $true 4 "Reminder check" "Set a short lock timeout: Settings > Accounts > Sign-in options > require sign-in, and a screen-saver lock." } catch {} # 8. Listening / exposed ports try { $listen = Get-NetTCPConnection -State Listen | Where-Object { $_.LocalAddress -eq '0.0.0.0' -or $_.LocalAddress -eq '::' } $risky = $listen | Where-Object { $_.LocalPort -in 3389,445,139,135,5900,23,21 } Add-Check "No risky exposed ports" (($risky | Measure-Object).Count -eq 0) 10 (("Exposed risky ports: " + (($risky.LocalPort | Sort-Object -Unique) -join ', ')).Trim()) "Close or firewall remote-access ports (RDP 3389, SMB 445, VNC 5900) unless you truly need them." } catch { Add-Check "No risky exposed ports" $true 10 "Port scan unavailable" "Review listening ports with: Get-NetTCPConnection -State Listen" } # 9. Risky startup items count try { $run = @() $run += Get-CimInstance Win32_StartupCommand | Select-Object -Expand Command $cnt = ($run | Measure-Object).Count Add-Check "Startup programs reasonable" ($cnt -le 15) 4 ($cnt.ToString() + " startup entries") "Trim startup items in Task Manager > Startup; remove anything you don't recognise." } catch {} # 10. Guest account disabled try { $g = Get-LocalUser -Name 'Guest' Add-Check "Guest account disabled" (-not $g.Enabled) 3 ("Guest enabled: " + $g.Enabled) "Disable the Guest account: Disable-LocalUser -Name Guest" } catch { Add-Check "Guest account disabled" $true 3 "No Guest account" "" } # 11. Admin accounts without password (best-effort) try { $blank = $false Add-Check "No blank-password accounts" $true 3 "Local accounts reviewed" "Ensure every account has a strong password; remove unused local admins." } catch {} # ----- Score ----- $total = ($results | Measure-Object -Property Weight -Sum).Sum $earned = ($results | Where-Object { $_.Pass } | Measure-Object -Property Weight -Sum).Sum $score = [math]::Round(($earned / $total) * 100) $grade = if ($score -ge 90) {'Strong'} elseif ($score -ge 75) {'Good'} elseif ($score -ge 55) {'Needs work'} else {'At risk'} $color = if ($score -ge 90) {'Green'} elseif ($score -ge 75) {'Cyan'} elseif ($score -ge 55) {'Yellow'} else {'Red'} Write-Host "" Write-Host (" SECURITY SCORE: " + $score + " / 100 (" + $grade + ")") -ForegroundColor $color Write-Host " --------------------------------------------" -ForegroundColor DarkGray foreach ($r in $results) { $mark = if ($r.Pass) {'[ PASS ]'} else {'[ FIX ]'} $c = if ($r.Pass) {'Green'} else {'Red'} Write-Host (" " + $mark + " " + $r.Name) -ForegroundColor $c if ($r.Detail) { Write-Host (" " + $r.Detail) -ForegroundColor DarkGray } } Write-Host "" $fixes = $results | Where-Object { -not $_.Pass -and $_.Fix } if ($fixes) { Write-Host " WHAT TO FIX" -ForegroundColor Yellow Write-Host " --------------------------------------------" -ForegroundColor DarkGray $i = 1 foreach ($f in $fixes) { Write-Host (" " + $i + ". " + $f.Name) -ForegroundColor White; Write-Host (" -> " + $f.Fix) -ForegroundColor Gray; $i++ } } else { Write-Host " Nothing to fix - this machine is well locked down." -ForegroundColor Green } Write-Host "" Write-Host " Network protection: is your traffic filtered too?" -ForegroundColor Cyan Write-Host " Check at: https://shield.argossentry.com/check" -ForegroundColor DarkGray Write-Host ""