← Back to Writeups
CUSTOMEasyReversing

Gnalre

XESXOR9/2/20261 min read
#reversing#custom#easy#erlang_process_analysis#message_passing_trace

Gnalre

Platform: CUSTOM | Category: Reversing | Type: Challenge | Difficulty: Easy | OS: N/A | **Author: XESXOR Techniques: erlang_process_analysis, message_passing_trace

Summary

Walkthrough of the CUSTOM Reversing Gnalre. Language: Erlang. Source code provided. Concurrent Erlang program with message passing. "The flag is what ping() function returns."

Description

Language: Erlang. Source code provided. Concurrent Erlang program with message passing. "The flag is what ping() function returns."

Analysis

erlang
ping() ->
    Worker = spawn(task, redacted_atom, []),
    Worker ! {self(), ping},
    receive
        redacted_atom -> redacted_atom
    end.

redacted_atom() ->
    receive
        {Ping, ping} ->
            Str1 = "This is a flag",
            Str2 = right(Str1, 4, $.),    % "flag"
            Str3 = sub_string(Str1, 5, 7), % " is"
            Galf = concat(Str2, Str3),     % "flag is"
            Ping ! redacted_atom,
            Ping ! Galf
    end.

‍​‌‌​​‌​​​‌‌​​‌​​​​‌‌​‌​​​​‌‌‌​​‌​​‌‌​​​‌​​‌‌‌​​​​​‌‌​‌‌​​​‌‌​​​​‍

The REDACTED process sends two messages: the atom REDACTED and the string "flag is". The ping process only receives the first message (REDACTED) and returns it.

Solution

The ping() function returns the atom REDACTED — this is the flag.

Trap: the string "flag is" is computed and sent, but ping() doesn't receive it — it remains in the mailbox. ‍​‌‌​​‌​​​‌‌​​‌​​​​‌‌​‌​​​​‌‌‌​​‌​​‌‌​​​‌​​‌‌‌​​​​​‌‌​‌‌​​​‌‌​​​​‍

Key Takeaways / Lessons

  • Mastering erlang_process_analysis, message_passing_trace was key to this challenge.
  • Always check for common misconfigurations and verify assumptions.

Crafted by XESXOR Research • 2026-03-09 • CUSTOM • Gnalre • Difficulty: Easy