Slashdot Mirror


Abusing Symbolic Links Like It's 1999

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.

35 of 54 comments (clear)

  1. we can fix this by Gravis+Zero · · Score: 3, Funny

    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.

    --
    Anons need not reply. Questions end with a question mark.
    1. Re:we can fix this by fraxinus-tree · · Score: 1

      Why only commercial?

    2. Re:we can fix this by Calydor · · Score: 5, Insightful

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

      --
      -=This sig has nothing to do with my comment. Move along now=-
    3. Re:we can fix this by Anonymous Coward · · Score: 1, Funny

      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
      ( ) Mailing lists and other legitimate email uses would be affected
      ( ) No one will be able to find the guy or collect the money
      ( ) It is defenseless against brute force attacks
      ( ) It will stop spam for two weeks and then weâ(TM)ll be stuck with it
      ( ) Users of email will not put up with it
      ( ) Microsoft will not put up with it
      ( ) The police will not put up with it
      ( ) Requires too much cooperation from spammers
      ( ) Requires immediate total cooperation from everybody at once
      ( ) Many email users cannot afford to lose business or alienate potential employers
      ( ) Spammers donâ(TM)t care about invalid addresses in their lists
      ( ) Anyone could anonymously destroy anyone elseâ(TM)s career or business

      Specifically, your plan fails to account for

      ( ) Laws expressly prohibiting it
      ( ) Lack of centrally controlling authority for email
      ( ) Open relays in foreign countries
      ( ) Ease of searching tiny alphanumeric address space of all email addresses
      ( ) Asshats
      ( ) Jurisdictional problems
      ( ) Unpopularity of weird new taxes
      ( ) Public reluctance to accept weird new forms of money
      ( ) Huge existing software investment in SMTP
      ( ) Susceptibility of protocols other than SMTP to attack
      ( ) Willingness of users to install OS patches received by email
      ( ) Armies of worm riddled broadband-connected Windows boxes
      ( ) Eternal arms race involved in all filtering approaches
      ( ) Extreme profitability of spam
      ( ) Joe jobs and/or identity theft
      ( ) Technically illiterate politicians
      ( ) Extreme stupidity on the part of people who do business with spammers
      ( ) Dishonesty on the part of spammers themselves
      ( ) Bandwidth costs that are unaffected by client filtering
      ( ) Outlook

      and the following philosophical objections may also apply:

      ( ) Ideas similar to yours are easy to come up with, yet none have ever
      been shown practical
      ( ) Any scheme based on opt-out is unacceptable
      ( ) SMTP headers should not be the subject of legislation
      ( ) Blacklists suck
      ( ) Whitelists suck
      ( ) We should be able to talk about Viagra without being censored
      ( ) Countermeasures should not involve wire fraud or credit card fraud
      ( ) Countermeasures should not involve sabotage of public networks
      ( ) Countermeasures must work if phased in gradually
      ( ) Sending email should be free
      ( ) Why should we have to trust you and your servers?
      ( ) Incompatiblity with open source or open source licenses
      ( ) Feel-good measures do nothing to solve the problem
      ( ) Temporary/one-time email addresses are cumbersome
      ( ) I donâ(TM)t want the government reading my email
      ( ) Killing them that way is not slow and painful enough

      Furthermore, this is what I think about you:

      ( ) Sorry dude, but I donâ(TM)t think it would work.
      ( ) This is a stupid idea, and youâ(TM)re a stupid person for suggesting it.
      ( ) Nice try, assh0le! Iâ(TM)m going to find out where you live and burn your house down!

    4. Re:we can fix this by Anonymous Coward · · Score: 1

      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.

    5. Re:we can fix this by RabidReindeer · · Score: 4, Funny

      Hey! Our product line is created, maintained and supported by the finest professionals $1.75/hour can buy!

    6. Re:we can fix this by sjames · · Score: 2

      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.

    7. Re:we can fix this by fraxinus-tree · · Score: 2

      Good luck imposing this. You will simply kill the proprietary software in this jurisdiction.

    8. Re:we can fix this by bmo · · Score: 5, Informative

      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

    9. Re:we can fix this by bmo · · Score: 2

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

      Forgot to put in the web page.

      --
      BMO

    10. Re:we can fix this by sjames · · Score: 1

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

    11. Re:we can fix this by sjames · · Score: 1

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

    12. Re:we can fix this by ancientt · · Score: 1

      I think it depends on where you are and what is being done. 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 needs improvement. Feel free to take my ideas and improve on them and pass them on to the appropriate agencies. Since "Comments owned by the poster" is clearly indicated, I hereby release this post and any of my comments related specifically to this post into the public domain.

      Fast changes are bad for business so I believe this first part of my suggestion for new laws should be discussed now with an intent to have the laws become binding in 2025 at a state level.

      BMC software law provision one.
      The state of [insert state here] shall create and fund an agency with a free and public interface so that any software which is used to provide service or sold may be reported by the buyer as having a security vulnerability with replaceable results. If the buyer submits such a vulnerability to the state agency, there will be posted a public notice that the vulnerability has been reported which the software or software service vendor must review and patch in ninety days from the date of public notice. Software and software service vendors may request automatic notice by email or letter with proof of identity, of such public notices. Should a software or software service vendor fail to patch, and offer the patch without additional cost to all users of the software or software service vendor, the state of [insert state here] shall grant a permanent license to use the software or software service to the first reporter, individual or company or organization, of the vulnerability. The software vendor who fails to offer a free upgrade to all users of the software or software service without charge, shall be required to provide the software or software service without charge to the individual who first reported the vulnerability so long a the company continues to offer that software, software service or derivations on that software or software service commercially. This requirement shall apply to all sellers and buyers who reside or are conducting business within [insert state here] with the provision that if one of the entities involved in the transaction is outside of the jurisdiction of [insert state here] then all other commercial interactions by the entity outside of the jurisdiction of [insert state here] shall be prohibited within [insert state here] until the terms of this law are fulfilled.

      Ten years is plenty of time for a state government agency to be formed and for companies and software developers to adjust to their business models to the first provision of of my proposed legislation. I think with that in mind, fifteen years is enough for the second provision of my proposed laws, and I think this should be at a federal level. I'd suggest that the NSA is the appropriate agency, but I'm open to a new federal agency being created or assignment to a better suited agency.

      BMC software law provision two.
      The federal government shall mandate [insert agency here] to provide a publicly accessible interface for the submission of software source code in the state used for development and production of the software and replicable instructions for any binary program produced using that source code which is offered for sale or as part of a paid service, hereafter referred to as replicable programming. Any person, company or organization offering software or service utilizing software for a fee must submit the replicable programming to the [insert agency here] interfa

      --
      B) Eliminate all the stupid users. This is frowned upon by society.
    13. Re:we can fix this by Zontar+The+Mindless · · Score: 3

      You will simply kill the proprietary software in this jurisdiction.

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

      --
      Il n'y a pas de Planet B.
    14. Re:we can fix this by fraxinus-tree · · Score: 1

      Yes, it is bad. Even bad for the free software.

    15. Re:we can fix this by rahulov · · Score: 1
      Also from : https://www.microsoft.com/en-u...

      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.

  2. Re: MS is still 20 years behind. This will remain by Anonymous Coward · · Score: 1

    And under John Thompson, they're getting even farther behind. The man just doesn't get why good QA is important. After what he did to Symmantec, I can't believe any one would give him a job, much less make him head of Microsoft.

  3. Re: MS is still 20 years behind. This will remain by Anonymous Coward · · Score: 3, Insightful

    Why have paid QA when your customers have proven over and over again that they'll still buy your software no matter how buggy it is? Thompson isn't that bright, and got his job just because of his race, but he isn't stupid.

  4. You want me to what now? by Daetrin · · Score: 4, Funny

    [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.)

    .

    --
    This Space Intentionally Left Blank
  5. Windows uses a unix file hierarchy by innocent_white_lamb · · Score: 3, Informative

    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....

    --
    If you're a zombie and you know it, bite your friend!
    1. Re:Windows uses a unix file hierarchy by Anonymous Coward · · Score: 1

      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..." that I see in $RECYCLE.BIN and elsehwere whenever I poke under the hood. Neat.

    2. Re:Windows uses a unix file hierarchy by ToasterMonkey · · Score: 1

      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".

  6. Just like systemd and /etc/resolv.conf? by Anonymous Coward · · Score: 1, Informative

    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...

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

    1. Re:Just like systemd and /etc/resolv.conf? by Zontar+The+Mindless · · Score: 2

      systemd is responsible for that mess?

      Before learning about this, I merely *disliked* systemd.

      But now...?

      KILL IT WITH FIRE!!!

      --
      Il n'y a pas de Planet B.
  7. As the old saying goes... by turbidostato · · Score: 4, Insightful

    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."

    1. Re:As the old saying goes... by lucm · · Score: 4, Funny

      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

      --
      lucm, indeed.
    2. Re:As the old saying goes... by turbidostato · · Score: 1

      "Your comment is almost completely irrelevant."

      So you think.

      "Also, it's more than a little arrogant to suggest that Unix is the penultimate OS"

      On one hand, it is not me, but Henry Spencer, the one saying that. On the other hand, some OS has to be the penultimate one.

      "Linux, for one, suggests that it is not."

      Linux is not a Unix reinvention but a Unix rewriting; if anything, it suggests the opposite of your position.

  8. Cost of distributing free software by tepples · · Score: 1

    Applying implied warranties to all computer programs distributed for a fee makes it impractical to recover the cost of distributing free software on physical media.

    1. Re:Cost of distributing free software by sjames · · Score: 1

      No, because the only warranty applying to the distribution is on the media itself being a faithful and readable copy of the software. Distributing for a fee doesn't make you responsible for that which is distributed.

    2. Re:Cost of distributing free software by tepples · · Score: 1

      Then how wouldn't proprietary software be able to avail itself of the same loophole?

    3. Re:Cost of distributing free software by sjames · · Score: 1

      Simple test: If you don't care if I hand out copies of the software after I buy the disk from you, then you were legitimately charging me a fee for distribution of free software. If you object, you were actually licensing the software to me.

  9. Re:"Like it's 1999"? by kmoser · · Score: 1

    Party like it's 1999. Ever since Prince turned himself into a symbolic link.

  10. Wait, Windows has symbolic links? by AJWM · · Score: 1

    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.

    --
    -- Alastair
  11. DMCA by tepples · · Score: 1

    Then make it lawful to copy but not to use. The legal structure needed to enable this has been in place since October 1998, when the U.S. Congress made it unlawful to decrypt a program's installer without permission from the program's copyright owner. So someone would have the encrypted bits but not the license code to use them.

    1. Re:DMCA by sjames · · Score: 1

      And that still makes it not OK to pass around freely, so it's still a charge for a license and not for a distribution. It's should be wquite obvious by now, it's a bright line test and it does make things quite clear if there is a software licensing component to the fee or not.