Commit Graph

509 Commits

Author SHA1 Message Date
HarmJ0y 9ea5c5b7f5 Couple of fixes for Get-DomainSPNTicket 2017-01-10 18:31:30 -05:00
HarmJ0y 215ec25da0 Bug fixes in Get-GPPPassword 2017-01-09 18:11:15 -05:00
HarmJ0y 3f7a32d623 Get-DomainSPNTicket/Invoke-Kerberoast now include 'real' user data in the hash output.
Added a bit more error handling when requesting the SPN kerberos ticket.
2017-01-08 22:28:51 -05:00
HarmJ0y 8552033242 Merge pull request #205 from mbrancato/dev
Fix errors gathering the forest SID
2017-01-07 18:20:56 -08:00
HarmJ0y 5500a7e131 Fix for issue #170
Added -SearchForest to search all reachable domain trust \SYSVOL\'s
Each password is now output as a separate object.
2017-01-07 20:32:14 -05:00
Mike Brancato d1060930c7 Fix errors gathering the forest SID
Pull the SID directly from the 'krbtgt' user to avoid errors in ConvertTo-SID
2017-01-04 23:23:25 -05:00
HarmJ0y 94438eda67 Replaced Invoke-WScriptUACBypass with @enigma0x3's Invoke-EventVwrBypass function 2016-12-21 00:41:51 -05:00
HarmJ0y 1118f53dc2 Added "-InformationClass Type" to Get-TokenInformation to enumerate token type and impersonation level
Added Get-ProcessTokenType to enumerate type/impersonation level of a specified process
2016-12-21 00:35:38 -05:00
HarmJ0y 96ae5e3f61 type correction 2016-12-20 23:13:46 -05:00
HarmJ0y 1916464092 bug fix in Get-TokenInformation 2016-12-20 23:13:16 -05:00
HarmJ0y 9853900578 Type fix.
Added -TrustedToAuth to Get-DomainUser
2016-12-15 19:04:53 -05:00
HarmJ0y 831dde1268 Bug fix for the Find-DomainUserLocation bug fix :) 2016-12-15 12:45:18 -05:00
HarmJ0y 601ad0cf3f Logic bug fix in Get-DomainFileServer
-Domain bug fix in Find-DomainUserLocation stealth
2016-12-15 12:32:17 -05:00
HarmJ0y ad32d6c75b For ./Recon/ :
-(More) PSScriptAnalyzering
    -Tweaking of synopsis blocks in order to support platyPS
    -Code standardization
    -Generated docs
2016-12-14 19:23:28 -05:00
HarmJ0y 59e6f94e76 For ./ScriptModification/ :
-PSScriptAnalyzering
    -Tweaking of synopsis blocks in order to support platyPS
    -Code standardization
    -Generated docs
2016-12-14 18:50:58 -05:00
HarmJ0y 9ed26d65a8 removed whitespace 2016-12-14 18:25:15 -05:00
HarmJ0y cf444398ca For ./Persistence/ :
-PSScriptAnalyzering
    -Tweaking of synopsis blocks in order to support platyPS
    -Code standardization
    -Generated docs
2016-12-14 18:24:33 -05:00
HarmJ0y a81faf36a4 For ./Mayhem/ :
-PSScriptAnalyzering
    -Tweaking of synopsis blocks in order to support platyPS
    -Code standardization
    -Generated docs
2016-12-14 18:05:22 -05:00
HarmJ0y 1980f403ee For ./CodeExecution/ :
-PSScriptAnalyzering
    -Tweaking of synopsis blocks in order to support platyPS
    -Code standardization
    -Generated docs
2016-12-14 17:50:37 -05:00
HarmJ0y 7cdaa3c2d6 For ./Antivirus/ :
-PSScriptAnalyzering
    -Tweaking of synopsis blocks in order to support platyPS
    -Code standardization
    -Generated docs
2016-12-14 16:17:00 -05:00
HarmJ0y 85b374c05b -Fixes for PSScriptAnalyzer compatibility
-More error handling
2016-12-14 13:39:50 -05:00
HarmJ0y 07ccc07fc6 mods to Get-System for it to pass PSScriptAnalyzer 2016-12-14 13:10:37 -05:00
HarmJ0y 7964823e3f Added documentation for PowerUp 2016-12-14 11:53:29 -05:00
HarmJ0y 5da1774219 updated mkdocs.yml 2016-12-13 17:23:07 -05:00
HarmJ0y f00e3fc6c4 Added Set-DomainObjectOwner to modify an object's owner
Modified Convert-LDAPProperty to break out sections of ntsecuritydescriptor
2016-12-13 17:21:10 -05:00
HarmJ0y f4f5fb1460 Added Set-DomainUserPassword to reset a particular user's password.
Reformatted documentation.
2016-12-13 16:00:28 -05:00
HarmJ0y 813eab4a39 maybe now? 2016-12-12 22:18:16 -05:00
HarmJ0y b78f164440 someday I'll get this right... 2016-12-12 22:16:44 -05:00
HarmJ0y 9033f2f544 Another try at getting readthedocs.io working 2016-12-12 21:58:50 -05:00
HarmJ0y fb90773639 file extensions are important :) 2016-12-12 21:38:26 -05:00
HarmJ0y e956bf440f First commit of mkdocs.yml for readthedocs.io 2016-12-12 21:16:41 -05:00
HarmJ0y 0aaa23cd86 first take at platyPS doc generation 2016-12-12 21:05:08 -05:00
HarmJ0y 7f10db7827 Added spacing to prep for platyPS doc generation. 2016-12-12 21:00:43 -05:00
HarmJ0y 6aca12a956 Typo correction and Recon README.md update 2016-12-12 20:36:42 -05:00
HarmJ0y 32bd21e335 bug fix in Get-DomainSearcher 2016-12-12 19:02:26 -05:00
HarmJ0y 7c32bf69f3 -Complete ground-up rewrite of PowerView
-Lots of function cleanup/code rot removal and standardization
    -Additional options added to Get-DomainSearcher in order to support new param sets
    -Expanded parameter validation
    -XML help format standardized
    -PSScriptAnalyzer fixups- passes PS script analyzer now!
    -Nearly all functions should tag custom types to output objectsx
-Identity supported by all appropriate functions
-Transformed all filters to functions
-Expanded the formats for Convert-ADName
-Get-SPNTicket returns enc part automatically now, and Hashcat output format added
-Write-Verbose/Write-Warning/Throw messages now have the function name tagged in the message
-Verb-Domain* functions now all include a -FindOne function to return one result
-Get-DomainUserEvent now uses -XPathFilter for a massive speedup
-ALL Verb-Domain* (LDAP) functions now return full data objects (no more -FullData). Use -Properties for paring down.
-Lots of bug fixes
-"Required Dependencies" for each function completed
-Fixed logic bugs for -ComputerIdentity in Get-DomainGPO, now enumerates domain-linked GPOs as well
-Added -UserIdentity to Get-DomainGPO to enumerate GPOs applied to a given user identity

New function naming scheme with proper Verb-PrefixNoun syntax to better match the 'real' AD cmdlets:
    Verbs:
        Get     - retrieve full raw data sets
        Find    - 'find' specific data entries in a data set or execute threaded computer enumeration
        Add     - add a new object to a destination
        Set     - modify a given object
        Invoke  - lazy catch-all
    Prefixes now give an indication of the data source:
        Verb-DomainX    -   LDAP/.NET AD connections (e.g. Get-DomainUser)
        Verb-WMIX       -   Uses WMI for connections/enumeration of a specific host (e.g. Get-WMIRegLastLoggedOn)
        Verb-NetX       -   API access (e.g. Get-NetSession)
    Nouns have been renamed to be more descriptive
    Big gotcha:
        Get-NetLocalGroup - now returns local *groups* themselves
        Get-NetLocalGroupMember - returns local group *members* (old Get-NetLocalGroup)

-Parameter sets standardized - parameters shared as appropriate across functions
    -Identity -> replaces -UserName/-GroupName/etc. Accepts samAccountName, GUID, distinguishedName, SID
        -these can be used in tandem -> Get-DomainUser "S-1-5-21-890171859-3433809279-3366196753-1108","administrator"
    -Properties -> return only the specified properties (i.e. Get-DomainUser -Properties samAccountName,lastLogon
    -LDAPFilter replaces -Filter, -SearchBase replaces -ADSPath, -Server replaces -DomainController
    -ServerTimeLimit, -SearchScope, -Tombstone, -SecurityMasks added for most functions

All functions (as appropriate) now support -Credential:
    -Verb-Domain* (LDAP) functions use alternate creds for a DirectorySearcher through Get-DomainSearcher
    -COM methods (i.e. Convert-ADName) use appropriate initializations
    -Verb-WMI methods pass the -Credential through as appropriate
    -Verb-Net* (API) functions use Invoke-UserImpersonation/Invoke-RevertToSelf implicitly for token impersonation

Removed functions:
    Get-ComputerProperty, Get-UserProperty, Find-ComputerField, Find-UserField
    Get-NameField (translated to ValueFromPipelineByPropertyName calls)
    Invoke-DowngradeAccount - not used
    Add-NetUser - split into New-DomainUser/others
    Add-NetGroupUser - split into Add-DomainGroupMember/others
    New-GPOImmediateTask - inconsistent and better done manually
    Invoke-StealthUserHunter - combined into Find-DomainUserLocation
    Get-ExploitableSystem

Added helper functions:
    Get-PrincipalContext - helper to return a DirectoryServices.AccountManagement.PrincipalContext
    Get-ForestSchemaClass - returns the forest schema for a specified object class

Added exported functions:
    Add-RemoteConnection - 'mounts' a remote UNC path using WNetAddConnection2W
    Remove-RemoteConnection - 'unmounts' a remote UNC path using WNetCancelConnection2
    Invoke-UserImpersonation - creates a new "runas /netonly" type logon and impersonates the token in the current thread
    Invoke-RevertToSelf - reverts any token impersonation
    Invoke-Kerberoast - automates Kerberoasting
    Find-DomainObjectPropertyOutlier - finds user/group/computer objects in AD that have 'outlier' properties sets
    New-DomainUser - creates a new domain user
    New-DomainGroup - creates a new domain group
    Add-DomainGroupMember - adds a domain user (or group) to an existing domain group
    Get-NetLocalGroup - now returns local *groups* themselves
    Get-NetLocalGroupMember - returns local group *members* (old Get-NetLocalGroup)

Renamed functions (aliases created for old functions):
    Get-IPAddress -> Resolve-IPAddress
    Convert-NameToSid -> ConvertTo-SID
    Convert-SidToName -> ConvertFrom-SID
    Request-SPNTicket -> Get-DomainSPNTicket
    Get-DNSZone -> Get-DomainDNSZone
    Get-DNSRecord -> Get-DomainDNSRecord
    Get-NetDomain -> Get-Domain
    Get-NetDomainController -> Get-DomainController
    Get-NetForest -> Get-Forest
    Get-NetForestDomain -> Get-ForestDomain
    Get-NetForestCatalog -> Get-ForestGlobalCatalog
    Get-NetUser -> Get-DomainUser
    Get-UserEvent -> Get-DomainUserEvent
    Get-NetComputer -> Get-DomainComputer
    Get-ADObject -> Get-DomainObject
    Set-ADObject -> Set-DomainObject
    Get-ObjectAcl -> Get-DomainObjectAcl
    Add-ObjectAcl -> Add-DomainObjectAcl
    Invoke-ACLScanner -> Find-InterestingDomainAcl
    Get-GUIDMap -> Get-DomainGUIDMap
    Get-NetOU -> Get-DomainOU
    Get-NetSite -> Get-DomainSite
    Get-NetSubnet -> Get-DomainSubnet
    Get-NetGroup -> Get-DomainGroup
    Find-ManagedSecurityGroups -> Get-DomainManagedSecurityGroup
    Get-NetGroupMember -> Get-DomainGroupMember
    Get-NetFileServer -> Get-DomainFileServer
    Get-DFSshare -> Get-DomainDFSShare
    Get-NetGPO -> Get-DomainGPO
    Get-NetGPOGroup -> Get-DomainGPOLocalGroup
    Find-GPOLocation -> Get-DomainGPOUserLocalGroupMapping
    Find-GPOComputerAdmin -> Get-DomainGPOComputerLocalGroupMappin
    Get-LoggedOnLocal -> Get-RegLoggedOn
    Test-AdminAccess -> Invoke-CheckLocalAdminAccess
    Get-SiteName -> Get-NetComputerSiteName
    Get-Proxy -> Get-WMIRegProxy
    Get-LastLoggedOn -> Get-WMIRegLastLoggedOn
    Get-CachedRDPConnection -> Get-WMIRegCachedRDPConnection
    Get-RegistryMountedDrive -> Get-WMIRegMountedDrive
    Get-NetProcess -> Get-WMIProcess
    Invoke-ThreadedFunction -> New-ThreadedFunction
    Invoke-UserHunter -> Find-DomainUserLocation
    Invoke-ProcessHunter -> Find-DomainProcess
    Invoke-EventHunter -> Find-DomainUserEvent
    Invoke-ShareFinder -> Find-DomainShare
    Invoke-FileFinder -> Find-InterestingDomainShareFile
    Invoke-EnumerateLocalAdmin -> Find-DomainLocalGroupMember
    Get-NetDomainTrust -> Get-DomainTrust
    Get-NetForestTrust -> Get-ForestTrust
    Find-ForeignUser -> Get-DomainForeignUser
    Find-ForeignGroup -> Get-DomainForeignGroupMember
    Invoke-MapDomainTrust -> Get-DomainTrustMapping
2016-12-12 14:35:05 -05:00
HarmJ0y eae4695b13 PowerUp update:
-Standardized documentation, including adding output object types and required dependencies to all functions
-Added Get-ProcessTokenPrivilege to enumerate the current (or remote) process token privileges, replacing Get-CurrentUserTokenGroupSid
-Added Enable-Privilege to enable privileges using RtlAdjustPrivilege
-Added @enigma0x3's Invoke-WScriptUACBypass function
-Renamed Invoke-AllChecks to Invoke-PrivescAudit, added alias mapping
-Added tests for Get-ProcessTokenPrivilege, Enable-Privilege, and Invoke-WScriptUACBypass
-Renamed helper functions for consistency
-Passes PSScriptAnalyzer!
2016-12-12 14:25:20 -05:00
HarmJ0y 863699d97e typo fix for #179 2016-12-12 13:49:10 -05:00
HarmJ0y 031a7561c6 removed Pester test for non-exported Invoke-ThreadedFunction function 2016-12-12 13:30:07 -05:00
HarmJ0y 0939af5bb2 fixed little-endian encoding 2016-12-12 13:17:22 -05:00
HarmJ0y 422cd612f6 removed Set-MacAttribute Pester tests 2016-12-12 13:13:29 -05:00
HarmJ0y aa528b98c7 merge resolution 2016-12-01 21:40:05 -05:00
HarmJ0y 76447005f9 Merge pull request #200 from st3r30byt3/patch-2
Updated Get-ExploitableSystem
2016-12-01 21:32:47 -05:00
Antonio Quina 7b49e54eec Updated Get-ExploitableSystem
Removed *_netapi from Vista/2008 in Get-ExploitableSystem as they are not vulnerable
2016-12-01 09:19:54 +01:00
HarmJ0y 67dab8651c Merge pull request #187 from Meatballs1/filter_getnetfileservers
Add disabled and present searches to get-netfileservers
2016-12-01 01:03:38 -05:00
HarmJ0y 520bf436ce Merge pull request #174 from Meatballs1/securitygroups
Retrieve Security groups by default
2016-12-01 01:03:11 -05:00
Oddvar Moe de955ef270 Added Get-GPPAutologon.ps1 2016-11-21 20:16:02 +01:00
Matt Graeber 926979ad1a Updated to 2.1 20161029 OJ Edition
Address issue #190
2016-11-10 15:46:30 -08:00
Meatballs a70bbe6164 Add disabled and present searches to get-netfileservers 2016-11-01 14:11:44 +00:00
HarmJ0y 8c9c7c84fe Merge pull request #182 from monoxgas/dev
Service DACL false positive | Request-SPNTicket double hash
2016-09-26 17:44:55 -04:00