News for hackers. Stuff that matters.
Re:Don't Copy-Paste from Website to Terminal by csense on Sunday April 07, 2013 @08:41PM (#5509397)
I put all my sensitive files under my home directory. Every subdirectory of my home directory is non-world-accessible, and I have a cron job which chmod's world privileges away from new files and directories that don't match a whitelist of directories I wish to publish (e.g. ~/public_html).

I've started giving each application its own user and group, and do the git checkout, compile, and install as that user. (You don't need root for "make install" if you ran configure with the --prefix option.) Then I know it's not going to be able to write anywhere but its own directories, and won't be able to see my browsing activities or sensitive files, because UNIX permissions won't let it. For added security, once the software is built, move it to a location where only root can write, and chown -R root:root.

You can also use VM's for added security. With the new namespaces in 3.8 (the kernel for Ubuntu Raring Ringtail), it should (in theory) be safe to let untrusted software have root in a Linux container (LXC). (LXC is like chroot but you can virtualize stuff like the network, and since the guest uses the host's kernel memory allocator, you don't have to dedicate a block of memory to running the guest as you would with Xen or Virtualbox.)

Re:Don't Copy-Paste from Website to Terminal by trotsky on Sunday April 07, 2013 @11:36PM (#5509868)
It seems like you've been putting a lot of effort in, but posix uid/gid isolation is increasingly pourous with the typical desktop environment these days. It sounds like you are ready for real RBAC - if you put the time in selinux (or apparmor or grsec) is leaps and bounds more effective.
Re:Don't Copy-Paste from Website to Terminal by sliverstorm on Monday April 08, 2013 @01:18AM (#5510095)
uid/gid is generally a sound system, the problem IMO is basically that no one uses it for serious security, so a lot of things are not set up to be properly careful by default.
Re:Don't Copy-Paste from Website to Terminal by XorNot on Monday April 08, 2013 @06:15AM (#5510875)
uid/gid on Linux also is terrible for trying to enforce inheritance. POSIX ACLs help, but they're strikingly poorly documented/supported.
Re:Don't Copy-Paste from Website to Terminal by sliverstorm on Sunday April 07, 2013 @08:58PM (#5509445)
It sounds like you really want BSD jails.