Merge pull request #24 from robert-todora/dev

Changed output format to make it more readable
This commit is contained in:
Robert Todora
2023-07-25 14:11:27 -05:00
committed by GitHub
4 changed files with 9 additions and 5 deletions
@@ -2,7 +2,7 @@
EnumerationScope = "ShareEnumeration"
RuleName = "KeepDollarShares"
MatchAction = "Snaffle"
Description = "Notifies the user that C$ or ADMIN$ is visible on file share, but doesn't actually scan inside it."
Description = "Notifies the user that C$ or ADMIN$ is visible, but doesn't actually scan inside the share."
MatchLocation = "ShareName"
WordListType = "Exact"
MatchLength = 0
+1
View File
@@ -65,6 +65,7 @@ def is_interest_share(share, rules: Rules):
for rule in rules.share_classifiers:
regex_rules = []
share_text = termcolor.colored("[Share]", 'yellow')
default_triage = termcolor.colored(f"{share}", 'green')
if rule['WordListType'] == "Regex":
regex_rules = rule['WordList']
for pattern in regex_rules:
+1 -1
View File
@@ -126,7 +126,7 @@ def begin_snaffle(options):
def access_ldap_server(ip, username, password):
log.info("Accessing LDAP Server")
# log.info("Accessing LDAP Server")
server = Server(ip, get_info=DSA)
try:
conn = Connection(server, username, password)
+6 -3
View File
@@ -1,6 +1,7 @@
import ntpath
import struct
import logging
import termcolor
from .errors import *
from impacket.nmb import NetBIOSError, NetBIOSTimeout
@@ -42,9 +43,11 @@ class SMBClient:
for i in range(len(resp)):
sharename = resp[i]['shi1_netname'][:-1]
remarkname = resp[i]['shi1_remark'][:-1]
# fullname = resp[i]
# print(fullname)
log.info(f'Found share {sharename} on {self.server}, remark {remarkname}')
# log.info(f'Found share {sharename} on {self.server}, remark {remarkname}')
share_text = termcolor.colored("[Share]", 'yellow')
print(share_text, termcolor.colored(f"{{Green}} \\\\{self.server}\\{sharename} ({remarkname})", 'green', 'on_white'))
# log.info(f'{self.server}: Share: {sharename}')
yield sharename