Skip to content

Instantly share code, notes, and snippets.

View thebsdbox's full-sized avatar
🐙

Daniel Finneran thebsdbox

🐙
View GitHub Profile
# ebpf Summit 2024 Capture the Flag ⛳️🐝
Welcome to the eBPF 2024 Summit CTF, this year the task will involve a number of challenges around various eBPF technologies. Some of the challenges will require use of CLI tools such as `bpftool` and some will require fixing or completing some partial code in order to complete the challenge.
## Getting the CTF up and running !
The CTF makes use of the [lima](https://github.com/lima-vm/lima) project to simplify the process of creating a virtual machine that will run the CTF. The virtual machine once created will contain:
- CTF program
- code-server (VS-CODE but accessed through a browser)
<div layout-gt-sm="row">
<md-input-container>
<label>SSH</label>
<input value="ssh {{instance.proxy_host}}@direct.{{host}} -p 8022" type="text" readonly="readonly" size="50">
<md-icon ngclipboard data-clipboard-text="ssh {{instance.proxy_host}}@direct.{{host}} -p 8022"class="material-icons">content_copy
<md-tooltip md-direction="top">Copy!</md-tooltip>
</md-icon>
<md-button class="md-raised" href="ssh://{{instance.proxy_host}}@direct.{{host}}:8022" target="_blank" rel="noopener noreferrer">
<md-icon class="material-icons">login</md-icon> SSH
</md-button>
@thebsdbox
thebsdbox / k8s.sh
Last active November 8, 2022 17:56
Kubernetes Installer Ubuntu 2204
#!/bin/bash
echo This should set up everything needed for Kubernetes
sudo modprobe overlay
sudo modprobe br_netfilter
cat <<EOF | sudo tee /etc/sysctl.d/99-kubernetes-cri.conf
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-ip6tables = 1
apiVersion: apps/v1
kind: DaemonSet
metadata:
creationTimestamp: null
name: kube-vip-ds
namespace: kube-system
spec:
selector:
matchLabels:
name: kube-vip-ds
@thebsdbox
thebsdbox / main.go
Created February 10, 2021 12:43
🤮
package main
import (
"compress/gzip"
"crypto/tls"
"crypto/x509"
"encoding/json"
"io"
"io/ioutil"
"math"
@thebsdbox
thebsdbox / gist:e84aeff4ad071969c7b000271d868bbe
Created January 27, 2021 16:49
Cloud - to bare metal.sh
modprobe nbd
qemu-nbd --connect=/dev/nbd0 ./focal-server-cloudimg-amd64.img
partprobe /dev/nbd0
mkdir /mnt/image
mount /dev/nbd0p1 /mnt/image
cd /mnt/image
mount -t proc /proc proc/
mount --rbind /sys sys/
mount --rbind /dev dev/
chroot /mnt/image bash
@thebsdbox
thebsdbox / ccm_vip.yaml
Created January 26, 2021 15:30
ccm_vip.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: packet-cloud-controller-manager
namespace: kube-system
labels:
app: packet-cloud-controller-manager
spec:
replicas: 1
selector:
kernel:
image: linuxkit/kernel:5.4.39
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
init:
- linuxkit/init:a68f9fa0c1d9dbfc9c23663749a0b7ac510cbe1c
- linuxkit/runc:v0.8
- linuxkit/containerd:a4aa19c608556f7d786852557c36136255220c1f
- linuxkit/ca-certificates:v0.8
onboot:
- name: sysctl
@thebsdbox
thebsdbox / Tinkerbell on Equinixmetal.md
Last active January 23, 2023 14:22
Tinkerbell on Equinix Metal

The "perfect" virtual Tinkerbell environment on Equinix Metal

pre-requisites

This is a rough shopping list of skills/accounts that will be a benefit for this guide.

  • Equinix Metal portal account
  • GO experience (basic)
  • iptables usage (basic)
  • qemu usage (basic)
@thebsdbox
thebsdbox / EKS-D kubeadm
Created December 15, 2020 13:30
EKS-D kubeadm
sudo docker pull public.ecr.aws/eks-distro/kubernetes/pause:v1.18.9-eks-1-18-1;\
sudo docker pull public.ecr.aws/eks-distro/coredns/coredns:v1.7.0-eks-1-18-1; \
sudo docker pull public.ecr.aws/eks-distro/etcd-io/etcd:v3.4.14-eks-1-18-1; \
sudo docker tag public.ecr.aws/eks-distro/kubernetes/pause:v1.18.9-eks-1-18-1 public.ecr.aws/eks-distro/kubernetes/pause:3.2; \
sudo docker tag public.ecr.aws/eks-distro/coredns/coredns:v1.7.0-eks-1-18-1 public.ecr.aws/eks-distro/kubernetes/coredns:1.6.7; \
sudo docker tag public.ecr.aws/eks-distro/etcd-io/etcd:v3.4.14-eks-1-18-1 public.ecr.aws/eks-distro/kubernetes/etcd:3.4.3-0; \
sudo kubeadm init --image-repository public.ecr.aws/eks-distro/kubernetes --kubernetes-version v1.18.9-eks-1-18-1