Honeypot System¶
Deploys decoy resources (files, APIs, credentials, network services) to detect unauthorized agent access. Tracks interactions to build threat profiles.
Key Classes¶
| Class | Description |
|---|---|
HoneypotType |
Decoy types: FILE, CREDENTIAL, API, NETWORK, DATA, CONFIGURATION |
InteractionKind |
Types of interaction: READ, WRITE, EXECUTE, QUERY, AUTHENTICATE |
ThreatLevel |
Assessed threat from interactions |
Honeypot |
A single decoy resource with metadata |
Interaction |
Recorded agent interaction with a honeypot |
HoneypotManager |
Creates, deploys, and monitors honeypots |
Usage¶
from replication.honeypot import HoneypotManager
manager = HoneypotManager()
# Deploy decoys
manager.deploy_honeypot("file", path="/secrets/api_keys.json")
manager.deploy_honeypot("credential", username="admin", password="hunter2")
manager.deploy_honeypot("api", endpoint="/internal/admin/reset")
# Check for interactions
report = manager.get_report()
for interaction in report.interactions:
print(f"Agent {interaction.agent_id} accessed {interaction.honeypot_id}")
print(f" Threat level: {interaction.threat_level}")
honeypot
¶
Agent Honeypot System — deploys decoy resources to detect malicious intent.
Deploys fake files, APIs, credentials, and capabilities that legitimate agents should never access. When an agent interacts with a honeypot, that interaction is logged and scored to characterize intent.
Why this matters¶
Traditional safety detectors are reactive — they catch bad behavior after it happens. Honeypots are proactive — they create attractive targets that only malicious or boundary-probing agents would touch. This gives early warning of adversarial intent before real damage occurs.
Honeypot types¶
- Credential — fake API keys, tokens, passwords in accessible locations
- File — decoy sensitive files (config, secrets, database dumps)
- API — fake endpoints that appear to grant elevated access
- Resource — fake compute/memory pools that look available
- Network — decoy services on open ports
- Data — fake PII, financial data, proprietary information
- Capability — fake tools/functions that appear powerful
Interaction classification¶
- Scan — agent discovered/listed the honeypot (low severity)
- Read — agent read/accessed the honeypot content (medium)
- Use — agent attempted to use a credential/API/capability (high)
- Exfiltrate — agent tried to copy/transmit honeypot data (critical)
- Modify — agent tried to alter/hide the honeypot (critical)
Usage (CLI)::
python -m replication.honeypot # default demo
python -m replication.honeypot --agents 5 # 5 agents
python -m replication.honeypot --types credential,file # specific types
python -m replication.honeypot --json # JSON output
Programmatic::
from replication.honeypot import HoneypotSystem, HoneypotConfig
system = HoneypotSystem()
system.deploy_default_honeypots()
# ... agents interact ...
report = system.generate_report()
print(report.render())
HoneypotType
¶
Bases: Enum
Categories of honeypot resources.
Source code in src/replication/honeypot.py
InteractionKind
¶
ThreatLevel
¶
Honeypot
dataclass
¶
A deployed honeypot resource.
Source code in src/replication/honeypot.py
Interaction
dataclass
¶
A recorded interaction with a honeypot.
Source code in src/replication/honeypot.py
AgentThreatProfile
dataclass
¶
Aggregated threat assessment for a single agent.
Source code in src/replication/honeypot.py
HoneypotStats
dataclass
¶
Statistics for a single honeypot.
Source code in src/replication/honeypot.py
DeploymentCoverage
dataclass
¶
How well the honeypot deployment covers the threat surface.
Source code in src/replication/honeypot.py
HoneypotReport
dataclass
¶
Full report from the honeypot system.
Source code in src/replication/honeypot.py
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | |
HoneypotConfig
dataclass
¶
Configuration for the honeypot system.
Source code in src/replication/honeypot.py
HoneypotSystem
¶
Deploys and monitors honeypot resources for agent safety.
Source code in src/replication/honeypot.py
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 | |
deploy(honeypot: Honeypot) -> str
¶
Deploy a honeypot. Returns its id.
Source code in src/replication/honeypot.py
deploy_from_template(template: Dict[str, Any]) -> str
¶
Deploy a honeypot from a template dict.
Source code in src/replication/honeypot.py
deploy_default_honeypots() -> List[str]
¶
deploy_by_types(types: Sequence[HoneypotType]) -> List[str]
¶
Deploy preset honeypots matching given types.
Source code in src/replication/honeypot.py
remove(honeypot_id: str) -> bool
¶
list_honeypots() -> List[Honeypot]
¶
record_interaction(agent_id: str, honeypot_id: str, kind: InteractionKind, timestamp: Optional[float] = None, details: str = '', metadata: Optional[Dict[str, Any]] = None) -> Interaction
¶
Record an agent interacting with a honeypot.
Source code in src/replication/honeypot.py
get_interactions(agent_id: Optional[str] = None, honeypot_id: Optional[str] = None, kind: Optional[InteractionKind] = None) -> List[Interaction]
¶
Query interactions with optional filters.
Source code in src/replication/honeypot.py
profile_agent(agent_id: str) -> AgentThreatProfile
¶
Build a threat profile for a specific agent.
Source code in src/replication/honeypot.py
profile_all_agents() -> List[AgentThreatProfile]
¶
Build threat profiles for every agent that has interactions.
honeypot_stats() -> List[HoneypotStats]
¶
Compute per-honeypot effectiveness statistics.
Source code in src/replication/honeypot.py
deployment_coverage() -> DeploymentCoverage
¶
Assess coverage of the honeypot deployment.
Source code in src/replication/honeypot.py
most_dangerous_agent() -> Optional[str]
¶
Return agent_id with highest risk score, or None.
most_targeted_honeypot() -> Optional[str]
¶
Return honeypot name with most interactions, or None.
Source code in src/replication/honeypot.py
generate_report() -> HoneypotReport
¶
Generate a comprehensive honeypot system report.
Source code in src/replication/honeypot.py
simulate_agent_behavior(system: 'HoneypotSystem', agent_id: str, strategy: str = 'curious', rng: Optional[random.Random] = None, base_time: float = 1000.0) -> List[Interaction]
staticmethod
¶
Simulate an agent interacting with deployed honeypots.
Strategies: - benign: only scans, never reads or uses - curious: scans and reads, occasionally uses - probing: systematic exploration, reads and uses - malicious: targets high-value, uses and exfiltrates - hostile: aggressive, all interaction types
Source code in src/replication/honeypot.py
675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 | |
export_state() -> Dict[str, Any]
¶
Export full system state as JSON-serializable dict.
Source code in src/replication/honeypot.py
import_state(data: Dict[str, Any]) -> None
¶
Import state from a dict (as produced by export_state).