Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/0x2b3bfa0/ecsu
Static run-as-root tool using time-based ED25519 authentication
https://github.com/0x2b3bfa0/ecsu
ed25519 golang suid
Last synced: 9 days ago
JSON representation
Static run-as-root tool using time-based ED25519 authentication
- Host: GitHub
- URL: https://github.com/0x2b3bfa0/ecsu
- Owner: 0x2b3bfa0
- License: agpl-3.0
- Created: 2022-12-28T21:48:42.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-28T23:03:41.000Z (almost 2 years ago)
- Last Synced: 2024-10-04T13:22:04.305Z (3 months ago)
- Topics: ed25519, golang, suid
- Language: Go
- Homepage:
- Size: 14.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `ecsu`
**This is just a toy project; consider it useless and insecure unless proven otherwise.**
## Installation
Run `make` and copy the resulting `ecsu` binary to the target machine, then `chown root:root` and `chmod u+s` it.
> **Warning**
> treat the generated `ecsu-keygen` binary as a key file; anybody with enough permissions to read or run it will also be able to unlock `ecsu`## Usage
```console
$ ecsu-keygen
wJI7yT9ZZWTiqyYoIOlmkv3WUqDLss9wHnF7ePA8KWqXbU3KfKRDZpWRXK5l/46O7oIAtAtJy89KPKX6wKtvCA==
``````console
$ ecsu id
time-based code: wJI7yT9ZZWTiqyYoIOlmkv3WUqDLss9wHnF7ePA8KWqXbU3KfKRDZpWRXK5l/46O7oIAtAtJy89KPKX6wKtvCA==
uid=0(root) gid=0(root) groups=0(root)
```## Codes
The time-based codes used by this tool are just the Base64-encoded result of calling [`crypto/ed25519.Sign`](https://pkg.go.dev/crypto/ed25519#Sign) with the current timestep number (i.e. Unix time in 30 second increments)