<commit_before>#Veil-PowerView

Veil-PowerView is a powershell tool to gain network situational awareness on 
Windows domains. It contains a set of pure-powershell replacements for various 
windows "net *" commands, which utilize powershell AD hooks and underlying 
Win32 API functions to perform useful Windows domain functionality.

It also impements various useful metafunctions, including a port 
of [<NAME>'s](https://twitter.com/mubix) [netview.exe](https://github.com/mubix/netview) tool,
and some custom-written 'UserHunter' functions which will identify where on the
network specific users are logged into. It can also check which machines
on the domain the current user has local administrator access on. See function
descriptions for appropriate usage and available options.

To run on a machine, start powershell with "powershell -exec bypass" and then load
the powerview script: PS> Import-Module .\powerview.ps1

For detailed output of underlying functionality, pass the -Debug flag to most functions.

For functions that enumerate multiple machines, pass the -Verbose flag to get a
progress status as each host is enumerated.

Individual functions are broken out in ./functions/ for anyone curious.

Veil-PowerView is a part of the [Veil-Framework](https://www.veil-framework.com/) 
and is developed by [@harmj0y](https://twitter.com/harmj0y).


Thanks to:
    [@davidpmcguire](https://twitter.com/davidpmcguire) for inspiration, 
    [@mubix](https://twitter.com/mubix) for building netview.exe and open sourcing it,
    [@obscuresec](https://twitter.com/obscuresec), [@mattifestation](https://twitter.com/mattifestation) and [darkoperator](https://twitter.com/Carlos_Perez) for examples and how to write proper powershell modules,
    zeknox, smilingraccoon, and r3dy for the [local_admin_search_enum](https://github.com/rapid7/metasploit-framework/blob/master/modules/post/windows/gather/local_admin_search_enum.rb) idea in Metasploit,
    dunedinite, normanj, and powershellmagazine.com, for some (cited) examples to adapt and draw from


## Misc Functions:
    Resolve-IP                      -   resolves a hostname to an IP
    Check-Write                     -   checks if the current user can write to the specified file
    Set-MacAttribute                -   Sets MAC attributes for a file based on another file or input (from Powersploit)
    Invoke-CopyFile                 -   copies a local file to a remote location, matching MAC properties
    Test-Server                     -   tests connectivity to a specified server
    Get-UserProperties              -   returns all properties specified for users, or a set of user:prop names
    Get-ComputerProperties          -   returns all properties specified for computers, or a set of computer:prop names
    Get-LastLoggedOn                -   return the last logged on user for a target host
    Invoke-CheckLocalAdminAccess    -   check if the current user context has local administrator access
                                        to a specified host
    Invoke-SearchFiles              -   search a local or remote path for files with specific terms in the name
<commit_msg>small update<commit_after>#Veil-PowerView

Veil-PowerView is a powershell tool to gain network situational awareness on 
Windows domains. It contains a set of pure-powershell replacements for various 
windows "net *" commands, which utilize powershell AD hooks and underlying 
Win32 API functions to perform useful Windows domain functionality.

It also impements various useful metafunctions, including a port 
of [<NAME>'s](https://twitter.com/mubix) [netview.exe](https://github.com/mubix/netview) tool,
and some custom-written 'UserHunter' functions which will identify where on the
network specific users are logged into. It can also check which machines
on the domain the current user has local administrator access on. See function
descriptions for appropriate usage and available options.

To run on a machine, start powershell with "powershell -exec bypass" and then load
the powerview script: PS> Import-Module .\powerview.ps1

For detailed output of underlying functionality, pass the -Debug flag to most functions.

For functions that enumerate multiple machines, pass the -Verbose flag to get a
progress status as each host is enumerated.

Most of the "meta" functions accept an array of hosts from the pipeline.

Veil-PowerView is a part of the [Veil-Framework](https://www.veil-framework.com/) 
and is developed by [@harmj0y](https://twitter.com/harmj0y).


Thanks to:
    [@davidpmcguire](https://twitter.com/davidpmcguire) for inspiration, 
    [@mubix](https://twitter.com/mubix) for building netview.exe and open sourcing it,
    [@obscuresec](https://twitter.com/obscuresec), [@mattifestation](https://twitter.com/mattifestation) and [darkoperator](https://twitter.com/Carlos_Perez) for examples and how to write proper powershell modules,
    zeknox, smilingraccoon, and r3dy for the [local_admin_search_enum](https://github.com/rapid7/metasploit-framework/blob/master/modules/post/windows/gather/local_admin_search_enum.rb) idea in Metasploit,
    dunedinite, normanj, and powershellmagazine.com, for some (cited) examples to adapt and draw from


## Misc Functions:
    Resolve-IP                      -   resolves a hostname to an IP
    Check-Write                     -   checks if the current user can write to the specified file
    Set-MacAttribute                -   Sets MAC attributes for a file based on another file or input (from Powersploit)
    Invoke-CopyFile                 -   copies a local file to a remote location, matching MAC properties
    Test-Server                     -   tests connectivity to a specified server
    Get-UserProperties              -   returns all properties specified for users, or a set of user:prop names
    Get-ComputerProperties          -   returns all properties specified for computers, or a set of computer:prop names
    Get-LastLoggedOn                -   return the last logged on user for a target host
    Invoke-CheckLocalAdminAccess    -   check if the current user context has local administrator access
                                        to a specified host
    Invoke-SearchFiles              -   search a local or remote path for files with specific terms in the name

{'fraction_non_alphanumeric': 0.06338918748024028, 'fraction_numerical': 0.002213088839709137, 'mean_word_length': 3.275, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 20, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1709716', 'n_tokens_mistral': 1675, 'n_tokens_neox': 1596, 'n_words': 692}