Skip to content
RCE Write-up Advanced

Erlang distribution RCE and a cookie bruteforcer

An Erlang port mapper daemon was exposed on a target system, and the report explains that knowing the Erlang authentication cookie allows remote code execution on distributed Erlang instances. The author also describes a cookie brute-forcer, implying the cookie can be guessed.

insinuator.net

Published on insinuator.net

In one of the last pentests we’ve found an epmd (Erlang port mapper daemon) listening on a target system (tcp/4369). It is used to coordinate distributed erlang instances, but also can lead to a RCE, given one knows the so called “authentication cookie”.

The author, on insinuator.net

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the Erlang distribution cookie was left at its default random value and the epmd service was reachable, allowing the cookie to be brute-forced.

Impact

An attacker who obtains the cookie could achieve remote code execution on the Erlang node.

What the attacker needed

Epmd reachable on tcp/4369; cookie is default or guessable

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Erlang is a programming language used for systems that need to run across several machines. Those machines trust each other if they share a secret string called a cookie. If that secret is weak or guessable, an outsider can pretend to be a trusted machine and run their own code.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.