CompSec icon indicating copy to clipboard operation
CompSec copied to clipboard

WIP: Adds Dockerfiles and enhancements for weekly tasks

Open joniumGit opened this issue 3 years ago • 3 comments

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
  • Week 3:
    • wip
  • Week 4:
    • wip
  • Week 5:
    • wip, plan to add Makefile for a vm
  • Week 6:
    • wip

joniumGit avatar Sep 16 '22 11:09 joniumGit

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.

Nicceboy avatar Sep 16 '22 11:09 Nicceboy

We could possibly publish Docker images in OUSPG:s package registry: https://github.com/orgs/ouspg/packages

Nicceboy avatar Sep 16 '22 11:09 Nicceboy

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

joniumGit avatar Sep 16 '22 11:09 joniumGit