AFLplusplus / LibAFL

Advanced Fuzzing Library - Slot your Fuzzer together in Rust! Scales across cores and machines. For Windows, Android, MacOS, Linux, no_std, ...
Other
2.03k stars 316 forks source link

GSoC 2023 #1098

Closed tokatoka closed 1 year ago

juppytt commented 1 year ago

Hi. I'm interested in "Start rewriting AFL++'s afl-fuzz in Rust as a frontend of LibAFL" in #119.

Srg213 commented 1 year ago

Hello. I am working on #36 and will open PR soon. I am open to work on Rust projects and would like to contribute to LibAFL

tokatoka commented 1 year ago

We'll select the candidates based on the contribution to the project. So please send some PRs to contribute before you submit your GSoC proposal.

For example, there're some easy issues marked with good first issue to work on. #1084 #1037 #777 #609 #424 #36

matheusbaptistella commented 1 year ago

Hello, I'm interested in working with issue #777. I don't have much experience with libafl_frida but it seems a great opportunity to learn new and more about the subject. Can I use that issue's discussion topic for further doubts?

tokatoka commented 1 year ago

yes

shubhangi013 commented 1 year ago

Hey @tokatoka ! I am Shubhangi, an electrical engineering undergrad and a student developer from IIT BHU. I would love to contribute to AFL++. I am starting out in fuzzing and have beginner level experience in Rust. I am keen to contribute to Start rewriting AFL++'s afl-fuzz in Rust as a frontend of LibAFL . I am a quick learner and have contributed to opensource previously, particularly to security applications.

soumya-78 commented 1 year ago

Hello @tokatoka Soumya Ranjan here, and I am a third-year undergrad with proficiency in various tech stacks, including Rust, NodeJS, JavaScript, Python, PostgreSQL, MySQL, and C++. Currently, I am enthusiastic about contributing to the "Fuzzer template generator." project as a part of the AFL++ community. I am thrilled to be a part of this community and eager to make meaningful contributions. As there is no link provided there in project description can you please guide me how to proceed.

tokatoka commented 1 year ago

Yes Basically you are asked to build a wizard for libafl https://en.wikipedia.org/wiki/Wizard_(software) Your program asks the user what component of the fuzzer to use. and then later build the fuzzer rust code according to the user's preference.

Please send some PRs & contribute to libafl beforehand if you want to participate.

soumya-78 commented 1 year ago

Thanks for replying @tokatoka . So i have to set up my local environment for libafl and solve some issues to proceed further. Can you please help me by mentioning some good issues which are still open to get familier with the codebase.

tokatoka commented 1 year ago

any issue with good first issue tag but some people already pushed pr for some of them

if you can fix #701 then it's really helpful for us

soumya-78 commented 1 year ago

Can you please confirm are there any pr pushed for any of the issue #1084 #609 and #424 . As they are marked as good first issue i will try to solve them and add a pr.

tokatoka commented 1 year ago

1084 is done

soumya-78 commented 1 year ago

The other 2 are still open along with #701?

s1341 commented 1 year ago

Note that ideally the wizard shouldn’t ask which components to use, but rather what kind of fuzzing the user is intending to do, and then suggest components/modes/capabilities that match.

tokatoka commented 1 year ago

The other 2 are still open along with https://github.com/AFLplusplus/LibAFL/issues/701?

yeah

you can work on any open issue (not necessarily good first issue)

soumya-78 commented 1 year ago

Hello @tokatoka Actually when following the contributing guide and running the "cargo build --release" command i am finding error and cannot able to resolve it out. Can you please help me with it My llvm version is 14.0.6 Screenshot from 2023-03-10 22-43-36

tokatoka commented 1 year ago

do you have llvm-config

soumya-78 commented 1 year ago

Yes version 14.0.6 Screenshot from 2023-03-10 22-50-45

tokatoka commented 1 year ago

can you try things on this issue? https://github.com/AFLplusplus/LibAFL/issues/1070

shubhangi013 commented 1 year ago

Hey @tokatoka are there any good first issues left? I would love to contribute to AFL :))

tokatoka commented 1 year ago

there're some issues with "good first issue" or "enhancement" that you can work on

(and this is not AFL)

soumya-78 commented 1 year ago

Hello @tokatoka After making certain changes in code mentioned in that issue Screenshot from 2023-03-11 18-01-24 there is no error in build but several warnings Screenshot from 2023-03-11 17-56-55

and this error still exist in code showing Screenshot from 2023-03-11 18-04-40

can you please guide me what to do?

tokatoka commented 1 year ago

are you on windows? or linux?

soumya-78 commented 1 year ago

I am in linux

tokatoka commented 1 year ago

Ok

here is no error in build but several warnings

Where does these 4 warnings come from? Are they from println!("cargo:warning={:#?}", r)? that you added? (but then it is guarded with cfg!(windows) so that means you are on windows)

are you on mingw or something?

(if it is mingw, then perhaps you'll need to find out what's missing. I guess nobody has tried running libafl on mingw)

soumya-78 commented 1 year ago

Actually i have dual booted with windows but currently i am in ubuntu linux.

tokatoka commented 1 year ago

ah ok. then it doesn't matter.

so I'm sure

println!("cargo:warning={:#?}", r)? 

is printing out file XXX is missing. can you find out what is missing in your case?

soumya-78 commented 1 year ago

Yes the warning come from println!("cargo:warning={:#?}", r)

tokatoka commented 1 year ago

Actually i have dual booted with windows but currently i am in ubuntu linux.

wait.. that's odd.

because you're running code that is only supposed to run if you are on windows. https://github.com/AFLplusplus/LibAFL/blob/main/libafl_cc/build.rs#L151 it's guarded with cfg!(windows) so it'll never run on linux host

(and of course clang-cl is not an available command)

soumya-78 commented 1 year ago

Yes clang-cl is not available.

tokatoka commented 1 year ago

can you show the result of rustc -vV

soumya-78 commented 1 year ago

yes Screenshot from 2023-03-11 19-17-01

tokatoka commented 1 year ago

hmm I don't know.. cargo is running the build code for windows when your rustc is for linux..

soumya-78 commented 1 year ago

Actually in if the condition is for unix so it is running for linux. and in else it is for windows Screenshot from 2023-03-11 19-15-39

tokatoka commented 1 year ago

ok that code is for windows can you revert that change and see what file is missing in your case? you can just the same as windows, println! the result of command::new() but this time for linux

soumya-78 commented 1 year ago

And when i run cargo build --release code it is only showing 4 warning err messages. not specifically showing due to missing of which files these errors are occurring

soumya-78 commented 1 year ago

if i modify the code in else if(windows) Screenshot from 2023-03-11 19-31-03 then i am getting the error as it is coming previously Screenshot from 2023-03-11 19-30-29

tokatoka commented 1 year ago

yeah I mean If you want to insert debug prints, you have to do it in if cfg!(unix)

do you have clang++ installed?

soumya-78 commented 1 year ago

No clang++ is not installed

tokatoka commented 1 year ago

well, you have to install it to get it working

soumya-78 commented 1 year ago

After installing clang++ I have to build the code again?

tokatoka commented 1 year ago

yeah

soumya-78 commented 1 year ago

But finding same error again at the time of building. I tried to restart my pc also but facing the same problem

basically the only error that i am encountering since the beginning is, it is failing to run the custom build command of libafl_cc v0.9.0.

tokatoka commented 1 year ago

you need to find out what what file (dependency) is missing from your system to make it work

I'd guess some header files are not present

soumya-78 commented 1 year ago

Yes some header files are not present as Screenshot from 2023-03-11 20-04-59 these headers are user defined headers. the red mark coming because there is error a which is basically Screenshot from 2023-03-11 20-06-24

soumya-78 commented 1 year ago

Is there any specific version of llvm required? i have installed 14.0.6

tokatoka commented 1 year ago

no anything between 11 and 15 should work can you check this https://github.com/AFLplusplus/LibAFL/issues/1070#issuecomment-1430250833

soumya-78 commented 1 year ago

Actually i am also facing the same issue there is no stderr file exist in libfl_cc-xxx Screenshot from 2023-03-11 21-30-42

soumya-78 commented 1 year ago

@tokatoka i have corrected the include header error but still facing the issue what should i do? Screenshot from 2023-03-11 22-47-40 and also updated the llvm version to 13.0.1

tokatoka commented 1 year ago

You can send us the draft gsoc proposal to gsoc@aflplus.plus beforehand so we can take a look