Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Making Your Linux Box Secure

Posted by CmdrTaco on Wed Sep 13, 2000 01:40 PM
from the two-scoops-of-know-how dept.
pryan writes "rootprompt.org has some interesting articles on locking down a Linux box on a hostile network (read: Internet) and cloaking a Debian box so script kiddies don't find it. Check out fortress building, part 1, and part 2. For you Debian freaks (I'm wearing a Debian swirl t-shirt as I type this), check out cloaking Debian. Of course, the cloaking article is easily adaptable to other distributions. Let's lock down those boxes! "
This discussion has been archived. No new comments can be posted.
Making Your Linux Box Secure | Log In/Create an Account | Top | 139 comments (Spill at 50!) | Index Only | Search Discussion
Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
(1) | 2
  • by Saron (192618) on Wednesday September 13 2000, @09:03AM (#781942)
    Is Lance Spitzner's Security Whitepapers [enteract.com].

    Its a handy little site, covers firewalls in NT and Linux, how to properly armor a NT, Solaris, or Linux install (from the perspective of Redhat, but thats easily adaptable), and for those of you that are a bit more curious, he has a "How to build a honeypot" section.

    Enjoy!

  • Re:Wewanthackers.com has been up 50 days straight by Bruce Perens (Score:2) Wednesday September 13 2000, @09:05AM
  • Re:http://cr.yp.to/ by tzanger (Score:1) Wednesday September 13 2000, @04:08PM
  • Re:GNU system philosophy by Stormin (Score:1) Wednesday September 13 2000, @04:19PM
  • Re:http://cr.yp.to/ by Bryan Ischo (Score:2) Wednesday September 13 2000, @04:41PM
  • Re:Two easy questions to decide on most secure OS by Drestin (Score:1) Wednesday September 13 2000, @04:41PM
  • Xinetd by linuxgod (Score:1) Wednesday September 13 2000, @11:02AM
  • I've got a slashdot idea by AintTooProudToBeg (Score:1) Wednesday September 13 2000, @05:49PM
  • Re:SOP for my systems, when installed: by Karn (Score:1) Wednesday September 13 2000, @11:04AM
  • Re:Security != "security_from_script_kiddies" by fizbin (Score:1) Wednesday September 13 2000, @11:05AM
  • Re:Yeah, Linux. by linuxgod (Score:1) Wednesday September 13 2000, @11:06AM
  • Re:Our comany firewall by Malcontent (Score:2) Wednesday September 13 2000, @06:30PM
  • Re:http://cr.yp.to/ by Malcontent (Score:2) Wednesday September 13 2000, @06:35PM
  • Re:Can "cloaking" hide from nmap -O ? by Zach Garner (Score:1) Wednesday September 13 2000, @09:08AM
  • Mandrake v7.0 by compwiz3688 (Score:1) Wednesday September 13 2000, @09:09AM
  • Re:Eaaaaasy. Don't run inetd, masquerade out. by The Mad Duke (Score:1) Wednesday September 13 2000, @09:10AM
  • Re:Can "cloaking" hide from nmap -O ? by boy case (Score:1) Wednesday September 13 2000, @09:10AM
  • Re:http://cr.yp.to/ by Russ Nelson (Score:2) Wednesday September 13 2000, @09:10AM
  • In Other News: (Score:5)

    by Denor (89982) <denor@yahoo.com> on Wednesday September 13 2000, @09:11AM (#781960) Homepage
    Change of Pace for Slashdot Disturbing, Posters Find.

    ASSOCIATED PRESS - Dozens were shocked today as popular website Slashdot posted a story that had nothing to do with a corporate or governmental conspiracy.
    "I'm absolutely floored" one frequent poster commented. "I mean, I was all ready to get out one of my 'damn the man' rants for karma, but it turns out it's completely offtopic for this story. I mean, I'd actually have /lost/ karma! That was close. I have no clue why Slashdot would do this."
    Many others were confused as well. Local trolls were dismayed, one going so far as to assert "I'm betting this is a slashdot conspiracy to try to lull us into a false sense of security."
    Many contributors fell into the pattern of trying to form a Slashdot editorial conspiracy, but ultimately failed as the comments did not have nearly the manifesto-inspiring potential that the earlier front page stories had included.
    "I was all ready to boycott this 'debian' thing they mentioned in the blurb," commented one disillusioned poster, "But then I went and read the article, and there was nothing about corporate conspiracy at all!"
    While there was still theorizing by those who had not read the article, for the most part conversation was stilted and akward, with many participants struggling to figure out exactly what, if not governmental or corporate conspiracy, the article was actually about.

  • by doomy (7461) on Wednesday September 13 2000, @11:15AM (#781961) Homepage Journal
    Here is the scripts I used to secure our file wall
    and enable a nice well secured debian based internal network.

    SERVER_IP= #set this to server ip

    #
    # Local area network
    ifconfig eth1 192.168.0.1 netmask 255.255.255.0 up
    route add -net 192.168.0.0 netmask 255.255.255.0 window 16384 eth1

    # S E C U R I T Y ################################################## ###

    #
    # Enable syncookies and ip forward

    echo 1 > /proc/sys/net/ipv4/tcp_syncookies
    echo 1 > /proc/sys/net/ipv4/ip_forward

    #
    # Let local calls through

    /sbin/ipchains -A input -j ACCEPT -s 0/0 -d 0/0 -i lo

    #
    # External calls to 127 blocking.

    /sbin/ipchains -A input -j DENY -p all -l -s 127.0.0.0/8 -i eth0 -d 0.0.0.0/0 -l

    #
    # IP MASQ Forwarding for 192.168.0.2 subnet
    /sbin/ipchains -P forward DENY
    /sbin/ipchains -A forward -s 192.168.0.2/24 -j MASQ

    #
    # Modprobing
    modprobe ip_masq_user
    modprobe ip_masq_ftp
    modprobe ip_masq_irc ports=6667,6668,6669,6670
    modprobe ip_masq_raudio
    modprobe ip_masq_quake ports=26000,27000,27910,27960

    #
    # Now block some ports we dont want people to use from outside
    # block from ICMP troubled ports

    /sbin/ipchains -A input -p icmp -j DENY -s 0/0 -d 0/0 21 -l
    /sbin/ipchains -A input -p icmp -j DENY -s 0/0 -d 0/0 23 -l
    /sbin/ipchains -A input -p icmp -j DENY -s 0/0 -d 0/0 25 -l
    /sbin/ipchains -A input -p icmp -j DENY -s 0/0 -d 0/0 79 -l
    /sbin/ipchains -A input -p icmp -j DENY -s 0/0 -d 0/0 139 -l
    /sbin/ipchains -A input -p icmp -j DENY -s 0/0 -d 0/0 143 -l
    /sbin/ipchains -A input -p icmp -j DENY -s 0/0 -d 0/0 1080 -l
    /sbin/ipchains -A input -p icmp -j DENY -s 0/0 -d 0/0 6000 -l
    /sbin/ipchains -A input -p icmp -j DENY -s 0/0 -d 0/0 12345 -l
    /sbin/ipchains -A input -p icmp -j DENY -s 0/0 -d 0/0 31337 -l

    #
    # Block ICMP flooding/pinging

    /sbin/ipchains -A input -p icmp -j DENY -s 0/0 8 -d 0/0 -l

    #That's some basic stuff to be blocked. These rules will block: ftp, telnet,
    #smtp, finger, netbios, imap, socks, X11, netbus and Back Orfice. It will
    #also create a syslog entry as logging (-l) has been enabled. You can add or
    #remove ports as you want.
    # got this bit from a security listing

    # Block everthing on eth0 for the following ports
    /sbin/ipchains -A input -j DENY -p tcp -l -s 0.0.0.0/0 -i eth0 -d ${SERVER_IP}/32 2401
    /sbin/ipchains -A input -j DENY -p tcp -l -s 0.0.0.0/0 -i eth0 -d ${SERVER_IP}/32 6000
    /sbin/ipchains -A input -j DENY -p tcp -l -s 0.0.0.0/0 -i eth0 -d ${SERVER_IP}/32 515
    /sbin/ipchains -A input -j DENY -p tcp -l -s 0.0.0.0/0 -i eth0 -d ${SERVER_IP}/32 752
    /sbin/ipchains -A input -j DENY -p tcp -l -s 0.0.0.0/0 -i eth0 -d ${SERVER_IP}/32 1024
    /sbin/ipchains -A input -j DENY -p tcp -l -s 0.0.0.0/0 -i eth0 -d ${SERVER_IP}/32 111
    /sbin/ipchains -A input -j DENY -p tcp -l -s 0.0.0.0/0 -i eth0 -d ${SERVER_IP}/32 5432

    Basically it blocks almost every kind of ICMP and any unwanted attempts by intruders and also blocks access to resources used only within our network. Eg: Our postgresql server and so on.. Also it logs any illegal activities.

    Enjoy.
    --
  • Re:In Other News: by McSnickered (Score:1) Wednesday September 13 2000, @11:15AM
  • Re:Wewanthackers.com has been up 50 days straight by linzeal (Score:1) Wednesday September 13 2000, @06:50PM
  • Re:Bernstein & http://cr.yp.to/ by lwagner (Score:1) Wednesday September 13 2000, @11:16AM
  • Two easy questions to decide on most secure OS by Drestin (Score:1) Wednesday September 13 2000, @11:17AM
  • Re:Wewanthackers.com has been up 50 days straight by DreamerFi (Score:1) Wednesday September 13 2000, @07:57PM
  • Re:Lock down? Why? by Fervent (Score:1) Wednesday September 13 2000, @11:26AM
  • Windows by FortKnox (Score:1) Wednesday September 13 2000, @08:48AM
  • Re:Can "cloaking" hide from nmap -O ? by Coward, Anonymous (Score:1) Wednesday September 13 2000, @09:16AM
  • Web site.. by photozz (Score:1) Wednesday September 13 2000, @09:16AM
  • Vitually unplug yourself from the net by Delirium Tremens (Score:2) Wednesday September 13 2000, @09:17AM
  • Re:Two easy questions to decide on most secure OS by T-Punkt (Score:1) Wednesday September 13 2000, @10:41PM
  • Re:Dont do linux by bumbaclaat (Score:1) Wednesday September 13 2000, @11:33AM
  • Re:Wewanthackers.com has been up 50 days straight by slashdot-me (Score:1) Wednesday September 13 2000, @10:54PM
  • Re:Hmm... by technos (Score:2) Wednesday September 13 2000, @11:33AM
  • Re:Vitually unplug yourself from the net by YKnot (Score:1) Wednesday September 13 2000, @11:37AM
  • Hmmm. FreeBSD != great by cvillopillil (Score:2) Wednesday September 13 2000, @11:41AM
  • Re:http://cr.yp.to/ by arivanov (Score:2) Thursday September 14 2000, @02:16AM
  • by arivanov (12034) on Thursday September 14 2000, @02:18AM (#781979) Homepage
    /sbin/ipchains -A input -p icmp -j DENY -s 0/0 -d 0/0 79 -l

    You mean tcp (or for some of these UDP) right?

  • Re:Windows by bolie (Score:1) Wednesday September 13 2000, @11:46AM
  • Re:Can "cloaking" hide from nmap -O ? by mindslip (Score:2) Thursday September 14 2000, @03:02AM
  • Re:Lock down? Why? by Shin Elendale (Score:1) Wednesday September 13 2000, @11:52AM
  • Re:Yeah, Mom ... by YKnot (Score:1) Wednesday September 13 2000, @11:56AM
  • by slickwillie (34689) on Wednesday September 13 2000, @09:18AM (#781984)
    Just run Blue Screen of Security 1.0.
  • Is it as simple as a firewall? by Sawbones (Score:1) Wednesday September 13 2000, @09:18AM
  • damn double posts :) N/T by Sawbones (Score:1) Wednesday September 13 2000, @09:20AM
  • Re:Windows by fprintf (Score:1) Wednesday September 13 2000, @09:20AM
  • Ultimate tool to make any machine secure by sporty (Score:1) Wednesday September 13 2000, @09:21AM
  • Try Bastille Linux (Score:3)

    by slickwillie (34689) on Wednesday September 13 2000, @09:22AM (#781989)
    Here. [bastille-linux.org] It is supposed to harden your Linux system. I haven't tried it though. I downloaded it, but before I got around to running it, I installed FreeBSD.
  • Re:Yeah, Mom ... by fsck (Score:1) Thursday September 14 2000, @05:25AM
  • Re:Yeah, Mom ... by debrain (Score:2) Thursday September 14 2000, @06:04AM
  • Re:Why don't you just use an OpenBSD firewall by Type-R (Score:1) Wednesday September 13 2000, @12:09PM
  • Re:Why don't you just use an OpenBSD firewall by SpamapS (Score:1) Wednesday September 13 2000, @12:10PM
  • Re:Two easy questions to decide on most secure OS by DFDumont (Score:1) Thursday September 14 2000, @10:02AM
  • Re:Hmm... by linzeal (Score:1) Wednesday September 13 2000, @12:18PM
  • Re:ahem by linuxgod (Score:1) Saturday September 16 2000, @07:30AM
  • TRINITY OS has a great Firewall Script! by bozone (Score:1) Wednesday September 13 2000, @12:19PM
  • Re:ahem, again by linuxgod (Score:1) Saturday September 16 2000, @07:32AM
  • Re:How apropriate... by rgmoore (Score:1) Wednesday September 13 2000, @12:20PM
  • Re:GNU system philosophy by disappear (Score:1) Wednesday September 13 2000, @12:23PM
  • Re:Wewanthackers.com has been up 50 days straight by linzeal (Score:1) Wednesday September 13 2000, @12:27PM
  • Re:Wewanthackers.com has been up 50 days straight by Bruce Perens (Score:2) Wednesday September 13 2000, @09:23AM
  • Re:Why don't you just use an OpenBSD firewall by jetpack (Score:1) Wednesday September 13 2000, @09:23AM
  • Lock down? Why? (Score:3)

    by Fervent (178271) on Wednesday September 13 2000, @09:23AM (#782004)
    The whole principle of hacking is to share and divulge information and ideas. You claim information wants to be free, then proceed to "lock down" your Linux box (this is the modern day hacker's paradox).

    According to Steven Levy, the "original hackers" (those working at MIT) had a small drawer where all the paper tapes could be read, borrowed, changed and altered. Anyone could have access to the box.

    When the university developed their first time-sharing machine (replete with user names and passwords) they hated it. Not for the fact that they were losing computer power (although some would argue this was important) but because information was hidden from other users.

    They accepted the time-sharing box under one condition: users could have passwords, but all user information could be read by any other user. This included admins. So the standard user could change and view the admin's files, and vice versa.

    The tape drawer was reborn.

    One would argue that the modern-day hacker has really lost touch with what hacking is supposed to mean. It's about sharing, and by "locking down" boxes and trying to break into web servers to expose security, we're moving farther and farther away from that ideal. We should go back to the tape drawer, people.

    P.S. Read the book "Hackers" by Steven Levy. You'll be glad you did.

  • SOP for my systems, when installed: by Anonymous Coward (Score:1) Wednesday September 13 2000, @09:23AM
  • Re:Why Cloak ? by Xenix (Score:1) Wednesday September 13 2000, @09:24AM
  • Re:Wewanthackers.com has been up 50 days straight by Demona (Score:2) Wednesday September 13 2000, @09:24AM
  • Re:Hmm... by earlytime (Score:2) Wednesday September 13 2000, @09:52AM
  • Amateurs . . . (Score:3)

    by alhaz (11039) on Wednesday September 13 2000, @09:55AM (#782009) Homepage
    OK, I'm sorry. I shouldn't talk down to people, but that "cloaking debian" article, while definately helpful, smacked of an amateurish failure to fully comprehend how these things work. For starters he has you turn on ip forwarding w/o even mentioning what it's for and letting you decide if you really want it. (tip, unless your linux box is a router, you don't)

    There is a MUCH better free resource on the issue - http://www.linux-fire wall-tools.com/linux/firewall/index.html [linux-firewall-tools.com]

    Run it. Read it. Study it. Compare it with the documentation. OK, just use it, but using it and working with it can help you get a far better grip on what's going on. The script it will generate for you is FAR better at keeping a lid on your network connection.

  • Sounds like the start of new distro to me by Argyle (Score:1) Wednesday September 13 2000, @09:56AM
  • by woods (17108) on Wednesday September 13 2000, @10:00AM (#782011) Homepage
    publicfile is a fabulous package that should really get much more recognition and use. It can do 90% of what most people want from httpd/ftpd servers in a faster and far more secure manner.

    However, one stumbling block for a lot of people is Dan Bernstein's exclusive use of his EPLF [cr.yp.to] format for LIST and NLST requests. This format is a great idea but still isn't very widely implemented by ftp clients including most web browsers; this is why you'll usually just see the raw eplf output on most clients when you do a dir or ls (example [cr.yp.to] eplf output).

    I wrote a patch to publicfile that will cause it to use the more widely accepted /bin/ls format. This will allow it to display properly in most ftp clients and web browsers (example [psu.edu] of patched publicfile ftpd, over 65k modem BTW).

    The patch is at ftp://ftp.essc.psu.ed u/pub/emsei/woods/publicfile_no_eplf.patch [psu.edu]. I don't believe it compromises the security of the package in any way. Please let me know if you find it useful, or have any suggestsions.

    -- Scott
  • Re:Lock down? Why? by ackthpt (Score:2) Wednesday September 13 2000, @10:02AM
  • Re:Windows by nevets (Score:1) Wednesday September 13 2000, @10:03AM
  • "Friendly" security help by Masem (Score:2) Wednesday September 13 2000, @10:04AM
  • Here's the link by bozone (Score:1) Wednesday September 13 2000, @12:31PM
  • Share Information, OK, but what else? by twitter (Score:1) Wednesday September 13 2000, @12:42PM
  • Re:In Other News: by fmoody (Score:1) Wednesday September 13 2000, @12:51PM
  • SSH, anyone? by /ASCII (Score:1) Wednesday September 13 2000, @12:53PM
  • Security In A Nutshell for All Intel CPU's by d.valued (Score:1) Wednesday September 13 2000, @12:59PM
  • Re:GNU system philosophy by Ross C. Brackett (Score:1) Wednesday September 13 2000, @12:59PM
  • Re:Why don't you just use an OpenBSD firewall by eudas (Score:1) Wednesday September 13 2000, @01:00PM
  • St. Peter's firewall by drift factor (Score:1) Wednesday September 13 2000, @01:04PM
  • Re:futile by Hum ho (Score:1) Wednesday September 13 2000, @09:28AM
  • Re:Why don't you just use an OpenBSD firewall by pod (Score:1) Wednesday September 13 2000, @09:31AM
  • Yeah, Mom ... by debrain (Score:2) Wednesday September 13 2000, @09:33AM
  • Re:http://cr.yp.to/ by Cramer (Score:1) Wednesday September 13 2000, @10:05AM
  • How apropriate... (Score:3)

    by nevets (39138) on Wednesday September 13 2000, @09:33AM (#782027) Homepage Journal
    Yesterday, a friend of mine found out (I told him) that he was hacked.

    He first called me to ask me why he can no longer read his vfat filesystem after he mounts it. It seems that the functions (ls, cd, ...) core dump after he access his vfat system. Then he ask (as a side note!) is it normal to have the Transfer and Receive lights of his cable modem flashing while he is not doing anything. This is where I became curious.

    I asked him to do a netstat -a and he told me that he sees a connection to .ksu.edu on port 1025. Looks like he was currently being hacked. I did a nmap on his machine and it was a straight out-of-the-box version of RedHat 6.1, with everything from linuxconfd to webservers to finger open. He just told me he didn't care.

    I helped him reinstall his whole system with only his mp3s stored and we whiped clean his harddrive and reinstalled. I showed him how to use ipchains and to turn off all daemons that he did not use. We also set up a system to perform check sums of his file system to compare it to a check sum on a cdrom.

    With more and more users connecting to the Internet via cable modems and DSL and leaving their machines up 24 hours a day, things like this will happen unless you lock down your system.

    I have to mail him this.
    Steven Rostedt
  • by Bruce Perens (3872) <bruce@pMONETerens.com minus painter> on Wednesday September 13 2000, @09:34AM (#782028) Homepage Journal
    Quoting DJB: If you want to distribute modified versions of qmail (including ports, no matter how minor the changes are) you'll have to get my approval.

    IMO that's a genuine lack of freedom. Next time you have a question like this, would you please leave out the gratuitous insult?

    In his place, I would publicize the checksum of the "official version" and let people do what they want with unofficial versions. I would use a trademark to distinguish official and unofficial versions. Since I started using that strategy for the official Debian CD ISO image, it's worked pretty well.

    Bruce

  • Re:Wewanthackers.com has been up 50 days straight by pod (Score:1) Wednesday September 13 2000, @09:35AM
  • Re:Windows by (trb001) (Score:2) Wednesday September 13 2000, @09:36AM
  • X server by overlord (Score:1) Wednesday September 13 2000, @10:17AM
  • Re:http://cr.yp.to/ by kindbud (Score:1) Wednesday September 13 2000, @10:18AM
  • Re:Why don't you just use an OpenBSD firewall by dvdeug (Score:1) Wednesday September 13 2000, @10:25AM
  • Scotty by Anonymous Coward (Score:1) Wednesday September 13 2000, @08:49AM
  • Why don't you just use an OpenBSD firewall by Hairy_Potter (Score:2) Wednesday September 13 2000, @08:50AM
  • The reason for cloaking by BluedemonX (Score:1) Wednesday September 13 2000, @08:51AM
  • Hmm... (Score:5)

    by Aqualung (29956) on Wednesday September 13 2000, @08:53AM (#782037) Homepage
    I can just see it now....

    root@host#telnet box.host.org 25
    Trying 123.244.244.244...
    Connected to box.host.org.
    Escape character is '^]'.
    220 box.host.org ESMTP Sendmail 8.11.0/8.11.0/NOT DEBIAN I SWEAR!!!!! 8.11.0-1; Wed, 13 Sep 2000 13:47:29 -0500

    Script Kiddie:Curses, foiled again!

    :-)

    ----
    Dave
    MicrosoftME®? No, Microsoft YOU, buddy! - my boss
  • Re:Windows (Score:3)

    by bartjan (197895) <{ten.knileirv} {ta} {najtrab}> on Wednesday September 13 2000, @08:53AM (#782038) Homepage
    Securing a windows box is easy: remove all cables connected to it.
  • Active defense against portscanning by rxmd (Score:1) Wednesday September 13 2000, @01:05PM
  • Re:The reason for cloaking by BluedemonX (Score:1) Wednesday September 13 2000, @08:53AM
  • Dangerous strategy! by YKnot (Score:1) Wednesday September 13 2000, @01:17PM
  • http://cr.yp.to/ (Score:3)

    by Russ Nelson (33911) on Wednesday September 13 2000, @08:53AM (#782042) Homepage
    If you want secure servers, run Dan Bernstein's software. Three of the top ten programs on SANS's list of security holes include bind, sendmail, and ftp servers. Dan has secure replacements for all of them.
    -russ
  • by G27 Radio (78394) on Wednesday September 13 2000, @01:20PM (#782043) Homepage
    The cloaking article says "they can't crack what they can't find"... and sadly I think it's very true. My home small network has a firewall with only ssh2 open. I get portscanned about 3 times a day. I think my setting is pretty secure, but I might always have a security hole somewhere. However, script kiddies will not bother with my computer because so many others are fully open.

    I get scanned that many times an hour at times (probably because people know my subnet is all cablemodems.) One day I decided to run nmap on the IP's as they scanned me. On about the third IP address I that nmapped I found an open port 139. So for kicks I connected to it with a null login and password from an Win2k box I was testing. His entire C: drive, CDROM, and CDR were wide open. How convenient of him to leave a guest account for the people he scanned to find out more about him. I got bored fast (sharing over tcpip was way slow) so I didn't bother to read through his homework, but I did download a photo of him and his mother. I should've mailed it back to him from a hotmail account and told him he's an idiot. Disclaimer: Before you even think about trying this yourself, consider that the machine may be a honeypot owned by a hacker. Documents and executables may contain trojans.

    Considering how quickly I got scanned by a script kiddie whose own system was wide open, I have to wonder is this the average skill level of a script kiddie?

    There is an excellent radio show available online called Info.sec.radio. It's available on SecurityFocus.com [securityfocus.com] under the Audio/Visual Media section. They do a one hour show every two weeks. They've got some cool interviews: the RCMP officer that busted the welsh hacker, and most recently Kevin Mitnick himself. They also have done a feature on Hacking Through the Ages which is a historical perspective on hacking. Every show they do a segment on new vulnerabilities.

    I wasn't expecting much but now I'm addicted. They do an excellent job of providing a lot of information quickly. I think what suprised me the most was that the show moves quickly and is not boring at all. If you have any interest in securing/cracking systems you'll be glad you checked it out (IMO).

    Requires Realaudio :|

    numb
  • Re:Wewanthackers.com has been up 50 days straight by Evil_Way (Score:1) Wednesday September 13 2000, @01:59PM
  • Re:Windows by magnetx11 (Score:1) Wednesday September 13 2000, @08:55AM
  • Re:GNU system philosophy by jbridge21 (Score:1) Wednesday September 13 2000, @02:13PM
  • Re:Security != "security_from_script_kiddies" by PhiRatE (Score:2) Wednesday September 13 2000, @02:20PM
  • by PhiRatE (39645) on Wednesday September 13 2000, @02:37PM (#782048)
    Just a few notes:

    Always enabled ip_forwarding _after_ you have initialised your firewall, in this case, move the echo to ip_forward at the top down to the bottom of the script. The reasoning behind this is that without such a move, there is a short window during which your system will forward but your firewall is not in place, thus if the attacker somehow manages to reboot your firewall they can get through into your internal network in the clear. Certainly in this case this is a very small risk, but its a trivial change and good for completeness.

    The best security policies are built from the "deny first, accept later" method. You should set the default policy on your network to DENY, and then accept what you need, not the other way around as you have done here. Yes this requires a lot more work, since you have to really figure out what you need to access, but it remains far more secure against unanticipated future attacks and insecure internal machine configurations (ie, leaving on a service that you didn't mean to).

    You should always drop martians on a firewall as well, a martian is a packet that has an address that should not be possible, this includes broadcast addresses you don't want, 192.168.* from the internet, 10.* from the internet, any addresses you have inside the firewall, etc. For complete lists check out places like securityfocus, they have some good resources, the iptables and ipchains sites have good information as well.

    Again, only accept in packets addressed to legal accessible hosts, only send out packets addressed from legal sending hosts.

    If at all possible, create a real internal network setup (ie, a 192.168.* address space), and use NAT (available in iptables and ipfilter and to some extent in ipchains) to translate these to external, this causes even more difficulty for IP based assaults as internet and internal packets must be explictly converted before they are effective in either network, giving another layer of security. This also follows on to greater security possibilities such as a public and private DNS (one outside, and one inside, that give out only the relevant information, revealing little about your network structure), binding many services at the firewall and using port based NAT to forward different ports to different hosts (confusing the attacker, making more efficient use of network resources including clustering, and causing many multi-service exploits to fail).

    If possible, a reasonable variation in the operating systems used can be helpful as well, don't use an O/S you're not familiar with, you're more likely to make a critical mistake in securing the box, but if you're familiar with OpenBSD and Solaris, use both rather than aiming for a single-os network, it improves the odds of partial network survival in the event of operating system-specific exploits. This includes architectures too, most buffer overflow exploits come out for x86 systems, so having a PowerPC or MIPS system instantly improves your odds against those attacks.

    All in all its a balancing game, but you can certainly make life extremely hard for those attempting to penetrate your network at many levels.
  • Re:Security != "security_from_script_kiddies" by G27 Radio (Score:2) Wednesday September 13 2000, @02:51PM
  • Re:Two easy questions to decide on most secure OS by Rumble (Score:1) Wednesday September 13 2000, @02:55PM
  • Re:http://cr.yp.to/ by alhaz (Score:2) Wednesday September 13 2000, @09:42AM
  • Re:Can "cloaking" hide from nmap -O ? by noeld (Score:2) Wednesday September 13 2000, @09:45AM
  • Is it more secure than other secure systems? by Christopher B. Brown (Score:2) Wednesday September 13 2000, @10:29AM
  • Re:The reason for cloaking by Cramer (Score:1) Wednesday September 13 2000, @09:51AM
  • by AliasTheRoot (171859) on Wednesday September 13 2000, @10:32AM (#782055)
    The license he distributes his software is his business, just because it doesn't mesh with the prevalent ideology here on /. doesn't make it bad.

    Me, I couldn't give a rats ass what license something is distributed under, it's just not important to me in the selection process.

    Tools for the job.
  • by Ross C. Brackett (5878) on Wednesday September 13 2000, @10:36AM (#782056) Homepage
    I think things have changed a bit now, but you're right -- GNU software design certainly reflects this paradigm, even in today's modern security-paranoid age. Here's a great few paragraphs I've excerpted from the GNU sh-utils manual from '96 (I kid you not)

    ----

    Why GNU su does not support the `wheel' group
    (This section is by Richard Stallman.)

    Sometimes a few of the users try to hold total power over all the rest. For example, in 1984, a few users at the MIT AI lab decided to seize power by changing the operator password on the Twenex system and keeping it secret from everyone else. (I was able to thwart this coup and give power back to the users by patching the kernel, but I wouldn't know how to do that in Unix.)

    However, occasionally the rulers do tell someone. Under the usual su mechanism, once someone learns the root password who sympathizes with the ordinary users, he or she can tell the rest. The "wheel group" feature would make this impossible, and thus cement the power of the rulers.

    I'm on the side of the masses, not that of the rulers. If you are used to supporting the bosses and sysadmins in whatever they do, you might find this idea strange at first.

    ----

    I didn't know if I should shake my head and weep or pump my fist "right-on" style and start a food collective. It wasn't exactly the answer to the question I was looking for, but it is one of the cooler things I've ever seen in a software manual.
  • Re:Is it as simple as a firewall? by penguinboy (Score:1) Wednesday September 13 2000, @10:36AM
  • by dpilot (134227) on Wednesday September 13 2000, @10:42AM (#782058) Homepage Journal
    Cloaking seems to be a great idea, but it falls on a few counts. First off, you really shouldn't block all ICMP messages. You really do need some of them for efficient operaion. I don't know if the ones that need to be open can be used in a ping-like fashion, but I wouldn't put it past someone to figure out a way.

    Second, you really need at least some opening for IDENT, or else you'll get terrible throughput on your email. You can filter based on the source IP, but that can be spoofed. (Of course the responses then go to the mailrelay...) Some web sites seem to generate IDENT requests, but I'm not sure what they do if you DENY them.

    This is even before we get to scans with illegal packets. I'm under the impression that there are some scans that will get responses from some firewalls even if a port is "stealthed".

    In general, it just might be better to look "boringly visible" and offer no services, just closed ports. Nothing to offer, nothing to hide. At the same time, it would be useful to get the kernel patch that lets you change your TCP fingerprint - make your box look like OS/2, for instance.

    The situation will change when Kernel 2.4 gets out with netfilters. Stateful filtering will make it possible to DENY more effectively if you want to fly with "stealth", and the general architecture should make it easier to look boring, including changing the TCP fingerprint. (Netfilter or ipchains will allow you to offer ports to some IPs while hiding from others, netfilters will just let you do a better job of it.)
  • Re:Why don't you just use an OpenBSD firewall by Karn (Score:1) Wednesday September 13 2000, @10:44AM
  • Seawall by Bob McCown (Score:1) Wednesday September 13 2000, @08:55AM
  • Wewanthackers.com has been up 50 days straight by Bruce Perens (Score:2) Wednesday September 13 2000, @08:56AM
  • Can "cloaking" hide from nmap -O ? by swb (Score:2) Wednesday September 13 2000, @08:57AM
  • To cloak or not to cloak by booyah (Score:1) Wednesday September 13 2000, @08:57AM
  • by JPS (58437) on Wednesday September 13 2000, @08:58AM (#782064) Homepage
    The cloaking article says "they can't crack what they can't find"... and sadly I think it's very true.

    My home small network has a firewall with only ssh2 open. I get portscanned about 3 times a day.
    I think my setting is pretty secure, but I might always have a security hole somewhere.
    However, script kiddies will not bother with my computer because so many others are fully open.

    Securing a network against SK is fairly easy because you just need to be more secure than the norm. Securing a network for real is certainly harder.
  • Good to se emore info like this by LordLamer44th (Score:1) Wednesday September 13 2000, @08:59AM
  • by mjg (21046) on Wednesday September 13 2000, @02:59PM (#782066)

    There is a patch available here [sourceforge.net] called the Linux IP Personality patch. It adds features to netfilter in the 2.4 kernel series which gives you the ability to change the network fingerprint, so you can, for example, fool nmap.

    So yes, you can make your box look like OS/2 pretty easily.

  • As with most security articles..... by dotaubob (Score:1) Wednesday September 13 2000, @02:59PM
  • ipchains rules by Dionysus (Score:2) Wednesday September 13 2000, @03:03PM
  • Re:futile by Karn (Score:1) Wednesday September 13 2000, @10:48AM
  • Re:Why don't you just use an OpenBSD firewall by mindstrm (Score:2) Wednesday September 13 2000, @03:26PM
  • Re:Security != "security_from_script_kiddies" by hedley (Score:1) Wednesday September 13 2000, @10:49AM
  • Re:Windows by nevets (Score:1) Wednesday September 13 2000, @10:52AM
  • Re:Yeah, Mom ... by fsck (Score:1) Wednesday September 13 2000, @03:34PM
  • Re:Lock down? Why? by Vassily Overveight (Score:2) Wednesday September 13 2000, @10:52AM
  • "Cloaking" Debian by Garpenlov (Score:1) Wednesday September 13 2000, @11:02AM
  • by Bruce Perens (3872) <bruce@pMONETerens.com minus painter> on Wednesday September 13 2000, @09:00AM (#782076) Homepage Journal
    Dan is a pretty interesting guy. I just wish he would change his take on licensing. None of his replacements for other programs have OSD-compliant licensing, as far as I'm aware, and IMO his reasons for that aren't good enough. The result is that people write replacements for his replacements! The Postfix mail delivery agent is a good example of this.

    Bruce

  • Social Engineering (Score:5)

    by zpengo (99887) on Wednesday September 13 2000, @09:00AM (#782077) Homepage
    It always comes down to the human element, though, which is the part that the 1337 h@x0rz and skr1p7 k1dd13z never quite figure out. The great crackers went beyond mundane knowledge of how to open a box to use creativity, psychology, and human nature to get people to give up the goods. I've been made a fool once or twice, but each time I let myself get talked into it. A box is only as secure as its administrator is paranoid.

  • Re:Windows by Kierthos (Score:1) Wednesday September 13 2000, @09:00AM
  • Re:Why don't you just use an OpenBSD firewall by Luke (Score:1) Wednesday September 13 2000, @09:00AM
  • All I have to say: by pb (Score:1) Wednesday September 13 2000, @09:02AM
(1) | 2