60

On a Linux-based server, I follow basic practices as below:

  1. Make the admin account password long and complicated enough (i.e. theoretically speaking, password cannot be cracked within reasonable time).
  2. Monitor all incoming network traffic to the administrative files.
  3. To extend the layer of protection from #2 above, monitor local file changes (especially ones that have commands that require sudo privileges).
  4. Validate all user input, so that all of the user input is guaranteed to be safe.

As a novice developer, I don't understand how a hacking is even feasible if the server admin practices the above.

yoozer8
  • 806
  • 2
  • 7
  • 17
J. Berman
  • 603
  • 5
  • 6
  • 38
    One keylogger on any terminal your admin will be accessing your server from, and the hacker will be in. You won't be able to tell the hacker from your admin apart. This is just one example, there are many other ways your server could be breached. But the easiest is to count on peoples' own stupidity and/or naivety. – TildalWave Apr 12 '13 at 06:01
  • 14
    ZERO DAYS. That's pretty much it. – NULLZ Apr 12 '13 at 07:26
  • 38
    http://xkcd.com/538/ – user Apr 12 '13 at 09:11
  • 15
    Social engineering. – xan Apr 12 '13 at 09:59
  • If people are cracking your root password, it means they already have root (which is why they can see the contents of /etc/shadow where the hashed password lives). Or else you're not using /etc/shadow, but rather have a traditional setup with hashes in /etc/passwd, which falls short of being as secure as you can be. – Kaz Apr 12 '13 at 15:51
  • 2
  • Verify every relevant line of code in the system that it is correct and secure, and compiled properly (if applicable).
  • – Kaz Apr 12 '13 at 15:53
  • 8
    The only almost surefire way to make hacking unfeasible is to (1) destroy what you are trying to protect, (2) hire someone you trust to ensure no one is capable of backwards time travel to get at it before it was destroyed, (3) ensure there are no copies of data and that no one knows it, which means you likely have to commit suicide or have someone kill you that you trust, and (4) ensure no one can revive you, and that you will not remember the information if you are ever revived in whole or part or reincarnated and have past life recollections. It's not as easy as it sounds. – Gary S. Weaver Apr 12 '13 at 17:04
  • 1
    @GaryS.Weaver - Check it out: http://scifi.stackexchange.com/ – TildalWave Apr 12 '13 at 17:55
  • Yes, YES!! It's all so SIMPLE! You are INVINCIBLE! So uh.. what mega-huge financial site was that you were working on again? More seriously, you assume you actually control all of that and there's no third-party point of entry anywhere at all and that you're only using core library stuff which itself is of course always super-secure and never prone to attack or if it was, certainly never left that way for weeks to months at a time by corporate/political shenanigans when a serious vulnerability is discovered. – Erik Reppen Apr 12 '13 at 22:55
  • @GaryS.Weaver There are only 2 surefire ways to make hacking unfeasible. (1) already mentioned by you. (2) Apathy. Decide you don't care. Then when third parties infiltrate your system, it is not hacking. Or use a combination of 1 & 2. – emory Apr 13 '13 at 14:41
  • @Kaz 6. Inspect the hardware with a powerful microscope to insure it is correct and secure and asssembled properly. – emory Apr 13 '13 at 20:44
  • What makes you think you can trust the computer you're sitting in front of, to administer a server? – ruief Apr 14 '13 at 13:04
  • @emory Inspect the powerful microscope to ensure it is correct, secure, and assembled properly... as well as the tools you used to check it. Plus those tools... plus... Until eventually you have to check yourself (who's to say didn't secretly implant a computer into your brain, to modify your sensory input... Now you're in trouble! At some point you simply have to put faith into the trustworthiness of something! – Kitsune Apr 15 '13 at 15:16
  • @Kitsune yes you are right the madness does not stop with the powerful microscope. You will have to check an infinite set of things, but you will never have to check yourself. If the adversary can hack your brain why would the adversary bother hacking your computer. It already belongs to him. Or you could simply admit that your computer is hackable and go on with your life. – emory Apr 15 '13 at 18:45
  • You are managing a risk. Risks cannot be eliminated, only mitigated so that the residual risk is less. As you do not have 100% control over ALL variables, you cannot ever be 100% sure that someone cannot find a weakness in your system. – Tim X Apr 18 '13 at 22:59