Slashdot Mirror


Hardening Linux

davidmwilliams writes "Out of the box, many Linux systems are insecure with open ports and unpatched vulnerabilities. Read about the essential steps to secure your server as well as how to solve them manually and via automated tools like Bastille."

204 comments

  1. FP by Anonymous Coward · · Score: 4, Funny

    yes but does it run my favorite rootkit?

    1. Re:FP by Anonymous Coward · · Score: 0

      do you want that with or without DRM sauce?

    2. Re:FP by SplatMan_DK · · Score: 1

      Not if your favorite rootkit is the Sony music CD rootkit. Sony have wisely decided to only annoy Windows users ... ;-)

      --
      My security clearance is so high I have to kill myself if I remember I have it...
    3. Re:FP by Anonymous Coward · · Score: 1, Funny

      Has anyone got the rootkit to work under Wine?

      I'm sick of Linux users being left out. I demand that companies like Sony & Microsoft release bad software for Linux too.

    4. Re:FP by SplatMan_DK · · Score: 1

      Maybe you should try using Parallels. It uses fare more resources but should get the job done for you ...

      And hey ... using 290 MB of memory to run a rootkit on a non-MS OS could be pretty cool ;-)

      - Jesper

      --
      My security clearance is so high I have to kill myself if I remember I have it...
  2. I'm not sure what this is doing on /. by Silver+Sloth · · Score: 1, Funny

    It's a pretty reasonable 'how to' of a basic sort but I would expect most of the /. crowd to be well bwond this level of competance.

    --
    init 11 - for when you need that edge.
    1. Re:I'm not sure what this is doing on /. by HoosierPeschke · · Score: 1

      Well, not everyone is good at everything. I'm always looking for new references of how to do things, either for myself or people I have been trying to convert to Linux. I typically take guides of this nature and make quick references or sticky notes to remind myself of all the checks to properly secure a box. For instance, I download every new Gentoo handbook and update my quick reference for that, which is only 3 pages long (install through config)!

      Slashdot comments (and sometimes articles) contain tons of references I have used to better my knowledge (verified through other sources of course).

      --
      Mr. Universe: "They can't stop the signal, Mal. They can never stop the signal."
    2. Re:I'm not sure what this is doing on /. by Anonymous Coward · · Score: 1, Funny

      "It's a pretty reasonable 'how to' of a basic sort but I would expect most of the /. crowd to be well bwond this level of competance" - by Silver Sloth (770927) on Sunday August 12, @10:33AM (#20202797)

      Apparently not!

      I say this, because I have challenged the *NIX crew here, 26 times now to be exact, here in these url's, to try the multiplatform benchmark of online security (by the CENTER FOR INTERNET SECURITY, noted by SANS + COMPUTERWORLD, no less, as legit/good etc.):

      http://it.slashdot.org/comments.pl?sid=240571&cid= 19630923
      http://slashdot.org/comments.pl?sid=240283&cid=196 31141
      http://linux.slashdot.org/comments.pl?sid=240501&c id=19630965
      http://it.slashdot.org/comments.pl?sid=241957&cid= 19662703
      http://it.slashdot.org/comments.pl?sid=241913&cid= 19662485
      http://bsd.slashdot.org/comments.pl?sid=238993&cid =19578849
      http://it.slashdot.org/comments.pl?sid=243071&cid= 19690705
      http://it.slashdot.org/comments.pl?sid=243071&cid= 19691091
      http://slashdot.org/comments.pl?sid=240283&cid=196 22485
      http://it.slashdot.org/comments.pl?sid=245695&cid= 19761821
      http://it.slashdot.org/comments.pl?sid=246115&cid= 19774211
      http://linux.slashdot.org/comments.pl?sid=246583&c id=19779437
      http://linux.slashdot.org/comments.pl?sid=252367&c id=19946243
      http://slashdot.org/comments.pl?sid=254685&cid=199 83339
      http://bsd.slashdot.org/comments.pl?sid=255743&cid =19996191
      http://bsd.slashdot.org/comments.pl?sid=255743&thr eshold=-1&commentsort=0&mode=thread&cid=19997047
      http://it.slashdot.org/comments.pl?sid=260975&thre shold=-1&commentsort=0&mode=thread&pid=20109099#20 114035
      http://it.slashdot.org/comments.pl?sid=260975&cid= 20109707
      http://linux.slashdot.org/comments.pl?sid=261525&t hreshold=-1&commentsort=0&mode=thread&cid=20138729
      http://slashdot.org/comments.pl?sid=264303

    3. Re:I'm not sure what this is doing on /. by Anonymous Coward · · Score: 0

      84.736/100 on Ubuntu. whoop de dooo.

    4. Re:I'm not sure what this is doing on /. by ozmanjusri · · Score: 3, Informative
      I'm always looking for new references of how to do things, either for myself or people I have been trying to convert to Linux.

      Don't read TFA then. The advice it gives is barely relevant to any distro released in the past decade.

      --
      "I've got more toys than Teruhisa Kitahara."
    5. Re:I'm not sure what this is doing on /. by Anonymous Coward · · Score: 0

      I've always wondered how hard it would be to get a Slashdot reader to download and install a root-kit on their Linux box. Thanks to you, now I know it's not hard at all.

    6. Re:I'm not sure what this is doing on /. by Anonymous Coward · · Score: 0

      It's a pretty reasonable 'how to' of a basic sort but I would expect most of the /. crowd to be well bwond this level of competance.

      Seeing as how they 99.999% of Slashdotters are still running under the delusion that teh Lunix is secure (especially compared to Windows Server 2003), your assumption is wildly (and unrealistically) optimistic.

      A good question might be that, if hardening a system is so simple and basic... why doesn't it just install that way? Yet another reason teh Lunix isn't ready for prime-time.
    7. Re:I'm not sure what this is doing on /. by Torvaun · · Score: 1

      I'm right there with you. Between /. and bash.org, I learned sudo, sed, grep, wget, and to never click a link without checking its target first.

      --
      I see your informative link, and raise you a pithy comment.
    8. Re:I'm not sure what this is doing on /. by jotok · · Score: 1

      Maybe they don't want to take your challenge because they can't parse your post.

      I mean, it just took me about 15 minutes.

      Just sayin'.

    9. Re:I'm not sure what this is doing on /. by RMH101 · · Score: 1

      ...and to never click a link without checking its target first.

      That was Goatse.cx

  3. ZZzzzz.... by Anonymous Coward · · Score: 0

    Apply a firewall to prevent access to potentially vulnerable services, using ipchains.

    Hello 2001 when we all switched to iptables. My gran could write a linux security primer like this by rehashing a couple of google articles.

  4. AppArmour by Shuntros · · Score: 3, Interesting

    I know people seem to find it all trendy to bash Novell these days, but AppArmour is a a pretty damn good tool for containing the behaviour of applications. Use a handy little utility to monitor your application (apache, bind, postfix, anything else..) being used in a controlled environment, then apply that ruleset at kernel level and if access isn't defined in the AppArmour profile, it ain't happening.

    1. Re:AppArmour by pembo13 · · Score: 1

      Not good as SELinux as far as I understand.

      --
      "Thanks for all the money you paid to us. We've used it to buy off ISO among other things" -Microsoft
    2. Re:AppArmour by Anonymous Coward · · Score: 0

      It's as good as you make it. It's a DAMN site easier to USE than SElinux!!
       
      My usual approach is SELINUX=0

    3. Re:AppArmour by josephdrivein · · Score: 1

      Does anybody use port knocking?
      It can't be used on ports used by common users (like 80 on a web server), but opening port 22 for admins knocking seems pretty neat...

      I have no experience about this.

  5. Isn't Linux already hard? by Ang31us · · Score: 0

    Does the OS need a fluffer?

  6. Should have used preview by Silver+Sloth · · Score: 1

    Those that are not 'bwond' this level of competance will be 'beyond' it. Sunday, bloody Sunday!

    --
    init 11 - for when you need that edge.
    1. Re:Should have used preview by Anonymous Coward · · Score: 0

      Those that are not 'bwond' this level of competance will be 'beyond' it. I don't think your spelling is quite up to that level of competence yet.
    2. Re:Should have used preview by Critical+Facilities · · Score: 1

      He's weawwy twying to spell cowwectly. Maybe if he were a bwunette instead of a bwond, his post would be mow weadable. It could be that he's tired fwom hunting wabbits though...

  7. Hmmmm by WizMaster · · Score: 1, Insightful

    Only skimmed the article but it seems to be pushing Bastille more then anything else. Don't know of any installer that automagically starts services unless you specify them yourself. I'm pretty sure there are far better security tutorials and introductions. Better yet, your distro probably has one specifically for it. This seems more like advertising then anything useful. I could be wrong though.

  8. How To in summary... by IBBoard · · Score: 5, Informative

    For those not wanting to read the article, that "basic how to" is:

    1) Disable unwanted services (done via the CLI in this day of GUIs)
    2) Keep the OS patched
    3) Install and run Bastille to do everything else for you.

    1. Re:How To in summary... by Anonymous Coward · · Score: 0

      And yet if someone writes an article like this on how to secure Windows (where lets face it the advice, aside from #3 is exactly the same) it's proof that Windows is insecure.

    2. Re:How To in summary... by Knuckles · · Score: 3, Insightful

      And yet if someone writes an article like this on how to secure Windows (where lets face it the advice, aside from #3 is exactly the same) it's proof that Windows is insecure.

      That's because the article fell through a hole in time, and actually belongs in 1997. They are already yelling to give their article back. No self-respecting consumer distro has shipped with open ports in ages.

      --
      "When I first heard Daydream Nation it quite frankly scared the living shit out of me." -- Matthew Stearns
    3. Re:How To in summary... by tomhudson · · Score: 5, Funny

      The summary is ... strange.

      "... many Linux systems are insecure with open ports" ... "...how to secure your server ..."

      Remember all those internet ads about "YOUR COMPUTER HAS OPEN PORTS !!!"

      Its a computer connected to "Teh Intarweb" - its supposed to have open ports.

      Next we'll read another story about how some "1337 hacker hacked into another person's machine" at IP address 127.0.0.1, erased all their files, and somehow, the "other person" was able to hack their machine and do the same thing ...

      Followed by a nostalgiac look at "Punch-the-monkey" ads.

    4. Re:How To in summary... by Anonymous Coward · · Score: 0, Informative

      It doesnt *have* to be done via CLI, gedit would accomplish the same task - graphically. Its just - proper computer techies ( you know, not those who need a wizard to admin things for them ) use a command line because its either faster, and/or scriptable for them to do so. Its also not taxing on bandwidth should you want to remote in and do something - unlike a graphical app.

    5. Re:How To in summary... by DrSkwid · · Score: 0, Troll

      My GUI has a command line.

      It's curses that keeps Lunix stuck in the dark ages.

      --
      There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
    6. Re:How To in summary... by Anonymous Coward · · Score: 0

      Go back to digg, clueless trolls or paid shrills are not welcome here.

    7. Re:How To in summary... by IBBoard · · Score: 1

      Yes, but GUIs also normally have applications to enable and disable services (which was my point). Their method is to hack in files from the command line or similar, while most distros should have an "easy to use" service management app. I know Redhat and Fedora have for ages.

    8. Re:How To in summary... by Knuckles · · Score: 1

      Its a computer connected to "Teh Intarweb" - its supposed to have open ports.

      Not if it just acts as a client, as most "consumer" machines do.

      --
      "When I first heard Daydream Nation it quite frankly scared the living shit out of me." -- Matthew Stearns
    9. Re:How To in summary... by DrSkwid · · Score: 1

      > Yes, but GUIs also normally have applications to enable and disable services (which was my point).

      ed or a text editor work for me.

      Clicking buttons is primitive.

      --
      There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
    10. Re:How To in summary... by Anonymous Coward · · Score: 0

      opening an outbound tcp connection creates an open port on the local machine. It won't accept incoming connections, though.

    11. Re:How To in summary... by Knuckles · · Score: 1

      opening an outbound tcp connection creates an open port on the local machine. It won't accept incoming connections, though.

      But ports that are only open in response to the user initiating a connection are not open "by default", are they. Plus, this is just the way things are, technically, and as such not usable as differentiating criteria, wouldn't you agree?

      --
      "When I first heard Daydream Nation it quite frankly scared the living shit out of me." -- Matthew Stearns
    12. Re:How To in summary... by Jessta · · Score: 4, Insightful

      I've alway found GUI tools to be slow and weird.
      gentoo has great service management /etc/init.d/ start /etc/init.d/ restart /etc/init.d/ stop

      GUI tools are seriously annoying, since this article is about security and disabling unneeded services having config tools that require the unneeded service X11 is pretty silly.

      --
      ...and that is all I have to say about that.
      http://jessta.id.au
    13. Re:How To in summary... by Anonymous Coward · · Score: 0

      I think by "Open ports", he means ones that do accept connections.

    14. Re:How To in summary... by DaleGlass · · Score: 1

      It doesn't seem to be very widely known, but at least on Linux, all of 127.0.0.0/8 is assigned to the loopback. So 127.85.31.97 would work just as well, in case you happen to find a script kiddie a bit smarter than average.

    15. Re:How To in summary... by PitaBred · · Score: 1

      It's the same on Windows... any script kiddie is vulnerable to this exploit... hope it doesn't get patched ;)

    16. Re:How To in summary... by tomhudson · · Score: 1

      >>Its a computer connected to "Teh Intarweb" - its supposed to have open ports.

      >>Not if it just acts as a client, as most "consumer" machines do.

      Nobody with a consumer machine uses a chat program? A file-sharing program? Heck, Window95 shipped with a web server (PWS), and thats about as "ghetto consumer box" as you can get.

    17. Re:How To in summary... by Knuckles · · Score: 1

      Nobody with a consumer machine uses a chat program? A file-sharing program? Heck, Window95 shipped with a web server (PWS), and thats about as "ghetto consumer box" as you can get.

      What part of "in the default configuration" do you not understand? OBVIOUSLY if you run a program that opens a port, you will have an open port. It is rather silly to demand that you can run chat clients and file sharing programs without opening ports.

      What the fact that Windows 95 was a braindead abomination has to do with the current discussion is beyond me.

      --
      "When I first heard Daydream Nation it quite frankly scared the living shit out of me." -- Matthew Stearns
    18. Re:How To in summary... by tomhudson · · Score: 1

      >OBVIOUSLY if you run a program that opens a port, you will have an open port. It is rather silly to demand that you can run chat clients and file sharing programs without opening ports.

      Which is why I said that the fact that a port is open is not, of itself, a problem. The summary of the article said "many Linux systems are insecure with open ports"; that a port is open or not is not, in itself, indicative of a security problem, and that it put me in mind of all those "Your computer is at risk because you have open ports, your IP is xx.yy.zz.bb" ads.

      As others have pointed out, the article seems to have been written with that era as the context (ipchains?!?)

    19. Re:How To in summary... by Gazzonyx · · Score: 1

      Yes, but GUIs also normally have applications to enable and disable services (which was my point). Their method is to hack in files from the command line or similar, while most distros should have an "easy to use" service management app. I know Redhat and Fedora have for ages. That has always bothered me (on RHEL, at least - Fedora is more desktop oriented than server oriented). They create these GUIs to do everything for you, which is a front end for their own interface to the flippin' etc files. I guess I just don't want to see RHEL admins become MSCEs, or it could be because my mind is warped since Slackware was my first distro. It could also be because I've lately been fighting with Solaris for control of my services (don't get me started). But I think any admin worth their salt should be able to work from a CLI. The idea that someone needs Gnome or an X app to configure a server boggles the mind if you consider that if X dies for any reason, unless they are comfortable with the CLI, they are effectively useless. I know that GUIs are nice for handling tasks that stink when you have to do them from the CLI, but again, iptables is relatively straight forward even from the CLI and it's probably a Good Idea to know how to take care of iptables via SSH. Just my $.02, YMMV.
      --

      If I mod you up, it doesn't necessarily mean I agree with what you've said, sorry.

    20. Re:How To in summary... by Knuckles · · Score: 1

      I agree, but having no daemons running when you don't need them is safer still. And yes, needlessly having something like sendmail running when there is no admin is useless risk.

      --
      "When I first heard Daydream Nation it quite frankly scared the living shit out of me." -- Matthew Stearns
    21. Re:How To in summary... by GPL+Apostate · · Score: 1

      Yes, but you know that monkeys need their buttons to click. I have a button right here, incidentally. It's created by a line in my ~/.fvwm/.fvwm2rc config file, and it fires off xterm -e vi /etc/rc.defaults when I click it. What could be simpler???

      --
      Microsoft says legacy (serial/parallel) ports are bad. They don't obfuscate the hardware enough.
    22. Re:How To in summary... by tomhudson · · Score: 1

      Most distros nowadays are pretty decent about not installing, never mind running, stuff "out of the box". This "article" is severely dated, back to the time when the only people who installed linux *wanted* all sorts of servers running.

      I'm from those "bad old days", and I've had to adapt, by not assuming that tools and utilities that I took for granted are still available in a near-default install. Even when I check "developer tools", I still have to go through the list to include those older, simpler parts of the toolchain that, for some reason, are too "simple" for todays' developers.

      Who ever thought that "tree" would be near-forgotten? What next, fgrep? :-)

    23. Re:How To in summary... by GPL+Apostate · · Score: 1

      I just ran nmap against my 'Doze 2000 machine here, which isn't a totally 'default' configuration, but pretty much just has the plain generic services running that Microsoft and 'Doze Update have decreed are the norm. I seldom if ever connect to the internet with that machine, and it's buried enough behind two NAT filters to be effectively firewalled.

      It says ports 135, 139, 445, and 1025 are open.

      Windows 95 was not a braindead abomination. It was and is a shiney kludge, that proves useful in all kinds of settings, even today. I program PICs with an old laptop running 95, and occasionally hack around with MASM for fun.

      The current 'doze kludges are far far worse. If they were 'braindead abominations' it would be a relief, to be frank.

      --
      Microsoft says legacy (serial/parallel) ports are bad. They don't obfuscate the hardware enough.
    24. Re:How To in summary... by Knuckles · · Score: 1

      I hear you, but of course it's still a sensible decision.

      Re the article: yeah, ipchains. And giving tips for securing telnetd. And missing apparmor and SELinux and grsecurity. And does anyone still run servers on a Pentium 1 and needs xinitd? It totally looks like random bits pasted together after googling for "linux, security". BTW, I left a comment at the site, basically summarizing the slashdot discussion (and linking back to it), and he blocked me :)

      --
      "When I first heard Daydream Nation it quite frankly scared the living shit out of me." -- Matthew Stearns
    25. Re:How To in summary... by Knuckles · · Score: 1

      Yeah well, using it on an old single-use laptop, fine. Putting it on the Internet though, or using it as a general-purpose multitasking OS was insanity.

      --
      "When I first heard Daydream Nation it quite frankly scared the living shit out of me." -- Matthew Stearns
    26. Re:How To in summary... by jgrahn · · Score: 1

      Even when I check "developer tools", I still have to go through the list to include those older, simpler parts of the toolchain that, for some reason, are too "simple" for todays' developers.

      Who ever thought that "tree" would be near-forgotten? What next, fgrep? :-)

      Tree is hardly a developer tool, is it? But yes, it's sometimes useful and I install it on all my machines.

    27. Re:How To in summary... by tkiesel · · Score: 1

      Next we'll read another story about how some "1337 hacker hacked into another person's machine" at IP address 127.0.0.1, erased all their files, and somehow, the "other person" was able to hack their machine and do the same thing ...

      For fun, don't forget that any (numerically valid) IP addy starting with 127. is going right back to localhost.

      Some script kiddies might be sly enough not to fall for 127.0.0.1 but go on ahead and try to take "you" out at 127.45.101.18 though.

    28. Re:How To in summary... by tomhudson · · Score: 1

      "BTW, I left a comment at the site, basically summarizing the slashdot discussion (and linking back to it), and he blocked me :)"

      Sounds like he's a real dickhead! (link is NSA - Not Safe Anywhere).

    29. Re:How To in summary... by tomhudson · · Score: 1

      I use tree a fair amount of the time - its really handy for grepping only parts of a source tree, for example, or for when I want to save a quick snapshot of a directory layout to a plain-text file, before making any serious mods that I may live to regret :-)

      Its also handy in shell scripts. I just like my older, simpler tools for some jobs.

    30. Re:How To in summary... by Too+Much+Noise · · Score: 1

      Its a computer connected to "Teh Intarweb" - its supposed to have open ports.

      Not if it just acts as a client, as most "consumer" machines do.

      Well, you need at least incoming udp:68, at least if you want it to receive the initial response from the DHCP server.

    31. Re:How To in summary... by Knuckles · · Score: 1

      Sure, but I indeed forgot it in this thread, I realized soon after a later one. Anyway, it's probably safe to assume that this is commonly (on slashdot) known and accepted.

      --
      "When I first heard Daydream Nation it quite frankly scared the living shit out of me." -- Matthew Stearns
    32. Re:How To in summary... by SLi · · Score: 1

      Remember all those internet ads about "YOUR COMPUTER HAS OPEN PORTS !!!"

      No, but I remember "Your computer is broadcasting an IP address!".

    33. Re:How To in summary... by garnetlion · · Score: 1

      Ahh Masm, how long had it been since I'd thought of you? Probably not long enough.

      I used Masm in a programming class. In 2005.

    34. Re:How To in summary... by ianare · · Score: 1

      You do realize ALL linux distros have this right? Anyway the gui tools are only acting as a frontend to init.d, and while I will agree X11 has no place on a running server, it does make the initial configuration easier for certain things. It's trivial to set the default runlevel to 3 once everything is set up properly.

    35. Re:How To in summary... by GPL+Apostate · · Score: 1

      Microsoft doesn't even seem to want anybody thinking about MASM any longer...

      --
      Microsoft says legacy (serial/parallel) ports are bad. They don't obfuscate the hardware enough.
    36. Re:How To in summary... by Conor+Turton · · Score: 0

      Go back to digg, clueless trolls or paid shrills are not welcome here. The truth hurts?
      --
      Conor "You're not married,you haven't got a girlfriend and you've never seen Star Trek? Good Lord!" - Patrick Stewart
    37. Re:How To in summary... by Zonk+(troll) · · Score: 1

      Most distros nowadays are pretty decent about not installing, never mind running, stuff "out of the box".

      One word: Ubuntu. Ubuntu doesn't install much out of the box, but it doesn't install a firewall. If you apt-get, say, apache2, it automatically starts it. That's not cool. The Fedora/RHEL/CentOS way is better. If you install something, it stays disabled until you configure it and enable it. They also default to installing a firewall, and also default to using SELinux.
      --
      "The Federal Reserve is a fraudulent system."--Lew Rockwell
      End The FED. -
    38. Re:How To in summary... by tomhudson · · Score: 1

      "If you apt-get, say, apache2, it automatically starts it. That's not cool."

      I would assume that if someone goes to the effort to install apache, they want to run it, and that's probably what Ubuntu does. Having said that, the experience of a coworker was different. He didn't want to run the OpenSUSE disk I had handy, so he borrowed an Ubuntu disk. Of course, that meant that the machine absolutely sucked for development. Missing servers, development tools, libraries, files ...

      Each distro has its good and bad points, depending on what you want to do with it. I always install almost everything on teh DVD, then go through services and turn on only those I want, turn off all the others, and I'm happy. Its only an exra 10 minutes, and a lot quicker than continually having to pause to install some file that was available in a previous release but got "dropped on the floor."

    39. Re:How To in summary... by Kjella · · Score: 1

      GUI tools are seriously annoying, since this article is about security and disabling unneeded services having config tools that require the unneeded service X11 is pretty silly.

      True, it's not necessary but in a sane setup X11 isn't a network service either. If you need to first compromise a running internet-facing service to get local privilidges and then use a local escalation exploit in X11, the bar is fairly high. If you prefer the GUI tools, I wouldn't worry too much over it as long as it's otherwise patched.

      --
      Live today, because you never know what tomorrow brings
    40. Re:How To in summary... by ZekeSpeak · · Score: 1

      You do realize ALL linux distros have this right? Anyway the gui tools are only acting as a frontend to init.d, and while I will agree X11 has no place on a running server, it does make the initial configuration easier for certain things. It's trivial to set the default runlevel to 3 once everything is set up properly. Do all linux distros use /sbin/runscript script interpreter to run its /etc/init.d system startup scripts? Do all linux distros use /etc/conf.d files to configure these services?
    41. Re:How To in summary... by Hathor's+Dad · · Score: 1

      ...Linux has a GUI now....? Its *like* a desktop???? .......*ducks* (FC7 Dual Head Gnome :-)

    42. Re:How To in summary... by Anonymous Coward · · Score: 0

      1) Disable unwanted services (done via the CLI in this day of GUIs)


      Reason #1 that people who use real OS's laugh at Linux. Followed by reason #2, copy and paste beyond basic text between applications.

      Reason #1 that people who use real OS's laugh at those who use Windows and think they are using a real OS. Followed by reason #2, pipe beyond basic 'more' between applications.
    43. Re:How To in summary... by Anonymous Coward · · Score: 0

      No.

  9. Ipchains? by Wonko+the+Sane · · Score: 1

    Apply a firewall to prevent access to potentially vulnerable services, using ipchains.
    Is that a misprint, or is Bastille still using ipchains? (Is that even possible in modern kernels?)
  10. Huh? by MMC+Monster · · Score: 0, Redundant

    I haven't read the article. Can someone please tell me what ports are left open on the default installations of some of the major Linux distributions? I'm running Ubuntu, and I was under the impression that the default installation doesn't leave any ports open.

    --
    Help! I'm a slashdot refugee.
    1. Re:Huh? by Ang31us · · Score: 1

      Install nmap and nmapfe, portscan your box, and you'll see what ports are open for yourself. Shutdown specific services, portscan again, and you'll see that the ports for those services are no longer open.

    2. Re:Huh? by Shuntros · · Score: 0

      Use nmap and scan yourself, that will tell you all you need to know. Alternatively you could use a command such as netstat -ltu or lsof -i TCP/UDP. The information is all there, readily available.

    3. Re:Huh? by Knuckles · · Score: 1

      Others told you to run nmap, which is always a good idea. But the Ubuntu default is "no open ports".

      --
      "When I first heard Daydream Nation it quite frankly scared the living shit out of me." -- Matthew Stearns
    4. Re:Huh? by Zocalo · · Score: 5, Informative
      As root, run the following command:

      netstat -plutn
      That will list all the listening services on a Linux box, complete with the program/PID that is associated with it. It's faster than just running something like NMAP, plus it will identify whether a program is binding to a specific external IP, a loopback IP and so on, not all of which an external port scanner is going to be able to report on.
      --
      UNIX? They're not even circumcised! Savages!
    5. Re:Huh? by jnelson4765 · · Score: 1
      Well, here's the list from my just-about-stock Ubuntu install:

      root@david:~# lsof -i -P
      COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
      avahi-dae 6785 avahi 13u IPv4 23031 UDP *:5353
      avahi-dae 6785 avahi 14u IPv4 23032 UDP *:32769
      hpiod 6910 root 0u IPv4 23326 TCP localhost:2208 (LISTEN)
      dhclient 6914 dhcp 6u IPv4 23579 UDP *:68
      python 6921 hplip 4u IPv4 23358 TCP localhost:2207 (LISTEN)
      cupsd 11487 cupsys 1u IPv4 699709 TCP localhost:631 (LISTEN)
      I don't have samba set up on it yet, though - that would add a few ports.

      OTOH, I have a hardened Slackware box running as a syslog server, and this is what is running:

      # lsof -i -P
      COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
      sshd 587 root 3u IPv4 6356917 TCP *:22 (LISTEN)
      syslogd 2144 root 1u IPv4 5073749 UDP *:514
      munin-nod 11745 root 5u IPv4 19380 TCP *:4949 (LISTEN)
      It also has a firewall set up on both the local machine and the router to block access to those ports that are open to just those IPs that need to get to it.

      I don't use Bastille - I'll read through it, and decide what of its recommendations I need to implement, but I don't blindly follow anyone's advice about security.

      P. S. - sorry about the formatting - it would be nice to have the <pre> tag available...

      --
      Why can't I mod "-1 Idiot"?
    6. Re:Huh? by Knuckles · · Score: 1

      Note that beside avahi (which I have forgotten in previous post when I said "no open ports") and dhcp (which has be open if casual users shall have a chance to connect to their ISP in the first place), all those services in Ubuntu just listen to localhost.

      --
      "When I first heard Daydream Nation it quite frankly scared the living shit out of me." -- Matthew Stearns
    7. Re:Huh? by toppavak · · Score: 1

      I was under the impression that ports are only "open" if an application is actively listening on that port.

    8. Re:Huh? by drspliff · · Score: 3, Funny

      and "netstat -putin" secretly terminates all applications and pretends there's no open ports?

    9. Re:Huh? by normuser · · Score: 1

      I was under the impression that ports are only "open" if an application is actively listening on that port.

      Yes that's correct. But there is a few different states the port could be in. it could be "closed" so that all connection requests are silently droped. it could "open" so that connections are not silently droped but still "closed" because nothing is listening for a connection (this will give a warning from most port scanners). It could also be "open" where the connection is not refused and an application is listening.

      I hope that helps, and wasnt too confusing.
      --
      09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
      XXX#######
    10. Re:Huh? by Anonymous Coward · · Score: 0

      i entered:
      netstat -pluto
      and ended up with "Pluto has left the building" o_O

  11. In Soviet Russia by Anonymous Coward · · Score: 2, Funny

    Linux hardens You

    1. Re:In Soviet Russia by aquabat · · Score: 1

      beat me to it.

      --
      A republic cannot succeed till it contains a certain body of men imbued with the principles of justice and honour.
  12. Open Ports? by CastrTroy · · Score: 1

    I know that Mandriva tells you if you have any services installed that have open ports (SSH,Samba) when you do the install. There are some necessary open ports for most users, like samba. Having open ports doesn't have to be a bad thing, although I will agree that having them open without any reason is not a good idea. However, as long as you keep on top of the updates (very easy with Mandriva and most other distros), you shouldn't have too much to worry about.

    --

    Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
  13. Per-distro comparisons? by delire · · Score: 4, Interesting

    In this regard I'm very impressed with the work the Ubuntu developers have done: a netstat -tupa post-install reveals a very small attack-surface where ports are concerned. That said, it would certainly be interesting to see a per-distro comparison at some point.

    Anyone know of such a project - even if just comparing a few top-tier distributions?

    1. Re:Per-distro comparisons? by DrXym · · Score: 3, Insightful

      I think a dist security roundup would be an awesome thing. Do a default install of Mandrive, RedHat, Ubuntu etc. and then run nmap, examine their password policy, see what "dangerous" apps are installed by default and so on. Dists should be named and shamed if they have a single port open.

    2. Re:Per-distro comparisons? by Quenyar · · Score: 1

      My ubuntu box was so secure, apparently, that when I went to the original article referred to from slashdot, Firefox closed pre-emptorily and I was never able to read the article.

  14. Hardened Linux From Scratch by owlman17 · · Score: 2, Interesting

    This is mainly for those who roll their own using LFS, but Hardened Linux From Scratch should give some tips, and practical advice, which critical areas need patching, plus proper practices.

  15. Dude, that article sucked. by khasim · · Score: 4, Insightful

    Did you see where it mentioned nmap? No? Because it didn't. Wouldn't you expect it to tell you to run nmap from a different machine to you can what your outside profile looks like?

    It reads more like someone who's just discovered Bastille and now considers himself "informed" on "security issues".

    Step #1. Limit the avenues of attack. This is where you'd use nmap.

    Step #2. Remove anything you don't absolutely need. Come on, most people out there will be running some distribution now. At least he could have covered dpkg, rpm, etc.

    What's this with the "Enter kill -9 xxx where xxx is the PID."? How about just /etc/init.d/service_name stop? Just use the package manager to remove it.

    And editing xinetd.conf / inetd.conf? Again, just use the package manager to remove it.

    And he doesn't even go into how each distribution handles package updates? What the fuck? Nothing about "apt-get update"? No "apt-get upgrade"?

    No, this article is about someone's discovery of Bastille and how it helps an old, stock installation of Red Hat.

    1. Re:Dude, that article sucked. by bigredgiant1 · · Score: 1

      Did you see where it mentioned nmap? No? Because it didn't. Wouldn't you expect it to tell you to run nmap from a different machine to you can what your outside profile looks like? Actually, you can run nmap from the local machine, as long as you target an IP of the machine that is accessible via the network (often 0.0.0.0, 192.x.x.x, 10.x.x.x, or an internet IP,) it will give you the same list of open ports as if you were running it from a different machine. It is often useful to run it locally, anyway, so that you can compare the output of `nmap localhost` and `nmap 0.0.0.0`, as often a machine will have services running that are only accessible locally.
      --
      Vic
    2. Re:Dude, that article sucked. by Wonko+the+Sane · · Score: 1

      Do people really still use xinetd? I understand how on the 486 with 8 MB of ram you couldn't afford to keep all you services running all the time, but now?

      In my mind this is just like the mbox vs. maildir arguement. It took about 10 years after MFM drives stopped being used until everyone realized that mbox wasn't faster anymore.

    3. Re:Dude, that article sucked. by maxwell+demon · · Score: 1

      What's this with the "Enter kill -9 xxx where xxx is the PID."? How about just /etc/init.d/service_name stop? Just use the package manager to remove it.

      Moreover, even if you for whatever reason use kill, you surely won't kill -9, unless things are really fucked up. It is a last-resort matter which doesn't allow an application to do any cleanup, and should only be used if nothing else helps. Never send a SIGKILL without first trying SIGTERM, unless you have very good reasons to do so (I admit I cannot think of such reasons, but then, maybe that's just my limited imagination).

      Indeed, for normal processes, if normal SIGTERM doesn't help, it's a good idea to try SIGINT and SIGHUP before resorting to SIGKILL. Most often this way you can avoid to hard-kill it. Of course server processes are not killed by SIGHUP (I'm not sure about SIGINT), so you would not try that one on a server to kill.
      --
      The Tao of math: The numbers you can count are not the real numbers.
    4. Re:Dude, that article sucked. by TheRaven64 · · Score: 2, Informative
      Running inetd (and xinietd, for those who love breaking backwards compatibility for little gain) is not just about not running services all the time, it's also about:
      • Simplifying development of TCP services by allowing them to communicate via stdio.
      • Automatically forking instances of the service for each client.
      UNIX is all about small programs doing one thing, and doing it well. Something like inetd does a few things that are needed by pretty much all server-type programs, and separating them out makes the remaining code simpler, which reduces bugs (and, hence, security holes), as well as overheads.
      --
      I am TheRaven on Soylent News
    5. Re:Dude, that article sucked. by Wonko+the+Sane · · Score: 1

      It seems like you could do just as well with a shared library.

  16. Open ports and unpatched vulnerabilities? by Knuckles · · Score: 1

    If your Linux distro is out-of-the-box "insecure with open ports and unpatched vulnerabilities", then change distro. If this is not an option, it's time to approach your vendor menacingly, clue bat in hand.

    --
    "When I first heard Daydream Nation it quite frankly scared the living shit out of me." -- Matthew Stearns
    1. Re:Open ports and unpatched vulnerabilities? by Nasarius · · Score: 2

      Seriously. As someone else mentioned, this article has been outdated for about a decade. Good installers will pull in all the latest stable versions (assuming a net connection), but any popular Linux distro is trivial to update immediately after. And I can't recall the last time I've seen a default workstation/desktop install with any open ports. Maybe SSH.

      --
      LOAD "SIG",8,1
    2. Re:Open ports and unpatched vulnerabilities? by Anonymous Coward · · Score: 0

      Your mom has allllll of her ports open by default.

  17. Article not very informative by Anonymous Coward · · Score: 5, Informative

    The article isn't very informative and makes several assumptions about the distribution being used. For example, when it tells the reader to "ps aux|grep http" and then "kill -9 [the pid]" it doesn't take into account that Debian systems are running Apache2 as 'apache2', not 'httpd'. Why you would SIGKILL the running process instead of just using apachectl or the appropriate init script is also just as short-sighted.

    Run 'netstat -apvtu' if you're worried about what you have open. A good ingress/egress firewall policy is ideal and any competent Linux user should be forced to learn iptables instead of relying on a GUI or automated configuration tool to make assumptions about the purposes of your network.

    The article isn't very useful or accurate.

    1. Re:Article not very informative by jgrahn · · Score: 1

      The article isn't very informative and makes several assumptions about the distribution being used. For example, when it tells the reader to "ps aux|grep http" and then "kill -9 [the pid]" it doesn't take into account that Debian systems are running Apache2 as 'apache2', not 'httpd'. Why you would SIGKILL the running process instead of just using apachectl or the appropriate init script is also just as short-sighted.

      It triggers me on two other points too:

      • ps + grep + kill is so 1990s. pkill from Solaris via procps is the right tool if you really need to do this.
      • Sending SIGKILL to a process is rude. If the process doesn't die from SIGTERM, chances are that you should think again, not reach for the SIGKILL Wand of Death ...

      But I have the feeling we have all been trolled.

    2. Re:Article not very informative by Anonymous Coward · · Score: 0

      Not the author's fault the Debian maintainers choose to rename applications from standard conventions.

  18. Re:Lots of linux stories on the front page by deftcoder · · Score: 1

    You DO realize what website you're on, right?

    Seriously.

    --
    Peace sells, but who's buying?
  19. Re:Lots of linux stories on the front page by m.ducharme · · Score: 1

    Are you new?

    --
    Rule of Slashdot #0: You and people like you are not representative of the larger population. - A.C.
  20. Re:Lots of linux stories on the front page by WizMaster · · Score: 0

    I think it was a joke. If not, I can't help but grin.

  21. Re:Lots of linux stories on the front page by Knuckles · · Score: 1

    Um, I see you have a 20-digit UID or something, but how can you be surprised that /. is generally pro-FOSS, pro-Linux???

    --
    "When I first heard Daydream Nation it quite frankly scared the living shit out of me." -- Matthew Stearns
  22. A default Ubuntu box has them all closed. by khasim · · Score: 3, Informative

    I'm running Ubuntu, and I was under the impression that the default installation doesn't leave any ports open.

    That is correct. By default, they are all closed.

    But you may have changed that. If you've installed any P2P or such apps, you may have open ports from that.

    As the other poster suggested, use nmap to determine what your outward profile looks like. Even better, have a friend scan your address from their location. That will tell you what your machine looks like from the Internet.

    xxxxxx@xxxxxxx:~$ sudo nmap -p0-65535 10.31.198.130

    Starting Nmap 4.20 ( http://insecure.org/ ) at 2007-08-12 07:54 PDT
    All 65536 scanned ports on 10.31.198.130 are closed
    MAC Address: 00:11:D8:E1:9F:A9 (Asustek Computer)

    Nmap finished: 1 IP address (1 host up) scanned in 16.486 seconds

    That's without a firewall.
    1. Re:A default Ubuntu box has them all closed. by Anonymous Coward · · Score: 0
      this will scan all ports and give verbose output (best for doing a complete portscan):

      nmap -vv -p- ip_address
  23. Box? by wytcld · · Score: 4, Insightful

    Out of the box, many Linux systems are insecure with open ports and unpatched vulnerabilities.
    That box must have a lot of dust on it, and an early 13-floppy Slackware distro inside.

    Before making a claim like that, the writer should come up with at least three examples, from current versions of major distros.

    Reminds me of a local woman who said "We must have a town-wide neighborhood watch, because there's a child sexual predator on every block." In the several years since she raised that hysteria, there's been exactly one serious case in town: one of her best friends had his extensive child porn collection found by the police. He hired the state's most expensive lawyers and got off with probation. She's still his best friend.

    Back to the topic. The article mentions telnet. Is there a single current distro that comes with telnetd enabled? Let's help the sloppy author. Has anyone here installed any current distro and found "open ports and unpatched vulnerabilities"?
    --
    "with their freedom lost all virtue lose" - Milton
    1. Re:Box? by eneville · · Score: 1

      ... OpenBSD has zero services in the default install. I'm not sure about ubuntu, or debain, but I'm pretty sure they dont even come with SSHd

    2. Re:Box? by nacturation · · Score: 1

      ... OpenBSD has zero services in the default install. I'm not sure about ubuntu, or debain, but I'm pretty sure they dont even come with SSHd That's not correct. Of course it has services open in the default install -- otherwise why do you think they claim only 2 remote exploits in 10 years? A remote exploit wouldn't be possible without at least one service running.
      --
      Want to improve your Karma? Instead of "Post Anonymously", try the "Post Humously" option.
    3. Re:Box? by adamofgreyskull · · Score: 1

      Only 2 people in those 10 years have worked out how to enable httpd?

    4. Re:Box? by GPL+Apostate · · Score: 1

      As late as Slackware 2.3 there were some 'interesting' security issues with how the distro was rolled out. The installer for Slackware 2.3 still didn't require or even nag the user to establish a root password.

      I found this out the fun way when a friend of mine who had been running her new slack install for several weeks sent me an email. I looked at the IP address on the email header (she was on dialup) and decided on a lark to try telneting into her box. No root password! I was logged on as root. I quickly made myself an account on her system, logged onto that, and paged her through it. She was a little mortified that she'd been online, lingering in her usual chat rooms, etc. on a Linux box with a null root password.

      Them were the fun days, though, actually. It was easy to throw Linux or NetBSD on a bunch of boxes with castoff ethernet cards (thin-net) and learn TCP/IP on your own set of boxes. Everything was hanging open so you could easily figure out how to telnet around, bring up X apps across the net, establish NFS shares, throw up Samba, etc. It's all tight as a sphinchter these days, but then so many people immediately face the Internet immediately on new installs these days, plus Linux is well known enough now that even undesirables like the script kiddies are crawling around.

      --
      Microsoft says legacy (serial/parallel) ports are bad. They don't obfuscate the hardware enough.
    5. Re:Box? by GPL+Apostate · · Score: 1

      It isn't the default install if you've enabled httpd.

      But why would you use OpenBSD as a web server?

      --
      Microsoft says legacy (serial/parallel) ports are bad. They don't obfuscate the hardware enough.
  24. Re:Lots of linux stories on the front page by Anonymous Coward · · Score: 0

    Dear Jalwin, Slashdot ID one billion. You said: "I just don't care." Yes. Do you somehow think that your opinion matters at all? :D

  25. Re:Lots of linux stories on the front page by Jalwin · · Score: 1

    I am fully aware that they are pro both those things, but this level of stories when there is such a wide range covered seems excessive. Not to mention most of the stories are almost worthless even for people who like linux.

  26. Hardened? Hardly. by slummy · · Score: 4, Informative

    This article makes no mention of grsecurity. Surely closing off unused services and patching vulnerabilities can certainly prevent a penetration, but what happens if a penetration is successful? grsecurity is the answer.

  27. Re:Lots of linux stories on the front page by Knuckles · · Score: 1

    Well, I think for many (most?) people, it's one of the reasons to be here. The quality of the stories is another matter ...

    --
    "When I first heard Daydream Nation it quite frankly scared the living shit out of me." -- Matthew Stearns
  28. Re:Lots of linux stories on the front page by tomhudson · · Score: 1

    Well, if you're looking for something that's "not linux", you can always enter this contest - there are already a few entries that cover "open ports" that have nothing to do with linux - and one (# 12) that really nails "hardening" pretty good.

    "The purpose of this post is to see the reasoning behind so many linux fluff stories making front page "

    Its Sunday, this is slashdot, not PC Magazine, CmdrTaco is stuck reviewing submissions over dialup, and the big news of the MONTH was SCO getting kicked in the nuts. - but at least they got more than the $20 that guy got. Hopefully one or two will also get prison, but I'm not holding my breath.

    Maybe they can turn the whole SCO fiasco into a tv show, like this kicked in the nuts video, but in reverse - have Darl wear the orange clown wig and PAY people $699 each to kick him.

  29. Re:Lots of linux stories on the front page by SplatMan_DK · · Score: 2, Insightful

    There is more to being an IT Geek than pushing Linux to the world.

    There are other kinds of FOSS products than Linux btw - so why is Linux the only one to get 30% of the index page?

    Allthough I like and use Linux, I think the point is valid.

    - Jesper

    --
    My security clearance is so high I have to kill myself if I remember I have it...
  30. Re:Lots of linux stories on the front page by Falstius · · Score: 1

    You can't complain about most of the Linux stories being worthless, when some many Slashdot stories in general are worthless. Welcome to the new vaporware, wonder drug, laws-of-physics breaking device, imaginary problem, or developer bickering of the hour. One doesn't read Slashdot for the quality of the stories, but to avoid doing other things.

  31. oblig by Anonymous Coward · · Score: 0

    I, for one, welcome our archaic security overlords!

  32. So what - we are all NAT'ed anyway? by SplatMan_DK · · Score: 1

    I bet that 99% of Linux users are behind a NAT router (because as IT geeks they have tons of networked gear and a private network). The remaining 1% with a public IP directly on their Linux box probably know what they are doing. And don't give me the "what if there is port forwarding rules on the router" argument. If the user has port forwarding rules then he/she also knowledgeable enough to secure the target Linux box. I know a lot of IT geeks (being one myself) and I seriously don't know ANY IT geek who is not using a NAT router for their local machines. The few that do have a machine on a public IP (hobby mail servers, game servers, etc) already know what they are doing and don't need an article about open ports on a default-installed Linux box. - Jesper

    --
    My security clearance is so high I have to kill myself if I remember I have it...
    1. Re:So what - we are all NAT'ed anyway? by marcello_dl · · Score: 1

      My laptop is the NAT router, you insensitive clod! :)

      --
      ---- MISSING MISCELLANEOUS DATA SEGMENT --- [sigdash] trolololol
    2. Re:So what - we are all NAT'ed anyway? by kayditty · · Score: 0, Troll

      Why are you talking about anything? You just said "NAT router." That's the worst 'oxymoron' I've ever seen.

      This article and the people commenting in it, myself excluded, are possibly the most retarded and unqualified people to comment on a Linux / general computing story ever.

    3. Re:So what - we are all NAT'ed anyway? by SplatMan_DK · · Score: 1

      Fine. I will rephrase myself: "a NAT capable router". There.

      My router has a lot of configuration options which are not NAT. In fact there are lots of uses for routers than don't use NAT schemes. There are also many ways to use NAT without the network device actually being a physical box we usually call a "router".

      What is your point? If everybody except you is retarded, then why don't you enlighten us?

      - Jesper

      --
      My security clearance is so high I have to kill myself if I remember I have it...
    4. Re:So what - we are all NAT'ed anyway? by kayditty · · Score: 0

      My router has a lot of configuration options which are not NAT. In fact there are lots of uses for routers than don't use NAT schemes. There are also many ways to use NAT without the network device actually being a physical box we usually call a "router".
      Uh.. I know that, which is why I said what I did. NAT is the opposite of routing, in case you hadn't noticed. Perhaps you should take a networking course, or something like that.

      In NAT, the gateway device rewrites the source IP address of all packets to some predetermined value (perhaps that of its external interface's address). In routing, it does not rewrite anything at all. In routing, it advertises its network to a neighbor, and, ideally, that neighbor has advertised some larger superset of a prefix to the greater internet before this occurs, so packets destined toward the host machine will traverse through the hypothetical router of which we are speaking. In this case, then, any host machine behind the router is capable of manipulate the bits of the node part of the IP address. This is not the case in NAT.

      NAT, for the most part, is a masquerading exercise -- the opposite of a routed network.

      What is your point? If everybody except you is retarded, then why don't you enlighten us?
      Uh.. Because Slashdot is a horrible forum for discussion?
  33. Re:Lots of linux stories on the front page by Bombula · · Score: 1

    If there's a bigger - and by bigger I mean more populated - Linux fanboy forum than slashdot, I'm not aware of it. All in all, I think it's probably a good thing though.

    --
    A-Bomb
  34. Since the submitter is also the author... by kwabbles · · Score: 4, Funny

    Can you tell us the story about how you came to write this article?

    Here's how I'm picturing it:

    (editor) Mr. Williams, we need a techie article on Linux.
    (mr. williams) Okay... I haven't touched linux since I played around with my RedHat 7.2 box 3 years ago.
    (editor) Do you still have it?
    (mr. williams) Yes, what would you like me to write about it?
    (editor) Write something up on securing its "holes and vulnerabilities", and we'll sensationalize it a bit by making it look like Linux is insecure out of the box.
    (mr. williams) I don't know how to do that.
    (editor) Find something on google. Try it on your RedHat machine.
    (mr. williams) I'm going to look really stupid.
    (editor) You're a journalist.

    --
    Just disrupt the deflector shield with a tachyon burst.
  35. Re:Hardened? Hardly. by Anonymous Coward · · Score: 1, Funny

    what happens if a penetration is successful?

    Pregnancy, in most cases. But in your case, it's probably just a gutteral moan as Inmate 266497 mounts you from behind.

  36. The defaults are no longer what they were in 199x by bl8n8r · · Score: 4, Informative

    Seems to me the article is just pimping bastille Linux. Years and years ago, most distros did indeed ship with some pretty crack-worthy options enabled by default. It took a small amount of prodding by the community, but most distros, these days, lean towards a default disable policy:

    - [KU]buntu
        All services off by default. netfilter rules are default allow however, but there is
        nothing to connect to.

    - Fedora/RHEL/CentOS
        Choose during install what services you want enabled/open/firewalled.
        SELinux enabled by default.

    - Knoppix 5.1.1
        Only Port 68 for dhcp client listener. /etc/hosts.deny ALL:PARANOID

    - Mandriva 2007 Bootable CD
        Port 6000 is all that's open (X server. Ok this is dumb, why?)

    Other distros follow similar suit. You can find out what's running on your linux box with:
      - netstat -tuna (all tcp/udp sockets, dont resolve names, all listening/non-listening sockets)
      - locate iptables; sudo iptables -nvL (show iptables chains for netfilter)

    Chances are, if you've not mucked around with the default services things are pretty tight.
    TFA is a bit inaccurate for linux systems these days.

    --
    boycott slashdot February 10th - 17th check out: altSlashdot.org
  37. That's a good point. Thanks. by khasim · · Score: 4, Interesting

    It is often useful to run it locally, anyway, so that you can compare the output of `nmap localhost` and `nmap 0.0.0.0`, as often a machine will have services running that are only accessible locally.

    Yep. That's why I prefer hitting it from a different machine. Multiple machines if possible. One on the same LAN segment and one from somewhere on the Internet.

    That way you'll see what a would-be-attacker will see.

    Sure, I might be running SMTP on port 25, but bound to 127.0.0.1 instead of eth0. An attacker would have to FIRST gain access to my machine through some other means to be able to attack my SMTP service.

    Sure, that first hurdle might be set very, Very, VERY, VERY high, but if someone can get over it ... that's why patching is still important. But that's also why patching cannot be your only "defense". You will not know what vulnerabilities the bad guys have found that are not patched yet. Defense in depth.

    And that's what "security" is all about to me. It's the PROCESS of evaluating threats and reducing their effectiveness.
    1. Re:That's a good point. Thanks. by bigredgiant1 · · Score: 1

      I think you missed my point -- you can see what an attacker would see from the local machine, by nmapping the network IP. Going to a different machine is superfluous.

      --
      Vic
    2. Re:That's a good point. Thanks. by Blkdeath · · Score: 1

      I think you missed my point -- you can see what an attacker would see from the local machine, by nmapping the network IP. Going to a different machine is superfluous.

      If I scan my network-facing IP address, whether I do so from another machine on my LAN or from my server itself, the scan will not traverse to my ISP and back again through my modem. It will be recognized as a connection to a local address and head to that interface directly but traffic will be understood to come from a safe(r), local source.

      For true, proper scan results you should scan from a remote source across the Internet when verifying your security setup. Put simply there are too many variables to account for to ensure proper results by merely scanning your outward facing IP address from localhost.

      Naturally, you should be running utilities like netstat in the first place to determine exactly what is open, talking or waiting on each of your interfaces before you start traversing the Internet but as an added measure of security you should step outside of your own front door to test the deadbolts.

      --
      BD Phone Home!

      Shameless plug. Like you weren't expecting it.

  38. mnb Re:Lots of linux stories on the front page by Anonymous Coward · · Score: 0

    Why is it, since registering an account at Slashdot, a half of your posts have been complaints about Slashdot?
    100% of your posts have been anti-status quo. While this is not evidence in itself of trolling (lord knows there is value in all opinions) some of your blanket statements and emotional rhetoric do leave the question open.

  39. newbie article by NynexNinja · · Score: 2, Interesting

    The obvious problem with this article is they mention using "Bastille" and forget to mention grsec. I don't really care about Bastille, but I do care about using grsec. Just because you turn off some services doesnt mean someone is not going to pop an xterm off your apache web server from some random cgi vulnerability... At least when someone compromises your web server in this way (which is probably how most linux web servers get compromised these days anyway), the attacker wont be able to do anything besides navigate the directory tree maybe. The attacker wont be able to view processes that are outside their own uid. The attacker wont be able to execute binaries outside of the standard bin directories (so custom scripts/binaries wont execute), and stack overflows do not allow execution of arbitrary code.. Its not a very fun environment to work in, most attackers will just look around and exit when confined to this type of environment...

  40. What the article should have mentioned by cumin · · Score: 1

    I was disappointed in the article as well. I expected more security in general and less distro/package specific advice.

    I know enough about security to know I'm no expert but here are some of my personal tips:

    • Install a hardened distribution instead of hardening one yourself if you have the option. Gentoo Hardened, Annvix and Trustix spring to mind. All are designed to be secure from the outset. For that matter, OpenBSD is a good option for a hardened server if you're not bent on using Linux. See: http://www.linuxlinks.com/Distributions/Secure/
    • Don't install anything you don't need. Default installs from major distros include a lot of stuff you probably don't need. If you're setting up a server that needs to be secure, then doing a custom installation with only the minimum you need installed is probably far better than trying to go back later and pick and choose what you remove. A minimal RHEL install for example comes in at around 700MB. Annvix is around 300MB and it's been a while since I used Trustix, but I'm sure it was under 1G and I think it was under 500MB.
    • Worry more about what is running than closing ports. Yes, a good firewall configuration is wise, but the main issue should be making sure that your system is doing only what you want which will result in only the ports you intend to be open being open. I haven't used Ubuntu in a bit, but I recall being surprised that it didn't firewall by default and instead relied on not having any listening services by default.
    • Really use a good package manager. If you install software without it then it makes auditing your server much more difficult.
    • I'd like to see more done with WORM media. If you have a small server install you can probably back the entire thing up to a single CD and put an md5 (or sha or both) on it. Then you can reinstall it at the drop of a hat and just do updates when it is re-applied.
    • If you are using a distro that supports it (like RHEL) then learn a little about SELinux. It does tremendous things to make sure that software can only do what it is supposed to. Yes, like many other security approaches it takes a little more work, but it goes a long way toward turning Linux into seriously secure software.

    Slashdotters should be able to add quite a bit, in fact hopefully this will turn out to be a discussion I reference later myself.

    --
    Back in my day when we chiseled our bits into stone and sent them by mule train from village to village...
  41. Re:Lots of linux stories on the front page by Knuckles · · Score: 1

    Could you please stop to draw conclusions from a data set of one day? Frankly, it's sickening. Draw up a statistic and I suppose you will see that not every day has 30% linux kernel stories.

    --
    "When I first heard Daydream Nation it quite frankly scared the living shit out of me." -- Matthew Stearns
  42. Enough of Linux by postmortem · · Score: 0, Troll

    Linux this, Linux that...

    Linux is marginal (abysmal market share), let's talk about Windows, I propose one week without Linux on front page.

  43. Redhat 7.0, ipchains? by joib · · Score: 1

    Uh oh..

  44. That article sucked by Anonymous Coward · · Score: 0

    Is this the kind of slop Slashdot is peddling these days?

  45. Re:Lots of linux stories on the front page by C0vardeAn0nim0 · · Score: 1

    i wish i had mod point to givo to you, my friend

    --
    What ? Me, worry ?
  46. Why doesn't linux come "closed" out of the box by presidenteloco · · Score: 1

    i.e. with all ports closed and all services off, then take the installing user through
    some wizards with a few different, and mostly conservative, minimalist options
    for opening things up, explaining the cost-benefit of the options.

    I suppose it's just inertia combined with Unix/Linux's pre-internet-malevolence
    origins. The whole idea originally was for a number of socially responsible researchers
    to have their computers maximally cooperating with each other (go figure). It wasn't designed
    with human viruses (malicious crackers) in mind at the get-go.

    But we've had net morons long enough now that you'd think a closed and incrementally
    open up policy would be a no-brainer for the default installations of net-facing OSes like
    Linux.

    --

    Where are we going and why are we in a handbasket?
    1. Re:Why doesn't linux come "closed" out of the box by clydemaxwell · · Score: 1

      You've never logged into Linux, have you?

      All modern distros DO set up a closed system, only allowing what you asked to be open.

      --
      Browsing with classic discussion, noscript, at -1 and nested
      no hidden comments and I only mod UP
    2. Re:Why doesn't linux come "closed" out of the box by Knuckles · · Score: 1

      You could educate yourself a bit, maybe by reading the postings that came before yours. (set threshold to +1)

      --
      "When I first heard Daydream Nation it quite frankly scared the living shit out of me." -- Matthew Stearns
    3. Re:Why doesn't linux come "closed" out of the box by presidenteloco · · Score: 1

      The point is, if most distros really did come really closed by default, there wouldn't be
      much need for expert articles telling us how to harden them, would there.

      --

      Where are we going and why are we in a handbasket?
  47. Re:Lots of linux stories on the front page by SplatMan_DK · · Score: 1

    True.

    But I am sure those days don't have comments about "too many Linux stories" either. Right?

    So we could say it is only fair to have that particular criticism on a day where there is also fact to back it up? :-)

    - Jesper

    --
    My security clearance is so high I have to kill myself if I remember I have it...
  48. He missed the most important point by Anonymous Coward · · Score: 0

    Which is basicly know what you're doing. Most of these websites simply ignore this very important sniplet. Take this website for example; it gives you a few pointers, some even very odd (Bastille hard to use? A kid can fill out yes/no questions) but never goes into any detail as to why.

    For example the part about stopping Apache from running. I quote: "To achieve the second, use ps aux | grep httpd. As above, the second column is the PID. Enter kill -9 xxx where xxx is the PID. This stops the process running immediately.". But he doesn't go into any details which strikes me as odd since this is supposedly for inexperienced Linux users. PID? kill? All the newbie learns here is that "kill -9" is the way to immediatly stop a program, which is ofcourse utter bollocks. When people learn that as basis they might very well trash part of their system.

    For the newbies reading: The why here is that -9 refers to the "KILL" signal (see the kill manpage) which forces a program to stop. This is hardly a clean way to stop your software, you don't tell it "hurry, finish what you're doing and get lost". No, instead you're telling it: "Drop whatever you're doing and get lost". If its in the middle of handleing certain events this might give you very unexpected results. I shudder at the idea of someone trying to "immediatly stop" a fsck process.

    Still, the first step to security is to know what you're doing. Seeing a "kill -9" to stop a webserver immediatly tells me that the author doesn't fit into that category himself. Why this is important? Think about it: if you want to be secure, would you want to use some firewall script of which you're not sure what it does exactly? Sure, the author can tell you that the script blocks all dangerous ports so no one can access your system, but how safe are you really if you didn't check out for yourself?

    Sorry, useless story and just a collection of nonsense IMVHO.

  49. Re:Lots of linux stories on the front page by Knuckles · · Score: 1

    As long as the complaint is about that particular day, and not general :)

    --
    "When I first heard Daydream Nation it quite frankly scared the living shit out of me." -- Matthew Stearns
  50. chkconfig anyone? by NoBozo99 · · Score: 1

    Last time I looked (at least on redhat systems) chkconfig can show you which services are running
    and disable the ones you don't want running.

    chkconfig --list
    chkconfig nscd off

    --
    I may not be a smart man, but I know what an inode is.
    1. Re:chkconfig anyone? by bigredgiant1 · · Score: 1

      But we're discussing identifying which services are bound to which socket device from an attacker's perspective. Getting a list of services is trivial, and could be accomplished with netstat -a, but this gives a bunch of information that isn't always relevant or accurate from a network perspective of looking in on a machine (although much of the information is usually the same.)

      --
      Vic
  51. Secure wget! by rcs1000 · · Score: 1

    Almost all script kiddies work off the same theory: find an application that has not been updated, and which has a security vulnerability (un-updated versions of Wordpress or AWStats are always favourites), use this to run wget to pull a script, rootkit, etc. onto the server, then "break" the machine and use it as a spambot.

    The simplest way, then, to prevent script kiddies from compromising your system is not only allow access to wget through sudo! Simply chmod it.

    Now, this is no excuse not to ensure everything else is up to date, etc. But a simple chmod can make an enormous difference to the security of your system.

    --
    --- My dad's political betting
    1. Re:Secure wget! by goarilla · · Score: 1

      The simplest way, then, to prevent script kiddies from compromising your system is not only allow access to wget through sudo! Simply chmod it.
      why would you want to only allow usage through sudo in my system certain accounts don't need to enter passwords when using sudo it's much easier that way altho i admit it decreases security a lot but can't you just only allow a certain group access to wget,nc,telnet,uname like i do
    2. Re:Secure wget! by Ant+P. · · Score: 1

      It'd be safer to just have an execute-permission whitelist for the httpd user.

  52. Maybe. by khasim · · Score: 1

    I think you missed my point -- you can see what an attacker would see from the local machine, by nmapping the network IP. Going to a different machine is superfluous.

    I set up a VPN connection for a co-worker last week. She was directly connected to the Internet through her ISP supplied cable modem.

    Except that that particular cable modem automatically filtered the inbound connections. Checking her machine showed that everything was okay ... but checking from outside showed that everything was not okay.

    Rather than waste time trying to determine all the possible combinations that COULD cause something ... just scan the same way a would-be-attacker would. It may be "superfluous", but it will give you the EXACT view that the attacker will be seeing. Through external firewalls, software firewalls, etc.
    1. Re:Maybe. by bigredgiant1 · · Score: 1

      You don't understand. Obviously, her PC could access her own IP address (the one assigned by her ISP.) Therefore, her PC could access itself via the exact same interface that an attacker would use, as they both would hit that IP address.

      nmap localhost

      is not the same thing as:

      nmap 77.120.22.135 # her ISP provided IP address

      Running nmap on those two IP addresses yields different results. The latter will show exactly what an attacker would see. When a service is bound to an IP on a machine, it has a choice of which IP to bind to. Services accessible by the connection on her eth0 network device (or any other device, for that matter) can be viewed by nmapping the network IP associated with that device. If her cable modem filtered traffic or ports, the list given by nmap would still be accurate, as any filtered ports would come back either as filtered or closed.

      The IP address you run nmap on is bound to a different interface altogether. If you run it on the IP of the interface an attacker will access, you will see what the attacker sees. As such, going to a different machine is still superfluous. You're giving misinformation by trying to say it's not.

      --
      Vic
    2. Re:Maybe. by bigredgiant1 · · Score: 1

      The only case where this would not be true is if there were an intermediate firewall between her PC and her ISP, this firewall filtered access by source address, and her own IP was not in the source address list. This case is rare, and would also imply that the attacker would have means to spoof the address sent to the firewall. In general though, when there isn't a firewall between a PC and a mere cable modem, this will never be the case.

      --
      Vic
  53. Re:Hardened? Hardly. by Anonymous Coward · · Score: 1, Interesting

    I used that patch for many years to secure Debian web/ftp/mail/shell servers. I also took great care to run only the safest possible daemons (e.g., qmail) and adopted a default-deny approach in general. Those systems never got cracked.
    After a few years of that, I ended up moving to OpenBSD, because I got tired of managing all the security aspects of the OS myself. It's a matter of convenience and especially time... though I also happened to also be pulled-in by excellent OBSD documentation and all-around integration that Linux "distros" lack.

  54. Re:Lots of linux stories on the front page by LordSnooty · · Score: 1

    Yah, I reckon Slashdot ought to broaden its appeal a bit, let's follow Digg and start an expansion into Adam-Sandler-did-a-funnie-on-Colbert Celebrity Bullshit Non-News.

  55. Hardening Linux by Santana · · Score: 4, Funny
    1. Insert OpenBSD CD
    2. Reboot
    3. Follow the instructions on screen
    --
    The best way to predict the future is to invent it
    1. Re:Hardening Linux by QuailRider · · Score: 1

      Are you sure this is a good idea? They don't make Bastille for OpenBSD. Oh wait....

    2. Re:Hardening Linux by ChocoboKnight · · Score: 1

      "El respeto al derecho ageno es la paz"...y la conservación de los dientes.

  56. This is the last time I'm explaining it to you. by khasim · · Score: 4, Informative

    Running nmap on those two IP addresses yields different results.

    Maybe it does. Maybe it does not. But that is immaterial. This is about what an attacker would see. Not what your machine can see from itself.

    It is possible to set up a system that allows access to those services from eth0 & localhost, but not from any other addresses.

    You are not concerned about what you can see from your machine. You are concerned about what an attacker can see. They are NOT the same.

    The latter will show exactly what an attacker would see.

    NO it will NOT.

    Your statement is only accurate for the condition in which NO ports are open. That is a single scenario and does NOT account for the various possibilities. Therefore the ONLY way to know what an attacker would see is to scan the way the attacker would.

    When a service is bound to an IP on a machine, it has a choice of which IP to bind to. Services accessible by the connection on her eth0 network device (or any other device, for that matter) can be viewed by nmapping the network IP associated with that device.

    No. Again, the system can be set up so that the ports are visible from localhost and eth0. The only way to know EXACTLY what the attacker can see (other than in the specific scenario of all ports being closed) is to scan the way the attacker would.

    If her cable modem filtered traffic or ports, the list given by nmap would still be accurate, as any filtered ports would come back either as filtered or closed.

    No, the list given by nmap would not be accurate. Because the list given by nmap would show ports open (and therefore vulnerable) when there would be no way for an attacker to see those ports.

    Again, the only time your statement would be accurate is the single case of all ports being closed.

    If you run it on the IP of the interface an attacker will access, you will see what the attacker sees.

    I've given multiple, specific examples where such would not be the case. I've shown where your statement is correct ONLY FOR A SINGLE SCENARIO where all the ports are closed.

    As such, going to a different machine is still superfluous. You're giving misinformation by trying to say it's not.

    Again, I've provided specific examples that illustrate where the information gained by scanning from an attacker's position would be different than scanning from the machine itself.

    You can claim that such is impossible all you want.

    But the facts contradict you.

    You are taking a single case and claiming that it is the same for ALL the possible configurations. It is not. The only way to know what an attacker will see is to perform the scan as an attacker would.
    1. Re:This is the last time I'm explaining it to you. by bigredgiant1 · · Score: 1

      How do you keep getting modded up? What you're saying is false. You obviously know nothing about networking.

      Notice how, as I become more and more "public", less and less ports show. An attacker will only see what I get back when I nmap my box's hostname. When I nmap my LAN IP, more ports show, but not as many as show when I nmap localhost. On my router, I employ port forwarding, so nmapping my public IP of course shows fewer ports open. The 6112/tcp filtered dtspc port listing shown when nmapping my public IP is from my router. But this is STILL WHAT AN ATTACKER WOULD SEE. I don't know how I can provide more of an exact example than this, but what you're saying is just false, newb.

      Everything on slashdot turns into a flamewar because there are a bunch of little kids like you that don't know wtf they're talking about, and then this banter persists, even though my original post was perfectly accurate. This isn't a pissing contest, you're giving out bad information, and then somehow being modded up for it. Maybe your posts keep getting marked as informative because the person giving you mod points didn't know about this, and has for some reason adopted your points as fact, but in doing has simply helped spread your false ideas of how the world works.

      The bottom line is, if you nmap the IP address that an attacker will try to exploit, you will see what he sees, unless there is a firewall that restricts access to a range of IPs including the attacker's and not your own.

      It's not like his machine sees something different when he runs `nmap ###########.com`, not unless my last statement is true.

      vic@localhost ~ $ nmap localhost

      Starting Nmap 4.20 ( http://insecure.org/ ) at 2007-08-12 16:22 EDT
      Interesting ports on localhost (127.0.0.1):
      Not shown: 1691 closed ports
      PORT STATE SERVICE
      21/tcp open ftp
      22/tcp open ssh
      111/tcp open rpcbind
      631/tcp open ipp
      2049/tcp open nfs
      3306/tcp open mysql

      Nmap finished: 1 IP address (1 host up) scanned in 0.172 seconds
      vic@localhost ~ $ nmap 192.168.1.2

      Starting Nmap 4.20 ( http://insecure.org/ ) at 2007-08-12 16:22 EDT
      Interesting ports on 192.168.1.2:
      Not shown: 1692 closed ports
      PORT STATE SERVICE
      21/tcp open ftp
      22/tcp open ssh
      111/tcp open rpcbind
      631/tcp open ipp
      2049/tcp open nfs

      Nmap finished: 1 IP address (1 host up) scanned in 0.175 seconds
      vic@localhost ~ $ nmap ###########.com

      Starting Nmap 4.20 ( http://insecure.org/ ) at 2007-08-12 16:22 EDT
      Interesting ports on ###########.com (###########):
      Not shown: 1694 closed ports
      PORT STATE SERVICE
      21/tcp open ftp
      22/tcp open ssh
      6112/tcp filtered dtspc

      Nmap finished: 1 IP address (1 host up) scanned in 13.222 seconds

      --
      Vic
    2. Re:This is the last time I'm explaining it to you. by Master+of+Transhuman · · Score: 1

      Just so I'm clear on this, correct me if I'm wrong:

      You're saying that nmapping localhost just shows open ports visible from the local machine. The nmap scan does not get routed out to the ISP (obviously) and back to the external IP address, so it only shows what the local machine can see. This is, obviously, what localhost does.

      Nmapping the external IP address gets routed out to the ISP and then back and therefore it shows exactly what an attacker would see (barring some filtering of outbound ports done by something between the PC and its firewall and the ISP - and even then obviously the attacker will only see what is allowed by that intervening filter - unless he's inside that filter somewhow.) Thus, scanning from another PC is not necessary.

      Sounds like straightforward networking to me.

      The key is that an nmap scan is going to be routed like any other network access. Therefore an nmap scan of any external IP address is going to show exactly what an attacker would see, even if the scan is run from the machine that has that external IP address. Whereas a localhost scan is going to show everything - which is not particularly useful.

      --
      Richard Steven Hack - This sig is TOO GODDAMN SHORT TO DO ANYTHING USEFUL WITH! MORONS!
    3. Re:This is the last time I'm explaining it to you. by Anonymous Coward · · Score: 0

      He can't put it any clearer than that. That other guy is a fuckwad, with some lackey modding his dumb posts.

    4. Re:This is the last time I'm explaining it to you. by sholdowa · · Score: 1

      You're the one who's wrong. You should run nmap on your internet-facing iterface. Why? Bacause it should you all the services that you're running, and those are the one's that you need to guard against. Running form a remote server is also useful - although you need to use a lot of switches and time to be sure you've checked everything - BUT you're then also relying on the services of your ISP's firewall, which a) may change and b) may get inadvertently screwed. If you're not sure you've sorted your own services, then you're taking an unnnecessary risk. And that, as any experienced administrator will tell you, will always bite you in the ass when you least expect it.

      Use all the available information - it's all relevant.

    5. Re:This is the last time I'm explaining it to you. by deniable · · Score: 1

      Try unplugging your network cable. Does an nmap scan still show exactly what an attacker would see?

      And to clarify, do you claim that a packet from this machine to this machine is sent out on the wire? That would be inefficient routing.

    6. Re:This is the last time I'm explaining it to you. by jotok · · Score: 1

      Sorry, you're wrong.

      From the local machine, if you nmap the externally-facing IP address, you will get different results than if you scan the loopback IP address. That is, you will only see services and ports that will roger up to a SYN (or whatever nmap is set to send) packet received by that IP.

      For this reason, scanning from a distant computer is unnecessary.

      Claiming otherwise, when several security professional are telling you are wrong, is asinine.
      Telling them that you have specific anecdata that proves them wrong is a lie.

      You're talking to people who have probably been doing this since before you knew what the internet was. This is a good time for you to take a seat and learn something, sonny jim.

    7. Re:This is the last time I'm explaining it to you. by bigredgiant1 · · Score: 1

      It's not like either unplugging a network cable or routing through the ISP first are going to open up more ports on the machine the attacker would be targeting; those things can only filter ports. The worst case scenario is that the attacker sees that the machine has all the ports open listed as output in nmapping your network assigned IP.

      --
      Vic
    8. Re:This is the last time I'm explaining it to you. by Random_Goblin · · Score: 1
      jotok (728554) to khasim (1285)

      You're talking to people who have probably been doing this since before you knew what the internet was. This is a good time for you to take a seat and learn something, sonny jim.


      Irony defintion: when the 6 digit ids are lecturing the 4 digit ids about being new to the internet, and this thing called networking...

      all an nmap on your external interface will show you is what an external entity might be able to see.. not what they can see

        this is fine for the special case that you want the port closed to everyone, but is not very useful if you have any sort of local network, and might need those ports to be available to local entities.

      If you want to understand your network test from multiple points, it will tell you what you can ACTUALLY see, not what you THINK you can see
    9. Re:This is the last time I'm explaining it to you. by jotok · · Score: 1

      all an nmap on your external interface will show you is what an external entity might be able to see.. not what they can see

      The reason you keep saying this is, as has been observed by others, that you do not understand networking.
      Seriously, you. are. wrong.

    10. Re:This is the last time I'm explaining it to you. by cbiltcliffe · · Score: 1

      The reason you keep saying this is, as has been observed by others, that you do not understand networking.
      Seriously, you. are. wrong.
      No...he's not wrong. Network daemons of many sorts can be set up to ignore requests from certain IP addresses (eg. 100.1.1.1), and acknowledge them from others (200.1.1.1). If the daemon does not even send an ACK back when connected to from 100.1.1.1, this would make the port appear firewalled when scanned from 100.1.1.1, but open and accepting connections from 200.1.1.1. Now, replace 100.1.1.1 with your eth0 IP address, and replace 200.1.1.1 with the address of a computer out on the Internet somewhere.
      You see no open port, but anybody else sees a server running on that port.

      Now, in this case, the machine is probably already hacked, as there's no reason to have a default configuration that doesn't respond to itself, but does to any other computer. But to say that this is not possible, and anybody who says it is doesn't understand networking, is extremely naive, to say the least.
      --
      "City hall" in German is "Rathaus" Kinda explains a few things......
  57. Oh Dear!!! Linux Is Insecure Out of the Box!!!! by BSDetector · · Score: 0

    I thought that Linux was the answer to all the computing ills of society!!!!

  58. Lessons from the gentiles again by Anonymous Coward · · Score: 0

    http://www.itwire.com/administrator/ There should be an .htaccess at least...

  59. Insecure? by Anonymous Coward · · Score: 0

    The Internet isn't insecure. It may be unsecure.
    Insecurity is mental state. The users of
    the Internet may be insecure, and perhaps
    rightfully so......Simson Garfinkel

  60. PHOTO PROOF PLEASE... & why: Thanks! by Anonymous Coward · · Score: 0

    "84.736/100 on Ubuntu. whoop de dooo." - by Anonymous Coward on Sunday August 12, @11:16AM (#20203099)

    Ok, but... Do you have a legitimate, unfaked photo (yes, someone in those 26 url challenges to take the CIS TOOL did insinuate he could do that) of your proof of your score?

    Thanks!

    Because I did state I would like that type of evidence, here (in the post that is parent to your own no less):

    http://it.slashdot.org/comments.pl?sid=267599&cid= 20203061

    ----

    "Yes, I would preferably like to see a result photo (legit/unfaked, because I had someone insinate they would or could do that here once @ this site) someone using FreeBSD or SeLinux kernel hook addon bearing distros of LINUX (Ubuntu 7.04 onwards has this 'baked in' no less, & it's pretty widely used)."

    ----

    That I would like to see, mainly because I want to see the areas tested (analogs to ones tested in Windows NT-based OS really) & discuss the areas YOU may feel it is "in error" in (as I found in the Windows Server 2003 model of this test, where I am 99% convinced the test "erred" on me, & owes me some points (minor areas))!

    PLUS, discussion of techniques you use on your *NIX variant that that test MAY NOT ACCOUNT FOR!


    (Things like these, which CIS Tool does not check: For LinkSys NAT true firewalling stateful packet inspecting hardware firewalls, OR even software firewalls &/or antivirus-antispyware programs (which are useful for security, LAYERED SECURITY, today/nowadays, especially online))!

    Examples from the "*NIX FIEND WORLD", thereof/such as, perhaps:

    ----

    1.) Using NetConfig to create a NAT "firewalling" subnet for you, from a dual homed/dual NIC bearing LINUX rig

    2.) Using SeLinux's SOCKETS LEVEL CONTROL above & beyond IPTables usage

    3.) Using SeLINUX "MAC (mandatory access control) label based security (analog to Windows ACL's & POSIX ACL's) usage for comparison to Windows' ACL level controls on the registry & filesystems via userrights assigned, above & beyond using std. *NIX tools like chmod/chown & yes, chroot (because programmatic "impersonation" as it is called in Windows can be used to circumvent & 'break out of' chroot jails for instance)

    ----

    (That's for some examples I'd like to discuss with *NIX fiends here, & to see "layered security" in place on a *NIX rig (like I use on Windows Server 2003 here) above & beyond what say, for example, the *NIX hardening link urls I posted in my last reply here give folks & yes, myself).


    ----

    HOWEVER, above all else - I do have a photo proof of my score, again here, for your reference which I provide, & expect the same from you *NIX guys as well, per my quoted statement above (from myself in the posting parent to THIS one):

    http://img.techpowerup.org/070618/APK14SecurityPoi ntsCISToolResult84735.jpg

    AND, here are the steps I used on Windows Server 2003 SP #2 to get that score (95% of it applies to older Windows NT-based OS' (2000/XP) too, & it can even IMPROVE VISTA'S SCORE as well, when its techniques & concepts are applied):

    APK "12 step program" 4 a secure Windows NT-based OS (2000/XP/Server 2003/VISTA):

    http://forums.techpowerup.com/showthread.php?s=3e7 8ea52bc119fb94a59e51abf7c47a5&p=375355#post375355

    (I made that as easy of a "guide/roadmap" as possible, using tools native to Windows, so Windows users could be secure online, per the gauging done by the multiplatform test of online security, in CIS TOOL, noted by SANS no less as to its validity & intended purpose per proof of that I submitted in the post paren

  61. Overcoming your objection, inside w/ ease... by Anonymous Coward · · Score: 0

    "I've always wondered how hard it would be to get a Slashdot reader to download and install a root-kit on their Linux box. Thanks to you, now I know it's not hard at all." - by Anonymous Coward on Sunday August 12, @12:15PM (#20203457)

    LOL, this evasion's (from another A/C, not myself mind you)?

    "NOT TOO LEGIT"...

    Especially in light of the fact, anyone can see below, that even SANS recognizes this test as legitimate & the organization who coded it as well:

    ----
    (QUOTING EXCERPT FROM MY LAST POST, THE PARENT TO YOU OWN):

    MULTIPLATFORM ONLINE SECURITY TEST CIS TOOL (NOTED @ SANS: CIS to Release Windows Configuration Assessment Tool (May 1, 2007)):

    http://www.sans.org/newsletters/newsbites/newsbite s.php?vol=9&issue=36#sID302

    MULTIPLATFORM ONLINE SECURITY TEST CIS TOOL (NOTED @ COMPUTERWORLD):

    http://www.computerworld.com/action/article.do?com mand=viewArticleBasic&articleId=9018362&intsrc=hm_ list

    ----

    2 respected sources about computer information AND security, that are often cited here @ /., no less, where it is noted by both SANS & COMPUTERWORLD as legitimate, not "bushwhack ware":

    APK

    P.S.=> This "evasion attempt"? I have seen it before, & this is HOW I "overcame that objection"... honestly? TOO easy... if you can't beat the score that I obtain on a custom hardened Windows Server 2003 SP #2 setup system of 84.735/100 on the multiplatform CIS Tool test of online security, & on your part, provide photographic proof (jpg, bmp, etc. et al) of your score VS. mine, using YOUR *NIX OF CHOICE?

    Well... "Run, Forrest: RUN!!!"... apk

    1. Re:Overcoming your objection, inside w/ ease... by Anonymous Coward · · Score: 0

      SANS and Computerworld are not that respected in the computer security world.

  62. Bind services to localhost. by argent · · Score: 1

    Services run from inetd/xinetd have their port and interface bindings managed externally, and since UNIX systems have run multihomed almost from the start, there are few if any deamons that can't be run bound to localhost, so if you have to run a local webserver for some purpose it can be unconditionally protected from remote exploits simply by running it on localhost... so as far as an attacker is concerned it doesn't exist.

  63. Installing Debian server by Britz · · Score: 2

    I would install a Debian server using the minimum install cds and then apt-getting just the services I need from the mirrors (which should have current patches). I mean, if it is going to be a server it should have a somewhat fast internet connection, right?

  64. Use nmap? by verbatim_verbose · · Score: 2, Insightful

    Why do "security experts" like these folks always suggest using nmap to determine what services you are running? Have these folks never heard of netstat?

    1. Re:Use nmap? by Anonymous Coward · · Score: 0

      Yes, but netstat gives more information than what is really needed.

    2. Re:Use nmap? by garett_spencley · · Score: 1

      Because you can't trust the machine you're auditing if it has been compromised.

    3. Re:Use nmap? by Cheeze · · Score: 1

      lsof | grep TCP

      That command will tell you much more than netstat. It'll also give you the program that is opening the port.

      --
      Why read the article when I can just make up a snap judgement?
  65. What could be simpler??? by DrSkwid · · Score: 1

    I type Undo then middle click it (though it's already present by default) (acme)
    Middle clicking on any executable command and have it execute is also pretty neat. (acme, send menu item in the wm, rio)
    I can also send arbitrary strings for matching against a list and the match executes, that's a boon as well. (plumber which is a system service (though it runs in userland as you, obviously - this is plan9 there are rules)

    I write a pallette of commands for my current problem domain which are just txt files so I can even put them in the repository.

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  66. Re:Overcoming your objection, TOO EASY part deux by Anonymous Coward · · Score: 0

    "SANS and Computerworld are not that respected in the computer security world." - by Anonymous Coward on Sunday August 12, @03:28PM (#20204797)

    WELL, "OK" if YOU say so... you must be more respected than they are as far as 'authorities on the matter' then, my fellow "A/C"!

    (lol... not/whatever! Somehow, this evasion of yours does not wash here @ all, especially considering you're using it to evade posting a testscore on a multiplatform gauge of online security via the CIS TOOL)

    Perhaps searching the term SANS here will yield proof, otherwise? I don't know... but, it's a decent chance that IS the case, for that, on that account!

    Rotflmao... I'll tell you 1 thing though, for sure:

    Apparently my score of 84.735/100 on the multiplatform CIS Tool test gauge of online security that is not 'bushwhack-ware' (ala virus/trojan/malware/spyware etc. et al), per SANS & COMPUTERWORLD:

    http://img.techpowerup.org/070618/APK14SecurityPoi ntsCISToolResult84735.jpg

    IS respected enough...

    (So much so, that no "Penguins" or "BSD Devils" here on their *NIX rigs can beat my score pictured above, & this is the 28th time now I have heard some b.s. evasion... "Run, Forrest: RUN!!!").

    Personally? I can't believe this has happened here that much, in you *NIX people evading taking this CIS Tool test, OR rather, omitting posting your scores That's what the evasions are typically like & I overcome each one, in each post, regarding CIS TOOL here (where I challenged *NIX fiends to this test, whenever posts state something along the lines of "(Insert *NIX version here) is more secure than WINDOWS" - PROVE IT THEN! Put your monies where your mouths are))... Talk's cheap... apk

  67. Why doesn't Windows come "closed" out of the box by Tom9729 · · Score: 1

    i.e. with all ports closed and all services off, then take the installing user through
    some wizards with a few different, and mostly conservative, minimalist options
    for opening things up, explaining the cost-benefit of the options.

    I suppose it's just inertia combined with Windows' pre-internet-malevolence
    origins. The whole idea originally was for a number of socially responsible researchers
    to have their computers maximally cooperating with each other (go figure). It wasn't designed
    with human viruses (malicious crackers) in mind at the get-go.

    But we've had net morons long enough now that you'd think a closed and incrementally
    open up policy would be a no-brainer for the default installations of net-facing OSes like
    Windows.

    ------

    There, I fixed that for you.

  68. i'm secure, too by Pooch+Bushey · · Score: 1

    i just keep the cup-holder closed, and keep the screws on the back of the case tightened ... seems secure enough to me ...

  69. AMEN TO THAT, proof inside... apk by Anonymous Coward · · Score: 0

    "Seeing as how they 99.999% of Slashdotters are still running under the delusion that teh Lunix is secure (especially compared to Windows Server 2003), your assumption is wildly (and unrealistically) optimistic. A good question might be that, if hardening a system is so simple and basic... why doesn't it just install that way? Yet another reason teh Lunix isn't ready for prime-time. - by Anonymous Coward on Sunday August 12, @12:56PM (#20203755)

    Amen, to that... &, for proof of your statement?

    Refer to RIGHT here, in this URL below, where those that stated (Insert *NIX variant here) is more secure than Windows", OUTRIGHT RUN from a multiplatform test of online security (noted by SANS no less) called CIS TOOL, by the CENTER FOR INTERNET SECURITY, 28 times now here @ /. in fact:

    http://it.slashdot.org/comments.pl?sid=267599&cid= 20203061

    LOL! Man... I tell you:

    It's actually FUNNY: The sheer volume & types + number of outright "evasions" I had to overcome in the list of the 28 times now I have challenged the *NIX crowd here to that test (I want mostly to see a SeLinux OR FreeBSD result VS. the one I posted for Windows Server 2003 SP #2 fully "custom-hardened for security" by yours truly @ a 84.735/100 score)...

    HOWEVER, it's actually pretty sad too - I would like to see feedback from "the other side of the fence" in the *NIX users here, on THAT test, in particular & ESPECIALLY from FreeBSD &/or SeLinux kernel hook addons for more security for LINUX!

    I can only lead a horse to water, but, when that horse seems to have rabies & fears water? What can one do, except wonder, for all the "UNIX UBER ALLES" stuff here on /., especially. One would think they'd take that test & BLOW MY SCORE, away - not a one of 28 or more of those challenged, have to date.

    APK

    P.S.=> Heck, I actually LIKE Kubuntu 7.x too... but, I want to see & learn more from someone better than I am @ securing *NIX's, however, that's going to be tough!

    Why? Well - All I see, & so will this topic's starter, is a pack of *NIX fiends that 'talk big'... but when the chips are down & the monies are on the table?? NO PROOFS SUPPLIED OF THEIR USUAL STATEMENTS OF "(Insert *NIX variant here) is more secure and securable than WINDOWS" etc. et al...

    They won't put their monies where their mouths are, & post a valid photo of a *NIX variant's score on the multiplatform CIS Tool test of online security... which I would like to discuss, even IF my score is surpassed, to increase my personal understanding of *NIX "security + hardening" better than I currently do, IF possible.

    A multiplatform VALID test is the best thing/way to test this, & only thing that I have found that does so that runs on BOTH *NIX variants of many kinds (Solaris, FreeBSD, Linux variants, & Windows) that tests analogs between them (noted in the init. url I point you to)... & AS WELL + COMPREHENSIVELY AS IT DOES.

    Hilarious, & "talk"? It's cheap - proof's what I'd like to see, + a discussion of techniques used to overcome the test's suggestions/objections (which there will doubtless be many on totally UNSECURED rigs from both camps, *NIX & Win32, & this I am certain of) & so would this article post's starter as well probably! apk

  70. Hardening? Wha? by rivj0r · · Score: 1

    Is there anyone, anyone at all, who doesn't think that hardening linux and hardening windows are the same exercise in futility?

    Now from those people, should they exist, is there anyone actually skilled in security?

    From this now impossible subset, why aren't we just moving to openbsd?

    I'm a windows based engineer, and every time I look at linux I see the same great gaping security holes as the core system I use and less usability. So I stay with windows, where its easy. And strangely enough all my bastion hosts are Theo's work.

  71. Happens in LUG meetings too by Almahtar · · Score: 1

    ... couldn't resist.

  72. ROOTKITS ORIGINATED ON *NIX & a challenge... a by Anonymous Coward · · Score: 0

    ROOTKITS ORIGINATED ON *NIX SYSTEMS GENTS... NOT WINDOWS!

    http://www.cio.com/article/116250/A_Brief_History_ of_Malware_and_Cybercrime_/2

    ----

    "Rootkits

    When it began: 1970s-80s. Originally developed by hackers to hide traces of intruders on Unix computers, rootkits for all types of networked computers are packaged and sold on the Internet by the emerging malware development community. Perhaps the king of these programs is the open source rootkit FU, which can be downloaded freely here."

    ----

    Thought I'd share the "little historical tidbit" with you all... in case you did not know that (I am sure you did, but I can be 'sarcastic funny', too!)...

    And, while you're (imo @ least) apparently trying to make Windows users "look bad" & Microsoft + Windows as well?

    All I can say is, try this: A CIS TOOL "Challenge to *NIX users @ /.", in a MultiPlatform test of online security (noted by SANS, no less):


    http://it.slashdot.org/comments.pl?sid=267599&thre shold=1&commentsort=0&mode=thread&cid=20203061

    See you there, & GOOD LUCK, you will need it, OR some decent skills @ securing a *NIX variant running rig!

    (+, While you're @ it, you'll be witness to HOW MANY *NIX HEADS RAN FROM THAT TEST HERE @ /. & how many times now (28++ now, & growing), from my score on it, ME the "lowly Windows user", no less!)

    APK

    P.S.=> BOTTOM-LINE: WELL, I guess, all I can say is this - Beat the score of 84.735/100 I obtained on the multiplatform CIS Tool test (noted by SANS, created by THE CENTER FOR INTERNET SECURITY) of online security with me using a Windows Server 2003 SP #2 setup, VS. your *NIX OF CHOICE, if you intend to "rib on windows", as is common practice here @ /., in a lot of statements I see here like - "(Insert *NIX variant here) is more secure or securable than Windows is" etc. et al!

    (Note - My setup was fully custom hardened by yours truly, & I'd like to see your score results in a photo, vs. mine which is already @ that url above, with any of you folks & your *NIX rigs (hopefully, ALSO hardened for security as BEST YOU CAN!))...

    Now - IF you somehow manage to do so (OR NOT, because I strongly think nobody here can by now, you will see what I mean by that in the URL of the test challenge I posted)??

    Win vs. Lose? Not REALLY important to me, honestly - Fact is, I'd just like to discuss your methods, from a proof of result posted photo PREFERABLY from a SeLinux OR FreeBSD user, & what you agreed with, or could & could not solve, based on the CIS Tool's suggestions (everyone can learn here, *NIX fiends AND Windows folks, including myself)... thanks! apk

  73. Re:Hardened? Hardly. by dbIII · · Score: 1
    I tried all that - and then some clown didn't update it, enabled shell access for all email users, made it more convenient by accepting ssh connections from any address instead of a case by case basis, put a compiler on there and then some user with a very common name had "coffee" as their password. With only ssh open it still went down to a dictionary attack and some sort of privelage escalation through stuff the attacker compiled on the machine.

    You not only have to limit the ports but who you accept connections from (AllowUsers file) and if you can where you accept connections from. If they don't have a reason to talk the machine shouldn't be listening

  74. Re:The defaults are no longer what they were in 19 by sootman · · Score: 1

    > Mandriva 2007 Bootable CD
    > Port 6000 is all that's open (X server. Ok this is dumb, why?)

    Well, if it's a bootable CD, maybe the idea is you boot to it, and then do a remote X session to it? With no HD in the box, there would be no risk to your data.

    --
    Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
  75. Re:Hardened? Hardly. by Anonymous Coward · · Score: 0

    I wasn't too worried about shell access because I had "seriously" trimmed-down the suid files on the system, to the point where there were only a couple of them left that normal users had access to. Stuff like traceroute and such that only admins needed were had perms like 4750, with the file's GID being "wheel". That was done in addition to limiting filesystem access using grsec's mandatory access controls, which admitedly were complex to setup (thus the suid thing was a failsafe/backup plan). I also enabled all the PID/IP/etc. randomization features in grsec, as well as its extra chroot hardening. All the daemons ran under their own UID/GID and most were chroot'd. The iptables ruleset was so tight that a local user couldn't even sneeze unless the associated outbound port was open. I also configured the applications/daemons with the same level of care, and had a few other things setup, like filesystem integrity check monitors/alarms (using static binaries on ro media, or via a remote ssh process), and various other things.
    All that worked pretty good, but it was a PITA to setup and maintain. So gradually those machines got migrated to OpenBSD, and then it was mostly a matter of keeping up with security patches, avoiding the use of ports (which don't get audited much), and making sure the firewall rules are tight and the daemons are configured right. Quite a few of the features that grsec offers are enabled by default in OBSD, and in fact it has a few other tricks up its sleeve. About the only thing missing is mandatory access controls, which would be nice, but again are a PITA to setup and maintain.

  76. Re:Lots of linux stories on the front page by pembo13 · · Score: 1

    I hope you don't use Windows, with that comment about forcing others to use.

    --
    "Thanks for all the money you paid to us. We've used it to buy off ISO among other things" -Microsoft
  77. rofl by MadCatMk2 · · Score: 1

    Don't worry, hackers respect people with unix systems

  78. Source is an interesting one by subStance · · Score: 1

    I thought this was pretty light content wise, until I noticed it was from the publication that includes Stan "ISO" Beer among its staff writers .... (can't find any references to the "What's an ISO image ?" article, but those of you who remember the article will no doubt remember this guy fondly).

    --
    Servlet v2.4 container in a single 161KB jar file ? Try Winstone
  79. Oh, please... by Anonymous Coward · · Score: 0

    "Maybe they don't want to take your challenge because they can't parse your post.

    I mean, it just took me about 15 minutes.

    Just sayin'." - by jotok (728554) on Monday August 13, @12:35AM (#20208399)

    Well, you "made it thru it alive", will wonders NEVER cease?

    AND, I beg to differ...

    Every one of their objections was overcome thru all the 30 or so times I challenged *NIX folks here per the post that is parent to yours (& even to the point one of the *NIX repliers stated CIS TOOL, a multiplatform test of online security noted by SANS no less, might be "malware", lol... SANS & COMPUTERWORLD BOTH NOTE IT, & I SUPPOSE THEY ARE MALWARE MAKERS TOO?

    I.E.-> I see a lot of "(Insert *NIX variant here) is more secure or securable than Windows" type statements here @ /., so... back it up!

    E.G.-> ... & all I am asking the *NIX folks here to do? Simple - Put your monies where your mouth is, exceed by 84.735/100 score on the CIS TOOL security test...

    (Put up, or shut up, basically. Not a lot to ask... & I would like to see a *NIX user's results screen photo, ESPECIALLY from SeLinux &/or FreeBSD users!)

    No one has put a higher score up than mine, point blank.

    APK

  80. Re:Hardened? Hardly. by cbhacking · · Score: 1

    what happens if a penetration is successful?
    Well, then you're fucked.

    (Sorry, couldn't resist)
    --
    There's no place I could be, since I've found Serenity...