Multi-Honeypot Deployment with Centralized Logging on Kubernetes
RAMAPOT is a honeypot deployment solution that orchestrates multiple honeypots (Cowrie SSH, Elasticpot, and Redis) with centralized logging using the Elastic Stack on a k3d Kubernetes cluster.
- Multi-Honeypot Architecture: Deploy SSH, Elasticsearch, and Redis honeypots simultaneously
- Centralized Logging: Unified log collection and analysis with Elasticsearch and Kibana
- Kubernetes: Containerized deployment with k3d
- Real-time Monitoring: Live dashboards and alerting capabilities
- Scalable Design: Easy to extend with additional honeypots
Before starting, ensure you have the following tools installed:
- Docker
- k3d
- kubectl
- Helm
- curl (for testing Elasticpot)
- redis-cli or any Redis client (for testing Redis honeypot)
cd elasticpot
docker build -t elasticpot .
cd redis-honeypot
docker build -t redishoneypot .
Create a k3d cluster with proper port forwarding:
k3d cluster create mycluster \
-p "30022:30022@server:0" \
-p "6379:6379@server:0" \
-p "9200:9200@server:0" \
-p "5601:5601@server:0" \
--agents 2
Port Mapping:
30022
→ Cowrie SSH service9200
→ Elasticpot HTTP service6379
→ Redis honeypot5601
→ Kibana dashboard
k3d image import elasticpot -c mycluster
k3d image import redishoneypot -c mycluster
kubectl create namespace honeypot
kubectl apply -f cowrie-pvc.yaml -n honeypot
kubectl apply -f cowrie-configmap.yaml -n honeypot
kubectl apply -f cowrie-deployment.yaml -n honeypot
kubectl apply -f cowrie-service.yaml -n honeypot
kubectl apply -f elasticpot-pvc.yaml -n honeypot
kubectl apply -f elasticpot-configmap.yaml -n honeypot
kubectl apply -f elasticpot-deployment.yaml -n honeypot
kubectl apply -f elasticpot-service.yaml -n honeypot
kubectl apply -f redishoneypot-pvc.yaml -n honeypot
kubectl apply -f redishoneypot-deployment.yaml -n honeypot
kubectl apply -f redishoneypot-service.yaml -n honeypot
helm repo add elastic https://helm.elastic.co
helm repo update
helm install elasticsearch elastic/elasticsearch -n honeypot
Wait for Elasticsearch to be ready:
kubectl get pods -n honeypot -w
Retrieve Elasticsearch Password:
kubectl get secrets --namespace=honeypot elasticsearch-master-credentials -ojsonpath='{.data.password}' | base64 -d
⚠️ Important: Update the retrieved password in all Filebeat configuration files.
helm install kibana elastic/kibana -n honeypot -f kibana-values.yaml
Wait for Kibana to be ready:
kubectl get pods -n honeypot -w
kubectl apply -f filebeat-cowrie-configmap.yaml -n honeypot
kubectl apply -f filebeat-cowrie-deployment.yaml -n honeypot
kubectl apply -f filebeat-elasticpot-configmap.yaml -n honeypot
kubectl apply -f filebeat-elasticpot-deployment.yaml -n honeypot
kubectl apply -f filebeat-redis-configmap.yaml -n honeypot
kubectl apply -f filebeat-redis-deployment.yaml -n honeypot
kubectl get pods -n honeypot
All pods should be in Running
state.
ssh -p 30022 root@localhost
curl -XGET http://localhost:9200/
curl -XGET http://localhost:9200/_cluster/health
redis-cli -h 127.0.0.1 -p 6379
# Try commands: INFO, GET test, SET test value, FLUSHALL, etc.
Navigate to: http://localhost:5601
Login Credentials:
- Username:
elastic
- Password: (use the password retrieved in Elastic Stack Setup)
- Go to Stack Management → Data Views
- Click Create data view
- Create the following data views:
- Index pattern:
honeypot-cowrie-*
- Time field:
@timestamp
- Index pattern:
honeypot-elasticpot-*
- Time field:
@timestamp
- Index pattern:
honeypot-redis-*
- Time field:
@timestamp
- Filter:
event.dataset: "redis.honeypot"
Build visualizations for comprehensive monitoring:
- Time-based Charts: Line charts and bar charts for temporal analysis
- Data Tables: Top IPs, usernames, and executed commands
- Pie Charts: Success/failure ratios and attack distribution
- Metrics: Total events count and connection statistics
- Go to Security → Manage → Rules
- Click Create rule
- Configure detection rules based on security requirements
- Brute Force Detection: Multiple failed authentication attempts
- Successful Honeypot Logins: Legitimate access to honeypots
View generated alerts in Security → Alerts
kubectl get pods -n honeypot
kubectl describe pod <pod-name> -n honeypot
kubectl logs <pod-name> -n honeypot
kubectl get services -n honeypot
- Pod Not Starting: Check resource limits and image availability
- Connection Refused: Verify port forwarding and service configuration
- Log Ingestion Issues: Ensure Filebeat configuration matches Elasticsearch credentials
To remove the entire RAMAPOT deployment:
k3d cluster delete mycluster
Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests. Feel free to fork this repository and adapt it to your specific needs.
This project is licensed under the MIT License - see the LICENSE file for details.
RAMAPOT - Comprehensive Honeypot Deployment Solution