How'd you do it?
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\UsersAdministrator>powershell
Windows PowerShell
Copyright (C) 2013 Microsoft Corporation. All rights reserved.
PS C:\UsersAdministrator> Get-SmbServerConfiguration
AnnounceServer : False
AsynchronousCredits : 64
AutoShareServer : True
AutoShareWorkstation : True
CachedOpenLimit : 5
AnnounceComment :
EnableDownlevelTimewarp : False
EnableLeasing : True
EnableMultiChannel : True
EnableStrictNameChecking : True
AutoDisconnectTimeout : 0
DurableHandleV2TimeoutInSeconds : 30
EnableAuthenticateUserSharing : False
EnableForcedLogoff : True
EnableOplocks : True
EnableSecuritySignature : False
ServerHidden : True
IrpStackSize : 15
KeepAliveTime : 2
MaxChannelPerSession : 32
MaxMpxCount : 50
MaxSessionPerConnection : 16384
MaxThreadsPerQueue : 20
MaxWorkItems : 1
NullSessionPipes :
NullSessionShares :
OplockBreakWait : 35
PendingClientTimeoutInSeconds : 120
RequireSecuritySignature : False
EnableSMB1Protocol : True
EnableSMB2Protocol : True
Smb2CreditsMax : 2048
Smb2CreditsMin : 128
SmbServerNameHardeningLevel : 0
TreatHostAsStableStorage : False
ValidateAliasNotCircular : True
ValidateShareScope : True
ValidateShareScopeNotAliased : True
ValidateTargetName : True
EncryptData : False
RejectUnencryptedAccess : True
PS C:\UsersAdministrator>
What should happen?
meterpreter > powershell_shell
PS > Get-SmbServerConfiguration
ERROR: Get-SmbServerConfiguration : The term 'Get-SmbServerConfiguration' is not recognized as the name of a cmdlet, function,
ERROR: script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is c
ERROR: orrect and try again.
ERROR:
ERROR: At line:1 char:27
ERROR: + Get-SmbServerConfiguration <<<<
ERROR: + CategoryInfo : ObjectNotFound: (Get-SmbServerConfiguration:String) [], CommandNotFoundException
ERROR: + FullyQualifiedErrorId : CommandNotFoundException
ERROR:
PS >
What happens instead?
You might also want to check the last ~1k lines of
/opt/metasploit/apps/pro/engine/config/logs/framework.log or
~/.msf4/logs/framework.log for relevant stack traces
Kali Linux 2017.2
Framework: 4.16.14-dev
Console : 4.16.14-dev
Get this with the version command in msfconsole (or git log -1 --pretty=oneline for a source install).
What OS are you running Metasploit on?
Kali Linux 2017.2
The Powershell extension doesn't really load anything by default. It's a bare PS environment that needs to be populated.
I think a bigger question to tackle here is: what is deemed to be a minimal requirement for this extension as far as built-in libs and whatnot is concerned? Let's not forget we're aiming to function on a lot of different machines that will have different versions. Are we guaranteed to have support for the scripts we want loaded? Will loading them make too much unnecessary noise? Perhaps it'd make more sense to have another command that attempts to load built-in scripts?
I'm not a fan of the idea of loading these by default.
Most helpful comment
The Powershell extension doesn't really load anything by default. It's a bare PS environment that needs to be populated.
I think a bigger question to tackle here is: what is deemed to be a minimal requirement for this extension as far as built-in libs and whatnot is concerned? Let's not forget we're aiming to function on a lot of different machines that will have different versions. Are we guaranteed to have support for the scripts we want loaded? Will loading them make too much unnecessary noise? Perhaps it'd make more sense to have another command that attempts to load built-in scripts?
I'm not a fan of the idea of loading these by default.