Commit Graph

452 Commits

Author SHA1 Message Date
HarmJ0y 01a289e972 Merge pull request #180 from machosec/EncPartParam
Added the EncPart param to Request-SPNTicket
2016-09-06 13:01:45 -07:00
Matan Hart 432cc017ba Add the EncPart param to Request-SPNTicket
Adds the ability to return the encrypted part of the ticket. 
This portion is the encrypted data that can be brute-forced with Kerberoast/Hashcat/JtR
2016-08-25 12:27:15 +03:00
HarmJ0y 869badc7f1 Merge pull request #168 from linuz/master
Added ability to specify domain controller to search (-Server parameter)
2016-07-19 12:55:22 -07:00
Dennis Maldonado 87630cac63 Added default value to parameter
Added default value to parameter and got rid of value check later in the code.

Added validation of -Server value to ensure it is not $Null or an empty string
2016-07-19 10:36:59 -05:00
Harmj0y 0cff698b35 Merge branch 'dev' of https://github.com/PowerShellMafia/PowerSploit into dev 2016-07-15 17:35:09 -04:00
Harmj0y 038adce56e type 2016-07-15 17:34:23 -04:00
Harmj0y b74e515198 Fix for issue #167 2016-07-15 17:33:04 -04:00
Matt Graeber 66c93f9317 Updated Invoke-Mimikatz to "2.1 alpha 20160711 (oe.eo) edition" 2016-07-15 14:28:55 -07:00
Matt Graeber fee3b4c642 #147 Bugfix: Invoke-Mimikatz
Invoke-Mimikatz was not not handling functions exported by ordinal.
Thank you @gentilkiwi for the suggested fix!
2016-07-15 14:28:55 -07:00
HarmJ0y 8d46d02099 Merge pull request #161 from joncave/batnewlines
PowerUp: Remove badly encoded new lines from .bat output
2016-07-15 14:14:21 -07:00
HarmJ0y e6391254d1 Merge pull request #160 from joncave/tokeninfo
PowerUp: Allocate enough space for TOKEN_GROUPS
2016-07-15 14:10:29 -07:00
HarmJ0y 28d118f987 Merge pull request #158 from joncave/groupsxml
PowerView: Fix Groups.xml parsing for multiple <Group>s
2016-07-15 14:07:42 -07:00
Dennis Maldonado 548b8864cf Added ability to specify domain controller to search (-Server parameter)
Added the ability for users to specify the domain controller that is searched, using the -Server parameter. The -Server parameter is optional and defaults to the user's current domain if not specified.
2016-06-30 08:46:08 -05:00
Jon Cave 9596f68274 PowerUp: Remove badly encoded new lines from .bat output
The current implementation results in a .bat like:

  @echo off\n
  start /b net user john Password123! /add && timeout /t 5 && net localgroup Administrators john /add\n
  start /b "" cmd /c del "%~f0"&exit /b

With literal "\n" strings at the end of the first two lines.

A new line in a PowerShell string should be "`n". However, an extra new
line isn't actually necessary in this case.
2016-06-30 10:12:27 +02:00
Jon Cave 9d2b9d7631 PowerUp: Allocate enough space for TOKEN_GROUPS
Make an initial call to GetTokenInformation() with a NULL buffer to get
the actual buffer size required. Prevents "The data area passed to a system
call is too small" error being thrown.
2016-06-30 09:00:31 +02:00
Jon Cave 325cc849d7 Use correct variable 2016-06-27 17:53:59 +02:00
Jon Cave 5a05a024b6 Fix Get-GroupsXML for multiple <Group> tags
Select all <Group> nodes and iterate through them, not just the root
<Groups> node.
2016-06-27 17:52:28 +02:00
Harmj0y 81ac124f22 Changed Get-NetGroup and Get-NetGroupMember to search for samaccountname instead of name 2016-06-24 16:51:16 -04:00
Harmj0y 3049211f53 Fixed Find-LocalAdminAccess to properly check for the object output from Invoke-CheckLocalAdminAccess...whoops 2016-06-24 16:11:20 -04:00
Harmj0y cd1e10b8fd Turned Get-GptTmpl and Get-GroupsXML into filters 2016-06-24 16:07:26 -04:00
HarmJ0y ac42eb8a69 Merge pull request #157 from Meatballs1/localgrouprecursion
Fix Get-NetLocalGroup Recursion for LocalGroups
2016-06-24 12:59:41 -07:00
Harmj0y 8dea905998 Fixed bug in Get-ModifiablePath that resulted in spaces being expanded to the current directory location
Fixed other logic bugs in Get-ModifiablePath
Fixed bug in Add-ServiceDacl when the [ServiceProcess.ServiceController] wasn't loaded yet by Get-Service
Error handling for Get-CachedGPPPassword
Changed some Write-Warnings to Write-Verbose
Updated Privesc Pester tests for PowerUp
2016-06-23 17:51:17 -04:00
Meatballs 3585c9b4ac Add missing parenthesis 2016-06-21 20:31:28 +01:00
Meatballs 7dfbb059e1 Check class type
Recurse if localgroup as well as domaingroup
Normalize output values to empty string
2016-06-21 20:29:40 +01:00
Harmj0y 4b40e8609c Fixed logic bugs in Find-GPOLocation and Find-GPOComputerAdmin 2016-06-14 18:23:52 -04:00
Harmj0y 31c2290d5e Fixed some Invoke-MapDomainTrust and Get-NetDomainTrust logic
Changed domain/forest Write-Warning's to Write-Verbose
2016-06-12 20:53:36 -04:00
Harmj0y 9cd0955c5d Cleaned up Get-NetGroup's logic a bit, removed filtering for primary group ID (i.e. domain users)
Modified Get-DomainSID to simplify
Changed group determination in Get-NetLocalGroup -API
Few optimizations to Find-ForeignUser and Find-ForeignGroup
Changed DNS resolution method for Invoke-UserHunter
Added 'PowerView.GPOLocalGroup' type to Find-GPOLocation
2016-06-12 19:37:17 -04:00
HarmJ0y 0f2bd1d7f3 Merge pull request #150 from breenmachine/dev
Fixed thread countdown timer in Invoke-ThreadedFunction, wasn't ever …
2016-06-12 16:17:17 -04:00
Stephen Breen 8270743fb1 Fixed thread countdown timer in Invoke-ThreadedFunction, wasn't ever killing rogue jobs 2016-06-11 00:26:40 -04:00
Harmj0y c53cd87d8f Fixed LDAP preference for when -ADSPath is passed to Get-NetDomainTrust
Fixed Get-DomainSID to allow for a -DomainController parameter
Fixed Get-NetDomainTrust logic
2016-06-08 01:35:33 -04:00
Harmj0y b5172c2bef Fixed a few GC bugs in Get-DomainSearcher
Added attempted gpcfilesyspath resolution to Get-NetGPO
Added -ADSPath for Get-NetDomainTrust
2016-06-08 00:44:24 -04:00
Harmj0y d37ec66c79 bug fixes/error handling in Get-NetGPOGroup for version 2 2016-06-07 15:36:39 -04:00
Harmj0y 5d7fe6b100 Corrected -Path parameter in Write-ServiceBinary 2016-06-07 13:00:14 -04:00
Harmj0y b6306a0d8c Small bug fix in Find-GPOLocation when enumerating all relationships
Moved GPOType check to Get-NetGPOGroup
Expanded comments and help for GPO location cmdlets
2016-06-06 21:37:36 -04:00
Harmj0y da86d76adb updated Privesc.psd1 and README.md 2016-06-06 15:43:01 -04:00
Harmj0y 5f8d8b0a10 Addded Get-CachedGPPPassword to PowerUp, based almost entirely on Get-GPPPassword.
Added Pester tests for Get-CachedGPPPassword.
2016-06-06 15:37:52 -04:00
Harmj0y f6ee5cb92e Rewrote/corrected logic for Get-NetGPOGroup, Find-GPOLocation, and Find-GPOComputerAdmin
Rewrote/corrected logic for Find-GPOLocation
Added Get-IniContent and rewrote Get-GptTmpl to use Get-IniContent to parse GptTmpl.inf files
Rewrote Get-GroupsXML to not resolve SIDs and return the same object type as Get-GptTmpl
2016-06-06 06:21:02 -04:00
HarmJ0y 5cbe3bac10 Merge pull request #148 from PowerShellMafia/powerup_psreflect
PowerUp PSReflect
2016-06-04 19:09:22 -07:00
Harmj0y e83cfae798 Get-ModifiablePath now also checks parent folders of files for modification
Bug fixes
Corrected PowerUp Pester tests
Changed 'Path' field to 'ModifiablePath' in 'Get-ModifiablePath'
Get-ServiceUnquoted now filters paths through Get-ModifiablePath
2016-06-04 22:06:21 -04:00
Harmj0y 4915945292 Renamed Get-RegistryAutoRun to Get-ModifiableRegistryAutoRun
Renamed Find-PathHijack to Find-PathDLLHijack
Fixed exposed functions in PowerSploit.psd1
2016-06-04 19:07:28 -04:00
Harmj0y 1b359e7875 Overhauled and completed PowerUp/Privesc Pester tests 2016-06-04 17:47:10 -04:00
Harmj0y 83d1413acd -Enum specification bug fix
-Additional error checking and documentation
-OpenProcessToken() call now uses TOKEN_QUERY instead of TOKEN_READ
2016-06-04 17:46:43 -04:00
Harmj0y 1f926e7fd6 Added SidAttributes enum, Get-CurrentUserTokenGroupSid now returns an object with SID and attributes fields 2016-06-03 23:37:52 -04:00
Harmj0y 09d253f070 Added Get-CurrentUserTokenGroupSid to enumerate all group SIDs the current user is a part of, regardless of being disabled.
Replaced 'whoami /groups' local admin + medium integrity check with comparison against Get-CurrentUserTokenGroupSid
2016-06-03 22:43:12 -04:00
Harmj0y 9711069b7e -Added ValueFromPipelineByPropertyName to Get-ModifiablePath to parse passed file objects
-Service functions now accept just -Name (instead of -Service/-ServiceName) that accepts has ValueFromPipelineByPropertyName set in order to handle service objects on the pipeline
-Moved PSReflect signatures to the bottom of the script
-Function and help cleanup
2016-06-03 19:03:11 -04:00
Harmj0y 8083c1e1bb Updated Privesc README.md and .psd1 to reflect the new PowerUp function names. 2016-06-02 02:14:38 -04:00
Harmj0y 3c209ee6b3 -Get-ModifiableFile renamed to Get-ModifiablePath
-Get-VulnSchTask renamed to Get-ModifiableScheduledTaskFile
-Get-VulnAutoRun renamed Get-RegistryAutoRun
-Get-RegAutoLogon renamed Get-RegistryAutoLogon
-Find-DLLHijack renamed to Find-ProcessDLLHijack for clarification, code cleaned up, -Process parameter added, output object detail expanded, and help expanded
-Removed most of the code from Find-PathHijack, replacing it with Get-ModifiablePath
-Cleaned up logic for Write-HijackDll
-Expanded help for the registry enumeration cmdlets
-Added local user creation options to Write-HijackDll to match Write-ServiceBinary
-Increased pause between user creation commands
2016-06-02 02:01:16 -04:00
Harmj0y a1ba3876b1 -Help expanded for Invoke-ServiceAbuse
-Fixed parameter sets for Write-ServiceBinary and added -Credential and -Service params
-Simplified/corrected logic for Install-ServiceBinary
-Fixed parameter sets and simplified logic for Restore-ServiceBinary
-Added sanity check with Get-ModifiableFile for Install-ServiceBinary
-Cleaned up lingering spaces
2016-06-02 00:00:35 -04:00
Harmj0y ecc96be81a -Removed Invoke-ServiceStart, Invoke-ServiceStop, Invoke-ServiceEnable, Invoke-ServiceDisable
-Renamed Get-ServiceFilePermission to Get-ModifiableServiceFile
-Renamed Get-ServicePermission Get-ModifiableService
-Integrated PSReflect codebase from @mattifestation
-Modified Get-ModifiableFile to enumerate the ACLs for passed file paths, returning the path/permission set/identityreference for each modifable file (instead of opening file for modification)
-Added Add-ServiceDacl from @mattifestation to add service Dacls to Get-Service objects
-Added Set-ServiceBinPath replace "sc.exe config SERVICE binPath= X" - now modifies using the ChangeServiceConfig Win32 API call
-Revamped Test-ServiceDaclPermission to take advantage of Add-ServiceDacl. Service permissions are now matched up against the current user's group memberships and specified permission sets to check for.
-Functions that checked for service restarting now use Test-ServiceDaclPermission
-Get-ModifiableService now uses Test-ServiceDaclPermission
-Invoke-ServiceAbuse completely rebuilt to use native PowerShell functions and Set-ServiceBinPath to reconfiguring service binary paths for abuse
-Parameter sets rewritten for several functions to accept -Credential objects were applicable and -Service objects from Get-Service on the pipeline

TODO: Tune up Write-ServiceBinary, Install-ServiceBinary, Restore-ServiceBinary, Find-DLLHijack, Find-PathHijack, Write-HijackDll, and all the registry checks
2016-06-01 19:03:18 -04:00
Harmj0y 5660218b38 Bug fix for Get-System for when a needed assembly isn't loaded. 2016-05-31 23:28:19 -04:00