Destroying The Scammers Portal
The scammers' phishing portal had a local file disclosure vulnerability that exposed its PHP source code, and the phishing script wrote a PHP file using unsanitised GET parameters, allowing PHP code injection. The attackers used this to run commands and gain remote desktop access to the server.
Published on infosecwriteups.com
This is the continuation of our previous story Hacking Into Scammers Portalwhere we hacked into the scammers Portal.
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 phishing script concatenated unsanitised GET parameters into PHP code that it wrote to a file, leading to PHP code injection.
Impact
The attackers could execute arbitrary commands on the server and gain remote desktop access, and they deleted phishing data and left a message.
What the attacker needed
Access to the phishing site; local file disclosure vulnerability
How it was found
- Read the phishing PHP file through the local file disclosure vulnerability.
- Notice that the script writes a PHP file using parameters taken from the request.
- Modify a GET parameter to include PHP code that calls phpinfo().
- Access the newly created PHP file to confirm code execution.
- Change the payload to run system commands and obtain a shell.
- Use the shell to add a user and access the server via RDP.
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.
A phishing site tricks people into entering personal details. This one had a coding mistake: it took input from the web address and saved it into a file that the server then ran as code. That let the researchers make the server run their own commands.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.