semanage tips — authorized SELinux policy-store literacy
semanage helps authorized labs sample SELinux policy-store literacy on hosts they own. Pair with getsebool-tips, semodule-tips, getenforce-tips, seinfo-tips, selinux-tips. Prefer lab VMs — never edit policy stores on foreign hosts without permission.
Snapshot
| Field | Value |
|---|---|
| Surface | semanage tip checklist (fcontext / port / boolean list) |
| Job | Authorized SELinux policy-store literacy |
| Peer | getsebool-tips |
| Peer | semodule-tips |
| Peer | getenforce-tips |
| Peer | seinfo-tips |
Tip checklist (authorized only)
- Confirm you may run
semanageon the lab host (syllabus box you own or were given access to; typically needs root/CAP). - Prefer documenting who / why / ticket before any fcontext/port/boolean add — never change production policy store without change control.
- Record short factual notes; quote short Evidence (mapping pattern / port / boolean name — never secrets).
- Optional: boolean peer → getsebool-tips.
- Optional: module peer → semodule-tips.
- Prefer disposable lab VMs for semanage drills; quote non-secret mapping labels afterward as Evidence.
- Prefer read-only
semanage fcontext -l/port -l/boolean -lfor most Evidence binders — refuse unauthorized hostile policy-store cookbooks. - Stop at literacy — no attack or unauthorized MAC-bypass cookbooks.
Allowed framing
- Classroom labs reviewing
semanage fcontext -land port/boolean list read-backs on authorized disposable hosts. - Binding short factual notes as Evidence (mapping pattern / port / boolean — no secrets).
- Documenting expected vs observed policy-store mappings for authorized notes.
- Comparing semanage ↔ getsebool / semodule / getenforce / seinfo peer tip pages under one binder.
- Testing syllabus-approved fcontext/port adds only when change control authorizes that drill on lab resources.
Scope we will not cover
- No crack/pirate/keygen via semanage.
- No intentional unauthorized SELinux policy-store edits against foreign hosts.
- No secret-theft or mapping/credential harvesting against hosts you do not own.
- No cookbooks that weaken SELinux via hostile fcontext/port/boolean changes for attack without authorization.
- No
semanagedeletes framed as exploit steps against production.
Beginner path (authorized only)
- Obtain one syllabus-approved disposable lab host with policycoreutils-python / semanage available.
- Prefer a throwaway lab VM before any policy-store add drill.
- With authorization, run
semanage fcontext -l(or port/boolean); quote selected mapping labels as Evidence. - Optional: peer tip pages above when the syllabus asks.
- Stop at literacy — no attack or unauthorized policy-store-bypass cookbooks.
Practical notes for authorized labs
semanagemanages the SELinux policy store — keep Evidence labels distinct from semodule-tips module inventory.- Pair with getsebool-tips when the syllabus zooms on boolean values after a semanage boolean change.
- Policy-store dumps may embed sensitive mappings — never paste secrets into notes or git.
- Prefer documenting mapping names/patterns the syllabus authorized without dumping full privileged stores.
- Never commit SELinux policy-store dumps with secrets to git — even for labs.
FAQ-aligned refusals (quick)
- Foreign-host SELinux policy-store edit → refuse.
- Unauthorized MAC-bypass / hostile-mapping attack cookbooks → refuse.
- Attack/credential-theft framing → refuse.
- Prefer authorized, redacted, secret-free Evidence.
- Use getsebool / semodule / getenforce / seinfo peer tip pages when the syllabus asks.
- No crack or unauthorized-access framing.
For legal, authorized and educational use only.
FAQ
What is a "semanage tip" page in BinBench framing?
A checklist for authorized SELinux policy-store Evidence (semanage fcontext -l / port -l / boolean -l on lab hosts) on hosts you own or were given syllabus access to — not a cookbook for hostile policy-store edits on foreign servers.
How does this relate to getsebool-tips / semodule-tips / getenforce-tips / seinfo-tips?
getsebool-tips covers boolean read-backs; semodule-tips covers modules; getenforce-tips covers mode; seinfo-tips covers policy queries. This page zooms on a semanage tip checklist — it does not overwrite those pages.
Can I run semanage against hosts I do not own?
No. Authorization first. BinBench will not publish unauthorized SELinux policy-store drills against foreign hosts.
Does this teach attack or SELinux-bypass PoCs via semanage?
No. Mentions of attack/bypass appear only as refusals. Authorized literacy only — prefer lab VMs and redacted fcontext/port/boolean labels. Never teach hostile policy-store edits as an attack step.
Does this teach secret theft via semanage?
No. Never paste SELinux policy-store dumps with secrets, foreign host inventories, or credential-bearing mappings into notes. Prefer documenting mapping names/patterns only.