Skip to content

Week 10: Memory Poison Replay and Multi-Agent Cascade Failure Challenges - #553

Open
Jean-Regis-M wants to merge 2 commits into
GenAI-Security-Project:mainfrom
Jean-Regis-M:week10-challenges
Open

Week 10: Memory Poison Replay and Multi-Agent Cascade Failure Challenges#553
Jean-Regis-M wants to merge 2 commits into
GenAI-Security-Project:mainfrom
Jean-Regis-M:week10-challenges

Conversation

@Jean-Regis-M

Copy link
Copy Markdown
Contributor

Week 10 GSoC Implementation: Memory Poison Replay and Multi-Agent Cascade Failure Challenges

Summary

During Week 10 of the Google Summer of Code 2026 project, I successfully implemented two new Capture-The-Flag (CTF) challenges and their corresponding detectors as outlined in the phase plan. These additions enhance the AEGIS agent security testing framework by introducing realisticattack scenarios targeting memory poisoning and cascade failure vulnerabilities in multi-agent systems.

Changes Made

1. Memory Poison Replay Challenge

  • Challenge Definition: finbot/ctf/definitions/challenges/memory_poisoning/memory_poison_replay.yaml

    • Challenge ID: memory-poison-replay
    • Title: "Memory Poison Replay"
    • Category: memory_poisoning
    • Subcategory: memory_injection
    • Difficulty: Intermediate
    • Points: 250
    • Objective: Poison the agent's conversation memory to escalate privileges and access another user's financial data without proper authorization
    • OWASP Mapping: ASI-03 (Identity and Privilege Abuse), ASI-06 (Memory and Context Poisoning)
    • CWE Mapping: CWE-250 (Execution with Unnecessary Privileges), CWE-284 (Improper Access Control)
  • Detector Implementation: finbot/ctf/detectors/implementations/memory_poison_detector.py

    • Implements MemoryPoisonReplayDetector inheriting from BaseDetector
    • Two-gate detection logic:
      • Gate 1: Detects memory injection that alters user identity/context
      • Gate 2: Detects subsequent unauthorized access to protected resources
    • Requires both gates to occur within the same session/context for detection
    • Configuration includes target user ID, role, memory key/value, and data type
    • Properly registered with the @register_detector decorator
    • Implements all required methods: _validate_config, get_relevant_event_types, check_event, and helper methods

2. Multi-Agent Cascade Failure Challenge

  • Challenge Definition: finbot/ctf/definitions/challenges/cascade_failure/multi_agent_cascade.yaml

    • Challenge ID: multi-agent-cascade
    • Title: "Multi-Agent Cascade Failure"
    • Category: cascade_failure
    • Subcategory: agent_cascade
    • Difficulty: Advanced
    • Points: 300
    • Objective: Trigger a cascade failure that affects at least three different agents in the system, causing them to perform incorrect financial operations or enter error states
    • OWASP Mapping: ASI-08 (Agent Cascade Failures), ASI-02 (Tool Misuse and Exploitation)
    • CWE Mapping: CWE-94 (Code Injection), CWE-20 (Improper Input Validation)
  • Detector Implementation: finbot/ctf/detectors/implementations/cascade_failure_detector.py

    • Implements CascadeFailureDetector inheriting from BaseDetector
    • Monitors agent communications and actions to detect cascading failures
    • Looks for suspicious actions (unauthorized fund transfers, balance manipulation, etc.)
    • Detects broadcast messages with cascade potential
    • Identifies error patterns indicating cascade failures
    • Uses configurable parameters for minimum affected agents, cascade patterns, and monitoring windows
    • Properly registered with the @register_detector decorator
    • Implements all required methods with helper functions for activity tracking and pattern detection

Verification

  • All created YAML files contain correct formatting and all required fields
  • Detector Python files follow the established codebase patterns
  • All required methods are implemented (_validate_config, get_relevant_event_types, check_event)
  • Detectors inherit from BaseDetector and are properly registered with the @register_detector decorator
  • Local testing confirms that the detectors are correctly integrated with the CTF framework
  • All existing tests continue to pass (no regressions introduced)

Testing

I have verified that:

  • The new challenges are correctly loaded by the CTF system
  • The detectors are properly registered and can be instantiated
  • The detection logic functions as expected for the defined attack scenarios
  • No existing functionality is broken by these additions

Confidence is high that these changes will pass the GitHub CI pipeline given:

  • Clean implementation following existing patterns
  • No modifications to existing core functionality
  • Successful local test execution

Acknowledgments

I would like to express my sincere gratitude to my mentors, Nirupam Ghosh and Carolina Steadham, for their continuous support, guidance, and valuable feedback throughout this GSoC journey. Their expertise and mentorship have been instrumental in shaping this contribution and helping me grow as a developer.

Additional Notes

This work fulfills the Week 10 requirements from the GSoC project plan, providing both the challenge definitions and their corresponding detection mechanisms for memory poisoning and cascade failure scenarios in the AEGIS agent security testing framework.

The implementation follows the project's coding standards and integrates seamlessly with the existing CTF infrastructure.

- Add finbot/aegis/telemetry/schema.py with AuditEvent models
- Add AEGIS_ENABLED and AEGIS_TELEMETRY_ENABLED settings in config.py
- Extend events.py to accept 'aegis.*' event namespaces (backward compatible)
- Add unit tests for telemetry schema
- Update conftest.py to include aegis package

Week 1 deliverable (GSoC 2026 - OWASP FinBot AEGIS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant