Slashdot Mirror


Sloppy Linux Admins Enable Slow Brute-Force Attacks

badger.foo passes on the report of Peter N. M. Hansteen that a third round of low-intensity, distributed brute-force attacks is now in progress — we earlier discussed the first and second rounds — and that sloppy admin practice on Linux systems is the main enabler. As before, the article links to log data (this time 770 apparently already compromised Linux hosts are involved), and further references. "The fact that your rig runs Linux does not mean you're home free. You need to keep paying attention. When your spam washer has been hijacked and tries to break into other people's systems, you urgently need to get your act together, right now."

391 comments

  1. Outward facing systems ... by taniwha · · Score: 5, Informative

    That system you have with SSH facing outwards - right now: PermitRootLogin no, PubkeyAuthentication yes, PasswordAuthentication no, Allowusers one-guy-only

    1. Re:Outward facing systems ... by Anonymous Coward · · Score: 0

      pam_abl or a similar solution works fine for me :)

    2. Re:Outward facing systems ... by quintus_horatius · · Score: 5, Insightful

      And perhaps set your SSH port to a non-standard port, where possible? Brute-force attackers seem to ignore high (> 1023) ports.

    3. Re:Outward facing systems ... by marcansoft · · Score: 4, Funny

      Or you could just not use weak passwords.

    4. Re:Outward facing systems ... by icydog · · Score: 5, Insightful

      I agree with your post if only one person needs access to the box (and i agree with PermitRootLogin no always). But while public key auth is great, it just isn't feasible for many applications. For example, imagine you're a cheap webhost that provides ssh, scp, sftp access to your users, Do you require them all to use public keys auth? 90% of them don't even know what that means. What a support headache.

      And public keys aren't always that secure either. There are probably still plenty of servers with weak keys from the Debian debacle. What do you do with those users if password authentication is disallowed? Just lock them out and make them call you for a key reset?

    5. Re:Outward facing systems ... by Anonymous Coward · · Score: 1, Interesting
    6. Re:Outward facing systems ... by ErikTheRed · · Score: 1

      That system you have with SSH facing outwards - right now: PermitRootLogin no,
      PubkeyAuthentication yes, PasswordAuthentication no, Allowusers one-guy-only

      You mean there are other ways to configure a system?!?!? :-)

      --

      Help save the critically endangered Blue Iguana
    7. Re:Outward facing systems ... by Antique+Geekmeister · · Score: 4, Insightful

      And don't forget to keep it updated. And do not use FTP based on normal user passwords. And HTTP based on normal user passwords. And turn off rsh. And turn off telnet. And make sure people don't use the same passwords for your critical servers and their external bank accounts and web services. And rip Subversion and CVS out because of their continuing practice of storing your account passwords in plain-text. And make sure that your POP and IMAP servers are SSL protected, always. And make sure that your SMTPAUTH is done enctypred. And make sure that your boss does not send passwords to people via email.

      Etc., etc., etc. I'm sorry, but please don't pretend that strong passwords are enough to protect you from general attacks. And don't pretend that you can force users to pick good passwords.

    8. Re:Outward facing systems ... by Anonymous Coward · · Score: 0

      And how exactly PermitRootLogin no makes your system more secure when you already have PubkeyAuthentication yes and PasswordAuthentication no? Are you afraid that someone is gonna guess your private key or something?

    9. Re:Outward facing systems ... by gweihir · · Score: 1

      Actually a good strong password is quite enough. I use 8 random chars/numbers.

      For convenience I have password-less ssh login, also for root, but only from root and from similarly or better protected machines.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    10. Re:Outward facing systems ... by marcansoft · · Score: 2, Insightful

      Who said anything about users? Of course, if you're running a system for other untrusted users, then you've got a whole host of other problems that you need to deal with. If you're running a server for yourself and a few friends though, using strong passwords for SSH (and not using them for other stuff too) is a perfectly valid solution. "Outward facing system" does not imply "public, multi-user server".

      And seriously, if anyone out there is still doing HTTP/FTP/SMTP/POP3/IMAP with system auth passwords which also work for SSH, or has rsh or telnet enabled, or don't require SSL for SMTP/POP3/IMAP login, they deserve to be shot. All of those should be a given in this day and age.

    11. Re:Outward facing systems ... by madbavarian · · Score: 1

      Blocking root is a bit of an over reaction. Blocking password, pam, kerberos, onetime and all that other rot is good enough for stopping the brute force attacks. Nobody is going to brute force root's 1k (or 2k) key in any usable timeframe. While one is editing the file, might as well put an ssh-level keepalive in there for 30 minutes to clean up dead connections and keep lame NAT boxes primed. Protocol 1 should probably also be turned off. It has a few known failure modes. Cranking down logingracetime keeps the bruteforce attacks from tying up too many resources. One should never see RSA login take 10 seconds on a modern system with the rsa key unlocked and stored in keyserver. Even typing the passowrd in realtime shouldn't take 10 seconds.

      Protocol 2
      LoginGraceTime 10
      PermitRootLogin without-password
      PubkeyAuthentication yes
      PasswordAuthentication no
      ChallengeResponseAuthentication no
      KerberosAuthentication no
      GSSAPIAuthentication no
      UsePAM no
      X11Forwarding yes
      ClientAliveInterval 60
      ClientAliveCountMax 30
      AllowUsers root myaccount

    12. Re:Outward facing systems ... by Korin43 · · Score: 4, Interesting

      Setting SSH to high port seems like a bad idea. A non-root user could run a fake SSH instance to collect your password. Of course, that assumes someone else has access and the SSH server isn't running or crashed, but still, it's not the best way to add security.

    13. Re:Outward facing systems ... by Curunir_wolf · · Score: 3, Insightful

      Or - unless you're traveling and using hotel or hotpoint access to get to your server a lot, or your list is too long, just block SSH from all IPs except for the addresses you know you'll be using.

      --
      "Somebody has to do something. It's just incredibly pathetic it has to be us."
      --- Jerry Garcia
    14. Re:Outward facing systems ... by mysidia · · Score: 4, Informative

      Better yet, keep the port closed to the outside world. Use port knocking with software such as Aldaba to control the ability to ssh in.

    15. Re:Outward facing systems ... by Thaidog · · Score: 2, Informative

      Port knocking is a good way to conceal that ssh is available. Use fwknop!

      --

      ||| I still can't believe Parkay's not butter.

    16. Re:Outward facing systems ... by mysidia · · Score: 5, Interesting

      Don't set 'PasswordAuthentication no' * out the password for the SSH-only allowed users. Or even better yet, run ssh on a non-standard port, and do a fake SSHD that always denies and connection tarpitting on port 22.

      That way the 'brute forcers' will have no idea your system is more secure. While they're wasting time trying to break security on your uber locked down systems, they're leaving some other systems alone. If they're trying to brute force X hosts at a time, and some of them are secure, it will be longer before they move along to possibly more insecure hosts.

      This reduces the rate of expansion of these annoying brute forcers

    17. Re:Outward facing systems ... by Antique+Geekmeister · · Score: 2, Interesting

      Oh, I agree that they deserve to be shot. But don't blame the admin himself. Just try to get a startup company run by former academics who aren't old enough to remember the Morris Worm to take security seriously. I spent far too long sharing guidelines with a professional colleague last year, only to have his company's VP's throw the whole security recommendation away under the guise of "not critical". Then they fired him, apparently partially in retaliation for expressing his concerns as part of his project reports. I've written him excellent recommendations, but am very pleased that my upstream managerial personnel have been taught, partly by me, to take security seriously.

    18. Re:Outward facing systems ... by Trogre · · Score: 1

      PermitRootLogin no - Correct
      PubkeyAuthentication yes - Not so much

      Public keys are great for trusted intranets and all, but for external access they're not such a good idea. If someone compromises your workstation they're automatically authenticated on the outward-facing server.

      --
      "Nine times out of ten, starting a fire is not the best way to solve the problem." - my wife
    19. Re:Outward facing systems ... by HeronBlademaster · · Score: 1

      And rip Subversion and CVS out because of their continuing practice of storing your account passwords in plain-text.

      If your Subversion server is storing passwords in plaintext, you're doing it wrong. I've set up several servers for use with Subversion, and all of them store user passwords encrypted. As far as I know, that's the default way of doing it when you're doing Subversion through Apache.

    20. Re:Outward facing systems ... by Antique+Geekmeister · · Score: 2, Informative

      What? Oh, I'm not talking about the server! I'm talking about the UNIX and Linux clients, which by default store your passwords in clear-text in $HOME/.subversion/auth/. Subversion has always done this: no fix has ever been planned for Linux and UNIX clients. There are workarounds, such as using 'svn+ssh' or using only Windows clients such as TortoiseSVN that do not have this problem, but there is no actual fix for this planned.

      Subversion 1.6 does ask before storing the passwords, but that's not a fix.

    21. Re:Outward facing systems ... by SanityInAnarchy · · Score: 4, Informative

      If you've connected to it once, you've got the host's public key.

      Any user who generates their own key will trigger MASSIVE warnings from SSH, just as if you'd been MITM'd any other way.

      --
      Don't thank God, thank a doctor!
    22. Re:Outward facing systems ... by SanityInAnarchy · · Score: 1

      The SVN client does store passwords in plaintext.

      --
      Don't thank God, thank a doctor!
    23. Re:Outward facing systems ... by SanityInAnarchy · · Score: 2, Insightful

      Let's see...

      don't forget to keep it updated.

      Done.

      do not use FTP based on normal user passwords.

      I don't use FTP.

      And HTTP based on normal user passwords.

      I don't have any HTTP service that I need http-auth for.

      And turn off rsh. And turn off telnet.

      What distro are you using that has these on by default?

      And make sure people don't use the same passwords for your critical servers and their external bank accounts and web services.

      I'm the only one with ssh to this box. And this article has scared me into disabling PasswordAuthentication -- not that any of my critical accounts have passwords anyway.

      And rip Subversion and CVS out

      I use Git.

      make sure that your POP and IMAP servers are SSL protected, always.

      I don't use POP, and I only use IMAP over OpenVPN or a LAN. I think OpenVPN > SSL, and I can physically see all computers connected to the LAN switch.

      And make sure that your SMTPAUTH is done enctypred.

      I don't have SMTPAUTH enabled. This is a potential flaw -- if someone can get onto a trusted network. Again, OpenVPN or LAN.

      And make sure that your boss does not send passwords to people via email.

      I'm unemployed.

      Now, you're right that strong passwords aren't nearly as good as strong keys. But they are sufficient, I think.

      Of course, I use a 4096-bit RSA key.

      --
      Don't thank God, thank a doctor!
    24. Re:Outward facing systems ... by ion.simon.c · · Score: 1

      You *can* create keys which require a passphrase to be used.

    25. Re:Outward facing systems ... by cetialphav · · Score: 5, Insightful

      Port knocking is a good way to conceal that ssh is available.

      I guess it depends on what type of attacker you are trying to protect against. For attackers that are trolling around looking for easy targets, then things like this that add obscurity probably make sense. On the other hand, if I were in charge of a high value target, then I probably wouldn't bother. A high value target will have knowledgeable attackers who are very focused on exploiting you. In those cases, things like this are only mild inconveniences that will not make them give up. The port knocking sequence needed to open up ssh is not exactly a secret. It gets exposed in the clear to the network on every ssh connection. For high value targets, I would actually want the system as simple as possible to reduce the possiblity that a bug in one of the obscurity features actually becomes the attack vector.

      Using port knocking is like locking my car door. It makes it harder for lazy, stupid thieves to get into my car, but it does absolutely nothing for someone who really, really wants to steal my car because a good thief can bypass it in a trivial amount of time.

    26. Re:Outward facing systems ... by ffreeloader · · Score: 3, Informative

      And public keys aren't always that secure either. There are probably still plenty of servers with weak keys from the Debian debacle. What do you do with those users if password authentication is disallowed? Just lock them out and make them call you for a key reset?

      Your assumption about Debian's problems with ssh is rather unlikely. The only way weak keys still exist is if the system hasn't been updated in the last couple of years.

      When Debian pushed out the ssh update they also pushed out an automated check for weak passwords that ran before the update was finished. The script told the admin if any weak keys existed on the machine and that they needed to be updated immediately.

      Of course, you could be right that there are admins stupid enough to have ignored all that. I saw a request for help on how to enable root login for ssh just a couple of weeks ago, and the poster didn't reply to posts saying that allowing root login was a very bad idea.

      --
      "while democracy seeks equality in liberty, socialism seeks equality in restraint and servitude." de Tocqueville
    27. Re:Outward facing systems ... by HeronBlademaster · · Score: 1

      Interesting. I hadn't really thought about that.

      Here's the question, though. Is ~/.subversion world-readable? If not, what group is it assigned, by default? Is it $USER? If so, I don't see a problem unless other users on the system have root access (or unrestricted sudo permissions).

      Granted, that's just my personal opinion. Were I running a secret government Subversion server, I'd probably be more strict, but if the folder is only user-readable it's not going to be a problem 99% of the time.

      (I'd answer these questions myself, but I'm in Windows at the moment, where I use TortoiseSVN.)

      On an related note, does anyone know where Cygwin's Subversion client stores passwords? There's no .subversion in my home directory.

    28. Re:Outward facing systems ... by DavidTC · · Score: 2, Insightful

      You can get 99% of the port knocking benefit by simply running ssh on another port.

      Almost all ssh attacks are automated, and if you're not running something on port 22, you won't be attacked.

      So essentially you're left with people who are specifically targeting you, and portscan the system. Those are the sole people that port-knocking protects against.

      --
      If corporations are people, aren't stockholders guilty of slavery?
    29. Re:Outward facing systems ... by Anonymous Coward · · Score: 0

      You missed the "upload your public key" step ..

    30. Re:Outward facing systems ... by Anonymous Coward · · Score: 1, Insightful

      I hate to break it to you, but you need to work on your reading comprehension skills.

    31. Re:Outward facing systems ... by nacturation · · Score: 1

      I hate to break it to you, but all ports below 1024 typically require superuser privileges to be opened.

      This thread is about running SSH on ports > 1023 which a regular user can do. Nobody so far has claimed that running on a port below 1024 doesn't require superuser privileges.

      --
      Want to improve your Karma? Instead of "Post Anonymously", try the "Post Humously" option.
    32. Re:Outward facing systems ... by GiMP · · Score: 1

      A tarpit will have very limited effect against a distributed attack. Each IP many only attack once, at which point a tarpit has no value in stopping the attack.

    33. Re:Outward facing systems ... by TheLink · · Score: 1

      > I don't see a problem unless other users on the system have root access

      On most linux systems if UserA launches a browser it runs as UserA, with the full privileges of UserA. And that includes the ability to read your svn passwords and ssh ID files.

      It's just most attackers can't be bothered to attack linux users.

      FWIW, I usually run my browsers using different users from my main account. You can do it whether you're running windows or linux.

      But you can't do it if you're trying to do it with Google Chrome...

      --
    34. Re:Outward facing systems ... by xous · · Score: 1

      I'm sorry but I've seen so many laughably stupid attempts at ssh "security" that I have to address the following flaws. PermitRootLogin no: Preventing root login is impractical for transferring files outside of your own user account. Preventing root login is impractical for use with most control panels. The only argument I can think of for not permitting root login is that they don't have to guess the user name. On some systems I will set PermitRootLogin without-password to still permit key based authentication which is what I use primarily anyway. PasswordAuthentication no Using this in a shared hosting environment is simply not practical as most customers can barely figure out how to download PuTTY. I don't really like the idea of giving shell access to these customers at all but that is another topic. All changing the SSH port will do is annoy and confuse users. Some bots may not do a port-scan yet but if significant number of people start using arbitrary port scans they will simply start scanning. Real suggestions: Update your software Require strong passwords and audit the system regularly. Use secure protocols. (ftp+tls, imaps, pops) Use a firewall that dynamically blocks multiple failed connection attempts.

    35. Re:Outward facing systems ... by XanC · · Score: 1

      Wouldn't the tarpit temporarily prevent that machine (or at least thread) from connecting to somebody else's server? I think that's what the OP's getting at. Just to slow 'em down.

    36. Re:Outward facing systems ... by HeronBlademaster · · Score: 1

      That's only a problem if you don't trust your browser makers. If Firefox starts stealing people's Subversion passwords, people are going to notice; Javascript isn't going to be able to dig around your local filesystem (at least, not without your permission). I don't know about Flash, though. I would assume it needs user permission to do filesystem stuff?

      So... I take it you don't trust Mozilla?

    37. Re:Outward facing systems ... by profplump · · Score: 4, Interesting

      First, the server signature would change, unless the attacker already has root access and can copy the private key, in which case the port number is irrelevant. Any decent SSH client whines quite a bit about such changes.

      Second, there are several auth methods you could use that do not expose any private data, including pubkey and kerberos. One of the purposes of such auth methods is to prevent re-used even if an attacker gets your session credentials.

    38. Re:Outward facing systems ... by profplump · · Score: 1

      Any sort of stored password, encrypted or otherwise, is subject to attack. If your computer can recover the plaintext without you providing some sort of key, then an attacker could do it too. There's maybe some slight complication to obfuscating on-disk passwords, but unless they keystore is encrypted against an actual secret -- something you type -- then it's only marginally better than storing plain-text passwords.

      That being said, there are a number of solutions for securely storing passwords in a wallet/keychain/etc. that are *not* readable by an attacker without your secret, and which require some amount of authentication to use even when unlocked, at the cost of having to type your password once per session, and subversion could easily use one of these.

    39. Re:Outward facing systems ... by profplump · · Score: 1

      You *should* create keys that require a passphrase. In fact, that's the default -- you're prompted to enter one when creating a key on every system I've ever used.

      Not only that, but even if you compromise a system that has unencrypted keys, you still have to know where those keys work. In the past known_hosts could help with that, but now that is hashed, so you'd have to both break into a workstation with unencrypted keys AND know where those keys work to do anything useful -- that's probably still a net gain over passwords.

    40. Re:Outward facing systems ... by HeronBlademaster · · Score: 1

      How many of those critical security bugs expose arbitrary filesystem access to Javascript (or Flash) every year? How many ever?

      If your answer is either "I don't know" or even "less than one per year", then we can safely ignore you, because you're just fearmongering.

    41. Re:Outward facing systems ... by buchner.johannes · · Score: 1

      Also make sure you have libcrack installed, so users can't set short/easy passwords.

      --
      NB: The message above might reflect my opinion right now, but not necessarily tomorrow or next year.
    42. Re:Outward facing systems ... by TheLink · · Score: 1

      > So... I take it you don't trust Mozilla?

      Only up to a point. Their track record for security hasn't been very good.

      --
    43. Re:Outward facing systems ... by mathew7 · · Score: 1

      Or you could just not use weak passwords.

      I wish someone would have told me this before.....
      Now seriously, I knew this would be a risk, I just ignored it (bad! bad! bad!).

      Last week I was hacked (my home system/router) and I noticed because my ssh server refused my authentification. That's how I knew I was hijacked. I had 1 user with dictionary-word password and full sudo access. The reason it stayed so long is because I saw long time ago a ssh brute-force attempt (100s of tries/second), so using iptables I limited the incomming ssh connection attempts to 5/min. This would be enough for my daily connections from work, but very slow for brute-force. But of course, slow is not the same as impossible.

      So my server migration plans (gentoo -> ubuntu) were finally executed. I wanted to do the change for a year but always delayed it because of "if it works, don't fix it" and the time required. This weekend I had no choice.

      PS: Am I just paranoid or there is too big of a coincidence of this article appearing just after I was hijacked? I keep hearing the phrase: "nothing is coincidence".

    44. Re:Outward facing systems ... by Anonymous Coward · · Score: 1, Interesting

      And don't forget to keep it updated. And do not use FTP based on normal user passwords. And HTTP based on normal user passwords. And turn off rsh. And turn off telnet. And make sure people don't use the same passwords for your critical servers and their external bank accounts and web services. And rip Subversion and CVS out because of their continuing practice of storing your account passwords in plain-text. And make sure that your POP and IMAP servers are SSL protected, always. And make sure that your SMTPAUTH is done enctypred. And make sure that your boss does not send passwords to people via email.

      Etc., etc., etc. I'm sorry, but please don't pretend that strong passwords are enough to protect you from general attacks. And don't pretend that you can force users to pick good passwords.

      permitting root login does seem like a bad idea, but if you have a system with LDAP or kerborose where authentication can get messed up, sometimes being able to log in as root is able to save you a trip to your DC.

    45. Re:Outward facing systems ... by dnaumov · · Score: 1

      And don't pretend that you can force users to pick good passwords.

      Err, sure you can? You can have a very harsh password policy automatically enforced by the system (rules including amount of lowercase and uppercase and letters and symbols with specific symbols or words being specifically disallowed to be used as part of the password). This is the easy part. The hard part is getting the users to NOT write down this password on a piece of paper glued to the monitor.

    46. Re:Outward facing systems ... by Sillygates · · Score: 1

      http://www.pettingers.org/code/sshblack.html

      or, what I use in my workplace (execute via an init script/or add to /etc/rc.d/rc.local):

      # create new chain "SSHRULES"
      # if packet is NEW, coming in on eth0, on port 22 apply rules in "SSHRULES"
      #
      # SSHRULES:
      # if is on our subnet, accept the connection, stop reading the chain
      # record a connection attempt
      # if has more than 2 connection attempts in the last 7 seconds, reject

      iptables -N SSHRULES

      #insert at the top of the "INPUT" chain
      iptables -I INPUT 1 -p tcp -i eth0 -m state --state NEW --dport 22 -j SSHRULES

      iptables -A SSHRULES -m iprange --src-range 129.65.0.0-129.65.255.255 -j ACCEPT
      iptables -A SSHRULES -m recent --update --hitcount 2 --seconds 7 -j REJECT
      iptables -A SSHRULES -m recent --set -j ACCEPT

      --
      I fear the Y2038 bug
    47. Re:Outward facing systems ... by js_sebastian · · Score: 1

      (...) And make sure people don't use the same passwords for your critical servers and their external bank accounts and web services. (...)

      Good advice. But how exactly do I make sure?

    48. Re:Outward facing systems ... by Anonymous Coward · · Score: 0

      fwknop http://www.cipherdyne.org/fwknop/ is a SPA (Single Packet Authorization) tool designed to be the replacement for port knocking, addressing the issues you mention and more. I recommend looking into it.

    49. Re:Outward facing systems ... by Sinus0idal · · Score: 1

      I tend to do something like: iptables -A INPUT -m state --state NEW -p TCP --dport 22 -j ACCEPT -m limit --limit 5/min to limit bruteforce attempts. Of course, this does open you up a little to someone DoSing your SSH, but you could always stick some specific IPs in there two which aren't rate-limited.

    50. Re:Outward facing systems ... by smoker2 · · Score: 1

      PermitRootLogin no: Preventing root login is impractical for transferring files outside of your own user account.

      WTF ? PermitRootLogin is referring to the initial SSH login. You can still login as a regular user, then su to root. You can then put files ANYWHERE on the system and chown them to the relevant user. Similar to disallowing root login as a local user, once you're in, if you have sufficient privileges you can su to root.
      Disallow password based logins and you restrict the possible users to only those with an installed key, and you restrict the keys to only those who should have one. See how we narrow down the vectors of attack ? Unless you are in the habit of giving wheel membership to everybody on the system there should only be one user with access to root. Allowing direct root login via password is ASKING for trouble when they try to brute force the password. If they succeed they are already in command of your system.

      Which control panel software uses a root login ? Please name it so I can avoid it like the plague.

      As for users having difficulty with puTTY, don't give them shell accounts. If they can't work out how to use puTTY they don't have the skills to use the shell on a shared machine. And if they are using puTTY anyway, they are not using a linux client, further evidence of their unfamiliarity with the shell environment. If they want a shell account, make them buy a virtual machine rather than share a host.

      I've always been sceptical of claims that linux is just as insecure as windows, but with the stupid comments I see on this thread, I'm beginning to change my mind. The system is fine, it's the fucking stupid would-be admins who are the problem. Read a fucking book, follow the best practices set out in the documentation for the service. They are not there to increase your convenience, they are there to increase security. Yes you can ignore them, but don't you dare say you haven't been warned. You never improve security by removing layers of protection. Calling basic security "laughably stupid" says more about you than you would probably like.

    51. Re:Outward facing systems ... by Anonymous Coward · · Score: 0

      I don't see what the big deal is.

      I store my passwords in plaintext on an encrypted loop partition myself.

    52. Re:Outward facing systems ... by BrokenHalo · · Score: 1

      Paranoid or not, I hope you've revoked the access of your sudoer with the dictionary password...

    53. Re:Outward facing systems ... by Sinus0idal · · Score: 1

      Whoops yeah that wouldn't work against this attack, didn't realise we were talking about such low frequency attempts!

    54. Re:Outward facing systems ... by PhunkySchtuff · · Score: 2, Informative

      Setting your ssh port to a high number is not a bad idea at all. All these brute-forcing ssh scanners don't portscan a host looking for ssh on any port, they connect to port 22 and see what is there. Moving it to any other port will reduce the incidence of these botnet scans by an order of magnitude, if not eliminate it entirely.

      A non-root user can not run software that binds to low numbered ports, so having someone else on the system impersonate sshd is a non issue.

      Secondly, as many mention, turning off password authentication altogether is another very good way to prevent these attacks, doing both (passwordless authentication on a port that is not 22) will virtually eliminate altogether these random scans.

      If you don't have password authentication on, then even if someone impersonates sshd, they won't get any useful information from you.

    55. Re:Outward facing systems ... by Anonymous Coward · · Score: 0

      I thought this thread was about port 22 being free as SSH was running on a high port, which leaves 22 open to be hijacked to collect (albeit mostly bruteforced junk) logins.

    56. Re:Outward facing systems ... by Anonymous Coward · · Score: 0

      OpenVPN uses SSL to encrypt its data streams.

    57. Re:Outward facing systems ... by Fred_A · · Score: 1

      Or you could just not use weak passwords.

      How could they figure out my password ? They'd first have to get hold of my luggage !

      --

      May contain traces of nut.
      Made from the freshest electrons.
    58. Re:Outward facing systems ... by sadness203 · · Score: 1

      Easy, you brute-force their bank account. Or you use a keylogger.

    59. Re:Outward facing systems ... by wertarbyte · · Score: 1

      Try transferring a larger directory structure (e.g. using rsync) without harming owner and permission data.

      --
      Life is just nature's way of keeping meat fresh.
    60. Re:Outward facing systems ... by Anonymous Coward · · Score: 0

      Those are the sole people that port-knocking protects against.

      And how does an 3133t attacker determine the port-knocking sequence when I'm port-knocking by doing, say, port 1025,1024, 1026 then 1027 and then only allowing one SSH attempt from the IP that just correctly port-knocked?

    61. Re:Outward facing systems ... by wetlettuce · · Score: 1

      Running the command:

      $ history | grep ssh

      would likely give a good list...

    62. Re:Outward facing systems ... by EatHam · · Score: 1

      And perhaps set your SSH port to a non-standard port, where possible? Brute-force attackers seem to ignore high (> 1023) ports.

      That works great until everyone starts doing it, and the brute-force attackers no longer ignore it.

    63. Re:Outward facing systems ... by Antique+Geekmeister · · Score: 1

      I know you think you're kidding. But the old 'crack' program, by Alec Moffett, was very useful for detecting weak passwords. In many different environments it would successfully guess roughly 10% of all passwords, using the publicly available encrypted passwords from /etc/passwd in systems that had never had shadow passwords enabled. It's gotten tougher since MD5 based passwords came into fashion, admittedly.

    64. Re:Outward facing systems ... by Antique+Geekmeister · · Score: 2, Interesting

      What $HOME/.subversion is set to is dependent on the account creator's permissions for $HOME, and the individual user's umask. But even if .subversion were protected, if the account is NFS mounted or is available on backup tapes, your password is availalble to anyone who can gain _local_ root access on an NFS client and do 'su' to act as other users, or gain access to the backup tapes. NFS, in particular, is generally available to any laptop with a live CD anyone can plug into your network.

      It's an incredible security problem, one generally ignored by people who "trust the people they work with".

    65. Re:Outward facing systems ... by Anonymous Coward · · Score: 0

      Why would you allow external access with just a password ?
      Issue digital certs and be done with it.

      If you have resources that are accessed from the outside what are you thinking by "just" using passwords ?

      Does your bank let you drive up and ask for money without an ID ? Course not. Even if you drove around to ALL the Bank of America branch drive up windows they will ask for ID, you can scan as slow as you want with as many different accounts as you want at as many different branches as you want ..They all ask for a "cert"
      Inside at the teller window ... different story.

    66. Re:Outward facing systems ... by Rantastic · · Score: 1

      I don't use POP, and I only use IMAP over OpenVPN or a LAN. I think OpenVPN > SSL, and I can physically see all computers connected to the LAN switch.

      ...and you were doing so well, too! Why do people assume that "the lan" is some magical secure place? There is no such place. Treat all traffic leaving your machine as if it is on a public network. Otherwise, any vulnerable computer on your lan makes all the rest of the computers vulnerable as well.

      --
      Ask Slashdot: Where bad ideas meet poor googling skills.
    67. Re:Outward facing systems ... by tolan-b · · Score: 1

      Log in as a non root user and su to root, there's very rarely a good reason to allow root to log in directly.

    68. Re:Outward facing systems ... by tolan-b · · Score: 1

      I'm a tool and mis-read your (GP) post :)

      However you can still get around this by having a single non-root user that isn't managed by LDAP or whatever which you can log in with and su to root.

    69. Re:Outward facing systems ... by cenc · · Score: 1

      I added geoip scripts to limit the ISP's that are allowed to access my system to just the ip blocks I might need to USE. Yes, it is not a complete solution by itself, but it sure helps eliminate both the white noise and millions of potential attack vectors so I can focus on the real threat. For example, there is never a reason for any computer outside my country to make an SSH connection to my server. There goes 99% of all computers in the World right there. So, now I only have to worry about less than 1 million computers (number of Internet connections in my country) on basically 3 IPs. I eliminated at least a lot of log noise, and that makes for quick review of problematic connections.

      People can spoof the IP, use proxies, and so on, but combine with other security measures it makes finding the needle much easier because I reduced the size of the haystack.

    70. Re:Outward facing systems ... by molecular · · Score: 1

      And rip Subversion and CVS out because of their continuing practice of storing your account passwords in plain-text.

      just use svn+ssh://...
      no pass stored in plain

    71. Re:Outward facing systems ... by Anonymous Coward · · Score: 0

      Would you mind pointing out a few of the "cheap webhosts" ? The use of the tools you mention in the same sentence are likely beyond the people you think are using them.
      IF you use scp/sftp you can use a cert. Really ....

      Not sure what your 2nd paragraph is intended to mean - you mix "servers" and "users" together.

      If I ( my company ) are going to use digital certs WE are going to issue them and WE are going to ensure that they are "good".

      where again is the problem ?

    72. Re:Outward facing systems ... by Ender+Wiggin+77 · · Score: 1
      How about setting up firewall rules to only allow SSH from specific source IPs or IP ranges?

      While some folks may require access to servers from unpredictable locations, I bet many are like me and only need access from some specific locations. A firewall rule allows you to drop SSH requests versus exposing an open port and putting a sign out saying "SSH here, I dare you to try and break in".

      Stealth is better.

    73. Re:Outward facing systems ... by Anonymous Coward · · Score: 0

      Maybe you're unemployed because you're so damned smug.

    74. Re:Outward facing systems ... by Anonymous Coward · · Score: 0

      And perhaps set your SSH port to a non-standard port, where possible? Brute-force attackers seem to ignore high (> 1023) ports.

      This is security through obscurity to a certain extent. It may also give people a false sense of security.

      Better to simply just have a properly run SSHd and not have to worry about what-ifs.

    75. Re:Outward facing systems ... by Anonymous Coward · · Score: 0

      OpenVPN is SSL in encrytpion technicality.

    76. Re:Outward facing systems ... by SanityInAnarchy · · Score: 1

      Well, it's a potential vulnerability. Granted, no one's going to be able to get it with physical access, but take, for example, a system like Keychain, on OS X -- or KWallet, or GNOME has something similar.

      Sure, if they can capture keystrokes, or if they can piggyback on a program which has access to the keychain, you're hosed. But it's entirely possible that they wouldn't -- for example, if they've just SSH'd in, they'd have to either crack the keychain, or trick you into allowing them into an open keychain.

      Last I checked, svn basically refused to implement anything like this.

      --
      Don't thank God, thank a doctor!
    77. Re:Outward facing systems ... by SanityInAnarchy · · Score: 1

      Nope. I'm unemployed because the startup I was working for failed.

      --
      Don't thank God, thank a doctor!
    78. Re:Outward facing systems ... by SanityInAnarchy · · Score: 1

      any vulnerable computer on your lan makes all the rest of the computers vulnerable as well.

      Let me spell it out for you:

      Right now, my LAN is a switch, with two things plugged into it: My server and my laptop. If either of those are compromised, I'm hosed anyway.

      If I were to plug a vulnerable machine in, it's still a switched network, which means sniffing is impossible -- they'd have to actively MITM me, somehow without my server noticing. (DNS tricks are right out, as I refer to the server by IP.)

      --
      Don't thank God, thank a doctor!
    79. Re:Outward facing systems ... by geminidomino · · Score: 3, Informative

      No. It's about SSH being run on, for example, port 2222.

      If SSH crashes (or is crashed), that means bad_guy can launch his honeypot on port 2222 now, something that would NOT be doable were it running on a privileged port.

    80. Re:Outward facing systems ... by goldmaneye · · Score: 1

      How does your RSA key fare against wrenches?

    81. Re:Outward facing systems ... by foldingstock · · Score: 1

      That is why it is fun to walk around your office from time to time looking for passwords on post-it notes and arbitrarily change a few letters.

      3's are easy to change to 8's, 1's to 4's, C/c's to O/o's, etc.

      Pretty funny to watch a user pull their hair out when the password they wrote down isn't working. I've managed to scare a few people into not writing their password down this way.

    82. Re:Outward facing systems ... by dyingtolive · · Score: 2, Insightful

      Treat all traffic leaving your machine as if it is on a public network. Otherwise, any vulnerable computer on your lan makes all the rest of the computers vulnerable as well.

      He's unemployed. Every computer on his LAN is his computer.

      --
      Support the EFF and Creative Commons. The war is coming, and they're supporting you...
    83. Re:Outward facing systems ... by houghi · · Score: 1

      Putting it on another port is something I would call 'security through obscurity'.

      --
      Don't fight for your country, if your country does not fight for you.
    84. Re:Outward facing systems ... by AVee · · Score: 2, Funny

      Why do people assume that "the lan" is some magical secure place?

      Because I don't let just anybody into my home and I don't have a wireless network either? And somehow I doubt somebody will break into my house just to hijack another linux box, but when they do they'll probably access the box directly instead of over the network.

    85. Re:Outward facing systems ... by Antique+Geekmeister · · Score: 1

      True, and that's what Sourceforge does. But there's no useful publicly available tool that I know of for managing those public keys. Do you have one? Git, at least, has 'gitosis' for that task, and it allows you to record your changes locally and only push them to the central repository when you're satisfied with your progress.

      This sort of behavior is why I've discarded Subversion wherever possible. Security should not be an afterthought, to be addressed with patches slapped on after the fact.

    86. Re:Outward facing systems ... by Hatta · · Score: 1

      Security through obscurity is not a bad thing. It is stupid to rely *only* on security through obscurity, but obscurity can a useful tool. It won't stop a determined attacker, but it will slow them down enough that they may just go on to the next host.

      --
      Give me Classic Slashdot or give me death!
    87. Re:Outward facing systems ... by Fjan11 · · Score: 1

      If so, I don't see a problem unless other users on the system have root access

      It is not uncommon for people to store their web site assets in subversion. This means Apache will gladly serve your subversion hidden files to the world to anyone who asks for the appropriate page. A typical Rails stack + Capistrano setup will do unless properly configured.

      --
      This sig is just as redundant as the rest of this posting
    88. Re:Outward facing systems ... by mr_flea · · Score: 2, Informative

      Actually, with ARP poisoning, you can effectively sniff a switched network. Of course, there will be traces left (bad ARP table entries and possibly some stuff in syslog), but most people won't notice.

    89. Re:Outward facing systems ... by IMightB · · Score: 5, Informative

      I don't agree with setting the SSH port to non-standard, it is trivial for any determined attacker to figure out which one you've changed it to. Use one of the port/log monitoring daemons that are mentioned further down the page.

      That being said I used to work for a hosting company with a few thousand linux servers, most of them running cPanel (cPanel is a hunk of insecure crap). We'd get a few script kiddie break ins a week. Our solution with dramatically reduced the amount of break-ins (In addition to the SSH mods by the grand-parent) were:

      1) put /tmp as a separate partition and mount it as noexec, nosuid. Make sure your programs php/httpd use /tmp for temporary files, caches and session info. This simple step stopped 80% of attacks.
      2) host allow/deny is your friend
      3) rpm -V is your friend, most script kiddies/attackers are not bright enough to alter the rpm db, they will simply replace system binaries.

      there are a few more but I can't seem to remember them.

    90. Re:Outward facing systems ... by Lumpy · · Score: 1

      and why do you have outwards facing ssh?

      Put it all behind a firewall and VPN in for anything that can be used for access.

      It blows my mind whenever I find a company with an external SSH port open, WHY?? VPN in and then ssh in. Almost all companies do not need any open ports other than VPN.

      --
      Do not look at laser with remaining good eye.
    91. Re:Outward facing systems ... by Anonymous Coward · · Score: 0

      a non root user cannot open and use such a low running port.

    92. Re:Outward facing systems ... by Lumpy · · Score: 2, Interesting

      You know... most people have a server and laptop and a laser printer on a network and there are ways to password harvest using the printer.

      I am hoping that newer HP printers are hardened to this, but back in the late 90's I was ableto perform remote exploits on jetdirect cards in HP printers that allowed me to do a LOT of things that most admins at that time ruled out as impossible.

      --
      Do not look at laser with remaining good eye.
    93. Re:Outward facing systems ... by Lumpy · · Score: 3, Funny

      "DING DONG"

      you: answer door; Hello?
      guy: Hi I'm from linux, I'm here to install a critical patch.
      you: huh? from where?
      guy: linux, linus sent me, I need to patch your computers..
      you: LINUS? REALLY?
      guy: yes, here is my official linux ID, and we have a nice CD full of new unreleased software for your trouble...

      Damn linux hackers are getting better and bolder every day.

      --
      Do not look at laser with remaining good eye.
    94. Re:Outward facing systems ... by kc9fyx · · Score: 1

      You could always tar it up first.

    95. Re:Outward facing systems ... by WuphonsReach · · Score: 2, Insightful

      Just moving the external SSH port to something other then 22 will drop the quantity of brute-force attacks by at least 2 orders of magnitude. Maybe 3.

      That's generally enough of an exposure reduction (combined with only allowing public key authentication.)

      (Use of port-knocking would be useful if you setup a 2nd SSH instance that does allow password authentication. And you don't have more then 3 users, all of which are willing to put up with port-knocking. SSH public keys are a lot easier to configure and support.)

      --
      Wolde you bothe eate your cake, and have your cake?
    96. Re:Outward facing systems ... by Rantastic · · Score: 1

      it's still a switched network, which means sniffing is impossible

      You might want to do a little reading up on network security before making such preposterous statements.

      --
      Ask Slashdot: Where bad ideas meet poor googling skills.
    97. Re:Outward facing systems ... by WuphonsReach · · Score: 1

      And rip Subversion and CVS out because of their continuing practice of storing your account passwords in plain-text.

      For public-facing SVN systems where authentication matters, it is best to use svn+ssh authentication which relies on SSH to do the authentication. No storage of passwords in plain text. Plus you can lockdown SSH keys used for SVN so that they can only run the svnserve command. We even use svn+ssh for our internal clients, because it's simple, it works, and it's secure.

      (As for other authentication methods using passwords - it's a problem of key handling. There is no good way to store the password, and obscuring it doesn't make it any more secure. There's simply no possible way to secure it that works. Which is the whole reason that public key encryption was invented.)

      --
      Wolde you bothe eate your cake, and have your cake?
    98. Re:Outward facing systems ... by Ofloo · · Score: 1

      why even use a computer, .. just don't install anything leave it in the box. Sometimes people actually require open ssh ports, .. some people are just complete ignorant morons, .. they never update their system have shortest possible password and if you say anything they answer, i can't be hacked i've got: - Linux/BSD - a firewall - an antivirus

    99. Re:Outward facing systems ... by Rantastic · · Score: 1

      Are you really defending the use of plain text authentication as an acceptable practice?

      --
      Ask Slashdot: Where bad ideas meet poor googling skills.
    100. Re:Outward facing systems ... by Rantastic · · Score: 1

      I would argue that putting ssh on some arbitrary high port is in fact a bad idea. If for no other reason than you have given yourself the false sense that you have added some level of security. If you can't run ssh on port 22 and keep it secure, you are not making the situation better by moving to another port.

      --
      Ask Slashdot: Where bad ideas meet poor googling skills.
    101. Re:Outward facing systems ... by skeeto · · Score: 1

      Almost all ssh attacks are automated, and if you're not running something on port 22, you won't be attacked.

      Right on with that. When I was on port 22 I was hit every day. Since I moved to port 443 (https) I haven't seen a single ssh login attempt that wasn't me.

    102. Re:Outward facing systems ... by mysidia · · Score: 1

      The password or secret key is just an obscure token that your adversaries aren't supposed to know. All internet systems in the world that allow remote access (except unprotected ones) are protected by obscurity.

      Security through obscurity is only bad when you are referring to the security of a communications protocol or security algorithm (such as a cipher, message digest, or encryption method).

      When it comes to security of computer systems: obscurity is always the main thing guarding the gate.

    103. Re:Outward facing systems ... by Jhon · · Score: 2, Insightful

      I would argue that it is a good idea.

      While it may give you a "false" sense that your system is SECURE, when added with other precautions it will reduce the odds of getting "owned" -- as part of a comprehensive security plan. If your ONLY security is running ssh on port 10225 (or whatever), then I agree with you. Bad idea.

      Running on a non-standard port will in the very least dramatically reduce your chances of getting hit by any zero-day exploits (give you a chance to fix/update ssh that bots are trying to exploit). It certainly reduces the amount of "noise" I need to sift through in my logs on a daily basis.

      It might also help to run a trigger (like port sentry) to kill access to any IP attempting to connect to port 22.

    104. Re:Outward facing systems ... by ffreeloader · · Score: 1

      At one small business I worked for the boss was so paranoid about seeing the attacks in the fail2ban email alerts that he ordered me to stop the attacks. I changed the SSH port and that stopped 100% of the attacks.

      I was surprised by that. I thought it would stop the script kiddies but someone else would scan the ip address and find it.

      This guy also had a cobbled-together desktop application he sold that was hard coded to download software updates via non-anonymous ftp. Well, surprise, surprise, we had a ton of attacks against the ftp port too. fail2ban was our only defense there. He would regularly call me agitated to the point of almost having a heart attack about seeing the fail2ban-generated emails--he insisted on having a copy of them sent to him--and would tell me I needed to stop those attacks from happening.

      I can't tell you how many times I had to explain to him that I couldn't magically control internet traffic to open ports on the firewall. I don't think he ever really understood that. I think he always sort of had the idea in the back of his head that I was being less than truthful about that.

      He was also too cheap to buy/let_me_build a decent firewall and a business class switch with vlans so we could actually implement some type of network security.

      He just couldn't understand how having every machine he owned on the same network segment was a bad idea. He thought the fact that a switch doesn't broadcast traffic like a hub does was all the separation he needed. There was no convincing him otherwise either as I tried to many times.

      Damn, where'd all that come from? I guess I'm still frustrated with that idiot even though I'm long gone from there.

      --
      "while democracy seeks equality in liberty, socialism seeks equality in restraint and servitude." de Tocqueville
    105. Re:Outward facing systems ... by Antique+Geekmeister · · Score: 1

      SanityinAnarchy wrote:

      > If I were to plug a vulnerable machine in, it's still a switched network, which means sniffing is impossibl

      I'm afraid you're mistaken. This is not an uncommon belief, and you're not alone in your confidence in this form of security. But I very strongly urge you to look up 'ARP Poisoning', and consider trying it out in the safety of your own network. It's _nasty_, and an easy way to use a rootkitted laptop or hostile host inside a corporate network to sniff passwords on unsecured protocols.

      The way to mostly defeat that is to program your switch so that individual ports are locked to individual MAC addresses, and make sure that any non-allocated MAC addresses popping up on your network immediately trigger an alert.

    106. Re:Outward facing systems ... by thePowerOfGrayskull · · Score: 1

      And perhaps set your SSH port to a non-standard port, where possible? Brute-force attackers seem to ignore high (> 1023) ports.

      This has been the single most useful thing I've done on my public-facing servers. I've gone from hundreds of BF attacks a day down to 0 just by moving the SSH port from 22 to [some number in the upper range].

    107. Re:Outward facing systems ... by cbiltcliffe · · Score: 1

      You know why it's ignored? Because it would be very difficult to take an open-source client, which by design, must have the decryption code for the password, and the encrypted password stored on your computer, and NOT have an attacker able to get the password.

      The only easy way to do it is if you had to enter another password when starting up your subversion client, which kind of defeats the entire purpose of stored passwords.

      I suppose it could use your login password, but that would mean either a token or the password itself would have to stay in memory for your entire login session, which brings up other security problems.

      You could do it with a file that stored the encryption key, but that would either have to be manually loaded, which would nuke the point of stored passwords, or somehow configured to automatically load, which would nuke the security benefit again.

      Unless you had an extension to the login mechanism which decrypted your home directory on the fly. Such things do exist, but they're not in any linux distro that I know of by default, so we're stuck with the situation that we have now.

      Now, getting around the "NFS available to anyone with a live CD" problem is easy, but it requires a network admin that knows what the heck they're doing. IPsec would take care of this completely, if it were set up properly.
      But if you're using something like NFS to share home folders on the network, then you should certainly be taking precautions regarding security of what's flowing over the network.

      --
      "City hall" in German is "Rathaus" Kinda explains a few things......
    108. Re:Outward facing systems ... by DavidTC · · Score: 1

      EPIC FAIL

      Try reading my post again. I said attackers portscanning the system wouldn't work against port-knocking security, but would work against moving ssh to another port.

      But people actually portscanning you to find what port you're running SSH on are very rare, and 99% of ssh attacks are automated port-22 attacks.

      So for slightly less security than port knocking, which requires special programs both on the client and server, you can instead simply move to another port and get most of the benefit and none of the hassle.

      And, as an added bonus, you know any ssh attacks that logwatch reports are actual people attempting to break in specifically to your server, and have probably attacked you other ways. As opposed to actual people being lost amidst the noise of automated attacks.

      --
      If corporations are people, aren't stockholders guilty of slavery?
    109. Re:Outward facing systems ... by cbiltcliffe · · Score: 1

      If I were to plug a vulnerable machine in, it's still a switched network, which means sniffing is impossible -- they'd have to actively MITM me, somehow without my server noticing. (DNS tricks are right out, as I refer to the server by IP.)

      Do you have static ARP tables set up in both machines?

      No?

      Then ARP poisoning will make mincemeat out of your "it's impossible to sniff a switched network" security before you have the time to say "Oh, shit."

      --
      "City hall" in German is "Rathaus" Kinda explains a few things......
    110. Re:Outward facing systems ... by molecular · · Score: 1

      True, and that's what Sourceforge does. But there's no useful publicly available tool that I know of for managing those public keys. Do you have one?

      My repositories are only used by a small number of users that have shell-accounts anyway and maintain their ~/ssh/authorized_keys themselves.

      Git, at least, has 'gitosis' for that task, and it allows you to record your changes locally and only push them to the central repository when you're satisfied with your progress.

      This (able to record local changes) seems to be an unrelated to using ssh or not?

      I've been wanting to check out git myself because of this, but haven't gotten around to it. I usually make a branch whenever I start more massive changes to work around this problem.

    111. Re:Outward facing systems ... by xous · · Score: 1

      While tar will work with smaller transfers it's simply not practical to transfer 100GB+.

      AFAIK you can't get rsync to su - before starting the transfer.

      You still haven't presented a convincing argument against allowing direct root login when the password is sufficiently strong or changing SSH to a arbitrary port.

      I've always found this to be a silly superstition probably dating back from the days of telnet or rsh.

      cPanel's DNS only feature requires direct root login (although using keys).

    112. Re:Outward facing systems ... by gt6062b · · Score: 1

      A password written on a piece of paper is not a good password. It may be a complex password, but it is never a good one.

      The GP's point is very valid, you cannot force a user to create a good password.

    113. Re:Outward facing systems ... by Antique+Geekmeister · · Score: 1

      The local changes are a peripherally related issue to ssh based access. You see, Subversion requires you to authenticate and communicate with the central repository for every single commit of any changes. With git, you can record your changes locally and only push them or do a comparison (which is much saner under git, by the way), when you're ready to push the changes as a set. This is vastly, vastly more efficient than the constant communication with the central repository and the related authentication issues: you can occasionally use an SSH key, with a passphrase, and not even bother to pre-unlock or pre-store the passphrase opened key.

    114. Re:Outward facing systems ... by Abcd1234 · · Score: 1

      There are workarounds, such as using 'svn+ssh'

      Uh, that's not a workaround. That's the correct solution. Who the hell *doesn't* use svn+ssh for "secure" svn?

    115. Re:Outward facing systems ... by sofar · · Score: 1

      it's not a good idea. While it may alleviate symptoms right now just watch the bots catch up with this game and start scanning all ports on your system.

      what would you rather have? a bot that scans all ports or *just* port 22?

      trying to defeat this problem by 'obscurity' will not work. that has been proven many times before. Just secure your port 22 properly like everyone else, and the problem will go away over time.

    116. Re:Outward facing systems ... by Anonymous Coward · · Score: 2, Insightful

      You don't agree with making an easy, small change to how sshd runs because it's "trivial" for a determined attacker to circumvent, but list 3 equally trivially circumvented defenses? A "determined attacker" will cut through all three of those, but as you point out a vast majority of the attacks are done by automated scripts run by kiddies.

      Why not just agree with changing the ssh port and make it bullet point #4?

    117. Re:Outward facing systems ... by spinkham · · Score: 2, Insightful

      Right, what doesn't stop a targeted attack can still be quite useful against random opportunists/bots, which make up the lions share of attacks.

      There's at least 3 levels of security: defense against worms and opportunists, defence against target attacks from script kiddies, and defense against targeted attacks from skilled attackers. Against a skilled attacker, you will lose if they want to dedicate enough time to attacking you.

      However, 99.99% of attacks are of the opportunists and script kiddie level.

      --
      Blessed are the pessimists, for they have made backups.
    118. Re:Outward facing systems ... by Anonymous Coward · · Score: 0

      On my not very public server, I get around one login attempt to user 'admin' per second. No other user names, always only 'admin'.
      Very annoying, since it unnecessarily bloated up the log files. I ended up moving my ssh port and that madness stopped. Sure,
      that's nothing that 'grep' couldn't cure, but it's a simple step so why not take it?

    119. Re:Outward facing systems ... by Antique+Geekmeister · · Score: 1

      I'm sad to say, every single one of the corporate partners I've dealt with in the last 2 years used HTTPS or even HTTP. _None_ used svn+ssh when I first met them: most of them began to _allow_ svn+ssh, but all refused to switch over.

      svn+ssh is, in fact, a workaround, and pretty much a joke of one. Please take a look at the difference between ssh-wrapping a badly implemented joke of an unsecured and poorly configurable protocol, such as svnserve, and the much cleaner approaches of Perforce, Bitkeeper, or even git for access management.

    120. Re:Outward facing systems ... by palegray.net · · Score: 1

      Botnets are fairly smart these days, and they're getting smarter. It's not at all uncommon for a portion of the machines participating in a botnet to do nothing more than port scan large networks, looking for listening SSH daemons. This information is forwarded back to other machines, which attempt to compromise the hosts.

      Most of the time, I just dispense with the issue altogether by only allowing SSH from known IPs. In cases where this isn't possible, mandatory key use can be enforced.

    121. Re:Outward facing systems ... by AVee · · Score: 1

      On trusted networks, yes, perfectly acceptable. Any security measure is a balance cost and benefit, for a trusted network the benefit of encrypting passwords is none at all. All it does is adding to a sense of security, not to real security.

      Even on the big bad internet the chances of you password being hijacked by a keylogger or because you typed it into a 'Check these pics!!' page are way bigger then it being picked up by a network sniffer.
      I fetch my mail from my ISP using POP and a plain text password. I trust my ISP to make sure their routers aren't hacked and aren't running all sorts of sniffers. If I wouldn't trust them that much I should not be receiving any email through their servers anyway.

      And I'm not ignorant, I noticed those bruteforce attacks TFA is talking about in my logs before I read about it. Did you?

    122. Re:Outward facing systems ... by Korin43 · · Score: 1

      My suggestion is to set your port to something that isn't 22, but still a low number port (less than 1024 I think). It's still a decent amount of obscurity, and doesn't add another security risk. My thinking is that obscurity is a part of good security, but you shouldn't compromise real security for it.

    123. Re:Outward facing systems ... by PhunkySchtuff · · Score: 1

      What I'm advocating is doing both. Moving ssh to not port 22 on it's own is not security.

      Securing ssh appropriately, by doing things like only allowing passwordless logins and disabling access by root AND moving it to not port 22 is a good thing to do. This will ensure you have a secure sshd and it will stop your logs getting filled up with noise from the drive-by password guessers.

      The problem will not go away over time, just like spam hasn't gone away over time.

      Portscanning a host to find sshd running on another port is very obvious, so is easily blocked before any logins even start to happen and it takes a LOT longer than just hitting port 22 and trying to connect to whatever is listening there.

    124. Re:Outward facing systems ... by micheas · · Score: 1

      Setting ssh to a port higher than 1023 is a bad idea. There are examples with code floating about of how to undermine a crashed ssh that is running on a high port.

      If you need to run ssh on a high port you should bind it to 127.0.0.1 on a low port
      Normally it is easier to find an unused port

      FreeBSD security has a thread on it on this topic going right now. The general consensus of the list seems to be that if you move off of port 22 to remove log spam, you need to start coming up with a log monitoring solution that works for your servers.

    125. Re:Outward facing systems ... by Rantastic · · Score: 1

      On trusted networks, yes, perfectly acceptable. Any security measure is a balance cost and benefit, for a trusted network the benefit of encrypting passwords is none at all. All it does is adding to a sense of security, not to real security.

      Right. Except that there is no such thing as a trusted network. The old idea that we don't have to worry about security once you are inside the moat is just that: old. It has also been proven wrong time and again.

      Even on the big bad internet the chances of you password being hijacked by a keylogger or because you typed it into a 'Check these pics!!' page are way bigger then it being picked up by a network sniffer.

      Internet keylogger? I'm not sure what that is, but the chances of either of those happening is nil when I never use clear text authentication for anything.

      I fetch my mail from my ISP using POP and a plain text password. I trust my ISP to make sure their routers aren't hacked and aren't running all sorts of sniffers. If I wouldn't trust them that much I should not be receiving any email through their servers anyway.

      I'm glad you trust every single person who works for your ISP to be nice, competent, and to never make mistakes. Can I assume that this trust also extends to all the folks running servers in your ISP's facility (or the datacenter where they rent space)?

      And I'm not ignorant, I noticed those bruteforce attacks TFA is talking about in my logs before I read about it. Did you?

      I'm not sure how noticing something in your logs has anything to do with your clear ignorance of security best practices, but whatever.

      In all seriousness, thanks. It is this kind of foolish thinking (yes, please keep using clear text authentication), that keeps us real security professionals in business.

      --
      Ask Slashdot: Where bad ideas meet poor googling skills.
    126. Re:Outward facing systems ... by soundguy · · Score: 1

      If I were to plug a vulnerable machine in, it's still a switched network, which means sniffing is impossible -- they'd have to actively MITM me, somehow without my server noticing. (DNS tricks are right out, as I refer to the server by IP.)

      Might want to Google "port replication".

      Also, avoid using the weasel-words "unlimited" or "impossible".

      --
      Nothing worthwhile ever happens before noon
    127. Re:Outward facing systems ... by sjames · · Score: 1

      I don't agree with setting the SSH port to non-standard, it is trivial for any determined attacker to figure out which one you've changed it to. Use one of the port/log monitoring daemons that are mentioned further down the page.

      That's debatable. An attacker determined to get at your particular server will find the non-standard ssh port as you say. However, the attacker scanning around for any server with a password guessing attack will just pass it right by. From that POV it's not bad as an additional measure.

    128. Re:Outward facing systems ... by SanityInAnarchy · · Score: 1

      In this case, not well -- but neither do any of the other things suggested.

      However, there are things that work well against wrenches. Here's a quick list:

      • Dead-man's switch -- if I'm not in contact for a certain amount of time, cut my access and force me to physically go there to gain access.
      • Panic password -- input the wrong one and my access is nuked.
      • Full-disk encryption, combined with panic password and/or too many tries. Input the right password and you get in. Input the wrong one and it nukes the key and/or ignites thermite.
      • Combine above with a TPM system to hold the key, so they can't simply create a disk image, and a tamper-sensitive case, to activate thermite if they try.
      • Run full-disk encryption inside the free space in another filesystem. You can do this recursively, so even if the wrench works, they can never be sure thatit worked -- there could always be another encrypted drive hidden in the last encrypted drive.
      --
      Don't thank God, thank a doctor!
    129. Re:Outward facing systems ... by SanityInAnarchy · · Score: 1

      there is no such thing as a trusted network.

      I'd say the switch on my desk with exactly two boxes plugged into it is "trusted".

      It is this kind of foolish thinking (yes, please keep using clear text authentication), that keeps us real security professionals in business.

      When it's truly foolish -- for example, on a larger (corporate) network or over the Internet -- I second that sentiment, if only in that it makes you a softer target than me.

      --
      Don't thank God, thank a doctor!
    130. Re:Outward facing systems ... by rleesBSD · · Score: 1

      I like the idea of not using a continuously running SSHD at all, but instead put a trigger mechanism on an obscure port (or just reboot) to turn it on.

    131. Re:Outward facing systems ... by lamapper · · Score: 1

      trying to defeat this problem by 'obscurity' will not work. that has been proven many times before. Just secure your port 22 properly like everyone else, and the problem will go away over time.

      Amen brother. Security by obscurity is way too widely used. Most of the attack vectors require an account ID and password, if they get that, you game is almost over. If they get a root user or root capability, it is game over.

      They are scanning ports now, Linux popularity is growing, duh moment here. Either you can secure it or your can't, if you can't learn fast and figure it out, nothing short of that will keep you secure.

      --
      Is your Internet Throttled? Install DD-Wrt, OpenWRT or Tomato to learn the truth! Google: 1Gbps/1Gbps: 5 Communities
  2. learn to.... by gandhi_2 · · Score: 4, Informative

    sudo apt-get install fail2ban

    1. Re:learn to.... by kabloom · · Score: 1

      Doesn't help with slow distributed brute force attacks. The different attempts come from different bots in the same botnet.

    2. Re:learn to.... by wizardforce · · Score: 0

      FTA:

      with a guessable password and a system administration regime that lets weak passwords exist in the first place.

      Fail2ban would theoretically cut down on the attempts by 90% from 32 to 3 or whatever you set it at however, the real problem are the weak passwords used. Automatic salting of passwords and fail2ban should eliminate the threat entirely as these attacks are extremely unlikely to crack salted passwords in the number of attempts they would be allowed.

      --
      Sigs are too short to say anything truly profound so read the above post instead.
    3. Re:learn to.... by icydog · · Score: 4, Insightful

      How is salting relevant to over-the-network, slow brute force attacks that don't involve seeing the hashes?

    4. Re:learn to.... by Anonymous Coward · · Score: 0

      DOES NOT WORK.

      RTFA. fail2ban doesn't solve this problem. Stop pandering your dated solutions.

    5. Re:learn to.... by Brian+Gordon · · Score: 2, Insightful

      Salting wouldn't help at all in this situation.. First of all it's only useful when the attacker already has the hash he needs to crack. Salting ensures that the attacker has to crack every password instead of getting free duplicates. It doesn't "add security" beyond that, since the salt must be stored in plain text.

    6. Re:learn to.... by Nested · · Score: 5, Funny

      Obviously it's only relevant by outing parent as a random Windows admin.

    7. Re:learn to.... by Trogre · · Score: 1

      fail2ban is great, but this attack looks designed to sneak around it. Since this is a distributed attack, the offending script has hundreds of IP addresses at its disposal, and has each IP attack each server a small number of times (usually twice, often once, rarely thrice).

      Fail2ban is designed to scan for repeated attacks from a single IP.

      I second the PermitRootLogin no >> /etc/ssh/sshd_config advice from the above posts.

      --
      "Nine times out of ten, starting a fire is not the best way to solve the problem." - my wife
    8. Re:learn to.... by jim_v2000 · · Score: 1

      That's probably the best way to defeat this. MAYBE they'd guess your password, but there's no way in hell they'd guess your username and password.

      --
      Don't take life so seriously. No one makes it out alive.
    9. Re:learn to.... by Anonymous Coward · · Score: 0

      I thought that fail2ban wasn't effective against slow bruteforce attacks? Surely the very fact they are slow attacks render fail2ban's methods rather superfluous?

    10. Re:learn to.... by Anonymous Coward · · Score: 0

      salting wut?

      Fail2ban scans log files like /var/log/pwdfail or /var/log/apache/error_log and bans IP that makes too many password failures. It updates firewall rules to reject the IP address. --http://www.fail2ban.org/wiki/index.php/Main_Page

  3. It's 2009 and will be 2010 soon by gzipped_tar · · Score: 1

    And boxes are still being hacked by *bruteforce* attacks?

    I thought SSH Public key auth. is so 20th century.

    --
    Colorless green Cthulhu waits dreaming furiously.
    1. Re:It's 2009 and will be 2010 soon by gweihir · · Score: 1

      These are password-guessing attacks. No connection to public-key authentication.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    2. Re:It's 2009 and will be 2010 soon by gzipped_tar · · Score: 1

      I mean, why are password based auth used in the first place?

      --
      Colorless green Cthulhu waits dreaming furiously.
    3. Re:It's 2009 and will be 2010 soon by HeronBlademaster · · Score: 4, Informative

      Because some of us want to be able to log in from anywhere without having to carry a flash drive around containing our ssh keys.

      And some of us have customers who have a hard enough time grasping the concept of "strong passwords", let alone key-based authentication... And heaven forbid a client's computer crashes and you have to help them set it up again over the phone...

    4. Re:It's 2009 and will be 2010 soon by gweihir · · Score: 1

      I mean, why are password based auth used in the first place?

      Ah, sorry. I use it as backup in case something goes wrong with ssh. I have had problems logging in after updates before. However I have long, random passwords and they are either in a gpg container or on paper in a folder. No real risk that way.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    5. Re:It's 2009 and will be 2010 soon by Just+Some+Guy · · Score: 1

      Because some of us want to be able to log in from anywhere without having to carry a flash drive around containing our ssh keys.

      You're posting about SSH on Slashdot. You are a geek. Take it all the rest of the way and configure one-time passwords for your SSH server. I have a little wallet-sized printout of the next 25 valid passwords to my home and work servers. Whenever I use one, I cross it out.

      --
      Dewey, what part of this looks like authorities should be involved?
    6. Re:It's 2009 and will be 2010 soon by HeronBlademaster · · Score: 1

      And have my clients call me every time they misplace their password list? I don't think so.

      It's a tradeoff between cost and benefit. Changing to OTPs from "strong passwords" offers very little from a benefit standpoint (realistically, it's only slightly more secure), and incurs a comparatively large setup cost (including the time to learn how to set it up, get it tested properly, explain it to everyone else who uses the system, etc). From that perspective, I have nothing to gain by changing to OTPs.

    7. Re:It's 2009 and will be 2010 soon by Just+Some+Guy · · Score: 2, Insightful

      I said, for you to access a server without carrying around a USB drive. There's no way I'd have customers try it.

      The huge bonus is that a lot of apps can use the same OTP system. Imagine getting to check your webmail from a dodgy Internet cafe and knowing that the login will only work that one time.

      --
      Dewey, what part of this looks like authorities should be involved?
    8. Re:It's 2009 and will be 2010 soon by euxneks · · Score: 1

      And some of us have customers who have a hard enough time grasping the concept of "strong passwords", let alone key-based authentication... And heaven forbid a client's computer crashes and you have to help them set it up again over the phone...

      Should these same people have SSH access to your system then? It's like letting someone into your house who then proceeds to leave the door unlocked and opens the windows with a big neon sign that says "FREE SHIT"

      --
      in girum imus nocte et consumimur igni
    9. Re:It's 2009 and will be 2010 soon by HeronBlademaster · · Score: 1

      I said, for you to access a server without carrying around a USB drive. There's no way I'd have customers try it.

      It's easier to have one system for everyone than to special-case a one-time-password system for my username.

      Imagine getting to check your webmail from a dodgy Internet cafe and knowing that the login will only work that one time.

      I guess you've never heard of SSL-protected POP3/IMAP? Or even HTTPS for webmail?

    10. Re:It's 2009 and will be 2010 soon by HeronBlademaster · · Score: 1

      Not really. I don't want to run an FTP server, so I have them use FTP over SSH, and I've set up their accounts so they can only meddle with their own stuff. Their websites are in $HOME, in the $USER group, not world-readable. None of them have sudo permissions. No user is in any other user's group.

      So it's like renting them a private shed in my backyard. Sure, it's on my property, and if they want to give away their own stuff, they can, but they can't do anything to (the inside of) my house.

    11. Re:It's 2009 and will be 2010 soon by Just+Some+Guy · · Score: 2, Insightful

      It's easier to have one system for everyone than to special-case a one-time-password system for my username.

      Depending on your OS, it can be pretty easy.

      I guess you've never heard of SSL-protected POP3/IMAP? Or even HTTPS for webmail?

      I guess you've never heard of keyloggers? With OTP, you could literally stand next to me and write down my username and password as I enter it, but that would get you nothing.

      It's not my goal to convert you to OTP. I just wanted to point out that there are good compromises between password authentication and secure keys.

      --
      Dewey, what part of this looks like authorities should be involved?
    12. Re:It's 2009 and will be 2010 soon by Tribbin · · Score: 1

      One key per person ought to be enough for anyone.

      --
      If you mod this up, your slashdot background will turn into a beautiful sunset!
  4. Ask Slashdot by Brian+Gordon · · Score: 4, Interesting

    What is the Slashdot crowd using these days for log monitoring?

    My /var/log/auth.log might be filled with WARNING BRIAN YOUR DOG HAS BEEN COMPROMISED BY ENEMY AGENTS for all I know.

    1. Re:Ask Slashdot by i.of.the.storm · · Score: 1

      This is a good question, I'd like to know as well. I check every now and then and see a bunch of random login attempts that look like brute force (eg. root login attempts when we have root login disabled) but I don't really know whether I should be worried.

      --
      All your base are belong to Wii.
    2. Re:Ask Slashdot by Chris+Daniel · · Score: 2, Interesting

      tenshi is cool.

      --
      Don't blame me -- I voted for Roslin.
    3. Re:Ask Slashdot by robbak · · Score: 4, Informative

      My server just mails me its daily security run, and most days there is a couple of brute force attempts. I am yet to see it even target a valid account name, let alone getting around to guessing my totally random mixed case alpha-numeric password.
      Oh, and i have sshguard blocking them at the firewall, just to keep log-file pollution down.

      --
      Prediction for end of Universe #42: Fencepost error in Quantum_bogosort.cpp
    4. Re:Ask Slashdot by armanox · · Score: 3, Interesting

      I see a lot of seemingly valid logins (could be valid, but not on my system...)

      Running awk 'gsub(".*sshd.*Failed password for (invalid user )?", "") {print $1}' /var/log/secure* | sort | uniq -c | sort -rn | head -10'> yields

      279 root
      20 test
      19 admin
      9 john
      9 guest
      8 PlcmSpIp
      7 oracle
      7 info
      6 webmaster
      6 mysql


      so, we have 6 that often are valid, a very common name, two that almost could be valid (info and webmaster), and one nonsense. Only one account on that system has ssh allowed, and it's certainly not root.

      --
      I'm starting to think GNU is the problem with "GNU/Linux" these days.
    5. Re:Ask Slashdot by armanox · · Score: 2, Informative

      btw, numbers used to be higher, but I just archived the old secure logs, and have seen a massive drop in attacks since I started using denyhosts. Root used to see ~10k attacks in a week.

      --
      I'm starting to think GNU is the problem with "GNU/Linux" these days.
    6. Re:Ask Slashdot by cetialphav · · Score: 5, Interesting

      My server just mails me its daily security run, and most days there is a couple of brute force attempts.

      Of course if the server were compromised, would you expect it to mail you a log that showed that it was compromised? If someone gets in with root access (and they know what they are doing), they could just modify the logs to not show what just happened. As long as you keep getting the same type of security summary, you will be happy.

      It reminds me of a time I was in an airport going through the TSA security line to go into the terminal. The agent checked my ID and boarding pass and then got distracted by a bunch of flight attendants she had to let through. She then turned back around and asked me if she had checked my ID. I gave her a hard time because in this system I am assumed to be untrustworthy until she says otherwise so she shouldn't trust anything I tell her.

      The point is that if something is a potential attack vector, then you must assume that any information it gives you might be a lie.

    7. Re:Ask Slashdot by HeronBlademaster · · Score: 1

      I used to see exactly that sort of thing all day every day until I put SSH on a port above 1024. It's not hard to see ssh on its alternate port with a quick nmap scan, but botnets apparently don't bother scanning... I would guess they're after the easiest meat. Now, I don't see any failed login attempts that aren't my own typos.

    8. Re:Ask Slashdot by Anonymous Coward · · Score: 0

      root-tail

    9. Re:Ask Slashdot by etnoy · · Score: 1

      What is the Slashdot crowd using these days for log monitoring?

      OSSEC.

      --
      Quantum hacker.
    10. Re:Ask Slashdot by LordSnooty · · Score: 1

      Logwatch Logwatch Logwatch

    11. Re:Ask Slashdot by Slashcrap · · Score: 3, Funny

      She then turned back around and asked me if she had checked my ID. I gave her a hard time because in this system I am assumed to be untrustworthy until she says otherwise so she shouldn't trust anything I tell her.

      Oh, how I laughed as her collegues repeatedly probed my anal cavity with their rough, unlubricated hands.

    12. Re:Ask Slashdot by Anonymous Coward · · Score: 0

      OSSEC seems to work alright. It's not perfect but does a decent job.

    13. Re:Ask Slashdot by Linker3000 · · Score: 3, Funny

      "She then turned back around and asked me if she had checked my ID. I gave her a hard time because in this system I am assumed to be untrustworthy until she says otherwise so she shouldn't trust anything..."

      So how did the 'totally picked you at random' body cavity search go then?

      --
      AT&ROFLMAO
    14. Re:Ask Slashdot by Anonymous Coward · · Score: 1, Informative

      I've actually been rooted, and I actually got notice of it via a tripwire email. If the attacker is sloppy it works.

    15. Re:Ask Slashdot by jhfry · · Score: 3, Interesting

      Seen a setup once that had all servers sending logging (via syslog) to a syslog server. This server was behind it's own firewall had nothing exposed other than syslog and it had the ability to send pages via an analog modem as well as email. About as secure a system I have seen.

      Its actual purpose was more for monitoring the admins than for detecting intrusions, but it did both. The physical box was locked in a cabinet in the network manager's office.

      The most an intruder could do, unless they know a hack for syslog, would be to disable syslog on the compromised machine so that their activities would not be logged. Of course a rooted machine would be wiped anyway so the logs are only valuable for forensic purposes anyway.

      --
      Sometimes the best solution is to stop wasting time looking for an easy solution.
    16. Re:Ask Slashdot by neurovish · · Score: 1

      I'll second the vote for tenshi. Dead simple to use and very customizable and effective. Logwatch is also pretty good from an "install it and forget it" angle.

    17. Re:Ask Slashdot by Christian+Smith · · Score: 1

      My server just mails me its daily security run, and most days there is a couple of brute force attempts.

      It reminds me of a time I was in an airport going through the TSA security line to go into the terminal. The agent checked my ID and boarding pass and then got distracted by a bunch of flight attendants she had to let through. She then turned back around and asked me if she had checked my ID. I gave her a hard time because in this system I am assumed to be untrustworthy until she says otherwise so she shouldn't trust anything I tell her.

      I had a similar issue when I left my camera on a plane. Having departed the plane, I told security on the gate what had happened, and the muppet just sent me straight back on to the plain with no security checks whatsoever!

    18. Re:Ask Slashdot by thePowerOfGrayskull · · Score: 1

      My /var/log/auth.log might be filled with WARNING BRIAN YOUR DOG HAS BEEN COMPROMISED BY ENEMY AGENTS for all I know.

      It is. Also, I've changed your password for you. You can thank me later.

    19. Re:Ask Slashdot by rantingkitten · · Score: 1

      Just so's ya know, PlcmSpIp is not nonsense. It's shorthand for "Polycom Soundpoint IP", a very common IP phone, and that is the default login (and password) those phones use. Primarily they use that to connect via ftp or http to a fileserver to grab xml configs, but a shocking number of PBX admins don't bother turning off that user's ssh access, modifying /etc/passwd, changing the default logins, securing the directory, or using any other common sense. They just add the user, put the files in its homedir, and wander off.

      I have personally had to demonstrate to people how easy it was for me to log into their server knowing nothing but that one piece of information, and get a full list of all the phones they had on that system and their SIP credentials (stored as plaintext xml for the phones to read).

      When attackers are trying that username, now you know why!

      --
      mirrorshades radio -- darkwave, industrial, futurepop, ebm.
    20. Re:Ask Slashdot by Anonymous Coward · · Score: 0

      Try this:

      Buy a cheap hub (not switch).

      Have host A log to Host B

      On the hub you have a machine with a NIC sniffing all traffic and logging the information. Since this machine could work without having an IP (since it is just sniffing packets) there is really no way for the attacker to know it exists.

      This of course wont stop a break-in but it would stop someone from deleting logs :)

      If you cant find a hub, get a switch with port-mirroring to do the same job (though more expensive).

      Just a little trick one can use :-p

    21. Re:Ask Slashdot by SgtSnorkel · · Score: 1

      That 'nonsense' entry is a common account name used in Polycom phone systems.

    22. Re:Ask Slashdot by Nivag064 · · Score: 1

      The single quote after -10 is spurious. I tested it, and I got 2 failures on my userid - most likely mistyping on my part!

    23. Re:Ask Slashdot by armanox · · Score: 1

      It does appear that the '> at the end is an error

      --
      I'm starting to think GNU is the problem with "GNU/Linux" these days.
  5. Simple solution! by PsiPsiStar · · Score: 1

    this time 770 apparently already compromised Linux hosts are involved

    <sarcasm> chmod 750 ? </sarcasm>

    --

    ___
    It's the end of my comment as I know it and I feel fine.
    1. Re:Simple solution! by MichaelSmith · · Score: 1, Funny

      chmod 0 `find /`

    2. Re:Simple solution! by oojah · · Score: 1

      That'd break.

      find / -exec chmod 0 {} \;

      (or use xargs)

      --
      Do you have any better hostages?
    3. Re:Simple solution! by neurovish · · Score: 1

      chmod 0 `find /`

      This is why you don't let people use root. At least with sudo you'll know who the asshat is.

  6. Paging Charles Darwin by Gothmolly · · Score: 1

    Only the strong survive.

    --
    I want to delete my account but Slashdot doesn't allow it.
    1. Re:Paging Charles Darwin by ScrewMaster · · Score: 1

      Only the strong survive.

      Actually, it's only the best adapted that survive. That said, if you're strong enough you won't get rooted by that big guy named Bubba in the bottom bunk.

      --
      The higher the technology, the sharper that two-edged sword.
    2. Re:Paging Charles Darwin by Anonymous Coward · · Score: 0

      Actually, it's only the _best adapted that pass on their "seed" a statistically greater percentage of the time, leading to incremental changes_.
      (I approve, though. I strongly dislike the "only the strong survive" social Darwinism crap. So 1890s.)

  7. Re:learn to....denyhosts by nairb774 · · Score: 5, Informative

    Ah, but things like denyhosts [1] with distributed reporting can and does catch these attacks. [1] http://denyhosts.sourceforge.net/

  8. The Headline by MagusSlurpy · · Score: 2, Insightful

    Couldn't we remove "Linux" from the headline and have it be just as accurate?

    --
    My sister opened a computer store in Hawaii. She sells C shells by the seashore.
    1. Re:The Headline by mx_mx_mx · · Score: 1

      No, because linux admins aren't usually that sloppy, compared to windows admins....

      --
      Linux forever
    2. Re:The Headline by Anonymous Coward · · Score: 0, Troll

      Couldn't we remove "Linux" from the headline and have it be just as accurate?

      Ahh, yes let's remove the fact that this is Loonix boxes being brute force attacked because it would hurt the "ZOMG TEH LOONIX CAN NOT BE H4X0R3D THATS ONLY DUH WINDOZE BOXES!!".

    3. Re:The Headline by Exception+Duck · · Score: 1

      Sloppy Windows admins who use linux slow brute force attacks

    4. Re:The Headline by shentino · · Score: 1

      Windows admins being sloppy doesn't make the news.

      Also, the fud machine favors attention granted to linux's foibles.

    5. Re:The Headline by Anonymous Coward · · Score: 0

      Oh yes it does. You do read Slashdot, correct?

    6. Re:The Headline by shentino · · Score: 1

      Yes.

      However, slashdot often gets its news from other sources.

    7. Re:The Headline by Xest · · Score: 3, Interesting

      To add to that it begs the question, shouldn't any operating system/application be secure by default?

      If that were the case then sloppy admins wouldn't be a problem, only incompetent admins that specifically go and disable said security features.

      The problem is that sloppy admins will always exist, so to blame them doesn't really achieve much, nor does it absolve the operating system/application in question of blame. If a problem is known (i.e. some admins are sloppy), and nothing is done to resolve that, then the OS/App deserves just as much blame.

      Again as you say, this is a problem for all operating systems and all software.

    8. Re:The Headline by Anonymous Coward · · Score: 0

      Ahaha, look at this offended babby.

    9. Re:The Headline by LordSnooty · · Score: 1

      This isn't about disabling security features, though. It's about using weak passwords. No exploits here, no vulnerabilities, just simple guesswork. I can't think of an OS which ships in an insecure state. Not even Windows - anything dangerous is firewalled off.

    10. Re:The Headline by Xest · · Score: 1

      So isn't strong password enforcement by default the key?

      This is what Windows has done since Windows Server 2003. There is a default complexity and length requirement on passwords. You can of course change or even disable the policy but you have to go out your way to do so which in my mind is how it really should be.

    11. Re:The Headline by Rantastic · · Score: 1

      To add to that it begs the question, shouldn't any operating system/application be secure by default?

      That is really the heart of the matter. "Security" is not some end state that can be reached, so it can not be there by default. Computer security is an ongoing process involving practices, procedures, and policies. It requires ongoing maintenance. Organizations that understand this have information security teams working full time. The rest have undetected compromised hosts that people are ignoring because last year they installed something to make it "secure."

      --
      Ask Slashdot: Where bad ideas meet poor googling skills.
  9. overly paranoid by SuperBanana · · Score: 4, Insightful

    That system you have with SSH facing outwards - right now: PermitRootLogin no, PubkeyAuthentication yes, PasswordAuthentication no, Allowusers one-guy-only

    I'm sorry, but unless you have a laughably bad root password, this advice is unnecessary.

    Even at 1 connections a second, in an entire year, an attacker could only guess 525,960 combinations. 10 connections a second?(REALLY fast...) 5.2M/year.

    171,000 words in the English language, roughly. Pick two numbers, and now you're at 17 million combinations, and that's only assuming you put the numbers in one spot. Assuming they manage 10 connections a second, know the scheme you're using and hit it half-way (a HELL of a lot of assumptions in their favor) you're still looking at 1.6 years.

    Two english words and a number? 292 BILLION combinations.

    1. Re:overly paranoid by c0d3g33k · · Score: 0, Flamebait

      You're laughably stupid. Set PasswordAuthentication to no and your statistics become meaningless because they don't apply at all. Not even a lucky guess can result in a breach, because you have removed that avenue of attack entirely. If you want to play the statistics game, PubkeyAuthentication with strong encryption plus regular key changes plus some sort of port knocking scheme gives numbers that are much better than yours. I'll take "when hell freezes over" in place of "once in a blue moon" any day of the week. Give me scheme with even better odds and I'll take it. The highway of history is littered with fools who thought "they'll never figure this out. Wait. What? Oh shi....". SuperBanana indeed. You'll end up on the wrong end of someone's super banana before you know what hit you.

    2. Re:overly paranoid by MyDixieWrecked · · Score: 1

      I'll take "when hell freezes over" in place of "once in a blue moon" any day of the week.

      I agree completely, although I have seen systems breached because of mismanaged keypairs, misconfigured applications, and mismanaged permissions. Even without password logins, an insecure PHP script could potentially obliterate that layer of security.

      I've gotten into the habit of chmod'ing my keypairs to 600 (and chmod'ing the .ssh directory they live in as 700) ever since a php script was exploited to fetch the keys on a friend's server. I know Redhat/CentOS is smart enough to not allow that, but it's still a real threat especially on shared boxes. You've also got to be careful about the authorized_keys2 file.

      I'm a huge fan of SELinux although I find that it requires the sysadmin to be SERIOUSLY on his toes when configuring everything. You really need to know what you're doing or things will randomly break and you'll be left scratching your head.

      --



      ...spike
      Ewwwwww, coconut...
    3. Re:overly paranoid by marcansoft · · Score: 1

      What ever happened to random / gibberish passwords? pwgen is a pretty good tool for this. We all know pubkey authentication is a lot better, but sometimes I'd rather log on from some other box without having to carry around my private key. Pubkey authentication works when you have to manage many boxes from one or two specific boxes.

      Password authentication is as secure as, well, your password. Good passwords are pretty damn secure. 'aiBea1su' is pretty hard to guess. 'sexy99', not so much.

    4. Re:overly paranoid by digitalchinky · · Score: 4, Insightful

      The parent is far from stupid as you put it - quite the opposite actually. You stick daemonshield or one of a hundred similar log monitors on your server and the job is done, you can even tweak them to watch for slow brute force attacks. What is actually laughable is the admin going to such extreme measures to secure some backwater server that requires umpteen minutes of dicking around whenever you move to a new remote machine just to log in. And then ignoring it because you think it is so damn impregnable.

      This fool littered highway, where is it exactly? I've been doing this crap near on 20 years now and I've never had root lost.

    5. Re:overly paranoid by mysidia · · Score: 1

      When you say auth only... it's not "when hell freezes over" it's once in a blue moon.

      All they gotta do is get a reliable crack for RSA/DSA, probably by building a quantum computer and successfully implementing Shor's algorithm on a large scale :)

    6. Re:overly paranoid by sumdumass · · Score: 3, Insightful

      The problem with 292 billion combinations or even just 17 million combinations is that your password will not be at the last point in the combination. IF the password ends up in the first quarter, then you only have 73 billion or 4.25 million before it's discovered. Now lets assume it's in the second half or third quarter of combination because you made a strong password. All I have to do is start trying mid way or in the last quarter of the possible sequences and I don't even need to go through a quarter of the possibilities to get it.

      The point I'm trying to make is that your misleading yourself by looking at the possible combinations to a password because your password will lay somewhere within those possibilities. IF we apply some human characteristics to the issue, we can probably narrow the amount of passwords to try down some more before we get a hit. Humans Characteristics tend to be patterns like common strokes on a keyboard with reach or on hand, sometimes all in a row or diagonally, numbers tend to be consecutive and so on. Running a dictionary attack modified by those variables could potentially gain access without going through 10 percent of the possible combination you mention.

      Now notice I said can. There is no guarantee that it will be successful. But there is a guarantee that you will not need to comb through all 292 billion possible combinations to get access so dwelling on that number is misleading.

    7. Re:overly paranoid by Time_Ngler · · Score: 1

      Isn't the idea to hit a ton of servers, hoping to get into one? First, I don't get the 525,960 attacks per year at one a second: 60 * 60 * 24 * 365 = 31,536,000

      Anyway, from the black hat perspective, let's say a half a server a month cracked would be enough for it to be worthwhile. Then at one month, at one hit a second per server, that would be 2,592,000 tries. So lets say that you had two English words and a number, 292,410,000,000 tries. Then to get a 50 % chance of cracking one of the servers in a month, they'd need to know the ip address of log(.5)/(log((292410000000-1)-log(292410000000)) / 2592000 = 78163.5 machines. So if they have a bot net, and can search for an open port 22 until they have 78163 machines, (and one additional one that's up an average of half the time), and start brute forcing away.

      So, yes, you'd be unlikely to be the one that got cracked in those 78163.5 machines, but it is possible, and it is fruitful to attack in this way, even if everyone had a pretty good password. And, the longer you have your server running, the greater the risk is.

    8. Re:overly paranoid by cetialphav · · Score: 1

      Now notice I said can. There is no guarantee that it will be successful. But there is a guarantee that you will not need to comb through all 292 billion possible combinations to get access so dwelling on that number is misleading.

      You are not understanding how the total number of possible passwords affects things. With a secure password, there is no bias so there is no ordering of the total possible passwords to improve your odds. Everyone knows that you will almost never have to guess all of the possible passwords. The odds of hitting the correct password on that final 292 billionth password is the same as hitting it on the first guess.

      The proper way to use the number is to look at how many guesses will get you at a 50% probability of getting the right password. Lets say that you figure someone could guess a million passwords before you change your password. To cause the attacker to have less than a 50% chance of success, you need to have at least 2 million possible passwords. For a 25% chance, you need 4 million. For a one in a million chance of success, you need 1 trillion possible passwords.

      So the key numbers are the number of possible attempts that a system will allow in the time frame that a given password will be valid and what is the ratio of the number of attempts to the total password space. The nice thing is that adding one additional character greatly increases the password space and causes an exponential growth in the amount of passwords an attacker must try to have a x% chance of success.

    9. Re:overly paranoid by Anonymous Coward · · Score: 0

      IF we apply some human characteristics to the issue

      This is irrelevant to a discussion of randomly selected passwords.

      Worrying about whether a password lies in the first quarter of possible combinations is wrongminded, because that line of reasoning devolves into a futile search for the "hardest to find" random number. (Hint: Once you identify a candidate number, it goes on a relatively short list of numbers that are super easy to find.)

      Yes, all passwords can be guessed eventually -- some sooner than others. If you allow your attacker to perform a brute force search, then you've already lost. That's why security experts suggest throttling and lockouts.

      My /etc/dictionaries-common/words has 98569 words, of which 64024 are made of lowercase letters only.

      password = words[rand() % 64024] . rand() % 10 . words[rand() % 64024]; # pseudocode

      Fwiw, that's 35.3 bits of entropy (or 38.6 bits if you use rand() % 100), which makes it only marginally weaker than a random 7-letter + 1 number password with 36.2 bits of entropy. They're both sufficiently secure when chosen by a reasonable PRNG, but the one using dictionary words is probably going to be easier to remember.

      Yeah sure "a0a" and "zygotes9zygotes" may be easy to guess, but those are extremely rare. Here are some true pseudorandom examples I just generated with a perl script: hollyhock6sorer, standard0clearance, muggings1spatulas, vacuumed3rums, and telephony1layers.

      Those are all super easy to remember and they'd all take over 2^30 attempts to brute force, no matter what method you choose. Add in a 2-second throttle and a lockout after N failures, and they're super secure unless the attacker intercepts the password somehow.

    10. Re:overly paranoid by Alpha830RulZ · · Score: 1

      Run this, and then the number of combinations becomes less important.

      Like all of us, I have the usual port surfers come by. They get five tries, and then their IP gets blacklisted.

      --
      I was taught to respect my elders. The trouble is, it's getting harder and harder to find some.
    11. Re:overly paranoid by Anonymous Coward · · Score: 0

      At 5.2m tries per year, and 292 billion is the maximum number of combinations, the maximum chance of success the attacker can have is 0.0017% chance per year by sheer brute force of guessing that password.

      He is looking at it properly, but using the calculations assuming you could divide without his help.

    12. Re:overly paranoid by RzUpAnmsCwrds · · Score: 2, Informative

      The trick to making strong passwords is to not use them at all.

      Random passwords don't work. People don't remember them, or they write them down, or they use the same one everywhere. Any of these options compromises the security of a 'bulletproof' random password.

      SSH private keys can't be guessed, they aren't compromised if you use them on more than one system (even untrusted systems), and you can revoke them if the machine they are on is compromised.

      Better yet, smart cards are even harder to clone, especially if you don't have physical access to the card.

    13. Re:overly paranoid by dbIII · · Score: 1

      It is good advice. At some time after you pass responsibility of the box to someone else some loser will change the root password to "coffee" or something even simpler (was a user account that had this but the idiot gave everyone shell access and really screwed up permissions in /etc to make it easier to edit system files - got rooted quickly after that). It also sets a good example if the user has to log in as themself then sudo or su.

    14. Re:overly paranoid by EvanED · · Score: 2, Interesting

      SSH private keys can't be guessed, they aren't compromised if you use them on more than one system (even untrusted systems), and you can revoke them if the machine they are on is compromised.

      If you're relying on your private key to be able to ssh into your system, what happens when you're somewhere without your private key?

      If you want to be able to log in anywhere, you have to start carrying your key on a USB stick or something -- at which point it's barely better than writing it down.

    15. Re:overly paranoid by Architect_sasyr · · Score: 1

      With a secure password, there is no bias

      Actually, though it doesn't reduce the set much, there is a bias: If you are a paranoid admin, I know not to bother trying dictionary words or other basic stuff. Sure there are still tonnes of combinations, but there are a few less.

      --
      Me failed English...
      FreeBSD over Linux. If my comments seem odd, this may explain...
    16. Re:overly paranoid by xaxa · · Score: 1

      @@@[junk filter]
      @ WARNING: UNPROTECTED PRIVATE KEY FILE! @
      @@@[junk filter]
      Permissions 0644 for '/home/xaxa/.ssh/id_rsa' are too open.
      It is recommended that your private key files are NOT accessible by others.
      This private key will be ignored.

      All my SSH keys have a passphrase, so it's less of an issue for me. A correctly configured ssh-agent means I only type the passphrase in once.

      (alias ssh='ssh-add -l > /dev/null || ssh-add; command ssh' is in my .zshrc. How the ssh-agent is loaded depends on which computer I'm using (KDE, Gnome, Cygwin))

    17. Re:overly paranoid by smoker2 · · Score: 1

      This advice is not unnecessary. If PasswordAuthentication is turned off, they can guess away until the universe dies. Also not allowing root logins is pretty basic procedure for any service. I always have SSH turned off anyway, if I need it I have a web based CP where I can turn it on.

      Standard procedure for any linux server is to turn off all services you are not currently using, and to use the firewall to initially close all ports, opening only those which you need. If possible restrict SSH logins to your own IP address too. Even with Public Key Auth my logs get filled with thousands of attempts to use passwords which need clearing out and reporting, better to prevent them even trying.
      Let me guess - you run Ubuntu.

    18. Re:overly paranoid by Anonymous Coward · · Score: 0

      I see, so my password should begin with a capital 'Z'. Thanks.

    19. Re:overly paranoid by Anonymous Coward · · Score: 1, Insightful

      This fool littered highway, where is it exactly? I've been doing this crap near on 20 years now and I've never had root lost.

      Are you sure? Knowing that you publicly criticize "going to such extreme measures" as relying on pubkey authentication instead of just using passwords... Well, with a security philosophy like that I wouldn't bet my paycheck on the chances you haven't suffered from security problems due to your half-baked security implementations.

    20. Re:overly paranoid by Anonymous Coward · · Score: 0

      My simple solution is an OTP, I have a generator on my phone so I can log in securely from any terminal.

    21. Re:overly paranoid by BrokenHalo · · Score: 1

      I don't have any information on when hell last froze over, but a blue moon (a second full moon within a month) occurs quite frequently.

    22. Re:overly paranoid by Macka · · Score: 1

      The problem with random / gibberish passwords is that 99.9% of users can't remember them, so end up writing them down on a scrap of paper and keeping them in their desk, diary, notebook, etc. That's assuming your users don't revolt and string you up from the nearest tree first.

    23. Re:overly paranoid by Anonymous Coward · · Score: 0

      what happens when you're somewhere without your private key?

      What happens when you forget your car keys? Then you can't use them. The real problem isn't that you can forget your keys. It's that the keys cannot be safely used when logging in through an untrusted terminal. Not only do you have to have your keys with you, you also need your laptop/netbook/smart phone/whatever. On the other hand, passwords are hardly better on untrusted terminals.

      (Private keys should be stored encrypted with a good passphrase. That is a hell of a lot better than writing a password down.)

    24. Re:overly paranoid by Kjella · · Score: 1

      The problem with 292 billion combinations or even just 17 million combinations is that your password will not be at the last point in the combination. IF the password ends up in the first quarter, then you only have 73 billion or 4.25 million before it's discovered. Now lets assume it's in the second half or third quarter of combination because you made a strong password. All I have to do is start trying mid way or in the last quarter of the possible sequences and I don't even need to go through a quarter of the possibilities to get it.

      Nice attempt at confusion. Basically I've picked a random number between 1 and 100 and you're guessing, I'll only answer "yes" or "no". You'll on average need 50 attempts, doesn't matter if you start at 1 and go up, 100 and go down, odd before even, the primes then the complex, whatever. Sure you could get lucky and get it right on the first try, on the other hand you can get it wrong 99 times in a row. Your chance is still 1/100. If your chances are 1/292 billion instead, I don't think you're getting anywhere even if you get lucky. And you don't know if you've gotten lucky or unlucky. Want to try 291,999,999,999 comvinations before moving on?

      --
      Live today, because you never know what tomorrow brings
    25. Re:overly paranoid by selven · · Score: 1

      1 per second in a year is 31556926, not 525960.

    26. Re:overly paranoid by esper · · Score: 1

      All quite secure, unless the server is using crypt (or some other method which ignores everything after the 8th character) to hash its passwords. I'm sure you know enough to use MD5/SHA-n hashes on your system's passwords, but I don't trust the admins of some random server out on the net to be that responsible, so I tend to stick with random 8-alphanum passwords, courtesy of pwgen. (Osh9ahy6 kie9su9M fub2Ga5p Oegh6mie...)

    27. Re:overly paranoid by Anonymous Coward · · Score: 0

      Random passwords work great! I use them every day.

      How's that? Rpwg!1ut3d Looks random, but it is really easy to remember. My password is the same style. I can't just write the characters out, I have to think the phrase in my head and out the password comes.

    28. Re:overly paranoid by houghi · · Score: 1

      Even at 1 connections a second, in an entire year, an attacker could only guess 525,960 combinations. 10 connections a second?(REALLY fast...) 5.2M/year.

      To lower that to even less, I use http://www.aczoom.com/cms/blockhosts

      Easy to install and I block an IP for 24 hours after 3 tries. So that would become an extremely slow attempt. You can obviously change those rates.

      --
      Don't fight for your country, if your country does not fight for you.
    29. Re:overly paranoid by Anonymous Coward · · Score: 1, Funny

      This fool littered highway, where is it exactly? I've been doing this crap near on 20 years now and I've never had root lost.

      What about shared?

    30. Re:overly paranoid by Anonymous Coward · · Score: 0

      Well this proves so many points...

      1 connection a second for a year you say....

      *cough* There are 86,400 seconds per DAY

      You are way, way off. In a year, you could do 31,536,000 attempts at 1 per second.

      Hopefully you can handle the math at 10 per second.

    31. Re:overly paranoid by tbannist · · Score: 1

      This might be a good thing. Loser admins should get fired, then maybe they'll learn there are consequences to doing stupid things.

      --
      Fanatically anti-fanatical
    32. Re:overly paranoid by Lumpy · · Score: 4, Interesting

      what is fun is write a nice tight C program that talks to the Telnet port offering a login and then makes it look like they got in. then just give errors for every command. it will DRIVE THEM NUTS.
      I had a "cracker" screwing with mine for weeks trying all kinds of commands, tried a buffer overflow, etc... it drove him insane as he started to type curse words more and more.....

      Nothing makes me happy than wasting hours of some asshat's time.

      --
      Do not look at laser with remaining good eye.
    33. Re:overly paranoid by Lumpy · · Score: 1

      SOME implimentation of the smartcard/ibutton access are more secure and cant be cloned. Many though simply use the card's serial number and that is it. then it brain dead easy to replicate without touching the card. I found vending machines on campuses that simply use the card's serial number.

      --
      Do not look at laser with remaining good eye.
    34. Re:overly paranoid by dbIII · · Score: 1

      That's not the point or even the likely outcome.
      When their primary job is as developers they do not get fired for massive bungles like that. Instead the management finger is pointed back to whoever gave them the box and did not disable logins as root or whatever other hole they widened no matter how stupid their actions were. That is the lesson.
      "Lock the box down and establish good practices before you hand it over" is a far more useful approach than trying to blame people out of their depth. If they can't handle the multiuser idea you don't let them get there in the first place and make them do everything with sudo.

    35. Re:overly paranoid by zero0ne · · Score: 2, Insightful

      Please PLEASE put this up on sourceforge!

    36. Re:overly paranoid by cetialphav · · Score: 1

      Actually, though it doesn't reduce the set much, there is a bias: If you are a paranoid admin, I know not to bother trying dictionary words or other basic stuff.

      That is technically true, but in reality that makes no difference to the amount of work to be done. Let us assume that we know that a password is 8 characters and that it uses only letters (upper and lower case allowed) and numbers. Each character of the password has 62 possibilities. The total search space is 62^8 > 200 trillion. The number of words you will get from the dictionary is around 200,000. This is less than the rounding error in the approximation that I just gave.

      Even in the simple case I gave, the state space is huge. In reality, it is even bigger because most systems allow special characters in the password and much longer passwords.

    37. Re:overly paranoid by sumdumass · · Score: 1

      I don't think your seeing the breakdown or possible take breakdown. Suppose it is guessing a number between 1-100. So I employ 10 computers to ask, instead of having a 1/100th chance, I have a one in ten chance that one of the computers will get a yes. My overall chances haven't changed, but the chances of each node guessing has. Furthermore, statistically or realistically speaking, the number of tries each node will have to attempt is going to be less then the total number of chances. So if the number is 55, then the total number of tries will be 45 before I get a Yes answer.

      Now if I modify the search criteria to follow natural patterns and say by trying multiples of 5 first, then I'm in with just 15 tries.

      But lets say I'm not doing this against one computer, I'm doing it against 10 computers at a time and adding them to the nodes attempting the hack as I get them. So if in the first sweep, I get one extra computer, I can pick a multiple and divide the remaining in half. If I pick up a second computer, on the second pass, I can pick another multiple and divide it in half again. So instead of having 10 nodes searching 0-10-20-30-40-50-60-70-80-90, I could have 2-12-22-32-35-42-52-62-65-72-82-92. The amount of numbers grow while the choices not covered decrease. It tilts the odds to my favor because instead of needing 100 tries, the odds of hitting a password increases by the number of multiples So if each node can only try one time per minute in order to avoid automatic blocks for unsuccessful connection attempts, instead of needing 55 minutes to guess the number 55, you need 5 minutes because ten distinctly different nodes are connecting.

      Now, A strong password with 292 billion possibilities will be substantially more difficult to obtain and could still remain statistically impossible. But that impossibility changes with the ability to split the possibles up. The chances of getting luck and hitting a password increased greatly. Especially if I have 770 machines hitting 1000 different servers 7 times per minute to appear as 6000 hits from different sources per minute on each attacked box. Now not only have I increase the chances of hitting a random password by dividing the attack vector, I have done so by increasing the pool of the attack which would ultimately increase the footprint of the attack as some servers fall.

      It doesn't mean your server will fall, but it means it isn't exactly safe on a strong password alone.

    38. Re:overly paranoid by Anonymous Coward · · Score: 0

      One magic word: Diceware. Google it: Mechanically generated random pass phrases
      with 12.9 bits of entropy per word. Five words is plenty for routine login credentials,
      ten is "point of diminishing returns" for most cryptosystems (128 bit hashes).

      Can't remember "real" pass phrases? Keep all in one Open Document
      file, "password protected" with CAST5 in case someone does break in and
      gets hold of it.

    39. Re:overly paranoid by Anonymous Coward · · Score: 0

      Not that this is really relevant to the conversation, and I'm being pedantic, but your math is off. 365 days * 24 hours * 60 minutes * 60 seconds = 31,536,000 seconds per year - not 525,960. You're just barely over the number of minutes in a year there (525,600 minutes)

    40. Re:overly paranoid by Bob+Uhl · · Score: 1
      Well, I have a new weekend project. This could be fun.

      Of course, what would be darkly ironic would be a screw-with-crackers script with a security vulnerability...

  10. A REALLY SLOW attack ... by Jerry · · Score: 5, Insightful

    This attack was first reported last November, eleven months ago, and again in April of this year, 180 days ago.

    IF the bad guys have been able to capture only 770 Linux boxes since April that is only slightly more than 4 boxes per day. At that rate it would take them 833 years to create a Linux bot farm equal in size to the 1.3 Million Windows bot farm recently reported. Out of the millions of Linux boxes in use 770 represents a vanishingly small threat.

    Using this "threat" as an excuse NOT to move from Windows to Linux, or to move from Linux back to Windows, would be similar to playing Russian roulette with a fully loaded revolver and hoping to survive.

    --

    Running with Linux for over 20 years!

    1. Re:A REALLY SLOW attack ... by AmberBlackCat · · Score: 1

      Maybe the number of bots in the network is related to how popular the operating system is. And maybe 770 is just the ones they know about. There are enough "maybe"'s for everybody, no matter what side you're on. And I've got one more; maybe one day Linux will become mainstream and all of the botnets will be on Linux machines because most of the Windows users are actually looking for these threats while most of the Linux users just assume their system is invulnerable and make excuses any time there is a counterexample.

    2. Re:A REALLY SLOW attack ... by Anonymous Coward · · Score: 0

      Even "only" 770 is still 770 too many, IMHO.

    3. Re:A REALLY SLOW attack ... by benjamindees · · Score: 1

      Do you even understand what a slow brute-force attack is? It's like trying to invade a country by sending one soldier at a time across an ocean in a row-boat.

      I am literally more worried about NSA agents sneaking into my house to install rootkits on my machines than I am concerned about this type of attack.

      No one with a root password crappy enough to succumb to this could possibly believe their system is invulnerable.

      --
      "I assumed blithely that there were no elves out there in the darkness"
    4. Re:A REALLY SLOW attack ... by ArsonSmith · · Score: 4, Funny

      I run windows so I'm safe.

      --
      Paying taxes to buy civilization is like paying a hooker to buy love.
    5. Re:A REALLY SLOW attack ... by sorak · · Score: 1

      Yeah. My six year old taught me how to send pictures via email. You may have seen the commercials. all you do is plug in your camera, click "accept", install the software, reboot, run the software, click "accept", open your web browser, and if a message pops up telling you that you have a virus, just click "accept". Then go to aol.com, type "holly06" in the username box, and "hunter2" in the password box, then click "accept", then "compose", then "granny236743@aol.com", and attach the image.

      It's so easy a six year old can do it.

    6. Re:A REALLY SLOW attack ... by Jerry · · Score: 1

      Maybe the Moon is made of green cheese. Your "popular" argument is old and lame.

      Steve Ballmer's graphic showed that Linux already holds more than 10% of the desktop market share. By your metric we should already have a Linux bot farm that contains 130,000 Linux zombies. 770 zombies is totally insignificant. However, the Linux desktop market share is higher than 10% in other countries.

      Five months ago it was reported that 30% of Chinas desktops ran Linux and 60% ran Windows. http://www.eweek.com/c/a/Linux-and-Open-Source/Chinas-Red-Flag-Sees-Desktop-as-Linux-Battlefield These governmentscity and provincialcompared the performance, capabilities and price of desktop Linux and Windows and they considered whether they could migrate all their applications from Windows to Linux. So finally about 30 percent of desktops in China now use Linux. Microsoft has about 60 percent.
      Thats from the agency that make RedFlag Linux, Chinas own version of Linux.

      That would mean that if your argument is correct we should already be seeing a Linux bot farm with 390,000 Linux zombies. But we don't. If such a farm existed Microsoft's "Highly Reliable Times" would be crowing over it, just they way they crowed over their .NET solution to the London Stock Exchange... which, by the way, was replaced today by a Linux solution.

      Within the next 8 years Asia will adopt 861 million computers, compared with 92 million in the US, 130 million in Europe and 160 million in South America. Linux will be running the desktop on more computers around the world than there are people in the USA. As the netbook sales increase, and older computers are brought back into service because of the economy it will be Linux that will be used to revitalize them. Linux and its applications are free.
        http://www.sciencedirect.com/science?_ob=ArticleURL&_udi=B6VFX-4X01P8S-2&_user=10&_co

      --

      Running with Linux for over 20 years!

    7. Re:A REALLY SLOW attack ... by AmberBlackCat · · Score: 1

      "old and lame" is attacking Windows every time somebody finds a flaw in Linux. It doesn't make the flaw go away. It would be better to just admit Linux isn't perfect either. Then you don't have to keep saying "but Windows..." every time something like this comes up.

  11. Until they hit the jackpot by MichaelSmith · · Score: 2, Interesting

    They will eventually compromise a system which has keys for other systems, so the success rate will increase.

    1. Re:Until they hit the jackpot by Penguinshit · · Score: 1

      Even a 100% increase would still be insignificant to the numbers of Windows bots.

    2. Re:Until they hit the jackpot by benjamindees · · Score: 1

      Are you kidding me? This is a useful story to keep new *nix admins on their toes but it's nowhere near a threat. Not even Windows admins are incompetent enough to put a bunch of authentication keys on a system with a public-facing, root-login-permitted, weak-root-password ssh server.

      --
      "I assumed blithely that there were no elves out there in the darkness"
    3. Re:Until they hit the jackpot by ScrewMaster · · Score: 1

      Not even Windows admins are incompetent enough to put a bunch of authentication keys on a system with a public-facing, root-login-permitted, weak-root-password ssh server.

      Tell that to the bank that holds my mortgage.

      --
      The higher the technology, the sharper that two-edged sword.
    4. Re:Until they hit the jackpot by benjamindees · · Score: 1

      On August 27th, starting at about 18:00 UTC an account used for automated backups for the ApacheCon website hosted on a 3rd party hosting provider was used to upload files to minotaur.apache.org.

      Are you saying this initial (backup) server was compromised by a slow bruteforce attack?

      --
      "I assumed blithely that there were no elves out there in the darkness"
    5. Re:Until they hit the jackpot by Anonymous Coward · · Score: 0

      also, it seems that http://archlinux.org is down.... coincidence ?

      Postes as Anonymous because I'm too lazy for a proper login.

    6. Re:Until they hit the jackpot by hany · · Score: 1

      ... or Slovak Telecom: IIRC all backbone routers with same password. (page 10 of the linked PDF)

      Or National Security Agency (Narodny Bezpecnostny Urad Slovenskej Republiky) - something like NSA?: root password nbusr123 IIRC on public server facing Internet, some further authorization credentials stored on that system and used by attackers to get further inside. (page 11-13 of the linked PDF)

      More info: .sk scene: from past to present.

      --
      hany
    7. Re:Until they hit the jackpot by Jerry · · Score: 1

      It's up for me.

      Must be your Windows box...

      --

      Running with Linux for over 20 years!

  12. A measely 6k attempts over 4 days? Who cares? by ChaosDiscord · · Score: 3, Insightful

    So this guy is seeing 6,000 attempts to break in via SSH over 4 days. That averages about 1 per minute. His earlier attacks were on a similar scale. And apparently he has long windows where there aren't attacks. While being attacked is never good, this rate of attack doesn't seem newsworthy. Welcome to the internet, it's dangerous out there! I had no doubt that botnets were being used for attacking a variety of services, so I would expect to see them attacking SSH. Going slowly is slightly clever, as it does reduce the likelihood of tripping some detection measures, but good fundamental security should be as effective against this attack as any other. Am I missing something about why this is actually interesting? Or is it just a really slow news day.

    1. Re:A measely 6k attempts over 4 days? Who cares? by DeadPixels · · Score: 4, Insightful

      Because it involves Linux boxes, and nothing gets the /. crowd riled up more than an assertion that Linux suffers from drawbacks. :P

      You're right, though, in that good security practices should be just as effective in this case - which is why the title of the article is "Sloppy Linux Admins Enable Slow Bruteforce Attacks".

    2. Re:A measely 6k attempts over 4 days? Who cares? by ScrewMaster · · Score: 4, Funny

      Because it involves Linux boxes, and nothing gets the /. crowd riled up more than an assertion that Linux suffers from drawbacks. :P You're right, though, in that good security practices should be just as effective in this case - which is why the title of the article is "Sloppy Linux Admins Enable Slow Bruteforce Attacks".

      Yes, as opposed to "Typical Windows Admins Enable Rapid Bruteforce Attacks"

      --
      The higher the technology, the sharper that two-edged sword.
    3. Re:A measely 6k attempts over 4 days? Who cares? by sumdumass · · Score: 3, Interesting

      The type of attack is interesting. There are security products that will block failed connections after a certain amount of tries and/or in a certain amount of time. This attack is distributed meaning that it doesn't trigger the failed connects per amount of time. It hits from multiple computers so IP bases detection is pretty much useless for automated security programs. It's also slowed to a pace that wouldn't cause a packet storm or otherwise flood the network tipping off other security products or admins with their eyes open.

      This is news worthy because the style of the attacks, are designed to defeat normal security protocol and software designed to defend against these types of attacks. It's pretty much going to require someone to either tweak their settings until it's over or take a visual look at the logs to identify an attack. Plus, making sure your convenient password is actually a strong password to avoid getting hit in the first place. In other words, it highlights some things many pros might have become complacent about while at the same time illuminates the very same issues to the newbs who might not know as much as we would like.

    4. Re:A measely 6k attempts over 4 days? Who cares? by GiMP · · Score: 1

      I've also been seeing this attack against my own machines in this same timeframe. It is worth noting because although these attacks do happen all the time, the distributed nature, high frequency, and overall girth of the attack is noteworthy. That is, it doesn't seem to be just one guy getting attacked, there seems to be a single concerted (distributed) attack against many hosts.

      However, you're right, this is a threat very easily defended against.

    5. Re:A measely 6k attempts over 4 days? Who cares? by Ecks · · Score: 1

      Furthermore, since most of the methods that people use to discover brute forcing attempts rely on a high rate of attack, these slow attacks are immune. I'm not sure how the oft mentioned denyhosts works but the author of the original article is using FreeBSD and OpenBSD with the pf filewall which can blackhole brute forcers based on rate of attack. Using the pf method with settings aggressive enough to catch the latest round of attacks runs a high risk of blocking valid users. I'm seeing the same issue as the original article's author and I've noticed as he has that my OpenBSD boxes have not been targeted. FreeBSD, NetBSD, Ubuntu and Debian on the other hand.

      My suggestion: Use Public Keys as much as possible. Systems allowing only Public Keys are immune to these attacks and you don't get the nasty log messages as well. If you must allow passwords disallow them for root. You can get root access by configuring sudo for users and via Public Keys for scripts.

      # PasswordAuthentication no ## Best -- Public keys required for login
      # PasswordAuthentication yes ## Only if you must.
      # PermitRootLogin no ## Best -- root cannot login remotely.
      # PermitRootLogin without-password ## Better -- root can login via key but not with a password.

    6. Re:A measely 6k attempts over 4 days? Who cares? by amcdiarmid · · Score: 1

      Re: Windows Admins...

      Guys, Us stewpid windows guys don't haff to know this stuuf.
      Micro$oft locks out any account that has 3 failed logons withing 15 minutes by default. (Not that it would not be trivial to get around, it just means that you have to try each password for a specific account once per five mintues. And increases the amount of time it takes to break a password. Hopefully to longer than the period to change the password....)

      duhhhhhh!

    7. Re:A measely 6k attempts over 4 days? Who cares? by Anonymous Coward · · Score: 0

      I've been seeing about 1 every two minutes. Since this machine doesn't have a root account, I've yet to see a valid account tried.

    8. Re:A measely 6k attempts over 4 days? Who cares? by Anonymous Coward · · Score: 0

      That wouldn't increase the time required to break it, since they're generally trying more than 5 likely usernames, and they're averaging about 1 hit per minute.

  13. if ths were a windows story by smash · · Score: 1, Troll
    ... we'd all be making fun of how insecure M$ is, amirite?

    Incompetence with security matters means you will get owned sooner or later, whatever OS you're running. There are plenty of microsoft tools out there to secure your shit, just as there is for Linux or any of the BSDs.

    --
    I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
    1. Re:if ths were a windows story by Anonymous Coward · · Score: 0

      It would never be a windows story :p

    2. Re:if ths were a windows story by Anonymous Coward · · Score: 0

      Its just with Linux, you stay secure for thousands of days while he is hammering at your box for thousands of days. Over thousands of days, you can implement even slightly more security, and be secure. The difference between Linux and microsoft then is days of security with Linux, translates to nanoseconds of security with Windows. Your windows security report simply says pwned.

  14. BFD by JacobSteelsmith · · Score: 1

    I use BFD and CPanel enforced strong passwords. I don't know how well BFD would do against distributed attacks though. I also don't allow SSH access to just anyone, and if I do, it's using public key authentication, but they have to have a very good reason. SSH is also listening on a non-standard port. Really, the vast majority of clients will never *need* SSH.

  15. guilty! by Anonymous Coward · · Score: 1, Funny

    I haven't updated my server since 2004. it runs debian 3.

    There were all kinds of root logins from brazil last month, so I did permitRootLogin no but haven't got any farther than that yet.

    It is colocated and they haven't sent a bill in 4 years so I don't want to go in and upgrade it or they might realize it is there!

  16. If it's SSH it's really easy to rate limit attacks by aarggh · · Score: 1

    All you need to drop any unsuccessful SSH logins for a specified period of seconds. /usr/sbin/iptables -I INPUT -p tcp --dport 22 -i eth1 -m state --state NEW -m recent --set /usr/sbin/iptables -I INPUT -p tcp --dport 22 -i eth1 -m state --state NEW -m recent --update --seconds 1000 --hitcount 2 -j DROP

    Eth1 is obviously your public NIC
    --hitcount is the number tries allowed
    --seconds is, well, seconds the IP is dropped into a bit bucket for!

  17. Re:If it's SSH it's really easy to rate limit atta by aarggh · · Score: 3, Informative

    Sorry, text came out crap for some reason, trying again to make it clearer.

    /usr/sbin/iptables -I INPU= T -p tcp --dport 22 -i eth1 -m state --state NEW -m recent --set

    /usr/sbin/iptables -I INPU= T -p tcp --dport 22 -i eth1 -m state --state NEW -m recent --update --seco= nds 1000 --hitcount 2 -j DROP

  18. Login as root. Does any Linux distribution allow? by TheSunborn · · Score: 1

    Does any Linux distribution come with a default ssh config that allow root to login via ssh?

  19. 770? by Col+Bat+Guano · · Score: 1

    When it gets to 777 all users will have read/write access to the files!

  20. Re:Login as root. Does any Linux distribution allo by xous · · Score: 1

    I believe the default gentoo configuration file does. There is nothing wrong with allowing root to login.

  21. Michael Jordan Shoes by Anonymous Coward · · Score: 0
  22. Re:Login as root. Does any Linux distribution allo by armanox · · Score: 1

    Plenty do. Slackware, Fedora, CentOS, Debian, just to name a few.

    --
    I'm starting to think GNU is the problem with "GNU/Linux" these days.
  23. Just Ban IPs after failed login attempts? by Anonymous Coward · · Score: 0

    Not that I've done much in a big professional system, so feel free to tell me to STFU and go home...

    Wouldn't it be feasable to ban IPs with X unsuccessful login attempts for long periods of time (perhaps longer than the "user must change password" time)? Perhaps making X something larger than the per-user login attempt ban so one bad day doesn't ruin loggin in forever?

    1. Re:Just Ban IPs after failed login attempts? by MichaelSmith · · Score: 1

      The problem is the size of the resulting database. Say you have a million hosts to ban. Thats a million IP addresses to check before accepting a legitimate connection.

    2. Re:Just Ban IPs after failed login attempts? by Rakishi · · Score: 1

      Christ, did you fail out of CS or something? It's called a hash map, constant time no matter how many ips you have stored as long as you got enough ram. For a million, a small number in computer terms, a paltry 10mb or so is all you'll need.

    3. Re:Just Ban IPs after failed login attempts? by stevenvi · · Score: 1

      A properly indexed database would not suffer this drawback.

    4. Re:Just Ban IPs after failed login attempts? by MichaelSmith · · Score: 1

      Yeah but does it even help you? Because the botnet shares information about your host, it is possible that no host will attempt more than one connection.

      I would be reluctant to ban a million IP addresses in a packet filter such as pf because I can't be sure what the impact on the kernel would be. I normally limit my ban lists to a couple of thousand.

    5. Re:Just Ban IPs after failed login attempts? by dbIII · · Score: 1

      Also an important point with this approach is you are giving a malicious party a way to write some of your firewall rules. If they become aware of that and spoof addresses it could become a denial of service vector.

    6. Re:Just Ban IPs after failed login attempts? by MichaelSmith · · Score: 1

      Quite possibly but anything which looks for a failed attempt and revokes a service from the originating host could be used for a DOS. There are lots of tools which do that.

    7. Re:Just Ban IPs after failed login attempts? by dbIII · · Score: 1

      I really don't like the idea of having to second guess how malicious parties could rewrite my firewall rules to block addresses if I give them the ability to do so once they work out that they can.
      The approach furthur down the page by Tracey Reed with iptables examples looks like an answer to this that takes the possibility of a DOS into account. Temporary and not long lasting rewriting of firewall rules from each attack - no lasting damage. We've all seen what a mess unattended spam blacklists were so we shouldn't start to walk into the same trap with permanent blacklists to block potentially all traffic.
      I sometimes do what Tracey has automated there on a manual basis when it gets annoying - if gkrellm on a gateway shows me there are failed ssh connection attempts I drop the address just so I can keep track of the legitimate connections more easily.

  24. Re:If it's SSH it's really easy to rate limit atta by XanC · · Score: 1

    This is great advice, for when you must accept password-based SSH logins, and I use it myself.

    Unfortunately the style of attack discussed in the article is one that gets around this, by being both slow and distributed, so that rate limits based on IP address per unit time are effectively useless.

  25. my examples assume the attacker knows the scheme by SuperBanana · · Score: 4, Insightful

    The problem with 292 billion combinations or even just 17 million combinations is that your password will not be at the last point in the combination.

    My calculations on time involved the half-way mark, ie average time.

    However, you missed a more critical point: my examples assumed the the attacker knows exactly what combination you're using. Which he or she does not.

    Are your chosen words in English? Did you use punctuation? One number? Where is it? Did you substitute numbers for certain letters?

    They have NO IDEA. Scotch2!Foo. Simple, short, and completely bulletproof. I laugh at the idiots who sit there and pound away on complex root passwords. Sure, that can be done in production environments where you then set up an SSH host key so you can get in easily (and yes, root login is necessary sometimes- ever tried to scp an important system file? Pain in the fucking ass if you can't login as root.)

    Here's a simple test: run John overnight on your shadow file. If it can't guess your password, nobody's ever going to get in via ssh by guessing your root password. Ever. John tries passwords by the THOUSANDS per second...

  26. Re:If it's SSH it's really easy to rate limit atta by GWRedDragon · · Score: 1

    Sorry, text came out crap for some reason, trying again to make it clearer.

    /usr/sbin/iptables -I INPU= T -p tcp --dport 22 -i eth1 -m state --state NEW -m recent --set

    /usr/sbin/iptables -I INPU= T -p tcp --dport 22 -i eth1 -m state --state NEW -m recent --update --seco= nds 1000 --hitcount 2 -j DROP

    Yep, pretty much. Try rejecting with tcp reset if you want the bots to give up faster.

    iptables -A INPUT -p tcp --syn --dport 22 -m recent --set
    iptables -A INPUT -p tcp --dport 22 --syn -m recent --rcheck --seconds 1000 --hitcount 3 -j REJECT --reject-with tcp-reset

  27. How many of these 770 machines were planted? by celtic_hackr · · Score: 1

    I have to wonder, with such a small number of machines as this, how many of them were actually seeded by the botnetters. Just to see if they could get other Linux boxes to fall. Maybe some non-trivial number of these were/are test machines set up to try to break into.

    While keys are nice, a good password policy with forced changing frequently is probably better. Ok, so you've created a key, what prevents a brute force attack on the "never-changing" key? How can a key which will never change, be more secure than a very strong password that is only good for two weeks? Odds are a key can be broken in a few months of intensive work. Or less.

    I once left a machine out there and intentionally left it there with no updates, to see how long it would survive. It lived for several years before being cracked.

    1. Re:How many of these 770 machines were planted? by Anonymous Coward · · Score: 0

      How can a key which will never change, be more secure than a very strong password that is only good for two weeks? Odds are a key can be broken in a few months of intensive work. Or less.

      Are you seriously saying a 1024 bit DSA security can be 'broken' with modest amount of work? That sounds like you don't really understand how PKI works. If you really do have a point, I think you should elaborate...

    2. Re:How many of these 770 machines were planted? by celtic_hackr · · Score: 1

      Oh, yes, the infamous argument. I use 4096 bit keys when it matters, but I remember when everyone used to say how secure 512 bits was. I remember how no one would ever break this 512 bit this or that algorithm that was so great, and now they've all been replaced by "newer", "better", "more secure", and "unbroken" magic bullet encryptions. If you don't think a 1024 bit key can be broken with the resources the bad guys have now, well more power to you. I personally don't have that confidence, since 512 bit is pretty easy to break, and there's nothing to say that they have to actually solve or break it. All they have to do is get a match to one of many. They don't have to solve a particular key, all they have to do is get one out of thousands or millions to match. Then do it again. And again. If 512 bit can be broken, so can 1024, and 2048 and 4096. It gets harder, of course, but nothing is immune. Lastly, if these admins areso sloppy that they have weak passwords what makes you think they'd use 1024 bit DSA encryption, instead of 512?

      So, yes, I think 1024 bit DSA can be broken with the technology that botnets have at their disposal. Maybe not broken in the traditional sense, but a process that would allow them to continue to take over secured machines.

  28. This is a lot more benign by mysidia · · Score: 0, Offtopic

    Than the worms enabled by sloppy Windows admins who fail to apply server patches...

  29. Re:learn to....denyhosts by Anonymous Coward · · Score: 0

    I woke up in the morning with over 700 denyhosts bans a couple of days ago. Still getting 2 or 3 per hour.

    Denyhosts blocks the ip of any more than 3 failed attempts. My hosts.deny (with the help of some other similar apps) has a list of over 5500 banned IPs.

    Not sure if such a large list affect performance yet.

  30. Re:If it's SSH it's really easy to rate limit atta by jamesh · · Score: 1

    We have a few class C networks with about 30-50% usage. Any attempted by an IP address to hit port 22 on an unused IP gets put on an iptables 'recent' block list and it stays there until it hasn't been heard from for 5 minutes. It isn't a bulletproof security measure by any means but it sure cuts down the noise, which makes reviewing the logs a bit more useful.

    I wish I had IPv6... assuming you can't axfr my dns zone to determine active hostnames, you have a in 2^48 chance of hitting an actual host, and a (2^48 - ) in 2^48 chance of being blocked for 5 minutes after the last time my firewall hears from you. The downside is that the hackers/bots probably have 2^48 addresses to choose from too, making my block list overflow. oh well :)

  31. Re:If it's SSH it's really easy to rate limit atta by MichaelSmith · · Score: 2, Interesting

    All you need to drop any unsuccessful SSH logins for a specified period of seconds.!

    With a distributed attack each attacker may only try once.

  32. Re:Login as root. Does any Linux distribution allo by Anonymous Coward · · Score: 0

    CentOS / RedHat Enterprise Linux

  33. Re:If it's SSH it's really easy to rate limit atta by Bigjeff5 · · Score: 5, Interesting

    Obviously, you didn't RTFA, or even the summary.

    These attacks completely avoid the problem, you'd have to drop the IP for several days to mitigate this attack. It is hundreds of linux boxes tagging a target and waiting a while before hitting it again. It's a slow brute force attack because no individual bot attacks a particular target more than once or twice in a given time period, maybe several minutes, maybe even several hours. The frequency of this attack was about 1500 attacks per day total, which is only two attacks per machine in the 770 bot network in a single day.

    Implimenting your strategy to prevent these attacks would also mean you would be locking out legitimate users who mis-type a password for a day or more. That is not going to work in any environment I am aware of.

    The brilliance of this attack is that while a bot is only attacking a particular machine once or twice a day, there is nothing stopping it from attacking other machines in the mean time. A bot can still send out thousands of attacks per day, they are just sending them to thousands of machines instead of one. Well coordinated it certainly has the same potential for building a large botnet as normal brute force methods. The downside of course is your odds of getting a particular machine are terrible, you're playing statistics to get a large botnet.

    --
    Security is mostly a superstition... Avoiding danger is no safer in the long run than outright exposure. - Helen Keller
  34. Re:my examples assume the attacker knows the schem by DavidTC · · Score: 2, Interesting

    Here's a simple test: run John overnight on your shadow file. If it can't guess your password, nobody's ever going to get in via ssh by guessing your root password. Ever. John tries passwords by the THOUSANDS per second...

    Seriously. Brute force of actual good passwords is not a foreseeable option.

    If it worries you that much, it's pretty easy to implement something to make the system even slower. For example, I've previously used iptables to only let each IP make three new ssh connections every minute. ssh also has that option, and it can only count failed attempts.

    I turned it off because I realized that was utterly pointless, and no one was going to break in in any reasonable amount of time.

    Although I've recently considered messing around with iptables on our mail server and making repeated failed ssh attempts block access to the email server, as obviously they are either malicious, or their machine is controlled by a virus, and either way, any mail from that IP is probably spam. I need to run some intersect of the spamming IPs with ssh attempts and see if there's any overlap first.

    --
    If corporations are people, aren't stockholders guilty of slavery?
  35. SSH as root by RT+Alec · · Score: 1

    This touches on another point, that is being "root" at any time other than sysinstall. FreeBSD has never (by default) allowed root logins via SSH, and I will always contend that is a "good thing". If you access a system via SSH, it is a server. If you are on a shell session on a server, you should NEVER be root-- that's what sudo is for.

    If you whine about this, you are indeed a poor sysadmin. It reminds me of my friend who habitually texts while driving. "But I have never been in an accident," he says. How selfish, putting his convenience above the safety of those around him.

    1. Re:SSH as root by Nursie · · Score: 3, Interesting

      "If you are on a shell session on a server, you should NEVER be root-- that's what sudo is for."

      Why?

      Did you just come to bitch about something you personally disagree with or do you actually have a reason for this?

    2. Re:SSH as root by Abcd1234 · · Score: 1

      Yeah! Because I know, when I'm doing a significant number of tasks configuring a new service/device/what have you, I just *love* having to prefix every one of my damn commands with 'sudo'.

      Look, admit it: you have no good reason for this little 'rule' of yours. It's just a personal preference. And in that case, fine. But don't imply that it's somehow safer... 'rm -rf /' is just as dangerous whether it's run as root, or has 'sudo' tacked to the front.

      No, the real advantage to sudo is that you can selectively permit root access to users other than root. But if you are the admin, and thus have root access, there's no reason not to make your life easier and just use the root shell.

    3. Re:SSH as root by Tweenk · · Score: 1

      sudo reduces the possibility of disabling your system by mistyping a root command, and promotes the good practice of only doing the absolute minimum of tasks as root.

      Another minor advantage is that the name of the user with sudo privileges is not known, so you have to guess both the name and the password.

      --
      Those who would give up liberty to obtain working drivers, deserve neither liberty nor working drivers.
    4. Re:SSH as root by Jave1in · · Score: 1

      If the server has multiple admins, then running a shell as root would make accountability for changes on that server much more difficult to surmise than using su or sudo which logs privilege escalation. On your own private server, the only real benefit is to protect your system from yourself when you don't particularly need root access.

    5. Re:SSH as root by Abcd1234 · · Score: 1

      sudo reduces the possibility of disabling your system by mistyping a root command

      No it doesn't. 'sudo rm -rf /' is just as destructive as 'rm -rf /'... the only difference is you had to annoyingly tack 'sudo' on the front, first. It's not like sudo magically makes people's fingers less prone to typos.

      Another minor advantage is that the name of the user with sudo privileges is not known

      Or you could just guess the root password. sudo doesn't make that any harder.

      No, the real advantages to sudo are:

      1) It allows you to selectively give root permissions to people (ie, you can grant root privileges for a single application), and

      2) It can log all actions taken with sudo, so you have an audit trail.

      Of course, neither of these things is terribly useful on a single-user system, nor are they advantages that dramatically increase the security of the system.

    6. Re:SSH as root by RT+Alec · · Score: 1

      I read your post as:

      "I am so good, and so careful, I would never, ever make a mistake as root."

      Good luck to you on production servers, and may your employer and clients have mercy on your soul.

      Look, admit it: running commands as root is a convenience for you, and you are willing to make the obvious tradeoff in stability and security. But don't imply that others are as gifted as you are in avoiding simple mistakes that are catastrophic as root.

    7. Re:SSH as root by RT+Alec · · Score: 1

      I find it hard to believe that the folks whining (I'm sorry, "bitching") about sudo usage are sysadmins on servers, and certainly not servers that are depended on by others. This policy is a good idea on any system that you can access remotely (thus making it a "server"). Running an internet connected server like a five year old is selfish and it should not be a surprise that it is discouraged.

      Presumably when doing system operations, you will do as little as root as possible. Therefore sudo is not much of an inconvenience. Yes, you could prepend a destructive command with sudo, but you would have to be twice as stupid.

      If remote root logins are disabled, then you cannot (remotely) guess the root password.

  36. Re:Login as root. Does any Linux distribution allo by Anonymous Coward · · Score: 0

    Suse 11 does as far as I can tell.

  37. "Sloppy Linux" distro by Anonymous Coward · · Score: 0

    When I first glanced at the headline for article, I thought that "Sloppy Linux" was the title for a new distribution.. haha

  38. Re:If it's SSH it's really easy to rate limit atta by nacturation · · Score: 1

    Mod up... that's the best explanation of this issue I've read yet.

    --
    Want to improve your Karma? Instead of "Post Anonymously", try the "Post Humously" option.
  39. Re:Login as root. Does any Linux distribution allo by Anonymous Coward · · Score: 0

    Yes, Ubuntu does so I suppose Debian/Mint... also does.

    Sure no root logon is good... changing the default port is a good idea as well!

    fail2ban is good, and if you only use linux boxen to ssh in, check out SPA port knocking. fwknop and a non-default high port! Very secure indeed!

  40. Re:Login as root. Does any Linux distribution allo by Anonymous Coward · · Score: 0

    Does any Linux distribution come with a default ssh config that allow root to login via ssh?

    openbsd does it :)
    the problem is not the root login, it's the stupid password

  41. What am I missing? by Mathinker · · Score: 1

    I agree that running SSH on a high port might not be a good idea, but didn't understand how a non-root user, who presumably doesn't have read access to the private SSH host key, could manage to successfully run a fake without causing the MITM attack warning to come up?

    If someone is going to ignore the MITM attack warning, than anyway his password isn't being protected from a variety of other attacks, so I don't know how significant your additional attack vector is.

  42. new project idea by straponego · · Score: 1

    Pool logs of failed SSH logins on a public site. Allow whitelisting on your site for trusted IPs. If a lot of people see failed logins from the same IPs, use that as the source for a list of new iptables/hosts.deny/whatever ban lists.

    Obviously it's a bit more complicated than this. For one thing, you wouldn't want people joe-jobbing shared hosting services, etc. This is very analagous to the problem of spam and RBLs. Still, if this problem grows to the point where it's wasting serious bandwidth, this would be a way to mitigate it.

    On the other hand, in most cases strong passwords and a non-standard port number are more than sufficient. In five years I've never seen an attempt on the ports I use. For a high profile site, where you're likely to come under closer scrutiny, you would probably have a firewall/vpn configured as well.

  43. My solution to this problem: by Tracy+Reed · · Score: 4, Informative

    iptables -F
    iptables -t nat -F
    iptables -t mangle -F
    iptables -X

    iptables -N SSH_WHITELIST

    # My work network.
    iptables -A SSH_WHITELIST -s 1.2.3.0/24 -m recent --remove --name SSH -j ACCEPT
    # My home network
    iptables -A SSH_WHITELIST -s 4.5.6.0/24 -m recent --remove --name SSH -j ACCEPT

    iptables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --set --name SSH
    iptables -A INPUT -p tcp --dport 22 -m state --state NEW -j SSH_WHITELIST
    iptables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --update --seconds 60 --hitcount 4 --rttl --name SSH -j LOG
    iptables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --update --seconds 60 --hitcount 4 --rttl --name SSH -j DROP

    Tune appropriately. I find that 4 per minute doesn't generate false positives but quite effectively blocks brute forcers. You could lower hitcount or increase the seconds to your liking.

    And this is just for machines where I do need multiple people to be able to login from multiple locations. On other machines I definitely use ssh key only auth via the sshd_config.

    PLUS: This proves that there ARE people out there interested in breaking into Linux boxes. It's just that this is the best way they can find to do it and I think that says a lot. So let's not hear any more of this "Linux would have viruses too if it were as popular as Windows" bull. Between this and the MySQL on Windows worm:

    http://news.cnet.com/MySQL-worm-hits-Windows-systems/2100-7349_3-5553570.html

    and the recent Linux botnet perpetrated via password brute forcing:

    http://www.builderau.com.au/program/linux/soa/Linux-botnet-discovery-points-to-lazy-administrators/0,339028299,339298642,00.htm

    you would think we could put that old chestnut to bed by now.

    1. Re:My solution to this problem: by jittles · · Score: 1

      Except that you're failing to take into account that most Linux users are at least moderately capable. Once you get the average Joe running on Linux you'll see the same kinds of social engineering attacks you see on Windows. Why bother finding a privilege escalation exploit when you can get the person behind the keyboard to type in the password so he can install your font pack, or whatever?

    2. Re:My solution to this problem: by arndawg · · Score: 1

      PLUS: This proves that there ARE people out there interested in breaking into Linux boxes. It's just that this is the best way they can find to do it and I think that says a lot. So let's not hear any more of this "Linux would have trojanes too if it were as popular as Windows" bull. Between this and the MySQL on Windows worm:

      I changed a word for you and made it TRUE. If the average moron would move to linux, people would still get their machines rooted because of the new porn downloader they managed to install and give root access. It's very difficult to remotely root an up to date windows machine with just Remote Desktop running on it. Just as safe as Linux with SSH.

    3. Re:My solution to this problem: by Tracy+Reed · · Score: 1

      Both of the replies to my posting are failing to take into account network effects. Sure, someday some Linux user will click on a trojan and get their homedir infected or maybe it will even exploit a local root vulnerability if it can find one for the distro in question (although this becomes less and less likely as more applications are constrained by SE Linux, Dan Walsh at RedHat is working on constraining desktop apps).

      But that is far less likely to happen like it does on Windows due to all of the low hanging fruit in Windows land which creates massive network effects and rapidly spreading problems where you merely have to visit a website or open an email. Or visit a folder with an autorun.inf in it (which recently infected a few Windows machines on the office network of a client, I was called in to delete all of the autorun.inf from their Linux based fileserver and scan the shares for Windows viruses).

      The monoculture of Windows further adds to the network effects and detracts from them in the case of Linux. Diversity is a good thing and I am glad we have so many different distributions which are all interoperable via http/html, ODF etc.

    4. Re:My solution to this problem: by Junior+J.+Junior+III · · Score: 1

      So let's not hear any more of this "Linux would have viruses too if it were as popular as Windows" bull.

      I agree that it's bull, but my take on this isn't that Linux would somehow have all these latent vulnerabilities discovered that have always been there if only it were as popular as Windows. Rather, I take this statement as "In order to have a hope of being as widespread in its usage as Windows, Linux would have to make concessions that would make it easy enough to use by "average people" -- and in so doing would open vulnerabilities.

      Just for the mere fact that you can't expect the entire world to become savvy UNIX admins, you're going to have a lot of systems managed by people who don't know what they're doing, don't understand how it works, don't know how to patch, or don't think it's important, etc. Just like it is with Windows users and clueless Windows admins. Poorly managed boxes are vulnerable -- even poorly managed linux or BSD boxes. It's more that in order to manage these boxes at all, you have to know a fair bit of what you're doing, that you tend to have some concept of security and its importance.

      It's almost secondary that the actual security archictecture, design, implementation, and configuration of windows is technically inferior to UNIX/Linux/BSD. Put it in the hands of someone who doesn't know what they're doing, and they'll open holes in whatever system.

      --
      You see? You see? Your stupid minds! Stupid! Stupid!
  44. Re:Login as root. Does any Linux distribution allo by Anonymous Coward · · Score: 0

    Yeah, most all of them do. However, FreeBSD / OpenBSD get it right and don't allow root remote logins by default. Create a normal account, add them to wheel so they can su and off you go.

  45. Yup, and what else is new? by Mathinker · · Score: 0

    News at 11: once you have been compromised, you're sunk. Time to reimage or rollback the VM.

    Anyone interested in log monitoring should already know that.

    Since this sub-thread is about log monitoring, your comment was, er, offtopic/superfluous, although I suppose you got the Interesting mod for the TSA story.

    1. Re:Yup, and what else is new? by cetialphav · · Score: 1

      News at 11: once you have been compromised, you're sunk. Time to reimage or rollback the VM.

      Anyone interested in log monitoring should already know that.

      Since this sub-thread is about log monitoring, your comment was, er, offtopic/superfluous, although I suppose you got the Interesting mod for the TSA story.

      Oh please. Why not actually participate in the conversation instead of complaining that the mods don't see things your way.

      We all know what to do in the event that a compromise is detected. But how do you detect the compromise? My (very relevant) point is that you cannot trust anything on something that might be attacked to tell you whether it is compromised or not because it might be compromised. System logs give you valuable information if the system can be trusted but you cannot use them to determine whether to trust the system or not.

  46. Re:If it's SSH it's really easy to rate limit atta by Anonymous Coward · · Score: 0

    Why REJECT? You know their knocking why let them know your listening behind the door?

  47. Re:learn to....denyhosts by antdude · · Score: 1

    Wow, how are you getting so many? I only get a few every other days. I wonder if it is because I am residential?

    --
    Ant(Dude) @ Quality Foraged Links (AQFL.net) & The Ant Farm (antfarm.ma.cx / antfarm.home.dhs.org).
  48. The numbers are ridiculous by AlgorithMan · · Score: 1
    It amazes me how a botnet with < 1000 hosts gets a news article... not all linux admins are competent - wow!
    how does that compare to windows-botnets with > 1,000,000 zombies? (don't tell me this was because of linux' low marketshare - linux has around 10% marketshare if you count the servermarket. So if marketshare was the only factor, then there shouldn't be much more than 9 times as many infected windows machines, so windows botnets with more than 6,930 zombies would already be newsworthy either)

    rtfa - it says there are 770 bots with 32 attempts each - that's less than 26^4 so this can't even brute-force passwords with 5 lowercase characters!. So this means that
    • either they have very short passwords with a high probability of being guessed in an attack with randomized passwords (I don't think you could compromise >100 machines that way, since even if all machines had lowercase 6-character passwords your expectation-value is 1 success in 12,537 attempts)
    • or their root-passwords are on wordlists

    in both cases: if you use such a weak ROOTpassword, it's your own fault!

    IMHO this is just an attempt to badmouth linux, by an OpenBSD fanboi (btw. I respect OpenBSD, but I think its installer should be easy enough for a graduate computerscientist to use it...)

    --
    The MAFIAA is a bunch of mindless jerks who will be the first up against the wall when the revolution comes
    1. Re:The numbers are ridiculous by lordandmaker · · Score: 1

      It amazes me how a botnet with 1,000,000 zombies? (don't tell me this was because of linux' low marketshare - linux has around 10% marketshare if you count the servermarket. So if marketshare was the only factor, then there shouldn't be much more than 9 times as many infected windows machines, so windows botnets with more than 6,930 zombies would already be newsworthy either)

      It's predictability. Everyone expects Windows hosts to be members of a botnet, lots of people are under the impression Linux is impervious to it. It's similar to how a roadside bomb in Afghanistan is substantially less newsworthy than one in Britain, despite them being similarly technically possible - the bomb in Afghanistan is expected, the one in the UK isn't.

    2. Re:The numbers are ridiculous by Informative · · Score: 1
      Maybe I didn't RTFA well enough, but also didn't get it, why a BSD blog is singling out linux. What about all the other *nixes. Was there something has was trying to say that only applies to linux?

      PS. FWIW Solaris doesn't allow root network logins by default. That plus a packet filter will prevent anyone from logging in from other than home or office.

    3. Re:The numbers are ridiculous by AlgorithMan · · Score: 1

      yes, but the numbers clearly show that this isn't a security problem in unix(oid) systems - it's a misconfiguration of SOME unix(oid)s, which only shows that SOME users of unix(oid)s are incompetent - and that is far from newsworthy...

      --
      The MAFIAA is a bunch of mindless jerks who will be the first up against the wall when the revolution comes
  49. Welcome to denyhosts. by eddy · · Score: 1

    Welcome to denyhosts.

    --
    Belief is the currency of delusion.
    1. Re:Welcome to denyhosts. by Culture20 · · Score: 1

      Too lazy to look it up; is the IP pool daemon still a closed source project?

    2. Re:Welcome to denyhosts. by lee1 · · Score: 1

      I had this running for a while but disabled it after it locked me out of my own server. I was trying to log in from a Panera free wifi (great chain, by he way). After getting in through another server, I found the ip that the access point had assigned me in the denyhosts log. So I'm sure it's a great idea, but could lead to problems if you intend to work on your server from the road.

  50. That's done in DenyHosts by cheros · · Score: 1

    AFAIK this is part of one of the SSH blocker efforts, DenyHosts. I found you need to change the window failed attacks are detected in as the people trying to break in appear aware of the current default (at least, that's what my logfiles appeared to suggest).

    However, there are more things you can do, and I agree that just changing port numbers makes an enormous difference.

    --
    Insert .sig here. Send no money now. Owner may sue, contents will settle. Batteries not included.
  51. hosts allow/deny by bl968 · · Score: 1

    A properly configured hosts allow/deny

    Rejects 99.9999% of connection attempts before they can even begin to guess.

    --
    "GET / HTTP/1.0" 200 51230 "-" "Mozilla/4.0 (compatible; Setec Astronomy)"
    1. Re:hosts allow/deny by Anonymous Coward · · Score: 0

      What absolutely horrible advice; I hope it gets modded down.

      TCPwrappers (hosts.allow/deny) **do not** block your box from responding to a TCP connection. The full TCP handshake happens, and once that's done, *then* TCPwrappers come into play. Can you see the problem with this? I sure hope so.

      Moral of the story: use an actual firewall (don't respond to packets you don't want!) and stay the fuck away from tcpwrappers. In fact, the entire tcpwrapper suite should be nuked from the face of the planet. Worthless garbage; always was, always will be. All distributions (Linux, BSD, etc.) should've removed the pile of junk long, long ago.

      As for the actual brute force problem...

      1) Don't listen to any of these jhonkas talk about sticking SSH up on a non-root port number. It's only a matter of time before the brute force kiddies -- remember, same kiddies who have DDoS networks -- alter their scripts/methods to use nmap and scan for OpenSSH identification strings or just blindly try speaking SSH on anything that listens on that port. You gain absolutely nothing by doing it.

      2) Don't listen to the "PermitRootLogin no" freaks either -- what people MEAN to say is "PermitRootLogin without-password". Don't let the directive fool you -- look it up, see what it does. There *are* cases/environments where you want root logins permitted, but only using keys. Even better: use "PermitRootLogin without-password" and a root SSH key with a command="" directive in it.

      3) Don't listen to the "blackhole IPs dynamically on failed login attempts" advice. If you run an actual hosting service, blocking based on failed login attempt does nothing but create more support problems.

      4) Don't install any of these programs that do the equivalent of "tail -f /var/log/auth.log | grep 'Failed password for' | awk '{ print $9 }' | iptables --deny-crap". You're asking for serious trouble there, and wasting your own resources. DO NOT block this crap in realtime. Do it manually after-the-fact.

      Do it the right way: most Linux and BSD distributions send you a nightly log of who tried to log in, as what, from where, and why it failed. Parse this data, pull out the results, and then look up the netblocks these IPs are part of. Block those in your firewall.

      You want the list of netblocks I block? I'd include it, but Slashdot insists my "comment has too few characters per line". Oh well.

      $ wc -l pf.conf.ssh-deny
                363 pf.conf.ssh-deny

      There's beautiful, fat /8 blocks in there too, mainly for Europe and the Asias, but even MIT is in there. Yep, MIT. Fuck 'em.

    2. Re:hosts allow/deny by Anonymous Coward · · Score: 0

      The reason most people (including me) do no. 1,3 and 4 (in excess of no root login, strong passwords and key only login where applicable) is that it creates smaller logs. Smaller logs == less noise == easier to detect (failed or non-root) distributed and concentrated attacks. Improving signal to noise ratio is a good thing.

  52. Reverse botnet, then by tfheen · · Score: 2, Interesting

    Sounds like we should set up a reverse botnet with a rating system, then.

    Talk to some other companies you know, create a system that takes a list of failed logs, anonymizes it somewhat and publish it. They do the same, you all have a system that pulls down the list from the others and puts that into a list of "hosts we probably don't want to talk to, because they have tried as root@othercompany.com".

    If the lists are properly anonymized and we have a rating system so getting bad data into the system is harder, I think we'll have more or less countered them for now.

    I'm sure the next reply will tell us all about somebody who already has this designed and set up.

    1. Re:Reverse botnet, then by Rich0 · · Score: 1

      That sounds great. We should call it DenyHosts!

      I've been seeing these attacks since Sep 30th as well. Denyhosts has been steadily blocking IPs, but I'm still getting quite a few attempts.

      All you need to do is set a long window for failed login attempts. Then have the window reset for successful login attempts. So, if I mistype my password 3 times in a week no big deal. If a bot does it, then it is blocked.

      If I did manage to block my own IP by mistake somehow, it isn't really the end of the world. I just need to pick up my cell phone or whatever to ssh in and remove the block. I can even whitelist IPs if I want to, but I've never had to to do that.

  53. Re:learn to....denyhosts by xaxa · · Score: 1

    head -n 1

    Sep 6 06:25:34
          4745 61.143.178.194
          3301 219.131.173.42
          2357 200.229.119.104
          2263 219.94.174.90
          1653 87.106.252.228
          1297 211.157.98.64
          1194 125.208.1.40
          1042 72.55.143.45
            870 67.44.64.154
            642 62.212.66.84

    (top ten results, there's another 53 hosts, totalling 24641 failed logins)

    This is a PC on a (fast) home ADSL connection. The reverse IP is dynamic, but a couple of minor domains point to it.

  54. Re:learn to....denyhosts by xaxa · · Score: 1

    Damn, lost the command:
    head -n 1 < /var/log/auth.log | grep '^...............' --only-matching; grep 'Failed password' < /var/log/auth.log | grep ' [0-9.]*\.[0-9.]* ' --only-matching| sort | uniq -c

  55. About the hosting services failure at i18n by SgtChaireBourne · · Score: 1

    The article have very good point. However the hosting service blogger.com has really incompetent web designers and that really detracts from a fairly important post.

    • The service ignores browser languages preferences and follows a racist regime of choosing a language for you.
    • The pull-down menu to change languages, if you can find it, has the language names localized to the language chosen. So if you are stuck with arabic, you will have to know that 'Ø¥ÙÙfÙÙSØÙS' means 'English' in order to switch the UI.

    Can we pull the handful of competent web designers, that presumably once existed, out of retirement and have them clean up the major web sites?

    --
    Beta is broken and the link to classic doesn't work. Stop wasting our time or there won't be anybody left here.
    1. Re:About the hosting services failure at i18n by petrus4 · · Score: 1

      Can we pull the handful of competent web designers, that presumably once existed, out of retirement and have them clean up the major web sites?

      HTML as a language has become more complex, over the last few versions.

      To write it well, it is necessary, I feel, to go back to the earliest versions of it which current browsers will support; which I believe is 4 or so. Abstaining from DOM-oriented code, (

      , and such) greatly helps.

      There is enormous power in simplicity, but sadly, simplicity is not popular.

  56. Re:Login as root. Does any Linux distribution allo by smoker2 · · Score: 3, Insightful

    If you believe that, then this article is about you. There is NEVER any need for a direct root login.

    all disabling root login does is prevent the following:
    ssh -l root some.domain.com
    You can still login with
    ssh -l user some.domain.com
    and once connected you can su to gain root. The whole idea is to isolate root from the outside world, restricting root access to localhost only. Or are you happy with the world having direct access to the single most important account on the machine ?

  57. No, Really needs support in OpenSSH by omb · · Score: 1

    This attack prevalence _really_ needs support in sshd itself, we need an

    SshAttackDelay int

    so that SSH enforces a GLOBAL delay, int seconds (0==none) after accepting remote connections, before DH or PW/Key
    response, for int seconds after any failed login, root or otherwise.

    You can do this with IPtables, but you may have to enable additional kernel modules eg contrack; and its a kludge anyway.

    SshAttackDelay 5

    would ensure max 1 try ever 5 seconds and impede valid logins for a max 5 seconds; then good luck with fast, slow or other ssh attacks!

    1. Re:No, Really needs support in OpenSSH by Filip22012005 · · Score: 1

      Maybe I'm not getting it, but wouldn't that make DOS-attacks very easy?

      --
      When the policeman of the tie, rule you violate, hello punishment of the kitty?
  58. Wait a minute... by biglig2 · · Score: 1

    This is Slashdot, aren't all sysadmins fascist bastards who put needless restrictions in place for no good reason, that stop people do what they want to?

    --
    ~~~~~ BigLig2? You mean there's another one of me?
    1. Re:Wait a minute... by linzeal · · Score: 1

      No, that would be OpenBSD. Linux runs the gamut from sloppy to secure but completely batshit insane would be down the hall.

  59. Malware detection software for Linux? by david.given · · Score: 3, Interesting

    So how, exactly, does one know whether a Linux box has been compromised?

    Windows machines have an entire industry of antivirus software. We... don't. Dislike Windows as much as you like, but the mere fact that Windows is so insecure means that people are aware of it being insecure, and so the tools are available to deal with the problem.

    What does a Linux user do? I know of tools like chkrootkit and rkhunter, and run them, but I have no idea if they're any good. What's the recommended way of finding out whether you've been compromised? Waiting for SORBS to blacklist you probably isn't the best way...

    1. Re:Malware detection software for Linux? by Ant+P. · · Score: 1
    2. Re:Malware detection software for Linux? by lamapper · · Score: 1
      Great answer. Many do not want to think about this (time consuming) but in reality you do NOT KNOW if you are being compromised unless you monitor your upstream packets as well as downstream packets. Thus if a root kit gets put on any machine on your network; AND you do some baselines to see what your normal traffic looks like, you will immediately notice that something extra is there.

      Very few people monitor their outgoing packets for unusual activity. We all should, however it is time consuming.

      Even system admins at many large corporations are not allowed the time to effectively monitor their network, unless they are in a Security group designed for that specific purpose.

      Hey boss, I need to spend a couple of hours each day looking over are packet traffic checking for anything unusual. Yes this is in addition to the time I need to scan the server logs. Yea right, that would get approved, NOT.

      --
      Is your Internet Throttled? Install DD-Wrt, OpenWRT or Tomato to learn the truth! Google: 1Gbps/1Gbps: 5 Communities
  60. Re:my examples assume the attacker knows the schem by smallfries · · Score: 0, Troll

    Perhaps you are unusual in that you seem to be picking dictionary words uniformly at random, leading to an average complexity of half the search space. Sadly most people are not very good at picking random numbers and if you told them to use this method the probability is exactly one that they would choose fuckdonkey69...

    Joking aside, using John is very good advice. It actually sorts the search space to pick common layouts of dictionary words plus fillers first. If it can't find your password then it is pretty secure.

    --
    Slashdot: where don knuth is an idiot because he cant grasp the awesome power of php
  61. SSH Ports by Anonymous Coward · · Score: 0

    You can pick something non-standard below 1024. That cut down (but did not eliminate) the
    crap for us.

  62. uhhh no? by uepuejq · · Score: 1

    you don't urgently need to get anything together, right any time. this is a condescending load of bullshit.

  63. Impossible to detect, so forget it (not!) by Mathinker · · Score: 2, Informative

    Let me make the same mistake you made and state: In the same way that it is impossible to use system logs to detect a compromise, it is in general impossible to conclude that a system is compromised even given a full dump of its state (stopping problem).

    But we all know that that is not the case in reality/practicality, only a minuscule fraction of compromised systems would be compromised in such a careful way, leading us to believe that it is worthwhile to try to detect compromise.

    1. Re:Impossible to detect, so forget it (not!) by miro+f · · Score: 2, Informative

      I will add to this that any decently secured system will log all activities to an external machine through a logging service which does not allow for said machine to remove any logged events. That way two machines will need to be compromised to hide the fact.

      This also protects against your legit admins doing some dodgy work and then deleting the evidence.

      --
      being vague is almost as cool as doing that other thing...
  64. Re:If it's SSH it's really easy to rate limit atta by bobaferret · · Score: 1

    I personally like to reject with the wrong message, such as no route to host. Some statefull IPS systems that you might have in front of the firewall like to keep track of the connections, by issuing a drop, that IPS doesn't know the connection went away. If you're getting pounded, it can actually make the IPS start losing/refusing connections. This includes the legitimate traffic to your web-server. SonicWall works this way. So sending back a BS message lets the IPS know that the connection is bad, and that it should drop it. While at the same time confusing the attacker, that a particular hosts doesn't even exist. "you hope." If you don't have something like that to deal with, then I'm all about the DROP.

  65. SRV records by Anonymous Coward · · Score: 0

    You can get 99% of the port knocking benefit by simply running ssh on another port.

    Almost all ssh attacks are automated, and if you're not running something on port 22, you won't be attacked.

    So essentially you're left with people who are specifically targeting you, and portscan the system. Those are the sole people that port-knocking protects against.

    It's too bad that SRV records aren't more prevalent.

    Someone doing a random scan wouldn't get know the real port with scanning everything, while someone doing a normal 'ssh hostname' would get the correct settings automatically as part of the DNS look up.

    1. Re:SRV records by DavidTC · · Score: 1

      Wow, does ssh actually do that correctly? Cool.

      Does PuTTY? Probably not. If it does, that's probably 90% of ssh protocol users. Either PuTTY or the command line tools with it, or ssh or libssh in some manner.

      I had completely forgotten SRV records even existed. It is a shame they aren't used more often.

      Actually, what's a shame is that SRV records can't work like MX records too. Where you could say 'POP3 service for this domain is on this computer over here, on this port, with priority 10.'.

      --
      If corporations are people, aren't stockholders guilty of slavery?
  66. sloppy admin is an oxymoron by cinnamon+colbert · · Score: 1

    by definition, a well designed OS does not have sloppy admins, because the default is correct, and to deviate from the default and setup systems with bad security takes a lot of effort and know how.

    1. Re:sloppy admin is an oxymoron by magamiako1 · · Score: 1

      cinnamon:

      Short of extremely locked down specific embedded operating systems, you are going to find systems that need configuration. There is no such thing as "good defaults" because everyone's needs and uses vary accordingly.

      Both Linux and Windows have defaults that sort of leave the system vulnerable, with Linux the distributions vary as to what options are default and what aren't--but generally speaking no matter which system you go with you WILL have to go in and add further security tweaks to fit your needs.

    2. Re:sloppy admin is an oxymoron by cinnamon+colbert · · Score: 1

      yr being a little literal. the point is, if linux is half as great as it's touters claim, there wouldn't be a big problem with sloppy admins, cause it would be hard to do whatever the problem is in the original post.

      Further the idea that everyone is different and has diff needs is really a statement that computer systems are very primitive - to give an example, in the recent past, cars had a choke, which let you vary the air/fuel mixture according to local weather; now that is done automatically by the cars computer systems.
      An OS should really do security automatically; admins should not have to do awhole lot.

    3. Re:sloppy admin is an oxymoron by Dragonslicer · · Score: 1

      ...the default is correct, and to deviate from the default and setup systems with bad security takes 2 minutes on Google

      Fixed that for you.

  67. Re:If it's SSH it's really easy to rate limit atta by OneSmartFellow · · Score: 1

    I've never seen such attacks in the real world. On a particularly hard hit system (which I also have access to), I have never see more than a few hundred failed logins per day. At that rate our V34y_l0n6-9455w0rd is going to take hundreds (of thousands?) of years to brute force.

    Granted, we aren't Yahoo, Google, or Matt Drudge, but we get hit pretty good traffic.

  68. No default incoming telnet/ssh on Ubuntu by Jim+Efaw · · Score: 1

    I sometimes boot Ubuntu 8.10 and 9.04 from an SD card on an EeePC and leave it connected to the network for long periods (days) of time. I use the EeePC mainly for surfing. It's just the default Ubuntu. Being the only user, I have not set up any users or passwords. Does the the default configuration of Ubuntu allow telnet/ssh logins over the network?

    The short answer: You're probably safe. But to make sure, go into your package manager (probably Synaptic) and look for the package openssh-server. If it's there, remove it — you don't need it for the desktop unless you want to be able to get into the computer from somewhere else.

    Long answer: Telnet is definitely not a problem; nearly all Linux and BSD distributions stopped installing the telnet server by default years and years ago. As for SSH: if it's the "Live CD" version you're booting from the SD card, it won't have an SSH server either. (Because you claim to have no username/password, I suspect you're booting the Live CD from the chip. An installed Ubuntu prompts for username/password.) And I'm pretty sure Ubuntu doesn't install it on the desktop installs either. Maybe Server Edition does. But see the short answer above for the definite answer. openssh-client is OK to have — it's just openssh-server that allows incoming connections.

  69. Have a plan for after you are hacked. by Anonymous Coward · · Score: 0

    Every system on the internet **can** be hacked. Get over it.

    You need to have a recovery plan for **after** the hack occurs.
    Simple. Take snapshots every few hours. Take backups every day. Get the backups off-site. Test recovery to a different system. The simplest solution for non-matching hardware is virtualization - Xen, LVM, VMware all let you virtualize your hardware and drivers. This is nothing new folks. Don't use virtualization at your own peril.

    Some of the easiest things to do for security are not to use static passwords and use methods to prevent network access without authentication. RADIUS standards are cross platform and work with almost any hardware and vendor. Use it, know it, love it.

  70. Firewall by StormReaver · · Score: 1

    My security has been kept simple, but effective for my particular situation. My software firewall allows remote connections only from certain IP addresses, which minimizes my exposure. But on top of that, I require reasonable good passwords for the users I allow on my desktop systems.

    When I first got DSL over three years ago, I noticed a dictionary attack rate of about a thousand attempts per month. After I installed Firestarter, and configured it to disallow all SSH connections except those from particular IP addresses, the attacks came to a complete halt. I haven't had a single SSH attack show up in my logs since.

  71. Re:Login as root. Does any Linux distribution allo by jmccue · · Score: 1

    probably because that is the default for openssh, at least for version 5.1p1,
    of course that is no excuse :)
    one should change the defaults to suit their needs

    see sshd_config:

    # The strategy used for options in the default sshd_config shipped with
    # OpenSSH is to specify options with their default value where
    # possible, but leave them commented. Uncommented options change a
    # default value.
    .
    .
    .
    #PermitRootLogin yes

  72. Re:Login as root. Does any Linux distribution allo by lee1 · · Score: 1

    How does the world have direct access? They need a password or a private key. What about allowing root login, but requiring a private key, and disallowing login using a password? I'm considering that, and am wondering if there is a consensus about it.

  73. Re:Login as root. Does any Linux distribution allo by Anonymous Coward · · Score: 1, Insightful

    Really? How do you SCP system files in a hurry without root access? Assign everything to wheel?

  74. Root SSH Attacks by Shadyman · · Score: 1
    The easiest ways to avoid SSH bruteforce attacks on root:
    • Don't enable SSH
    • Remove root from the list of accounts you can ssh into (See Howto)
    • Disable the root account (passwd -l root) and ssh into a normal account and using sudo and/or sudo su as needed.
  75. Here is a nifty ip lister by mattr · · Score: 1

    more attackerstats.pl

    #!/usr/bin/perl

    # attackerstats.pl (c) 2009 by Matt Rosin / GPL 3.0 License
    # Usage: perl attackerstats.pl iplistfilename
    # will show how many times each attacker has attacked, given a list of ips

    # To get ips from vsftpd logs:
    # grep FAIL logs.vsftpd | perl -nle 's/^.+FAIL\sLOGIN:\sClient\s\"(\d+\.\d+\.\d+\.\d+)\"$/$1/g; print;'

    # To get ips from authd logs:
    # cat logs.authd | perl -nle 's/from\s(\d+\.\d+\.\d+\.\d+)\sport/$1/g; print $1;'cat attacks |perl -nle 's/from\s(\d+\.\d+\.\
    d+\.\d+)\sport/$1/g; print $1;'

    my $f = $ARGV[0];
    unless ($f) { print "Usage: perl attackerstats.pl iplistfilename\n" unless $f; exit 0; }
    my %h = ();

    open(IN,$f);

    while() {
      chomp;
      my $ip = $_;
      $ip =~ s/\s//g;
      $h{$ip}++;
      $lines++;
    }

    my @hk = keys %h;
    my $numattackers = $#hk + 1;
    print "Tallied $lines lines for $numattackers attackers.";

    my $sortblock = q( $hash{$b} $hash{$a} );
    use Tie::SortHash;
    tie %h, 'Tie::SortHash', \%h, $sortblock;

    print "\nSORTED ATTACKER IPS BY NUMBER OF ATTACKS\n";
    foreach my $k (keys %h) { print $k . "\t" . $h{$k} . "\n"; }

    print "\n\nDone.\n";

    1. Re:Here is a nifty ip lister by kokoko1 · · Score: 0

      Nice script.

      --
      http://askaralikhan.blogspot.com/
  76. Re:learn to....denyhosts by antdude · · Score: 1

    Mine:

    # head -n 1 /var/log/auth.log | grep '^...............' --only-matching; grep 'Failed password' /var/log/auth.log | grep ' [0-9.]*\.[0-9.]* ' --only-matching| sort | uniq -c
    Oct 4 06:47:04
                8 190.202.98.211
              16 88.87.196.105

    I block brute attackers after failing three times.

    --
    Ant(Dude) @ Quality Foraged Links (AQFL.net) & The Ant Farm (antfarm.ma.cx / antfarm.home.dhs.org).
  77. a question by viralMeme · · Score: 1

    How about limiting SSH access for a restricted set of IP address?

  78. ever tried to scp an important system file? by jotaeleemeese · · Score: 3, Informative

    Yes. I copy it with my regular, non privileged account and then change ownership and permission in the target machine as root.

    You don't need root for one of transfer of files.

    --
    IANAL but write like a drunk one.
  79. Use one time passwords. by jotaeleemeese · · Score: 1

    Either generated in advanced or with tokens (SecurID or similar).

    --
    IANAL but write like a drunk one.
    1. Re:Use one time passwords. by HeronBlademaster · · Score: 1

      Tokens work fine for large companies, but not for small one-man website hosting gigs that are losing money as is; OTPs also incur a rather large support overhead, which is something I'm trying to avoid.

      Besides which, there's no reason to go overboard. Strong passwords are "good enough" in my particular case. Not everyone needs the added security given by OTPs, tokens, login keys, and so on.

  80. The logs should not be on the server. by jotaeleemeese · · Score: 1

    Logs should go either or as well to a log server, whose only available service is syslogd and perhaps sshd.

    --
    IANAL but write like a drunk one.
  81. Re:Login as root. Does any Linux distribution allo by tayhimself · · Score: 1

    This is indeed a problem. Turning root off is quite a hassle but, it has made me a better sysadmin.
    Two ways around scp root problem is to either change the directory permissions or use rsync with which you can use sudo.

  82. Re:my examples assume the attacker knows the schem by Anonymous Coward · · Score: 0

    sudo su -

  83. Izzat a challenge? by Anonymous Coward · · Score: 1, Funny

    This fool littered highway, where is it exactly? I've been doing this crap near on 20 years now and I've never had root lost.

    Post your IP, then!

    PS: mine is 127.0.0.1, kiddies.

  84. pam_abl? by otis+wildflower · · Score: 1

    http://www.hexten.net/wiki/index.php/Pam_abl

    The pam_abl module monitors failed authentication attempts and automatically blacklists those hosts (and accounts) that are responsible for large numbers of failed attempts. Once a host is blacklisted it is guaranteed to fail authentication even if the correct credentials are provided.

    Blacklisting is triggered when the number of failed authentication attempts in a particular period of time exceeds a predefined limit. Hosts which stop attempting to authenticate will, after a period of time, be un-blacklisted.

  85. Re:Login as root. Does any Linux distribution allo by Anonymous Coward · · Score: 1, Insightful

    And since many people enable sudo for their account in order to make it easier to admin their boxes, this won't necessarily make their boxes any more secure:
    ssh -l user some.domain.com
    sudo su -
    They just use the same password from the user and they're root. Woops.

  86. Re:Login as root. Does any Linux distribution allo by xous · · Score: 2, Interesting

    You still haven't presented a convincing argument that permitting root to login is inherently insecure.

    I have several linux boxes that permit root login via keys and password. In six years none have been compromised.

    Nobody but me has access to root on these systems and it wills stay that way because I use and remember proper passwords.

  87. Re:Login as root. Does any Linux distribution allo by Victor_0x53h · · Score: 1

    You're correct for sudo (although there is a setting to require root password to use sudo). I've never seen su allowed without providing the password for the account you're trying to become. The exception is if you're already root, you can become anyone. Disabling remote root login is just another layer of defense. If the attacker can't use root, their job is just that much harder. He dictionary attack 100 root password guesses, or go through a list of 100 user names with just one password.

  88. Re: SSH over VPN, Fail2Ban, DenyHost and RBL's by xanobyte · · Score: 1

    I don't open SSH to the outside and only use it over an encrypted tunnel. Fail2ban and DenyHost are your friend layered with RBL's and snort. Works decent against web attacks too!