• oessessnex@programming.dev
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      10 months ago

      On a phone with spyware installed that wouldn’t do anything. There are probably ways to get rid of it, but how can you be sure?

      • xeddyx@lemmy.nz
        link
        fedilink
        arrow-up
        4
        ·
        10 months ago

        By checking whether the bootloader is unlocked or not. If the bootloader is unlocked, then all bets are off, but if the bootloader is locked, you can only run the original, unmodified firmware. Any alternation to the firmware will result in the dm-verity check failing, causing the system to not boot at all. The only data which can be altered is user data, which is wiped in a factory reset. So a factory ressr definitely gets rid of it.

        If you’re paranoid though, you could always flash the stock firmware downloaded directly from the manufacturer’s website, which will override all system partitions, so you can be absolutely sure there’s no spyware - besides the spyware included by Google etc of course, or the spyware embedded into the hardware by the chip manufacturers…

        • argv_minus_one@beehaw.org
          link
          fedilink
          arrow-up
          2
          ·
          10 months ago

          None of this will save you. The boot loader can be replaced with one that merely pretends to be locked and merely pretends to flash the replacement operating system it’s sent over the USB port.

          If the phone has ever been in the custody of someone you don’t trust, you can’t trust anything about it.

        • RovingFox@infosec.pub
          link
          fedilink
          arrow-up
          2
          ·
          10 months ago

          Those usually are made to persist after factory reset. The phone is rooted and factory reset is modified to not remove the bad software.

          • xeddyx@lemmy.nz
            link
            fedilink
            arrow-up
            1
            ·
            10 months ago

            And rooting the phone requires an unlocked bootloader, which would present a warning when the phone is booted up.

              • xeddyx@lemmy.nz
                link
                fedilink
                arrow-up
                1
                ·
                edit-2
                10 months ago

                Yes it will. There’s no way to bypass it, if there is, that would be a serious security flaw - the kind that would get patched very quickly. There have been some phones which had a vulnerable bootloader that allowed this in the past (eg: OnePlus devices), but there’s no such exploit available for current generation devices

                I’d like to see some sources backing up your claim, which is applicable to current generation phones.

                • argv_minus_one@beehaw.org
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  10 months ago

                  There’s no way to bypass it, if there is, that would be a serious security flaw

                  Those do happen, but it is probably also possible to unlock the boot loader and then replace the boot loader itself with one that merely pretends to be locked. How would you know the difference?

                  the kind that would get patched very quickly.

                  Obviously criminals aren’t going to install security patches for vulnerabilities that they are exploiting.

                  • xeddyx@lemmy.nz
                    link
                    fedilink
                    arrow-up
                    1
                    arrow-down
                    1
                    ·
                    10 months ago

                    but it is probably also possible to unlock the boot loader and then replace the boot loader itself with one that merely pretends to be locked. How would you know the difference?

                    Sure, in theory, but doing that would require advanced knowledge, it’s not something a random shady seller on eBay would do. With skills like that, they could easily get a high paying job, or if they really want to be a criminal, a better option would be getting into something like phishing or cryptolocking, which, skills wise, is easier than writing a custom bootloader.

                    Obviously criminals aren’t going to install security patches for vulnerabilities that they are exploiting.

                    Which is why the first thing you should do is do a factory reset, update the phone, and do another factory reset. Or an even better option would be to just flash the factory firmware downloaded directly from the vendor.