Commit Graph

458 Commits

Author SHA1 Message Date
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
Nick Landers 8e41548e65 Break on ticket capture 2016-09-13 16:59:03 -06:00
Nick Landers 5ac6c919dd Service DACL false positive 2016-09-13 15:43:34 -06:00
HarmJ0y 5e2200bab7 Merge pull request #173 from joncave/user_polling
PowerView: Invoke-UserHunter -Poll
2016-09-06 13:45:45 -07:00
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
Jon Cave 9b365e82b1 Continuously collect output from background threads
The PowerShell.BeginInvoke<TInput, TOutput>(PSDataCollection<TInput>,
 PSDataCollection<TOutput>) method[1] is used to collect output from
each job into a buffer. This can be read whilst the jobs are still
running. Being able to return partial results is particularly useful for
long running background threads, such as Invoke-UserHunter -Poll.

PowerShell 2.0 doesn't play nicely with generic methods. The technique
described in [2] is used to allow this version of BeginInvoke() to be
used.

[1] https://msdn.microsoft.com/en-us/library/dd182440(v=vs.85).aspx
[2] http://www.leeholmes.com/blog/2007/06/19/invoking-generic-methods-on-non-generic-classes-in-powershell/
2016-08-13 12:14:35 +01:00
Jon Cave fda456338f Add a polling mode to Invoke-UserHunter
Repeatedly poll a set of target computers for user sessions. This could
be a useful technique for building a much better picture of current
sessions, but without having to communicate with every host.

The -Poll parameter is used to specify the duration for which polling
should occur. Each target computer is dedicated with a thread with
-Delay and -Jitter specifying how long to sleep between each session
enumeration attempt of an individual host.
2016-08-13 12:00:44 +01: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