Skip to content

Conversation

hannahfluch
Copy link

closes #2633

Pwntools Pull Request

Thanks for contributing to Pwntools! Take a moment to look at CONTRIBUTING.md to make sure you're familiar with Pwntools development.

Please provide a high-level explanation of what this pull request is for.

WIP!

Adding a utility class for glibc's __exit_funcs. This can be helpful when promoting an arbitrary write and read to RCE.

See this resource for more info. A lot of exploits just use the CxaFunc and ExitHandler class shown here, so it would make sense to have the functionality in pwntools as well.

TODO

  • documentation
  • compliance with older glibc versions
  • exit handler class

Testing

Pull Requests that introduce new code should try to add doctests for that code. See TESTING.md for more information.

Target Branch

Depending on what the PR is for, it needs to target a different branch.

You can always change the branch after you create the PR if it's against the wrong branch.

Branch Type of PR
dev New features, and enhancements
dev Documentation fixes and new tests
stable Bug fixes that affect the current stable branch
beta Bug fixes that affect the current beta branch, but not stable
dev Bug fixes for code that has never been released

Changelog

After creating your Pull Request, please add and push a commit that updates the changelog for the appropriate branch.
You can look at the existing changelog for examples of how to do this.

@hannahfluch hannahfluch changed the title feat: add exit function skeletons feat: add libc __exit_funcs utility class Oct 11, 2025
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.

ExitHandler module

1 participant