dploot 2.6.0__tar.gz → 2.6.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dploot-2.6.0 → dploot-2.6.2}/LICENSE +1 -1
- {dploot-2.6.0 → dploot-2.6.2}/PKG-INFO +1 -1
- {dploot-2.6.0 → dploot-2.6.2}/dploot/action/browser.py +1 -1
- {dploot-2.6.0 → dploot-2.6.2}/dploot/action/certificates.py +1 -1
- {dploot-2.6.0 → dploot-2.6.2}/dploot/action/credentials.py +1 -1
- {dploot-2.6.0 → dploot-2.6.2}/dploot/action/machinecertificates.py +1 -1
- {dploot-2.6.0 → dploot-2.6.2}/dploot/action/machinecredentials.py +1 -1
- {dploot-2.6.0 → dploot-2.6.2}/dploot/action/machinetriage.py +1 -3
- {dploot-2.6.0 → dploot-2.6.2}/dploot/action/machinevaults.py +1 -1
- {dploot-2.6.0 → dploot-2.6.2}/dploot/action/masterkeys.py +5 -5
- {dploot-2.6.0 → dploot-2.6.2}/dploot/action/rdg.py +1 -1
- {dploot-2.6.0 → dploot-2.6.2}/dploot/action/sccm.py +1 -8
- {dploot-2.6.0 → dploot-2.6.2}/dploot/action/triage.py +1 -2
- {dploot-2.6.0 → dploot-2.6.2}/dploot/action/vaults.py +1 -1
- {dploot-2.6.0 → dploot-2.6.2}/dploot/action/wifi.py +1 -2
- {dploot-2.6.0 → dploot-2.6.2}/dploot/entry.py +3 -2
- {dploot-2.6.0 → dploot-2.6.2}/dploot/lib/crypto.py +4 -4
- {dploot-2.6.0 → dploot-2.6.2}/dploot/lib/dpapi.py +2 -2
- {dploot-2.6.0 → dploot-2.6.2}/dploot/lib/smb.py +2 -3
- {dploot-2.6.0 → dploot-2.6.2}/dploot/lib/utils.py +3 -3
- {dploot-2.6.0 → dploot-2.6.2}/dploot/lib/wmi.py +0 -3
- {dploot-2.6.0 → dploot-2.6.2}/dploot/triage/browser.py +37 -1
- {dploot-2.6.0 → dploot-2.6.2}/dploot/triage/certificates.py +2 -2
- {dploot-2.6.0 → dploot-2.6.2}/dploot/triage/sccm.py +7 -12
- {dploot-2.6.0 → dploot-2.6.2}/dploot/triage/vaults.py +0 -1
- {dploot-2.6.0 → dploot-2.6.2}/dploot/triage/wifi.py +1 -1
- {dploot-2.6.0 → dploot-2.6.2}/pyproject.toml +1 -1
- {dploot-2.6.0 → dploot-2.6.2}/README.md +0 -0
- {dploot-2.6.0 → dploot-2.6.2}/dploot/__init__.py +0 -0
- {dploot-2.6.0 → dploot-2.6.2}/dploot/action/__init__.py +0 -0
- {dploot-2.6.0 → dploot-2.6.2}/dploot/action/backupkey.py +0 -0
- {dploot-2.6.0 → dploot-2.6.2}/dploot/action/machinemasterkeys.py +0 -0
- {dploot-2.6.0 → dploot-2.6.2}/dploot/lib/__init__.py +0 -0
- {dploot-2.6.0 → dploot-2.6.2}/dploot/lib/target.py +0 -0
- {dploot-2.6.0 → dploot-2.6.2}/dploot/triage/__init__.py +0 -0
- {dploot-2.6.0 → dploot-2.6.2}/dploot/triage/backupkey.py +0 -0
- {dploot-2.6.0 → dploot-2.6.2}/dploot/triage/credentials.py +0 -0
- {dploot-2.6.0 → dploot-2.6.2}/dploot/triage/masterkeys.py +0 -0
- {dploot-2.6.0 → dploot-2.6.2}/dploot/triage/rdg.py +0 -0
|
@@ -7,7 +7,7 @@ from dploot.action.masterkeys import add_masterkeys_argument_group, parse_master
|
|
|
7
7
|
|
|
8
8
|
from dploot.lib.smb import DPLootSMBConnection
|
|
9
9
|
from dploot.lib.target import Target, add_target_argument_group
|
|
10
|
-
from dploot.lib.utils import handle_outputdir_option
|
|
10
|
+
from dploot.lib.utils import handle_outputdir_option
|
|
11
11
|
from dploot.triage.browser import BrowserTriage
|
|
12
12
|
from dploot.triage.masterkeys import MasterkeysTriage, parse_masterkey_file
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ from dploot.action.masterkeys import add_masterkeys_argument_group, parse_master
|
|
|
7
7
|
|
|
8
8
|
from dploot.lib.smb import DPLootSMBConnection
|
|
9
9
|
from dploot.lib.target import Target, add_target_argument_group
|
|
10
|
-
from dploot.lib.utils import handle_outputdir_option
|
|
10
|
+
from dploot.lib.utils import handle_outputdir_option
|
|
11
11
|
from dploot.triage.certificates import CertificatesTriage
|
|
12
12
|
from dploot.triage.masterkeys import MasterkeysTriage, parse_masterkey_file
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ from dploot.action.masterkeys import add_masterkeys_argument_group, parse_master
|
|
|
7
7
|
|
|
8
8
|
from dploot.lib.smb import DPLootSMBConnection
|
|
9
9
|
from dploot.lib.target import Target, add_target_argument_group
|
|
10
|
-
from dploot.lib.utils import handle_outputdir_option
|
|
10
|
+
from dploot.lib.utils import handle_outputdir_option
|
|
11
11
|
from dploot.triage.credentials import CredentialsTriage
|
|
12
12
|
from dploot.triage.masterkeys import MasterkeysTriage, parse_masterkey_file
|
|
13
13
|
|
|
@@ -6,7 +6,7 @@ from typing import Callable, Tuple
|
|
|
6
6
|
|
|
7
7
|
from dploot.lib.smb import DPLootSMBConnection
|
|
8
8
|
from dploot.lib.target import Target, add_target_argument_group
|
|
9
|
-
from dploot.lib.utils import handle_outputdir_option
|
|
9
|
+
from dploot.lib.utils import handle_outputdir_option
|
|
10
10
|
from dploot.triage.certificates import CertificatesTriage
|
|
11
11
|
from dploot.triage.masterkeys import MasterkeysTriage, parse_masterkey_file
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@ from typing import Callable, Tuple
|
|
|
6
6
|
|
|
7
7
|
from dploot.lib.smb import DPLootSMBConnection
|
|
8
8
|
from dploot.lib.target import Target, add_target_argument_group
|
|
9
|
-
from dploot.lib.utils import handle_outputdir_option
|
|
9
|
+
from dploot.lib.utils import handle_outputdir_option
|
|
10
10
|
from dploot.triage.credentials import CredentialsTriage
|
|
11
11
|
from dploot.triage.masterkeys import MasterkeysTriage, parse_masterkey_file
|
|
12
12
|
|
|
@@ -6,12 +6,10 @@ from typing import Callable, Tuple
|
|
|
6
6
|
|
|
7
7
|
from dploot.lib.smb import DPLootSMBConnection
|
|
8
8
|
from dploot.lib.target import Target, add_target_argument_group
|
|
9
|
-
from dploot.lib.utils import handle_outputdir_option
|
|
10
|
-
from dploot.triage.browser import BrowserTriage
|
|
9
|
+
from dploot.lib.utils import handle_outputdir_option
|
|
11
10
|
from dploot.triage.certificates import CertificatesTriage
|
|
12
11
|
from dploot.triage.credentials import CredentialsTriage
|
|
13
12
|
from dploot.triage.masterkeys import MasterkeysTriage, parse_masterkey_file
|
|
14
|
-
from dploot.triage.rdg import RDGTriage
|
|
15
13
|
from dploot.triage.vaults import VaultsTriage
|
|
16
14
|
|
|
17
15
|
NAME = 'machinetriage'
|
|
@@ -6,7 +6,7 @@ from typing import Callable, Tuple
|
|
|
6
6
|
|
|
7
7
|
from dploot.lib.smb import DPLootSMBConnection
|
|
8
8
|
from dploot.lib.target import Target, add_target_argument_group
|
|
9
|
-
from dploot.lib.utils import handle_outputdir_option
|
|
9
|
+
from dploot.lib.utils import handle_outputdir_option
|
|
10
10
|
|
|
11
11
|
from dploot.triage.masterkeys import MasterkeysTriage, parse_masterkey_file
|
|
12
12
|
from dploot.triage.vaults import VaultsTriage
|
|
@@ -2,11 +2,11 @@ import argparse
|
|
|
2
2
|
import logging
|
|
3
3
|
import os
|
|
4
4
|
import sys
|
|
5
|
-
from typing import Callable, Dict,
|
|
5
|
+
from typing import Callable, Dict, Tuple
|
|
6
6
|
|
|
7
7
|
from dploot.lib.smb import DPLootSMBConnection
|
|
8
8
|
from dploot.lib.target import Target, add_target_argument_group
|
|
9
|
-
from dploot.lib.utils import handle_outputdir_option, parse_file_as_dict
|
|
9
|
+
from dploot.lib.utils import handle_outputdir_option, parse_file_as_dict
|
|
10
10
|
from dploot.triage.masterkeys import MasterkeysTriage
|
|
11
11
|
|
|
12
12
|
|
|
@@ -78,21 +78,21 @@ def entry(options: argparse.Namespace) -> None:
|
|
|
78
78
|
|
|
79
79
|
def parse_masterkeys_options(options: argparse.Namespace, target: Target) -> Tuple[bytes,Dict[str,str],Dict[str,str]]:
|
|
80
80
|
pvkbytes = passwords = nthashes = None
|
|
81
|
-
if options.pvk is not None:
|
|
81
|
+
if hasattr(options,'pvk') and options.pvk is not None:
|
|
82
82
|
try:
|
|
83
83
|
pvkbytes = open(options.pvk, 'rb').read()
|
|
84
84
|
except Exception as e:
|
|
85
85
|
logging.error(str(e))
|
|
86
86
|
sys.exit(1)
|
|
87
87
|
|
|
88
|
-
if options.passwords is not None:
|
|
88
|
+
if hasattr(options,'passwords') and options.passwords is not None:
|
|
89
89
|
try:
|
|
90
90
|
passwords = parse_file_as_dict(options.passwords)
|
|
91
91
|
except Exception as e:
|
|
92
92
|
logging.error(str(e))
|
|
93
93
|
sys.exit(1)
|
|
94
94
|
|
|
95
|
-
if options.nthashes is not None:
|
|
95
|
+
if hasattr(options,'nthashes') and options.nthashes is not None:
|
|
96
96
|
try:
|
|
97
97
|
nthashes = parse_file_as_dict(options.nthashes)
|
|
98
98
|
except Exception as e:
|
|
@@ -7,7 +7,7 @@ from dploot.action.masterkeys import add_masterkeys_argument_group, parse_master
|
|
|
7
7
|
|
|
8
8
|
from dploot.lib.smb import DPLootSMBConnection
|
|
9
9
|
from dploot.lib.target import Target, add_target_argument_group
|
|
10
|
-
from dploot.lib.utils import handle_outputdir_option
|
|
10
|
+
from dploot.lib.utils import handle_outputdir_option
|
|
11
11
|
from dploot.triage.masterkeys import MasterkeysTriage, parse_masterkey_file
|
|
12
12
|
from dploot.triage.rdg import RDGTriage
|
|
13
13
|
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import argparse
|
|
2
2
|
import logging
|
|
3
|
-
import os
|
|
4
3
|
import sys
|
|
5
4
|
from typing import Callable, Tuple
|
|
6
|
-
from dploot.action.masterkeys import add_masterkeys_argument_group, parse_masterkeys_options
|
|
7
5
|
|
|
8
6
|
from dploot.lib.smb import DPLootSMBConnection
|
|
9
7
|
from dploot.lib.target import Target, add_target_argument_group
|
|
10
|
-
from dploot.lib.utils import handle_outputdir_option
|
|
8
|
+
from dploot.lib.utils import handle_outputdir_option
|
|
11
9
|
from dploot.triage.masterkeys import MasterkeysTriage, parse_masterkey_file
|
|
12
10
|
from dploot.triage.sccm import SCCMTriage
|
|
13
11
|
|
|
@@ -24,7 +22,6 @@ class SCCMAction:
|
|
|
24
22
|
self._users = None
|
|
25
23
|
self.outputdir = None
|
|
26
24
|
self.masterkeys = None
|
|
27
|
-
self.pvkbytes = None
|
|
28
25
|
|
|
29
26
|
self.outputdir = handle_outputdir_option(dir= self.options.export_sccm)
|
|
30
27
|
|
|
@@ -35,8 +32,6 @@ class SCCMAction:
|
|
|
35
32
|
logging.error(str(e))
|
|
36
33
|
sys.exit(1)
|
|
37
34
|
|
|
38
|
-
self.pvkbytes, self.passwords, self.nthashes = parse_masterkeys_options(self.options, self.target)
|
|
39
|
-
|
|
40
35
|
def connect(self) -> None:
|
|
41
36
|
self.conn = DPLootSMBConnection(self.target)
|
|
42
37
|
if self.conn.connect() is None:
|
|
@@ -103,8 +98,6 @@ def add_subparser(subparsers: argparse._SubParsersAction) -> Tuple[str, Callable
|
|
|
103
98
|
),
|
|
104
99
|
)
|
|
105
100
|
|
|
106
|
-
add_masterkeys_argument_group(group)
|
|
107
|
-
|
|
108
101
|
group.add_argument(
|
|
109
102
|
"-export-sccm",
|
|
110
103
|
action="store",
|
|
@@ -7,8 +7,7 @@ from dploot.action.masterkeys import add_masterkeys_argument_group, parse_master
|
|
|
7
7
|
|
|
8
8
|
from dploot.lib.smb import DPLootSMBConnection
|
|
9
9
|
from dploot.lib.target import Target, add_target_argument_group
|
|
10
|
-
from dploot.lib.utils import handle_outputdir_option
|
|
11
|
-
from dploot.triage.browser import BrowserTriage
|
|
10
|
+
from dploot.lib.utils import handle_outputdir_option
|
|
12
11
|
from dploot.triage.certificates import CertificatesTriage
|
|
13
12
|
from dploot.triage.credentials import CredentialsTriage
|
|
14
13
|
from dploot.triage.masterkeys import MasterkeysTriage, parse_masterkey_file
|
|
@@ -7,7 +7,7 @@ from dploot.action.masterkeys import add_masterkeys_argument_group, parse_master
|
|
|
7
7
|
|
|
8
8
|
from dploot.lib.smb import DPLootSMBConnection
|
|
9
9
|
from dploot.lib.target import Target, add_target_argument_group
|
|
10
|
-
from dploot.lib.utils import handle_outputdir_option
|
|
10
|
+
from dploot.lib.utils import handle_outputdir_option
|
|
11
11
|
from dploot.triage.masterkeys import MasterkeysTriage, parse_masterkey_file
|
|
12
12
|
from dploot.triage.vaults import VaultsTriage
|
|
13
13
|
|
|
@@ -3,11 +3,10 @@ import logging
|
|
|
3
3
|
import os
|
|
4
4
|
import sys
|
|
5
5
|
from typing import Callable, Tuple
|
|
6
|
-
from dploot.action.masterkeys import add_masterkeys_argument_group, parse_masterkeys_options
|
|
7
6
|
|
|
8
7
|
from dploot.lib.smb import DPLootSMBConnection
|
|
9
8
|
from dploot.lib.target import Target, add_target_argument_group
|
|
10
|
-
from dploot.lib.utils import handle_outputdir_option
|
|
9
|
+
from dploot.lib.utils import handle_outputdir_option
|
|
11
10
|
from dploot.triage.masterkeys import MasterkeysTriage, parse_masterkey_file
|
|
12
11
|
from dploot.triage.wifi import WifiTriage
|
|
13
12
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import argparse
|
|
2
|
+
import importlib.metadata
|
|
2
3
|
import logging
|
|
3
4
|
import sys
|
|
4
5
|
import traceback
|
|
@@ -44,8 +45,8 @@ ENTRY_PARSERS = [
|
|
|
44
45
|
|
|
45
46
|
def main() -> None:
|
|
46
47
|
logger.init()
|
|
47
|
-
|
|
48
|
-
parser = argparse.ArgumentParser(description="DPAPI looting remotely in Python", add_help=True)
|
|
48
|
+
version = importlib.metadata.version("dploot")
|
|
49
|
+
parser = argparse.ArgumentParser(description=f"DPAPI looting remotely in Python.\nVersion {version}", add_help=True)
|
|
49
50
|
|
|
50
51
|
parser.add_argument("-debug", action="store_true", help="Turn DEBUG output ON")
|
|
51
52
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from binascii import hexlify
|
|
1
|
+
from binascii import hexlify
|
|
2
2
|
from hashlib import pbkdf2_hmac
|
|
3
3
|
from Cryptodome.Cipher import AES
|
|
4
4
|
from Cryptodome.Hash import HMAC, SHA1, MD4
|
|
@@ -221,9 +221,9 @@ def pvkblob_to_pkcs1(key):
|
|
|
221
221
|
modulus = bytes_to_long(key['modulus'][::-1]) # n
|
|
222
222
|
prime1 = bytes_to_long(key['prime1'][::-1]) # p
|
|
223
223
|
prime2 = bytes_to_long(key['prime2'][::-1]) # q
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
224
|
+
_ = bytes_to_long(key['exponent1'][::-1])
|
|
225
|
+
_ = bytes_to_long(key['exponent2'][::-1])
|
|
226
|
+
_ = bytes_to_long(key['coefficient'][::-1])
|
|
227
227
|
privateExp = bytes_to_long(key['privateExponent'][::-1]) # d
|
|
228
228
|
pubExp = int(key['pubexp']) # e
|
|
229
229
|
# RSA.Integer(prime2).inverse(prime1) # u
|
|
@@ -8,7 +8,7 @@ from Cryptodome.Util.Padding import unpad
|
|
|
8
8
|
from Cryptodome.Hash import HMAC
|
|
9
9
|
|
|
10
10
|
from impacket.uuid import bin_to_string
|
|
11
|
-
from impacket.dpapi import MasterKeyFile, MasterKey,
|
|
11
|
+
from impacket.dpapi import MasterKeyFile, MasterKey, DomainKey, DPAPI_BLOB, \
|
|
12
12
|
CREDENTIAL_BLOB, VAULT_VCRD, VAULT_VPOL, VAULT_KNOWN_SCHEMAS, VAULT_VPOL_KEYS, \
|
|
13
13
|
PVK_FILE_HDR, PRIVATE_KEY_BLOB, ALGORITHMS_DATA, privatekeyblob_to_pkcs1, DPAPI_DOMAIN_RSA_MASTER_KEY, CredentialFile
|
|
14
14
|
|
|
@@ -19,7 +19,7 @@ def decrypt_masterkey(masterkey:bytes, domain_backupkey:bytes= None, dpapi_syste
|
|
|
19
19
|
return None
|
|
20
20
|
data = masterkey
|
|
21
21
|
mkf = MasterKeyFile(data)
|
|
22
|
-
dk = mk =
|
|
22
|
+
dk = mk = bkmk = None
|
|
23
23
|
data = data[len(mkf):]
|
|
24
24
|
if mkf['MasterKeyLen'] > 0:
|
|
25
25
|
mk = MasterKey(data[:mkf['MasterKeyLen']])
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import socket
|
|
2
|
-
import sys
|
|
3
2
|
import ntpath
|
|
4
3
|
import logging
|
|
5
4
|
import time
|
|
@@ -114,14 +113,14 @@ class DPLootSMBConnection:
|
|
|
114
113
|
path = ntpath.join(path, '*')
|
|
115
114
|
try:
|
|
116
115
|
return self.smb_session.listPath(shareName=share, path=ntpath.normpath(path))
|
|
117
|
-
except :
|
|
116
|
+
except Exception:
|
|
118
117
|
return None
|
|
119
118
|
|
|
120
119
|
def is_admin(self) -> bool:
|
|
121
120
|
try:
|
|
122
121
|
self.smb_session.connectTree('C$')
|
|
123
122
|
is_admin = True
|
|
124
|
-
except:
|
|
123
|
+
except Exception:
|
|
125
124
|
is_admin = False
|
|
126
125
|
pass
|
|
127
126
|
return is_admin
|
|
@@ -55,7 +55,7 @@ def parse_file_as_dict(filename: str) -> Dict[str,str]:
|
|
|
55
55
|
arr = dict()
|
|
56
56
|
with open(filename, 'r') as lines:
|
|
57
57
|
for line in lines:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
arr[
|
|
58
|
+
tmp_line = line.rstrip('\n')
|
|
59
|
+
tmp_line = tmp_line.split(':',1)
|
|
60
|
+
arr[tmp_line[0]]=tmp_line[1]
|
|
61
61
|
return arr
|
|
@@ -11,7 +11,6 @@ from dploot.lib.dpapi import decrypt_blob, find_masterkey_for_blob
|
|
|
11
11
|
from dploot.lib.smb import DPLootSMBConnection
|
|
12
12
|
from dploot.lib.target import Target
|
|
13
13
|
from dploot.lib.utils import datetime_to_time
|
|
14
|
-
from dploot.lib.wmi import DPLootWmiExec
|
|
15
14
|
from dploot.triage.masterkeys import Masterkey
|
|
16
15
|
from dataclasses import dataclass
|
|
17
16
|
|
|
@@ -60,12 +59,29 @@ class Cookie:
|
|
|
60
59
|
def dump_quiet(self) -> None:
|
|
61
60
|
print("[%s] %s%s - %s:%s" % (self.browser.upper(), self.host, self.path, self.cookie_name, self.cookie_value))
|
|
62
61
|
|
|
62
|
+
@dataclass
|
|
63
|
+
class GoogleRefreshToken:
|
|
64
|
+
winuser: str
|
|
65
|
+
browser: str
|
|
66
|
+
service: str
|
|
67
|
+
token: str
|
|
68
|
+
|
|
69
|
+
def dump(self) -> None:
|
|
70
|
+
print('[%s - GOOGLE REFRESH TOKEN]' % self.browser.upper())
|
|
71
|
+
print('Service:\t%s' % self.service)
|
|
72
|
+
print('Token:\t\t%s' % self.token)
|
|
73
|
+
print()
|
|
74
|
+
|
|
75
|
+
def dump_quiet(self) -> None:
|
|
76
|
+
print("[%s] GRT %s:%s" % (self.browser.upper(), self.service, self.token))
|
|
77
|
+
|
|
63
78
|
class BrowserTriage:
|
|
64
79
|
|
|
65
80
|
false_positive = ['.','..', 'desktop.ini','Public','Default','Default User','All Users']
|
|
66
81
|
user_google_chrome_generic_login_path = {
|
|
67
82
|
'aesStateKeyPath':'Users\\%s\\AppData\\Local\\Google\\Chrome\\User Data\\Local State',
|
|
68
83
|
'loginDataPath':'Users\\%s\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Login Data',
|
|
84
|
+
'webDataPath':'Users\\%s\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Web Data',
|
|
69
85
|
'cookiesDataPath':[
|
|
70
86
|
'Users\\%s\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Cookies',
|
|
71
87
|
'Users\\%s\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Network\\Cookies'
|
|
@@ -74,6 +90,7 @@ class BrowserTriage:
|
|
|
74
90
|
user_msedge_generic_login_path = {
|
|
75
91
|
'aesStateKeyPath':'Users\\%s\\AppData\\Local\\Microsoft\\Edge\\User Data\\Local State',
|
|
76
92
|
'loginDataPath':'Users\\%s\\AppData\\Local\\Microsoft\\Edge\\User Data\\Default\\Login Data',
|
|
93
|
+
'webDataPath':'Users\\%s\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Web Data',
|
|
77
94
|
'cookiesDataPath':[
|
|
78
95
|
'Users\\%s\\AppData\\Local\\Microsoft\\Edge\\User Data\\Default\\Cookies',
|
|
79
96
|
'Users\\%s\\AppData\\Local\\Microsoft\\Edge\\User Data\\Default\\Network\\Cookies'
|
|
@@ -82,6 +99,7 @@ class BrowserTriage:
|
|
|
82
99
|
user_brave_generic_login_path = {
|
|
83
100
|
'aesStateKeyPath':'Users\\%s\\AppData\\Local\\BraveSoftware\\Brave-Browser\\User Data\\Local State',
|
|
84
101
|
'loginDataPath':'Users\\%s\\AppData\\Local\\BraveSoftware\\Brave-Browser\\User Data\\Default\\Login Data',
|
|
102
|
+
'webDataPath':'Users\\%s\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Web Data',
|
|
85
103
|
'cookiesDataPath':[
|
|
86
104
|
'Users\\%s\\AppData\\Local\\BraveSoftware\\Brave-Browser\\User Data\\Default\\Cookies',
|
|
87
105
|
'Users\\%s\\AppData\\Local\\BraveSoftware\\Brave-Browser\\User Data\\Default\\Network\\Cookies'
|
|
@@ -185,6 +203,24 @@ class BrowserTriage:
|
|
|
185
203
|
expires_utc=expires_utc,
|
|
186
204
|
last_access_utc=last_access_utc))
|
|
187
205
|
fh.close()
|
|
206
|
+
webData_bytes = self.conn.readFile(shareName=self.share, path=paths['webDataPath'] % user, bypass_shared_violation=True)
|
|
207
|
+
if aeskey is not None and webData_bytes is not None and len(webData_bytes) > 0:
|
|
208
|
+
fh = tempfile.NamedTemporaryFile()
|
|
209
|
+
fh.write(webData_bytes)
|
|
210
|
+
fh.seek(0)
|
|
211
|
+
db = sqlite3.connect(fh.name)
|
|
212
|
+
cursor = db.cursor()
|
|
213
|
+
query = cursor.execute('SELECT service, encrypted_token FROM token_service')
|
|
214
|
+
lines = query.fetchall()
|
|
215
|
+
if len(lines) > 0:
|
|
216
|
+
for service, encrypted_grt in lines:
|
|
217
|
+
token = decrypt_chrome_password(encrypted_grt, aeskey)
|
|
218
|
+
credentials.append(GoogleRefreshToken(
|
|
219
|
+
winuser=user,
|
|
220
|
+
browser=browser,
|
|
221
|
+
service=service,
|
|
222
|
+
token = token
|
|
223
|
+
))
|
|
188
224
|
return credentials, cookies
|
|
189
225
|
|
|
190
226
|
@property
|
|
@@ -193,7 +193,7 @@ class CertificatesTriage:
|
|
|
193
193
|
if certblob.der is not None:
|
|
194
194
|
cert = self.der_to_cert(certblob.der)
|
|
195
195
|
certificates[certname] = cert
|
|
196
|
-
except:
|
|
196
|
+
except Exception:
|
|
197
197
|
pass
|
|
198
198
|
return certificates
|
|
199
199
|
|
|
@@ -248,7 +248,7 @@ class CertificatesTriage:
|
|
|
248
248
|
|
|
249
249
|
for name in san.value.get_values_for_type(x509.DNSName):
|
|
250
250
|
return "DNS Host Name", name
|
|
251
|
-
except:
|
|
251
|
+
except Exception:
|
|
252
252
|
pass
|
|
253
253
|
|
|
254
254
|
return None, None
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
import
|
|
3
|
-
from typing import Any, List, Tuple
|
|
4
|
-
import xml.etree.ElementTree as ET
|
|
5
|
-
import base64
|
|
2
|
+
from typing import List, Tuple
|
|
6
3
|
import re
|
|
7
|
-
from binascii import unhexlify
|
|
8
4
|
|
|
9
5
|
from dploot.lib.dpapi import decrypt_blob, find_masterkey_for_blob
|
|
10
6
|
from dploot.lib.smb import DPLootSMBConnection
|
|
@@ -78,18 +74,17 @@ class SCCMTriage:
|
|
|
78
74
|
result = ''
|
|
79
75
|
if masterkey is not None:
|
|
80
76
|
result = decrypt_blob(blob_bytes, masterkey=masterkey)
|
|
81
|
-
return result
|
|
82
77
|
else:
|
|
83
|
-
|
|
84
|
-
|
|
78
|
+
logging.debug("Master keys not found for SCCM blob")
|
|
79
|
+
return result
|
|
85
80
|
|
|
86
81
|
def parseFile(self, objectfile) -> Tuple[List[SCCMCred], List[SCCMSecret], List[SCCMCollection]]:
|
|
87
82
|
sccmcred = list()
|
|
88
83
|
sccmsecret = list()
|
|
89
84
|
sccmcollection = list()
|
|
90
|
-
regex_naa =
|
|
91
|
-
regex_task =
|
|
92
|
-
regex_collection =
|
|
85
|
+
regex_naa = br"CCM_NetworkAccessAccount.*<PolicySecret Version=\"1\"><!\[CDATA\[(.*?)\]\]><\/PolicySecret>.*<PolicySecret Version=\"1\"><!\[CDATA\[(.*?)\]\]><\/PolicySecret>"
|
|
86
|
+
regex_task = br"</SWDReserved>.*<PolicySecret Version=\"1\"><!\[CDATA\[(.*?)\]\]><\/PolicySecret>"
|
|
87
|
+
regex_collection = br"CCM_CollectionVariable\x00\x00(.*?)\x00\x00.*<PolicySecret Version=\"1\"><!\[CDATA\[(.*?)\]\]><\/PolicySecret>"
|
|
93
88
|
logging.debug("Looking for NAA Credentials from OBJECTS.DATA file")
|
|
94
89
|
pattern = re.compile(regex_naa)
|
|
95
90
|
for match in pattern.finditer(objectfile):
|
|
@@ -114,7 +109,7 @@ class SCCMTriage:
|
|
|
114
109
|
|
|
115
110
|
def parseReply(self, iEnum):
|
|
116
111
|
finding = list()
|
|
117
|
-
regex = "<PolicySecret Version=\"1\"><!\[CDATA\[(.*?)\]\]><\/PolicySecret>"
|
|
112
|
+
regex = r"<PolicySecret Version=\"1\"><!\[CDATA\[(.*?)\]\]><\/PolicySecret>"
|
|
118
113
|
while True:
|
|
119
114
|
try:
|
|
120
115
|
pEnum = iEnum.Next(0xffffffff,1)[0]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|