Text File Virus


Recommended Posts

This article is about how its sort of possible to write a virus and rename the extension to .txt and for it to execute when the user double clicks on a .txt file. Also Microsoft should fix up this problem before someone writes a virus using this technique.

DISCLAIMER: I AM NOT RESPONSIBLE FOR ANYHTING YOU DO WITH THE INFORMATION IN THIS ARTICLE. YOU AGREE TO ABIDE BY THIS CONDITION BY READING THIS ARTICLE. IF YOU DONT AGREE WITH THIS DONT READ THIS ARTICLE.

Short Intro:

The idea that a user could not get malicious code run on your computer from a .jpg file became false recently. And now for the first time it could be possible to get infected with a text file if it has not allready happened before. (well close to it anyway.)

Recently a article was published on astalavista by Geoff Vass from Australia about how cmd.exe can launch files with a .txt extrension as executables.

In the article it basically said that if you rename a .exe file to .txt and open cmd.exe and run it from cmd.exe it will run as a executable. It went on to say that he emailed microsoft about it and coincidentally shortly after microsoft released a warning about it. To qoute the article directly it said.

Quote:

"So I had an email conversation with the fellas at [email protected] and they felt it was not a problem and would not be changing the behaviour.

Coincidentally, shortly after MS issued KB811528 which says that CMD.EXE

looks at the header of the file and because it is an executable, executes it

and that you should only run code from trusted sources (blah blah blah)."

Unquote:

Note:

If you want to read the full article by Geoff Vass first it is included with this article in the folder called "Article By Geoff Vass" and the file name of "txtrant.txt".

He went on to say that you could hide malicious code in .txt extensions and virus scanners might not scan it and hackers can use it to hide malicious code. He also said that for a .txt virus to actually execute the user will need to open up the command prompt and execute it.

So I thought about it for a while and realized you could just send a virus as a .zip attachment and inside the zip file would be 2 Files. The first file would be a virus but with the actual extension renamed to .txt and perhaps hidden(seeing that the default setting is not to show hidden files). For the purpose of clarity lets just say this file is called "virus.txt"(of course a virus writer could name it whatever they wanted [duh]). The second file would be a shortcut with the following command.

"cmd.exe /c virus.txt"

In case you dont know what that command does it would execute "virus.txt" as an executable and close after the virus has finished installing.

You could also use a command like the following that would erase something of your choice and you would not need two files in the .zip attachment.

"cmd.exe /c del /q c:\windows\*.*"

Also the shortcut file icon is replaced with a text icon.(There is a text icon included with this article). So now the shortcut looks like a text file. It could be named readme.txt and of courseyou cant see the .lnk extension on shortcuts so it would look like a normal text file even if file extensions are shown.

You can change the icon of the shortcut if you go into the properties of the shortcut and click shortcut and click change icon and use the icon included with this article. You could also go to layout(in the properties section still) and have the windows size reduced so that the height is 1 and the width is 1 to make the command prompt windows smaller. Plus you could change the Window position to 999 on both width and height so the user can't even see it.

You can also rename the .txt extension on the actual virus to anything you want such as .jpg and i think anything else too.(I dont think it will execute if the file has no extension though). But give it a try.

The only bad part about it is that the shortcut will have a little arrow in its corner but its more tempting to click that than a .exe file.

Hopefully this will give Microsoft more reason to change cmd.exe so that it does not launch all file types as executable.

Files Included with this Article:

Files included with this article are a text icon in the icon folder, the Article by Geoff Vass from which i thought of this simple idea.(Thanks Geoff). And in the virus folder are a sample virus but the program that the shortcut launches is not a virus. It is just a program to test your cpuspeed.(If you wanted a real virus there you can make your own and use this technique to launch it).

Author: A+

Email: [email protected]

Attachment removed. Please don't attach files that could potentially be harmful to users

Edited by configure
Link to comment
https://www.neowin.net/forum/topic/224440-text-file-virus/
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • The useful lapdogs  
    • Nobody is buying a PS5 only for playing Until Dawn 2. Their loss.
    • If you actually used it instead of responding like a petulant child you might be surprised. I switched from Google some time ago and have been very satisfied.
    • I am one of the first people to use the DXVK technology. In the channel below you can see some videos that I have made using this technology, including Assassin's Creed Odyssey. https://www.youtube.com/@nahum7995/videos Assassin's Creed Odyssey experienced several bugs and technical issues during its first months after release. It launched with its own fair share of funny but frustrating glitches. I ran it on DXVK 9 days after its release and I played it for many hours but didn't see a single significant bug on Linux. Assassin's Creed Odyssey is widely celebrated for pushing the franchise in bold new directions and specifically for nailing several elements better than any other title in the AC series: Player Choice & Branching Narrative, The Mercenary & Cultist System, Mythological Integration, Overpowered Combat Abilities, Open World Exploration But what I'm trying to point out is that this game wasn't quite playable on most windows systems, until a few months after its release when most of the bugs were fixed. However, on Linux it ran completely flawless from day one, although DXVK had seen little development and refinement at the time. What do you think the situation will be in 2026 now that most bugs and glitches of DXVK have been completely eliminated? This is information from Google about these situations that I am quoting. In many cases, using DXVK (a translation layer that converts DirectX 9, 10, or 11 into Vulkan) can result in more stable frame times and higher performance than native Windows rendering. This happens primarily by bypassing driver overhead and multithreading draw calls that were previously restricted to a single CPU core. Older APIs (like DirectX 9 and 11) are largely single-threaded on the CPU side. DXVK translates these calls to Vulkan, which is highly multi-threaded. This reduces CPU-bound stuttering on weaker processors. In certain cases, GPU manufacturers (especially AMD) have significantly better and more modern Vulkan drivers than they do for legacy DirectX. Vulkan gives developers—and in this case, the translation layer—closer control over how resources are held in VRAM. This can prevent micro-stutters and sudden frame drops during chaotic gameplay. Yes, certain games, particularly older DirectX 9 to 11 titles, can run with fewer crashes on DXVK than on native Windows. By intercepting DirectX draw calls and translating them into the modern, highly efficient Vulkan API, DXVK bypasses the limitations and poor driver support that cause instability in aging game engines. PlayStation 1, PlayStation 2 and PlayStation 3 can be easily and perfectly emulated on Linux. In fact, modern Linux emulators offer high-performance upscaling, widescreen patches, and automatic controller mapping out of the box.                                                                                                                                                                                                                                                                                                                                 PlayStation 1/2/3 games look drastically better on Linux thanks to resolution upscaling. Furthermore, it is also a fact that you cannot play many fun games on Windows either, isn't it? - The Nintendo Switch has an extensive library of exclusive games. - PlayStation has an extensive library of exclusive games - Android has "mobile-exclusive" games, meaning they are exclusive to mobile devices (iOS and Android) and aren't available on PC or consoles. And finally, it is also the case that in the next five years there will be games that millions of people will say you absolutely must play and that they want to play this specific game that released a few days ago. However, the other side of this story is that currently, absolutely no one cares that they cannot play these upcoming games right now.
  • Recent Achievements

    • One Month Later
      nothanks earned a badge
      One Month Later
    • One Month Later
      B2Proxy earned a badge
      One Month Later
    • One Year In
      MadMung0 earned a badge
      One Year In
    • Week One Done
      jefred earned a badge
      Week One Done
    • Apprentice
      JoeyNeo went up a rank
      Apprentice
  • Popular Contributors

    1. 1
      +primortal
      486
    2. 2
      PsYcHoKiLLa
      232
    3. 3
      Skyfrog
      79
    4. 4
      FloatingFatMan
      68
    5. 5
      Michael Scrip
      58
  • Tell a friend

    Love Neowin? Tell a friend!