Commit Graph

407 Commits

Author SHA1 Message Date
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
Harmj0y 5b94a98dbd Merge branch 'dev' of https://github.com/PowerShellMafia/PowerSploit into dev 2016-05-31 23:19:18 -04:00
Harmj0y 848f7d31ce Corrected error checking for functions that used GetLastError
General errors are now parsed with [ComponentModel.Win32Exception] and written with Write-Verbose
Write-Debug calls converted to Write-Verbose or removed
2016-05-31 23:14:05 -04:00
Matt Graeber 235dec56ae Merge remote-tracking branch 'refs/remotes/origin/master' into dev 2016-05-29 08:00:08 -07:00
Matt Graeber 262a260865 Merge pull request #132 from pyllyukko/sch_hourly
Add hourly scheduled task persistence option
2016-05-29 07:57:30 -07:00
Matt Graeber 6b0ada999a Fixed FreeLibrary function signature #146
The parameter type and return types were accidentally transposed. Thanks
@rojaster for pointing this out.
2016-05-29 07:54:50 -07:00
Harmj0y 83305c5243 Combined Get-SiteListPassword.ps1 into PowerUp.ps1 2016-05-23 18:51:44 -04:00
Harmj0y c30c682797 Bug fix for issue #137 2016-05-23 18:36:46 -04:00
Harmj0y d0b21c0848 Updated functions in Recon.psd1 2016-05-22 14:41:05 -04:00
Harmj0y df2f92899a -Fixed bug in Get-NetGroupMember's ranged searching logic on PowerShell v3+
-Corrected parameter/variable scoping bug in several functions
-TODO: fix begin{} scoping issues in Find-InterestingFile, Invoke-UserHunter, Invoke-ProcessHunter, Invoke-EventHunter, Invoke-ShareFinder, Invoke-FileFinder, Find-LocalAdminAccess, Invoke-EnumerateLocalAdmin
-Other misc. fixes
2016-05-22 14:40:40 -04:00
Harmj0y b568271d57 Get-LoggedOnLocal now handles the situation when multiple SIDs are returned
Get-LoggedOnLocal turned into a filter and given additional error handling
Standardized tab/line spacing
Removed Invoke-PSLoggedOn
2016-05-22 14:07:37 -04:00
HarmJ0y 2e6c9392c9 Merge pull request #133 from breakersall/dev
Adds PSLoggedOn like functionality
2016-05-22 14:02:49 -04:00
HarmJ0y 666246362f Merge pull request #140 from Meatballs1/fix_groups_xml
PowerView - Fix Groups.xml Parsing
2016-05-18 11:10:18 -04:00
Harmj0y c89f0b9969 Logic bug fix in Get-NetDomainTrust 2016-05-13 01:11:47 -04:00
Harmj0y 7d3f0066ec Merge branch 'dev' of https://github.com/PowerShellMafia/PowerSploit into dev 2016-05-13 01:08:03 -04:00
Harmj0y 56824c1799 Get-NetDomainTrust now gets an -API option to enumerate trusts through DsEnumerateDomainTrusts()
Logic bug fix for Get-DNSZone
Bug fix for Get-NetLocalGroup
2016-05-13 01:07:24 -04:00
Meatballs 3e936765f5 Fix groupsxml parsing 2016-05-12 21:03:20 +01:00
Matt Graeber eec3704f40 Merge pull request #139 from sixdub/dev
Added Get-MicrophoneAudio.ps1 and associated Pester tests
2016-05-12 08:08:54 -07:00
sixdub debe4a565e Added Get-MicrophoneAudio.ps1 and associated Pester tests 2016-05-12 10:58:27 -04:00
HarmJ0y 30324b7c5e Merge pull request #135 from Meatballs1/trust_sids
Retrieve Domain SIDs with -LDAP
2016-05-09 21:24:57 -07:00
Harmj0y 7b4becfe72 Added Invoke-UserHunter field to keep output objects in sync. 2016-05-10 00:14:37 -04:00
HarmJ0y 31ed96d161 Merge pull request #136 from andyrobbins/dev
Added name resolution to custom PSObject generated by Invoke-UserHunter.
2016-05-09 21:12:42 -07:00
Andy Robbins 9f7906280d Added name resolution to custom PSObject generated by Invoke-UserHunter. 2016-05-10 00:01:38 -04:00
Harmj0y 6ada127538 Began adding custom PSObject TypeNames to various PowerView output objects. 2016-05-09 23:22:51 -04:00
Meatballs 6a39c26b06 Retrieve Domain SIDs with -LDAP 2016-05-09 22:24:23 +01:00
Matt Kelly 0cedaf6142 Adds PSLoggedOn like functionality
Adding in Get-LoggedOnLocal which uses HKU registry checks to see who
is logged locally to a remote box and only requires user level access
rights. The benefit over NetWkstaUserEnum is less user privileges
required (admin for NetWkstaUserEnum) and is the same process
PSLoggedOn uses.

Invoke-PSLoggedOn launches both Get-LoggedOnLocal and Get-NetSessions
and outputs the same format as PSLoggedOn.exe from Sysinternals.

I did not change Invoke-UserHunter non-stealth to this option yet, but
it is beneficial in that if you use both HKU and NetSessionEnum you
only require basic user level rights not admin remote.
2016-05-05 19:12:33 -05:00
Harmj0y 26cef85d35 Added Get-RegistryMountedDrive 2016-05-03 22:52:36 -04:00
Harmj0y fbf6f30833 Modified Convert-DNSRecord to return the base64 encoded record for record types not currently handled. 2016-04-27 19:11:49 -04:00
Harmj0y 1f90c29429 Added Get-DNSZone and Get-DNSRecord to enumerate AD DNS information.
Added Convert-DNSRecord (ported from Michael B. Smith's code at https://raw.githubusercontent.com/mmessano/PowerShell/master/dns-dump.ps1) - needs expansion work on record types
2016-04-27 18:42:51 -04:00
Harmj0y 68c446b9b9 Changed some property types in Get-ObjectACL 2016-04-25 19:52:39 -04:00
pyllyukko 75a37a0f17 Added ScheduledTaskHourly to New-UserPersistenceOption 2016-04-25 17:44:24 +03:00
Harmj0y 4cedfa1c30 added Request-SPNTicket to request kerberos tickets for specified SPNs 2016-04-24 10:56:07 -04:00
Harmj0y c52f9d712c For PowerView, added $Searcher.CacheResults = $False to Get-DomainSearcher
Added dispose() approach for the following cmdlets:
Get-NetUser, Get-ObjectAcl/Add-ObjectAcl, Get-GUIDMap, Get-NetComputer, Get-ADObject, Get-NetOU, Get-NetSite, Get-NetSubnet, Get-NetGroup, Get-NetGroupMember, Get-DFSshare, Get-NetGPO, Get-NetDomainTrust
2016-04-24 06:57:36 -04:00
HarmJ0y 7ed5343431 Merge pull request #128 from Meatballs1/fix_groups_xml
//Group -> //Groups
2016-04-24 12:17:48 +02:00
pyllyukko a6564f4483 Added ScheduledTaskHourly to New-ElevatedPersistenceOption 2016-04-16 17:03:17 +03:00
HarmJ0y 69a2cd1e33 Merge pull request #125 from leechristensen/patch-1
Change ComputerName default to the computer's name
2016-04-11 11:49:47 -07:00
leechristensen c8ff194089 Change ComputerName default to the computer's name
Change ComputerName default so Disabled doesn't report error
2016-04-11 11:02:31 +01:00
HarmJ0y 785f4757bd Merge pull request #122 from joncave/patch-1
Find-PathHijack: Expand environment variables in path
2016-04-08 12:59:01 -07:00
Meatballs 6daaef2706 //Group -> //Groups 2016-04-03 08:09:33 +01:00
Jon Cave 84b8e1da9a Find-PathHijack: Expand environment variables in path
Paths containing environment variables can cause false-positives to occur, e.g. `%SystemRoot%\system32\WindowsPowerShell\v1.0\`. `Find-PathHijack` will believe this is a relative path and will report it as hijackable if the current directory is writeable.
2016-03-20 21:28:22 +00:00
Harmj0y 37389e9658 Bug fix in Find-GPOLocation 2016-03-18 06:13:05 -04:00
Harmj0y 26a0757612 Added Get-SiteName to find the site a computer is a part of
Added -ComputerName parameter to Get-NetGPO to enumerate all GPOs a given computer has applied
Fixed bug in Find-GPOComputerAdmin and added site enumeration for GPO links
2016-03-15 15:13:32 -04:00
Harmj0y 13adf516d5 Moved admin check for Get-System to allow for RevToSelf 2016-03-15 15:13:02 -04:00
Harmj0y 6a17f759ab Added Get-System to Privesc/
Added Pester tests for Get-System
2016-03-11 17:45:46 -05:00
Harmj0y dee094a993 Additional error checking in Get-DFSshare 2016-03-11 16:37:14 -05:00
HarmJ0y dedd805eaa Merge pull request #118 from Meatballs1/dfs_v1_pkt
Parse DFSv1 PKT
2016-03-11 13:35:14 -08:00