Trojan-Downloader.JAVA.Openstream

Discussion in 'malware problems & news' started by PeterJT, Dec 9, 2004.

Thread Status:
Not open for further replies.
  1. PeterJT

    PeterJT Registered Member

    Joined:
    Dec 9, 2004
    Posts:
    1
    I am writing an applet using JBuilder, to upload large files to a server by chopping them into sections and sending each section separately.

    Unfortunately my Kaspersky anti-virus identifies the basic applet as this Trojan-Downloader.Java.Openstream.

    I doubt if JBuilder4 is adding malicious code to the applet, so it is simply the following code ( not even working yet, just a few ideas typed in)

    How to I prevent an applet being identified as this trojan?

    package applet2;

    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import javax.swing.*;
    /**
    * Title: Uploader for Multihandler
    * Description: Large file uploader
    * Copyright: Copyright (c) 2004
    * Company: Peter Thomson
    * @author Peter Thomson
    * @version 1.0
    */


    public class Applet1 extends JApplet {
    boolean isStandalone = false;
    String var0;
    String var1;
    public String uploadfilename;
    JFileChooser jFileChooser1 = new JFileChooser();
    Box box1;
    TextField textField1 = new TextField();
    TextField textField2 = new TextField();
    Button Uploadbutton = new Button();
    /**Get a parameter value*/
    public String getParameter(String key, String def) {
    return isStandalone ? System.getProperty(key, def) :
    (getParameter(key) != null ? getParameter(key) : def);
    }

    /**Construct the applet*/
    public Applet1() {
    }
    /**Initialize the applet*/
    public void init() {
    try {
    var0 = this.getParameter("param0", "");
    }
    catch(Exception e) {
    e.printStackTrace();
    }
    try {
    var1 = this.getParameter("param1", "");
    }
    catch(Exception e) {
    e.printStackTrace();
    }
    try {
    jbInit();
    }
    catch(Exception e) {
    e.printStackTrace();
    }
    }
    /**Component initialization*/
    private void jbInit() throws Exception {
    box1 = Box.createHorizontalBox();
    this.setSize(new Dimension(400,300));
    textField1.setText("None selected");
    jFileChooser1.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    jFileChooser1_actionPerformed(e);
    }
    });
    textField2.setText("You have chosen");
    Uploadbutton.setLabel("Upload file");
    Uploadbutton.addMouseListener(new java.awt.event.MouseAdapter() {
    public void mouseClicked(MouseEvent e) {
    Uploadbutton_mouseClicked(e);
    }
    });
    this.getContentPane().add(jFileChooser1, BorderLayout.SOUTH);
    this.getContentPane().add(box1, BorderLayout.CENTER);
    box1.add(textField2, null);
    box1.add(textField1, null);
    this.getContentPane().add(Uploadbutton, BorderLayout.EAST);
    }
    /**Start the applet*/
    public void start() {
    }
    /**Stop the applet*/
    public void stop() {
    }
    /**Destroy the applet*/
    public void destroy() {
    }
    /**Get Applet information*/
    public String getAppletInfo() {
    return "Applet Information";
    }
    /**Get parameter info*/
    public String[][] getParameterInfo() {
    String[][] pinfo =
    {
    {"param0", "String", "url"},
    {"param1", "String", ""},
    };
    return pinfo;
    }

    //static initializer for setting look & feel
    static {
    try {
    //UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    //UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
    }
    catch(Exception e) {
    }
    }

    void jFileChooser1_actionPerformed(ActionEvent e) {
    uploadfilename=jFileChooser1.getSelectedFile().getPath();
    textField1.setText(jFileChooser1.getSelectedFile().getName());

    System.out.println("action taken here" + uploadfilename );
    }

    void Uploadbutton_mouseClicked(MouseEvent e) {

    upload_file_name newup=new upload_file_name(uploadfilename);

    System.out.println("action taken here " + uploadfilename );
    }
    }
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.