• Rioting Pacifist@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    1 hour ago

    You can never be sure there is no spyware because if your infected a sufficiently advanced spyware can hide itself.

    In theory you can use a liveCD to scan your OS for specious signs but if someone has written bespoke spyware for you it may be hard to detect as it won’t match any of the signatures.

  • brownmustardminion@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    3 hours ago

    Some of the other comments got me curious…

    Is there a way to print the most recent accessed files (and time accessed and by which user) within a specific directory to terminal?

  • HiddenLayer555@lemmy.ml
    link
    fedilink
    English
    arrow-up
    7
    arrow-down
    1
    ·
    edit-2
    6 hours ago

    Honestly if you’re at the point of suspecting that your Linux system is infected, just back everything up, wipe, and reinstall. Make sure to use a known good computer to make the install disk, and completely wipe the drive before install and not use existing partitions.

    People have mentioned Wireshark which you can use to monitor for suspicious network activity, but IMO for most people this isn’t super helpful because it’s hard to tell what’s suspicious and what’s normal from Wireshark alone without quite a bit of networking/software knowledge. Maybe there’s more user friendly packet capture software though, something that can string the packets together into their respective connections and summarise key information like the protocol and domain involved.

    QDirStat can visualize the contents of your drive as an interactive map. Might be helpful for finding files that aren’t supposed to be there.

    ClamAV is an open source antivirus available for Linux but I don’t know how well it does at actually detecting Linux malware. Seems to be more for people running file/email servers to scan incoming file uploads.

  • 0t79JeIfK01RHyzo@lemmy.ml
    link
    fedilink
    English
    arrow-up
    19
    ·
    edit-2
    13 hours ago

    You can

    You can also assume you are compromised and use a solution like a Faraday cage. If you’re trying to detect advanced spyware, it might be better to check network activity from outside the device like what network activity is the router managing for the computer.

    • bamboo@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      10
      ·
      10 hours ago

      FWIW, if you suspect your machine has been compromised, the binaries for common tools like ps and top shouldn’t be relied upon since those probably were tampered with to hide the malicious program from the output. At that point, you’d probably want to check each running process manually under /proc/.

    • eldavi@lemmy.ml
      link
      fedilink
      English
      arrow-up
      4
      ·
      12 hours ago

      @RavenofDespair@lemmy.ml to add to this; you can use a firewall that’s aware of what your systems is trying to contact. pfsense does this in their premium products and i’ve heard ubiquiti starting doing this as well.

  • SayCyberOnceMore@feddit.uk
    link
    fedilink
    English
    arrow-up
    1
    ·
    7 hours ago

    Is this a specific PC, or a general question?

    All spyware needs to get the info to the spy somehow, so as others have said, it’s probably best to watch the network traffic.

    But also - not so much for home, more for an office - look out for keyloggers and weird physical devices attached to the PC, they can be sending data via other methods.

    And prevention is better than cure, get a good antimalware installed - and perhaps something which only allows known good (allow listing), rather than blocking known bad (block listing).

    • ranzispa@mander.xyz
      link
      fedilink
      arrow-up
      6
      ·
      9 hours ago

      Most spyware traffic likely goes through ports 80 and 443 anyway. A firewall on the router won’t help there.

      • 𞋴𝛂𝛋𝛆@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        5 hours ago

        With a DNS whitelist, all incoming packets are dropped unless the address is on the list. It is like ad block, but reversed. You are not blocking known ad servers, but all servers except those you actually want to connect to. It is a pain in the ass to look at logs and white list all the time. In reality, you only visit around a hundred sites or less that you actually need or want to connect to. Nothing gets in except what you want. That kills most vulnerabilities.

  • hexagonwin@lemmy.today
    link
    fedilink
    arrow-up
    4
    ·
    13 hours ago

    run a barebones environment with a trusted minimal operating system (that’s freebsd/netbsd/slackware for me)

  • bacon_pdp@lemmy.world
    link
    fedilink
    arrow-up
    0
    arrow-down
    2
    ·
    12 hours ago

    If you bootstrap your software from source code and use white listing at the kernel level and in your interpreters. Then there is no place where spyware could exist and run.