Spaces:
Runtime error
Runtime error
File size: 2,637 Bytes
8c486a8 f016eb7 8c486a8 f016eb7 8c486a8 f016eb7 8c486a8 f016eb7 8c486a8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | """NPC persona models.
Re-exports NPCPersona from protocols for convenience, and provides
helpers for generating persona cards from snapshot specs.
"""
from __future__ import annotations
from open_range.protocols import NPCPersona
# Re-export so other modules can import from here
__all__ = ["NPCPersona", "default_personas"]
def default_personas(domain: str = "corp.local") -> list[NPCPersona]:
"""Return a default set of NPC personas for testing.
Two personas with contrasting security awareness levels:
a low-awareness marketing employee and a high-awareness CISO.
Args:
domain: Email domain to use. Derived from snapshot topology at
runtime so personas match the generated environment.
"""
return [
NPCPersona(
name="Janet Smith",
role="Marketing Coordinator",
department="Marketing",
reports_to="",
communication_style="casual, responds quickly, uses exclamation marks",
security_awareness=0.3,
susceptibility={
"phishing_email": 0.7,
"credential_sharing": 0.4,
"attachment_opening": 0.8,
"vishing": 0.6,
},
routine={
"email_check_interval_min": 15,
"typical_actions": [
"browse intranet",
"send marketing reports",
"LDAP lookups",
],
},
accounts={
"email": f"jsmith@{domain}",
"ldap": "jsmith",
"smb_shares": "marketing,shared",
},
),
NPCPersona(
name="David Chen",
role="CISO",
department="Security",
reports_to="",
communication_style=(
"formal, suspicious of unusual requests, always verifies sender"
),
security_awareness=0.95,
susceptibility={
"phishing_email": 0.05,
"credential_sharing": 0.01,
"attachment_opening": 0.1,
"vishing": 0.05,
},
routine={
"email_check_interval_min": 5,
"typical_actions": [
"review SIEM alerts",
"approve access requests",
"policy updates",
],
},
accounts={
"email": f"dchen@{domain}",
"ldap": "dchen",
"smb_shares": "security,executive",
},
),
]
|