Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 23 additions & 22 deletions Security/Test-ProxyLogon.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -190,30 +190,31 @@ begin {
[CmdletBinding()]
param ()

foreach ($file in Get-ChildItem -Recurse -Path "$env:WINDIR\temp\lsass.*dmp") {
[PSCustomObject]@{
ComputerName = $env:COMPUTERNAME
Type = 'LsassDump'
Path = $file.FullName
Name = $file.Name
}
}
foreach ($file in Get-ChildItem -Recurse -Path "c:\root\lsass.*dmp" -ErrorAction SilentlyContinue) {
[PSCustomObject]@{
ComputerName = $env:COMPUTERNAME
Type = 'LsassDump'
Path = $file.FullName
Name = $file.Name
$zipFilter = ".7z", ".zip", ".rar"
$dmpFilter = "lsass.*dmp"
$dmpPaths = "c:\root", "$env:WINDIR\temp"

Get-ChildItem -Path $dmpPaths -Filter $dmpFilter -Recurse -ErrorAction SilentlyContinue |
ForEach-Object {
[PSCustomObject]@{
ComputerName = $env:COMPUTERNAME
Type = 'LsassDump'
Path = $_.FullName
Name = $_.Name
}
}
}
foreach ($file in Get-ChildItem -Recurse -Path $env:ProgramData -ErrorAction SilentlyContinue | Where-Object { $_.Extension -Match "\.7z$|\.zip$|\.rar$" }) {
[PSCustomObject]@{
ComputerName = $env:COMPUTERNAME
Type = 'SuspiciousArchive'
Path = $file.FullName
Name = $file.Name

Get-ChildItem -Path $env:ProgramData -Recurse -ErrorAction SilentlyContinue |
ForEach-Object {
If ( $_.Extension -in $zipFilter ) {
[PSCustomObject]@{
ComputerName = $env:COMPUTERNAME
Type = 'SuspiciousArchive'
Path = $_.FullName
Name = $_.Name
}
}
}
}
}

function Get-AgeInDays {
Expand Down