{"id":14235823,"url":"https://github.com/bannsec/linux-kernel-lab","last_synced_at":"2026-03-08T17:37:45.352Z","repository":{"id":63958186,"uuid":"272800711","full_name":"bannsec/linux-kernel-lab","owner":"bannsec","description":"Lab Environment For Learning About The Linux Kernel","archived":false,"fork":false,"pushed_at":"2020-06-16T20:03:28.000Z","size":2,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T12:53:15.566Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bannsec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-16T20:01:21.000Z","updated_at":"2022-11-09T18:08:12.000Z","dependencies_parsed_at":"2022-11-30T04:01:16.784Z","dependency_job_id":null,"html_url":"https://github.com/bannsec/linux-kernel-lab","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bannsec/linux-kernel-lab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bannsec%2Flinux-kernel-lab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bannsec%2Flinux-kernel-lab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bannsec%2Flinux-kernel-lab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bannsec%2Flinux-kernel-lab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bannsec","download_url":"https://codeload.github.com/bannsec/linux-kernel-lab/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bannsec%2Flinux-kernel-lab/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261987721,"owners_count":23240899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-20T21:02:23.162Z","updated_at":"2026-03-08T17:37:45.325Z","avatar_url":"https://github.com/bannsec.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"\n# What\nHelper scripts for creating a lab environment for learning about the linux kernel. Specifically, this helps to create an environment where you can step through the source of the kernel as it runs to see whats going on.\n\n# Docker\nDocker isn't explicitly needed. However, it is confirmed to have the required libraries installed for basic kernel building and is tested against the build scripts.\n\nThe run the docker environment:\n\n```bash\nsudo docker run -it --name lkl -h lkl --privileged --device /dev/kvm --network host -v $PWD:/data -v /tmp/.X11-unix/:/tmp/.X11-unix -e DISPLAY=$DISPLAY bannsec/linux-kernel-lab\n```\n\n# Using the scripts\n## Quick Start\nUse the following commands to setup and run things.\n\n```bash\n# One time need. This will build a base ubuntu focal system for you\n./system_build.sh\n\n# Grab a kernel from kernel.org\nwget \u003ckernel\u003e\ntar xf \u003ckernel\u003e\n\n# Build script helps to build a minimal kernel.\n# Tweak the steps if you wish\n./kernel_build_basic.sh \u003ckernel_directory\u003e\n\n# Start up the system with your kernel\n./system_start.sh \u003ckernel\u003e\n\n# In a separate window, attach to it\n./system_attach.sh \u003cvmlinuz\u003e\n\n# Once attached, you can test it out by breaking on sys open call\ngdb\u003e hbreak do_sys_open\n\n# Inside the VM, do anything that will cause an open file\ncat /etc/passwd\n```\n\n# FAQ\n## How do I login?\nLogin to the system with `root` and no password.\n\n## What are helpful GDB commands?\nNon-exhaustive:\n\n- hbreak (hardware breakpoint)\n- apropos lx (show helpful kernel gdb commands)\n\n## I can't get to the internet\nYou may need to manually run `dhclient enp0s3` from inside the VM to correctly configure it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbannsec%2Flinux-kernel-lab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbannsec%2Flinux-kernel-lab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbannsec%2Flinux-kernel-lab/lists"}