From Shodan Recon to Multiple Security Flaws in the Same Program
Several account-related endpoints on two subdomains lacked CSRF protection, allowing an attacker to change a victim's profile information, password, or delete their account via a crafted page. A password-change API also accepted requests without an Authorization header, relying only on user-supplied credentials.
Published on medium.com
Shodan is a powerful tool for discovering exposed services. With the right mindset, it can lead to genuinely impactful vulnerabilities by uncovering overlooked or forgotten attack surfaces.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application did not implement CSRF tokens or origin checks on sensitive account actions, and one API endpoint did not enforce authentication based on the session or token.
Impact
An attacker could change a victim's profile information, change their password leading to one-click account takeover, or delete their account; the password-change API also accepted requests without an Authorization header, though the text does not detail further impact.
What the attacker needed
Victim is logged in; victim visits attacker's page; attacker knows victim's username
How it was found
- Use a Shodan query based on the SSL certificate subject to find subdomains of the target.
- Filter results to active hosts and identify interesting subdomains.
- Create an account and log in on the first subdomain.
- Test the profile update feature and observe the request lacks CSRF protection.
- Create a CSRF proof of concept and confirm it updates account information when visited while authenticated.
- On the second subdomain, test the change password request and remove the Authorization header to see it is still accepted.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
CSRF is when a malicious website makes your browser send a request to another site where you are logged in, without you intending it. Here, the site did not check that requests came from its own pages, so an attacker could change your profile, password, or delete your account if you visited their page while logged in. Separately, a password-change endpoint did not properly check that the request was authenticated.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.