Test cron job access control

AuthorizationExploitation

Written with a model's help from “HestiaCP Admin Takeover & RCE” by Eddie Zhang on Project Black. Read the writeup before relying on it.

Try to create a cron job as a low-privileged user that executes a command as a more privileged user, such as sudo /usr/local/hestia/bin/v-change-user-password admin toor. If the cron job is created successfully, it may be possible to exploit a broken authorization check, such as an if statement that always evaluates to false due to an undefined variable. Look for a response that indicates the cron job was created, and then wait for the command to be executed. If the command is executed, it may be possible to take over an admin account. Additionally, test for lack of CSRF token validation by sending a request with a Cookie from a low-privileged user without a valid CSRF token.

Follow #authorization, #csrf or #rce for new tips like this one, on your notifications page and, if you choose, in a daily or weekly email.

Comments

No comments yet.