back to article We checked and yup, it's no longer 2001. And yet you can pwn a Windows box via Notepad.exe

Software buried in Windows since the days of WinXP can be abused to take complete control of a PC with the help of good ol' Notepad and some crafty code. On Tuesday, ace bug-hunter Tavis Ormandy, of Google Project Zero, detailed how a component of the operating system's Text Services Framework, which manages keyboard layouts …

Page:

  1. SW10
    Devil

    Confidence

    "It turns out it was possible to reach across sessions and violate NT security boundaries for nearly twenty years, and nobody noticed."

    That’s what you think...

    1. MiguelC Silver badge

      Re: Confidence

      That sound you hear comes from some deep, dark, hidden basement, where an NSA cave dweller screams in horror "My preciousssss...."

      1. Jemma

        Re: Confidence

        It's OK... Sam'll kill 'em if they try anything.

    2. Anonymous Coward
      Anonymous Coward

      Over Confidence

      Shame they dissolved the Trustworthy Computing Initiative team before they ran a modern source code vulnerability scanner over ALL the code that goes into shipping versions of windows. Of course the NSA has source code access along with several other three letter agencies. Funny they didn't mention it.

      Of course looking at XP era material with a code profiler is like looking at a Vegas motel room under a strong blacklight. Some things cannot be unseen.

      1. Rich 11

        Re: Over Confidence

        like looking at a Vegas motel room under a strong blacklight

        You owe me a cup of tea (Earl Grey, hot).

      2. Michael Wojcik Silver badge

        Re: Over Confidence

        Shame they dissolved the Trustworthy Computing Initiative team before they ran a modern source code vulnerability scanner over ALL the code that goes into shipping versions of windows

        Yes. Such as Microsoft's own static-analysis scanner, which is a near-state-of-the-art hybrid of simulated execution and symbolic analysis. (There was a good paper on it from Microsoft Research in CACM a few years back.) Data tainting and data flow analysis find this sort of thing easily in cases like this, where, as Ormandy wrote, there's simply no validation.

        They have the technology. They have the resources. They just don't have the will.

        1. bombastic bob Silver badge
          Facepalm

          Re: Over Confidence

          why should they check their OWN code for vulnerabilities? They have the CUSTOMERS as BETA TESTERS now!!!

          what a massive challenge that complexity presents Microsoft's engineers from a security standpoint.

          Not THAT massive. Back i nthe mid 2000's they should have done THIS instead of Vista:

          a) audit every line of code using their massive programming staff, instead of "re-re-inventing" windows [with the exception of the vulnerable parts]

          b) NOT re-re-invent it for WIndows "Ape" (8) nor Win-10-nic, but INSTEAD audit the HELL out of EVERYTHING, looking for basic vulnerabilities.

          You have to think like thief, applying crowbars, hammers, and chemicals to locks. You can't "just assume" anything about marshalling. You have to check EVERY buffer length, even for trivial stuff.

          strcpy(buffer, "string") - no!

          strncpy(buffer,"string",sizeof(buffer)) <-- better

          (you never know whether or not a buffer overflow might cause that static string pointer to be altered)

          that being said MICROSHAFT WASTED A DECADE AND A HALF of WALL TIME to re-re-re-re-invent windows into the PILE OF CRAP it is today!

          And oh, they left some serious OLD vulnerabilities in it, too... from a time when they wanted EVERYTHING insecurely interacting with EVERYTHING, and wanted ActiveX to be a MAJOR part of web pages! Pretty clueless, yeah.

          icon, because, facepalm

          1. Jamie Jones Silver badge

            Re: Over Confidence

            Long before Mac OSX became a thing, I used to say that MS should grab FreeBSD, and rewrite windows as a GUI, and include a compatibility layer for win32 stuff.

            Of course, Gates being the "shove the OS into the GUI" kind of guy, they went the NT route instead, then Mac OSX more or less did it instead.

  2. Gene Cash Silver badge

    "a scumbag has to be running code on your machine anyway, which is not a good situation"

    You mean like in a browser?

    1. Luke McCarthy

      JavaScript code can't call Win32 API functions, not without using a browser exploit first anyway. It's probably possible with VBScript in older versions of IE though...

      1. Michael Wojcik Silver badge

        not without using a browser exploit first anyway

        Well, problem solved! Or not. (Of course, with many users running browsers with elevated privileges in the first place, once that browser exploit is available there's no need to elevate.)

        In any case, this "the attacker has to be able to run unprivileged code first" mitigation is not nearly as useful as some people seem to think. It provides no defense against insider attacks. It provides none against social engineering. Against malware in the software supply chain. And so on.

  3. wayne 8

    Is this why a "notepad" app doesn't come with Android?

    I've often wondered why, with every general purpose OS I've worked with having a text editor in the distro, why Android phones don't have one. The carriers put useless shit in there, but no text editor.

    Is it a conspiracy?

    1. Peter Gathercole Silver badge

      Re: Is this why a "notepad" app doesn't come with Android? @wayne

      Not at all. Google want you to use it's Web or Cloud applications instead, which is why there is no native Calendar app, and only a basic Contacts application shipped with Android. Phone makers often add their own, but they are very rarely compatible with those supplied by the other phone makers.

      (Using the Web based apps also ensures that you keep data services on so that your device is track-able, as well)

      I look back at the baked in set of applications that used to be in PalmOS with a great deal of fondness. Always there, always work the same, always compatible with the last PalmOS device you owned.

      1. bean520

        Re: Is this why a "notepad" app doesn't come with Android? @wayne

        Ummm...AOSP (that is, open source Android) does have a natural be calendar app

      2. bazza Silver badge

        Re: Is this why a "notepad" app doesn't come with Android? @wayne

        I look back at the baked in set of applications that used to be in PalmOS with a great deal of fondness. Always there, always work the same, always compatible with the last PalmOS device you owned.

        Modern Android BlackBerries come with a decent set of things, far better than Google imho. Always there, very compatible with Exchange, iMap etc. You can pay for them on any other Androids too.

    2. Anonymous Coward
      Anonymous Coward

      Re: Is this why a "notepad" app doesn't come with Android?

      Why would you want a text editor on a phone or tablet? They're media consumption devices. If you want to do that sort of thing use a proper computer.

      1. illuminatus

        Re: Is this why a "notepad" app doesn't come with Android?

        To.make notes?

      2. anothercynic Silver badge

        Re: Is this why a "notepad" app doesn't come with Android?

        It's called 'making notes'... Reminders, little "oh, yes, before I forget what that wine was called" things. Some stuff is inane, some stuff isn't.

        1. MacroRodent

          Re: Is this why a "notepad" app doesn't come with Android?

          My usual method for such notetaking is to send email to myself. Has the advantage of being immediately available on a computer, too. Never missed a notepad on phones.

        2. Anonymous Coward
          Anonymous Coward

          Re: Is this why a "notepad" app doesn't come with Android?

          I haven't written notes outside work since I was a student, but each to their own. I guess if you have a bad memory its useful. But then you'd probably lose the phone anyway so...

          1. NetBlackOps

            Re: Is this why a "notepad" app doesn't come with Android?

            Whether I'm doing science, engineering or business, I've found my breadcrumb trails invaluable at keeping track of the various avenues I've pursued. Forgetting is not desirable, especially in cases where lives are involved. Not true for most, though. That it often saves time and money.... So, saving my scribbles is ... nice.

            Aside: to the send myself an email suggestion, no way am I sharing. Hell, good luck Google, et al., getting a look at my device, even.

            1. Anonymous Coward
              Anonymous Coward

              Re: Is this why a "notepad" app doesn't come with Android?

              If you're involved in safety critical areas and yet have a memory so bad you have to write yourself post-it style notes then please tell us what these areas are so we can avoid anything you've been involved in. Either write proper documentation or don't bother with the task at all.

          2. anothercynic Silver badge

            Re: Is this why a "notepad" app doesn't come with Android?

            It's not about bad memory. It's about just having it somewhere else *in case* of bad memory. But, as you say, to each their own. And not everyone is as blessed as you must be. :-)

        3. Ken Hagan Gold badge

          Re: Is this why a "notepad" app doesn't come with Android?

          *My* phone has a microphone ...

      3. GnuTzu

        Re: Is this why a "notepad" app doesn't come with Android?

        What??? I have Vim installed on my phone. O.K. so I rarely use it. But, it's so very comforting to know that I always have Vim with me.

    3. Mage Silver badge
      Facepalm

      Re: Is this why a "notepad" app doesn't come with Android?

      Jota is easy to download from playstore, nice text free editor and doesn't seem to have adverts.

      There is no included File manager or image editor, or terminal client either.

    4. Nano nano

      Re: Is this why a "notepad" app doesn't come with Android?

      The article is about a vulnerability in Windows. Android runs .... Linux, and Android.

  4. Ross Nixon

    NotePad? Useless old thing. Won't stay on top. Doesn't have color coding. Use NotePad3, I use and recommend it.

    1. Brian Miller

      The thing is. notepad was just used as a demo. The flaw isn't in notepad itself, but what it must connect to on the inside to function. Windows is full of cruft and is more like an old building with many little empty spaces in it - a fire hazard. The "new and improved" Windows has brought forward much of the "old and fscking" Windows. I wouldn't be surprised to see things from Windows 95 in there.

      1. sgp

        I don't understand, they promised us it's been "rebuild from the ground up". What is going on?

        1. gannett

          Recompile is the new rebuild.

        2. Anonymous Coward
          Anonymous Coward

          The did rebuild from the ground up , they just didn't bother to clear the ground first.

        3. Anonymous Coward
          Anonymous Coward

          It was rebuilt from the ground up remains of MS-DOS and Windows 95.

        4. Brian Miller

          This is how it's done:

          make clean

          make

          (and then a lot of Perl scrips run here to glue things into a distributable form.)

          Ship it.

    2. Anonymous Coward
      Anonymous Coward

      NotePad Windows? Useless old thing.

      1. Captain Scarlet
        Mushroom

        Sorry but Windows + R and notepad for a simple text editor is actually very useful (and I don't like change), Linux has similar old programs which do the job perfectly from a terminal session (i.e pine for quick text editing and I don't like change).

        1. A.P. Veening Silver badge

          Notepad is very useful every once in a while, in this case for privilege escalation. Note that in this case Notepad was used for the demo, but it could have been done with your favourite browser or email client as well, as long as there is some way to enter some text.

          1. Sam Crawley

            I thought the main purpose of notepad was to remove unwanted text formatting before pasting back into the 'smarter' application you are struggling with?!

            1. Captain Scarlet

              Yup must admit I do that, shame it strips out the line feed field (or was it new line)

              1. Martin an gof Silver badge

                Notepad updated after 33 years!

                Personally, I use Notepad++ when in Windows.

                M.

                1. Captain Scarlet

                  Yup have installed on machines I use a lot because of the language colour option, but its not on every machine I have access to.

  5. seven of five

    I am surprised.

    Given the amount of things notepad can´t do, I am seriously surprised it can be used for an exploit. Way to go, M$.

    1. Anonymous Coward
      Anonymous Coward

      Re: I am surprised.

      Whereas given the amount of things Emacs *can* do (#), you'd not only be surprised if it *couldn't* be used for an exploit, you'd expect it to already include an in-built exploit mode (alongside M-x kitchen-sink-simulator).

      (#) Its only major omission being a decent text editor. (Sorry, but as a vi user, that ancient joke is practically obligatory...:-) )

  6. amanfromMars 1 Silver badge

    Why the Fuss. It is not as if it was shared in Russian or Chinese to Alert You

    Did you not get any of the earlier registering memos on the meme*? ........ Words Create, Command and Control and Destroy Worlds ........ and that can easily be turned on and tuned in to terrifying in a whole myriad of consequential existential extremes.

    And without them are you no more than dumb ignorant savages to be herded and entertained/employed and enjoyed as animals appropriate to the whims of SMARTR Connected Virtual Machines?

    * An earlier registering memo on the meme

  7. Anonymous Coward
    Windows

    I keep getting ridiculed for talking about a rare file overwrite bug

    I insist it has been around through every version of Windows back to at least Win98; yet I keep getting told that is impossible.

    Yeah right.

    I propose El Reg has a competition; a full set of Vulture gear to the person who turns up the oldest code found in the latest Win10 build.

  8. JimmyPage Silver badge
    Boffin

    TL;DR but this seems a variant of message loop hacking ?

    Us greybeards know how multitasking OSes actually work - by cycling through a message loop deep, deep, deep inside the actual silicon. At that level, the OS trusts - *has* to trust - that the queue of commands has been legitimately created.

    It is possible to secure a message loop against hacking - by signing every message with the key of the process that inserted it. But we prefer performance to security.

    1. Michael Wojcik Silver badge

      Re: TL;DR but this seems a variant of message loop hacking ?

      Not really, no. It's a system component running with excessive privilege and a whole bunch of buffer-overflow vulnerabilities. The interface used to exploit those vulnerabilities is not privileged.

  9. Winkypop Silver badge
    Devil

    No problem

    Plenty more where that came from...

  10. Anonymous Coward
    Anonymous Coward

    "buried in Windows since the days of WinXP"

    I knew the wisdom of my decision to never upgrade from Windows ME would be vindicated by history.

    1. Anonymous Coward
      Anonymous Coward

      Re: "buried in Windows since the days of WinXP"

      It was probably there in Windows 1.0

      I've made this comment thousands of times over the years, to no effect whatsover in corporate policy, but Windows - even the latest version - is insecure by design. Because at the most fundamental level in it's kernel, it still expects there to be one user. Which didn't make much sense in the 80s, as multi user systems were already up & running.

      So 35 years on. and we've arrived at a situation where the safest way to contain Windows is in a VM somewhere that can't break out. The VM itself (of course) won't be running on Windows.

Page:

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like