Skip to content

Commit

Permalink
Merge pull request #36 from Msfv3n0m/Msfv3n0m
Browse files Browse the repository at this point in the history
Msfv3n0m
  • Loading branch information
Msfv3n0m authored Nov 3, 2023
2 parents 8ba3b4a + 016b5a3 commit 5ad6ace
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
5 changes: 4 additions & 1 deletion driver.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ function GetTools ($cd, $downloads) {
gci -file $downloads | ?{$_.name -like "*bluespawn*"} | %{Copy-Item $_.fullname $cd\SharingIsCaring\tools}
if (Test-Path $downloads\Sysinternals\) {
Copy-Item $downloads\Sysinternals\sdelete.exe $cd
Copy-Item $downloads\Sysinternals\TCPVCon.exe $cd\SharingIsCaring\tools
Copy-Item $downloads\Sysinternals\PSExec.exe $cd\SharingIsCaring\tools
Copy-Item $downloads\Sysinternals\sdelete.exe $cd\SharingIsCaring\tools
Copy-Item $downloads\Sysinternals\Autoruns.exe $cd\SharingIsCaring\tools
Expand Down Expand Up @@ -275,6 +276,7 @@ $DCList = $(Get-ADComputer -Filter {OperatingSystem -like "*Windows*"} -SearchBa

$ServersList | Select -ExpandProperty Name >> servers.txt
$DCList | Select -ExpandProperty Name >> servers.txt
$DCList | Select -ExpandProperty Name >> dc.txt

$job1 = Start-Job -ScriptBlock {
param($downloads)
Expand Down Expand Up @@ -376,4 +378,5 @@ ChangeAdminPass
Write-Host "The program has completed successfully. Now, Manually update the group policy configuration on all computers in the domain" -ForegroundColor Green
gpmc.msc
DeleteDriver $cd
gpupdate /force
gpupdate /force
powershell
12 changes: 10 additions & 2 deletions invoke-massadministration.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,15 @@ function RunCommand ($ServersList, $cmd) {
}
}
}

function Netstat()
{
$Netstat = (Netstat -ano | Select -skip 2) -Join "`n" -Split "(?= [TU][CD]P\s+(?:\d+\.|\[\w*:\w*:))" |
% {$_.trim() -Replace "`n",' ' -Replace '\s{2,20}',','} |
ConvertFrom-Csv
$Netstat | Add-Member -MemberType NoteProperty -Name Path -Value ""
$Netstat | %{$_.Path = $(ps -id $_.pid | Select -ExpandProperty path)}
$Netstat| ?{$_.Path -ne $null} | ft -Autosize -Wrap
}
function ChangeAdminPass () {
Write-Host "Setting a new administrator password" -ForegroundColor Yellow
$newPass Read-Host "Please set a new password for $(whoami):" -AsSecureString
Expand All @@ -48,4 +56,4 @@ function ChangeAdminPass () {
# Vars
$ServersList = Get-Content -Path "$(pwd)\servers.txt"
# Logic
RunCommand ($ServersList, $cmd)
RunCommand ($ServersList, $cmd)

0 comments on commit 5ad6ace

Please sign in to comment.