Release history
From Server Manager
From Server Manager
to Amber Guard Lab.
A difficult evolution path:
From passive blocking to active exhaustion.
From shell scripts to a single Go binary.
From a personal tool to a public release.
Autonomous Geo-Engine, GNU AGPLv3 Relicensing, and Security Hardening
- Geo-Engine & Format: implemented fully autonomous
internal/geopackage withTGEO v1binary format (flat sorted ranges, per-blockCRC32, string deduplication). Eliminated dependency on externalgeoiplookupprocess andIPv6regex. Measured zero-alloc hot path consumption (~23 MB for daemon, ~2 MB heap for watcher) - Integrity & Security: enforced strict update pipeline:
stagingbuild → hash verification (GitHub API digest) →anomaly-guard(prevents data volume spikes) → atomicPOSIXswap. Added download/decompression caps, string sanitization, andflockagainst race conditions. Web panel switched to read-only for geo-data (api/geo/status), security headers added (Referrer-Policy,X-Frame-Options) - Management & Compatibility: auto-update disabled by default; managed via
SETTINGS,CLI(--geo-update), or scheduler. Log format (30 fields) and country names (legacyGeoIP Country Editionvocabulary) are fully preserved, ensuring seamless compatibility with accumulated statistics andGeoPulsewithout history wiping - Relicensing: project relicensed to
GNU AGPLv3(AGPL-3.0-only). AddedNOTICEfile documenting the license change fromv9.1.0onward while preservingApache 2.0terms for all prior releases. Git history remains untouched
Major Release: Global Localization, Calibrated Core Baselines, and Architectural Purity
- Analytics & Web Panel: implemented full forensic data pipeline with Actor Dossier v2 (FIFO session journal, daily evidence tables, share metrics). Achieved complete HTML/JS localization of all dashboards with a dedicated
Sharedblock and correct pluralization. Introduced GeoPulse widget with forensic metrics (GDI, Geo-Churn, Geo-Dominance). Strict time doctrine: event times formatted viatime.Localfor byte-exact match with log field - End-to-End Update & Privacy: implemented silent autorefresh across all dashboards with atomic DOM replacement (
DocumentFragment) and two-tier row highlighting. Privacy mode enabled by default: sensitive data and chart metrics protected by<agl-private>tag,setPrivTexthelper introduced to preserve structure during updates - Core & Network Security: introduced single source of truth
config/sysctl_spec.go. Baselinerp_filter(loose/2) andsomaxconn(4096) aligned with clean Ubuntu 24.04 measurements. Implemented UFW guard for port castling and surgical port 22 move without session drops. Panel session authentication (bcrypt, 8h lifetime, 60s lockout).install.shswitched to declarative menu with boot topology protection - TUI & UX: unified segment-based screen headers with Amber/AGL brand grammar. Introduced explicit
isErrorflag passing for alerts (eliminated prefix parsing). Implemented batch trap operations (START_ALL/STOP_ALL) with modal windows and event-sink. Added third backup contour (user_data), fixed selection strip geometry viapadListRowsToWidth, added adaptive horizontal table scrolling - Reliability & Hardening: log parser rewritten for reverse reading (O tail) to prevent freezes on files >100 MB. Introduced
defer recover()and infinite retry loop for log writers. Forattackers_of_pit.log, added async pipeline with panic interception and forensic hex payload dump. Eliminated doubletreventformatting via stricti18n.TrEventfusage. Hardened/assets/directory (directory listing disabled, custom 404)
Optimization of port priority handling
- Armor (
LIMIT) coexists with protection (doorsA/B). - The admin consciously chooses the limit under attack to conserve
RAM. - Enabling protection removes only tombstones (
Disabled), without touchingLIMIT; arming order no longer affects state. - Castling lock when armor is live on port
22: lock screen with a hint to remove armor from the standard port. - Reverse castling without automatic armor restoration: the admin arms armor on port
22consciously after the move. - Removing armor on the hidden castling port goes through the sanitizer without a tombstone, because the standard open state is absent.
- Doors without duplicates: temporary doors are created only by the web gateway through web knock;
activateRescueChanneldoes not create doors. - Gate
55111follows the server (WebServerEnabled), not the rescue channel; routes are regulated by the application, externally the admin sees404for diagnostics. - The full cycle (knock + purge) is executed only during castling, an active server, and active option
B. - The rule type marker is read when restoring a moved rule.
- The
/rescueroute without optionBreturns404. - Purging removes both doors when
Bis active. createAdminDooris idempotent: an existing door is not recreated.- Castling lock rejection gives an explicit response to the administrator.
ReconcileRescueChannel— automatic path without creating doors.SyncRescueChannelState— explicit path with creating doors.
Three levels of SSH protection
- Option
A(ssh_allow_in_from_ip): permanent whitelist of the administrator's IP. - Option
B(ssh_ip_web_knock): web knock with purging of temporary doors. - Option
C(web_https_panel_active): web panel availability. - Hierarchy:
BrequiresAand the server; the panel requires the server. - Cascade: disabling
AdisablesB; disabling the server disablesBandC. - Validation: private IPs are rejected for external infrastructure.
- Purging with active
Bremoves both doors (temporary and permanent). SyncRescueChannelState/ReconcileRescueChannel— service bridge.- Markers:
agl_rescue_active,agl_rescue_ip_pending,agl_moved_rule_type. - Signatures:
Master Admin Anti-Lockout,Localhost Core Loopback. purgeMovedPortRule— rule cleanup when protection is enabled.restoreMovedPortRule— rule restoration when protection is disabled.deactivateRescueChannel— surgical cleanup of onlySIG_HIDDEN.purgeSigHiddenRules— single point for door cleanup.
Mirror rule and watcher dormancy
- The mirror rule inherits the access type of port
22(allow/limit/reject). - The rule type marker (
agl_moved_rule_type) is created during any castling. - The watcher starts only if
WebServerEnabled= true. - Gate
55111follows the rescue channel, not the server. Restart=on-failurein the watcher unit; restart loop eliminated.SyncWatcherUnit— single point for starting/stopping the unit.- Migration: the old
Restart=alwaystemplate is forcibly overwritten. web_server_enabled— physical listener (level 1).- Fail-closed: no password → both toggles are disabled.
Synchronous rescan
- Perimeter rescan after castling became synchronous.
- Removed anonymous goroutine launch: the process does not terminate until the inventory is updated.
defer recover()protects against panics inside the goroutine.
Forensics
- Pool of multi-traps under a single daemon.
- Declarative
tarpit_inventory.jsonwith reconcile cycle. - Three-factor status:
DECLARED→DAEMON→MARKER. - 30 forensics metrics via
SYS_GETSOCKOPTTCP_INFO. - Autonomous idle watcher with vault purge.
- Web gateway with web knock (
bcryptpseudo-2FA).
Geo in the second echelon
- Geo identification is performed after banner dispatch.
- Geo timeout reduced from 5 sec to 700 ms.
- A hung geo process does not hold the worker.
- Banner is the first echelon, geo is the second.
Backup symlink fix
- For symlinks, the real target is read via
os.Readlink. - Self-referencing symlinks that broke Apache/Nginx after restore are eliminated.
- Relative path is calculated from the root
/, not from the parent directory.
Fallback scan removal
- The fallback scan of
/proc/net/tcphas been removed from the counter pipeline. - The scan counted
ESTABLISHEDtouches of a foreign port (legitimatesshd). - Semantics: no daemon — no held sessions — zero.
Cursor normalization fix
- Guarantee that the
SETTINGScursor points to a selectable item. ensureActiveRowSelectable: cursor is not on a group header.- Calling
ValueGetteron a header no longer crashes the panel.
Server auto-update
- Autonomous daily OS update cycle.
--autoupdate: oneshot mode (update+simulate+dist-upgrade+reboot-check).- Toggles
auto_update_enabledandauto_update_rebootinSETTINGS. - Declarative creation/removal of
agld_autoupdate.service/timer. - Timer: daily at 04:00 + random jitter up to 1 hour.
DEBIAN_FRONTEND=noninteractive,force-confdef/confold.- Check
/var/run/reboot-required+ delayed rebootshutdown -r +1. - Flock lock to protect against parallel launch; busy lock =
WARNING, not alarm. - Markers
last_runandpending_reboot. - Binary toggles in
SETTINGSare inverted with ←/→ arrows. - Declarative management of systemd units.
Multiple SSH geometry
- Edge states of the multiple listeners contract.
- First process snapshot — silent baseline.
- Only changes in the set of additional listeners are logged.
- Edge “
sshdis not listening to anything” — a real problem.
ROV transaction
- During purging, kernel rules, on-disk receipts, and the inventory declaration are destroyed simultaneously.
sealMoat— transaction tail, executed only during a real act.PurgeLimitRule— unified sanitizer without the “Disabled” tombstone.RECONCILE_ARMORno longer restores the limiter from a false declaration.
Build metadata and audit
buildinfo.go: version and build time via-ldflags.--versionand--info— human-readable proof of injection.- Three-layer journal architecture:
logActionCore→LogActionEvent→LogAction. - Record format: time [COMPONENT] [ACTION] → [STATUS] |
event=CODE| description. - Default interface language — English (global standard).
- One-time override
--lang(not written to config). - Web knock and web panel prefixes: 12 hex characters.
eventcodes.go— registry of machine event codes.- Flag
--plainfor plain text output of--info. - Interactive information menu (6 items).
- Branded name rule: truncation only with a dot.
- HTTPS TLS 1.2+ self-signed gateway.
- Secret 12-hex URL prefix.
- Master password
bcryptwith salt. - Anti-bruteforce: 5 attempts → 60 sec lock, 5 sec per request.
- Two-stage opening: instant
iptables+ persistentUFW.
Stateful migration of limits
- STATEFUL MIGRATION OF LIMITS: the
UFWlimiter does not depend onsshd. - UBUNTU 24.04 SERVICE REVIVAL: elimination of race condition between
ssh.serviceandssh.socket. - Port
22is protected from the moment of opening until control is transferred to the socket.
Execution hygiene and safeguards
R-2a:multitarpit_service_protocol.gomigrated tosys.RunTimeout.R-2b:tarpitctlmigrated tosys.RunTimeoutfor allsystemctl.R-2c:armorrouter.gomigrated tosys.RunTimeoutforsystemctl.R-3a:SCAN_PERIMETERvia service layer.R-3b:view_armor_controller.govia service layer.R-3c:view_armor.govia service layer.R-3d:view_port_map.govia service layer.R-4a: Config reload with explicit error logging.R-4b:utils.goconfig reload with logging.R-5:fuseRejectis called after releasingpoolMu.R-6: Singleton lock viaflockfor daemon modes.R-7:sshd_configbackup hygiene: three fresh rolling backups.R-8: Dynamic border color ofliveTerminal: cyan → magenta during combat.R-8: Control verification of custom port during castling.1.4:O_NOFOLLOWfor the signal file.1.7: Anti-bruteforce delay raised to 5 sec, mutex.- Unit cache interval reduced from 10 to 3 seconds.
shortTarpitID— fixed identifier column width.containsWithBoundary— protection against port prefix collisions.systemctl is-activefor watcher:exit code 3+inactive= normal.
Wave of residual races
config.Update— snapshot mutation transaction: clone → mutation → publication → write.- In-place mutations of the published snapshot eliminated.
StartTarpitControlPaneldecomposed intoinitializePanel/handlePanelEvent/handlePanelTick.- Added
renderScreento eliminate rendering duplication. PanelStateencapsulates local panel state.handleEnterClickmoved out of the event handler.- Content matching of hints by row tag instead of indices.
- Separate edge-triggered degradation flags for
UFWand watcher. StopWorker— thread-safety contract formalized: only underpoolMu.Lock.
Wave of fixes
1.2: Hash present — plaintext in RAM is empty.1.3: Web knock directory 0700 (was 0777).1.5: Strict IPv4 validation vianet.ParseIP.1.7: Bcrypt password hash instead of SHA-256.1.8.1: Backup ofsshd_configbefore castling.1.8.2:sshd -tvalidation before restart.1.8.3: IfPortis not found — append to end of file.1.8.4:sshd_configpermissions = 0600.1.8.5: Check that the castling port is free.1.9: Transactional inventory update viaUpdateDetectedAppArmorStatus.2.1: Variance cannot consume the base sleep.2.2: Socket bind before pool registration and marker write.2.2+: Limited retry (3 attempts) before terminal failure.2.2-ext:fuseReject— three consecutive refusals → declaration inSTOPPED.2.2-fix: Card always reads the fresh declaration.2.3:C— pointer to immutable snapshot.2.4: Lazy inventory initialization moved out of the reader.2.5: Service name validation beforesystemctl.2.5-ext:PrettyServiceName— replacement ofstrings.Title.2.6: Kernel parameter baseline (snapshot before armor).2.7: Real kernel check vianet.Listen.2.7-fix: Safeguard verdict is mandatory for execution.2.8: SSH port detection cache (10 sec).2.8-ext: Edge-triggered logs for geometry discrepancies.
TLS gateway and forensics
M3f: ECDSA P-256 self-signed certificate (10 years).M3f: Fail closed — no certificate, no server.M3g: SHA-256 password hash (laterbcrypt), plaintext removed from config.- Sprint 1 (A): Extended
TCP_INFOfields (TotalRetrans,State,Retransmits,Probes,Wscale). - Sprint 1 (B):
CloseReason(FIN/RST/TIMEOUT/OUR_CLOSE). - Sprint 1 (C): Running statistics of
IAT(intervals between reads). - Sprint 1 (D): Read size buckets (
Tiny/Small/Medium/Large). - Sprint 1 (E): Pipeline health counters (drops, latency).
H1: Cleanup ofARMOR_OFFtombstones when activating limit.C1: Safeguard: port with active trap is outside armor jurisdiction.C2: Status priorityTARPIT>ARMOR>UNPROTECTED.C8: Protection of rescue channel and hidden SSH from traps.C9: Rescue channel port receives its own label.- BLOCK 3.1: All external commands via
sys.RunTimeout. sysctlwrite error is no longer ignored.LogWarnIfErr— machine event for non-critical failure.httpErrorLogAdapter— redirection of HTTP server errors to the journal.O_NOFOLLOW+ 0600 permissions for the signal file.net.ParseIPinstead of regex for address validation.- Bcrypt password comparison instead of SHA-256 and
==. - Anti-bruteforce: 5 sec delay, lockout after 5 failures.
- Bruteforce counter protected by mutex.
Rescue channel and watcher
M2:AdminIdleTimeout— administrator idle timeout (default 10 min).M3: Rescue channel “web knock” — signal file in/dev/shm/.M3b: Autonomous web knock HTTP server on port55111.M3c: Web server lifecycle controller (syncWebRescueServer).M3c: Terminal dormant state (safeClosed) after purge.M3c: First watcher tick is executed immediately.M4:ReconcileArmorStates— armor reconciliation at TUI start.- Armor is restored if a receipt exists without a rule.
- Armor is not removed if a rule exists without a receipt (only
WARNING). - Parsing
/var/run/utmpdirectly withoutexec who(fail-safe).
EvalSymlinks and log cache
filepath.EvalSymlinksfully resolves the/proc/PID/exechain.- Limiter marker moved from volatile
DirRunto non-volatileDirLib. - Log tail cache (2 sec): menu navigation does not reread logs.
- Reading only the file tail (last 64 KB) instead of full scan.
Transaction layer and trap cards
WithInventoryTx— read-modify-write transaction underflock.- Lock file
.lockdoes not participate inrename— lock does not drop. - Created
TRAP_CARDscreen (START/STOP/EDIT/DELETE/BACK). - Created
TRAP_EDITORscreen (editing parameters of a stopped trap). - Merge semantics instead of overwrite upon reactivation.
- Primary metrics snapshot removed: metrics are taken once before report.
openLogWithRetry— retries for opening the log file.- Batch
fsync:syncFlushInterval = 1s,syncBatchSize = 64. - Global config synchronization through controller, not directly.
ENTERin the trap list became passive: it opens the card.
Relocation of perimeter scan
- Button
SCAN_PERIMETERmoved fromSETTINGStoANTIDDOS. SCAN_PERIMETERplaced on row 1 (afterSYSCTL).- Visual stub “Scanning...” when the scanner starts.
- Safeguard against port duplication in inventory when creating a trap.
- All blocks of the
ARMORscreen have fixed height.
Unified trap daemon
- Daemon
--tarpit-daemonmanages all traps (port22+ multi). - Base port
22trap — “zero worker” with flagis_core. - Removed premature
go StartTarpitCoreListenerfrom TUI. - Removed
go StartTarpitManagerfrom TUI mode. - Added IPC counter initialization:
InitShmMasterin daemon,InitShmSlavein TUI. - Signal handling (
SIGINT,SIGTERM) in daemon mode. ReconcileSystemStatesrewritten: source of truth = inventory + markers.- Field
Jitterrenamed toDelayVariancein all structures. - Added fields
MaxConn,IsCore,ActivatedAt,WorkerPIDto the contract. - Added field
PlannedDelaytoRawConnectionEvent. - Replaced hardcode “13” with
event.PlannedDelayinConnectionLogWriter. - Trap status check via
tarpitctl.IsDaemonAliveinstead ofsystemctl is-active. - Removed manual marker deletion in
uiCloseAndStopTarpitDaemon. - The client does not create or delete markers — only the daemon does.
- Restored interprocess tracker via
/dev/shm/+syscall.Mmap. GetActiveTrappedBotsCountscans/proc/net/tcp.- Renamed trap inventory data contract.
Main menu ticker isolation
- Main menu ticker isolated from network structures of traps.
- Main menu ticker no longer calls heavy network operations.
Dynamic reading of trap state
- Screen
MULTI_TARPITfully readstarpit_inventory.json. - All static stub rows removed.
Language initialization order
- Fixed call order of
InitLanguagerelative to journal writing. - Machine codes instead of descriptions no longer appear in the journal due to wrong order.
Closing the hardcode layer
- Two leaks in
view_tarpit_controller.gomoved toi18n. - Pre-init console alerts — technical English outside dictionaries.
Geo installation logs
- Geo tool installation logs converted to journal events.
- Duplicate
timestampin geo tool installation records eliminated.
TUI exit event
- Post-init exit note converted to event
main.tui_exit.
TrEventf fallback
TrEventfwith arguments for a nonexistent code returns the code verbatim.- Eliminated appearance of
%!(EXTRA ...)in the journal.
Internationalization doctrine
- All strings moved to
i18n/:config/,internal/*,main.go,tui/. - Journals:
sys.LogActionwrites machine codes; descriptions inLogTranslation.Events. - Language switcher in
SETTINGS(RU/EN), runtime-safe. - Containers:
UITranslation(human sees) andLogTranslation.Events(journal). - Rule: markup and geometry in code, translatable text in dictionaries.
- Module isolation: one module = one key prefix.
- Fallback A.2: unknown code → the code itself is returned; the string is never empty.
- Gateway
scripts/i18n_gate.sh: zero-tolerance checks.
Socket block geometry
- Socket block height on the port map hard-fixed at 13 rows to prevent grid flickering.
- Dynamic widget resizing eliminated.
System inventory
- Created
config_inventory.go: three circuits (processes → sockets → correlation). - Parsing
ss -lntpwith filtering of local loops and VNC consoles. - Security safeguards: ignoring
127.0.0.1,::1, ports5900-5999. - Suspicious sockets without PID are marked as
UNKNOWN_PROCESS (Suspicious). - All third-party analyzers have been moved to conservation mode.
- Screen
PORT_MAPconverted to a pure passive visualizer.
Marker and configuration protocol
TarpitIDformat:agl_tarpit_listener_port.NUMBER(dot separates socket).Configstructure extended with fieldsAglLogarchiveDir,GeoTool.- Deterministic JSON reading with soft fallbacks.
Heavy ANTIDDOS click logic
HandleArmorMenuClickhandlesARMOR_ON,ARMOR_OFF,SYSCTL, dynamic defense lines.- Progress windows for mass armor arming/removal operations.
- Security safeguard against conflict with the honeypot in manual mode.
Tarpit hint fix
- Restored unique hints for the parameter configuration screen (row 1).
- Restored unique hint for technical deception specification output (row 5).
Backup circuit
HandleBackupMenuClickcallsDrawBackupProgressGrid.- Asynchronous generation of three session files (system, packages, forensics).
- Automatic FIFO rotation of old sessions when space is deficient.
Hardened progress geometry
- Progress window fixed: width 80 characters, height 11 rows.
- Operation chronology with timestamps.
- Final report with line appearance animation.
Major receipt standard
- Canonical paths to markers in
/var/lib/amberguard/states/defined. - Unified marker naming format introduced for all subsystems.
- Separation of volatile (RAM) and persistent (disk) markers.
Abandonment of verification loops
VerifyUfwRulePresencetakes strictly one fast firewall snapshot.- Removed all
time.Sleepand repeated polls. - Zero blocking ensured during rule verification.
Descriptive UFW comments
- When activating limit, the comment contains the service name:
DDoS Rate Limit Port N (ServiceName). - When deactivated, a descriptive comment is added:
DDoS protectionDisabledon Port N (ServiceName). - Eliminated anonymous rule naming in
UFW.
Two-factor verification
- In the
CHECKbranch ofSetCustomRateLimit, two-factor security verification was added. - Factor 1: receipt presence on disk.
- Factor 2: real presence of the rule in the kernel via
VerifyUfwRulePresence. - On desynchronization — self-restoration (removal of dead marker).
Monolithic perimeter contract
- Created
ExecuteArmorRoute— central interface dispatcher of the protection subsystem. - Defined
PerimeterInventory— monolithic configuration contract. - Implemented
SetCustomRateLimit— management of Netfilter/UFWlimit rules. - Implemented
SetMovePortProtocol— OpenSSH port castling algorithm. - Introduced format of state markers and armor receipts.
- Defined
UFWcomment signatures (corporate standard).
Shell scripts and passive blocking
Before rebirth: fail2ban-style blocking, manual UFW rules, no forensics, no autonomy. The more blocking — the larger the DDoS. The exhaustion doctrine was born from this dead end.