Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
986 changes: 494 additions & 492 deletions README.md

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ tarpit:
enabled: false # Opt-in: trap AI agents with slow responses and random text
delay_seconds: 5 # Extra delay (seconds) added to each response when tarpit is active

# Custom page template settings
# Operators can provide a custom HTML template file by setting
# `custom_template_path`. If this key is present and not null, Krawl
# will attempt to load the template from the provided path. The template
# may include `{counter}` and `{content}` placeholders but they are
# optional (no strict validation is performed).
# custom_template_path: "/path/to/custom_page.html"

### AI-Generated Deception pages. Here it can be used either OpenRouter or OpenAI as provider, but also self-hosted LLMs with an API-compatible endpoint
### by setting the provider to "openai" and pointing the openai_base_url to the local LLM server URL. Note that the krawl-llm is the service name of the llama.cpp server in the docker-compose.yaml.
ai:
Expand Down
4 changes: 4 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,17 @@ services:
- KRAWL_REDIS_HOST=redis
- KRAWL_REDIS_PORT=6379
- KRAWL_DASHBOARD_WARMUP_AGGREGATION=true
# Optional: path inside the container where a custom HTML template can be mounted
- KRAWL_CUSTOM_TEMPLATE_PATH=/templates/custom_page.html
# Uncomment to set a custom dashboard password (auto-generated if not set)
# - KRAWL_DASHBOARD_PASSWORD=your-secret-password
# Set this to change timezone
# - TZ=Europe/Rome
volumes:
- ./wordlists.json:/app/wordlists.json:ro
- ./config.yaml:/app/config.yaml:ro
# Optional: mount your custom template file to /templates/custom_page.html
# - ./custom_page.html:/templates/custom_page.html:ro
- ./logs:/app/logs
- ./backups:/app/backups
restart: unless-stopped
Expand Down
4 changes: 2 additions & 2 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: krawl-chart
description: A Helm chart for Krawl honeypot server
type: application
version: 2.1.2
appVersion: 2.1.2
version: 2.1.3
appVersion: 2.1.3
keywords:
- honeypot
- security
Expand Down
15 changes: 15 additions & 0 deletions helm/templates/custom-template-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- if .Values.customTemplate.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "krawl.fullname" . }}-custom-template
labels:
{{- include "krawl.labels" . | nindent 4 }}
data:
custom_page.html: |
{{- if .Values.customTemplate.content }}
{{ .Values.customTemplate.content | nindent 4 }}
{{- else }}
<!-- Empty template placeholder - override ConfigMap or supply content via --set-file -->
{{- end }}
{{- end }}
14 changes: 14 additions & 0 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ spec:
name: {{ include "krawl.fullname" . }}-ai
key: ai-api-key
{{- end }}
{{- if .Values.customTemplate.enabled }}
- name: KRAWL_CUSTOM_TEMPLATE_PATH
value: "/etc/krawl/templates/custom_page.html"
{{- end }}
{{- if eq .Values.mode "scalable" }}
- name: KRAWL_MODE
value: "scalable"
Expand Down Expand Up @@ -110,6 +114,11 @@ spec:
mountPath: /app/wordlists.json
subPath: wordlists.json
readOnly: true
{{- if .Values.customTemplate.enabled }}
- name: custom-template
mountPath: /etc/krawl/templates
readOnly: true
{{- end }}
{{- if and .Values.database.persistence.enabled (ne .Values.mode "scalable") }}
- name: database
mountPath: /app/data
Expand All @@ -125,6 +134,11 @@ spec:
- name: wordlists
configMap:
name: {{ include "krawl.fullname" . }}-wordlists
{{- if .Values.customTemplate.enabled }}
- name: custom-template
configMap:
name: {{ include "krawl.fullname" . }}-custom-template
{{- end }}
{{- if and .Values.database.persistence.enabled (ne .Values.mode "scalable") }}
- name: database
{{- if .Values.database.persistence.existingClaim }}
Expand Down
26 changes: 26 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,32 @@ config:
enabled: false # Opt-in: trap AI agents with slow responses and random text
delay_seconds: 5 # Extra delay (seconds) added to each response when tarpit is active

# Custom template settings (optional)
# Helm will mount the custom template at `/etc/krawl/templates/custom_page.html`
customTemplate:
enabled: false
# Inline content for the custom template. If empty, create the ConfigMap without data
# Example HTML below — operators can replace this with their own template.
content: |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Custom Krawl Page</title>
<style>
body { font-family: Arial, Helvetica, sans-serif; background:#0b0f14; color:#d0d7de; margin:0; padding:24px }
.counter { color:#f85149; font-weight:700; margin-bottom:12px }
.links { display:flex; flex-direction:column; gap:8px }
.link { background:#111418; padding:10px; border-radius:6px; display:inline-block }
</style>
</head>
<body>
<h1>Welcome</h1>
<div class="counter">Refresh cycle: {counter}</div>
<div class="links">{content}</div>
</body>
</html>

# PostgreSQL settings (only used when mode=scalable)
postgres:
# Deploy PostgreSQL as part of this chart (set to false if using an external instance)
Expand Down
34 changes: 34 additions & 0 deletions kubernetes/krawl-all-in-one-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,32 @@ data:
enabled: false
delay_seconds: 5
---
# Custom template ConfigMap (optional)
apiVersion: v1
kind: ConfigMap
metadata:
name: krawl-custom-template
namespace: krawl-system
labels:
app.kubernetes.io/name: krawl
app.kubernetes.io/instance: krawl
app.kubernetes.io/version: "2.1.0"
data:
custom_page.html: |
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Krawl Custom</title>
<style>body { font-family: Arial, sans-serif; background:#111;color:#ddd; }</style>
</head>
<body>
<h1>Krawl</h1>
<div class="counter">{counter}</div>
<div>{content}</div>
</body>
</html>
---
# Source: krawl-chart/templates/wordlists-configmap.yaml
apiVersion: v1
kind: ConfigMap
Expand Down Expand Up @@ -331,6 +357,8 @@ spec:
value: "30"
- name: KRAWL_REDIS_TABLE_TTL
value: "120"
- name: KRAWL_CUSTOM_TEMPLATE_PATH
value: "/etc/krawl/templates/custom_page.html"
volumeMounts:
- name: config
mountPath: /app/config.yaml
Expand All @@ -340,6 +368,9 @@ spec:
mountPath: /app/wordlists.json
subPath: wordlists.json
readOnly: true
- name: custom-template
mountPath: /etc/krawl/templates
readOnly: true
resources:
limits:
cpu: 500m
Expand All @@ -354,6 +385,9 @@ spec:
- name: wordlists
configMap:
name: krawl-wordlists
- name: custom-template
configMap:
name: krawl-custom-template
---
# Source: krawl-chart/templates/postgres.yaml
apiVersion: apps/v1
Expand Down
57 changes: 0 additions & 57 deletions kubernetes/manifests/configmap.yaml

This file was deleted.

91 changes: 0 additions & 91 deletions kubernetes/manifests/deployment.yaml

This file was deleted.

23 changes: 0 additions & 23 deletions kubernetes/manifests/ingress.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions kubernetes/manifests/kustomization.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions kubernetes/manifests/namespace.yaml

This file was deleted.

Loading
Loading