forked from EmpireProject/Empire
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request EmpireProject#29 from PowerShellEmpire/mimikatz_8_…
…15_update2 Mimikatz 8 15 update2
- Loading branch information
Showing
23 changed files
with
166 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
lib/modules/situational_awareness/network/get_domaintrusts.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
from lib.common import helpers | ||
|
||
class Module: | ||
|
||
def __init__(self, mainMenu, params=[]): | ||
|
||
self.info = { | ||
'Name': 'Get-NetDomainTrusts', | ||
|
||
'Author': ['@harmj0y'], | ||
|
||
'Description': ('Return all domain trusts for the current domain or ' | ||
'a specified domain. Part of PowerView.'), | ||
|
||
'Background' : True, | ||
|
||
'OutputExtension' : None, | ||
|
||
'NeedsAdmin' : False, | ||
|
||
'OpsecSafe' : True, | ||
|
||
'MinPSVersion' : '2', | ||
|
||
'Comments': [ | ||
'https://github.com/PowerShellEmpire/PowerTools/tree/master/PowerView' | ||
] | ||
} | ||
|
||
# any options needed by the module, settable during runtime | ||
self.options = { | ||
# format: | ||
# value_name : {description, required, default_value} | ||
'Agent' : { | ||
'Description' : 'Agent to run module on.', | ||
'Required' : True, | ||
'Value' : '' | ||
}, | ||
'Domain' : { | ||
'Description' : 'Specific domain to query for trusts, defaults to current.', | ||
'Required' : False, | ||
'Value' : '' | ||
}, | ||
'LDAP' : { | ||
'Description' : 'Switch. Use LDAP for domain queries (less accurate).', | ||
'Required' : False, | ||
'Value' : '' | ||
} | ||
} | ||
|
||
# save off a copy of the mainMenu object to access external functionality | ||
# like listeners/agent handlers/etc. | ||
self.mainMenu = mainMenu | ||
|
||
for param in params: | ||
# parameter format is [Name, Value] | ||
option, value = param | ||
if option in self.options: | ||
self.options[option]['Value'] = value | ||
|
||
|
||
def generate(self): | ||
|
||
# read in the common module source code | ||
moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/network/Invoke-MapDomainTrusts.ps1" | ||
|
||
try: | ||
f = open(moduleSource, 'r') | ||
except: | ||
print helpers.color("[!] Could not read module source path at: " + str(moduleSource)) | ||
return "" | ||
|
||
moduleCode = f.read() | ||
f.close() | ||
|
||
script = moduleCode | ||
|
||
if self.options['LDAP']['Value'].lower() == "true": | ||
script += "Get-NetDomainTrustsLDAP | Out-String | %{$_ + \"`n\"};" | ||
else: | ||
script += "Get-NetDomainTrusts | Out-String | %{$_ + \"`n\"};" | ||
|
||
return script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters