Automating Authenticated WordPress Plugin Uploads via cURL (CTF / Pentest Workflow)
Hey everyone, Whenever I do a box that involves getting WP admin credentials, manually logging into the dashboard, navigating to plugins, and clicking "Upload" to drop a PHP reverse shell always felt too slow. I wanted to automate the process from the terminal, so I spent some time figuring out the exact curl syntax to do it. It’s a great way to understand how WordPress handles authentication and CSRF protection under the hood. The core workflow comes down to 3 steps: The Login: Sending a POST request to wp-login.php and saving the session cookie (-c cookie.txt). Grabbing the Nonce: WordPress uses a nonce for security on plugin uploads. You have to GET the plugin-install.php page with your
…