How zeroq/amun works
Amun is a Python low-interaction honeypot that emulates vulnerable network services to observe exploit attempts and malware downloads. Its main workflow accepts network traffic, routes connection data through vulnerability emulation, recognizes shellcode or download behavior, and records or submits collected results. The README also describes offline shellcode analysis and configurable logging/submission plugins. The excerpts establish several core calls; plugin dispatch and some subsystem wiring are not shown, so those relationships are omitted or marked unverified.
Main entry points: amun_server.py Server and listeners · download_core.py Download handling · amun_logging.py Logging core · amun_request_handler.py Connection handler
Components 22
Honeypot runtime
- Server and listeners
amun_server.py - Connection handler
core/amun_request_handler.py - Configuration parser
core/amun_config_parser.py
Protocol emulation
- Bind-port emulation
core/amun_bindport_core.py - SMB protocol engine
core/amun_smb_core.py - Vulnerability emulators
vuln_modules - HTTP emulator
vuln_modules/vuln-http/http_modul.py - DCOM emulator
vuln_modules/vuln-dcom/dcom_modul.py - WINS emulator
vuln_modules/vuln-wins/wins_modul.py
Analysis and downloads
- Shellcode patterns
shellcodes/decoders.py - Shellcode analysis
core/shellcode_mgr_core.py - Local IP ranges
core/iprange.py - Download handling
core/download_core.py - FTP downloads
core/ftp_download_core.py - TFTP downloads
core/tftp_download_core.py
Logging and reporting
- Logging core
core/amun_logging.py - Logging plugins
log_modules - Submission plugins
submit_modules - Sarcophagus database
log_modules/log-sarcophagus/log_sarcophagus.py - MySQL logging
log_modules/log-mysql/log_mysql.py - HPFeeds reporting
log_modules/log-hpfeeds/log_hpfeeds.py
Other components
- Network attacker
Connections 23
- Network attacker → Server and listeners: connects to
- Server and listeners → Connection handler: dispatches connections
amun_server.py - Server and listeners → Shellcode patterns: loads patterns
amun_server.py - Server and listeners → Configuration parser: uses configuration
amun_server.py - Server and listeners → Bind-port emulation: starts listeners
amun_server.py - Connection handler → Shellcode analysis: analyzes payload
core/amun_request_handler.py - Connection handler → Download handling: handles downloads
core/amun_request_handler.py - Connection handler → Vulnerability emulators: dispatches stages
- Download handling → Shellcode analysis: uses analysis
core/download_core.py - Download handling → Logging core: logs activity
core/download_core.py - Download handling → FTP downloads: delegates FTP
- Download handling → TFTP downloads: delegates TFTP
- Bind-port emulation → Shellcode analysis: analyzes payload
core/amun_bindport_core.py - Bind-port emulation → Logging core: logs activity
core/amun_bindport_core.py - SMB protocol engine → WINS emulator: supports emulation
vuln_modules/vuln-wins/wins_modul.py - HTTP emulator → Logging core: logs activity
vuln_modules/vuln-http/http_modul.py - DCOM emulator → Vulnerability emulators: implements stage
vuln_modules/vuln-dcom/dcom_modul.py - Logging core → Logging plugins: feeds events
log_modules/log-hpfeeds/log_hpfeeds.py - Logging core → Submission plugins: feeds samples
submit_modules/submit-anubis/submit_anubis.py - Logging plugins → Sarcophagus database: includes backend
- Logging plugins → MySQL logging: includes backend
- Logging plugins → HPFeeds reporting: includes reporter
- Shellcode analysis → Local IP ranges: checks local ranges
core/shellcode_mgr_core.py