Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    GameArena's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    107
    Reputation
    9
    Thanks
    44

    VB 2010 Injector

    I'm just learning to make an injector from flameswor10's tutorial
    https://www.mpgh.net/forum/207-combat...urce-code.html

    Problem is there are a lot of error's! Can anyone confirm this source works? Or is it outdated and missing.

    Thank you

  2. #2
    NOOB's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,843
    Reputation
    425
    Thanks
    8,616
    Won't work on 64-bit.

  3. The Following User Says Thank You to NOOB For This Useful Post:

    GameArena (04-03-2011)

  4. #3
    GameArena's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    107
    Reputation
    9
    Thanks
    44
    Quote Originally Posted by ᴺᴼᴼᴮ View Post
    Won't work on 64-bit.
    Wow i'll have to give it a shot on my VM

  5. #4
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,159
    Reputation
    490
    Thanks
    2,253
    Quote Originally Posted by ᴺᴼᴼᴮ View Post
    Won't work on 64-bit.
    Dont think CRT is compatible wit x64

  6. #5
    Departure's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    805
    Reputation
    125
    Thanks
    1,794
    My Mood
    Doh
    the first question to be asked, what is the difference between X86 to X64, try to understand what the difference is then you will know why it does'nt work for x64

  7. #6
    GameArena's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    107
    Reputation
    9
    Thanks
    44
    Quote Originally Posted by Departure View Post
    the first question to be asked, what is the difference between X86 to X64, try to understand what the difference is then you will know why it does'nt work for x64
    Drivers? other difference is the amount of RAM.
    edit: going to think about that one
    Last edited by GameArena; 04-03-2011 at 07:15 PM.

  8. #7
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    5,052
    My Mood
    Cool
    Quote Originally Posted by GameArena View Post
    Drivers? other difference is the amount of RAM
    The differents in X86 and X64 is not with in the ram but within the memory.. thats sounds so stupid.

    Before they had all these 32 bits and these 64bits.. lets scale down... to a simple 2bit and 4bit processor running on a 2bit Windows. (Windows 0.000000000000001 2bit and windows 0.000000000000002 4bit);


    Well we know a bit is binary which is a '1' and a '0'

    2bit processor can only store 2 bits or lower on information in its registers.

    4bit processor can only store 4 bits or lower on information in its registers.

    this highest value of a 2bit is '11' which is 3 in normal numbers
    highest in a 4bit is a '1111' which is 15

    hmm where does the memory come in,

    how do i put this?

    2bit can only hole 1/85 of a byte of ram
    4bit can only hold 1/63.75 of a byte of ram...


    I CAN BE WRONG IN SOME PARTS OF THIS
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  9. The Following User Says Thank You to topblast For This Useful Post:

    GameArena (04-03-2011)

  10. #8
    GameArena's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    107
    Reputation
    9
    Thanks
    44
    Quote Originally Posted by topblast View Post


    The differents in X86 and X64 is not with in the ram but within the memory.. thats sounds so stupid.

    Before they had all these 32 bits and these 64bits.. lets scale down... to a simple 2bit and 4bit processor running on a 2bit Windows. (Windows 0.000000000000001 2bit and windows 0.000000000000002 4bit);


    Well we know a bit is binary which is a '1' and a '0'

    2bit processor can only store 2 bits or lower on information in its registers.

    4bit processor can only store 4 bits or lower on information in its registers.

    this highest value of a 2bit is '11' which is 3 in normal numbers
    highest in a 4bit is a '1111' which is 15

    hmm where does the memory come in,

    how do i put this?

    2bit can only hole 1/85 of a byte of ram
    4bit can only hold 1/63.75 of a byte of ram...


    I CAN BE WRONG IN SOME PARTS OF THIS
    That really explains it so in this case the code one would think the other way around because the bytes are less in this case x86 :S

  11. #9
    Bombsaway707's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Gym
    Posts
    8,799
    Reputation
    791
    Thanks
    4,004
    My Mood
    Amused
    It's fine, you just have to know what your doing in VB

  12. #10
    GameArena's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    107
    Reputation
    9
    Thanks
    44
    Quote Originally Posted by Bombsaway707 View Post
    It's fine, you just have to know what your doing in VB
    now i'm even more confused :S :S :S
    well i need some help please don't flame :\
    (Error's below)

    Error 1 Statement is not valid in a namespace. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 1 1 WindowsApplication1
    Error 2 Statement cannot appear within a method body. End of method assumed. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 72 1 WindowsApplication1
    Error 3 Statement is not valid in a namespace. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 72 1 WindowsApplication1
    Error 4 Statement is not valid in a namespace. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 97 1 WindowsApplication1
    Error 5 Statement is not valid in a namespace. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 112 1 WindowsApplication1
    Error 6 Statement is not valid in a namespace. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 122 1 WindowsApplication1
    Error 7 Statement is not valid in a namespace. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 149 1 WindowsApplication1
    Error 8 Statement is not valid in a namespace. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 169 1 WindowsApplication1
    Error 9 Statement is not valid in a namespace. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 173 1 WindowsApplication1
    Error 10 Statement is not valid in a namespace. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 177 1 WindowsApplication1
    Error 11 Statement is not valid in a namespace. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 197 1 WindowsApplication1
    Error 12 'End Class' must be preceded by a matching 'Class'. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 203 5 WindowsApplication1
    Error 13 Identifier expected. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 204 2 WindowsApplication1



    [Source Code]
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load


    [php]()
    Public Class Form1

    Private TargetProcessHandle As Integer
    Private pfnStartAddr As Integer
    Private TargetBufferSize As Integer

    Public Const PROCESS_VM_READ = &H10
    Public Const TH32CS_SNAPPROCESS = &H2
    Public Const MEM_COMMIT = 4096
    Public Const PAGE_READWRITE = 4
    Public Const PROCESS_CREATE_THREAD = (&H2)
    Public Const PROCESS_VM_OPERATION = (&H8)
    Public Const PROCESS_VM_WRITE = (&H20)

    Public Declare Function ReadProcessMemory Lib "kernel32" ( _
    ByVal hProcess As Integer, _
    ByVal lpBaseAddress As Integer, _
    ByVal lpBuffer As String, _
    ByVal nSize As Integer, _
    ByRef lpNumberOfBytesWritten As Integer) As Integer

    Public Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" ( _
    ByVal lpLibFileName As String) As Integer

    Public Declare Function VirtualAllocEx Lib "kernel32" ( _
    ByVal hProcess As Integer, _
    ByVal lpAddress As Integer, _
    ByVal dwSize As Integer, _
    ByVal flAllocationType As Integer, _
    ByVal flProtect As Integer) As Integer

    Public Declare Function WriteProcessMemory Lib "kernel32" ( _
    ByVal hProcess As Integer, _
    ByVal lpBaseAddress As Integer, _
    ByVal lpBuffer As String, _
    ByVal nSize As Integer, _
    ByRef lpNumberOfBytesWritten As Integer) As Integer



    Public Declare Function GetProcAddress Lib "kernel32" ( _
    ByVal hModule As Integer, ByVal lpProcName As String) As Integer

    Private Declare Function GetModuleHandle Lib "Kernel32" Alias "GetModuleHandleA" ( _
    ByVal lpModuleName As String) As Integer

    Public Declare Function CreateRemoteThread Lib "kernel32" ( _
    ByVal hProcess As Integer, _
    ByVal lpThreadAttributes As Integer, _
    ByVal dwStackSize As Integer, _
    ByVal lpStartAddress As Integer, _
    ByVal lpParameter As Integer, _
    ByVal dwCreationFlags As Integer, _
    ByRef lpThreadId As Integer) As Integer

    Public Declare Function OpenProcess Lib "kernel32" ( _
    ByVal dwDesiredAccess As Integer, _
    ByVal bInheritHandle As Integer, _
    ByVal dwProcessId As Integer) As Integer

    Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
    ByVal lpClassName As String, _
    ByVal lpWindowName As String) As Integer

    Private Declare Function CloseHandle Lib "kernel32" Alias "CloseHandleA" ( _
    ByVal hObject As Integer) As Integer

    Private Sub Inject(ByVal pszLibFileRemote As String)
    Timer1.Stop()
    Dim TargetProcess As Process() = Process.GetProcessesByName(ProcessName.Text)
    TargetProcessHandle = OpenProcess(PROCESS_CREATE_THREAD Or PROCESS_VM_OPERATION Or PROCESS_VM_WRITE, False, TargetProcess(0).Id)
    Dim I As Integer
    pszLibFileRemote = ListBox1.Items.Item(I)
    pfnStartAddr = GetProcAddress(GetModuleHandle("Kernel32"), "LoadLibraryA")
    Dim Rtn As Integer
    Dim LoadLibParamAdr As Integer
    LoadLibParamAdr = VirtualAllocEx(TargetProcessHandle, 0, TargetBufferSize, MEM_COMMIT, PAGE_READWRITE)
    Rtn = WriteProcessMemory(TargetProcessHandle, LoadLibParamAdr, pszLibFileRemote, TargetBufferSize, 0)
    CreateRemoteThread(TargetProcessHandle, 0, 0, pfnStartAddr, LoadLibParamAdr, 0, 0)
    CloseHandle(TargetProcessHandle)
    If CheckBox1.Checked = True Then
    MsgBox(injector1)
    Me.Close()
    Else
    MsgBox(injector1)
    Button1.Enabled = True
    Button4.Enabled = True
    Button3.Enabled = True
    Button2.Enabled = True
    End If
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    Dim TargetProcess As Process() = Process.GetProcessesByName("ProcessName.text")
    If TargetProcess.Length = 0 Then
    Me.Label3.Text = ("Waiting for " & ProcessName.Text & ".exe")
    Me.Label2.Text = ("Ready to Inject")
    Else
    Timer1.Stop()
    Me.Label3.Text = ("Injected to" & ProcessName.Text & ".exe")
    Me.Label2.Text = ("Injection Succesfull")
    For Each hack In ListBox1.Items
    Call Inject(hack.ToString)
    Next
    End If
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Button1.Enabled = False
    Button4.Enabled = False
    Button3.Enabled = False
    Button2.Enabled = False
    Timer1.Interval = 50
    Timer1.Start()
    MsgBox("Ready to Inject")
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Button1.Text = "Auto Inject"
    Button5.Text = "Manual Inject"
    Button6.Text = "Save Settings"
    Button4.Text = "Clear Listbox"
    Button3.Text = "Remove dll"
    Button2.Text = "Add DLL"
    Me.Label1.Text = ("Please Enter Process Name without .exe")
    Me.Label3.Text = ("Welcome to my injector")
    Me.Label2.Text = ("Please Choose a dll file")
    Dim fileReader As System.IO.StreamReader
    If IO.File.Exists(Application.StartupPath & "\settings.ini") Then
    fileReader = _
    My.Computer.FileSystem.OpenTextFileReader(Applicat ion.StartupPath & "\settings.ini")
    Dim stringReader As String
    stringReader = fileReader.ReadLine()
    If stringReader = "Checkbox1.Checked = 1" Then
    CheckBox1.Checked = True
    Else
    End If
    Else
    Dim file As New System.IO.StreamWriter(Application.StartupPath & "\settings.ini")
    file.WriteLine("Checkbox1.checked = 0")
    file.Close()
    End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    Dim OpenFileDialog1 As New OpenFileDialog

    OpenFileDialog1.InitialDirectory = "Desktop"
    OpenFileDialog1.Filter = "DLL files (*.dll)|*.dll|All files (*.*)|*.*"
    OpenFileDialog1.FilterIndex = 1
    OpenFileDialog1.RestoreDirectory = True
    OpenFileDialog1.Multiselect = True

    If OpenFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
    Try
    For Each i As Object In OpenFileDialog1.FileNames
    ListBox1.Items.Add(i)
    Next
    Catch Ex As Exception
    MessageBox.Show("Cannot read file from disk. Original error: " & Ex.Message)
    End Try
    End If
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
    ListBox1.Items.Remove(ListBox1.SelectedItem.ToStri ng)
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
    ListBox1.Items.Clear()
    End Sub

    Private Sub Button5_Click(ByVal pszLibFileRemote As String)
    Timer1.Stop()
    Dim TargetProcess As Process() = Process.GetProcessesByName(ProcessName.Text)
    TargetProcessHandle = OpenProcess(PROCESS_CREATE_THREAD Or PROCESS_VM_OPERATION Or PROCESS_VM_WRITE, False, TargetProcess(0).Id)
    pfnStartAddr = GetProcAddress(GetModuleHandle("Kernel32"), "LoadLibraryA")
    TargetBufferSize = 1 + Len(pszLibFileRemote)
    Dim Rtn As Integer
    Dim LoadLibParamAdr As Integer
    LoadLibParamAdr = VirtualAllocEx(TargetProcessHandle, 0, TargetBufferSize, MEM_COMMIT, PAGE_READWRITE)
    Rtn = WriteProcessMemory(TargetProcessHandle, LoadLibParamAdr, pszLibFileRemote, TargetBufferSize, 0)
    CreateRemoteThread(TargetProcessHandle, 0, 0, pfnStartAddr, LoadLibParamAdr, 0, 0)
    CloseHandle(TargetProcessHandle)
    If CheckBox1.Checked = True Then
    Me.Close()
    MsgBox(injector1)
    Else
    MsgBox(injector1)
    End If
    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
    Dim file As New System.IO.StreamWriter(Application.StartupPath & "\setting.ini")
    file.WriteLine("Checkbox1.Checked = " & CheckBox1.CheckState)
    file.Close()
    MsgBox("Settings are Saved")
    End Sub
    End Class
    [/php]


    And credits to flameswor10' + mwin for the source

  13. #11
    NOOB's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,843
    Reputation
    425
    Thanks
    8,616
    Quote Originally Posted by GameArena View Post
    now i'm even more confused :S :S :S
    well i need some help please don't flame :\
    (Error's below)

    Error 1 Statement is not valid in a namespace. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 1 1 WindowsApplication1
    Error 2 Statement cannot appear within a method body. End of method assumed. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 72 1 WindowsApplication1
    Error 3 Statement is not valid in a namespace. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 72 1 WindowsApplication1
    Error 4 Statement is not valid in a namespace. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 97 1 WindowsApplication1
    Error 5 Statement is not valid in a namespace. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 112 1 WindowsApplication1
    Error 6 Statement is not valid in a namespace. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 122 1 WindowsApplication1
    Error 7 Statement is not valid in a namespace. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 149 1 WindowsApplication1
    Error 8 Statement is not valid in a namespace. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 169 1 WindowsApplication1
    Error 9 Statement is not valid in a namespace. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 173 1 WindowsApplication1
    Error 10 Statement is not valid in a namespace. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 177 1 WindowsApplication1
    Error 11 Statement is not valid in a namespace. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 197 1 WindowsApplication1
    Error 12 'End Class' must be preceded by a matching 'Class'. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 203 5 WindowsApplication1
    Error 13 Identifier expected. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 204 2 WindowsApplication1



    [Source Code]
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load


    [php]()
    Public Class Form1

    Private TargetProcessHandle As Integer
    Private pfnStartAddr As Integer
    Private TargetBufferSize As Integer

    Public Const PROCESS_VM_READ = &H10
    Public Const TH32CS_SNAPPROCESS = &H2
    Public Const MEM_COMMIT = 4096
    Public Const PAGE_READWRITE = 4
    Public Const PROCESS_CREATE_THREAD = (&H2)
    Public Const PROCESS_VM_OPERATION = (&H8)
    Public Const PROCESS_VM_WRITE = (&H20)

    Public Declare Function ReadProcessMemory Lib "kernel32" ( _
    ByVal hProcess As Integer, _
    ByVal lpBaseAddress As Integer, _
    ByVal lpBuffer As String, _
    ByVal nSize As Integer, _
    ByRef lpNumberOfBytesWritten As Integer) As Integer

    Public Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" ( _
    ByVal lpLibFileName As String) As Integer

    Public Declare Function VirtualAllocEx Lib "kernel32" ( _
    ByVal hProcess As Integer, _
    ByVal lpAddress As Integer, _
    ByVal dwSize As Integer, _
    ByVal flAllocationType As Integer, _
    ByVal flProtect As Integer) As Integer

    Public Declare Function WriteProcessMemory Lib "kernel32" ( _
    ByVal hProcess As Integer, _
    ByVal lpBaseAddress As Integer, _
    ByVal lpBuffer As String, _
    ByVal nSize As Integer, _
    ByRef lpNumberOfBytesWritten As Integer) As Integer



    Public Declare Function GetProcAddress Lib "kernel32" ( _
    ByVal hModule As Integer, ByVal lpProcName As String) As Integer

    Private Declare Function GetModuleHandle Lib "Kernel32" Alias "GetModuleHandleA" ( _
    ByVal lpModuleName As String) As Integer

    Public Declare Function CreateRemoteThread Lib "kernel32" ( _
    ByVal hProcess As Integer, _
    ByVal lpThreadAttributes As Integer, _
    ByVal dwStackSize As Integer, _
    ByVal lpStartAddress As Integer, _
    ByVal lpParameter As Integer, _
    ByVal dwCreationFlags As Integer, _
    ByRef lpThreadId As Integer) As Integer

    Public Declare Function OpenProcess Lib "kernel32" ( _
    ByVal dwDesiredAccess As Integer, _
    ByVal bInheritHandle As Integer, _
    ByVal dwProcessId As Integer) As Integer

    Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
    ByVal lpClassName As String, _
    ByVal lpWindowName As String) As Integer

    Private Declare Function CloseHandle Lib "kernel32" Alias "CloseHandleA" ( _
    ByVal hObject As Integer) As Integer

    Private Sub Inject(ByVal pszLibFileRemote As String)
    Timer1.Stop()
    Dim TargetProcess As Process() = Process.GetProcessesByName(ProcessName.Text)
    TargetProcessHandle = OpenProcess(PROCESS_CREATE_THREAD Or PROCESS_VM_OPERATION Or PROCESS_VM_WRITE, False, TargetProcess(0).Id)
    Dim I As Integer
    pszLibFileRemote = ListBox1.Items.Item(I)
    pfnStartAddr = GetProcAddress(GetModuleHandle("Kernel32"), "LoadLibraryA")
    Dim Rtn As Integer
    Dim LoadLibParamAdr As Integer
    LoadLibParamAdr = VirtualAllocEx(TargetProcessHandle, 0, TargetBufferSize, MEM_COMMIT, PAGE_READWRITE)
    Rtn = WriteProcessMemory(TargetProcessHandle, LoadLibParamAdr, pszLibFileRemote, TargetBufferSize, 0)
    CreateRemoteThread(TargetProcessHandle, 0, 0, pfnStartAddr, LoadLibParamAdr, 0, 0)
    CloseHandle(TargetProcessHandle)
    If CheckBox1.Checked = True Then
    MsgBox(injector1)
    Me.Close()
    Else
    MsgBox(injector1)
    Button1.Enabled = True
    Button4.Enabled = True
    Button3.Enabled = True
    Button2.Enabled = True
    End If
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    Dim TargetProcess As Process() = Process.GetProcessesByName("ProcessName.text")
    If TargetProcess.Length = 0 Then
    Me.Label3.Text = ("Waiting for " & ProcessName.Text & ".exe")
    Me.Label2.Text = ("Ready to Inject")
    Else
    Timer1.Stop()
    Me.Label3.Text = ("Injected to" & ProcessName.Text & ".exe")
    Me.Label2.Text = ("Injection Succesfull")
    For Each hack In ListBox1.Items
    Call Inject(hack.ToString)
    Next
    End If
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Button1.Enabled = False
    Button4.Enabled = False
    Button3.Enabled = False
    Button2.Enabled = False
    Timer1.Interval = 50
    Timer1.Start()
    MsgBox("Ready to Inject")
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Button1.Text = "Auto Inject"
    Button5.Text = "Manual Inject"
    Button6.Text = "Save Settings"
    Button4.Text = "Clear Listbox"
    Button3.Text = "Remove dll"
    Button2.Text = "Add DLL"
    Me.Label1.Text = ("Please Enter Process Name without .exe")
    Me.Label3.Text = ("Welcome to my injector")
    Me.Label2.Text = ("Please Choose a dll file")
    Dim fileReader As System.IO.StreamReader
    If IO.File.Exists(Application.StartupPath & "\settings.ini") Then
    fileReader = _
    My.Computer.FileSystem.OpenTextFileReader(Applicat ion.StartupPath & "\settings.ini")
    Dim stringReader As String
    stringReader = fileReader.ReadLine()
    If stringReader = "Checkbox1.Checked = 1" Then
    CheckBox1.Checked = True
    Else
    End If
    Else
    Dim file As New System.IO.StreamWriter(Application.StartupPath & "\settings.ini")
    file.WriteLine("Checkbox1.checked = 0")
    file.Close()
    End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    Dim OpenFileDialog1 As New OpenFileDialog

    OpenFileDialog1.InitialDirectory = "Desktop"
    OpenFileDialog1.Filter = "DLL files (*.dll)|*.dll|All files (*.*)|*.*"
    OpenFileDialog1.FilterIndex = 1
    OpenFileDialog1.RestoreDirectory = True
    OpenFileDialog1.Multiselect = True

    If OpenFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
    Try
    For Each i As Object In OpenFileDialog1.FileNames
    ListBox1.Items.Add(i)
    Next
    Catch Ex As Exception
    MessageBox.Show("Cannot read file from disk. Original error: " & Ex.Message)
    End Try
    End If
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
    ListBox1.Items.Remove(ListBox1.SelectedItem.ToStri ng)
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
    ListBox1.Items.Clear()
    End Sub

    Private Sub Button5_Click(ByVal pszLibFileRemote As String)
    Timer1.Stop()
    Dim TargetProcess As Process() = Process.GetProcessesByName(ProcessName.Text)
    TargetProcessHandle = OpenProcess(PROCESS_CREATE_THREAD Or PROCESS_VM_OPERATION Or PROCESS_VM_WRITE, False, TargetProcess(0).Id)
    pfnStartAddr = GetProcAddress(GetModuleHandle("Kernel32"), "LoadLibraryA")
    TargetBufferSize = 1 + Len(pszLibFileRemote)
    Dim Rtn As Integer
    Dim LoadLibParamAdr As Integer
    LoadLibParamAdr = VirtualAllocEx(TargetProcessHandle, 0, TargetBufferSize, MEM_COMMIT, PAGE_READWRITE)
    Rtn = WriteProcessMemory(TargetProcessHandle, LoadLibParamAdr, pszLibFileRemote, TargetBufferSize, 0)
    CreateRemoteThread(TargetProcessHandle, 0, 0, pfnStartAddr, LoadLibParamAdr, 0, 0)
    CloseHandle(TargetProcessHandle)
    If CheckBox1.Checked = True Then
    Me.Close()
    MsgBox(injector1)
    Else
    MsgBox(injector1)
    End If
    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
    Dim file As New System.IO.StreamWriter(Application.StartupPath & "\setting.ini")
    file.WriteLine("Checkbox1.Checked = " & CheckBox1.CheckState)
    file.Close()
    MsgBox("Settings are Saved")
    End Sub
    End Class
    [/php]


    And credits to flameswor10' + mwin for the source
    It's fine, you just have to know what your doing in VB

  14. #12
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,159
    Reputation
    490
    Thanks
    2,253
    Quote Originally Posted by ᴺᴼᴼᴮ View Post


    It's fine, you just have to know what your doing in VB
    VB BlowS !!!!!
    Learn2Code in C languages Peps
    Or *Cough* C&P

  15. #13
    NOOB's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,843
    Reputation
    425
    Thanks
    8,616
    Quote Originally Posted by whit View Post
    VB BlowS !!!!!
    Learn2Code in C languages Peps
    Or *Cough* C&P
    dats why dis is in c++

  16. #14
    GameArena's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    107
    Reputation
    9
    Thanks
    44
    Quote Originally Posted by whit View Post
    VB BlowS !!!!!
    Or *Cough* C&P
    yeah yeah i know


    Quote Originally Posted by ᴺᴼᴼᴮ View Post


    dats why dis is in c++
    thats dam cool teach me
    Last edited by GameArena; 04-03-2011 at 08:53 PM.

  17. #15
    Departure's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    805
    Reputation
    125
    Thanks
    1,794
    My Mood
    Doh
    The only error here is the programmer not understanding the code he/she has
    C/P, topblast is correct it has to do with amount of data that can be stored in a register, no i don't mean the registry .... x64 has 8 new registers..

    quote..
    rXb for 8 bit register (containing the lowest byte of the 64-bit value)
    rXw for 16 bits
    rXd for 32 bits
    rX for 64 bits

    but as towards your injection code there is no reason why this doesn't work for x64, if you actually took the time to read some of msdn articals about createRemoteThread you will find why ;.

Page 1 of 2 12 LastLast