elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: (TUTORIAL) Aprende a emular Sentinel Dongle By Yapis


  Mostrar Mensajes
Páginas: [1]
1  Programación / Ingeniería Inversa / INTERPRETACIÓN CODIGO. SOY NOVATO NOVATO en: 5 Junio 2009, 12:25 pm
Hola! ¿Alguien puede interpretarme esto?

Exported fn(): _Java_usb_windows_DeviceImpl_getDriverKeyNameOfDeviceOnPort@16 - Ord:0005h
:100010E6 E905400000              jmp 100050F0

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:100010E6(U)
|
:100050F0 55                      push ebp
:100050F1 8BEC                    mov ebp, esp
:100050F3 81EC48010000            sub esp, 00000148
:100050F9 53                      push ebx
:100050FA 56                      push esi
:100050FB 57                      push edi
:100050FC 8DBDB8FEFFFF            lea edi, dword ptr [ebp+FFFFFEB8]
:10005102 B952000000              mov ecx, 00000052
:10005107 B8CCCCCCCC              mov eax, CCCCCCCC
:1000510C F3                      repz
:1000510D AB                      stosd
:1000510E C745FC00000000          mov [ebp-04], 00000000
:10005115 8B4514                  mov eax, dword ptr [ebp+14]
:10005118 50                      push eax
:10005119 8B4D10                  mov ecx, dword ptr [ebp+10]
:1000511C 51                      push ecx
:1000511D E81ABFFFFF              call 1000103C
:10005122 83C408                  add esp, 00000008
:10005125 8985F8FEFFFF            mov dword ptr [ebp+FFFFFEF8], eax
:1000512B 83BDF8FEFFFF00          cmp dword ptr [ebp+FFFFFEF8], 00000000
:10005132 7457                    je 1000518B
:10005134 8B95F8FEFFFF            mov edx, dword ptr [ebp+FFFFFEF8]
:1000513A 52                      push edx
:1000513B 8B4D08                  mov ecx, dword ptr [ebp+08]
:1000513E E853BFFFFF              call 10001096
:10005143 8945FC                  mov dword ptr [ebp-04], eax
:10005146 8BF4                    mov esi, esp
:10005148 8B85F8FEFFFF            mov eax, dword ptr [ebp+FFFFFEF8]
:1000514E 50                      push eax
:1000514F 8B4D14                  mov ecx, dword ptr [ebp+14]
:10005152 51                      push ecx
:10005153 8B5510                  mov edx, dword ptr [ebp+10]
:10005156 52                      push edx
:10005157 68A4230310              push 100323A4
:1000515C 8D85FCFEFFFF            lea eax, dword ptr [ebp+FFFFFEFC]
:10005162 50                      push eax
2  Programación / Ingeniería Inversa / JUSB.JAR-JUSB.CLASS en: 2 Junio 2009, 17:05 pm
¿Cómo modificarlos para saltar necesidad de dispositivo USB?

Archivo ControlMessage

el class:

package usb.core;

import java.io.IOException;

// Referenced classes of package usb.core:
//            USBException, Device

public final class ControlMessage
{

    public ControlMessage()
    {
    }

    public byte getRequestType()
    {
        return requestType;
    }

    public void setRequestType(byte byte0)
    {
        requestType = byte0;
    }

    public byte getRequest()
    {
        return request;
    }

    public void setRequest(byte byte0)
    {
        request = byte0;
    }

    public short getValue()
    {
        return value;
    }

    public void setValue(short word0)
    {
        value = word0;
    }

    public short getIndex()
    {
        return index;
    }

    public void setIndex(short word0)
    {
        index = word0;
    }

    public void setBuffer(byte abyte0[])
    {
        if(abyte0 == null || abyte0.length >= 65535)
        {
            throw new IllegalArgumentException();
        } else
        {
            buf = abyte0;
            len = (short)abyte0.length;
            return;
        }
    }

    public byte[] getBuffer()
    {
        return buf;
    }

    public void setLength(int i)
    {
        len = (short)i;
    }

    public short getLength()
    {
        return len;
    }

    public static boolean getBit(int i, byte abyte0[], int j)
    {
        byte byte0 = abyte0[j + i / 8];
        byte0 >>= i % 8;
        return (byte0 & 1) != 0;
    }

    public boolean getBit(int i, int j)
    {
        return getBit(i, buf, j);
    }

    public static byte[] getStandardDescriptor(Device device, byte byte0, byte byte1, int i, int j)
        throws IOException
    {
        return getDescriptor(device, (byte)0, byte0, byte1, i, j);
    }

    public static byte[] getClassDescriptor(Device device, byte byte0, byte byte1, int i, int j)
        throws IOException
    {
        return getDescriptor(device, (byte)32, byte0, byte1, i, j);
    }

    public static byte[] getVendorDescriptor(Device device, byte byte0, byte byte1, int i, int j)
        throws IOException
    {
        return getDescriptor(device, (byte)64, byte0, byte1, i, j);
    }

    static byte[] getDescriptor(Device device, byte byte0, byte byte1, byte byte2, int i, int j)
        throws IOException
    {
        byte abyte0[] = new byte[j];
        ControlMessage controlmessage = new ControlMessage();
        ControlMessage _tmp = controlmessage;
        controlmessage.setRequestType((byte)(0xffffff80 | byte0 | 0));
        controlmessage.setRequest((byte)6);
        controlmessage.setValue((short)(byte1 << 8 | 0xff & byte2));
        controlmessage.setIndex((short)i);
        controlmessage.setLength(j);
        device.control(controlmessage);
        return controlmessage.getBuffer();
    }

    public static void setDescriptor(Device device, byte byte0, byte byte1, byte byte2, int i, byte abyte0[])
        throws IOException
    {
        if(i > 65535 || abyte0.length > 65535)
        {
            throw new IllegalArgumentException();
        } else
        {
            ControlMessage controlmessage = new ControlMessage();
            ControlMessage _tmp = controlmessage;
            controlmessage.setRequestType((byte)(0 | byte0 | 0));
            controlmessage.setRequest((byte)7);
            controlmessage.setValue((short)(byte1 << 8 | 0xff & byte2));
            controlmessage.setIndex((short)i);
            controlmessage.setBuffer(abyte0);
            device.control(controlmessage);
            return;
        }
    }

    public static int[] getLanguages(Device device)
        throws IOException
    {
        byte abyte0[] = null;
        try
        {
            abyte0 = getStandardDescriptor(device, (byte)3, (byte)0, 0, 256);
        }
        catch(USBException usbexception)
        {
            if(!usbexception.isStalled())
                throw usbexception;
        }
        if(abyte0 == null || abyte0.length < 4)
            return null;
        int i = 0xff & abyte0[0];
        i >>= 1;
        if(--i <= 0)
            return null;
        int ai[] = new int;
        for(int j = 0; j < i; j++)
        {
            int k = 2 + 2 * j;
            ai[j] = 0xff & abyte0[k];
            ai[j] += (0xff & abyte0[k + 1]) << 8;
        }

        return ai;
    }

    public static String getString(Device device, byte byte0, int i)
        throws IOException
    {
        if(byte0 == 0)
            throw new IllegalArgumentException();
        byte abyte0[] = getStandardDescriptor(device, (byte)3, byte0, i, 256);
        int j;
        if(abyte0.length < 2 || abyte0[1] != 3 || (j = 0xff & abyte0[0]) > abyte0.length || (j -= 2) % 2 != 0)
            return null;
        char ac[] = new char[j >> 1];
        for(int k = 0; k < ac.length; k++)
        {
            int l = 2 * k + 2;
            ac[k] = (char)((abyte0[l + 1] << 8) + (0xff & abyte0[l]));
        }

        return new String(ac);
    }

    public static byte[] getStatus(Device device, int i, int j, int k, int l)
        throws IOException
    {
        ControlMessage controlmessage = new ControlMessage();
        controlmessage.setRequestType((byte)(i | 0xffffff80));
        controlmessage.setRequest((byte)0);
        controlmessage.setValue((short)j);
        controlmessage.setIndex((short)k);
        controlmessage.setLength(l);
        device.control(controlmessage);
        return controlmessage.getBuffer();
    }

    public static void clearFeature(Device device, int i, int j, int k)
        throws IOException
    {
        ControlMessage controlmessage = new ControlMessage();
        controlmessage.setRequestType((byte)(i & 0x7f));
        controlmessage.setRequest((byte)1);
        controlmessage.setValue((short)(j & 0xff));
        controlmessage.setIndex((short)k);
        device.control(controlmessage);
    }

    public static void setFeature(Device device, int i, int j, int k)
        throws IOException
    {
        ControlMessage controlmessage = new ControlMessage();
        controlmessage.setRequestType((byte)(i & 0x7f));
        controlmessage.setRequest((byte)3);
        controlmessage.setValue((short)(j & 0xff));
        controlmessage.setIndex((short)k);
        device.control(controlmessage);
    }

    private byte requestType;
    private byte request;
    private short value;
    private short index;
    private byte buf[];
    private short len;
    public static final byte DIR_TO_HOST = -128;
    public static final byte DIR_TO_DEVICE = 0;
    public static final byte TYPE_STANDARD = 0;
    public static final byte TYPE_CLASS = 32;
    public static final byte TYPE_VENDOR = 64;
    public static final byte RECIPIENT_DEVICE = 0;
    public static final byte RECIPIENT_INTERFACE = 1;
    public static final byte RECIPIENT_ENDPOINT = 2;
    public static final byte RECIPIENT_OTHER = 3;
    public static final byte GET_STATUS = 0;
    public static final byte CLEAR_FEATURE = 1;
    public static final byte SET_FEATURE = 3;
    public static final byte SET_ADDRESS = 5;
    public static final byte GET_DESCRIPTOR = 6;
    public static final byte SET_DESCRIPTOR = 7;
    public static final byte GET_CONFIGURATION = 8;
    public static final byte SET_CONFIGURATION = 9;
    public static final byte GET_INTERFACE = 10;
    public static final byte SET_INTERFACE = 11;
    public static final byte SYNCH_FRAME = 12;


y el jad:

package usb.core;

import java.io.IOException;

// Referenced classes of package usb.core:
//            USBException, Device

public final class ControlMessage
{

    public ControlMessage()
    {
    }

    public byte getRequestType()
    {
        return requestType;
    }

    public void setRequestType(byte byte0)
    {
        requestType = byte0;
    }

    public byte getRequest()
    {
        return request;
    }

    public void setRequest(byte byte0)
    {
        request = byte0;
    }

    public short getValue()
    {
        return value;
    }

    public void setValue(short word0)
    {
        value = word0;
    }

    public short getIndex()
    {
        return index;
    }

    public void setIndex(short word0)
    {
        index = word0;
    }

    public void setBuffer(byte abyte0[])
    {
        if(abyte0 == null || abyte0.length >= 65535)
        {
            throw new IllegalArgumentException();
        } else
        {
            buf = abyte0;
            len = (short)abyte0.length;
            return;
        }
    }

    public byte[] getBuffer()
    {
        return buf;
    }

    public void setLength(int i)
    {
        len = (short)i;
    }

    public short getLength()
    {
        return len;
    }

    public static boolean getBit(int i, byte abyte0[], int j)
    {
        byte byte0 = abyte0[j + i / 8];
        byte0 >>= i % 8;
        return (byte0 & 1) != 0;
    }

    public boolean getBit(int i, int j)
    {
        return getBit(i, buf, j);
    }

    public static byte[] getStandardDescriptor(Device device, byte byte0, byte byte1, int i, int j)
        throws IOException
    {
        return getDescriptor(device, (byte)0, byte0, byte1, i, j);
    }

    public static byte[] getClassDescriptor(Device device, byte byte0, byte byte1, int i, int j)
        throws IOException
    {
        return getDescriptor(device, (byte)32, byte0, byte1, i, j);
    }

    public static byte[] getVendorDescriptor(Device device, byte byte0, byte byte1, int i, int j)
        throws IOException
    {
        return getDescriptor(device, (byte)64, byte0, byte1, i, j);
    }

    static byte[] getDescriptor(Device device, byte byte0, byte byte1, byte byte2, int i, int j)
        throws IOException
    {
        byte abyte0[] = new byte[j];
        ControlMessage controlmessage = new ControlMessage();
        ControlMessage _tmp = controlmessage;
        controlmessage.setRequestType((byte)(0xffffff80 | byte0 | 0));
        controlmessage.setRequest((byte)6);
        controlmessage.setValue((short)(byte1 << 8 | 0xff & byte2));
        controlmessage.setIndex((short)i);
        controlmessage.setLength(j);
        device.control(controlmessage);
        return controlmessage.getBuffer();
    }

    public static void setDescriptor(Device device, byte byte0, byte byte1, byte byte2, int i, byte abyte0[])
        throws IOException
    {
        if(i > 65535 || abyte0.length > 65535)
        {
            throw new IllegalArgumentException();
        } else
        {
            ControlMessage controlmessage = new ControlMessage();
            ControlMessage _tmp = controlmessage;
            controlmessage.setRequestType((byte)(0 | byte0 | 0));
            controlmessage.setRequest((byte)7);
            controlmessage.setValue((short)(byte1 << 8 | 0xff & byte2));
            controlmessage.setIndex((short)i);
            controlmessage.setBuffer(abyte0);
            device.control(controlmessage);
            return;
        }
    }

    public static int[] getLanguages(Device device)
        throws IOException
    {
        byte abyte0[] = null;
        try
        {
            abyte0 = getStandardDescriptor(device, (byte)3, (byte)0, 0, 256);
        }
        catch(USBException usbexception)
        {
            if(!usbexception.isStalled())
                throw usbexception;
        }
        if(abyte0 == null || abyte0.length < 4)
            return null;
        int i = 0xff & abyte0[0];
        i >>= 1;
        if(--i <= 0)
            return null;
        int ai[] = new int;
        for(int j = 0; j < i; j++)
        {
            int k = 2 + 2 * j;
            ai[j] = 0xff & abyte0[k];
            ai[j] += (0xff & abyte0[k + 1]) << 8;
        }

        return ai;
    }

    public static String getString(Device device, byte byte0, int i)
        throws IOException
    {
        if(byte0 == 0)
            throw new IllegalArgumentException();
        byte abyte0[] = getStandardDescriptor(device, (byte)3, byte0, i, 256);
        int j;
        if(abyte0.length < 2 || abyte0[1] != 3 || (j = 0xff & abyte0[0]) > abyte0.length || (j -= 2) % 2 != 0)
            return null;
        char ac[] = new char[j >> 1];
        for(int k = 0; k < ac.length; k++)
        {
            int l = 2 * k + 2;
            ac[k] = (char)((abyte0[l + 1] << 8) + (0xff & abyte0[l]));
        }

        return new String(ac);
    }

    public static byte[] getStatus(Device device, int i, int j, int k, int l)
        throws IOException
    {
        ControlMessage controlmessage = new ControlMessage();
        controlmessage.setRequestType((byte)(i | 0xffffff80));
        controlmessage.setRequest((byte)0);
        controlmessage.setValue((short)j);
        controlmessage.setIndex((short)k);
        controlmessage.setLength(l);
        device.control(controlmessage);
        return controlmessage.getBuffer();
    }

    public static void clearFeature(Device device, int i, int j, int k)
        throws IOException
    {
        ControlMessage controlmessage = new ControlMessage();
        controlmessage.setRequestType((byte)(i & 0x7f));
        controlmessage.setRequest((byte)1);
        controlmessage.setValue((short)(j & 0xff));
        controlmessage.setIndex((short)k);
        device.control(controlmessage);
    }

    public static void setFeature(Device device, int i, int j, int k)
        throws IOException
    {
        ControlMessage controlmessage = new ControlMessage();
        controlmessage.setRequestType((byte)(i & 0x7f));
        controlmessage.setRequest((byte)3);
        controlmessage.setValue((short)(j & 0xff));
        controlmessage.setIndex((short)k);
        device.control(controlmessage);
    }

    private byte requestType;
    private byte request;
    private short value;
    private short index;
    private byte buf[];
    private short len;
    public static final byte DIR_TO_HOST = -128;
    public static final byte DIR_TO_DEVICE = 0;
    public static final byte TYPE_STANDARD = 0;
    public static final byte TYPE_CLASS = 32;
    public static final byte TYPE_VENDOR = 64;
    public static final byte RECIPIENT_DEVICE = 0;
    public static final byte RECIPIENT_INTERFACE = 1;
    public static final byte RECIPIENT_ENDPOINT = 2;
    public static final byte RECIPIENT_OTHER = 3;
    public static final byte GET_STATUS = 0;
    public static final byte CLEAR_FEATURE = 1;
    public static final byte SET_FEATURE = 3;
    public static final byte SET_ADDRESS = 5;
    public static final byte GET_DESCRIPTOR = 6;
    public static final byte SET_DESCRIPTOR = 7;
    public static final byte GET_CONFIGURATION = 8;
    public static final byte SET_CONFIGURATION = 9;
    public static final byte GET_INTERFACE = 10;
    public static final byte SET_INTERFACE = 11;
    public static final byte SYNCH_FRAME = 12;
}
3  Programación / Ingeniería Inversa / Re: crackear jusb.dll en: 21 Mayo 2009, 10:46 am
muchas gracias, shaddy. miraré y digo cosas. un saludo.
4  Programación / Ingeniería Inversa / Re: crackear jusb.dll en: 20 Mayo 2009, 11:24 am
Gracias. De todas formas, sigo el proceso con el OllyDBG y no hallo el momento en que "pilla" el USB. ¿Alguna idea?
5  Programación / Ingeniería Inversa / crackear jusb.dll en: 20 Mayo 2009, 08:56 am
Hola a todos. Tengo una aplicación programada en Delphi, y que precisa de un USB propio para ejecutarse. De hecho siempre carga un jusb.dll. ¿Alguien sabría cómo crackearlo, o evitar esta protección dll? Un saludo.

Citar
Shaddy: Se leen igual de bien las letras sin ponerla en negrita :).
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines