Course contents · Scope and configuration
- 1. Separate an approved baseline from an observed baselineFree
- 2. Configure syscheck without collecting unnecessary file contentsFree account
- 3. Test content changes, metadata changes and missing alerts separatelyFree
- 4. Match a file-change alert to an authorized releasePremium
- 5. Close maintenance without hiding an unexplained changePremium
- 6. Defend a file-integrity monitoring handover with bounded evidencePremium
Separate an approved baseline from an observed baseline
Define the host, monitored paths, trusted release evidence and operating owner before collecting file hashes. An OSSEC baseline records observed state; acceptance requires independent authorization.
22 MIN
By AISecurityInterviews · Updated
TL;DR: Define the host, monitored paths, trusted release evidence and operating owner before collecting file hashes. An OSSEC baseline records observed state; acceptance requires independent authorization.
Where you are. Step 1 of six: scope and configuration.
Reference and lab. OSSEC 4.4.1 Linux agent/manager behavior, official documentation and pinned source reviewed November 2026. Existing authorized training deployment; no installation or upgrade recommendation. Cedar Analytics and all records are fictional. Python models run offline. Product configuration and CLI examples are documentation-checked and were not executed on OSSEC. Use optional product steps only on systems you own or are explicitly authorized to test.
Decide what a difference means
Cedar Analytics wants to know whether its inference service configuration changed outside an approved release. A stolen deployment account could alter that configuration; an authorized upgrade could alter the same file. Both produce a difference. The monitoring service needs evidence of what changed, while the application owner decides whether the resulting content belongs to the approved release. A timestamp or a familiar filename cannot make that decision.
Choose one already enrolled Linux training agent, identified in the packet by customer, manager, agent ID and hostname. The fictional agent is 042, with a fixture directory at /opt/cedar-fim-lab. The directory contains harmless text, no credentials and no application dependencies. Do not infer that an actual agent with this ID belongs to Cedar. Resolve the real training identity before using any optional command.
Keep two kinds of baseline
The observation baseline is what the monitoring system previously recorded. The approval baseline is what the customer expects from a reviewed release, including relevant permissions and ownership. An initial scan of a compromised or misconfigured host can faithfully record the wrong state. A subsequent clean comparison means only that the observed properties have not changed since that reference.
Keep the approved release manifest in a separately controlled location. Record its publisher, revision, approval and applicable host scope. A checksum stored beside a file under the same writable account cannot establish trustworthy provenance. For a service configuration, the manifest can include its expected digest and permission policy; it must also explain which locally generated values are deliberately variable. Do not put secret configuration contents into the teaching packet.
Inspect the collection boundary
In OSSEC's architecture, agents collect observations and the manager holds integrity-checking state and analysis. The official architecture illustration shows those relationships. Inspect the agent-to-manager boundary and the separate configuration/response functions. The historical drawing is not evidence of current platform support or a screenshot of this lab.
On an authorized training manager, these documented read-only commands help identify the enrolled agent. They are templates, not executed lab output:
/var/ossec/bin/agent_control -l
/var/ossec/bin/agent_control -i 042
Use agent_control's reference to interpret identity, version, keepalive and scan-start information. An active connection establishes communication, not complete monitoring of the intended paths. Confirm filesystem location and read access with the endpoint owner. A container's internal path and the host's mounted path may describe different objects; this course's optional pilot uses an ordinary local directory.
Set customer and provider responsibilities
The customer application owner approves expected content. The endpoint owner authorizes fixture changes and restores them. The provider records configuration, observations and exceptions. A separate customer reviewer accepts any uncovered interval. Give the provider only the administrative capability needed for the agreed task; this course does not claim that sharing one manager automatically isolates different customers.
Define the observable properties explicitly: content, size, owner, group and permission bits. Full ACL, registry and remote-filesystem coverage are outside this Linux pilot. Record who can read the resulting evidence and how long it is retained. The ability to read a file for monitoring must not silently become permission to redistribute its contents.
The following offline model joins observed bytes with a separately supplied expected digest. It illustrates the acceptance decision, not the OSSEC database format or a cryptographic trust distribution system.
from hashlib import sha256
approved = sha256(b"mode=review\n").hexdigest()
observed = sha256(b"mode=review\n").hexdigest()
wrong = sha256(b"mode=automatic\n").hexdigest()
def accept(digest, scope, publisher_verified):
return digest == approved and scope == "cedar-lab" and publisher_verified
print(accept(observed, "cedar-lab", True)) # => True
print(accept(wrong, "cedar-lab", True)) # => False
print(accept(observed, "other-customer", True)) # => False
print(accept(observed, "cedar-lab", False)) # => False
Approved release
independent owner
Agent observation
specific host and path
Manager history
previous observed state
Acceptance
compare both sources
Do this before moving on
Create Cedar's baseline record with agent identity, fixture path, expected digest source, monitored metadata, evidence readers and recovery owner. The observed digest matches, but the release manifest came from an unreviewed copy on the host. Decide whether to accept it.
Worked feedback: keep the state provisional. A matching digest proves agreement with that copy, not its authority. Obtain the approved manifest through the application owner's controlled process and preserve the observation separately.
Go deeper
- File-integrity monitoring defines the difference between observation, authorization and missing coverage.
- Hashes, MACs and signatures explains why a hash needs a trusted comparison value.
- Incident handling connects evidence custody to containment and recovery authority.
Key takeaways
- Bind every observation to a customer, host and path.
- Keep approved release evidence separate from observed state.
- A working agent connection does not prove path coverage.
Check yourself
Say or write your answer first, then reveal. Explaining it from memory, in your own words, is the skill an interviewer is checking.
1A fresh baseline matches a host whose release provenance is unknown. What can you claim?
2Which field prevents a reused agent ID from silently selecting another customer?
Sign in to track which lessons you have finished.