Foreign Function Interface, aka ffi, is a cheat code that executes commands in our computer as if it were the owner. You should never run this type of test without knowing what is happening.
In this case, at the very moment we run make
we run every test so, by default, we will be pwned!
After run clone
and make
:
:-( ups.
With the test testPwned()
We run the instruction touch
and have created the file youve-been-pwned
In this case, the elves were just being naughty, but a malicious developer could use this kind of test to control or destroy our computer.
Manual, foundry
Always check all code distributed by a customer, especially the tests. Then, if you find something suspicious, you can "comment" it and ask the developers for an explanation.
The FFI variable within Foundry.TOML was set to TRUE. This variable gives foundry shell access and allows it to run commands on your terminal. The possibility of exploitation through this means are endless! This repo exploited this flag through test_pwned Keep an eye out before running tests!
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.