• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Results 1 to 4 of 4
    1. #1
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      virt15_PT's Avatar
      Join Date
      Dec 2012
      Posts
      2
      Thanks (-->)
      0
      Thanks (<--)
      0

      [help]Eject a dll from the project resources

      Silent VPN
      Hello guys , i already see same tuturials on youtube , and make a dll ejector , but i donīt find any tuturial of working with VB resources

      I need to eject 1 dll ( who is on resources ) of my program ,
      i want eject the dll ( who is on resources ) by clicking 1 button , like jump that part of goin with the openfiledialog finding the dll ,

      i already get this code:
      Spoiler: All code of program
      Code:
      Public Class AssaultCube
      
          Dim dlls As New Dictionary(Of String, String)
      
          Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer
          Private 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
          Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByVal lpBuffer() As Byte, ByVal nSize As Integer, ByVal lpNumberOfBytesWritten As UInteger) As Boolean
          Private 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
          Private 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, ByVal lpThreadId As Integer) As Integer
          Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Integer, ByVal dwMilliseconds As Integer) As Integer
          Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Integer) As Integer
      
          Private Function Inject(ByVal pID As Integer, ByVal dllLocation As String) As Boolean
      
              Dim hProcess As Integer = OpenProcess(&H1F0FFF, 1, pID)
              If hProcess = 0 Then Return False
              Dim dllBytes As Byte() = System.Text.Encoding.ASCII.GetBytes(dllLocation)
              Dim allocAddress As Integer = VirtualAllocEx(hProcess, 0, dllBytes.Length, &H1000, &H4)
              If allocAddress = Nothing Then Return False
              Dim kernelMod As Integer = GetModuleHandle("kernel32.dll")
              Dim loadLibAddr = GetProcAddress(kernelMod, "LoadLibraryA")
              If kernelMod = 0 OrElse loadLibAddr = 0 Then Return False
              WriteProcessMemory(hProcess, allocAddress, dllBytes, dllBytes.Length, 0)
              Dim libThread As Integer = CreateRemoteThread(hProcess, 0, 0, loadLibAddr, allocAddress, 0, 0)
      
              If libThread = 0 Then
                  Return False
              Else
                  WaitForSingleObject(libThread, 5000)
                  CloseHandle(libThread)
              End If
              CloseHandle(hProcess)
              Label3.Text = "DLL Successfully Injected."
              If CheckBox1.Checked = True Then
                  Me.Close()
              End If
      
              Return True
          End Function
      
          Private Sub OpenFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk
              Dim FileName As String = OpenFileDialog1.FileName.Substring(OpenFileDialog1.FileName.LastIndexOf("\"))
              Dim DllFileName As String = FileName.Replace("\", "")
              ListBox1.Items.Add(DllFileName)
              dlls.Add(DllFileName, OpenFileDialog1.FileName)
          End Sub
      
          Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
              OpenFileDialog1.Filter = "DLL (*.dll) |*.dll"
              OpenFileDialog1.ShowDialog()
          End Sub
      
      
          Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
      
              Dim TargetProcess As Process() = Process.GetProcessesByName("ac_client")
      
              Dim ProcID As Integer = Process.GetProcessesByName("ac_client")(0).Id
      
              For Each inj As KeyValuePair(Of String, String) In dlls
                  Inject(ProcID, inj.Value)
              Next
      
          End Sub
      
      End Class


      I already see i need to use this part of code to picking the dll:
      Code:
      dlls.Add(DllFileName, OpenFileDialog1.FileName)
      but now where it is the "DllFileName, OpenFileDialog1.FileName" i want make there not to go pick the dll from the OpenFileDialog , but goin pick it from resources

      I will apresiate if sameone can help me because this is for a important school project

    2. #2
      Respected Hacker
      Learning to hack games!
       
      Coding
       
      till0sch's Avatar
      Join Date
      Oct 2012
      Location
      Germany.
      Posts
      1,168
      Thanks (-->)
      179
      Thanks (<--)
      340
      You mean extract the dll from the program? There was a way, I think it was sth. like .....ReadAllBytes (My.Resources.Dllname)... I will try finding it, I may edit this post when I found sth..

    3. #3
      Kim Kong Trasher
      I don't have status.
       
      Raging
       
      c5's Avatar
      Join Date
      Jul 2012
      Location
      Mankei Iland
      Posts
      1,221
      Thanks (-->)
      97
      Thanks (<--)
      492
      Not a wise thing to do really. But aren't the FreeLibrary and other APIs available for you to use?
      [help]Eject a dll from the project resources

    4. #4
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      virt15_PT's Avatar
      Join Date
      Dec 2012
      Posts
      2
      Thanks (-->)
      0
      Thanks (<--)
      0
      Silent VPN
      Quote Originally Posted by c5 View Post
      Not a wise thing to do really. But aren't the FreeLibrary and other APIs available for you to use?
      No i try do myself the dll inside the project , in that case he will inject it , but for example if i download a dll and if it is encrypted no

    Similar Game Hacker Threads

    1. [VB.NET] Form IN DLL [DLL Project]
      By Devolten in forum Visual Basic
      Replies: 7
      Last Post: 08-27-2016, 09:44 PM
    2. Any good resources for me to use?
      By Hyper in forum CS:GO Hacks
      Replies: 3
      Last Post: 08-08-2015, 08:25 AM
    3. The RRS project
      By d0wen in forum CS:GO Hacks
      Replies: 15
      Last Post: 03-24-2015, 06:20 AM
    4. Aimboss New Project
      By insomniac420 in forum Misc Coding
      Replies: 2
      Last Post: 01-01-2014, 04:18 PM

    Tags for this Thread