Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Security Businesses OS X Operating Systems Apple

OS X Leopard Firewall Flawed 300

cycoj writes with a report in the German IT magazine Heise, taking a look at the new OS X Leopard firewall. They find it flawed. When setting access to specific services and programs to only allow SSH access, for example, they found that a manually started service was still accessible. From the article: "So the first step after starting Leopard should be to activate the firewall. The obvious choice to do so is the option to 'Set access to specific services and programs,' which promises more control over network traffic. Mac OS X automatically enters all shared resources set up by the user, such as 'Remote login' for SSH servers, into the list of accessible resources... However, initial functional testing quickly dispels any feeling of improved security. A service started for testing purposes was able to be addressed from outside without any difficulty. The firewall records this occurrence... Even with the firewall set to 'Block all incoming connections' ports to netbios, ntp and other services were still open... Specifically these results mean that users can't rely on the firewall."
This discussion has been archived. No new comments can be posted.

OS X Leopard Firewall Flawed

Comments Filter:
  • by jellomizer ( 103300 ) * on Tuesday October 30, 2007 @03:11PM (#21174973)
    Leson 1.
    Never Trust Software firewalls. Software firewalls are only should be used in protection against "internet static" attacks. Where just random worms and viruses are trying to get in. Software Firewalls
    Are normally bad against direct attacks from real hackers. Because there are so many ways to trick the user to install software to get around it...

    Lesson 2.
    Never trust anyone to keep security up. Apple, Microsoft, Linux Distributions, even Open BSD they are all made by humans and humans make mistakes and forget to check out things...

    Lesson 3.
    Always keep a hardware firewall even if it is a cheap Linksys Firewall/Router they will double up protection and keep your system relatively safe.

    Lesson 4.
    Never assume that you are 100% safe. There are always ways around things...
  • by solosaint ( 699000 ) on Tuesday October 30, 2007 @03:27PM (#21175213)
    most powerusers I know use Little Snitch ... its better than the firewall apple includes
  • by Cecil ( 37810 ) on Tuesday October 30, 2007 @03:35PM (#21175351) Homepage
    Couldn't you argue that more layers = more possibilities for attack vectors?

    That would only apply if breaking one link in the chain is as good as breaking all the links in the chain - ie, if they give special accomodations to one another because they are all part of the "same network" or one contains passwords to the others or something of that nature. In this case that should not happen, thus you must break each link in succession to get through.

    Also, FYI, a hardware firewall is just a dedicated software firewall.

    The key word here is "dedicated". A dedicated firewall means you are not installing other software on it which could compromise the firewall itself (either intentionally or through poor design), and it also means that should a hacker somehow break into the firewall, your losses are limited as they have not also gained entry to your files, your passwords, your keyboard, your browser, etc and they cannot rootkit your PC. They only get a tiny, wimpy processor with little-to-no storage and complete network access. Dangerous, yes, but not a complete disaster.
  • by Zenaku ( 821866 ) on Tuesday October 30, 2007 @03:37PM (#21175371)
    If the the layers of security are really layers of security, then no you couldn't argue that. You have to breech the outtermost layer before you can even attack the second layer, and you have to breech that layer before you can attack the third, etc.
  • by toleraen ( 831634 ) on Tuesday October 30, 2007 @03:41PM (#21175425)
    My Linksys router runs a Linux based software firewall.
  • Re:As any new OS (Score:1, Informative)

    by El Lobo ( 994537 ) on Tuesday October 30, 2007 @03:42PM (#21175455)
    Oh boy, say bye to your karma...
  • by venicebeach ( 702856 ) on Tuesday October 30, 2007 @03:48PM (#21175541) Homepage Journal
    "All applications shipped with Leopard are signed by Apple, and third-party software developers can also sign their applications."
  • Re:As any new OS (Score:5, Informative)

    by croddy ( 659025 ) * on Tuesday October 30, 2007 @03:50PM (#21175565)
    "Defective by design" is not typically used to refer to "any defective technology, har har", except by a few folks here on Slashdot. "Defective by Design" is a campaign of the FSF, referring specifically devices or software that are deliberately crippled with DRM. see defectivebydesign.org [defectivebydesign.org].
  • by Kadin2048 ( 468275 ) * <slashdot.kadin@xox y . net> on Tuesday October 30, 2007 @03:52PM (#21175593) Homepage Journal
    I'm not 100% sure on this, but if it uses the same certificate framework that's been present in OS X up until now (which I can't see why it wouldn't, honestly), it will mean having the CA for the signing certificate in as a trusted root. I assume Apple will have its own CA cert in there by default, but there will probably be a way that users can add other certificates as they see fit. I doubt this will be easy to do, because you don't want idiots doing it because it's easy to do and basically trojaning their own systems (e.g. "To install BigBoobsPorn.app, first download xyz.p12, and install it in your X509Anchors keyring..."), but I suspect that there's no technical reason why you can't do this.

    That said, according to what I've read from some people, the security might not even be that rigorous; it might be more about making sure that only the developer of an application can update it automatically (so it's more difficult for an attacker to create an update that 'fixes' your copy of Mail.app or some other approved program to do evil things) than making sure each developer has been vetted by Apple or some other Higher Authority.

    There is a posting from someone who supposedly has access to the Leopard previews over at ThinkMac basically saying this:

    I can't tell you much without (totally) violating my WWDC NDA, but suffice it to say that this is not as bad as you think it is.

    Anyone at all can easily make a new signing identity and use it to sign an application they just compiled.

    The main objective of code signing in Leopard is not the same as for SSL certificates -- it is not to evaluate the trust or confidence of something based on a list of trusted certificate authorities.

    Rather, it is to provide a much better means for users to identify applications. A good example is software updates. Right now, if a user updates your application, and your application asks for an item the user's keychain, the user will get a Keychain warning telling him the application has changed.

    With code signing, the user will get that dialog once the first time he or she runs your application, and if you sign every future versions of that application, the system will not bother the user again, because instead of using for example a hash of the application, it will now be using the code signature.
    (source [thinkmac.co.uk])
  • by Abjifyicious ( 696433 ) on Tuesday October 30, 2007 @03:57PM (#21175679)
    Tagging this "defectivebydesign" doesn't make any sense here at all, whether or not Apple's a monopoly. "Defective by design" is a phrase coined to describe DRM encumbered products, because they really are designed to be that way. A defect in a firewall is most definitely not intentional. Unfortunately, "defective by design" has lost its roots, and has become a phrase that is mindlessly repeated by the slashdot hoards whenever any product has any problem with it whatsoever. Obviously it couldn't be due to oversight or incompetence, Apple must have intentionally gone out of their way to make a flaw in their firewall because they're evil. /sarcasm
  • by Have Blue ( 616 ) on Tuesday October 30, 2007 @03:59PM (#21175705) Homepage
    If you have specific advanced requirements like that, pop open the command line and enter it into the config yourself. The "firewall preferences" screen is just a wizard on top of ipfw.
  • by Anonymous Coward on Tuesday October 30, 2007 @04:00PM (#21175727)
    The firewall maintained by the OS is, at best, a weak packet filtering defense when compared with a stand-alone, in-the-network firewall. The problem is that the on-board firewall is always at the mercy of the OS; anything with sufficient privileges can tamper with it. (Yes, I know of exceptions like FreeBSD's security levels, but that sort of defense is rare on most desktop computers.) A real network firewall
    1. sits inline in the network path
    2. is completely stand-alone, and not directly affected by changes to users' desktop environments
    3. is capable of moderately fine-grained access controls
    4. does not supplant other security measures, e.g., keeping your systems patched, practicing sanitary computing, etc.


    Ideally, a firewall also
    1. can do stateful inspection
    2. has some higher level awareness on the OSI stack (e.g., it can tell something might be amiss if it sees an SSH session being negotiated on 80/tcp and can react accordingly)
    3. can have a management interface that's completely separate from the interfaces on which it applies its rulesets


    Although I loathe analogies, in cars a real firewall sits between the dangerous (engine) and habitable (passenger) compartments, has a few holes poked in it to allow certain things through (throttle controls, wiring, etc.), and hopefully blocks everything else. The counterpart to a "software firewall" in such a case would be a piece of sheet metal between the engine and passenger compartments that spontaneously opened new holes whenever someone turned on the A/C, played a CD, or unfastened their seat belt. That's NOT A FIREWALL!
  • by frodo527 ( 614767 ) on Tuesday October 30, 2007 @04:03PM (#21175761) Homepage
    I use Little Snitch on my MacBook Pro (still running Tiger) becsuse OS X's built-in firewall doesn't configure or notify you about outbound connections. The problem reported in the OP about Leopard's firewall concerns inbound connections. Little Snitch doesn't do anything about those. IOW, Little Snitch complement's OS X's firewall but does not replace it.
  • by juct ( 549812 ) <ju@heisec.de> on Tuesday October 30, 2007 @04:22PM (#21176045) Homepage
    Yes you are missing something.

    I run all tests from a linux machine. Look at the packet dumps. It shows two machines communicating over a network.
    Look at the IP address given as an argument to ntpdate -- it is a public IP of an ISP that I queried from our company network.
    Look at the quoted logfile entries. All of them show that the tests have been run from external machines.

    bye, ju
  • I am not convinced (Score:5, Informative)

    by avatar4d ( 192234 ) on Tuesday October 30, 2007 @04:23PM (#21176061)
    This article is a bit fishy in its interpretation. They don't list their expectations vs the results.. They just make assumptions. For instance:

    Users who want to raise their security level might choose the option "Block all incoming connections" - in the hope that this really will reject all incoming queries to network services.


    Which it appears to do if you look at the quote below. They show a deny in their logs. Seems to work so far.

    The initial tests looked promising. The SSH server activated for testing purposes and the primitive demo backdoor could no longer be accessed from outside. The firewall even blocked access to a test server on a UDP port:

    Oct 29 11:26:49 Qf98e Firewall[44]: Deny nc data in from 193.99.145.XXX:28524 uid = 0 proto=17

    However, a simple port scan was enough to destroy our misplaced optimism:

    # nmap -sU 192.168.69.21
    PORT STATE SERVICE
    123/udp open|filtered ntp
    137/udp open|filtered netbios-ns
    138/udp open|filtered netbios-dgm
    631/udp open|filtered unknown
    5353/udp open|filtered zeroconf
    MAC Address: 00:17:F2:DF:CD:B3 (Apple Computer)


    They are now basing an assumption (or marketing spin) because of output from an Nmap scan. This just indicates a flaw in the signature Nmap has (or the lack thereof) for this particular firewall implementation.

    Then straight from NMAP's documentation:

    "Nmap reports the state combinations open|filtered and closed|filtered when it cannot determine which of the two states describe a port." -(http://insecure.org/nmap/man/ [insecure.org])

    And as for the NTP response being received, well that goes back to what we should expect to see. Apple is about usability. I would suspect that "Block all INCOMING connections" to not refuse information that I request. Basically this just does ingress filtering and not egress.

    I haven't read the entire article yet, but from my brief scan I don't see how this is not a "functioning" firewall.
  • by Todd Knarr ( 15451 ) on Tuesday October 30, 2007 @04:25PM (#21176095) Homepage

    I notice in their report that they complain about services Nmap lists as "open/filtered". Nmap reports that result when it encounters a port that elicits no reply whatsoever to a probe. This happens only when a firewall is dropping all traffic to a port and not generating any ICMP error packet for the attempt. The TCP spec says if a port isn't open the client should get an ICMP error, so Nmap knows that there's something there even if access to it's being blocked. If this is any indication of the quality of this "analysis", we can discount the article.

  • by mkiwi ( 585287 ) on Tuesday October 30, 2007 @04:26PM (#21176097)
    I've read too many posts to ignore this.

    [Rant]

    There is no such thing as a purely hardware firewall in modern times.

    The hardware like a Cisco pix has software (i.e. firmware) running on top of a simple (usually Linux or bsd architecture). A true hardware firewall is John or Jane sitting at a switchboard plugging in and unplugging cables, like way back when telephones first existed. You could also theoretically unplug the networking cable every-so-often to get a firewall-like effect, but the bottom line is that there is something (a brain) that decides what goes in and what goes out. The brain is a bunch of code (software) that is the firewall.

    Hell, create a searing flame capable of burning anyone to death who dare walks through it- that's the literal definition of a firewall. The heat caused by the burning of wood or something else is a "hardware" firewall.

    [/Rant]

  • by Anonymous Coward on Tuesday October 30, 2007 @04:43PM (#21176285)
    Actually, no, the literal definition of a firewall is a wall built to block the spread of fire, like the wall between the engine and passenger sections of a car. Not a wall made of fire, lol.
  • by gatekeep ( 122108 ) on Tuesday October 30, 2007 @05:10PM (#21176633)
    The UI is saying "I'm blocking all connections" even though it isn't.

    Well technically, the only examples this article provides are of UDP services listening. So there's no evidence that the firewall is allowing 'connections'

    I agree that to the end user connections probably means something different, but in the world of network protocols it has a very specific meaning, which doesn't include UDP services by definition. The only way for the firewall to deny inbound UDP sessions would be to fake connection state for these protocols. Many popular commercial enterprise class firewalls do just this, but I'm not surprised that a desktop firewall isn't doing it.
  • This is on OSX 10.4. I wanted to share an internet connection (internet to eth0, then the airport card serving as a gateway for 2 laptops and an iphone to access the internet). All peachy, but this stupid OS does not let me do it unless I also setup an apache webserver?!?!?!
    What the fuck are you smoking?

    I'm sitting here on my Macbook sharing my 3G connection from my phone over WiFi to a few of my coworkers' laptops, and Apache is certainly not running. Currently I'm on 10.5, but I never had to turn it on with 10.4 either.
  • by toleraen ( 831634 ) on Tuesday October 30, 2007 @05:49PM (#21177053)
    I had been using a WRT54G, but I retired it for Buffalo WHR-HP-54G. I've been using DD-WRT [dd-wrt.com] on both of them, and it's been pretty solid. V24 is looking to be a pretty good release too.
  • by 644bd346996 ( 1012333 ) on Tuesday October 30, 2007 @05:52PM (#21177089)
    You must be new here (despite your UID). The Linksys WRT54G and derivatives has been the most popular 802.11b/g/etc. router for years (since 2003, according to wikipedia). One of the reasons for its popularity is that it runs Linux, and there are many projects offering customized firmware, such as DD-WRT and OpenWRT. This has been popular enough that when Linksys chose to switch to VxWorks and halve the amount of flash, they released the WRT54GL with the old hardware configuration specifically for people wanting to modify the firmware.

    If you pick up one of the models with a USB port, you can trivially expand its storage capacity, although the built-in RAM and Flash is usually sufficient.
  • by adavidw ( 31941 ) on Tuesday October 30, 2007 @05:52PM (#21177093)
    You want a WRT54G, which can be had dirt cheap, and be flashed to many specialized Linux distributions, some of which have LEAF. One example is http://openwrt.org/ [openwrt.org].

    Anybody still running an old standalone computer as a Linux software firewall probably pays enough in electricity to buy a new WRT54G or similar router every few months.
  • by Todd Knarr ( 15451 ) on Tuesday October 30, 2007 @06:04PM (#21177237) Homepage

    No. It means that the firewall's black-holing (dropping without generating any ICMP response) all packets to ports 80 and 443. It can do this whether or not a Web server's running.

  • by ChrisA90278 ( 905188 ) on Tuesday October 30, 2007 @06:42PM (#21177629)
    So you buy a Lynksys "hardware" fire wall. What's inside? There is a CPU, some RAM, an operating system, likely VxWorks and some software. There are no truely hardware-only firewalls.

    And then what does a fire wall do? If the computer is configured corectly there is no need for a firewall. Firewals are just the "suspenders" part of a "belt and suspenders" security system. And even then the virus comes in via email and the web which your fire wall lets in.

    That said, I use redundant layers of protection and then tripwire-like detection
  • by dpninerSLASH ( 969464 ) * on Tuesday October 30, 2007 @07:33PM (#21178123) Homepage
    By default DNS will fall back to TCP for requests if it receives no response via UDP.
  • Unlike Windows, OSX does not run with services enabled unless you explicitly enable them.

    It sounds like if you don't enable a service, it doesn't enable the firewall rules for that service. If you do enable the service, then it turns on the firewall rules for that service. This is not a problem unless you install a third-party program that provides the same network service, *and* you want to restrict access to it.

    The argument in the article that the firewall would prevent a trojan from opening a listener on a low port is bogus, because any program that can open a listener on a low port can also remove the corresponding firewall rule... you have to be root to do either.

    The fact that Samba processes were still running after sharing was turned off, however, is a concern. That absolutely should not happen, and Apple needs to fix it.

    The workaround is to make sure that after you disable a service, you reboot to make sure it is really disabled. If you don't enable any services that should not be an issue.
  • by amoney ( 1182457 ) on Wednesday October 31, 2007 @03:53PM (#21187863)
    In OS 10.4 Tiger, in order to block UDP traffic, one had to click on the Advanced tab in the Firewall pane and select "block UDP traffic" otherwise the firewall would only block TCP traffic. If you notice in the article, all the open ports are UDP. I don't have a copy of Leopard yet, but given that the author didn't mention anything about the advanced tab I wouldn't be surprised if it's still the same for Leopard and that he didn't make this selection.

    Blocking UDP traffic in 10.4:

    http://docs.info.apple.com/article.html?path=Mac/10.4/en/mh1242.html [apple.com]

The only possible interpretation of any research whatever in the `social sciences' is: some do, some don't. -- Ernest Rutherford

Working...