Add ALD Transition Console preview and Astra lab build workflow
This commit is contained in:
1 parent
f330a3c00a
commit
e5c6a2fc0e
199 files changed
+9866
No files matched your search
@@ -0,0 +1,105 @@
|
||||
{
|
||||
"schema_version": 1,
|
||||
"assets": [
|
||||
{
|
||||
"path": "data/checklists/all.ru.json",
|
||||
"sha256": "fa86faf3ad52d9627526683e0627620952f5a1fe870adca59dd3586b982ee58d"
|
||||
},
|
||||
{
|
||||
"path": "data/checklists/hardening.ru.json",
|
||||
"sha256": "b4c162b1302387d566001585f12dfc990d072878ea9fb1d71610b61734cf5202"
|
||||
},
|
||||
{
|
||||
"path": "data/checklists/initialization.ru.json",
|
||||
"sha256": "737a7d0f6b6072825daf27bfe6fbf281282e929cc92e1db9a52534889648b4e4"
|
||||
},
|
||||
{
|
||||
"path": "data/checklists/migration.ru.json",
|
||||
"sha256": "76c189997f1434733e1a076b78b429e2857d3f929419d801d4c229dd9feefcc3"
|
||||
},
|
||||
{
|
||||
"path": "data/checklists/policies.ru.json",
|
||||
"sha256": "91c26c5f2a29a153f5aa1f963f784c0dc7bb6e3024beb5c7b764c22be2c3b78e"
|
||||
},
|
||||
{
|
||||
"path": "data/hardening/astra17-mappings.json",
|
||||
"sha256": "050c8509561e01beff6b9d0ef192b028df20ab281564709f9313f1c40f5487f6"
|
||||
},
|
||||
{
|
||||
"path": "data/hardening/fstec-linux-2022.catalog.json",
|
||||
"sha256": "4112f84f16cb8861936d95f27689827d2a61bbaa5f81afec83a1a412ebe66d3c"
|
||||
},
|
||||
{
|
||||
"path": "data/hardening/windows-baselines.json",
|
||||
"sha256": "a71e297de842613577e3b7d284b6155de21306e794ce6a67db945a5e46559663"
|
||||
},
|
||||
{
|
||||
"path": "data/sources.json",
|
||||
"sha256": "aa5527de7b1e0b95ef65c51037d72a5ff09941b9c2b33941ed75e726ba6dcdf5"
|
||||
},
|
||||
{
|
||||
"path": "schemas/checklist.schema.json",
|
||||
"sha256": "4baafe9294ce9b80cc64f360f2d82c3b0485eca3565919542db2b7964eba874d"
|
||||
},
|
||||
{
|
||||
"path": "schemas/host.schema.json",
|
||||
"sha256": "df6dd7bdaaa1bb531e3ae5b758049363bd9fbc0bc604bad1dde2548e4c135a88"
|
||||
},
|
||||
{
|
||||
"path": "schemas/inventory.schema.json",
|
||||
"sha256": "b469ea50e1737ab16777d52940042840e9f9e906c13b441c644f37cefce48bcd"
|
||||
},
|
||||
{
|
||||
"path": "schemas/offline-bundle.schema.json",
|
||||
"sha256": "eebfbe5a1c14a796779811a8298cea42d9049977ad22b5ce129d1e1db9543bea"
|
||||
},
|
||||
{
|
||||
"path": "schemas/operation.schema.json",
|
||||
"sha256": "2cf2448323742284ab8b8a67f6802ef37f244d8a54f6f6ae8a3f95bae0054df4"
|
||||
},
|
||||
{
|
||||
"path": "schemas/plan.schema.json",
|
||||
"sha256": "b68d479ccbe5c4f7827bef62c3988086244fa421cdc7fa8475926c9b5d7c47fa"
|
||||
},
|
||||
{
|
||||
"path": "schemas/profile.schema.json",
|
||||
"sha256": "49ce944c824a911e8204f3ee10c738fc47a93eb40a811404162908cec50f5d4e"
|
||||
},
|
||||
{
|
||||
"path": "schemas/project.schema.json",
|
||||
"sha256": "bf8c039977eae1746bc2b46cf905aee911627a1bcd868a3ee3e7a6533232f73f"
|
||||
},
|
||||
{
|
||||
"path": "schemas/source.schema.json",
|
||||
"sha256": "400426c9efc182eb6d074c3c9d2526b4d0c5ec23baca5215ce17860907618a68"
|
||||
},
|
||||
{
|
||||
"path": "schemas/windows-discovery.schema.json",
|
||||
"sha256": "0c2cddbcf23591f308787cbf240b28b2dfc185cc4492fb434b0dcf56bff328bf"
|
||||
},
|
||||
{
|
||||
"path": "tasks/linux/README.md",
|
||||
"sha256": "c28c1effd844cb0ed529f3e62b7ca3ae639cce558b45c0f83b6914317ba2d90a"
|
||||
},
|
||||
{
|
||||
"path": "tasks/manifest.json",
|
||||
"sha256": "9bd3b9f4760c497a9efe3688cfdb7698b5793a843d73fa13bb5fd195e7d3b527"
|
||||
},
|
||||
{
|
||||
"path": "tasks/windows/ad-inventory.ps1",
|
||||
"sha256": "bc5cab0a1cb0e5a6e6b298ee9508fa833767767129ff4c97d078ce21534c69d5"
|
||||
},
|
||||
{
|
||||
"path": "tasks/windows/discovery.ps1",
|
||||
"sha256": "956ac1641eade610360c7f1417e75e916d46d8740cda81673d91e1050904ab24"
|
||||
},
|
||||
{
|
||||
"path": "styles/dedsec.qss",
|
||||
"sha256": "05040ba4fc62a448ea20f472f6e8be32dd55da73b6784d4629c571107f176104"
|
||||
},
|
||||
{
|
||||
"path": "fixtures/demo.inventory.json",
|
||||
"sha256": "7ebea1c8bcf6946d3a9f21c8724b22a28a9e5d8fc0ac355510622008fbb659c9"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<RCC><qresource prefix="/">
|
||||
<file alias="data/checklists/all.ru.json">../data/checklists/all.ru.json</file>
|
||||
<file alias="data/checklists/hardening.ru.json">../data/checklists/hardening.ru.json</file>
|
||||
<file alias="data/checklists/initialization.ru.json">../data/checklists/initialization.ru.json</file>
|
||||
<file alias="data/checklists/migration.ru.json">../data/checklists/migration.ru.json</file>
|
||||
<file alias="data/checklists/policies.ru.json">../data/checklists/policies.ru.json</file>
|
||||
<file alias="data/hardening/astra17-mappings.json">../data/hardening/astra17-mappings.json</file>
|
||||
<file alias="data/hardening/fstec-linux-2022.catalog.json">../data/hardening/fstec-linux-2022.catalog.json</file>
|
||||
<file alias="data/hardening/windows-baselines.json">../data/hardening/windows-baselines.json</file>
|
||||
<file alias="data/sources.json">../data/sources.json</file>
|
||||
<file alias="schemas/checklist.schema.json">../schemas/checklist.schema.json</file>
|
||||
<file alias="schemas/host.schema.json">../schemas/host.schema.json</file>
|
||||
<file alias="schemas/inventory.schema.json">../schemas/inventory.schema.json</file>
|
||||
<file alias="schemas/offline-bundle.schema.json">../schemas/offline-bundle.schema.json</file>
|
||||
<file alias="schemas/operation.schema.json">../schemas/operation.schema.json</file>
|
||||
<file alias="schemas/plan.schema.json">../schemas/plan.schema.json</file>
|
||||
<file alias="schemas/profile.schema.json">../schemas/profile.schema.json</file>
|
||||
<file alias="schemas/project.schema.json">../schemas/project.schema.json</file>
|
||||
<file alias="schemas/source.schema.json">../schemas/source.schema.json</file>
|
||||
<file alias="schemas/windows-discovery.schema.json">../schemas/windows-discovery.schema.json</file>
|
||||
<file alias="tasks/linux/README.md">tasks/linux/README.md</file>
|
||||
<file alias="tasks/manifest.json">tasks/manifest.json</file>
|
||||
<file alias="tasks/windows/ad-inventory.ps1">tasks/windows/ad-inventory.ps1</file>
|
||||
<file alias="tasks/windows/discovery.ps1">tasks/windows/discovery.ps1</file>
|
||||
<file alias="styles/dedsec.qss">styles/dedsec.qss</file>
|
||||
<file alias="fixtures/demo.inventory.json">../tests/fixtures/demo.inventory.json</file>
|
||||
<file alias="asset-manifest.json">asset-manifest.json</file>
|
||||
</qresource></RCC>
|
||||
@@ -0,0 +1,34 @@
|
||||
QMainWindow, QWidget#workspace { background: @BG@; color: @TEXT@; }
|
||||
QWidget { color: @TEXT@; }
|
||||
QFrame[panel="true"], QGroupBox { background: @PANEL@; border: 1px solid @BORDER@; padding: 12px; }
|
||||
QLabel[muted="true"] { color: @MUTED@; }
|
||||
QLabel[title="true"] { font-size: 21pt; font-weight: bold; }
|
||||
QLabel[section="true"] { font-size: 15pt; font-weight: 600; }
|
||||
QLabel#blocker { background: @PANEL@; color: @WARNING@; border-left: 4px solid @WARNING@; padding: 12px; }
|
||||
QPushButton, QToolButton, QComboBox, QSpinBox { min-height: 34px; padding: 0 12px; border: 1px solid @BORDER@; background: @RAISED@; }
|
||||
QPushButton:hover, QToolButton:hover { border-color: @MUTED@; }
|
||||
QPushButton[role="primary"] { background: @ACCENT@; color: @BG@; border-color: @ACCENT@; font-weight: bold; }
|
||||
QPushButton:disabled { color: @MUTED@; background: @PANEL@; border-color: @BORDER@; }
|
||||
QPushButton:focus, QToolButton:focus, QLineEdit:focus, QPlainTextEdit:focus, QComboBox:focus, QCheckBox:focus, QListWidget:focus, QTableView:focus, QTabBar::tab:focus { border: 2px solid @ACCENT@; }
|
||||
QLineEdit { min-height: 24px; background: @RAISED@; color: @TEXT@; padding: 6px; border: 1px solid @BORDER@; }
|
||||
QPlainTextEdit, QTextBrowser { background: @PANEL@; border: 1px solid @BORDER@; padding: 8px; selection-background-color: @ACCENT@; selection-color: @BG@; }
|
||||
QPlainTextEdit#logView { background: @BG@; font-family: "DejaVu Sans Mono"; font-size: 10pt; }
|
||||
QTableView { background: @PANEL@; alternate-background-color: @RAISED@; gridline-color: @BORDER@; border: 1px solid @BORDER@; selection-background-color: @ACCENT@; selection-color: @BG@; }
|
||||
QHeaderView::section { background: @RAISED@; color: @MUTED@; padding: 10px; border: none; border-bottom: 1px solid @BORDER@; }
|
||||
QListWidget#navigation { background: @PANEL@; border: none; }
|
||||
QListWidget#navigation::item { min-height: 36px; padding: 8px 10px; border-left: 3px solid transparent; }
|
||||
QListWidget#navigation::item:selected { background: @RAISED@; color: @ACCENT@; border-left: 3px solid @ACCENT@; }
|
||||
QSplitter::handle { background: @BORDER@; }
|
||||
QScrollArea { border: none; }
|
||||
QTabWidget::pane { border: 1px solid @BORDER@; }
|
||||
QTabBar::tab { min-height: 32px; padding: 4px 16px; background: @PANEL@; border-bottom: 2px solid @BORDER@; }
|
||||
QTabBar::tab:selected { color: @ACCENT@; border-bottom-color: @ACCENT@; }
|
||||
QCheckBox { spacing: 8px; padding: 4px; min-height: 30px; }
|
||||
QCheckBox::indicator { width: 18px; height: 18px; border: 1px solid @BORDER@; background: @RAISED@; }
|
||||
QCheckBox::indicator:checked { background: @ACCENT@; border-color: @ACCENT@; }
|
||||
QMenu { background: @PANEL@; border: 1px solid @BORDER@; }
|
||||
QMenu::item:selected { background: @ACCENT@; color: @BG@; }
|
||||
QToolTip { color: @TEXT@; background: @RAISED@; border: 1px solid @BORDER@; }
|
||||
|
||||
QPushButton[role="primary"]:focus { background: @PANEL@; color: @ACCENT@; border: 2px solid @ACCENT@; }
|
||||
QSpinBox:focus { border: 2px solid @ACCENT@; }
|
||||
@@ -0,0 +1,5 @@
|
||||
Linux probes use fixed executable/argument pairs compiled in OperationRegistry.
|
||||
No shell script is executed. Missing tools produce a separate missing-artifact
|
||||
finding. Read-only probes: os-release, uname, dpkg-query, hostname, systemctl show,
|
||||
ip address/route JSON, timedatectl show, resolv.conf, Yama runtime value.
|
||||
No read-only probe installs, refreshes policy, starts a service or changes state.
|
||||
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"schema_version": 1,
|
||||
"revision": 2,
|
||||
"tasks": [
|
||||
{
|
||||
"id": "windows.discovery",
|
||||
"path": "windows/discovery.ps1",
|
||||
"sha256": "956ac1641eade610360c7f1417e75e916d46d8740cda81673d91e1050904ab24",
|
||||
"purpose": "Read Windows edition/build/role, PS version and optional features",
|
||||
"adapter_version": "0.1.0",
|
||||
"state": "DOCUMENTED_NOT_TESTED",
|
||||
"versions": [
|
||||
"Windows 10 1809+",
|
||||
"Server 2019",
|
||||
"Server 2025"
|
||||
],
|
||||
"parameters": {},
|
||||
"mutating": false,
|
||||
"privilege": "Existing approved administrative SSH session; AD inventory requires RSAT ActiveDirectory",
|
||||
"source_refs": [
|
||||
"MS_OPENSSH"
|
||||
],
|
||||
"postcondition": "Validated structured JSON; every denied scope remains explicit",
|
||||
"cancellation_class": "READ_ONLY_TERMINATE",
|
||||
"recovery_class": "NONE",
|
||||
"timeout_seconds": 120
|
||||
},
|
||||
{
|
||||
"id": "ad.inventory",
|
||||
"path": "windows/ad-inventory.ps1",
|
||||
"sha256": "bc5cab0a1cb0e5a6e6b298ee9508fa833767767129ff4c97d078ce21534c69d5",
|
||||
"purpose": "Bounded directory inventory from configured source DC",
|
||||
"adapter_version": "0.1.0",
|
||||
"state": "DOCUMENTED_NOT_TESTED",
|
||||
"versions": [
|
||||
"Windows Server 2019 AD DC: NOT_TESTED",
|
||||
"Windows Server 2025 AD DC: NOT_TESTED"
|
||||
],
|
||||
"parameters": {},
|
||||
"mutating": false,
|
||||
"privilege": "Existing approved administrative SSH session; AD inventory requires RSAT ActiveDirectory",
|
||||
"source_refs": [
|
||||
"MS_OPENSSH",
|
||||
"MS_AD_OBJECT",
|
||||
"MS_AD_FOREST"
|
||||
],
|
||||
"postcondition": "Validated structured JSON; every denied scope remains explicit",
|
||||
"cancellation_class": "READ_ONLY_TERMINATE",
|
||||
"recovery_class": "NONE",
|
||||
"timeout_seconds": 120
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
# Fixed read-only AD DC inventory; no credentials. See manifest and adapter contract.
|
||||
$ErrorActionPreference = 'Stop'
|
||||
[Console]::OutputEncoding = New-Object System.Text.UTF8Encoding($false)
|
||||
Import-Module ActiveDirectory -ErrorAction Stop
|
||||
$node = Get-CimInstance Win32_ComputerSystem
|
||||
if ($node.DomainRole -lt 4) { throw 'Select the source AD domain controller.' }
|
||||
$domain = Get-ADDomain -Server $node.Name
|
||||
if ($domain.DNSRoot -ine 'corp.local') { throw 'Source domain must be corp.local.' }
|
||||
$forest = Get-ADForest -Server $node.Name
|
||||
$now = [DateTime]::UtcNow.ToString('o')
|
||||
$source = $domain.ObjectGUID.ToString()
|
||||
$objects = New-Object 'System.Collections.Generic.List[object]'
|
||||
$truncated = $false
|
||||
$allowed = @('objectSid','sAMAccountName','userPrincipalName','displayName','memberOf','groupType','userAccountControl','servicePrincipalName','gPLink','gPOptions')
|
||||
Get-ADObject -Server $node.Name -LDAPFilter '(|(objectClass=user)(objectClass=group)(objectClass=organizationalUnit)(objectClass=groupPolicyContainer))' -SearchBase $domain.DistinguishedName -Properties $allowed -ResultSetSize 50001 | ForEach-Object {
|
||||
if ($objects.Count -ge 50000) { $truncated = $true; return }
|
||||
$item = $_
|
||||
$sid = ''
|
||||
if ($null -ne $item.objectSid) { $sid = [string]$item.objectSid }
|
||||
$kind = [string]$item.ObjectClass
|
||||
if ($kind -eq 'groupPolicyContainer') { $kind = 'gpo' }
|
||||
if (@('user','group','organizationalUnit','computer','gpo') -notcontains $kind) { $kind = 'other' }
|
||||
$attributes = @{}
|
||||
foreach ($name in $allowed) {
|
||||
if ($name -ne 'objectSid' -and $name -ne 'memberOf' -and $null -ne $item.$name) {
|
||||
$attributes[$name] = @($item.$name | ForEach-Object { [string]$_ })
|
||||
}
|
||||
}
|
||||
$objects.Add(@{
|
||||
source_system_id = $source; object_guid = $item.ObjectGUID.ToString(); sid = $sid
|
||||
dn = $item.DistinguishedName; object_type = $kind; attributes = $attributes
|
||||
memberships = @($item.memberOf | ForEach-Object { [string]$_ }); observed_at = $now
|
||||
})
|
||||
}
|
||||
@{
|
||||
schema_version = 1; source_system_id = $source; source_domain = $domain.DNSRoot; synthetic = $false
|
||||
scope = @{
|
||||
description = ('Directory naming context: ' + $domain.DistinguishedName + '; forest mode: ' + $forest.ForestMode + '; domain mode: ' + $domain.DomainMode)
|
||||
complete = $false
|
||||
denied_or_unreachable = @('DNS/DHCP zone and lease content not collected','File data and ACLs not collected','GPO reports, SYSVOL and effective outcomes not collected','Service/application bindings and AD CS not collected','Password/profile continuity not evaluated',$(if ($truncated) { 'Object limit reached: partial inventory' } else { 'Directory ACL visibility must be verified by source owner' }))
|
||||
categories = @('users','groups','ou','computers','gpo_links')
|
||||
}
|
||||
hosts = @(); objects = @($objects.ToArray())
|
||||
} | ConvertTo-Json -Depth 16 -Compress
|
||||
@@ -0,0 +1,34 @@
|
||||
# ALD Transition Console / fixed read-only task / Windows PowerShell 5.1
|
||||
# No PowerShell SSH subsystem, profile, background job or persistent task.
|
||||
$ErrorActionPreference = 'Stop'
|
||||
[Console]::OutputEncoding = New-Object System.Text.UTF8Encoding($false)
|
||||
$errors = New-Object 'System.Collections.Generic.List[string]'
|
||||
$os = Get-CimInstance -ClassName Win32_OperatingSystem
|
||||
$computer = Get-CimInstance -ClassName Win32_ComputerSystem
|
||||
$features = @()
|
||||
try {
|
||||
$features = @(Get-WindowsCapability -Online | Where-Object { $_.Name -like 'OpenSSH*' } | ForEach-Object {
|
||||
@{ name = $_.Name; state = [string]$_.State }
|
||||
})
|
||||
} catch { $errors.Add('Optional-feature inventory unavailable: elevation or servicing prerequisite required.') }
|
||||
$ssh = Get-Service -Name sshd -ErrorAction SilentlyContinue
|
||||
$result = @{
|
||||
schema_version = 1
|
||||
task = 'windows.discovery'
|
||||
observed_at = [DateTime]::UtcNow.ToString('o')
|
||||
os_edition = $os.Caption
|
||||
os_release = $os.Version
|
||||
os_build = $os.BuildNumber
|
||||
architecture = $os.OSArchitecture
|
||||
domain_role = [int]$computer.DomainRole
|
||||
part_of_domain = [bool]$computer.PartOfDomain
|
||||
domain = $computer.Domain
|
||||
name = $computer.Name
|
||||
powershell_version = $PSVersionTable.PSVersion.ToString()
|
||||
optional_features = $features
|
||||
feature_inventory_complete = ($errors.Count -eq 0)
|
||||
sshd_state = $(if ($null -eq $ssh) { 'NOT_INSTALLED' } else { [string]$ssh.Status })
|
||||
errors = @($errors)
|
||||
synthetic = $false
|
||||
}
|
||||
$result | ConvertTo-Json -Depth 8 -Compress
|
||||
Reference in new issue
Block a user