[Visual Basic]Multiple Injector

Posts 46–60 of 64 · Page 4 of 5
Hey Blubb I'm nearly done my injector...here's a SS of the GUI atm



Anyways my main query is...

With the inject() sub i was wondering...is it possible to alter this code

Code:
For i = 0 To ListBox1.Items.Count - 1


            If selected.Checked = True Then
                pszLibFileRemote = ListBox1.SelectedItem
            Else
                pszLibFileRemote = ListBox1.Items.Item(i)
            End If


            TargetBufferSize = 1 + Len(pszLibFileRemote)


            LoadLibParamAdr = VirtualAllocEx(TargetProcessHandle, 0, TargetBufferSize, MEM_COMMIT, PAGE_READWRITE)
            Rtn = WriteProcessMemory(TargetProcessHandle, LoadLibParamAdr, pszLibFileRemote, TargetBufferSize, 0)
            CreateRemoteThread(TargetProcessHandle, 0, 0, pfnStartAddr, LoadLibParamAdr, 0, 0)
        Next i
So that instead of having the option of either injecting one selected item or all of the listbox's content...you could make it so it injects all selected items of the listbox and set the listbox's selection mode to "MultiSimple" or "MultiExtended"

I think you'd have to somehow get the selected ones out of the listbox .dat file so they can be converted to string or something I dunno... Seems pretty hard to do personally but there might be an easier way... not sure haha. I'm not a very advanced coder

Still it'd be a 1337 feature for an injector to have rather than just one or all .DLLs being injected.

thoughts?

J-Deezy
Quote Originally Posted by Jason View Post
Hey Blubb I'm nearly done my injector...here's a SS of the GUI atm



Anyways my main query is...

With the inject() sub i was wondering...is it possible to alter this code

Code:
For i = 0 To ListBox1.Items.Count - 1


            If selected.Checked = True Then
                pszLibFileRemote = ListBox1.SelectedItem
            Else
                pszLibFileRemote = ListBox1.Items.Item(i)
            End If


            TargetBufferSize = 1 + Len(pszLibFileRemote)


            LoadLibParamAdr = VirtualAllocEx(TargetProcessHandle, 0, TargetBufferSize, MEM_COMMIT, PAGE_READWRITE)
            Rtn = WriteProcessMemory(TargetProcessHandle, LoadLibParamAdr, pszLibFileRemote, TargetBufferSize, 0)
            CreateRemoteThread(TargetProcessHandle, 0, 0, pfnStartAddr, LoadLibParamAdr, 0, 0)
        Next i
So that instead of having the option of either injecting one selected item or all of the listbox's content...you could make it so it injects all selected items of the listbox and set the listbox's selection mode to "MultiSimple" or "MultiExtended"

I think you'd have to somehow get the selected ones out of the listbox .dat file so they can be converted to string or something I dunno... Seems pretty hard to do personally but there might be an easier way... not sure haha. I'm not a very advanced coder

Still it'd be a 1337 feature for an injector to have rather than just one or all .DLLs being injected.

thoughts?

J-Deezy
This will inject all .dlls in the listbox to one process.

Code:
 Private Sub inject() 
        Dim LoadLibParamAdr As Integer 
        Dim Rtn As Integer 
        Dim TargetProcess As Process() = Process.GetProcessesByName(txtprocess.Text) 

        On Error GoTo 1 ' If error occurs, app will go below to "1:" 

        TargetProcessHandle = OpenProcess(PROCESS_CREATE_THREAD Or PROCESS_VM_OPERATION Or PROCESS_VM_WRITE, False, TargetProcess(0).Id) 

        pfnStartAddr = GetProcAddress(GetModuleHandle("Kernel32"), "LoadLibraryA") 

        'count each listbox item 
        For i = 0 To ListBox1.Items.Count - 1 
           
                pszLibFileRemote = ListBox1.Items.Item(i) 
            

            TargetBufferSize = 1 + Len(pszLibFileRemote) 


            LoadLibParamAdr = VirtualAllocEx(TargetProcessHandle, 0, TargetBufferSize, MEM_COMMIT, PAGE_READWRITE) 
            Rtn = WriteProcessMemory(TargetProcessHandle, LoadLibParamAdr, pszLibFileRemote, TargetBufferSize, 0) 
            CreateRemoteThread(TargetProcessHandle, 0, 0, pfnStartAddr, LoadLibParamAdr, 0, 0) 
        Next i 

        CloseHandle(TargetProcessHandle) 
1:      labelx24.ForeColor = Color.Red 
        labelx24.Text = "Error occured" 'error 
    End Sub
//IDEA

About textbox with - don't include .exe...you do the following(just an idea):

Textbox_TextChanged

Code:
Dim exe as string = ProcessName.Text 'Textbox1.Text or whatever

If exe.contains(".exe") then
ProcessName.Text = exe.replace(".exe", "")
End if
Ahhh that textbox idea is good!

But yeah with the ListBox I don't want it to inject all the .DLLs, only the .DLLs in the ListBox that are actually selected and have the selection option on the listbox as "MultiSimple"

i.e I want only the bottom two hacks injected in the list of 3...



Do you get what I mean?
Better used "Checked" listBoxes, Just a thought
Quote Originally Posted by NextGen1
Better used "Checked" listBoxes, Just a thought
Forgive my choobness but what do you mean?
Quote Originally Posted by Jason View Post
Forgive my choobness but what do you mean?


This is actually even better. xD
Okay so are you saying that you check the boxes of whichever .DLL on the list you'd like to inject? Wouldn't that get annoying if you have a heap of .DLLs?

EDIT: Oh wait...I think I understand -.-

EDIT2: Okay made the checkedlistbox now only having problems with the inject conditions Oh well I gtg now so I'll try get it working tonight. Any help is appreciated.
Quote Originally Posted by Jason View Post
Okay so are you saying that you check the boxes of whichever .DLL on the list you'd like to inject? Wouldn't that get annoying if you have a heap of .DLLs?

EDIT: Oh wait...I think I understand -.-

EDIT2: Okay made the checkedlistbox now only having problems with the inject conditions Oh well I gtg now so I'll try get it working tonight. Any help is appreciated.
Add Object to CheckedListBox

Code:
Dim pItem As CarItem

pItem = New CarItem() 
pItem.CarId = 1
pItem.CarName="CarName"

' Add this object to CheckListBox
' And CheckListBox show CarName because I override toString function
Me.CheckListBox1.Items.Add(pItem, True) 

' Class CarItem

Private Class CarItem

Public CarId As Integer 
Public CarName As String

Public Sub New()

End Sub 

' Override tostring
Public Overrides Function ToString() As String
Return CarName
End Function

End Class

Get status items in CheckedListBox

Code:
For i As Integer = 0 To Me.CheckedListBox.Items.Count - 1
If Me.CheckedListBox.GetItemChecked(i) Then
'TODO Something 
End If 
Next i
Get only Checked Items

Code:
For i As Integer = 0 To Me.CheckedListBox.CheckedItems.Count - 1
'TODO Something
Next
Set all item checked

Code:
For i As Integer = 0 To Me.CheckedListBox.Items.Count-1
Me.CheckedListBo*****tItemChecked(i, true) 
Next i
Credits: VB.Net sample

---------------------------------

You should now be able to do the rest on your own =P
Well at the moment I'm just trying to learn Checkedlistboxes properly before I try use it in the injector. To experiment im trying to move only the checked items in the checkedbox into a listbox using the following code

Code:
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        For i As Integer = 0 To Me.CheckedListBox1.CheckedItems.Count - 1
            ListBox1.Items.Add(CheckedListBox1.CheckedItems)

        Next

    End Sub
Only problem is, it just writes "(Collection)" in the listbox. It's probably blindingly obvious what I'm doing wrong here but I dunno.
Why would you want to do that anyways?!
Well I don't know? How would I use it in the injector then, doesn't it read string entries? I dunno, I'm tired and I feel really slow and stupid right now, eugh. I'll see what I can do later. Shame there are no unpatched CA hacks to test this with right now ;(.

EDIT: I wanna release it so bad haha. Been working on it for a while now. Just need some working CA hacks to test the injection capabilities. Typical that all hacks get patched the day after I decide to make an injector
Looks good, yeah when working with Listbox injection, I see the "Checked" listbox as a good idea, thanks for adding it and thanks for supplying the code for it
yeah now i've added it I like it much more. Keeps it looking cleaner too.

I just need 1 or 2 pub hacks to come out ffs so I can test whether the injector actually works lol. There's nothing more I really wanna change or tweak on it.

I even added an "ExeKiller" timer. So for the choobs that still insist on putting in .exe at the end of their processes, it automatically removes it. (Blubb credits for the idea) The GUI is looking pretty sexy too I think.

I think the only thing left of the original source is the actual inject() sub, although it has been modified a bit and Blubb's save listbox function is still there as well .

I think there may be a SLIGHT problem with the Auto Inject but I think i just thought of the perfect solution while i was typing this up haha.

Bed time now, hopefully I will log back in tomorrow morning and the CA section will be full of hacks!

J-Deezy
Selfwritten it a minute ago =D

Check if all items exist:



Code:
Dim s As String = 0
        Dim c As Integer = ""
        For Each item As String In ListBox1.Items
            If Not System.IO.File.Exists(item) Then

                s += vbNewLine & item
                c += 1

            End If

        Next


        If c > 0 Then
            MsgBox("The following .dll's couldn't be found:" & vbNewLine & s)
        Else
            MsgBox("All .dll's exist.")
        End If
Blubb is there something wrong with this code?

(ListBox1 is actually CheckedListBox1 by the way)

Code:
    Private Sub inject()
        Dim LoadLibParamAdr As Integer
        Dim Rtn As Integer
        Dim TargetProcess As Process() = Process.GetProcessesByName(txtprocess.Text)

        On Error GoTo 1 ' If error occurs, app will go below to "1:"

        TargetProcessHandle = OpenProcess(PROCESS_CREATE_THREAD Or PROCESS_VM_OPERATION Or PROCESS_VM_WRITE, False, TargetProcess(0).Id)

        pfnStartAddr = GetProcAddress(GetModuleHandle("Kernel32"), "LoadLibraryA")

        'count each listbox item
        For i = 0 To Me.ListBox1.Items.Count - 1

            pszLibFileRemote = ListBox1.CheckedItems(i)

            TargetBufferSize = 1 + Len(pszLibFileRemote)


            LoadLibParamAdr = VirtualAllocEx(TargetProcessHandle, 0, TargetBufferSize, MEM_COMMIT, PAGE_READWRITE)
            Rtn = WriteProcessMemory(TargetProcessHandle, LoadLibParamAdr, pszLibFileRemote, TargetBufferSize, 0)
            CreateRemoteThread(TargetProcessHandle, 0, 0, pfnStartAddr, LoadLibParamAdr, 0, 0)
            labelx24.Text = ".DLL injection successful!"
            labelx24.ForeColor = Color.Green
        Next i

        CloseHandle(TargetProcessHandle)
1:      labelx24.ForeColor = Color.Red
        labelx24.Text = "An error occured" 'error
        CheckBox1.Checked = False
        If closebox.Checked = True Then
            Me.Close()
        End If

    End Sub
There probably is. What I want it to do is to inject all ticked boxes -.-

HALP!? haha

J-Deezy
Posts 46–60 of 64 · Page 4 of 5

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us