From ba06edcdd520b5d81d02fa66cc369aacb2dea62a Mon Sep 17 00:00:00 2001 From: last-byte Date: Tue, 3 Dec 2024 14:58:05 +0100 Subject: [PATCH] fixed a bug in PSRemoting --- CHANGELOG.md | 6 +++- PersistenceSniper/PersistenceSniper.psd1 | Bin 24684 -> 24688 bytes PersistenceSniper/PersistenceSniper.psm1 | 39 ++++++++++++----------- 3 files changed, 26 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eeb21c4..4b83b3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog -## 1.16.1 +## 1.16.3 +Fixes: + - Fixed a bug in the remote computer execution which, under certain circumstances, prevented the proper execution of the module + +## 1.16.2 Fixes: - Fixed a bug in the remote computer execution which, under certain circumstances, prevented the proper execution of the module - Fixed a bug in the handling of the LSA Notification Package detection (see PR #27) diff --git a/PersistenceSniper/PersistenceSniper.psd1 b/PersistenceSniper/PersistenceSniper.psd1 index 8c154982b8d2ef284e0531131b99aaf797a08595..e584134dc8021814d514907314542926f70329e9 100755 GIT binary patch delta 1627 zcmX|>$!^+E7=?eLt}12K7l_)b8>_+$abOWuW^fq7WFQz;B_!Z7n=o%I^%Wv@(|y;K zvgtCf(tQ_wgnqs$2pM1h!}-rS_u7A+Lw}z`Kfj)YVvoOHy?Od}^5N|1*V`YV%ZMyQ zld)XMP;O)=E$K*229gt7isFbXT`^ddr6(TiQ+X}#3~gbz*)>t)vKJSUEnJh_%RwT9eEgsvj9^Ae-ag!-QNRvy5yx#z(hz%MKXx$~j9pg9HX z8f7-m4kIfhbw=Dks>L;+rU{q}trv(oRXSZovfCpOhrxkY9`F;!p7Xz#EI0vr7yK!A z4Jtahk@z->l2~qG^O%GQ>k-d^M;^tN+$jZ3bhTMI3^Zg3yeWO2Eo$fVb?J{Y{NS|# z;W%FRs7xt&I>Tpl1)Dm-;}&jeK6)lB6Kbm(aOwfLr(wjYm=bR>c0*eeVlxILsnN+c z*@h%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I)5^fX06fg0YY(l zlHn=Dlg?PVI1fTUplfR?nh_5`$7h+YWr?lnSPj-Lwj4@S9m-+YId1lpwfbsQWEBQ7 jV}8}Km_X?QQs@2u`CUVKhub(5>O;RFD=F?lyZ`bJX_X7o diff --git a/PersistenceSniper/PersistenceSniper.psm1 b/PersistenceSniper/PersistenceSniper.psm1 index d64bb98..821647f 100755 --- a/PersistenceSniper/PersistenceSniper.psm1 +++ b/PersistenceSniper/PersistenceSniper.psm1 @@ -1,6 +1,6 @@ <#PSScriptInfo - .VERSION 1.16.2 + .VERSION 1.16.3 .GUID 3ce01128-01f1-4503-8f7f-2e50deb56ebc @@ -188,11 +188,14 @@ function Find-AllPersistence { $ScriptBlock = { - if ($ComputerName) { + + + + if ($PSSenderInfo) { $PersistenceMethod = $Using:PersistenceMethod $VerbosePreference = $Using:VerbosePreference } - + $ErrorActionPreference = 'SilentlyContinue' $hostname = ([Net.Dns]::GetHostByName($env:computerName)).HostName $psProperties = @('PSChildName', 'PSDrive', 'PSParentPath', 'PSPath', 'PSProvider') @@ -2446,8 +2449,8 @@ function Find-AllPersistence { # SIG # Begin signature block # MIIVlQYJKoZIhvcNAQcCoIIVhjCCFYICAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR -# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUqyLvdXcEKTdX9FIg2NUX11XX -# wTmgghH1MIIFbzCCBFegAwIBAgIQSPyTtGBVlI02p8mKidaUFjANBgkqhkiG9w0B +# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUIUMfrfd3ixeru6pEa8XuSpFv +# K12gghH1MIIFbzCCBFegAwIBAgIQSPyTtGBVlI02p8mKidaUFjANBgkqhkiG9w0B # AQwFADB7MQswCQYDVQQGEwJHQjEbMBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVy # MRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEh # MB8GA1UEAwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTIxMDUyNTAwMDAw @@ -2547,17 +2550,17 @@ function Find-AllPersistence { # ZDErMCkGA1UEAxMiU2VjdGlnbyBQdWJsaWMgQ29kZSBTaWduaW5nIENBIFIzNgIR # ANqGcyslm0jf1LAmu7gf13AwCQYFKw4DAhoFAKB4MBgGCisGAQQBgjcCAQwxCjAI # oAKAAKECgAAwGQYJKoZIhvcNAQkDMQwGCisGAQQBgjcCAQQwHAYKKwYBBAGCNwIB -# CzEOMAwGCisGAQQBgjcCARUwIwYJKoZIhvcNAQkEMRYEFIUztCW7+cO7MtLBKxnO -# CUN/ys76MA0GCSqGSIb3DQEBAQUABIICABS9/ZkiWiPpgffGcFMxPbIKSUxeNZI1 -# 8XotdUKVoVXvNS4DM8N0AeFaOFHJxIwJbx9pQTxapaWRd48o/LmzcEW956bTcD1Q -# 4W8P4tUsajersEarDoPr5ZhVGchphGSODqaHsQDK3aBO4dptipNfH2vnORhuopou -# lusxaXXwc0hEHIDeMRXYuK5ayJtgzpdr7Tl5425iQ+/PRGBwjg14lHQ66jAdkGPV -# Oskwc96o8TXYDZV/IZbYZYJJ0LCkX7h6P5wmOwA8aNwPtuDh+Z1cu7HEjbLTDjI/ -# oZDHGn9N1VHX2D3gFQKb2eRKP1AfZhKueStIHBDh1FbqhaVEo9bAlqi9C4olyTCe -# lq3hI1hszHU1MpdF7Guv/DwZTtW9DWD4BSX5aQNgzpdarermVrHDWzZ6ko00UruU -# XErd8ltHTqISoDO4mXomu1iEneHCFXj3AftvWVTWFYUlvM3/Ppd/PgMA7g3UB0lC -# ElgwooMn8rGxFwca7Cxq1fKG2MZQDnpMSSxeTLvhLJ81YISr3usdkiJI7rsaqYhM -# Dq50t9TFTm5k3T2xEJIUSEUmIwSogGw7FbHerrozabdQKZCyRE9efMQOn7wFCNW6 -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