Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

118
`kindly`: a simplistic (and hopefully educational) implementation of a set-user-ID-root program (think mini `sudo`) for Linux
Author Summary
VinceMiguel is in Idaho
Post Body

I wanted to learn more on how authentication and privilege escalation works on Linux so I developed kindly

# Checking the encrypted passwords of the users on your system
kindly cat /etc/shadow

This project does not in any way aim to replace sudo and was implemented by someone without a background in cryptography or infosec, although the appliacation does take some security measures:

  • Locks all memory pages mapped into its address space in order to avoid leaking information if sent to swap
  • Reads the password from a tty using rpassword
  • Zeroes and drops the unencrypted password as soon as it is no longer needed through non-elidable operations
  • Attempts to avoid timing attacks through "constant-time" byte comparisons

kindly does aim, however, to be very readable and well-commented.

Check the main function to get an overall look into all of the stuff it does.

Repository link: https://github.com/vrmiguel/kindly

Any thoughts or discussions are welcome :D

Author
Account Strength
100%
Account Age
10 years
Verified Email
Yes
Verified Flair
No
Total Karma
24,261
Link Karma
3,790
Comment Karma
20,224
Profile updated: 1 day ago
Posts updated: 1 month ago

Subreddit

Post Details

Location
We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
3 years ago