Test API endpoints for OS command injection
To test for OS command injection, send a POST request to an API endpoint with a user-supplied message string that contains a command. Look for a response that indicates the command was executed. Try using the execute command with a payload like execute system /configura to see if the endpoint is vulnerable. If the response shows that the command was executed, it may indicate an OS command injection vulnerability. Check the API endpoint's documentation to see if it accepts user-supplied input and if it uses any sanitization or validation on the input.
POST /mics/api/v2/sentry/mics-config/handleMessage HTTP/1.1
Host: target.com
Content-Type: application/x-www-form-urlencoded
message=execute+system+/configuraFollow #api-security or #os-command-injection for new tips like this one, on your notifications page and, if you choose, in a daily or weekly email.
Comments
No comments yet.