Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ AdaptTrap

Adaptive Reinforcement Learning Framework for Consistency-Aware Cyber Deception

Adaptive Cyber Deception β€’ Reinforcement Learning β€’ Honeypots β€’ AI Security

Teaching Honeypots to Think, Adapt, and Survive.


πŸš€ Overview

AdaptTrap is an adaptive cyber deception framework that uses Reinforcement Learning to dynamically manage honeypot identities and behavior against increasingly intelligent attackers.

Unlike conventional honeypots that rely on static fingerprints or random banners, AdaptTrap learns when to change its identity, how to remain internally consistent, and how to adapt its timing behavior to maximize deception.


✨ Why AdaptTrap?

Traditional honeypots expose inconsistencies that sophisticated attackers quickly detect.

AdaptTrap introduces three key innovations:

  • 🧠 Consistency Engine β€” Every service shares one coherent system identity.
  • ⏱️ Temporal Deception β€” Timing profiles are learned, not hardcoded.
  • πŸ€– Multi-Head RL Policy β€” Specialized strategies for different attacker tiers.

πŸ”₯ Key Features

  • Adaptive Reinforcement Learning Defender
  • Multi-Service Consistency Engine
  • Temporal Deception
  • Multi-Head Actor-Critic Architecture
  • Curriculum Learning
  • Three Attacker Models
  • Gymnasium Environment
  • PyTorch Implementation
  • Reproducible Evaluation Pipeline
  • Automated Benchmark Generation
  • Docker Support
  • MIT Licensed

πŸ— Architecture

                    RL Defender
               (Multi-Head Actor-Critic)
                        β”‚
                        β–Ό
               Consistency Engine
                        β”‚
      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
      β–Ό                 β–Ό                 β–Ό
     SSH              HTTP             Redis
      β”‚                 β”‚                 β”‚
      └──────── Shared System Identity β”€β”€β”€β”˜
                        β”‚
                        β–Ό
                Adaptive Attacker

πŸš€ Core Innovations

🧠 Consistency Engine

AdaptTrap maintains a shared system identity across all services instead of randomizing them independently. When the defender changes its identity, the SSH banner, HTTP headers, Redis version, operating system, and latency profile all update together, producing realistic and internally consistent deception.

⏱️ Temporal Deception

Deception extends beyond identity. The RL agent also learns how the system behaves over time by selecting response timing profiles such as Normal, Busy, High Load, and Controlled Slowdown. This makes interactions appear more natural and significantly harder to fingerprint.

πŸ€– Multi-Head Reinforcement Learning

The defender uses a multi-head Actor-Critic architecture with a shared feature extractor and dedicated policy/value heads for Recon, Scripted, and AI attackers. This allows the model to learn specialized strategies for different threat levels while sharing common knowledge.

πŸ“Š Benchmark Results

The trained RL defender consistently outperformed every baseline across two independent evaluation runs.

Attacker Best Baseline RL Defender Improvement
Recon Probe βœ“ βœ“ ~10%
Scripted Exploit βœ“ βœ“ ~8.5%
AI Probe βœ“ βœ“ 20–24%

Highlight

βœ… Zero detections against the adaptive AI attacker across all evaluated sessions.


πŸš€ Quick Start

Clone the repository

git clone https://github.com/parastak/AdaptTrap.git

cd AdaptTrap

Install dependencies

pip install -r requirements.txt

Run a sanity test

python sanity_test.py

Evaluate the pretrained model

python main.py --mode evaluate

Train from scratch

python main.py --mode train

πŸ“Š Results


Detection Rate
RL achieves 0% detection against the adaptive AI attacker.

Attacker Dwell Time
Adaptive deception keeps attackers engaged for longer.

Raw Reward
RL consistently outperforms all baseline defenders.

Training Curve
Stable curriculum learning over 1,500 episodes.

πŸ“ˆ Project Highlights

  • πŸ›‘ Adaptive Cyber Deception
  • πŸ€– Deep Reinforcement Learning
  • 🌐 Multi-Service Honeypot
  • ⚑ Curriculum Learning
  • πŸ“Š Statistical Evaluation
  • πŸ”¬ Research Friendly
  • 🐍 Pure Python + PyTorch
  • πŸ“¦ Easy to Extend

βš™οΈ Training

Train the RL defender from scratch.

python main.py --mode train

Training includes:

  • Curriculum Learning | Multi-Head Actor-Critic | Adaptive Entropy | Gradient Clipping | Automatic Checkpointing

πŸ“¦ Reproducibility

AdaptTrap includes everything required to reproduce experiments.

  • Fixed Random Seeds
  • Saved Model Checkpoints
  • Training Logs
  • Evaluation Logs
  • Automated Benchmarks
  • Statistical Analysis
  • Plot Generation Scripts

πŸ“‹ Project Goals

AdaptTrap explores one simple question:

Can a reinforcement learning agent learn believable cyber deception against adaptive attackers?

The project focuses on:

  • Adaptive Cyber Deception
  • Reinforcement Learning
  • Honeypot Research
  • Network Security
  • Defensive AI
  • Reproducible Benchmarking

🀝 Contributing

Contributions are welcome!

You can help by:

  • Reporting bugs
  • Improving documentation
  • Adding attacker models
  • Adding new service identities
  • Improving RL algorithms
  • Creating visualizations
  • Optimizing performance

Please read CONTRIBUTING.md before opening a Pull Request.


πŸ”’ Security

This repository is intended for research and educational purposes.

Please do not use the included attacker components against systems that you do not own or have explicit permission to test.

See SECURITY.md for details.


πŸ“š Citation

If AdaptTrap helps your research, please cite it.

@software{adapttrap2026,
  title={AdaptTrap: Adaptive Reinforcement Learning for Cyber Deception},
  author={Paras Tak},
  year={2026},
  url={https://github.com/parastak/AdaptTrap}
}

πŸ“„ License

This project is released under the MIT License.

See the LICENSE file for details.


⭐ Support the Project

If you found AdaptTrap useful:

  • ⭐ Star this repository
  • 🍴 Fork the project
  • πŸ› Report issues
  • πŸ’‘ Suggest new ideas
  • 🀝 Contribute improvements

Every star helps increase the visibility of the project and supports future development.


πŸ“¬ Contact

Author: Paras Tak


🏷️ Topics

cybersecurity β€’ artificial-intelligence β€’ reinforcement-learning β€’ deep-reinforcement-learning β€’ honeypot β€’ cyber-deception β€’ network-security β€’ adaptive-security β€’ gymnasium β€’ pytorch β€’ actor-critic β€’ python


🌟 If you like AdaptTrap, consider giving it a Star!

Building adaptive cyber defense through Artificial Intelligence.

Made with ❀️ using Python, PyTorch, and Gymnasium.

About

Adaptive AI Honeypot Framework using Reinforcement Learning, Consistency-Aware Deception, Multi-Service Identity Management, and Temporal Response Policies for Advanced Cyber Defense.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages