I just read this article which was shared on lobste.rs
Had never heard of really(8) or userv before now, but as I seem to be interest in more simplified ways to elevate privileges it caught my eye.
Anyone ever used these tools or still do?
An interesting comment found on the lobste.rs thread shared this:
orly
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char** argv) {
if (setuid(0)) {
fprintf(stderr, "Couldn't set UID\n");
exit(1);
};
if (setgid(0)) {
fprintf(stderr, "Couldn't set GID\n");
exit(1);
}
argv++;
execvp(argv[0], argv);
}
$ $(CC) --std=c11 -Werror -Wall -o orly main.c
$ sudo setcap cap_setuid,cap_setgid=ep orly
@rvp I'm hoping you can translate this into english for me and give me your thoughts? (I've also replied to the author of this comment on lobste.rs asking for some explaination).
I still to this day use the suas
sued
suec
scripts from this thread. I've still got opendoas
installed for times when I don't want to be prompted for my password, but interested still in these other methods.