Description
This module exploits an unauthenticated remote code execution vulnerability in MajorDoMo, an open-source home automation platform. The admin panel's PHP console is accessible without authentication due to a missing exit after redirect in modules/panel.class.php. The redirect("/") call intended to block unauthenticated users lacks an exit statement, so execution continues into the ajax panel handler which includes inc_panel_ajax.php unconditionally. Inside, the console handler passes the user-supplied command parameter directly to eval() via the evalConsole() function. The command, ajax_panel, and op parameters are all controllable via GET request through MajorDoMo's register_globals-style gr() function.
This results in unauthenticated PHP code evaluation via a single GET request to /admin.php.
All versions of MajorDoMo up to and including the latest release are affected. The fix is tracked in PR sergejey/majordomo#1177.
Module options
To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':
msf > use exploit/multi/http/majordomo/console_eval_rcemsf undefined(console_eval_rce) > show actions ...actions...msf undefined(console_eval_rce) > set ACTION < action-name >msf undefined(console_eval_rce) > show options ...show and set options...msf undefined(console_eval_rce) > runPrioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub