Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Invalid

Malicious Test inside VotingBoothTest contract creates a new file inside the current directory and ffi is enable true

Summary

The Test contract contains the malicious function testPwned which creates a new file in the current directory as ffi is turned on true.

Vulnerability Details

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.

Impact

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.

Tools Used

Hawk's eyes 👀

Recommendations

Before interacting, straightaway go to foundry.toml and if there is ffi = true then instantly punch it out off the file. (Punch go booooooom)

Updates

Lead Judging Commences

0xnevi Lead Judge almost 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

testPwned: ffi enabled for test

0xnevi Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Out of scope

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.