Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Security Bug Google Windows

Abusing Symbolic Links Like It's 1999 54

An anonymous reader writes with this snippet from James Forshaw's recent post at Google's Project Zero, which begins For the past couple of years I've been researching Windows elevation of privilege attacks. This might be escaping sandboxing or gaining system privileges. One of the techniques I've used multiple times is abusing the symbolic link facilities of the Windows operating system to redirect privileged code to create files or registry keys to escape the restrictive execution context. Symbolic links in themselves are not vulnerabilities, instead they're useful primitives for exploiting different classes of vulnerabilities such as resource planting or time-of-check time-of-use. Click through that link to see examples of this abuse in action, but also information about how the underlying risks have been (or can be) mitigated.
This discussion has been archived. No new comments can be posted.

Abusing Symbolic Links Like It's 1999

Comments Filter:
  • by Gravis Zero ( 934156 ) on Saturday August 29, 2015 @05:01PM (#50417479)

    it seems to me that we can stop shit commercial software from being published if governments set up a mandatory bug bounty systems. it's simple, you demo the exploit and get money based on the severity and the company making the software must pay it and has X days to fix it before paying the fine again. this would result in either better education on how to find exploits, better Q/A mechanism or companies going under. frankly, i don't care which happens as long as commercial software is held accountable for bad code.

    • Why only commercial?
      • by sjames ( 1099 )

        Because if it's gratis there is no implied warranty of merchantability. If it's proper Free software (not tivoized), anyone can fix the bug.

        If it's proprietary, there are implied warranties on it and only the creator has the source needed to fix it.

        • Good luck imposing this. You will simply kill the proprietary software in this jurisdiction.
          • by sjames ( 1099 )

            If the jurisdiction is large enough, I doubt it. For example, Europe or North America.

          • You will simply kill the proprietary software in this jurisdiction.

            You say this as though it's a bad thing...

            • Yes, it is bad. Even bad for the free software.
        • Re:we can fix this (Score:5, Informative)

          by bmo ( 77928 ) on Saturday August 29, 2015 @06:19PM (#50417853)

          If it's proprietary, there are implied warranties on it

          Since when?

          Microsoft excludes all implied warranties and conditions, including those of merchantability, fitness for a particular purpose, and non-infringement.

          Bolded in the eula itself.

          --
          BMO

          • by bmo ( 77928 )

            https://www.microsoft.com/en-u... [microsoft.com]

            Forgot to put in the web page.

            --
            BMO

          • by sjames ( 1099 )

            We are entitled to disallow that disclaimer by law should that be desired.

          • I think it depends on where you are and what is being done [ca.gov]. Some places have restrictions on what companies can deny responsibility for, so there is usually (not bothering to look it up this time) a clause in the EULA saying the if part of it is invalidated, the rest still applies.

            "There should be a law" is, perhaps, a better starting point. I've thought on this topic for a while and have some ideas about what should happen and how and when, but I am sure I'm missing some important issues and my wording nee

          • Also from : https://www.microsoft.com/en-u... [microsoft.com]

            If your local law allows you to recover damages from Microsoft even though this agreement does not, you cannot recover more than you paid for the software (or up to $50 USD if you acquired the software for no charge).

            From country where I come from (Slovenia) I have checked and i can confirm that software is #1 product that is least regulated product. One is by law unable to get refund on open CD and costumer protective laws does not apply for software. I think that is legally allowed to sell software on blank CD without any data. Software is single product on market that is 100% unregulated.

    • Re:we can fix this (Score:5, Insightful)

      by Calydor ( 739835 ) on Saturday August 29, 2015 @05:18PM (#50417573)

      The end of your post combined with your signature is comedy gold, mate.

    • Re: (Score:1, Funny)

      by Anonymous Coward

      Your ideas are just like the ideas for fixing spam. I am sure my fellow slashdoters can help fix up the list...

      Your post advocates a

      ( ) technical ( ) legislative ( ) market-based ( ) vigilante

      approach to fighting spam. Your idea will not work. Here is why it wonâ(TM)t work.
      (One or more of the following may apply to your particular idea, and it may
      have other flaws which used to vary from state to state before a bad federal
      law was passed.)

      ( ) Spammers can easily use it to harvest email addresses
      ( ) Mail

    • by Anonymous Coward
      OK, sounds fine. And non-commercial software authors should just be jailed for their bugs since they have no money to pay the fines. Let's do it. Oh, you only hate COTS software and think FLOSS is golden? Join the real world. There is a place for both types of software and other places where both may suck.
  • by Daetrin ( 576516 ) on Saturday August 29, 2015 @06:51PM (#50417997)
    [This person is an expert at hacking systems using links!]

    "Click through that link to see examples of this abuse in action"

    o_O

    (And yes, i'm aware that URL links are not the same as symbolic links, but the phrasing is still amusing.)

    .
  • by innocent_white_lamb ( 151825 ) on Saturday August 29, 2015 @06:52PM (#50418003)

    I never realized that Windows uses a unix-like file hierarchy.

    According to the article, drive C: is actually a symbolic link to \Device\HarddiskVolume4, COM3 is \Device\Serial0 and so on.

    I'm surprised, frankly. My exposure to Windows is pretty much nil (and I like it that way) but I always assumed that the the C: drive and COM: stuff was a completely different way of accessing the devices and whatnot than what Unix uses. Apparently, it's actually quite similar once you get under the hood.

    Learn something new every day....

    • by Anonymous Coward

      According to the article, drive C: is actually a symbolic link to \Device\HarddiskVolume4, COM3 is \Device\Serial0 and so on.

      I knew about that, but I've always wondered what the namespace was for things like S-1-5-21-nnnnnnnn-nnnnnnnnn..." [microsoft.com] that I see in $RECYCLE.BIN and elsehwere whenever I poke under the hood. Neat.

    • I never realized that Windows uses a unix-like file hierarchy.

      According to the article, drive C: is actually a symbolic link to \Device\HarddiskVolume4, COM3 is \Device\Serial0 and so on.

      I'm surprised, frankly. My exposure to Windows is pretty much nil (and I like it that way) but I always assumed that the the C: drive and COM: stuff was a completely different way of accessing the devices and whatnot than what Unix uses. Apparently, it's actually quite similar once you get under the hood.

      Learn something new every day....

      The NT object manager, doesn't that have more in common with VMS than UNIX?
      Linux's sysfs is similar, in ways, but neither of these are unix-like unless... um, all hierarchies of objects are unix-like?

      If you're sincerely interested in OS internals, you should expose yourself to other systems without prejudice. Otherwise, everything "tastes like chicken".

  • by Anonymous Coward

    It's a symlink into a systemd managed ntwork configuration repository, until the user breaks the link deliberately or accidentally with a text editor or configuration tool like puppet, cfengine, Chef, BladeLogic, Tuttle, or anyone else's homebrew server configuration tools, and then it *stays* broken permanently. See https://wiki.archlinux.org/ind... [archlinux.org]

    Once gain, Mr. Pottering fails to understand the File System Hierarchy and why you don't dink with other people's stable tools.

  • by turbidostato ( 878842 ) on Saturday August 29, 2015 @07:26PM (#50418157)

    On proper time Windows has added symlinks, a (somehow) worthwhile command line, non-graphic environment, the ability to remotely manage, declarative-based configuration management...

    It's only they are reinventing all these things on their own, forgetting about how did they came to be and, of course, not caring about the way those facilities have been used and abused in the past.

    I think it was Henry Spencer the one that said "Those who do not understand Unix are condemned to reinvent it, poorly."

    • by lucm ( 889690 ) on Saturday August 29, 2015 @08:44PM (#50418397)

      On proper time systemd has added symlinks, a (somehow) worthwhile command line, non-graphic environment, the ability to remotely manage, declarative-based configuration management...

      It's only they are reinventing all these things on their own, forgetting about how did they came to be and, of course, not caring about the way those facilities have been used and abused in the past.

      I think it was Henry Spencer the one that said "Those who do not understand Unix are condemned to reinvent it, poorly."

      Hehe

  • Was that a major problem in 1999, or are you just being a "trendy" asshole by adding "like it's 1999" to the end of your phrase?
  • Since when has Windows had symbolic links? Shortcuts, sure, but they're not the same. And neither is as good as hard links if you're on the same filesystem.

Understanding is always the understanding of a smaller problem in relation to a bigger problem. -- P.D. Ouspensky

Working...