I've made an ingame hack in VB.NET. However it only works with a bypass. HShield has a weakness, it doesnt detects .dll injections whe loading.
Does anyone know how to make an injectable dll ?
im not sure if i talk **** now, if it is so pls correct me, but .net dlls are no "normal" windows dlls. .Net only can be used with other .Net applications, and if the game you wanna inject it to isn't written in a .Net language i guess its pretty impossible to create a injectable dll in VB.Net.
im not sure if i talk **** now, if it is so pls correct me, but .net dlls are no "normal" windows dlls. .Net only can be used with other .Net applications, and if the game you wanna inject it to isn't written in a .Net language i guess its pretty impossible to create a injectable dll in VB.Net.
Not exactly.
.NET Dll's are only working on a system which has the NET Framework in the version of your .DLL, it is easy to inject .NET Dlls in other WIN32 (or others) processes.
.NET Dll's are only working on a system which has the NET Framework in the version of your .DLL, it is easy to inject .NET Dlls in other WIN32 (or others) processes.
Found this on the net, modified here and there obvious stuff. DID NOT TESTED IT, also it looks like a vb6 to vb.net conversion but it's not that good TBH.
Code:
Imports System.Runtime.InteropServices
Imports System.Text
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
Public Function injectDLL(ByVal pid As Long, ByVal dllPath As String) As Boolean
Try
Dim procHandle As Integer, memCave As Integer, refVal As UInteger, dllBytes() As Byte, startAddress As Integer, remoteThread As Integer, dllHandle As Integer
procHandle = OpenProcess(&H1F0FFF, 1, pid)
memCave = VirtualAllocEx(procHandle, 0, dllPath.Length, &H1000, &H4)
If memCave <> 0 Then
dllBytes = StrChar(dllPath)
WriteProcessMemory(procHandle, memCave, dllBytes, dllPath.Length, refVal)
dllHandle = GetModuleHandle("kernel32.dll")
startAddress = GetProcAddress(dllHandle, "LoadLibraryA")
remoteThread = CreateRemoteThread(procHandle, 0, 0, startAddress, memCave, 0, 0)
If remoteThread <> 0 Then
WaitForSingleObject(remoteThread, &HFFFF)
CloseHandle(remoteThread)
Return True
Else
Return False
End If
Else
Return False
End If
Return True
Catch ex as Exception
MsgBox("A wild exception has occured!" & vbCrlf & ex.ToString())
End Try
End Function
Private Function StrChar(ByRef str As String) As Byte()
Dim bytTemp() As Byte, i As Short
ReDim bytTemp(0)
For i = 0 To Len(str) - 1
If bytTemp(UBound(bytTemp)) <> 0 Then ReDim Preserve bytTemp(UBound(bytTemp) + 1)
bytTemp(UBound(bytTemp)) = Asc(str.Substring(i, 1))
Next
ReDim Preserve bytTemp(UBound(bytTemp) + 1)
bytTemp(UBound(bytTemp)) = 0
Return bytTemp
End Function
You need to allocate Memory and write Code to load the .NET VM directly or use a native dll as bootstrap, inject it with any of the normal Injection ways and let it load the .NET VM.
EDIT:
Aside of everything i dont think loading a fullblown .NET VM with known CRC's is a good think when you want to circumvent an anticheat system. You can do it ofcourse, but it will need more work then using a nativ language.
Hey, here is the CLR bootstrapper I wrote a while ago. It supports loading & unloading of loaded assemblies. To use it, you'd inject the clrhost once and then call it's exports. Never unload the clrhost.dll from the target process, that would cause undefined behaviour and would probably cause a crash on reattach.
So if you want to load a new .NET assembly into the target process:
- Check if clrhost.dll is already present in the process, if not: inject it
- Call the Load export along with a pointer to a ClrLoadInfo struct (allocate that in the remote process with VirtualAllocEx)
- To unload just do the same thing as above but pass a ClrUnloadInfo struct
- To check if a .NET assembly is already present, use the IsLoded export with a ClrAssemblyIdentifier struct.
It creates a new AppDomain for every assembly so you won't run into problems. That way you can also unload assemblies (would be impossible if you load them into the default AppDomain).
You need to allocate Memory and write Code to load the .NET VM directly or use a native dll as bootstrap, inject it with any of the normal Injection ways and let it load the .NET VM.
EDIT:
Aside of everything i dont think loading a fullblown .NET VM with known CRC's is a good think when you want to circumvent an anticheat system. You can do it ofcourse, but it will need more work then using a nativ language.
nope, it is correct. Allocates memory the size of DLL's path length, writes bytes of it to the allocated mem, and creates a remote thread hence executing the DLL inside the process... rest is up to the DLL itself. It does work and it will work, though mostly every AntiCheat out there will catch it.
Dll Injection GUI 07/03/2011 - General Coding - 1 Replies Does anyone know the basis of where I would learn to create an overlay ui in the existing game window through dll injection?
Sql injection 01/19/2010 - Kal Online - 34 Replies Eine frage woher bekomme ich den Sql Injection + tut würde mich freuen wenn einer mir weiter hilft danke
[TIP] SQL Injection 02/11/2009 - RFO Hacks, Bots, Cheats, Exploits & Guides - 6 Replies This is for someone here that knows the basic use of SQL Injection...
You can edit the website's database and make tweaks on that particular page... i hope you get what I mean ^_^
This is very favorable to private servers. Already done it and hell it rocked the RF World!
Peace out and I know you guys can do what i meant.. ^_^
SQL Injection 03/13/2008 - 9Dragons - 5 Replies Plz can any1 post download link for this tool I was searching it some time now -.- :confused: