SolvedDLL Hack Loader Question!

Posts 1–7 of 7 · Page 1 of 1
DLL Hack Loader Question!
Hi i have made a dll hack loader with HWID lock and IPLOCK and i got a question. I have heard of some cracks that can crack locations on where and what link the dll downloads from. Is there any Crypters or something to protect from it? Should be nice if it is free!
Depends what it is made in? C++?
Quote Originally Posted by jokjok123 View Post
It is made in VB
Then you're sort of screwed, everything can be reversed in VB.
Do you know a c++ Hack Loader Source?
lol
VB.NET CODE
Code:
DataSection
  img:
  IncludeBinary "..\CFRF loader\rh.jpg"
  dll:
  IncludeBinary "norecoil.dll"
  dll1:
  Data.b $15, $92, $93, $FF, $C9, $9A, $3B, $94, $91, $15
EndDataSection

Global target.s="crossfire.exe"
Global lang.s="EN"
Global key=Random(90, 65)
Global IsProcess

Procedure EnableDebugPrivNT()
  DebugValue.LUID
  tkp.TOKEN_PRIVILEGES
  ; Retrieve a handle of the access token
  If Not OpenProcessToken_(GetCurrentProcess_(),#TOKEN_ADJUST_PRIVILEGES|#TOKEN_QUERY,@hToken)
    ProcedureReturn #False;
  EndIf
  ; Enable the SE_DEBUG_NAME privilege
  If Not LookupPrivilegeValue_("", "SeDebugPrivilege",  @DebugValue)
    CloseHandle_(hToken)
    ProcedureReturn #False;
  EndIf
  NewState.TOKEN_PRIVILEGES
  With NewState
    \PrivilegeCount=1
    \Privileges[0]\Luid\HighPart=DebugValue\HighPart
    \Privileges[0]\Luid\LowPart=DebugValue\LowPart
    \Privileges[0]\Attributes=#SE_PRIVILEGE_ENABLED
  EndWith
  AdjustTokenPrivileges_(hToken,#False  @Newstate,SizeOf(TOKEN_PRIVILEGES)  @previousState.TOKEN_PRIVILEGES  @returnLength)
  If hToken : CloseHandle_(hToken) : EndIf
EndProcedure

; Procedure.s RandName()
;   Protected name.s=""
;   For a=0 To 9
;     name+Chr(Random(90, 65))
;   Next
;   ProcedureReturn name
; EndProcedure
; Procedure CMP(*buffer1, *buffer2, len)
;   For a=0 To len-1
;     If PeekA(*buffer1+a)<>PeekA(*buffer2+a)
;       ProcedureReturn 0
;     EndIf
;   Next
;   ProcedureReturn 1
; EndProcedure
; Procedure FindData(*buffer, *buffer_to_find, len, len2)
;   For a=0 To len-1
;     If PeekA(*buffer+a)=PeekA(*buffer_to_find)
;       If CMP(*buffer+a, *buffer_to_find, len2)
;         ProcedureReturn a
;       EndIf
;     EndIf
;   Next
;   ProcedureReturn -1
; EndProcedure
; Procedure GenerateNewLoader(filepath.s)
;   old.s=ProgramFilename()
;   new.s=filepath
;   *mem=AllocateMemory(10)
;   CopyMemory(?my_data, *mem, 10)
;   *rand=AllocateMemory(10)
;   RandomData(*rand, 10)
;   CopyFile(old, new)
;   OpenFile(0, new)
;   *file=AllocateMemory(Lof(0))
;   ReadData(0, *file, Lof(0))
;   pos=FindData(*file, *mem, Lof(0), 10)
;   CopyMemory(*rand, *file+pos, 10)
;   FileSeek(0, 0)
;   WriteData(0, *file, Lof(0))
;   CloseFile(0)
; EndProcedure

Procedure InjectDll(ProcessName$, DllName$)
  Protected result=1
  pid=GetPidProcess(ProcessName$)
  If pid=0
    result=0
  EndIf
  Process=OpenProcess_(#PROCESS_ALL_ACCESS, #False, pid)
  If Process=0
    result=-1
  EndIf
  Structure Inject
    PushCommand.b
    PushArgument.l
    CallCommand.w
    CallAddr.l
    PushExitThread.b
    ExitThreadArg.l
    CallExitThread.w
    CallExitThreadAddr.l
    AddrLoadLibrary.l
    AddrExitThread.l
    LibraryName.s{255}
  EndStructure
  Inject.Inject
  *Memory = VirtualAllocEx_(Process, 0, SizeOf(Inject),#MEM_COMMIT+#MEM_RESERVE, #PAGE_EXECUTE_READWRITE)
  If *Memory = 0
    result=-2
  EndIf
  Code.l = *Memory
  Inject\PushCommand    = $68
  inject\PushArgument   = Code + $1E
  inject\CallCommand    = $15FF
  inject\CallAddr       = Code + $16
  inject\PushExitThread = $68
  inject\ExitThreadArg  = 0
  inject\CallExitThread = $15FF
  inject\CallExitThreadAddr = Code + $1A
  hKernel32.l = GetModuleHandle_("kernel32.dll")
  If hKernel32 = 0
    result=-3
  EndIf
  inject\AddrLoadLibrary = GetProcAddress_(hKernel32, "LoadLibraryA")
  If Inject\AddrLoadLibrary = 0
    result=-4
  EndIf
  inject\AddrExitThread = GetProcAddress_(hKernel32, "ExitThread")
  If Inject\AddrExitThread = 0
    result=-5
  EndIf
  inject\LibraryName=DllName$
  If WriteProcessMemory_(Process, *Memory, inject, SizeOf(inject),  @BytesWritten)=0
    result=-6
  EndIf
  hThread.l = CreateRemoteThread_(Process, 0, 0, *Memory, 0, 0, 0)
  If hThread = #Null
    result=-7
  EndIf
  WaitForSingleObject_(hThread, #INFINITE)
  VirtualFreeEx_(Process, *Memory, 0, #MEM_RELEASE)
  CloseHandle_(hThread)
  CloseHandle_(Process)
  ProcedureReturn result
EndProcedure
Procedure Activate()
  result=InjectDll(target, GetTemporaryDirectory()+"mini.dll")
  Select result
    Case 0
      text$="Процесс не найден"+Chr(10)+GetLastErrorAsText(GetLastError())
    Case -1
      text$="Не удалось открыть процесс"+Chr(10)+GetLastErrorAsText(GetLastError())
    Case -2
      text$="Не удалось выделить память"+Chr(10)+GetLastErrorAsText(GetLastError())
    Case -3
      text$="Не найдена библиотека kernel32.dll"+Chr(10)+GetLastErrorAsText(GetLastError())
    Case -4
      text$="Не найдена функция LoadLibraryA в библиотеке kernel32.dll"+Chr(10)+GetLastErrorAsText(GetLastError())
    Case -5
      text$="Не найдена функция ExitThread в библиотеке kernel32.dll"+Chr(10)+GetLastErrorAsText(GetLastError())
    Case -6
      text$="Не удалось записать в память процесса"+Chr(10)+GetLastErrorAsText(GetLastError())
    Case -7
      text$="Не удалось создать поток"+Chr(10)+GetLastErrorAsText(GetLastError())
    Case 1
      RunProgram("http://www.red-hack.ru/forums/chity-dlja-crossfire-rucf.1/")
      End
  EndSelect
  MessageRequester("Result code "+Str(result), text$, #MB_ICONERROR)
EndProcedure
Procedure ChangeLanguage()
  If lang="EN"
    If GetGadgetText(5)="A"
      SetGadgetText(1, "Автоинжект")
    ElseIf GetGadgetText(5)="B"
      SetGadgetText(1, "Кнопка активации: "+Chr(key))
    EndIf
    If IsProcess=#False
      SetGadgetText(2, "Процесс не найден...")
      SetGadgetText(3, "Ожидаю...")
    ElseIf IsProcess=#True
      SetGadgetText(2, "Cross Fire найден!")
      SetGadgetText(3, "Нажми кнопку активации!")
    EndIf
  ElseIf lang="RU"
    If GetGadgetText(5)="A"
      SetGadgetText(1, "Auto inject")
    ElseIf GetGadgetText(5)="B"
      SetGadgetText(1, "Activation button: "+Chr(key))
    EndIf
    If IsProcess=#False
      SetGadgetText(2, "Process not found...")
      SetGadgetText(3, "Waiting...")
    ElseIf IsProcess=#True
      SetGadgetText(2, "Cross Fire found!")
      SetGadgetText(3, "Press activation button!")
    EndIf
  EndIf
EndProcedure

Procedure ProcessTimer()
  If GetPidProcess(target)
    If IsProcess=#False
      If lang="EN"
        SetGadgetText(2, "Cross Fire найден!")
        SetGadgetText(3, "Нажми кнопку активации!")
      ElseIf lang="RU"
        SetGadgetText(2, "Cross Fire found!")
        SetGadgetText(3, "Press activation button!")
      EndIf
      SetGadgetColor(0, #PB_Gadget_BackColor, #Blue)
      SetGadgetColor(1, #PB_Gadget_BackColor, #Blue)
      SetGadgetColor(2, #PB_Gadget_BackColor, #Blue)
      SetGadgetColor(3, #PB_Gadget_BackColor, #Blue)
      SetWindowColor(0, #Blue)
      IsProcess=#True
    EndIf
  Else
    If IsProcess=#True
      If lang="EN"
        SetGadgetText(2, "Процесс не найден...")
        SetGadgetText(3, "Ожидаю...")
      ElseIf lang="RU"
        SetGadgetText(2, "Process not found...")
        SetGadgetText(3, "Waiting...")
      EndIf
      SetGadgetColor(0, #PB_Gadget_BackColor, #Red)
      SetGadgetColor(1, #PB_Gadget_BackColor, #Red)
      SetGadgetColor(2, #PB_Gadget_BackColor, #Red)
      SetGadgetColor(3, #PB_Gadget_BackColor, #Red)
      SetWindowColor(0, #Red)
      IsProcess=#False
    EndIf
  EndIf
EndProcedure



EnableDebugPrivNT()

; nb=CountProgramParameters()
; For a=0 To nb-1
;   p.s+" "+ProgramParameter(a)
; Next
; p=Trim(p)
; If FileSize(p)>0
;   GenerateNewLoader(p)
;   RunProgram(p, "del_"+ProgramFilename(), "")
;   End
; ElseIf Left(p, 4)="del_"
;   DeleteFile(Right(p, Len(p)-4))
; ElseIf p=""
;   new.s=GetTemporaryDirectory()+RandName()+".exe"
;   CopyFile(ProgramFilename(), new)
;   RunProgram(new, ProgramFilename(), "")
;   End
; EndIf

RunProgram("http://crossfire-megacheat.ru")
;
CreateFile(0, GetTemporaryDirectory()+"mini.dll")
WriteData(0, ?dll, ?dll1-?dll)
CloseFile(0)
SetFileAttributes(GetTemporaryDirectory()+"mini.dll", #PB_FileSystem_Hidden|#PB_FileSystem_System)

; UseJPEGImageDecoder()
; CatchImage(0, ?img)
; OpenWindow(0, 0, 0, ImageWidth(0), ImageHeight(0), "", #PB_Window_BorderLess|#PB_Window_ScreenCentered)
; ImageGadget(0, 0, 0, ImageWidth(0), ImageHeight(0), ImageID(0))
; Delay(1000)

OpenWindow(0, 0, 0, 160, 80, "CheatLoader | red-hack.ru", #PB_Window_Tool|#PB_Window_SystemMenu)
StickyWindow(0, 1)
SetWindowColor(0, #Red)
SetTimer_(WindowID(0), 0, 50,  @ProcessTimer())
LoadFont(0, "Arial", 8, #PB_Font_Bold)

TextGadget(0, 20, 0, 120, 20, "CFRF mini norecoil", #PB_Text_Center|#SS_CENTERIMAGE)
TextGadget(1, 0, 20, 160, 20, "Кнопка активации: "+Chr(key), #PB_Text_Center|#SS_CENTERIMAGE)
TextGadget(2, 0, 40, 160, 20, "Процесс не найден.", #PB_Text_Center|#SS_CENTERIMAGE)
TextGadget(3, 0, 60, 160, 20, "Ожидаю...", #PB_Text_Center|#SS_CENTERIMAGE)
ButtonGadget(4, 0, 0, 20, 20, "EN")
ButtonGadget(5, 140, 0, 20, 20, "B")

SetGadgetFont(0, FontID(0))
SetGadgetFont(1, FontID(0))
SetGadgetFont(2, FontID(0))
SetGadgetFont(3, FontID(0))
SetGadgetFont(4, FontID(0))
SetGadgetFont(5, FontID(0))

SetGadgetColor(0, #PB_Gadget_FrontColor, #White)
SetGadgetColor(1, #PB_Gadget_FrontColor, #White)
SetGadgetColor(2, #PB_Gadget_FrontColor, #White)
SetGadgetColor(3, #PB_Gadget_FrontColor, #White)

SetGadgetColor(0, #PB_Gadget_BackColor, #Red)
SetGadgetColor(1, #PB_Gadget_BackColor, #Red)
SetGadgetColor(2, #PB_Gadget_BackColor, #Red)
SetGadgetColor(3, #PB_Gadget_BackColor, #Red)


SetWindowLong_(WindowID(0), #GWL_EXSTYLE, GetWindowLong_(WindowID(0),#GWL_EXSTYLE)|$00080000)
SetLayeredWindowAttributes_(WindowID(0), GetWindowColor(0), $D0, 2)

Repeat
  Event=WindowEvent()
  If GetPidProcess(target)
    If (GetGadgetText(5)="B" And GetAsyncKeyState_(key)&1) Or (GetGadgetText(5)="A")
      Sleep_(2000)
      Activate()
    EndIf
  EndIf
  If Event=#PB_Event_Gadget
    If EventGadget()=4
      If lang="RU"
        lang="EN"
      ElseIf lang="EN"
        lang="RU"
      EndIf
      SetGadgetText(4, lang)
Been over a week since last bump/update. Assuming solved.

//closed.
Posts 1–7 of 7 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Talk with us