« first day (3028 days earlier)   

12:00 AM
@RuiFRibeiro Airbnb or similar with short term stays. Under a month should be safe.
But much more work, of course. Plus some areas are saturated.
 
 
7 hours later…
7:07 AM
All can rpm natively list all orphaned or unneeded packages?
@derobert - Would you know if rpm natively list all orphaned or unneeded packages?
@forest - Is your opinion should sudo commands run in a terminal emulator or should they run in the virtual console from a security point of view?
 
7:27 AM
@Motivated Absolutely from a Linux console in a different TTY.
In fact, you shouldn't be using sudo. You should log in as root from a different TTY to perform any activities that require root privileges, and log out when finished.
Otherwise, the user from which you elevate privileges can compromise root.
 
8:12 AM
@forest In many (most?) current distributions, sudo is configured by default so that its token is only valid on the tty it was created for. So any new terminal (virtual console, tab in an emulator, screen window etc.) provides a safe environment for sudo.
I prefer that users run sudo rather than logging in as root: that way their activities are logged, and no one knows the root password, so permissions can be controlled in a finer-grained manner.
 
8:23 AM
@StephenKitt The problem is the fact that the environment can be compromised.
If the environment is compromised, then so is sudo (yes, I know it's setuid so you can't use LD_PRELOAD on it, but there are plenty of other ways).
The issue is the same as with su.
You're right that it improves the ability to log commands, but that can also be done with auditd in a way that is less easy to bypass (no bypass with sudo -i or sudo sh).
So I guess it depends on a tradeoff between basic non-repudiation and security.
 
@forest right, there’s rarely a one-size-fits-all answer when it comes to security, it always depends on the context and the threats.
 
My point is just that, if you let me run a program as user foo, then you later use sudo at said user to run something (anything) as root, I will be able to get root.
Most people want it to act like Windows UAC and don't care about non-repudiation.
 
@forest yes, indeed, but arguably the problematic step there is letting you run a program as user foo in the first place, not letting you run sudo ;-). (Cue dire warnings about web browsing etc.)
 
@StephenKitt Sure, but then why not just run everything as root?
If you're under the assumption that a compromised unprivileged user is the end of the world, then there is no security reason to separate root and non-root contexts.
 
@forest yes, there is: it means uncompromised unprivileged users can’t wreak havoc.
 
8:30 AM
@StephenKitt That's why I specified security reason. It's true that non-root can be a safety net to prevent obliterating partitions and the like.
But in terms of security, there's little (but not no) difference between running su or sudo under your regular user with a strong password, and with no password.
After all, I don't want a browser bug to be able to mount my backup partition. :P
Unrelated, but thought you guys might like to know.
Bug in apt/apt-get.
 
@forest that’s still part of the security assessment in my book, but yes, I agree that there’s little difference in practice, and sudo-capable users should be considered to be equivalent to root.
@forest yes, and a good argument for running apt with TLS (and before anyone says anything, that wouldn’t fix everything, but it greatly reduces the risk of MITM).
 
@StephenKitt I think we're thinking about this from different frames of reference. I'm thinking about it from the perspective of a vulnerability in a program being run by the user, like ffmpeg, whereas it seems like you're thinking about it in terms of a multi-user system where each user may or may not be trusted.
 
@forest yes; I’m trying to keep both in mind but I am thinking of a multi-user context.
 
I am thinking in the context of administration done by the sysadmin.
E.g. SSH in to your server and run sudo under the same account you run rtorrent on when you want to perform administrative tasks, or SSH in directly as root using public key auth. The former means an RCE in rtorrent pwns the whole system. The latter just results in people new to security freaking out at you because they learned that root SSH = bad (without knowing that public key auth mitigates that).
 
@forest yup, with a chain “compromise something the sysadmin uses in day-to-day life → root compromise”.
 
8:36 AM
Exactly.
That's why I always recommend things like SSHing in as root (or in the case of physical terminal access switching to a new TTY, performing the SAK sequence, and logging in directly as root) on security-sensitive systems.
 
TBF I tend to think of any local user compromise as eventual root compromise :-(.
 
My job pretty much revolves around making that more difficult. :P
 
Sandboxing, syscall filtering, mandatory access controls, kernel config hardening, etc.
It's easy to prevent a local user compromise from becoming a root compromise, but it requires letting go of traditional behavior and compartmentalizing administration.
 
Oh yes, most definitely, and compartmentalisation in general is a good habit anyway.
 
8:39 AM
For most people, the step of enabling the SAK sysrq sequence alone is too much of a hurdle to prevent them from casually running sudo -i or su in xterm.
And as a result, I'll always have a job. :P
 
Indeed ;-).
And most sysadmins learn by administering their own system and then try to use the same techniques to manage multiple systems and security-sensitive systems...
In my previous job, no one ever logged in to security-sensitive systems.
 
Yep. I hit that snag once when I decided to do sysadmin stuff while intoxicated.
Ran iptables -F on a production server when I actually meant to run -S.
Flushed the tables, hanging SSH. Had to ask someone to reboot the dedi by hand.
 
Nice...
Where’s the PAM breathalyser plugin?
 
Hah now that's a great idea. :D
 
I have a breathalyser on my phone, the difficulty then would be getting the assertions right. (So my existing hardware could never be satisfactory.)
 
8:43 AM
Phones have breathalysers now? O_o
 
Neat
 
9:34 AM
@FaheemMitha City regulations also might not allow it ;) For that kind of stuff, I am in Europe lol
 
 
2 hours later…
11:19 AM
@FaheemMitha I was just informing you why I was late in saying hello back! ;-)
@StephenKitt I'm going to buy one of those so I can prove I had very little to drink...
(and prove that someone who thinks he's still capable of driving a car will let me drive)
 
 
1 hour later…
12:21 PM
I google a question about thread to find a question here I "mark as protected" !! must be getting old
83
Q: Is there a way to see details of all the threads that a process has in Linux?

LazerFor Windows, I think Process Explorer shows you all the threads under a process. Is there a similar command line utility for Linux that can show me details about all the threads a particular process is spawning? I think I should have made myself more clear. I do not want to see the process hi...

 
1:03 PM
@RuiFRibeiro I don't know what you are referring to. And you didn't link to anything.
@Fabby Ok.
@RuiFRibeiro Oh, maybe you are referring to my comment about Airbnb.
 

« first day (3028 days earlier)