Skip to content

Commit b4307da

Browse files
committed
Organize the profiles to reduce duplication
1 parent d6230f9 commit b4307da

File tree

1 file changed

+113
-153
lines changed

1 file changed

+113
-153
lines changed

acquire/acquire.py

Lines changed: 113 additions & 153 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from dissect.target.helpers import fsutil
2323
from dissect.target.loaders.remote import RemoteStreamConnection
2424
from dissect.target.loaders.targetd import TargetdLoader
25-
from dissect.target.plugins.apps.webservers import iis
25+
from dissect.target.plugins.apps.webserver import iis
2626
from dissect.target.plugins.os.windows.log import evt, evtx
2727

2828
from acquire.collector import Collector, get_full_formatted_report, get_report_summary
@@ -2021,164 +2021,124 @@ def upload_files(paths: list[Path], upload_plugin: UploaderPlugin, no_proxy: boo
20212021
log.exception("")
20222022

20232023

2024+
class WindowsProfile:
2025+
MINIMAL = [
2026+
NTFS,
2027+
EventLogs,
2028+
Registry,
2029+
Tasks,
2030+
PowerShell,
2031+
Prefetch,
2032+
Appcompat,
2033+
PCA,
2034+
Misc,
2035+
]
2036+
DEFAULT = [
2037+
*MINIMAL,
2038+
ETL,
2039+
Recents,
2040+
RecycleBin,
2041+
Drivers,
2042+
Syscache,
2043+
WBEM,
2044+
AV,
2045+
BITS,
2046+
DHCP,
2047+
DNS,
2048+
ActiveDirectory,
2049+
RemoteAccess,
2050+
ActivitiesCache,
2051+
]
2052+
FULL = [
2053+
*DEFAULT,
2054+
History,
2055+
NTDS,
2056+
QuarantinedFiles,
2057+
WindowsNotifications,
2058+
SSH,
2059+
IIS,
2060+
]
2061+
2062+
2063+
class LinuxProfile:
2064+
MINIMAL = [
2065+
Etc,
2066+
Boot,
2067+
Home,
2068+
SSH,
2069+
Var,
2070+
]
2071+
DEFAULT = MINIMAL
2072+
FULL = [
2073+
*DEFAULT,
2074+
History,
2075+
WebHosting,
2076+
]
2077+
2078+
2079+
class BsdProfile:
2080+
MINIMAL = [
2081+
Etc,
2082+
Boot,
2083+
Home,
2084+
SSH,
2085+
Var,
2086+
BSD,
2087+
]
2088+
DEFAULT = MINIMAL
2089+
FULL = MINIMAL
2090+
2091+
2092+
class ESXiProfile:
2093+
MINIMAL = [
2094+
Bootbanks,
2095+
ESXi,
2096+
SSH,
2097+
]
2098+
DEFAULT = [
2099+
*MINIMAL,
2100+
VMFS,
2101+
]
2102+
FULL = DEFAULT
2103+
2104+
2105+
class OSXProfile:
2106+
MINIMAL = [
2107+
Etc,
2108+
Home,
2109+
Var,
2110+
OSX,
2111+
OSXApplicationsInfo,
2112+
]
2113+
DEFAULT = MINIMAL
2114+
FULL = [
2115+
*DEFAULT,
2116+
History,
2117+
SSH,
2118+
]
2119+
2120+
20242121
PROFILES = {
20252122
"full": {
2026-
"windows": [
2027-
NTFS,
2028-
EventLogs,
2029-
Registry,
2030-
Tasks,
2031-
ETL,
2032-
Recents,
2033-
RecycleBin,
2034-
Drivers,
2035-
PowerShell,
2036-
Prefetch,
2037-
Appcompat,
2038-
PCA,
2039-
Syscache,
2040-
WBEM,
2041-
AV,
2042-
ActivitiesCache,
2043-
BITS,
2044-
DHCP,
2045-
DNS,
2046-
History,
2047-
Misc,
2048-
NTDS,
2049-
ActiveDirectory,
2050-
QuarantinedFiles,
2051-
RemoteAccess,
2052-
WindowsNotifications,
2053-
SSH,
2054-
IIS,
2055-
],
2056-
"linux": [
2057-
Etc,
2058-
Boot,
2059-
Home,
2060-
History,
2061-
SSH,
2062-
Var,
2063-
WebHosting,
2064-
],
2065-
"bsd": [
2066-
Etc,
2067-
Boot,
2068-
SSH,
2069-
Home,
2070-
Var,
2071-
BSD,
2072-
],
2073-
"esxi": [
2074-
Bootbanks,
2075-
ESXi,
2076-
VMFS,
2077-
SSH,
2078-
],
2079-
"osx": [
2080-
Etc,
2081-
Home,
2082-
Var,
2083-
OSX,
2084-
OSXApplicationsInfo,
2085-
History,
2086-
SSH,
2087-
],
2123+
"windows": WindowsProfile.FULL,
2124+
"linux": LinuxProfile.FULL,
2125+
"bsd": BsdProfile.FULL,
2126+
"esxi": ESXiProfile.FULL,
2127+
"osx": OSXProfile.FULL,
20882128
},
20892129
"default": {
2090-
"windows": [
2091-
NTFS,
2092-
EventLogs,
2093-
Registry,
2094-
Tasks,
2095-
ETL,
2096-
Recents,
2097-
RecycleBin,
2098-
Drivers,
2099-
PowerShell,
2100-
Prefetch,
2101-
Appcompat,
2102-
PCA,
2103-
Syscache,
2104-
WBEM,
2105-
AV,
2106-
BITS,
2107-
DHCP,
2108-
DNS,
2109-
Misc,
2110-
ActiveDirectory,
2111-
RemoteAccess,
2112-
ActivitiesCache,
2113-
],
2114-
"linux": [
2115-
Etc,
2116-
Boot,
2117-
Home,
2118-
SSH,
2119-
Var,
2120-
],
2121-
"bsd": [
2122-
Etc,
2123-
Boot,
2124-
Home,
2125-
SSH,
2126-
Var,
2127-
BSD,
2128-
],
2129-
"esxi": [
2130-
Bootbanks,
2131-
ESXi,
2132-
VMFS,
2133-
SSH,
2134-
],
2135-
"osx": [
2136-
Etc,
2137-
Home,
2138-
Var,
2139-
OSX,
2140-
OSXApplicationsInfo,
2141-
],
2130+
"windows": WindowsProfile.DEFAULT,
2131+
"linux": LinuxProfile.DEFAULT,
2132+
"bsd": BsdProfile.DEFAULT,
2133+
"esxi": ESXiProfile.DEFAULT,
2134+
"osx": OSXProfile.DEFAULT,
21422135
},
21432136
"minimal": {
2144-
"windows": [
2145-
NTFS,
2146-
EventLogs,
2147-
Registry,
2148-
Tasks,
2149-
PowerShell,
2150-
Prefetch,
2151-
Appcompat,
2152-
PCA,
2153-
Misc,
2154-
],
2155-
"linux": [
2156-
Etc,
2157-
Boot,
2158-
Home,
2159-
SSH,
2160-
Var,
2161-
],
2162-
"bsd": [
2163-
Etc,
2164-
Boot,
2165-
Home,
2166-
SSH,
2167-
Var,
2168-
BSD,
2169-
],
2170-
"esxi": [
2171-
Bootbanks,
2172-
ESXi,
2173-
SSH,
2174-
],
2175-
"osx": [
2176-
Etc,
2177-
Home,
2178-
Var,
2179-
OSX,
2180-
OSXApplicationsInfo,
2181-
],
2137+
"windows": WindowsProfile.MINIMAL,
2138+
"linux": LinuxProfile.MINIMAL,
2139+
"bsd": BsdProfile.MINIMAL,
2140+
"esxi": ESXiProfile.MINIMAL,
2141+
"osx": OSXProfile.MINIMAL,
21822142
},
21832143
"none": None,
21842144
}

0 commit comments

Comments
 (0)