The Test contract contains the malicious function testPwned which creates a new file in the current directory as ffi is turned on true.
The vulnerability lies inside the VotingBoothTest contract which contains the function testPwned and can run arbitrary commands in user's cli as ffi is turned true in foundry.toml.
The function creates a new file named youve-been-pwned-remember-to-turn-off-ffi! by interacting with the user's cli. It can also be used to carry out harmful stuffs such as deleting the user's data, installing malicious files, uploading the user's private data to hacker.
Considering the current scenario it only creates a new file, but many different harmful commands can be executed on user's machine that can install malicious content, delete the user's data, send the user's sensitive data to the attacker.
Hawk's eyes 👀
Before interacting, straightaway go to foundry.toml and if there is ffi = true then instantly punch it out off the file. (Punch go booooooom)
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.