Elite Caos
Olá! Gostaria de conhecer as novidades do nosso fórum? Registre-se agora e tenha acesso aos melhores Cheats e Hacks da Web!

Para visualizar os melhores tutoriais e dicas dos nossos jogos, basta adquirir a nossa assinatura V.I.P.


Participe do fórum, é rápido e fácil

Elite Caos
Olá! Gostaria de conhecer as novidades do nosso fórum? Registre-se agora e tenha acesso aos melhores Cheats e Hacks da Web!

Para visualizar os melhores tutoriais e dicas dos nossos jogos, basta adquirir a nossa assinatura V.I.P.
Elite Caos
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Criando Injectors Utilizando Visual Basic 6

4 participantes

Ir para baixo

Criando Injectors Utilizando Visual Basic 6 Empty Criando Injectors Utilizando Visual Basic 6

Mensagem por PauDeMijo Qua 19 Out 2011 - 11:14

Bem Galera, achei um modo de criação de Injectors na NeT, e achei de extrema importância divulgar para vcs entreterem neste meio e se alguns se interessarem, começarem a criar seu próprio injector.

Espero acima de tudo ajudar sempre!

É necessário ter:
3 CommandButton
4 Label
1 Timer
2 TextBox
1 Microsoft Common Dialog Control 6.0
3 Module
2 Option

Para iniciar:

No Form Load digite o código a seguir :
Option1(0).Value = True
Text2.Text = Load("HProcess", "Box2")
If Text2.Text = Check Then Text2.Text = ""
Text1.Text = Load("DllPath", "Box1")
If Text1.Text = Check Then Text1.Text = ""



Após realizar esta primeira etapa, proceda.

2° Insira os CommandButton(Butões de comando) e nomeie-os desta forma:

Command1 = cmdInjetar
Command2 = cmdprocurar
Command3 = cmdprocurar2



Feito isso, insira o seguinte código no "cmdInjetar"

If ExeName = 1 Then
ProsH = GetHProcExe(Text2.Text)
If ProsH = 0 Then Label1.Caption = "Cant find process!": Exit Sub
DllPath = Text1.Text
InjectDll DllPath, ProsH
Else
ProsH = FindProc(Text2.Text)
If ProsH = 0 Then Label1.Caption = "Cant find process!": Exit Sub
DllPath = Text1.Text
InjectDll DllPath, ProsH
End If



Feito isso tambem, insira o seguinte código no "cmdprocurar"

CommonDialog1.Filter = "Application|*.EXE"
CommonDialog1.ShowOpen
Text2.Text = CommonDialog1.FileTitle
Text2.SetFocus



Feito isso, insira os seguintes códigos no "cmdprocurar2"

CommonDialog1.Filter = "Library|*.DLL"
CommonDialog1.ShowOpen
Text1.Text = CommonDialog1.FileName
Text1.SetFocus



Feito isso, insira o elemento(componente) Microsoft Common Dialog Control 6.0 utilizando CTRL+T, e Declare o Segunte Código :

Private Utilize Function GetAsyncKeyState Lib "USER32" (ByVal vKey As Long) As Integer
Dim Content As String
Dim DllPath As String



Depois de ter realizado este processo, adicione um timer e ponha o(s) seguinte(s) código(s):

keyresult = GetAsyncKeyState(96)
If keyresult = -32767 Then
If ExeName = 1 Then
ProsH = GetHProcExe(Text2.Text)
If ProsH = 0 Then Label1.Caption = "Cant find process!": Exit Sub
DllPath = Text1.Text
InjectDll DllPath, ProsH
Else
ProsH = FindProc(Text2.Text)
If ProsH = 0 Then Label1.Caption = "Cant find process!": Exit Sub
DllPath = Text1.Text
InjectDll DllPath, ProsH
End If
End If



Depois de ter feito isso, insira as "Label" e dê o nome no Caption de "Processo.EXE" e "DLL Patch"

Insira os 2 "Option" e para o "Option0" troque o Nome do Caption para "Nome EXE" e ponha o(s) seguinte(s) código(s):

Private Sub Option0_Click(Index As Integer)
Select Case Index
Case 0
Label4.Caption = "Process EXE name:"
Command3.Enabled = True
ExeName = 1
Case 1
Label4.Caption = "Process Window Name:"
Command3.Enabled = False
ExeName = 2
End Select
End Sub



Na opção "Option1" de o nome do Caption para "Nome da Janela" e insira o(s) código(s) abaixo:

Private Sub Option1_Click(Index As Integer)
Select Case Index
Case 0
Label4.Caption = "Process EXE name:"
Command3.Enabled = True
ExeName = 1
Case 1
Label4.Caption = "Process Window Name:"
Command3.Enabled = False
ExeName = 2
End Select
End Sub



Apresente Novamente esse(s) Código(s) em Sua "Form"

Private Sub Form_Unload(Cancel As Integer)
Call Save("HProcess", "Box2", Text2.Text)
Call Save("DllPath", "Box1", Text1.Text)
End Sub



Feito este processo, insira mais 2 Label e de o Nome do Caption para : "Status da Injeção" e "Esperando..."

Após feito isso, insira 3 Modules e de novos nomes(renomeias) da seguinte forma:

Module1 = DllInjector
Module2 = modGetHProcExe
Module3 = SaveSets



Após feito isso, insira o(s) seguinte(s) Código(s) no Module "DllInjector"

'VB DLL injector
'By RodrigoEviL

'All the shit it takes to make VB to inject dlls...
Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, ByVal lpProcName As String) As Long
Private Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As Long
Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
Private Declare Function VirtualAllocEx Lib "kernel32" (ByVal hProcess As Long, lpAddress As Any, ByVal dwSize As Long, ByVal fAllocType As Long, FlProtect As Long) As Long
Public Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function CreateRemoteThread Lib "kernel32" (ByVal ProcessHandle As Long, lpThreadAttributes As Long, ByVal dwStackSize As Long, ByVal lpStartAddress As Any, ByVal lpParameter As Any, ByVal dwCreationFlags As Long, lpThreadID As Long) As Long
Public ProsH As Long

'The Injection Function
Public Function InjectDll(DllPath As String, ProsH As Long)
Dim DLLVirtLoc As Long, DllLength, Inject As Long, LibAddress As Long
Dim CreateThread As Long, ThreadID As Long

'STEP 1 - The easy part...Putting the bitch in the process' memory
Form1.Label1.Caption = "Injecting......"
'Find a nice spot for your DLL to chill using VirtualAllocEx
DllLength = Len(DllPath)
DLLVirtLoc = VirtualAllocEx(ProsH, ByVal 0, DllLength, &H1000, ByVal &H4)
If DLLVirtLoc = 0 Then Form1.Label1.Caption = "VirtualAllocEx API failed!": Exit Function
'Inject the Dll into that spot
Inject = WriteProcessMemory(ProsH, DLLVirtLoc, ByVal DllPath, DllLength, vbNull)
If Inject = 0 Then Form1.Label1.Caption = "Failed to Write DLL to Process!"
Form1.Label1.Caption = "Dll Injected...Creating Thread....."


'STEP 2 - Loading it in the process
'This is where it gets a little interesting....
'Just throwing our Dll into the process isnt going to do shit unless you
'Load it into the precess address using LoadLibrary. The LoadLibrary function
'maps the specified executable module into the address space of the
'calling process. You call LoadLibrary by using CreateRemoteThread to
'create a thread(no shit) that runs in the address space of another process.
'First we find the LoadLibrary API function and store it
LibAddress = GetProcAddress(GetModuleHandle("kernel32.dll"), "LoadLibraryA")
If LibAddress = 0 Then Form1.Label1.Caption = "Can't find LoadLibrary API from kernel32.dll": Exit Function
'Next, the part the took me damn near 2 hours to figure out - using CreateRemoteThread
'We set a pointer to LoadLibrary(LibAddress) in our process, LoadLibrary then puts
'our Dll(DLLVirtLoc) into the process address. Easy enough right?
CreateThread = CreateRemoteThread(ProsH, vbNull, 0, LibAddress, DLLVirtLoc, 0, ThreadID)
If CreateThread = 0 Then Form1.Label1.Caption = "Failed to Create Thead!"
Form1.Label1.Caption = "Dll Injection Successful!"
End Function



No Module2 "modGetHProcExe" insira o Código:

'I DID NOT CREATE THIS MODULE! Im in love with who ever did though
Public Const PROCESS_ALL_ACCESS As Long = &H1F0FFF

Option Explicit
Public Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Public Declare Function FindWindow Lib "USER32" Alias "FindWindowA" (ByVal Classname As String, ByVal WindowName As String) As Long
Public Declare Function GetWindowThreadProcessId Lib "USER32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
Private Declare Function CreateToolhelpSnapshot Lib "kernel32" Alias "CreateToolhelp32Snapshot" (ByVal lFlags As Long, ByVal lProcessID As Long) As Long
Private Declare Function Process32First Lib "kernel32" (ByVal hSnapShot As Long, uProcess As PROCESSENTRY32) As Long
Private Declare Function Process32Next Lib "kernel32" (ByVal hSnapShot As Long, uProcess As PROCESSENTRY32) As Long
Private Declare Sub CloseHandle Lib "kernel32" (ByVal hPass As Long)


Private Type PROCESSENTRY32
dwSize As Long
cntUsage As Long
th32ProcessID As Long
th32DefaultHeapID As Long
th32ModuleID As Long
cntThreads As Long
th32ParentProcessID As Long
pcPriClassBase As Long
dwFlags As Long
szExeFile As String * 260
End Type

Public Function GetHProcExe(strExeName As String) As Long
Dim hSnap As Long
'Create a snapshot of all of the processes, and information
'about them (saving the handle so we can iterate through the
'processes)
hSnap = CreateToolhelpSnapshot(2, 0)

Dim peProcess As PROCESSENTRY32
peProcess.dwSize = LenB(peProcess)

Dim nProcess As Long
nProcess = Process32First(hSnap, peProcess)

'Loop through the processes until we find the one we want
'and return its process handle
Do While nProcess
If StrComp(Trim$(peProcess.szExeFile), strExeName, vbTextCompare) _
= 0 Then
GetHProcExe = OpenProcess(PROCESS_ALL_ACCESS, False, peProcess.th32ProcessID)
Exit Function
End If
peProcess.szExeFile = vbNullString
nProcess = Process32Next(hSnap, peProcess)
Loop
CloseHandle hSnap
End Function
Public Function FindProc(ProcName As String) As Long
Dim hwnd As Long
Dim ProcessID As Long
Dim ProcessHandle As Long
hwnd = FindWindow(vbNullString, ProcName)
GetWindowThreadProcessId hwnd, ProcessID
ProcessHandle = OpenProcess(PROCESS_ALL_ACCESS, False, ProcessID)
FindProc = ProcessHandle
End Function



No Module3 "SaveSets" insira:

Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationname As String, ByVal lpKeyName As Any, ByVal lsString As Any, ByVal lplFilename As String) As Long
Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationname As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
Public Check As String

Public Function Load(Section As String, Key As String) As String
Dim lngResult As Long
Dim strFileName
Dim strResult As String * 300
strFileName = App.Path & "\sets.ini"
lngResult = GetPrivateProfileString(Section, Key, strFileName, strResult, Len(strResult), strFileName)
Check = App.Path & "\sets.ini"
Load = Trim(strResult)
End Function

Public Function Save(Section As String, Key As String, Content As String)
Dim lngResult As Long
Dim strFileName
strFileName = App.Path & "\sets.ini"
lngResult = WritePrivateProfileString(Section, Key, Content, strFileName)
End Function



Bem gente eu sei que é demorado, complicado e que toma muito tempo, mas dei uma Mini Editada pra ver se facilitava a vida de quem quer aprender.





Espero acima de tudo ter ajudado muitas pessoas, pois a elite caos é isso! Uma equipe que se renova e presta solidariedade a seus players!

Abç a todos!
PauDeMijo
PauDeMijo
Administrador
Administrador

Cheia
Mensagens Mensagens : 1609
Agradeçimento Agradeçimento : 227
Nascimento Nascimento : 20/11/1992
Inscriçao Inscriçao : 03/05/2011
Idade Idade : 31
Localização Localização : Rio De Janeiro

Metin2
Game:
Criando Injectors Utilizando Visual Basic 6 Left_bar_bleue5000/5000Criando Injectors Utilizando Visual Basic 6 Empty_bar_bleue  (5000/5000)

Ir para o topo Ir para baixo

Criando Injectors Utilizando Visual Basic 6 Empty Re: Criando Injectors Utilizando Visual Basic 6

Mensagem por gabriel0797 Qua 19 Out 2011 - 12:05

Acho que eu fiquei com preguiça de ler ! rs [b]
gabriel0797
gabriel0797
™Level 1™
™Level 1™

Cheia
Mensagens Mensagens : 5
Agradeçimento Agradeçimento : 0
Inscriçao Inscriçao : 28/06/2011

Ir para o topo Ir para baixo

Criando Injectors Utilizando Visual Basic 6 Empty Re: Criando Injectors Utilizando Visual Basic 6

Mensagem por PauDeMijo Qua 19 Out 2011 - 12:08

Rs, eu disse que era demorado, mas qndo estiver com paciência, leia e releia...
Da pra aprender man... Lembrando que é bem mais fácil para quem sacas de Programação!
PauDeMijo
PauDeMijo
Administrador
Administrador

Cheia
Mensagens Mensagens : 1609
Agradeçimento Agradeçimento : 227
Nascimento Nascimento : 20/11/1992
Inscriçao Inscriçao : 03/05/2011
Idade Idade : 31
Localização Localização : Rio De Janeiro

Metin2
Game:
Criando Injectors Utilizando Visual Basic 6 Left_bar_bleue5000/5000Criando Injectors Utilizando Visual Basic 6 Empty_bar_bleue  (5000/5000)

Ir para o topo Ir para baixo

Criando Injectors Utilizando Visual Basic 6 Empty Re: Criando Injectors Utilizando Visual Basic 6

Mensagem por tk03 Qua 19 Out 2011 - 12:47

#Hum.... : )
tk03
tk03
Moderador
Moderador

Cheia
Mensagens Mensagens : 555
Agradeçimento Agradeçimento : 145
Nascimento Nascimento : 14/12/1995
Inscriçao Inscriçao : 23/05/2011
Idade Idade : 28

Metin2
Game:
Criando Injectors Utilizando Visual Basic 6 Left_bar_bleue0/0Criando Injectors Utilizando Visual Basic 6 Empty_bar_bleue  (0/0)

http://www.diehlwebdesigner.com.br/intro.swf

Ir para o topo Ir para baixo

Criando Injectors Utilizando Visual Basic 6 Empty Re: Criando Injectors Utilizando Visual Basic 6

Mensagem por rambopeste Qua 19 Out 2011 - 13:11

##MOVIDO##

Point Blank - Dicas / Tutoriais
Área destinada à dicas, tutoriais e informações técnicas em relação a problemas e erros em geral, bugs, além de manuais e guias completos da utilização de hacks, cheats e utilitários
FICOU MUITO MAL EXPLICADO ,E COMPLICADO DE LER ^^...
MAS VLW PELA INICIATIVA
rambopeste
rambopeste
Membro Premium
Membro Premium

Cheia
Mensagens Mensagens : 457
Agradeçimento Agradeçimento : 143
Nascimento Nascimento : 16/05/1994
Inscriçao Inscriçao : 14/05/2011
Idade Idade : 30
Localização Localização : Minas Gerais

Ir para o topo Ir para baixo

Criando Injectors Utilizando Visual Basic 6 Empty Re: Criando Injectors Utilizando Visual Basic 6

Mensagem por PauDeMijo Qua 19 Out 2011 - 13:13

Ok Rambo, vindo de vc é até um elogio! Show, no próximo post serei mais direto! Thanks
PauDeMijo
PauDeMijo
Administrador
Administrador

Cheia
Mensagens Mensagens : 1609
Agradeçimento Agradeçimento : 227
Nascimento Nascimento : 20/11/1992
Inscriçao Inscriçao : 03/05/2011
Idade Idade : 31
Localização Localização : Rio De Janeiro

Metin2
Game:
Criando Injectors Utilizando Visual Basic 6 Left_bar_bleue5000/5000Criando Injectors Utilizando Visual Basic 6 Empty_bar_bleue  (5000/5000)

Ir para o topo Ir para baixo

Criando Injectors Utilizando Visual Basic 6 Empty Re: Criando Injectors Utilizando Visual Basic 6

Mensagem por Conteúdo patrocinado


Conteúdo patrocinado


Ir para o topo Ir para baixo

Ir para o topo

- Tópicos semelhantes

 
Permissões neste sub-fórum
Não podes responder a tópicos