Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot bind argument to parameter 'Type' because it is null #10

Closed
c414gr opened this issue Aug 8, 2016 · 4 comments
Closed

Cannot bind argument to parameter 'Type' because it is null #10

c414gr opened this issue Aug 8, 2016 · 4 comments
Assignees

Comments

@c414gr
Copy link

c414gr commented Aug 8, 2016

I'm running powershell v4 and can't seem to get past the error below.

field : Cannot bind argument to parameter 'Type' because it is null.
At C:...\BloodHound-master\PowerShell\BloodHound.ps1:14750 char:31

  • lgrmi2_sidusage = field 1 $SID_NAME_USE
    
  •                           ~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [field], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,field

field : Cannot bind argument to parameter 'Type' because it is null.
At C:...\BloodHound-master\PowerShell\BloodHound.ps1:14783 char:21

  • Flags = field 2 $DsDomainFlag
    
  •                 ~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [field], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,field
@HarmJ0y
Copy link
Contributor

HarmJ0y commented Aug 10, 2016

Weird, we haven't seen this error before. I'm assuming this is on script import? If so, are you able to import stock PowerView https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/dev/Recon/PowerView.ps1 ?

@c414gr
Copy link
Author

c414gr commented Aug 10, 2016

I moved the script to the C:\Users...\Documents\sectools\BloodHound-win32-x64\resources\app\PowerShell and the script ran (actually still running ~3hours, but expected).

I was never able to import the script with import-module, I received an error that the file was not in module format.

I think you can close this one.

@HarmJ0y HarmJ0y closed this as completed Aug 10, 2016
@dxrk-kali
Copy link

I'm having this exact same issue trying to use iex to get powerview onto a windows host. I guess I'm fonused why or how moving the script worked? Any other solutions to this issue?

At line:20775 char:31
+     lgrmi2_sidusage = field 1 $SID_NAME_USE
+                               ~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [field], ParameterBindingValida 
   tionException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,f 
   ield
 
field : Cannot bind argument to parameter 'Type' because it is null.
At line:20808 char:21
+     Flags = field 2 $DsDomainFlag
+                     ~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [field], ParameterBindingValida 
   tionException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,f 
   ield

@dxrk-kali
Copy link

I'm having this exact same issue trying to use iex to get powerview onto a windows host. I guess I'm fonused why or how moving the script worked? Any other solutions to this issue?

At line:20775 char:31
+     lgrmi2_sidusage = field 1 $SID_NAME_USE
+                               ~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [field], ParameterBindingValida 
   tionException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,f 
   ield
 
field : Cannot bind argument to parameter 'Type' because it is null.
At line:20808 char:21
+     Flags = field 2 $DsDomainFlag
+                     ~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [field], ParameterBindingValida 
   tionException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,f 
   ield

SOLUTION:
I started a new powershell session on the host powershell -ep bypass and then was able to use iex to import PowerView just fine. Not sure why this works but I'd reccommend just swapping to a different directory and a new shell (make sure you use execution bypass as defender will flag it generally)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants