4369 - Pentesting Erlang Port Mapper Daemon (epmd)
基本信息
Erlang Port Mapper Daemon (epmd) 作为分布式Erlang实例的协调器。它负责将符号节点名称映射到机器地址,从根本上确保每个节点名称与特定地址相关联。epmd的这一角色对于不同Erlang节点在网络中的无缝交互和通信至关重要。
默认端口:4369
PORT STATE SERVICE VERSION
4369/tcp open epmd Erlang Port Mapper Daemon这在RabbitMQ和CouchDB安装中默认使用。
枚举
手动
echo -n -e "\x00\x01\x6e" | nc -vn <IP> 4369
#Via Erlang, Download package from here: https://www.erlang-solutions.com/resources/download.html
dpkg -i esl-erlang_23.0-1~ubuntu~xenial_amd64.deb
apt-get install erlang
erl #Once Erlang is installed this will promp an erlang terminal
1> net_adm:names('<HOST>'). #This will return the listen addresses自动
Erlang Cookie RCE
远程连接
如果你能泄露认证cookie,你将能够在主机上执行代码。通常,这个cookie位于~/.erlang.cookie中,并且是由erlang在第一次启动时生成的。如果没有修改或手动设置,它将是一个具有20个字符长度的随机字符串[A:Z]。
更多信息请查看https://insinuator.net/2017/10/erlang-distribution-rce-and-a-cookie-bruteforcer/ 作者还分享了一个用于暴力破解 cookie 的程序:
本地连接
在这种情况下,我们将滥用CouchDB以在本地提升权限:
从https://0xdf.gitlab.io/2018/09/15/htb-canape.html#couchdb-execution中获取的示例 您可以使用Canape HTB机器来练习如何利用此漏洞。
Metasploit
Shodan
port:4369 "at port"
最后更新于