Tier 1 (upstream images): telnet (cowrie), smtp (mailoney), elasticsearch (elasticpot), conpot (Modbus/S7/SNMP ICS). Tier 2 (custom asyncio honeypots): pop3, imap, mysql, mssql, redis, mongodb, postgres, ldap, vnc, docker_api, k8s, sip, mqtt, llmnr, snmp, tftp — each with Dockerfile, entrypoint, and protocol-accurate handshake/credential capture. Adds 256 pytest cases covering registration, compose fragments, LOG_TARGET propagation, and Dockerfile presence for all 25 services. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
26 lines
738 B
Python
26 lines
738 B
Python
from decnet.services.base import BaseService
|
|
|
|
|
|
class SMTPService(BaseService):
|
|
name = "smtp"
|
|
ports = [25, 587]
|
|
default_image = "dtagdevsec/mailoney"
|
|
|
|
def compose_fragment(self, decky_name: str, log_target: str | None = None) -> dict:
|
|
env: dict = {
|
|
"MAILONEY_HOSTNAME": decky_name,
|
|
"MAILONEY_PORTS": "25,587",
|
|
}
|
|
if log_target:
|
|
env["MAILONEY_LOG_TARGET"] = log_target
|
|
return {
|
|
"image": "dtagdevsec/mailoney",
|
|
"container_name": f"{decky_name}-smtp",
|
|
"restart": "unless-stopped",
|
|
"cap_add": ["NET_BIND_SERVICE"],
|
|
"environment": env,
|
|
}
|
|
|
|
def dockerfile_context(self):
|
|
return None
|