diff --git a/Recon/PowerView.ps1 b/Recon/PowerView.ps1 index 40b060ce..ed50ce4e 100755 Binary files a/Recon/PowerView.ps1 and b/Recon/PowerView.ps1 differ diff --git a/Recon/README.md b/Recon/README.md index 7fcacc5e..6e46de67 100644 --- a/Recon/README.md +++ b/Recon/README.md @@ -95,6 +95,8 @@ an array of hosts from the pipeline. Get-NetShare - returns open shares on the local (or a remote) machine Get-NetLoggedon - returns users logged on the local (or a remote) machine Get-NetSession - returns session information for the local (or a remote) machine + Get-NetComputerStartTime - returns start time information for the local (or a remote) machine + Get-NetComputerVersion - returns workstation information for the local (or a remote) machine Get-RegLoggedOn - returns who is logged onto the local (or a remote) machine through enumeration of remote registry keys Get-NetRDPSession - returns remote desktop/session information for the local (or a remote) machine Test-AdminAccess - rests if the current user has administrative access to the local (or a remote) machine diff --git a/Recon/Recon.psd1 b/Recon/Recon.psd1 index d0a4148b..5e2a1fff 100644 --- a/Recon/Recon.psd1 +++ b/Recon/Recon.psd1 @@ -78,6 +78,8 @@ FunctionsToExport = @( 'Get-NetSession', 'Get-RegLoggedOn', 'Get-NetRDPSession', + 'Get-NetComputerStartTime', + 'Get-NetComputerVersion', 'Test-AdminAccess', 'Get-NetComputerSiteName', 'Get-WMIRegProxy', diff --git a/Tests/Recon.tests.ps1 b/Tests/Recon.tests.ps1 index a297ed96..ff35fb8f 100644 --- a/Tests/Recon.tests.ps1 +++ b/Tests/Recon.tests.ps1 @@ -237,6 +237,51 @@ Describe "Get-NetRDPSession" { } } +Describe "Get-NetComputerStartTime" { + It "Should return results for the local host" { + if ( (Get-NetComputerStartTime | Measure-Object).count -lt 1) { + Throw "Incorrect start time results returned" + } + } + It "Should accept NETBIOS -ComputerName argument" { + if ( (Get-NetComputerStartTime -ComputerName "$env:computername" | Measure-Object).count -lt 1) { + Throw "Incorrect start time results returned" + } + } + It "Should accept IP -ComputerName argument" { + if ( (Get-NetComputerStartTime -ComputerName $LocalIP | Measure-Object).count -lt 1) { + Throw "Incorrect start time results returned" + } + } + It "Should accept pipeline input" { + if ( ( "$env:computername" | Get-NetComputerStartTime | Measure-Object).count -lt 1) { + Throw "Incorrect start time results returned" + } + } +} + +Describe "Get-NetComputerVersion" { + It "Should return results for the local host" { + if ( (Get-NetComputerVersion | Measure-Object).count -lt 1) { + Throw "Incorrect workstation results returned" + } + } + It "Should accept NETBIOS -ComputerName argument" { + if ( (Get-NetComputerVersion -ComputerName "$env:computername" | Measure-Object).count -lt 1) { + Throw "Incorrect workstation results returned" + } + } + It "Should accept IP -ComputerName argument" { + if ( (Get-NetComputerVersion -ComputerName $LocalIP | Measure-Object).count -lt 1) { + Throw "Incorrect workstation results returned" + } + } + It "Should accept pipeline input" { + if ( ( "$env:computername" | Get-NetComputerVersion | Measure-Object).count -lt 1) { + Throw "Incorrect workstation results returned" + } + } +} Describe "Invoke-CheckLocalAdminAccess" { It "Should Not Throw for localhost" {