[VB] ReadMemory / WriteMemory

Posts 1–7 of 7 · Page 1 of 1
[VB] ReadMemory / WriteMemory
Hi guys, i'm learning VBB2008 for since ... 2 months i think.
Well i'm bored of making injectors, auto clickers, browsers, "remember me's" and whatever.
I know its possible to Read and Write memory in vb.
Can someone show me a tutorial? /me
Code:
Module Module2
    'readdll
    Public Function readdll(ByVal modulename As String)
        Dim procmodule As ProcessModule
        Dim constant1 As Integer
        Dim constant2 As Long
        Dim constant3 As Process() = Process.GetProcessesByName("iw4mp")
        If constant3.Length = 0 Then
            Return 0
        End If
        For Each procmodule In constant3(0).Modules
            If modulename = procmodule.ModuleName Then
                constant1 = procmodule.BaseAddress
            End If
        Next
        constant2 = constant1
        Return constant2
    End Function
End Module
Code:
Module Module1

    Private Declare Function TYKKABMBQU Lib "kernel32" Alias "OpenProcess" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer
    Private Declare Function BEXOBTUFNE Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
    Private Declare Function OMJZAHPQKN Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Single, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
    Private Declare Function NTRBPISWMX Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByRef buffer As Single, ByVal size As Int32, ByRef lpNumberOfBytesRead As Int32) As Boolean
    Private Declare Function JSSBOLXQYI Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
    Private Declare Function AAUBSVVZFS Lib "kernel32" Alias "CloseHandle" (ByVal hObject As Integer) As Integer
    

    Public CUQEOTZZZK As Long
    Public GWGBROTYVU As Single
    Public FHVVZPHLND As Integer

    'WriteMemory
    Public Function OIBGHGEJUO(ByVal BKFPQUXMPO As Integer, ByVal KLLAYLUJWY As Long, ByVal EBTAURQFTH As Integer)
        Dim ZNKEYWAMJL As Process() = Process.GetProcessesByName("iw4mp")
        If ZNKEYWAMJL.Length = 0 Then
            End
        End If
        Dim UUBRHBBUBV As IntPtr = TYKKABMBQU(&H1F0FFF, 0, ZNKEYWAMJL(0).Id)
        BEXOBTUFNE(UUBRHBBUBV, BKFPQUXMPO, KLLAYLUJWY, EBTAURQFTH, Nothing)
        AAUBSVVZFS(UUBRHBBUBV)
    End Function


    'ReadLong
    Public Function HGQPPNVLFQ(ByVal BKFPQUXMPO As Integer)
        Dim ZNKEYWAMJL As Process() = Process.GetProcessesByName("iw4mp")
        If ZNKEYWAMJL.Length = 0 Then
            End
        End If
        Dim UUBRHBBUBV As IntPtr = TYKKABMBQU(&H1F0FFF, 0, ZNKEYWAMJL(0).Id)
        JSSBOLXQYI(UUBRHBBUBV, BKFPQUXMPO, CUQEOTZZZK, 4, Nothing)
        AAUBSVVZFS(UUBRHBBUBV)
        Return CUQEOTZZZK
    End Function



End Module
Replace iw4mp.exe with your process.

Declare

Code:
 Dim string1 As Long
    Dim string2 As Integer
Write to memory:

Code:
string1 = readdll("cshell.dll")
                string2 = "&H" + Hex(string1 + &H1B2C89C)
                Call OIBGHGEJUO(string2, exp.Value, 4)
OIBGHGEJUO -> Function
01B2C89C -> Address
exp.value = Value to insert
4 -> Byte Length

Read from memory:

Code:
 string1 = readdll("cshell.dll")
                string2 = "&H" + Hex(string1 + &H1B2C89C)
                textbox1.text = HGQPPNVLFQ(string2)
Holy Thanks! :O
Thats what i was searching !
Thanks+
Pleasure, if you have any further questions, feel free to ask.

You need a 2nd module btw.

Code:
Module Module2
    'readdll
    Public Function readdll(ByVal modulename As String)
        Dim procmodule As ProcessModule
        Dim constant1 As Integer
        Dim constant2 As Long
        Dim constant3 As Process() = Process.GetProcessesByName("iw4mp")
        If constant3.Length = 0 Then
            Return 0
        End If
        For Each procmodule In constant3(0).Modules
            If modulename = procmodule.ModuleName Then
                constant1 = procmodule.BaseAddress
            End If
        Next
        constant2 = constant1
        Return constant2
    End Function
End Module
Forgot, sorry
Hejsan, Hawk was very nice and helped me in msn
His code works !
Posts 1–7 of 7 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?