Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yvesago/imap-honey
IMAP or SMTP honeypot written in Golang
https://github.com/yvesago/imap-honey
golang honeypot imap security security-tools smtp
Last synced: 26 days ago
JSON representation
IMAP or SMTP honeypot written in Golang
- Host: GitHub
- URL: https://github.com/yvesago/imap-honey
- Owner: yvesago
- License: mit
- Created: 2016-07-01T12:33:49.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-04-22T15:38:19.000Z (over 2 years ago)
- Last Synced: 2024-08-03T23:04:36.532Z (4 months ago)
- Topics: golang, honeypot, imap, security, security-tools, smtp
- Language: Go
- Homepage:
- Size: 11.7 KB
- Stars: 24
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-honeypot - **12**星
README
# imap-honey
Simple IMAP or SMTP honeypot written in Golang with log to console or syslog
## Quick start
```
$ go run imaphoney/honey.go &$ telnet localhost 1993
Trying ::1...
Connected to localhost.
Escape character is '^]'.
OK IMAP4
a0001 CAPABILITY
* CAPABILITY ACL ID IDLE IMAP4rev1 AUTH=PLAIN
a0001 OK CAPABILITY
a0002 LOGOUT
* BYE localhost
a0002 OK LOGOUT
Connection closed by foreign host.
``````
$ go run smtphoney/honey.go &$ telnet localhost 1993
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 localhost ESMTP ready
EHLO honey
250-localhost
250-PIPELINING
250-SIZE 5242880
250-ETRN
250 8BITMIME
250 DSN
MAIL FROM: [email protected]
250 Recipient ok
QUIT
221 2.0.0 Bye
Connection closed by foreign host.
```## IMAPS/SMTPS support
1) Create public/private keys via:
```
openssl genrsa -out server.key 2048
openssl req -new -x509 -sha256 -key server.key -out server.pem -days 3650
```2) Run and test
```
$ make all
$ ./build/linux/imaphoney -cert server.pem -key server.key -addr :9443 -server my.syslog.server:514 &$ openssl s_client -connect localhost:9443 -quiet
...
```## Full usage
```
Usage of ./build/linux/imaphoney:
-addr string
ipaddr:port (default ":1993")
-cap string
imap CAPABILITY (default "ACL ID IDLE IMAP4rev1 AUTH=PLAIN")
-cert string
cert file
-d debug
-hostname string
hostname (default "localhost")
-key string
cert file
-q quiet - no msg in console
-server string
syslog remote server
``````
Usage of ./build/linux/smtphoney:
-addr string
ipaddr:port (default ":1993")
-aok
auth ok
-cap string
smtp CAPABILITY (default "250-localhost;250-PIPELINING;250-SIZE 5242880;250-ETRN;250 8BITMIME;250 DSN;")
-cert string
cert file
-d debug
-hostname string
hostname (default "localhost")
-key string
cert file
-la
log auth
-ld
log data
-q quiet - no msg in console
-server string
syslog remote server
```# AUTHORS
Yves Agostini, ``
# LICENSE AND COPYRIGHT
License : MIT
Copyright 2022 - Yves Agostini