Commit Graph

193 Commits

Author SHA1 Message Date
PTah e21fae2ae5 fix: audit hardening 2.1.10-SAC — gitignore, SAC TLS warn, Exchange safety
- Extend .gitignore for local settings, logs, spool, backups
- Log CRITICAL when SacTlsSkipVerify is enabled (Login_Monitor + Sac-Client)
- Exchange-MailSecurity: -WhatIf dry-run, scan safety warnings, v1.6.8
- Remove legacy Watchdog_RDP_Monitor.ps1 and Install-ScheduledTasks.ps1
- Add scripts for GitHub sanitize mirror push workflow
2026-07-07 20:20:00 +10:00
PTah 6d52a34a37 fix(scripts): papatramp Git URLs use PapaTramp org, not PTah
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-07 17:49:19 +10:00
PTah f033d5bd87 fix: daily report без локального Telegram при fallback SAC (2.1.9-SAC)
Аналог ssh-monitor: report.daily.* только SAC/spool, timeout 45s,
spool flush приоритет отчётам (50 файлов/цикл).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-06 12:00:36 +10:00
PTah f2bcc6c7df fix: restore production secrets on kalinamall and repair placeholder settings (2.1.8-SAC)
Real SAC/Telegram tokens and org paths back in example and NETLOGON publish script. Deploy now treats sac.example.com and sac_CHANGE_ME as unconfigured and overwrites from example.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 14:32:44 +10:00
PTah 5708e42c66 fix: dedup RDG 302 notify by user+target+external IP (2.1.7-SAC)
Suppress duplicate SAC alerts when Windows logs two RD Gateway 302 events
within 90s for the same user, target host, and external client IP.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 10:03:26 +10:00
PTah 8a937b8f17 fix: quarantine corrupt SAC spool files, flush newest first (2.1.6-SAC)
Reject null-padded spool payloads to rejected/, read UTF-16 spool, process recent events first, and raise flush batch to 20 so daily reports are not blocked by legacy junk.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 09:09:54 +10:00
PTah ccd50a085d fix: RCM 1149 silent drop on RDS servers (2.1.5-SAC)
Should-IgnoreEvent rejected every 1149 because ComputerName is always '-'; add persistent poll cursor, skip logging, and Diagnose on NETLOGON publish list.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 14:29:02 +10:00
PTah 55d58b25a3 docs: sync README version lines with 2.1.4-SAC
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 14:14:43 +10:00
PTah 4b8e3313ae docs: document -NetlogonDest UNC path for update-rdp-monitor.ps1
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 09:21:17 +10:00
PTah ab53d47329 feat: RCM 1149 on RDS servers and login dedup (2.1.4-SAC)
Enable Rcm1149 monitoring on servers when RCM journal is available; dedup 1149 notifications like 4624.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 15:01:09 +10:00
PTah eecc0e1619 docs(deploy): clarify DailyReportEnabled comment in settings patch
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 14:41:53 +10:00
PTah 128dd278f6 feat(deploy): sync ServerIPv4 hint and DailyReportEnabled on upgrade (2.1.3-SAC)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-22 10:01:16 +10:00
PTah 8cefba1952 Merge branch 'main' of ssh://git.kalinamall.ru:2222/PapaTramp/RDP-login-monitor 2026-06-22 09:04:36 +10:00
PTah b4dd593160 docs: SAC WinRM update path without NETLOGON
Добавлен раздел об обновлении RDP через SAC: zip с сервера, staging и Deploy-LoginMonitor.ps1.
2026-06-20 20:03:59 +10:00
PTah f3a0adb7b8 fix: remove UTF-8 BOM from PowerShell entry scripts 2026-06-20 19:07:52 +10:00
PTah a0b473b4d7 docs: concise README for 2.1.2-SAC capabilities 2026-06-20 19:02:59 +10:00
PTah 2c1724fd90 fix: SAC poll URL interpolation in Sac-Client (2.1.2-SAC) 2026-06-19 23:49:44 +10:00
PTah a9ca50bc15 fix: default HeartbeatStaleAlertMultiplier (2.1.1-SAC)
Startup notification failed when settings lacked the variable; default 2 in script and deploy bootstrap.
2026-06-19 23:47:48 +10:00
PTah fb50fb3ea7 chore: bump version to 2.1.0-SAC 2026-06-19 23:42:08 +10:00
PTah 5d2b90779c feat: SAC agent command poll qwinsta/logoff (2.0.39-SAC)
Poll GET /api/v1/agent/commands every SacCommandPollIntervalSec;
execute qwinsta/logoff with run_as from SAC; POST result.
2026-06-19 23:37:58 +10:00
PTah afa80d169f chore(github): keep sanitized settings on public main
Production tokens and NETLOGON paths live on kalinamall/papatramp only. Use scripts/Push-PrivateMirror.ps1 after feature pushes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 11:12:59 +10:00
PTah 7f38c00094 fix: restore production secrets and paths for private git
Real Telegram/SAC tokens, NETLOGON and org hostnames back on kalinamall. GitHub main keeps placeholders; use scripts/Push-PrivateMirror.ps1 after public pushes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 11:12:29 +10:00
PTah c12f169189 merge: sync remotes; keep deploy StartupRebootDetectMinutes bootstrap
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 11:04:04 +10:00
PTah 37fdeb44c5 feat: deploy bootstrap StartupRebootDetectMinutes in agent settings
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 11:02:50 +10:00
PTah 746f9e23b2 feat: detect OS reboot on startup via System log and LastBootUpTime
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 10:42:40 +10:00
PTah 35e25063e3 chore(github): generic NETLOGON paths, remove mirror scripts
Replace \\B26\\NETLOGON with \\dc.contoso.local\\NETLOGON.
Remove scripts/ mirror tools and tools/Push-KalinamallOnly.ps1.
Sanitize login_monitor.settings.example (placeholders, no secrets).
Simplify update-rdp-monitor.ps1 to use origin remote only.
Keep dev tooling under tools/ only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 11:57:35 +10:00
PTah 7466254401 chore(docs): sync repository URLs for kalinamall mirror 2026-06-16 11:38:26 +10:00
PTah 8d17a0f560 chore(docs): GitHub default clone URL, remove .cursor from git
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 11:37:48 +10:00
PTah ae86cb3ea7 feat: persistent Security poll cursor with lookback replay (2.0.36-SAC)
Save last_security_poll.txt between runs and replay Security events up to SecurityEventsLookbackMinutes on startup so slow boot or late agent start does not miss RDP/WinRM-related logons.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 11:37:48 +10:00
PTah c146bb119a chore(docs): GitHub default clone URL, remove .cursor from git
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 11:36:51 +10:00
PTah 1fcd5cb5cf feat: persistent Security poll cursor with lookback replay (2.0.36-SAC)
Save last_security_poll.txt between runs and replay Security events up to SecurityEventsLookbackMinutes on startup so slow boot or late agent start does not miss RDP/WinRM-related logons.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 09:40:15 +10:00
PTah f48aee1d93 feat: persistent Security poll cursor with lookback replay (2.0.36-SAC)
Save last_security_poll.txt between runs and replay Security events up to SecurityEventsLookbackMinutes on startup so slow boot or late agent start does not miss RDP/WinRM-related logons.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 09:39:43 +10:00
PTah d5db38e2ae feat: deploy дописывает HeartbeatInterval при отсутствии в settings (2.0.35-SAC)
Ранний выход при совпадении версии не пропускает heartbeat; reload settings у работающего монитора.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 16:46:43 +10:00
PTah 91cde1668c merge: GitHub main + heartbeat on startup (2.0.34-SAC)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 11:52:15 +10:00
PTah 09f1b576bf feat: send agent.heartbeat on monitor startup (2.0.34-SAC)
SAC sees host online immediately after restart; periodic heartbeat every 4h unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 11:51:16 +10:00
PTah b6d293d21b fix: normalize ExecutionTimeLimit PT0S and load TaskQuery locally (2.0.33-SAC)
Treat Get-ScheduledTask limit strings as unlimited, prefer ProgramData for TaskQuery import, and copy UNC modules to temp before dot-source.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 15:27:47 +10:00
PTah 6ee5fdcbf2 fix: normalize ExecutionTimeLimit PT0S and load TaskQuery locally (2.0.33-SAC)
Treat Get-ScheduledTask limit strings as unlimited, prefer ProgramData for TaskQuery import, and copy UNC modules to temp before dot-source.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 15:27:38 +10:00
PTah 0da1d0f2ac fix: deploy TaskQuery script scope (2.0.32-SAC)
Publish TaskQuery helpers to script scope after import so ExecutionTimeLimit checks work from nested deploy callers; add RDP_DEPLOY_FUNCTIONS_ONLY early exit for isolated function loading.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 15:23:59 +10:00
PTah 5e9939724c fix: deploy TaskQuery script scope and internal autotests (2.0.32-SAC)
Publish TaskQuery helpers to script scope after import so deploy checks work from nested callers; add kalinamall-only smoke tests and RDP_DEPLOY_FUNCTIONS_ONLY hook.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 15:15:42 +10:00
PTah 31ebd5d653 fix: deploy task limit check without TaskQuery helper deps (2.0.31-SAC)
Deploy uses Get-RdpMonitorScheduledTaskExecutionTimeLimitResolved only; no call to Test-RdpMonitorScheduledTaskNeedsUnlimitedExecutionTimeLimit from external module.
2026-06-11 15:05:02 +10:00
PTah 5c23ac5f36 fix: deploy TaskQuery init must load Resolved helper (2.0.30-SAC)
Verify TaskQuery module by Get-RdpMonitorScheduledTaskExecutionTimeLimitResolved, prefer share path over stale InstallRoot, and guard verification when init fails.
2026-06-11 15:02:08 +10:00
PTah 6fa940dd43 fix: SendDeploySacNotice StrictMode and inline deploy task verify (2.0.29-SAC)
Safe ServerDisplayName access for SAC deploy notice; deploy falls back to built-in schtasks XML check when TaskQuery file is missing on NETLOGON.
2026-06-11 14:59:17 +10:00
PTah 463a3ef08c fix: deploy task verify via schtasks XML and notify SAC on update (2.0.28-SAC)
Stop false redeploy loops when Get-ScheduledTask fails, push agent version to SAC immediately after deploy, and skip redundant schtasks /Run during task maintenance.
2026-06-11 14:47:49 +10:00
PTah 399597c8a1 fix: sync HeartbeatInterval on every deploy, not only version upgrade
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 09:26:03 +10:00
PTah 365a7113cf feat: heartbeat 4h and deploy rewrites settings (2.0.27-SAC)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 17:25:20 +10:00
PTah 01d7525c4a fix(deploy): escape TaskName in log string (PowerShell parser); 2.0.25-SAC
${TaskName}: after colon was parsed as drive scope — deploy failed at parse time.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-08 11:51:06 +10:00
PTah 1d30ca2284 fix: RDP-Login-Monitor scheduled task unlimited ExecutionTimeLimit (2.0.24-SAC)
Default PT72H caused Task Scheduler to stop the monitor after 72 hours.
Register main task with PT0S, re-register on deploy and Ensure when limit is set.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-08 11:47:46 +10:00
PTah 80b2337d61 fix(winrm): Exchange strict mode to suppress false 91/4624 alerts
On Exchange role: require user in WinRM Event 91 EventData; correlate 4624 only when LogonProcess is WinRM. Prevents Outlook/LT3 false positives. Version 2.0.23-SAC.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 11:07:21 +10:00
PTah fe2e6d624f fix: inventory JSON without JavaScriptSerializer WARN (2.0.22-SAC)
Use ConvertTo-Json after CIM-safe Convert-AnyToJsonSerializable; pre-sanitize inventory details.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 10:00:11 +10:00
PTah 82c63fb9a8 feat: host inventory to SAC every 12h (GetInventory)
Collect CPU/RAM/disks/GPU/OS via agent.inventory; setting $GetInventory (default true); deploy adds missing setting.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 09:53:03 +10:00