12 votes

Help with strange Windows 10 behavior/files. Do I have a virus?

Edit2: I'm a mac user who doesn't understand how windows explorer works. Leaving the post for some hapless mac user who may come along. Windows explorer doesn't report how it is traversing the directory tree, leading to some confusion about where the search result is, which happens to be waaaay down in a zip of a mac application installer I had inadvertantly archived on the Windows disk. I would ask any windows users, how do I make powershell ls | select-string "text" behave like ls | grep "text" on unix?

edit3: Also, why the fudge would windows explorer search find <weird characters>net but not dotnet when typing 'net' into the search box?

So I download the occasional, um, linux distro installation video. I use a vpn and private firefox windows for most.

I'm doing some clean up today, and find a file with a bunch of strange characters, including the text characters, "net." "M⌐⌐v├▒├┼⌐▒net" is the filename listed in the properties window. Inside are a series of .ase files with mostly unrecognizable names.

I don't see the filename when doing an ls in powershell of the directory reported in explorer.

doing ls | select-string "net" in powershell results in an unending peristalsis of weird text like you might get from a binary file viewed in a text editor. I do notice, however, that some of the text might be from inside a zip file. But why is select-string searching inside the zip file? ls seems to ouptut only filepath information. Upon further investigation, the zip file is several directories down, it appears adding | select-string to ls makes ls travel the full tree. Wut?

And when I say undending, I mean it kept going until I hit ctrl-c.

Any ideas to what is happening here?

Incidentally, I opened one of the ASE files by right-click->view file in notepad+, which never launched.

Edit: lots of edits.

7 comments

  1. [2]
    babypuncher
    Link
    Doesn't sound like a virus, it just sounds like you aren't super familiar with PowerShell. Unless you have a desire to become a Windows SysAdmin or have some other reason to learn PowerShell, I...

    Doesn't sound like a virus, it just sounds like you aren't super familiar with PowerShell. Unless you have a desire to become a Windows SysAdmin or have some other reason to learn PowerShell, I would probably just skip it entirely and install WSL. That will give you a real Linux kernel running whatever shell you want, with access to your Windows file system.

    Fun fact: As of Windows 11, WSL can run X11 apps and it works pretty well, though I would only recommend using it for apps which do not have proper Windows ports.

    10 votes
    1. drannex
      Link Parent
      Taking the time to also mention that not only can you now run X11 GUI apps from WSL, you can also easily install and run Android apps natively on Windows using WSA.

      Taking the time to also mention that not only can you now run X11 GUI apps from WSL, you can also easily install and run Android apps natively on Windows using WSA.

      2 votes
  2. zini
    Link
    Unless you've downloaded some executable "installation videos" I doubt it's a virus. If you're worried you can run a malwarebytes scan. ls | select-string searches the contents of the file and...

    Unless you've downloaded some executable "installation videos" I doubt it's a virus. If you're worried you can run a malwarebytes scan.

    ls | select-string searches the contents of the file and sometimes the Windows Explorer search function does as well. If you want to search file names only you can use ls *net*. You could probably use something like HxD for viewing that ASE file.

    8 votes
  3. Reapy
    Link
    I've also found the program 'everything' really great for searching, it is a near instantaneous search over everything in the pc. It works very well with flow launcher. I just started using these...

    I've also found the program 'everything' really great for searching, it is a near instantaneous search over everything in the pc. It works very well with flow launcher. I just started using these two programs together his year and love them.

    4 votes
  4. [3]
    xk3
    Link
    haha I had this link in my clipboard already: https://stackoverflow.com/questions/1485215/powershell-how-to-grep-command-output
    3 votes
    1. [2]
      ebonGavia
      Link Parent
      By the by, just in case anyone is interested in this topic... Ripgrep works on Windoze and is orders of magnitude faster than PS for this task. And if you have VSCode installed for any reason, you...

      By the by, just in case anyone is interested in this topic... Ripgrep works on Windoze and is orders of magnitude faster than PS for this task. And if you have VSCode installed for any reason, you already have it (just put the executable rg.exe on PATH).

      Ever wonder how VSCode can search your whole codebase instantly? Yup, it's Ripgrep.

      5 votes
      1. kej
        Link Parent
        Seconding the ripgrep recommendation, and adding a link to an article by the author about how it compares to other search tools and how he made it so fast: https://blog.burntsushi.net/ripgrep/

        Seconding the ripgrep recommendation, and adding a link to an article by the author about how it compares to other search tools and how he made it so fast: https://blog.burntsushi.net/ripgrep/

        1 vote