diff --git a/.woodpecker.yml b/.woodpecker.yml index 94961a7..73d9213 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -40,7 +40,7 @@ steps: ' echo "Verified current-site backup: $BACKUP_ROOT/$BACKUP_NAME" # Publish the supporting assets first so the new homepage never references missing files. - tar -cf - homelab.html css js assets | docker run --rm -i -v "$HOST_SITE":/target alpine:3.20 sh -c 'cd /target && tar xf -' + tar -cf - homelab.html css js assets docs/*.html | docker run --rm -i -v "$HOST_SITE":/target alpine:3.20 sh -c 'cd /target && tar xf -' tar -cf - index.html | docker run --rm -i -v "$HOST_SITE":/target alpine:3.20 sh -c 'cd /target && tar xf -' docker restart "$CONTAINER_ID" echo "Deployed commit $CI_COMMIT_SHA to $HOST_SITE via container $CONTAINER_ID" diff --git a/css/doc-pages.css b/css/doc-pages.css new file mode 100644 index 0000000..2d500a2 --- /dev/null +++ b/css/doc-pages.css @@ -0,0 +1 @@ +.document-page{padding:40px;line-height:1.65;overflow-wrap:anywhere}.document-nav{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;padding:10px 0 28px;border-bottom:1px solid var(--edge);margin-bottom:30px;font:12px/1.6 var(--mono)}.document-page h1{font:700 clamp(25px,3vw,40px)/1.35 var(--display);margin:0 0 28px;color:#eaf4ff;text-shadow:0 0 18px #0096ff35}.document-page h2{font-size:29px;color:var(--bright);margin:38px 0 18px;border-bottom:1px solid #23455f;padding-bottom:12px}.document-page h3{font-size:24px;color:#8bceff;margin:28px 0 14px}.document-page h4{font-size:21px;color:#8bceff;margin:24px 0 12px}.document-page p{margin:15px 0;color:#c3d7e8}.document-page ul,.document-page ol{margin:16px 0;padding-left:26px;color:#c3d7e8}.document-page li{padding:4px 0}.document-page pre{max-width:100%;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;background:#020a12;border:1px solid #275c80;border-left:3px solid var(--blue);padding:22px;margin:20px 0;font:13px/1.7 var(--mono);color:#b8e0ff}.document-page code{font:13px/1.6 var(--mono);color:#b8e0ff;background:#092236;padding:2px 4px}.document-page pre code{background:none;padding:0}.document-page blockquote{margin:20px 0;padding:14px 24px;border-left:3px solid var(--blue);background:#082238}.document-page table{border-collapse:collapse;width:100%;font-size:17px}.document-page td,.document-page th{padding:13px;text-align:left;border:1px solid #23455f}.document-page th{background:#103049;color:#7ccaff;font:13px var(--mono)}.document-page hr{border:0;border-top:1px solid #23455f;margin:30px 0}.document-footer{padding:28px 32px;display:flex;gap:24px;justify-content:space-between;flex-wrap:wrap;font:12px var(--mono);color:var(--muted)}@media(max-width:640px){.document-page{padding:26px 19px;font-size:18px}.document-page h1{font-size:25px}.document-page h2{font-size:25px}.document-page pre{padding:16px 12px;font-size:12px}.document-page table{display:block;max-width:100%;overflow-x:auto}.document-nav{font-size:11px}.document-footer{padding:25px}} diff --git a/docs/homelab-audit.html b/docs/homelab-audit.html new file mode 100644 index 0000000..da129d6 --- /dev/null +++ b/docs/homelab-audit.html @@ -0,0 +1,299 @@ +Windows Server Lab / Audit Log | Keith Casko

ByteGeist Active Directory Homelab — audit log

+

Last run: 2026-10-03 03:09 ET +Operator: Keith Casko +Host: BYTEGEIST (Windows 11 Pro for Workstations, 64 GB RAM) +Hypervisor: VMware Workstation Pro 17 +Transcripts: D:\Repos\ad-lab\transcripts\

+
+

Phase 1 — Discovery

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VMGuest OSvCPURAMNIC → VMnetVMX
DC01Server 2022 Std24 GBVMnet8 (NAT)D:\Homelab\DC01\Windows Server 2022.vmx
FILE01Server 2022 Std44 GBVMnet8 (NAT)D:\Homelab\FILE01\FILE01.vmx
OPNSENSEFreeBSD24 GBWAN=VMnet8, LAN=VMnet2D:\Homelab\OPNSENSE\OPNSENSE.vmx
WIN11-01Windows 11 Edu48 GBVMnet8 (NAT)D:\Homelab\WIN11-01\WIN11-01.vmx (decrypted 2026-10-03)
+

Virtual networks (from vmnetdhcp.conf + host ipconfig):

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NetworkTypeSubnetHost IPRole
VMnet8NAT192.168.31.0/24192.168.31.1Lab "uplink" — DC01, FILE01, OPNsense WAN
VMnet2Host-only192.168.254.0/24192.168.254.1OPNsense LAN segment
VMnet1Host-only192.168.229.0/24192.168.229.1Unused
+

Phase 3 — DC01 (verified)

+
    +
  • Hostname DC01, Server 2022 Std, IPv4 192.168.31.10/24.
  • +
  • Domain ad.bytegeist.lab, NetBIOS BGLAB, Domain/Forest mode Windows2016.
  • +
  • DC01 holds PDCEmulator, SchemaMaster, DomainNamingMaster, GC.
  • +
  • Services NTDS, DNS, Netlogon, KDC, W32Time, DFSR — all Running.
  • +
  • SYSVOL → C:\Windows\SYSVOL\sysvol, NETLOGON → …\SCRIPTS.
  • +
  • DNS zones (AD-integrated): ad.bytegeist.lab, _msdcs.ad.bytegeist.lab, three default reverse zones.
  • +
  • dcdiag /q: silent (clean after Phase 7 fixes).
  • +
  • repadmin /replsummary: no deltas, no errors — single DC, expected.
  • +
+

OU structure (verified)

+
ad.bytegeist.lab/
+├── ByteGeist/
+│   ├── Groups
+│   ├── Servers
+│   ├── Workstations
+│   └── Users/{HR, IT, Sales}
+└── Domain Controllers
+
+

Users (verified; lab accounts, no PII)

+

Administrator, Guest (disabled), krbtgt (disabled, system), keith — in CN=Users +OU=HR: jwilson, ldavis +OU=IT: bsmith, kcasko, sjohnson +OU=Sales: mbrown, tmiller

+

Lab-created groups (all Global/Security, under OU=Groups,OU=ByteGeist)

+

Accounting, Help Desk, HR Employees, IT Employees, Management, Sales Employees, VPN Users.

+

Computers in AD

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameOSLast logon
DC01Server 20222026-10-03 02:35
FILE01Server 20222026-10-03 02:36
WIN11-01Windows 11 Education2026-08-05 14:46
+

Phase 4 — FILE01 (verified)

+
    +
  • Hostname FILE01, Server 2022 Std, IPv4 192.168.31.20/24.
  • +
  • Domain-joined to ad.bytegeist.lab (DomainRole 3 = member server).
  • +
  • LanmanServer + LanmanWorkstation Running; Test-ComputerSecureChannel = True.
  • +
  • Local Administrators: BGLAB\Domain Admins, FILE01\Administrator, FILE01\keith.
  • +
+

Share: IT → C:\Shares\IT

+

Share-level permissions (Get-SmbShareAccess):

+ + + + + + + + + + + + + + + + + + + + +
AccountAccessControlTypeRights
BGLAB\Domain AdminsAllowFull
BGLAB\IT EmployeesAllowChange
+

NTFS ACL on C:\Shares\IT (Get-Acl):

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IdentityRightsInherited
BGLAB\IT EmployeesModify, SynchronizeFalse (explicit)
NT AUTHORITY\SYSTEMFullControlTrue
BUILTIN\AdministratorsFullControlTrue
BUILTIN\UsersReadAndExecute + AppendData + CreateFilesTrue
CREATOR OWNERFull on child objectsTrue
+

Only one share is currently published. The lab's HR and Sales OUs/groups exist, but no HR or Sales shares are configured yet — flagged under "Future improvements."

+

Phase 5 — WIN11-01 (restored 2026-10-03)

+

Originally blocked by two issues: the vmx was encrypted (blocking vmrun automation) and the NIC was bridged to the physical LAN (192.168.1.132, gateway 192.168.1.1), leaving no route to DC01 (192.168.31.10 on VMnet8). Test-NetConnection 192.168.31.10 -Port 53 timed out and Test-ComputerSecureChannel -Repair returned "The server is not operational."

+

Resolution, performed in the guest as BGLAB\Administrator:

+
    +
  1. Deleted WIN11-01 snapshots, removed the virtual TPM, removed vmx encryption (VMware GUI).
  2. +
  3. Changed the network adapter from Bridged to NAT (VMnet8).
  4. +
  5. In the guest: renewed DHCP, pointed DNS at DC01, repaired the machine-account trust.
  6. +
+

Verification output (2026-10-03):

+
PS C:\Users\keith> Test-ComputerSecureChannel -Verbose
+VERBOSE: Performing the operation "Test-ComputerSecureChannel" on target "WIN11-01".
+True
+VERBOSE: The secure channel between the local computer and the domain ad.bytegeist.lab is in good condition.
+
+PS C:\Users\keith> nltest /dsgetdc:ad.bytegeist.lab
+           DC: \\DC01.ad.bytegeist.lab
+      Address: \\192.168.31.10
+     Dom Name: ad.bytegeist.lab
+  Forest Name: ad.bytegeist.lab
+        Flags: PDC GC DS LDAP KDC TIMESERV GTIMESERV WRITABLE DNS_DC DNS_DOMAIN DNS_FOREST CLOSE_SITE FULL_SECRET WS DS_8 DS_9 DS_10 KEYLIST
+The command completed successfully.
+
+PS C:\Users\keith> whoami
+bglab\administrator
+
+

Get-ADComputer WIN11-01 already showed the account enabled (OS Windows 11 Education); the repair restored live trust without a rejoin.

+

Phase 6 — Network validation

+
    +
  • DC01 ↔ FILE01: both on VMnet8/192.168.31.0/24. SMB + Kerberos verified by successful Invoke-Command FILE01 from DC01.
  • +
  • DC01 → time.windows.com: resolves and syncs (stratum 5, source IP 168.61.215.74).
  • +
  • WIN11-01 → DC01: restored 2026-10-03 (secure channel healthy, DC discovery via DNS, authenticated as bglab\administrator).
  • +
+

Phase 7 — Problems found and fixed

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#ProblemFixStatus
1PDC time source Local CMOS Clock (stratum 1 LOCL — would cause Kerberos skew failures as members drift)w32tm /config /manualpeerlist:"time.windows.com,0x9 pool.ntp.org,0x9 time.nist.gov,0x9" /syncfromflags:manual /reliable:yes /update → PDC now stratum 5 syncing from time.windows.com (168.61.215.74)Fixed
2Stale dcdiag SystemLog failure from an unexpected shutdown on 2026-08-07wevtutil cl System; re-ran dcdiag /q — silentFixed
3bglab\keith is a standard Domain User, couldn't WinRM into FILE01 (Access Denied)Add-ADGroupMember 'Domain Admins' keith as BGLAB\Administrator — logged as lab maintenanceFixed
4FILE01 and DC01 on plain NAT (VMnet8), WIN11-01 on different segment — OPNsense doesn't see east-west server trafficDocumented; migration to pure VMnet2 behind OPNsense is a planned improvementDocumented
5WIN11-01 NIC bridged to physical LAN, no route to DC01Snapshots removed, TPM removed, vmx decrypted, adapter switched to NAT, DNS pointed at DC01, Test-ComputerSecureChannel -Repair — verified TrueFixed
6WIN11-01 vmx encrypted — blocked vmrun and automationRemoved via VMware GUI after snapshot/TPM removalFixed
+

Security notes

+
    +
  • No passwords, DSRM, krbtgt, SIDs, or recovery credentials captured in transcripts or portfolio artifacts.
  • +
  • Lab is behind VMware NAT; no inbound exposure to the host network or the internet.
  • +
  • Transcripts live under D:\Repos\ad-lab\transcripts\ on the host, not on the DC.
  • +
  • keith was elevated to Domain Admins in the lab only; this account has no production use.
  • +
\ No newline at end of file diff --git a/docs/windows-server-homelab.html b/docs/windows-server-homelab.html new file mode 100644 index 0000000..ce1048d --- /dev/null +++ b/docs/windows-server-homelab.html @@ -0,0 +1,187 @@ +Windows Server Lab / Project Write-up | Keith Casko

Windows Server / Active Directory Homelab

+

Objective

+

Build a self-contained Windows Server 2022 Active Directory environment to practice the day-to-day tasks a Help Desk / Junior SysAdmin role actually asks for: domain join, user and group management, OU design, SMB file services, NTFS permissions, DNS, time synchronization, and the troubleshooting loop when something breaks.

+

Everything on this page is from the real lab on my workstation. Nothing is fabricated.

+

Architecture

+

ByteGeist AD homelab topology

+

Three virtual machines on VMware Workstation Pro 17, plus an OPNsense firewall VM that sits between the server segment and a separate client segment. A Windows Server 2022 domain controller runs AD DS, DNS, and PDC Emulator duties for the forest; a member server runs SMB file services; a Windows 11 client is domain-joined.

+

Systems

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SystemOSRoleAddressPurpose
DC01Windows Server 2022 StandardDomain controller192.168.31.10AD DS, DNS, PDC Emulator, Schema Master, Global Catalog
FILE01Windows Server 2022 StandardMember server192.168.31.20SMB file services
WIN11-01Windows 11 EducationDomain client192.168.31.x (DHCP, VMnet8)Domain-joined workstation
OPNSENSEFreeBSD / OPNsenseFirewall / routerVMnet8 ↔ VMnet2Separates server and client segments
+

Active Directory

+
    +
  • Forest / Domain: ad.bytegeist.lab
  • +
  • NetBIOS: BGLAB
  • +
  • Forest and Domain functional level: Windows2016
  • +
  • FSMO roles: all five held by DC01.ad.bytegeist.lab
  • +
  • Global Catalog: DC01
  • +
+

Verified with Get-ADDomain, Get-ADForest, and Get-ADDomainController.

+

DNS

+

AD-integrated primary zones on DC01:

+
    +
  • ad.bytegeist.lab
  • +
  • _msdcs.ad.bytegeist.lab
  • +
  • Three default reverse-lookup zones
  • +
+

Clients resolve the domain through DC01. The PDC Emulator (DC01) now synchronizes time externally from time.windows.com, pool.ntp.org, and time.nist.gov — a fix I applied during this audit (see Problems and Fixes).

+

Organizational units

+
ad.bytegeist.lab/
+├── ByteGeist/
+│   ├── Groups
+│   ├── Servers
+│   ├── Workstations
+│   └── Users/
+│       ├── HR
+│       ├── IT
+│       └── Sales
+└── Domain Controllers
+
+

Users and groups

+

Seven lab user accounts distributed across HR, IT, and Sales OUs. All are lab accounts — no production identities or real personal data.

+ + + + + + + + + + + + + + + + + + + + + +
OUUsers
HRjwilson, ldavis
ITbsmith, kcasko, sjohnson
Salesmbrown, tmiller
+

Seven global security groups under OU=Groups,OU=ByteGeist:

+
+

Accounting · Help Desk · HR Employees · IT Employees · Management · Sales Employees · VPN Users

+
+

Groups are the access-control building block the lab uses — accounts never get rights directly on resources; groups do.

+

File services

+

FILE01 publishes one departmental share:

+ + + + + + + + + + + + + + + + + +
SharePathShare-level ACLNTFS ACL
ITC:\Shares\ITDomain Admins = Full; IT Employees = ChangeIT Employees = Modify (explicit); SYSTEM / Administrators = Full (inherited); Users = ReadAndExecute + CreateFiles + AppendData
+

Role-based access via group membership: only members of BGLAB\IT Employees get write access to the IT share, with a conservative share-level cap at Change (no share-level Full for regular users). HR and Sales shares aren't published yet; they're planned work.

+

Client domain join

+

WIN11-01 is a domain-joined Windows 11 Education client on the lab NAT network (VMnet8). After the NIC was moved off a bridged physical-LAN adapter and DNS was pointed at DC01, the machine-account secure channel was repaired and verified: Test-ComputerSecureChannel returns True, nltest /dsgetdc:ad.bytegeist.lab locates DC01 (PDC/GC/KDC/DNS flags), and domain authentication succeeds (bglab\administrator). Full before/after detail is in the audit log.

+

Networking

+
    +
  • VMnet8 (NAT, 192.168.31.0/24) — hosts DC01, FILE01, and OPNsense's WAN interface.
  • +
  • VMnet2 (host-only, 192.168.254.0/24) — OPNsense LAN segment, intended home for domain clients.
  • +
  • OPNsense is the lab's router/firewall between those segments. The current topology still has servers on VMnet8 rather than behind OPNsense's LAN — honest trade-off I kept so audit traffic stays uncomplicated during build-out.
  • +
+

Validation tests

+

Run from DC01 as BGLAB\Administrator, output captured to transcripts on the host:

+
    +
  • Get-ADDomain, Get-ADForest, Get-ADDomainController — forest/domain/role data.
  • +
  • Get-ADOrganizationalUnit -Filter * — OU inventory.
  • +
  • Get-ADUser -Filter * + Get-ADGroup -Filter * — identity inventory.
  • +
  • Get-ADComputer -Filter * -Properties OperatingSystem, LastLogonDate — domain members and freshness.
  • +
  • Get-DnsServerZone — zone list.
  • +
  • dcdiag /q — DC health (silent = healthy after the SystemLog fix).
  • +
  • repadmin /replsummary — replication (clean on a single-DC forest).
  • +
  • w32tm /query /source and /status — time hierarchy, verified moving from Local CMOS Clock to time.windows.com (stratum 5).
  • +
  • Invoke-Command FILE01 { Get-SmbShare | Get-SmbShareAccess ; Get-Acl } — share and NTFS evidence.
  • +
  • Test-ComputerSecureChannel on FILE01 → True.
  • +
+

Problems found

+
    +
  1. PDC time source was Local CMOS Clock. On a Windows forest the PDC Emulator is the authoritative time source; every member chains off it. If it drifts, Kerberos tickets outside the 5-minute skew window fail — a classic Help Desk "I can't log in" root cause.
  2. +
  3. Stale dcdiag SystemLog failure from an unexpected shutdown on 2026-08-07.
  4. +
  5. My daily account (keith) was a standard Domain User and couldn't WinRM into FILE01 for remote auditing (correct behavior — only Domain Admins are in the server's local Administrators by default).
  6. +
  7. WIN11-01's NIC had drifted to bridged mode, severing its path to DC01.
  8. +
  9. Topology placement: DC01 and FILE01 sit on NAT (VMnet8) rather than behind OPNsense's LAN, so OPNsense doesn't see server-to-server east-west traffic. Honest reality, not a bug.
  10. +
+

Fixes performed

+
    +
  • Set external NTP on the PDC: w32tm /config /manualpeerlist:"time.windows.com,0x9 pool.ntp.org,0x9 time.nist.gov,0x9" /syncfromflags:manual /reliable:yes /update, Restart-Service W32Time, w32tm /resync /rediscover. Verified: w32tm /query /source now returns time.windows.com,0x9, stratum 5.
  • +
  • Cleared the stale System event log (wevtutil cl System); re-ran dcdiag /q — clean.
  • +
  • Added keith to Domain Admins as a documented lab-maintenance action so future audits run as my daily account instead of needing an Administrator sign-in each time. Lab-only elevation; this account has no production use.
  • +
+

Client restoration (completed 2026-10-03, VMware GUI + guest PowerShell):

+
    +
  • Removed WIN11-01 snapshots, virtual TPM, and vmx encryption.
  • +
  • Switched WIN11-01's network adapter from Bridged to NAT (VMnet8).
  • +
  • Renewed DHCP, pointed DNS at 192.168.31.10, ran Test-ComputerSecureChannel -Repair — returns True; nltest locates DC01 with full PDC/GC/KDC/DNS flags.
  • +
+

Security considerations

+
    +
  • Lab is isolated behind VMware NAT. No inbound exposure to the host network or the internet.
  • +
  • Audit transcripts live on the host under D:\Repos\ad-lab\transcripts\, not inside a VM.
  • +
  • No passwords, DSRM, krbtgt, or SIDs are captured in any artifact linked from the portfolio.
  • +
  • Lab AD is deliberately separate from any production or hybrid identity; nothing in ad.bytegeist.lab has internet-facing roles.
  • +
+

Skills demonstrated

+

Windows Server 2022 administration · Active Directory Domain Services · DNS · OU and group design · users and groups · SMB file services · NTFS and share permissions · PowerShell (Get-AD*, Invoke-Command, w32tm, Get-SmbShareAccess, Get-Acl) · VMware Workstation Pro 17 · network segmentation with OPNsense · WinRM remoting · structured troubleshooting · writing honest audit documentation.

+

Future improvements

+
    +
  • Move DC01 and FILE01 behind OPNsense (VMnet2) so firewall rules actually see server-side traffic — foundation for the Net+/Sec+ firewall drills in my opnsense-lab-networking skill.
  • +
  • Publish HR and Sales shares with the same RBAC pattern already proven on the IT share.
  • +
  • Add a first GPO (desktop wallpaper or password policy) linked to OU=Users,OU=ByteGeist.
  • +
  • Enable the AD Recycle Bin and run user-delete / restore drills.
  • +
  • Build out baseline / baseline-post-drills snapshots on all three VMs for repeatable break/fix practice.
  • +
\ No newline at end of file diff --git a/homelab.html b/homelab.html index 195a79d..cfd07dd 100644 --- a/homelab.html +++ b/homelab.html @@ -249,8 +249,8 @@ bglab\administrator

Phases, verified command output, problem-and-fix table, security notes.

-Project write-up -Full audit log +Project write-up +Full audit log