
D3fend Harden
- 28 installs
- 7 repo stars
- Updated May 20, 2026
- daemon-blockint-tech/agentic-enteprises-skill
Applies hardening controls with MITRE D3FEND: authentication, application hardening, credential management, encryption, and secure configuration.
About
An agent skill for hardening controls using MITRE D3FEND, covering authentication, application hardening, credential management, message integrity, and source code defenses. A security engineer uses it when hardening systems, configuring MFA, implementing encryption, or reviewing code security.
- MFA, certificate pinning, and control flow integrity
- Input validation and secure configuration
D3fend Harden by the numbers
- 28 all-time installs (skills.sh)
- Ranked #1,509 of 2,203 Security skills by installs in the Skillselion catalog
- Data as of Jul 29, 2026 (Skillselion catalog sync)
npx skills add https://github.com/daemon-blockint-tech/agentic-enteprises-skill --skill d3fend-hardenAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 28 |
|---|---|
| repo stars | ★ 7 |
| Last updated | May 20, 2026 |
| Repository | daemon-blockint-tech/agentic-enteprises-skill ↗ |
What it does
Applies hardening controls with MITRE D3FEND: authentication, application hardening, credential management, encryption, and secure configuration.
Files
D3FEND — Harden
When to Use
- Implementing authentication controls (MFA, certificates, biometrics, tokens)
- Hardening applications and platforms (configuration, patches, encryption)
- Managing credential lifecycle (rotation, pinning, scrubbing, policies)
- Validating input and enforcing domain/operational logic
- Securing source code (memory safety, pointer validation, dead code elimination)
- Reviewing boot integrity, driver signing, and firmware protections
When NOT to Use
- Detection engineering or monitoring →
d3fend-detect - Network segmentation or access mediation →
d3fend-isolate - Decoy and deception operations →
d3fend-deceive - Incident response or eviction →
d3fend-evict - Secure coding deep dives →
devsecops/senior-software-engineer
Core Workflows
1. Authentication Hardening
| Control | Implementation |
|---|---|
| Multi-factor Authentication | TOTP, WebAuthn, hardware keys |
| Certificate-based Auth | mTLS, client certs, PKI |
| Biometric Auth | Fingerprint, face, behavioral |
| Token-based Auth | JWT with short expiry, rotation |
| Password Policy | Length, complexity, breach check |
See `references/authentication.md`
2. Application & Platform Hardening
- Application config hardening (disable unused features, remote access)
- Control flow integrity (CFI, stack canaries, ASLR, pointer auth)
- Bootloader authentication, TPM boot integrity
- Disk/file encryption, hardware write protection
- Software update management, driver load integrity
See `references/application_platform.md`
3. Credential & Message Hardening
- Credential rotation (certs, passwords, tokens)
- Certificate pinning (mobile, embedded)
- Message authentication (HMAC, MAC) and encryption
- Token binding to prevent session hijacking
See `references/credential_message.md`
4. Source Code Hardening
- Input validation (range, type, pointer, null checks)
- Memory safety (initialization, nullification, bounds)
- Use trusted libraries, eliminate dead code
- Exception handler validation, domain logic checks
See `references/source_code.md`
When to load references
- Authentication →
references/authentication.md - Application & platform →
references/application_platform.md - Credential & message →
references/credential_message.md - Source code →
references/source_code.md
Application & Platform Hardening
Technique Coverage
| D3FEND Technique | Description |
|---|---|
| Application Hardening | Secure app configuration |
| Application Configuration Hardening | Remove defaults |
| Disable Remote Access | Limit remote exposure |
| Control Flow Integrity | Prevent control hijacking |
| Dead Code Elimination | Remove unused code |
| Exception Handler Pointer Validation | Secure exception handling |
| Pointer Authentication | ARM pointer signing |
| Process Segment Execution Prevention | W^X memory |
| Segment Address Offset Randomization | ASLR |
| Stack Frame Canary Validation | Stack protection |
| Platform Hardening | OS/firmware hardening |
| Bootloader Authentication | Verified boot |
| Disk Encryption | Data at rest |
| Driver Load Integrity Checking | Driver signing |
| File Encryption | File-level encryption |
| Hardware-based Write Protection | ROM write protection |
| Physical Enclosure Hardening | Tamper resistance |
| Software Update | Patch management |
| System Configuration Permissions | Least privilege config |
| TPM Boot Integrity | Measured boot |
Implementation
Memory Protection
| Control | What It Does | Enable |
|---|---|---|
| ASLR | Randomize memory layout | OS default |
| DEP/NX | Mark stack/heap non-executable | OS default |
| Stack Canaries | Detect stack overflow | Compiler flag |
| CFI | Validate indirect branches | Compiler + runtime |
| Pointer Auth | Sign pointers (ARM) | Hardware support |
Boot Integrity
Power On → BIOS/UEFI → Bootloader → OS
↓ ↓ ↓ ↓
TPM PCR Measured Verified Checked
extends extends boot against
values values chain expectedPatch Management
| Asset Type | Patch Source | Frequency |
|---|---|---|
| OS | Vendor (WSUS, apt, yum) | Weekly |
| Applications | Vendor/auto-update | Weekly |
| Firmware | OEM | Monthly |
| Containers | Base image refresh | Per release |
| Network devices | Vendor | Monthly |
Encryption
| Layer | Method | Key Management |
|---|---|---|
| Disk | LUKS, BitLocker, FileVault | TPM + PIN/recovery |
| File | EFS, native encryption | User cert |
| Database | TDE | HSM-backed |
| Application | Application-layer crypto | Key vault |
Authentication Hardening
Technique Coverage
| D3FEND Technique | Description |
|---|---|
| Agent Authentication | Service-to-service auth |
| Biometric Authentication | Fingerprint, face, etc |
| Certificate-based Authentication | mTLS, client certs |
| Multi-factor Authentication | 2FA/MFA |
| Password Authentication | Password policies |
| Token-based Authentication | JWT, OAuth, session tokens |
Implementation Guide
Multi-factor Authentication
| Factor Type | Examples | Strength |
|---|---|---|
| Knowledge | Password, PIN | Low |
| Possession | TOTP app, SMS, hardware key | Medium |
| Inherence | Fingerprint, face, iris | High |
| Context | Location, device, behavior | Medium |
Deployment:
- Enforce MFA for all privileged accounts
- Prefer TOTP/WebAuthn over SMS
- Require hardware keys for admin/root
Certificate-based Authentication
Client → presents client cert → Server verifies against CA
Server → presents server cert → Client verifies (mTLS)- Maintain private CA or use public PKI
- Short certificate lifetimes (90 days)
- Automated rotation
- CRL or OCSP for revocation
Password Policy
Minimum length: 16 characters
Complexity: not required (length > complexity)
Breach check: against HaveIBeenPwned
Rotation: only on compromise, not periodic
Storage: Argon2id, bcrypt, or scryptToken Security
| Token Type | Lifetime | Storage |
|---|---|---|
| Access token | 5-15 minutes | Memory |
| Refresh token | 7-30 days | Secure cookie + httpOnly |
| Session cookie | Session + sliding | Secure + SameSite |
Credential & Message Hardening
Technique Coverage
| D3FEND Technique | Description |
|---|---|
| Credential Hardening | Protect credentials |
| Certificate Pinning | Pin known certs |
| Credential Rotation | Periodic rotation |
| Certificate Rotation | Auto cert renewal |
| Password Rotation | Password changes |
| One-time Password | OTP/TOTP |
| Strong Password Policy | Complexity rules |
| Change Default Password | Eliminate defaults |
| Token Binding | Bind token to device |
| Message Hardening | Protect messages |
| Message Authentication | HMAC/MAC |
| Bus Message Authentication | ICS bus auth |
| Message Encryption | Encrypt in transit |
| Transfer Agent Authentication | Secure transfer |
Credential Lifecycle
Rotation Schedule
| Credential Type | Rotation Frequency | Method |
|---|---|---|
| API keys | 90 days | Automated reissue |
| Service accounts | 90 days | Vault rotation |
| Certificates | 1 year max | Auto-renewal |
| Passwords | On suspicion | Forced reset |
| Secrets (DB, etc) | 90 days | Vault dynamic |
Certificate Pinning
Mobile app → embed expected cert hash
If server presents different cert → reject connection
Fallback: allow user override with warningMessage Integrity
| Protection | Mechanism | Use Case |
|---|---|---|
| Authentication | HMAC-SHA256 | API requests |
| Encryption | TLS 1.3 | All network traffic |
| Signing | ECDSA/RSA | Software updates, emails |
| Sealing | Envelope encryption | Data at rest |
Token Binding
Token issued to specific device/browser
Bound via Channel ID or TLS channel
Stolen token cannot be used on different deviceSource Code Hardening
Technique Coverage
| D3FEND Technique | Description |
|---|---|
| Source Code Hardening | Secure coding practices |
| Credential Scrubbing | Remove secrets from code |
| Domain Logic Validation | Validate business rules |
| Operational Logic Validation | Validate ops rules |
| Integer Range Validation | Check integer bounds |
| Pointer Validation | Safe pointer use |
| Memory Block Start Validation | Buffer start checks |
| Null Pointer Checking | Null checks |
| Reference Nullification | Clear refs after free |
| Trusted Library | Use vetted libraries |
| Variable Initialization | Init before use |
| Variable Type Validation | Type checking |
Secure Coding Checklist
Input Validation
# Good: validate range, type, and format
def process_age(age_str):
try:
age = int(age_str)
if not (0 <= age <= 150):
raise ValueError("Invalid age range")
return age
except ValueError:
raise ValueError("Age must be a valid integer")
# Bad: trust input
def process_age_bad(age_str):
return int(age_str) # May crash or accept invalidMemory Safety
| Language | Safe Practices |
|---|---|
| C/C++ | Use smart pointers, bounds-checking APIs, ASan |
| Rust | Ownership model prevents most issues |
| Java/Go | Bounds-checked arrays, GC manages memory |
| Python | No raw pointers, but watch C extensions |
Secrets Management
❌ Hardcoded: API_KEY = "sk-abc123"
✅ Environment: API_KEY = os.environ["API_KEY"]
✅ Secret vault: API_KEY = vault.get("api_key")Static Analysis Integration
| Tool | Language | Focus |
|---|---|---|
| Semgrep | Multi | Pattern matching, custom rules |
| SonarQube | Multi | Code quality + security |
| CodeQL | Multi | Deep semantic analysis |
| Bandit | Python | Python-specific issues |
| ESLint Security | JS/TS | Node.js security |
Pre-commit Checks
# Block commits with secrets
gitleaks protect --staged
# Block commits with high-severity issues
semgrep --error --config=auto