https://github.com/begriffs/doublekill
Weird experiments with signals
https://github.com/begriffs/doublekill
Last synced: about 1 year ago
JSON representation
Weird experiments with signals
- Host: GitHub
- URL: https://github.com/begriffs/doublekill
- Owner: begriffs
- Created: 2019-01-06T05:56:33.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-06T07:34:50.000Z (about 7 years ago)
- Last Synced: 2025-01-10T17:50:17.495Z (about 1 year ago)
- Language: C
- Size: 5.86 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Weird experiments
#### Dkill
Assault a process with repeated SIGINTs as fast as possible. This can determine
if those processes reinstate their signal handler promptly enough or if they
allow it to lapse into the default handler. Some systems (like OpenBSD) do not
require handlers to reinstate themselves and block a storm of signals while a
handler is processing, so you won't be able to mess programs up.
Usage: ./dkill -p \ -x \
#### Catcher
A nice target for Dkill. It sleeps in the handler to open up a window of
attack.
#### Segrand
Generate a random number from a segfault. It overwrites memory until a segfault
happens, outputting the ptrdiff\_t offset each time. The segfault stops the
counter, and you can retrieve the final value as a random number.
How to get ten random numbers:
```sh
yes | head -n 10 | xargs -L 1 sh -c './segrand | tail -1'
```
(Works on OpenBSD, but on MacOS the number is deterministic)