Mailoney is a SMTP Honeypot I wrote just to have fun learning Python. There are various modules or types (see below) that provide custom modes to fit your needs. Happily accepting advise, feature or pull requests.
At this time, everything should be included in a Linux python environment. Simply follow the usage instructions.
NOTE: To get all of the features out of the schizo module, users may wish to install the python-libemu module, but Mailoney will run with out it.
usage: mailoney.py [-h] [-i <ip address>] [-p <port>] -s mailserver -t
{open_relay,postfix_creds,schizo_open_relay}
Command line arguments
optional arguments:
-h, --help show this help message and exit
-i <ip address> The IP address to listen on
-p <port> The port to listen on
-s mailserver A Name that'll show up as the mail server name
-t {open_relay, Type of Honeypot
postfix_creds,
schizo_open_relay}
Right now there are three types of Modules for Mailoney.
SMTP ports 25, 465, 587 are privileged ports and therefore require elevated permissions (i.e. Sudo). It is probaby not a good idea to run your honeypot with elevated permissions. As such, I strongly encourage you to use port forwarding.
Setting this up is easy, lets say we want to run Mailoney on port 2525 (a nice non-priveleged port).
We can redirect port 25 to port 2525 with IPtables:
$ sudo iptables -t nat -A PREROUTING -p tcp --dport 25 -j REDIRECT --to-port 2525
If you are using UFW, you can edit before.rules (/etc/ufw/before.rules
) by adding the following to the beginning:
*nat
-F
:PREROUTING ACCEPT [0:0]
-A PREROUTING -p tcp --dport 25 -j REDIRECT --to-port 2525
COMMIT
Then run ufw reload
and you are all set.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。