[HN Gopher] I hacked macOS
       ___________________________________________________________________
        
       I hacked macOS
        
       Author : robin_reala
       Score  : 189 points
       Date   : 2023-09-17 10:58 UTC (12 hours ago)
        
 (HTM) web link (asahilina.net)
 (TXT) w3m dump (asahilina.net)
        
       | Topfi wrote:
       | Once again, my respect for the work of the Asahi team and
       | especially Linas GPU related efforts grows further. Great to see
       | that she was officially recognized[0] and received a bounty for
       | her efforts.
       | 
       | [0] https://support.apple.com/en-md/HT213488
        
         | [deleted]
        
       | tyingq wrote:
       | The CVE description for some context (I re-ordered the sentences)
       | 
       |  _" An app may be able to execute arbitrary code with kernel
       | privileges. The issue was addressed with improved memory
       | handling. This issue is fixed in iOS 16.1 and iPadOS 16, macOS
       | Ventura 13, watchOS 9.1."_
        
         | [deleted]
        
       | dang wrote:
       | All: please don't post comments about the formatting of the
       | presentation. It makes for tedious and off-topic discussion, and
       | the HN guidelines specifically ask you not to:
       | 
       | https://news.ycombinator.com/newsguidelines.html.
        
       | Angostura wrote:
       | Hugged to death?
        
         | nullifidian wrote:
         | https://youtu.be/hDek2cp0dmI?t=499 the presentation with
         | narration of the author.
        
       | m0d0nne11 wrote:
       | The content is probably interesting but the presentation is so
       | annoyingly precious that I bailed out after a few screens...
        
         | sMarsIntruder wrote:
         | And what about the YouTube video?
        
       | loeg wrote:
       | [flagged]
        
       | tjroer84 wrote:
       | [flagged]
        
         | saagarjha wrote:
         | No. Number of CVEs has approximately no correlation with
         | quality.
        
         | ttt3ts wrote:
         | Yea, internet is dumb sometimes. Here is some context on the
         | often dumb world of CVE
         | https://www.youtube.com/watch?v=2Mfgjp_aK3I
        
         | sushiburps wrote:
         | Apple doesn't have "way fewer CVEs for macOS/iOS". Apple ranks
         | 5th overall, and 4th so far in 2023, by vendor. In 2015 they
         | were #1. CVEs track closely with the number of users a platform
         | has, and the incentives to comprise that platform.
         | 
         | https://www.cvedetails.com/top-50-vendors.php
        
         | howinteresting wrote:
         | You got downvoted because you didn't consider for even a second
         | the game theoretic result of judging products based on the
         | number of CVEs they've had.
        
         | d3w4s9 wrote:
         | "an honest question"? You should ask the "if" question before
         | the "why" question. In this case the claim in the question is
         | completely unfounded.
        
           | irundebian wrote:
           | No, it's just a hostile interpretation.
        
       | throwaway423342 wrote:
       | Any suggestions for how I can get to anywhere close to Lina's
       | skills? It's just mad skills.. I don't believe simply putting in
       | huge amount of time in front of the machine is adequate. Neither
       | is simply being smart. Is it just a combination of being smart,
       | sinking in a lot of time, interests etc?
        
         | Scarbutt wrote:
         | Read computer architecture and computer systems books.
        
       | 29athrowaway wrote:
       | From code comments, what I understood (most likely in an
       | incorrect way) is:
       | 
       | - Use Metal shader code to make process page table accessible to
       | shaders via page protection layer bug exploited using return
       | oriented programming (ROP)
       | 
       | - Use Metal shader code to acquire read/write access to physical
       | memory
       | 
       | - Use Metal shaders to access the kernel page table
       | 
       | - Deals with ASLR to find the kernel base address
       | 
       | - Obtains process user credentials data structure via the process
       | data structure (from the kernel memory)
       | 
       | - Sets uid and gid to 0 (root) to the user credentials data
       | structure, giving root privileges to the user
        
         | dagmx wrote:
         | You're pretty much correct.
         | 
         | GPUs are a very interesting attack vector. Especially as more
         | computation is being pushed to GPUs, and they're not always
         | well isolated.
        
           | zamalek wrote:
           | I'm genuinely concerned about the WebGPU attack vector. The
           | possibilities are exciting, but we (everyone) has virtually
           | no experience with securing them (compared to decades of
           | securing x86 - which we still can't pull off). My biggest
           | concern is fingerprinting.
        
             | paulddraper wrote:
             | Is this substantially different than say, containers with
             | GPU access, right?
             | 
             | Lots of computation is moving to GPUs.
        
             | jonhohle wrote:
             | Somehow I can't resign myself to this brave new world of
             | web apps with low level hardware access. I do not want web
             | apps doing GPGPU work on my machine. If the browser engine
             | implements high level functionality that way, fine, but I
             | don't want arbitrary websites using low level hardware
             | directly.
             | 
             | They were so preoccupied with whether they could, the never
             | stopped to consider whether they should.
        
             | mmis1000 wrote:
             | Fingerprinting is probably inevitable if it is enabled by
             | default. Given game code themselves relies on exact device
             | model to workaround gpu implementation bugs. Gpu
             | compatibility is always a shit show history that relies on
             | all sort of device specific workarounds. You may spoof it.
             | But don't assume it would work perfectly for any moderate
             | to big sized programs.
        
             | dagmx wrote:
             | I feel like fingerprinting is inevitable with any hardware
             | access, including WebGL or WebGPU. It's one of my big
             | concerns about Chrome exposing more and more of the
             | hardware it runs on in the goal of being a Web based OS.
             | 
             | That said, fingerprinting is not as big a risk as what I
             | was thinking of, which is one process being able to peer
             | into another's on the GPU. There are various takes on
             | isolation on the GPU but they tend to have strong caveats
             | attached.
        
         | mlindner wrote:
         | Thank you very much for the brief summary versus whatever the
         | thing linked was.
        
       | fh9302 wrote:
       | Lina received a $150k bounty for this exploit.
        
         | Razengan wrote:
         | How does this work anyway? I reported a password bug that went
         | unfixed for months and didn't hear back from Apple. Do you need
         | to be the first/only person to have reported something, or
         | what?
        
           | dagmx wrote:
           | Most bug bounty payouts go to the first person or group that
           | report it, and only if the bug in question is novel to the
           | company in question.
           | 
           | I.e if you report after someone else or report after it's
           | already been identified internally , you're not likely to get
           | a payout unless you have novel details
        
         | jamesmunns wrote:
         | Hell yeah, good for her!
        
         | [deleted]
        
         | tourmalinetaco wrote:
         | [flagged]
        
           | sebzim4500 wrote:
           | > Lina is a pseudonym for Marcan
           | 
           | Is there any evidence for this? I've seen a bunch of people
           | say it on HN.
        
           | ayewo wrote:
           | Apple pays out a range of $5k to $150k for this type of
           | attack.
           | 
           | See: https://security.apple.com/bounty/categories/
        
         | sirodoht wrote:
         | Sounds extremely low for this kind of vulnerability of a $2.7T
         | company that prides itself for its privacy accomplishments.
        
           | Veserv wrote:
           | I mean, this is the company where the only security
           | certification advertised on their website for macOS [1][2]
           | only achieved the lowest possible level of security, EAL1.
           | 
           | A level only fit for products where [3]: "some confidence in
           | correct operation is required, but the threats to security
           | are not viewed as serious" which is one level lower than
           | "demonstrating resistance to penetration attackers with a
           | basic attack potential" [4]. Which is four full levels below
           | "demonstrating resistance to penetration attackers with a
           | moderate attack potential" [5].
           | 
           | Apple has never once, over multiple decades of failed
           | attempts, demonstrated "resistance to penetration attackers
           | with a moderate attack potential" for any product. It should
           | be no surprise that the systems, processes, and people who
           | lack the knowledge, ability, technology, and experience to
           | make a system resistant to moderate attackers, despite nearly
           | unlimited resources, have the security of their systems
           | completely defeated by moderate attacks like small groups of
           | skilled researchers. Apple positively, absolutely, 100%,
           | certifies they can not. Though, it would be nice if their
           | marketing were restricted to what their engineering can
           | prove.
           | 
           | [1] https://support.apple.com/guide/certifications/macos-
           | securit...
           | 
           | [2] https://support.apple.com/library/APPLE/APPLECARE_ALLGEOS
           | /CE...
           | 
           | [3] https://www.commoncriteriaportal.org/files/ccfiles/CC2022
           | PAR... Page 14
           | 
           | [4] https://www.commoncriteriaportal.org/files/ccfiles/CC2022
           | PAR... Page 16
           | 
           | [5] https://www.commoncriteriaportal.org/files/ccfiles/CC2022
           | PAR... Page 20
        
             | irundebian wrote:
             | EAL is not a measure of security but a measure of the depth
             | of analysis. Looking at the complexity of monolithic-
             | kernel-based operating systems, I don't much can be derived
             | from certifications with an EAL < 5.
        
               | Veserv wrote:
               | Evaluated assurance levels (EAL) are a bundle of security
               | assurance requirements (SAR) that reasonably trace to
               | varying levels of assurance that the target of evaluation
               | (TOE) enforces the Security Functional Requirements (SFR)
               | of the product. One of the core SARs being AVA
               | (vulnerability assessment) which evaluates resistance to
               | penetration attackers and the presence of
               | vulnerabilities. It is only at EAL5 that you are required
               | to demonstrate AVA_VAN.4 which is resistance to
               | penetration attackers with a moderate attack potential.
               | 
               | What we derive from companies only able to achieve EAL <
               | 5 is that their systems are not designed, nor capable of
               | protecting against moderate attackers. This has been
               | borne out by decades of experience where the security
               | properties of these systems have been routinely defeated
               | by attackers with moderate or lower attack potential. The
               | certification process is both effective and accurate at
               | identifying that these consumer operating systems are
               | inadequate against attackers of moderate ability as an
               | upper bound.
               | 
               | We further know from decades of experience that any
               | system that attempts EAL5 certification and then fails
               | has structural deficiencies that make it practically
               | impossible for any configuration to ever be certified
               | without a total redesign. As far as I know, nobody has
               | ever achieved that despite decades of attempts and
               | billions of dollars spent attempting to retrofit
               | inherently insecure designs such as Windows, Linux, or
               | macOS.
               | 
               | So, what we know is that macOS, iOS, Linux, Windows,
               | BSDs, etc. are structurally insecure against moderate
               | attacks such as those employed by commercial hackers and
               | organized crime, let alone state-level actors, and that
               | it is hopeless for them to ever be improved to reach such
               | a level. Anything less than EAL5 is inadequate for the
               | modern threat landscape of established commercial hackers
               | and state actors as experienced by consumers, businesses,
               | and governments. Therefore, the systems currently
               | deployed are universally unfit for their usage in these
               | connected systems and we have the certifications and
               | continuous examples to prove it.
        
           | arghwhat wrote:
           | On the other hand, that's a years salary for many people.
           | Seems like a quite fair payment, and a payout to envy.
           | 
           | Lower, easier to get payouts are arguably better than rare
           | jackpot payouts you have to fight over...
        
             | nicoburns wrote:
             | > On the other hand, that's a years salary for many people.
             | 
             | It's _several_ years salary for many people.
        
           | simpleuser27 wrote:
           | How would you value this exploit, or any exploit?
        
             | sirodoht wrote:
             | I understand this is arbitrary code execution with root
             | access. I'm imagining the potential of infecting a high
             | status individual and I think a bad actor would pay
             | millions for such an exploit.
        
           | rs_rs_rs_rs_rs wrote:
           | >Sounds extremely low for this kind of vulnerability
           | 
           | How do you know that?
        
             | thfuran wrote:
             | I'm not sure I follow. You're asking them how they know
             | their own impression of something?
        
               | zamadatix wrote:
               | That would be a fair question, we generally don't come to
               | our impressions by random choice alone. My guess is the
               | value of the vulnerability on the black market would be
               | significantly higher and Apple could afford to compete
               | with that better if they wanted. Only the GP could tell
               | us the reasoning for their impression though.
        
             | sirodoht wrote:
             | Which part? I feel that arbitrary code execution with root
             | access is a pretty extreme thing to accomplish. But I might
             | be mistaken!
        
           | paddim8 wrote:
           | What? That's an insane amount of money
        
             | sirodoht wrote:
             | I'm comparing it with Apple's market cap of $10^12. Such a
             | vulnerability seems pretty serious. But maybe I'm mistaken
             | and it's not that bad.
        
         | 29athrowaway wrote:
         | Well deserved. By reading the code you can tell there is a lot
         | of analysis and knowledge required to make that exploit happen.
         | 
         | OS development, security, shader programming, computer
         | architecture, etc.
         | 
         | The code is clean and has plenty of comments explaining what is
         | happening at each step.
         | 
         | And for the ones do not know, Asahi Lina is the same person who
         | made it possible to run GPU-enabled Linux on Apple Silicon,
         | among with other contributors.
        
       | Scarbutt wrote:
       | How can she do all this using kate and not vim? /s
        
         | pxc wrote:
         | Kate does have a pretty good vi mode!
        
       | kubb wrote:
       | Quality content, highly recommended.
        
       | lexicality wrote:
       | I genuinely don't understand when I should be pressing down or
       | right. Is there a linear way to view this?
        
         | SSLy wrote:
         | > _Is there a linear way to view this?_
         | 
         | Space key
        
         | eviks wrote:
         | right for sections, down for subsections within a section, but
         | 2d nav isn't great without a map :)
        
         | cassianoleal wrote:
         | Press space.
        
           | codetrotter wrote:
           | RIP mobile users :'(
        
             | phreack wrote:
             | Yeah, I dislike comments on format but on mobile the site
             | was just unusable for me. I couldn't figure out which slide
             | was the "correct one" to move forward, and even the zooming
             | gesture would move me to another slide. I think the video
             | presentation would be a better link than the slides.
        
         | [deleted]
        
         | dagmx wrote:
         | It's why I hate reveal.js
         | 
         | It's the most unintuitive mechanism unless you've already
         | internalized what deck structures should be.
         | 
         | It seems like it's optimized for the presenter but it's often
         | used for after the fact sharing with everyone else who won't
         | know the order.
         | 
         | It really needs a linear mode, with the option to see presenter
         | notes.
        
           | cassepipe wrote:
           | I clicked various times to the right, didn't make much sense.
           | I came back, started clicking it down, now it made sense,
           | until couldn't, so I clicked right. Then it clicked, took me
           | something like ten seconds to figure it out, and I am not
           | known to be quickest knife in the shed.
        
       | yellow_lead wrote:
       | The HN rules say
       | 
       | > Please don't complain about tangential annoyances--e.g. article
       | or website formats, name collisions, or back-button breakage.
       | They're too common to be interesting.
       | 
       | Given that many are praising the formatting, I don't see how the
       | rule applies.
       | 
       | I'd like to point out that the slides have source available and
       | use the reveal js slides framework, but I'm not sure if this
       | would be considered as breaking the rules?
       | 
       | Source for slides: https://github.com/asahilina/agx-
       | exploit/tree/main/slides
        
         | [deleted]
        
       | voat wrote:
       | Honestly I loved the slide deck. I have little background in
       | this, and I feel the author did a great job of breaking
       | everything down. It clearly took aot of work. Bravo.
        
       | mika69 wrote:
       | Is this page archived yet? I cannot access the page..
        
       | outloudvi wrote:
       | The reveal.js slide itself probably isn't the best way for
       | readers. The reveal.js project actually provides a PDF export
       | feature which can be more helpful.
       | 
       | Anyway, it's an asahilina.net page, not a cve.mitre.org page.
       | That domain is for the Virtual YouTuber Lina-chan, so I would not
       | expect it to be the most friendly for developers.
       | 
       | As a VTuber follower, I do really like the style :D
        
         | porbelm wrote:
         | I would classify Lina as excellent hacker and engineer first,
         | VTuber second (but it is really just marcan's alter ego,
         | innit?)
        
       | quitit wrote:
       | [flagged]
        
         | dang wrote:
         | " _Please don 't complain about tangential annoyances--e.g.
         | article or website formats, name collisions, or back-button
         | breakage. They're too common to be interesting._"
         | 
         | https://news.ycombinator.com/newsguidelines.html
        
           | quitit wrote:
           | Respectfully: do you genuinely believe that guideline had
           | this kind of presentation in mind, or the very common tedium
           | of poorly built websites that occurs frequently on amateur
           | tech posts. Even the examples provided by the rule you quoted
           | lend to the latter.
           | 
           | The format is indeed relevant.
        
             | pvg wrote:
             | The guideline is to prevent threads turning discussions of
             | interesting things into discussions of boring things, like
             | most of the other guidelines. Plus you can ask the person
             | who came up with it, I'm sure they'll tell you something
             | similar.
        
             | GhostWhisperer wrote:
             | [flagged]
        
         | euiq wrote:
         | the whole vtuber thing is not really for me, but i appreciate
         | the effort that went into this presentation--did you make it
         | all the way to <https://asahilina.net/agx-exploit/#/demoslide>?
        
         | zamalek wrote:
         | The manner in which a person chooses to portray themselves
         | isn't a gimmick, or poor communication. The VTuber thing isn't
         | for me, so I move along and let Lina be who she wants to be.
        
           | loeg wrote:
           | I mean, I disagree. It is gimmicky and poor communication,
           | whether by choice or accident.
        
           | quitit wrote:
           | It is indeed poor communication - why? Because:
           | 
           | 1. The message is secondary to the medium.
           | 
           | 2. The communication requires numerous unnecessary click
           | throughs to obtain the relevant information.
           | 
           | 3. The division of the information into various panels and
           | mediums does not enhance the communication, rather the
           | messages are divided in a way that doesn't match a hierarchal
           | introduction of detail. It often serves no purpose
           | whatsoever.
           | 
           | Also this is not some personal attack on identity "who she
           | wants to be", it's a commentary on poor communication - don't
           | attempt to equate the two, it's incredibly poor taste, and
           | flame baiting.
        
             | GhostWhisperer wrote:
             | > ... this is not some personal attack on identity ...
             | 
             | yes it is. see:
             | 
             | > ... all of the gimmick and gloss in the presentation and
             | accompanying youtube video is ...
        
               | quitit wrote:
               | The entire scope of my comment is about the message - the
               | only one talking about the person is you.
               | 
               | I find that disgusting.
        
               | GhostWhisperer wrote:
               | > I find that disgusting.
               | 
               | i am unfazed
        
             | zamalek wrote:
             | Your comment touched on the YouTube video, which is very-
             | much part of her identity.
             | 
             | > The message is secondary to the medium.
             | 
             | What if the message was in a language that you don't
             | understand? Would that make it poor communication, or is it
             | rather poor listening.
             | 
             | The pressure to be average, normal, and conformist is what
             | neurodiverse individuals struggle with daily - especially
             | in professional and educational settings. "Poor
             | communication skills" are very much a personal attack - at
             | least from my perspective as an ND individual. This is
             | Lina's personal time and she can communicate how she
             | pleases.
        
               | quitit wrote:
               | That is very clearly the communication. Again the only
               | person talking about the person is you.
               | 
               | Find where I infer anything about the author in my
               | comment. It's not present, you've invented this narrative
               | as a strawman argument.
               | 
               | You are presenting something inappropriate and frankly
               | revolting for the furtherance of merely disagreeing.
               | 
               | Also just so we are clear: I'm not going to engage you in
               | discussing a person's identity. Continually referring to
               | the author's identity is deeply offensive.
        
         | [deleted]
        
       | jmull wrote:
       | What an awful page. I'm curious about the vulnerability, I'm not
       | willing to dig it out of that truly crappy web page.
        
         | dang wrote:
         | " _Please don 't complain about tangential annoyances--e.g.
         | article or website formats, name collisions, or back-button
         | breakage. They're too common to be interesting._"
         | 
         | " _Please don 't pick the most provocative thing in an article
         | or post to complain about in the thread. Find something
         | interesting to respond to instead._"
         | 
         | https://news.ycombinator.com/newsguidelines.html
        
           | irundebian wrote:
           | It's just a guideline.
        
         | saagarjha wrote:
         | If you're not willing to go through the slides that's really
         | your loss isn't it?
        
           | H8crilA wrote:
           | You can also wait, someone will probably go through the pain
           | of reading this website and write about it in normal English.
        
           | tpush wrote:
           | It's a loss for both parties, no?
        
         | PonderingPirate wrote:
         | I have seen a lot of strange writeups, but this one takes the
         | cake.
         | 
         | Is there a sanitized version anywhere?
        
         | 0daystock wrote:
         | I can't even tell it's crappy. Just a blank screen with
         | Javascript disabled. Sites aren't worth visiting if they don't
         | care about usability and accessibility, and promptly get added
         | to my shit-list of domains.
        
           | robin_reala wrote:
           | Disable CSS too and it works. It's all progressive
           | enhancement.
        
         | boxed wrote:
         | It's clearly a slide deck for a conference presentation or
         | something. So yea, it's terrible for a web page.
        
           | donatj wrote:
           | I don't think it's a presentation. It's multi dimensional. No
           | one's navigating multiple dimensions while presenting.
        
             | dagmx wrote:
             | When presenting the reveal.js interaction model is to hit
             | space or some other navigation key.
             | 
             | I'm not defending it, because I legitimately think their
             | multidimensional view is horrible for post facto sharing,
             | especially on mobile. But it does mean that you can quickly
             | navigate between chunks of the deck if you need to
             | backtrack as a presenter.
        
             | dbsmith83 wrote:
             | That's actually not a terrible idea... depending on if
             | people ask questions or if you have extra time while
             | presenting, the ability to take a small detour would be
             | pretty cool
        
         | mid-kid wrote:
         | This form of slide deck has become a staple in the security
         | research community for some reason. I don't like it either but
         | they're just following form.
        
           | lxgr wrote:
           | Oh wow, it's a slide deck! In Firefox, I was only seeing a
           | deconstructed giant canvas, scrollable in two dimensions but
           | without slide boundaries.
           | 
           | In Safari and Chrome, it makes a lot more sense now. The
           | interactive demo slide is impressive!
           | 
           | Update: Weirdly enough, after another refresh I now also see
           | slides on Firefox.
        
             | codetrotter wrote:
             | > after another refresh I now also see slides on Firefox
             | 
             | It probably failed to load some piece of JS or CSS the
             | first time around.
        
         | GhostWhisperer wrote:
         | the post title has a cve number you can search for
         | 
         | here: https://cve.mitre.org/cgi-
         | bin/cvename.cgi?name=CVE-2022-3294...
        
       | [deleted]
        
       | _rend wrote:
       | This wasn't obvious to me from the appearance of the page (I
       | guess my screen is large enough that I didn't see the arrows in
       | the bottom-right corner), but this site is actually a
       | presentation. So, a heads-up in case anyone else has the same
       | experience: the page is interactive, and you can navigate with
       | arrow keys.
        
         | broodbucket wrote:
         | it's reveal.js for those unfamiliar
         | 
         | https://revealjs.com/
        
         | zaxomi wrote:
         | Oh, I didn't see it.
        
         | [deleted]
        
       ___________________________________________________________________
       (page generated 2023-09-17 23:01 UTC)