Commit Graph

42 Commits

Author SHA1 Message Date
Phillip Tarrant
d458eb471d Migrate configuration from environment variables to YAML file
- Add YAML-based configuration loaded from config.yaml (CONFIG_LOCATION env var)
  - Add PyYAML dependency and install requirements in Dockerfile
  - Replace Config.from_env() with get_config() singleton pattern
  - Remove server_header from config (now randomized from wordlists only)
  - Update docker-compose.yaml to mount config.yaml read-only
  - Update Helm chart: restructure values.yaml, generate config.yaml in ConfigMap
  - Update Kubernetes manifests: ConfigMap now contains config.yaml, deployments mount it
  - Remove Helm secret.yaml (dashboard path now auto-generated in config.yaml)
2026-01-02 13:39:54 -06:00
Phillip Tarrant
5a00e374e6 Merge pull request #21 from BlessedRebuS/fix/add-kubernetes-db-config
added db config for kubernetes and helm
2025-12-30 06:03:47 -06:00
Patrick Di Fazio
c55b1375ad added db config for kubernetes and helm 2025-12-30 12:12:42 +01:00
Patrick Di Fazio
ee0dac91ba Merge pull request #20 from BlessedRebuS/BlessedRebuS-patch-1
Fix indentation for server_header in config.py
2025-12-30 00:32:39 +01:00
Patrick Di Fazio
354f8bf895 Fix indentation for server_header in config.py 2025-12-30 00:24:36 +01:00
Patrick Di Fazio
844e99f9ef Merge pull request #17 from leonardobambini/feat/randomized-server-header
Feat/randomized server header
2025-12-30 00:14:28 +01:00
Patrick Di Fazio
12dcf5ba39 Merge branch 'dev' into feat/randomized-server-header 2025-12-30 00:14:14 +01:00
Patrick Di Fazio
954017f638 Merge pull request #15 from BlessedRebuS/feat/sqlite3-storage
Feat/sqlite3 storage
2025-12-30 00:11:41 +01:00
Patrick Di Fazio
cddad984c3 Added timezone to helm values 2025-12-30 00:03:44 +01:00
Patrick Di Fazio
8a645c22e6 Merge branch 'dev' into feat/randomized-server-header 2025-12-30 00:02:44 +01:00
Patrick Di Fazio
06ffa2c480 Added wordlists and server header logic to helm 2025-12-29 23:57:37 +01:00
Leonardo Bambini
a9808599dc Added random server header and changed behavior of SERVER_HEADER env var 2025-12-29 18:55:44 +01:00
Leonardo Bambini
c2c43ac985 Added randomized server header and changed behavior of SERVER_HEADER env var 2025-12-29 18:51:37 +01:00
Phillip Tarrant
a4baedffd9 updated dashboard to pull data from db. This closes issue #10 2025-12-28 13:56:23 -06:00
Phillip Tarrant
6487cb493d Merge branch 'dev' into feat/sqlite3-storage 2025-12-28 11:08:10 -06:00
Phillip Tarrant
f1c142c53d feat: add SQLite persistent storage for request logging
- Add SQLAlchemy-based database layer for persistent storage
  - Create models for access_logs, credential_attempts, attack_detections, ip_stats
  - Include fields for future GeoIP and reputation enrichment
  - Implement sanitization utilities to protect against malicious payloads
  - Fix XSS vulnerability in dashboard template (HTML escape all user data)
  - Add DATABASE_PATH and DATABASE_RETENTION_DAYS config options
  - Dual storage: in-memory for dashboard performance + SQLite for persistence

  New files:
  - src/models.py - SQLAlchemy ORM models
  - src/database.py - DatabaseManager singleton
  - src/sanitizer.py - Input sanitization and HTML escaping
  - requirements.txt - SQLAlchemy dependency

  Security protections:
  - Parameterized queries via SQLAlchemy ORM
  - Field length limits to prevent storage exhaustion
  - Null byte and control character stripping
  - HTML escaping on dashboard output
2025-12-28 10:43:32 -06:00
Patrick Di Fazio
a1a5e406b0 Merge pull request #14 from BlessedRebuS/beta
Beta merge into dev to sync
2025-12-28 17:40:02 +01:00
Phillip Tarrant
33132c708b Merge pull request #13 from BlessedRebuS/feat/allow-timezone-env-variable
Added timezone env variable handling
2025-12-28 10:35:48 -06:00
Patrick Di Fazio
6556e17f91 Added timezone env variable handling 2025-12-28 17:07:18 +01:00
Patrick Di Fazio
499760c939 Merge pull request #12 from BlessedRebuS/feat/log-post-credentials
Added POST log and dashboard for used credentials
2025-12-27 19:30:24 +01:00
Patrick Di Fazio
61ba574e92 Added POST log and dashboard for used credentials 2025-12-27 19:17:27 +01:00
Patrick Di Fazio
438646d646 Merge pull request #3 from ptarrant/feat/logging-system
Add rotating file logging system with app and access loggers
2025-12-27 00:22:44 +01:00
Phillip Tarrant
6ab4cf428f Merge branch 'main' into feat/logging-system 2025-12-26 11:52:52 -06:00
Patrick Di Fazio
b687f2592e Merge pull request #4 from ptarrant/feat/custom-server-header
Feat/custom server header
2025-12-26 18:06:53 +01:00
Phillip Tarrant
7916932ea7 Add rotating file logging system with app and access loggers
Implement a centralized logging singleton using Python's built-in
  logging module with RotatingFileHandler. Replaces all print()
  statements with structured logging.

  - Create LoggerManager singleton in src/logger.py
  - Add two loggers: app (krawl.log) and access (access.log)
  - Configure 1MB file rotation with 5 backups
  - Output to both files and stdout for container compatibility
  - Update handler.py, server.py, wordlists.py to use new loggers

  Benefits over print():
  - Persistent logs survive restarts for forensic analysis
  - Automatic rotation prevents unbounded disk growth
  - Separate access/app logs for easier analysis and SIEM integration
  - Consistent timestamps and log levels across all messages
  - Configurable verbosity without code changes
2025-12-26 08:23:38 -06:00
Phillip Tarrant
d0101b34fa Added test script to show the server header 2025-12-26 08:00:16 -06:00
Phillip Tarrant
16aca9bba6 Add configurable HTTP Server header for deception
Add SERVER_HEADER environment variable to customize the HTTP Server
  response header, defaulting to Apache/2.2.22 (Ubuntu). This allows the
  honeypot to masquerade as different web servers to attract attackers.

  - Add server_header field to Config dataclass
  - Override version_string() in Handler to return configured header
  - Update documentation and all deployment configs
2025-12-26 07:53:05 -06:00
Patrick Di Fazio
749ffaff8e Update ToDo.md 2025-12-25 22:43:08 +01:00
Patrick Di Fazio
5a8a41d2af Merge pull request #2 from BlessedRebuS/ptarrant/main
Ptarrant/main
2025-12-25 21:31:49 +01:00
Patrick Di Fazio
26273fdf4e unified style and added error handling 2025-12-25 21:26:13 +01:00
Phillip Tarrant
47a49b03be updating templates to have dedicated wordpress login page, updated phpmyadmin page to be more correct 2025-12-25 13:35:42 -06:00
Phillip Tarrant
9128d2759f Merge branch 'feat/attack-classificiation' 2025-12-24 10:25:23 -06:00
Phillip Tarrant
72f7293995 added attack classification, added attack types to stats and dashboard, also added a tiny curl script to simulate attacks for testing purposes 2025-12-24 10:25:00 -06:00
Phillip Tarrant
fc72f9fb69 moved majority of html into dedicated files and created a loader for the templates to separate code from html 2025-12-24 09:36:00 -06:00
Patrick Di Fazio
5b4568771b Add Star History section to README
Added a Star History section with an image to README.
2025-12-24 11:51:52 +01:00
Patrick Di Fazio
fce9a149df added todo 2025-12-24 01:20:55 +01:00
BlessedRebuS
404f808460 Modified README.md 2025-12-15 21:07:18 +01:00
BlessedRebuS
f86597c509 Modified README.md 2025-12-15 21:03:47 +01:00
BlessedRebuS
e887491f20 Modified README.md and added logo 2025-12-15 21:00:08 +01:00
BlessedRebuS
5f4d22199d Updated README.md 2025-12-15 14:07:11 +01:00
BlessedRebuS
076b2de584 First commit 2025-12-14 19:08:01 +01:00
Patrick Di Fazio
5e46841858 Initial commit 2025-12-10 16:58:21 +01:00