Commit Graph

20 Commits

Author SHA1 Message Date
Ryan Smith
cefc9952f0 feat(ssh honeypot): add proxy protocol support
Adds Proxy Protocol support to the SSH honeypot server. When enabled, the honeypot looks for a Proxy Protocol header on client connections and extracts the client IP from the header. This IP is used as the "source IP" for threat feed updates and logging.

To accommodate this change, the SSH password callback function is now set when a client connects. Previously, it was defined during server startup.
2025-05-15 16:50:03 -07:00
Ryan Smith
0a4d4536ba chore: revise error strings and comments 2025-04-16 07:35:58 -07:00
Ryan Smith
60ab753c42 Remove threat score feature, replace with observation count
This change removes the 'threat score' feature which allowed users to configure each honeypot server with a variable 'score' when updating the threat feed.

It is replaced with a fixed observation count that is incremented by 1 for each honeypot interaction.

The field `threat_score` has been replaced with `observations` in all API call parameters and threat feed data.

The `threat_score` field in the CSV file has been renamed to `observations`. Existing threat feed CSV files will be automatically updated on the next threat feed save.
2025-03-20 09:20:15 -07:00
Ryan Smith
1a631e7e14 Use quoted strings when printing certain fields
This change adjusts the SSH, TCP, and UDP honeypots to print quoted (escaped) strings to the terminal for certain log fields rather than raw strings. The adjusted fields are SSH username, SSH password, TCP responses, and UDP received data.
2024-12-26 11:29:06 -08:00
Ryan Smith
f5a2ec3f97 Rename UpdateIoC to Update
- Rename the threat feed `UpdateIoC` function to `Update`.
- Rename `iocMap` to `iocData`.
- Rename `loadIoC` and `saveIoC` to `loadCSV` and `saveCSV`.
- Edit most comments mentioning *database* to simply *threat feed* or *data*.
2024-11-13 11:01:26 -08:00
Ryan Smith
74ba8c648b Rename and simplify Start functions
- Renamed functions from `Start<server_type>` to `Start`.
- Removed unnecessary wrappers for Start functions.
- The HTTP and HTTPS servers now share a single Start function which starts the appropriate listener depending on the passed in configuration.
2024-11-13 10:27:57 -08:00
Ryan Smith
c84a1e60a5 Remove source port from logging
This change removes the logging of source ports for connecting clients in the honeypot servers. The source port does not provide value for this type of honeypot and only clutters the logs.
2024-11-02 09:41:15 -07:00
Ryan Smith
324dd67ff0 Add deadline and delay to SSH honeypot
This change adds a 30-second deadline to SSH connections. Client connections are forced closed after the deadline.

Additionally, a 2-second delay is added prior to rejecting authentication requests. This mimics the `pam_faildelay` PAM module found on modern Linux systems.
2024-11-02 09:22:50 -07:00
Ryan Smith
368914b566 Add public key callback
This change adds a public key authentication callback function to the SSH honeypot server. All requests are rejected, and currently, no data is logged.
2024-11-02 08:31:38 -07:00
Ryan Smith
496b211243 Remove unnecessary channel handling
This change removes unnecessary channel handling code from the SSH honeypot server. Since authentication requests are always rejected, `ssh.NewServerConn` will consistently return an error, making the channel handling redundant.
2024-11-02 08:04:40 -07:00
Ryan Smith
59414fd00e Rename srv variables to cfg 2024-11-01 11:38:42 -07:00
Ryan Smith
9e3e3303f5 Add explicit discard for non-essential errors
This change adds explicit discard statments on function calls that return errors when the error is irrelevant.
2024-11-01 10:58:25 -07:00
Ryan Smith
e8fc641778 Rename confidence level to threat score 2024-10-27 20:51:08 -07:00
Ryan Smith
222f85ba22 Add confidence level to honeypots and threat feed
This change introduces a ConfidenceLevel configuration setting for honeypot servers and the IoC struct in the threat feed database. Each IP in the database now maintains a confidence level. Whenever a honeypot calls UpdateIoC, the confidence level of the IP is incremented by the configued amount for the honeypot.
2024-10-27 08:41:06 -07:00
Ryan Smith
d6433aa9ff Apply restrictive permissions when saving keys
This change sets the Unix file permissions to `0600` for generated private keys saved to disk, ensuring that ownly the owner can access the keys. While private keys for the honeypot servers are mostly insignificant, this change aligns with typical private key permissions.
2024-10-25 09:42:49 -07:00
Ryan Smith
d17f6fffaa Rename the project to Deceptifeed 2024-10-21 17:18:09 -07:00
Ryan Smith
8728b8ecb6 Rename sensor_* log fields to server_*
This changes renames the log fields: sensor_ip, sensor_port, and sensor_name to: server_ip, server_port, and server_name.
2024-10-21 09:46:40 -07:00
Ryan Smith
57954f8c81 Add option to control sending to threat feed
This change adds a new XML element, sendToThreatFeed, to the configuration for servers to control whether interactions with the server should update the threat feed.
2024-10-20 21:09:58 -07:00
Ryan Smith
b08431ecf0 Enable individual logging for each honeypot server
This change moves the slog.Logger from the Config struct to the Server struct, allowing each honeypot server to have its own logger. Each server can now specify a custom log file path, defaulting to the main log path in the Config if none is provided.
2024-10-19 22:08:48 -07:00
Ryan Smith
c7bb4b7b28 first commit 2024-10-16 11:48:13 -07:00