WIP: Adds Dockerfiles and enhancements for weekly tasks
Currently contains:
- Week 1:
- Dockerfile for tasks 1-4 with compose file to mount volumes
- Week 2:
- Dockerfiles for tasks 1-3 and compose to start them all
- Muumitalo, juiceshop
- xss webserver, csrf webserver with autoreload for easier student work
- Dockerfiles for tasks 1-3 and compose to start them all
- Week 3:
- wip
- Week 4:
- wip
- Week 5:
- wip, plan to add Makefile for a vm
- Week 6:
- wip
Comments for Lab 1: Dockerfile
Seems good!
Few notes:
AFL testcases are in different location than normally: /usr/local/share/afl/testcases/
Also, core_pattern property follows configuration on host system as kernel is shared in Linux systems.
This requires running following command as root on host side to disable notifications of core dumps
echo core >/proc/sys/kernel/core_pattern
Also, depending on the type of CPU frequency scaling of host system, it might be required to be adjusted on host system, as AFL suggests:
Whoops, your system uses on-demand CPU frequency scaling, adjusted
between 390 and 4101 MHz. Unfortunately, the scaling algorithm in the
kernel is imperfect and can miss the short-lived processes spawned by
afl-fuzz. To keep things moving, run these commands as root:
cd /sys/devices/system/cpu
echo performance | tee cpu*/cpufreq/scaling_governor
You can later go back to the original state by replacing 'performance'
with 'ondemand' or 'powersave'. If you don't want to change the settings,
set AFL_SKIP_CPUFREQ to make afl-fuzz skip this check - but expect some
performance drop.
There might be some more depending on the host system.
We could possibly publish Docker images in OUSPG:s package registry: https://github.com/orgs/ouspg/packages
Yes, I was planning to set up Ci for these to build for aarch64 and amd64 to help people who can't run the VMs