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

 

 


Tema destacado: Security Series.XSS. [Cross Site Scripting]


+  Foro de elhacker.net
|-+  Programación
| |-+  Ingeniería Inversa (Moderadores: karmany, .:UND3R:., MCKSys Argentina)
| | |-+  (Ayuda) como usar los pointer & offset EN VB.NET
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: (Ayuda) como usar los pointer & offset EN VB.NET  (Leído 4,901 veces)
GarnoX

Desconectado Desconectado

Mensajes: 18


Ver Perfil
(Ayuda) como usar los pointer & offset EN VB.NET
« en: 28 Marzo 2013, 07:38 am »

Hola Bueno he estado leyendo la guia  de .:UND3R:]. La cual es de ingenieria inversa para crear un hack o trainer de pvz he sacado varios cheats


Todo bien pero me gustaria... en vez de usar la opcion de generar el trainer  en el mismo CE usar no se vb.net y crear mi propio trainer desde 0

pero el problema resulta es que he visto guias

pero todas son de adress, el valor que modifica pero
yo tengo los datos asi Adrees + offset + offset = valor
En el caso de ponerlo en vb.net como iría



(OJO NO estoy pidiendo que me den el codigo solo que me enseñen o me den datos por donde empezar]

PD: si esto no va aca algun moderador lo puede mover Pliz
« Última modificación: 29 Marzo 2013, 12:05 pm por GarnoX » En línea

tincopasan


Desconectado Desconectado

Mensajes: 1.286

No es lo mismo conocer el camino que recorrerlo.


Ver Perfil
Re: (Ayuda) COMO USAR LOS POINTER & OFFSET EN VB.NET
« Respuesta #1 en: 28 Marzo 2013, 09:07 am »

A ver, soy muy perro en esto pero creo que un pointer es una dirección dinámica que contiene un valor y que esa dirección varía en cada ejecución, pero la dirección estática encargada de modificar dicho valor no. Por ejemplo: el pointer tiene en cada ejecución un valor que aumenta o disminuye, le pongamos 1000 si disparo baja a 999, y es porque en alguna dirección estática hizo por ejemplo un sub esi,ebx. entonces lo que yo haría es modificar esa address, con nop o add etc. Los que más saben me corregirán si estoy muy errado.
En línea

GarnoX

Desconectado Desconectado

Mensajes: 18


Ver Perfil
Re: (Ayuda) COMO USAR LOS POINTER & OFFSET EN VB.NET
« Respuesta #2 en: 28 Marzo 2013, 22:08 pm »

Eso ya lo tengo entendido ya tengo el Pointer Que nunca cambia al reiniciar el juego o al salir del juego...

como vez en la imagen :D ya tengo algunos del os Valores que he encontrado en el juego y todo se pueden usar una y otra vez cerrando el juego  y al abrirlo sigue funsionando mi problema es como usarlo para crear un trainer en un lenguaje x por ejemplo vb.net O_O
ya que  casi en todas las guia que he visto  dan ejemplo como asi  &h(Address), 12312(Valor a Cambiar)
pero mi  address pointer es Asi  &h(address), Offset , Offset  Valor O_O
http://i46.tinypic.com/1onotk.png
En línea

tincopasan


Desconectado Desconectado

Mensajes: 1.286

No es lo mismo conocer el camino que recorrerlo.


Ver Perfil
Re: (Ayuda) COMO USAR LOS POINTER & OFFSET EN VB.NET
« Respuesta #3 en: 29 Marzo 2013, 03:55 am »

no creo poder ayudarte pero tanto en vb6 como en vb.net "&HXXXXX" indican que el valor es hexadecimal, ahora si conoces los valores es lo mismo  que sea  un address o un offset o sea &H00401226(address) y &H1226(offset es lo mismo) siempre que la imagebase sea 400000,  el tema es que para escribir en un archivo por ejemplo se tiene que pasar el valor del offset (y en vb es + 1), ahora si veo tu primer msj y tenes pointer = address + offset + offset  la dirección del pointer sería= offset + offset + offset
put #1 pointer, valor , no sé si aclaro o nublo más! perdón por lo metido
En línea

GarnoX

Desconectado Desconectado

Mensajes: 18


Ver Perfil
Re: (Ayuda) como usar los pointer & offset EN VB.NET
« Respuesta #4 en: 29 Marzo 2013, 12:08 pm »


creo que sigo confundido Pero tratare de explicarlo mejor

usare este video de ejemplo


ya que de ese modo es que estoy haciendo el trainer

Mi adrdess base seria asi 0073d7e8 + offset 2(868) +  offset+ 1(5578) el cual da el nuevo valor  y el address que tiene valor almacenado en una adress dinamica

por lo que seria algo asi &h73d7e8 la dirección hex pero el problema es en todo los código que he visto
solo ponen la dirección base no usan offset O_O todo radica como le meto los offset a esa dirección por que si pongo solo la  address y el valor me cierra el programa algo debo estar haciendo mal :o :o y me gustaría como dije aprender desde 0 a pescar con dinamita

« Última modificación: 29 Marzo 2013, 12:10 pm por GarnoX » En línea

GarnoX

Desconectado Desconectado

Mensajes: 18


Ver Perfil
[Solucionado ]como usar los pointer & offset EN VB.NET
« Respuesta #5 en: 1 Abril 2013, 00:25 am »

Buenos Despues De Tanto Leer Logre Creear mi Trainer  de de PvZ 2  :D


Les dejo
Citar
Código:
En un Modulo Colocamos Esto

Código:
'Importamos la libreria 
Imports System.Runtime.InteropServices
'Propietario Original del modulo
'Autor: Cless
' Editado: por Mi
Module MemoryEditor
    '########## Funcion Para Leer Memoria ############
    '   LMBytes: Sirve Para leer Los bytes
    '   LMInt: aun no entiendo su funsionalidad completamente no si si lee de 2bytes, 4 bytes 8byte o un array
    '   LMFloat: Sirve para leer memoria flotante
    '   LMDouble: Sirve para leer Memoria Double
    '########## Funcion Para Escribir Memoria ############
    '   EMBytes: Sirve Para  escribir Los bytes
    '   EMInt: aun no entiendo su funsionalidad completamente no  si Escribir de 2bytes, 4 bytes 8byte o un array
    '   EMFloat: Sirve para Escribir memoria flotante
    '   EMDouble: Sirve para Escribir Memoria Double

    Private Declare Function LMBytes Lib "kernel32" Alias "ReadProcessMemory" _
            (ByVal Handle As Integer, ByVal Address As Integer, _
                                 ByRef Value As Byte, Optional ByVal Size As Integer = 2, _
                                Optional ByRef Bytes As Integer = 0) As Byte
    Private Declare Function LMInt Lib "kernel32" Alias "ReadProcessMemory" _
        (ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Integer, _
                                Optional ByVal Size As Integer = 4, Optional ByRef Bytes As Integer = 0) As Integer
    Private Declare Function LMFloat Lib "kernel32" Alias "ReadProcessMemory" _
        (ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Single, _
                                Optional ByVal Size As Integer = 4, Optional ByRef Bytes As Integer = 0) As Single
    Private Declare Function LMDouble Lib "kernel32" Alias "ReadProcessMemory" _
        (ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Double, _
                                Optional ByVal Size As Integer = 8, Optional ByRef Bytes As Integer = 0) As Double
    Private Declare Function EMBytes Lib "kernel32" Alias "WriteProcessMemory" _
        (ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Byte, _
                                Optional ByVal Size As Integer = 2, Optional ByRef Bytes As Integer = 0) As Byte
    Private Declare Function EMInt Lib "kernel32" Alias "WriteProcessMemory" _
        (ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Integer, _
                                Optional ByVal Size As Integer = 4, Optional ByRef Bytes As Integer = 0) As Integer
    Private Declare Function EMFloat Lib "kernel32" Alias "WriteProcessMemory" _
        (ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Single, _
                                Optional ByVal Size As Integer = 2, Optional ByRef Bytes As Integer = 0) As Single
    Private Declare Function EMDouble Lib "kernel32" Alias "WriteProcessMemory" _
        (ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Double, _
                                Optional ByVal Size As Integer = 2, Optional ByRef Bytes As Integer = 0) As Double
    
    Public Function LBytes(ByVal NombreDelExe As String, ByVal Address As Integer) As Byte
        Dim Value As Byte
        If Process.GetProcessesByName(NombreDelExe).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(NombreDelExe)(0).Handle
            If Handle <> 0 Then
                LMBytes(Handle, Address, Value)
            End If
        End If
        Return Value
    End Function
    Public Function LInt(ByVal NombreDelExe As String, ByVal Address As Integer) As Integer
        Dim Value As Integer
        If Process.GetProcessesByName(NombreDelExe).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(NombreDelExe)(0).Handle
            If Handle <> 0 Then
                LMInt(Handle, Address, Value)
            End If
        End If
        Return Value
    End Function
    Public Function LFloat(ByVal NombreDelExe As String, ByVal Address As Integer) As Single
        Dim Value As Single
        If Process.GetProcessesByName(NombreDelExe).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(NombreDelExe)(0).Handle
            If Handle <> 0 Then
                LMFloat(Handle, Address, Value)
            End If
        End If
        Return Value
    End Function
    Public Function LDouble(ByVal NombreDelExe As String, ByVal Address As Integer) As Double
        Dim Value As Double
        If Process.GetProcessesByName(NombreDelExe).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(NombreDelExe)(0).Handle
            If Handle <> 0 Then
                LMBytes(Handle, Address, Value)
            End If
        End If
        Return Value
    End Function
    Public Function LPBytes(ByVal NombreDelExe As String, ByVal Pointer As Integer, ByVal ParamArray Offset As Integer()) As Byte
        Dim Value As Byte
        If Process.GetProcessesByName(NombreDelExe).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(NombreDelExe)(0).Handle
            If Handle <> 0 Then
                For Each I As Integer In Offset
                    LMInt(Handle, Pointer, Pointer)
                    Pointer += I
                Next
                LMBytes(Handle, Pointer, Value)
            End If
        End If
        Return Value
    End Function
    Public Function LPInt(ByVal NombreDelExe As String, ByVal Pointer As Integer, ByVal ParamArray Offset As Integer()) As Integer
        Dim Value As Integer
        If Process.GetProcessesByName(NombreDelExe).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(NombreDelExe)(0).Handle
            If Handle <> 0 Then
                For Each I As Integer In Offset
                    LMInt(Handle, Pointer, Pointer)
                    Pointer += I
                Next
                LMInt(Handle, Pointer, Value)
            End If
        End If
        Return Value
    End Function
    Public Function LPFloat(ByVal NombreDelExe As String, ByVal Pointer As Integer, ByVal ParamArray Offset As Integer()) As Single
        Dim Value As Single
        If Process.GetProcessesByName(NombreDelExe).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(NombreDelExe)(0).Handle
            If Handle <> 0 Then
                For Each I As Integer In Offset
                    LMInt(Handle, Pointer, Pointer)
                    Pointer += I
                Next
                LMFloat(Handle, Pointer, Value)
            End If
        End If
        Return Value
    End Function
    Public Function LPDouble(ByVal NombreDelExe As String, ByVal Pointer As Integer, ByVal ParamArray Offset As Integer()) As Double
        Dim Value As Double
        If Process.GetProcessesByName(NombreDelExe).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(NombreDelExe)(0).Handle
            If Handle <> 0 Then
                For Each I As Integer In Offset
                    LMInt(Handle, Pointer, Pointer)
                    Pointer += I
                Next
                LMDouble(Handle, Pointer, Value)
            End If
        End If
        Return Value
    End Function
    Public Sub EBytes(ByVal NombreDelExe As String, ByVal Address As Integer, ByVal Value As Byte)
        If Process.GetProcessesByName(NombreDelExe).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(NombreDelExe)(0).Handle
            If Handle <> 0 Then
                EMBytes(Handle, Address, Value)
            End If
        End If
    End Sub
    Public Sub EInt(ByVal NombreDelExe As String, ByVal Address As Integer, ByVal Value As Integer)
        If Process.GetProcessesByName(NombreDelExe).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(NombreDelExe)(0).Handle
            If Handle <> 0 Then
                EMInt(Handle, Address, Value)
            End If
        End If
    End Sub
    Public Sub EFloat(ByVal NombreDelExe As String, ByVal Address As Integer, ByVal Value As Single)
        If Process.GetProcessesByName(NombreDelExe).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(NombreDelExe)(0).Handle
            If Handle <> 0 Then
                EMFloat(Handle, Address, Value)
            End If
        End If
    End Sub
    Public Sub EDouble(ByVal NombreDelExe As String, ByVal Address As Integer, ByVal Value As Double)
        If Process.GetProcessesByName(NombreDelExe).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(NombreDelExe)(0).Handle
            If Handle <> 0 Then
                EMDouble(Handle, Address, Value)
            End If
        End If
    End Sub
    Public Sub EPBytes(ByVal NombreDelExe As String, ByVal Pointer As Integer, ByVal Value As Byte, ByVal ParamArray Offset As Integer())
        If Process.GetProcessesByName(NombreDelExe).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(NombreDelExe)(0).Handle
            If Handle <> 0 Then
                For Each I As Integer In Offset
                    LMInt(Handle, Pointer, Pointer)
                    Pointer += I
                Next
                EMBytes(Handle, Pointer, Value)
            End If
        End If
    End Sub
    Public Sub EPInt(ByVal NombreDelExe As String, ByVal Pointer As Integer, ByVal Value As Integer, ByVal ParamArray Offset As Integer())
        If Process.GetProcessesByName(NombreDelExe).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(NombreDelExe)(0).Handle
            If Handle <> 0 Then
                For Each I As Integer In Offset
                    LMInt(Handle, Pointer, Pointer)
                    Pointer += I
                Next
                EMInt(Handle, Pointer, Value)
            End If
        End If
    End Sub
    Public Sub EPFloat(ByVal NombreDelExe As String, ByVal Pointer As Integer, ByVal Value As Single, ByVal ParamArray Offset As Integer())
        If Process.GetProcessesByName(NombreDelExe).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(NombreDelExe)(0).Handle
            If Handle <> 0 Then
                For Each I As Integer In Offset
                    LMInt(Handle, Pointer, Pointer)
                    Pointer += I
                Next
                EMFloat(Handle, Pointer, Value)
            End If
        End If
    End Sub
    Public Sub EPDouble(ByVal NombreDelExe As String, ByVal Pointer As Integer, ByVal Value As Double, ByVal ParamArray Offset As Integer())
        If Process.GetProcessesByName(NombreDelExe).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(NombreDelExe)(0).Handle
            If Handle <> 0 Then
                For Each I As Integer In Offset
                    LMInt(Handle, Pointer, Pointer)
                    Pointer += I
                Next
                EMDouble(Handle, Pointer, Value)
            End If
        End If
    End Sub

End Module


Ahora En el Formulario Principal Ponemos El siguiente Codigo
Código:
Public Class FRMTRAINER
    <System.Runtime.InteropServices.DllImport("user32.dll")> _
    Private Shared Function GetAsyncKeyState(ByVal vkey As System.Windows.Forms.Keys) As Short
    End Function
    Private Sub TGeneral_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TGeneral.Tick
        Dim hotkey As Boolean
        hotkey = GetAsyncKeyState(Keys.F3)
        hotkey = GetAsyncKeyState(Keys.F4)
        hotkey = True
        Select Case hotkey
            Case Is = GetAsyncKeyState(Keys.F3)
                TSoles.Enabled = True
            Case Is = GetAsyncKeyState(Keys.F4)
                TMoney.Enabled = True
        End Select
    End Sub
    Private Sub TMoney_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TMoney.Tick
        EPInt("popcapgame1", &H73D7E8, 99999, &H94C, &H50) 'le agrega 1m de Dolares

        TMoney.Enabled = False
    End Sub
    Private Sub TSoles_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TSoles.Tick
        EPInt("popcapgame1", &H73D7E8, 99999, &H868, &H5578) '  infinitos soles
        TSoles.Enabled = False
    End Sub
End Class



Yo use VB.Net 2010
« Última modificación: 1 Abril 2013, 00:29 am por GarnoX » En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Como conocer el offset de una direccion en Ollydbg? « 1 2 »
Ingeniería Inversa
Tinkipinki 17 9,870 Último mensaje 27 Septiembre 2011, 18:00 pm
por .:UND3R:.
(Solucionado) ¿Como usar "Enviar a..." moviendo el archivo de origen?
Windows
Eleкtro 7 5,635 Último mensaje 17 Noviembre 2012, 21:17 pm
por simorg
(SOLUCIONADO) Como usar un string en la propiedad ROOTFOLDER de un dialogo?
.NET (C#, VB.NET, ASP)
Eleкtro 5 4,604 Último mensaje 23 Noviembre 2012, 15:30 pm
por Novlucker
Pointer a función (C y VB6)
Ingeniería Inversa
calk9 3 2,804 Último mensaje 14 Noviembre 2013, 02:43 am
por calk9
C# Pointer variables Safe
.NET (C#, VB.NET, ASP)
Miseryk 1 1,749 Último mensaje 13 Noviembre 2016, 14:06 pm
por fran800m
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines