aboutsummaryrefslogtreecommitdiff
path: root/Invoke-SMBEnum.ps1
AgeCommit message (Collapse)AuthorFilesLines
2018-05-08More targeting logic and bug fixesKevin Robertson1-9/+59
Added some more targeting logic. Added access denied handling for enumeration.
2018-05-02Inveigh-Relay and Invoke-SMBEnum group membership updatesKevin Robertson1-2/+45
Added ability to Inveigh-Relay and Invoke-SMBEnum to identify groups vs users when enumerating group memberships.
2018-05-01Inveigh-Relay new attack and targeting systemKevin Robertson1-1236/+1253
Inveigh-Relay 1. Added a new attack mode 'Enumerate'. This attack mode will leverage relayed connections to perform system enumeration. Right now I have local users, local admins, shares, and netsessions. 2. Attacks can now be combined. Session, Enumerate, and Execute can all be enabled at the same time. They will be chained together. 3. New multi-target system to replace the new multi-target system from the last dev update:) Inveigh-Relay will leverage the data gathered through enumeration to make relay target selections. Here's a simplistic example: a. Inveigh-Relay receives and incoming connection from 192.168.1.1 and relays the connection to 192.168.1.2. b. During the NTLM relay, the module records the user (test1) that is relayed from 192.168.1.1. c. The relayed connection is used to enumerate details on 192.168.1.2. The local admin group is found to include the user test2. d. test1 is found to not be privileged on 192.168.1.2. e. Inveigh-Relay receives an incoming connection from 192.168.1.3 and relays the connection to 192.168.1.4. f. During the NTLM relay, the module records the user (test2) that is relayed from 192.168.1.3. g. The relayed connection is used to enumerate details on 192.168.1.4. h. test2 is found to not be privileged on 192.168.1.4. i. Inveigh-Relay receives another connection from 192.168.1.3. j. Since test2 was previously observed on 192.168.1.3 and 192.168.1.2 has test2 in its local admin group, 192.168.1.2 is selected as a relay target. k. test2 is found to be privileged on 192.168.1.2. l. Depending on the attack selection, either a privileged session is established, a command is executed, or both. This is still in a very early stage and not production ready. I need to add a lot more logic to do things like prioritizing systems hosting shares with the session attack, etc. I also need to sort out gathering and importing the enumeration data used for targeting if you already have domain access. This will also open up making matches based on domain group membership. Bloodhound data should also work for targeting. I just need to work out how to match username formats, etc. Most of the enumeration data is stored in $inveigh.enumeration_list. 4. Target parameter will now accept CIDR and IP ranges. Invalid targets (as long as it's not a huge amount) are filtered out as part of the targeting process. 5. I took out SMB1 support. It only worked for command execution and removing it greatly simplifies things. The old version will still work if SMB1 is required. I should be back to regular updates leading up to the release of 1.4. The enumeration code took some time.
2018-03-26Updated Invoke-SMBEnumKevin Robertson1-1003/+2096
2018-03-01Added Invoke-SMBEnumKevin Robertson1-0/+2130
Dev version of Invoke-SMBEnum for performing enum tasks over SMB with PTH and Inveigh-Relay sessions. Right now it just enumerates shares, netsessions, and local users. Also fixed some minor Invoke-SMBClient and Invoke-SMBExec issues.