UnKn0wnBooof Posted November 20, 2013 Share Posted November 20, 2013 Hi, I'm working on the payload "ULTIMATE DATA THEIF!" and the program I developed "Wind.bat" doesn't work on all versions of Windows (I get a VB reg read error) so I've decided to write the program in Visual Basic. However, I cant get the program to print out the Windows product key - It just shows the start dialogue and exits. Current work: Imports System Imports System.IO Imports Microsoft.Win32 Module Main Sub Main() Console.Title = "Lavanoid-Project Wind" Console.WriteLine("-----------------------------------------------") Console.WriteLine("LAVANOID-PROJECT -- WIND RECOVERY VERSION: 1.6") Console.WriteLine("-----------------------------------------------") Console.WriteLine("Windows Product Key Recovery Tool") Console.WriteLine() Console.WriteLine("Press any key to exit.") End Sub Public Function sGetXPKey() As String Dim RegKey As RegistryKey = _ Registry.LocalMachine.OpenSubKey("Software\Microsoft\Windows NT\CurrentVersion", False) Dim bytDPID() As Byte = RegKey.GetValue("DigitalProductID") Dim bytKey(14) As Byte '0-14 = 15 bytes Array.Copy(bytDPID, 52, bytKey, 0, 15) Dim strChar As String = "BCDFGHJKMPQRTVWXY2346789" Dim strKey As String = "" For j As Integer = 0 To 24 Dim nCur As Short = 0 For i As Integer = 14 To 0 Step -1 nCur = CShort(nCur * 256 Xor bytKey(i)) bytKey(i) = CByte(Int(nCur / 24)) nCur = CShort(nCur Mod 24) Next strKey = strChar.Substring(nCur, 1) & strKey Next For i As Integer = 4 To 1 Step -1 strKey = strKey.Insert(i * 5, "-") Next Return strKey Console.WriteLine(strKey) Console.ReadKey() End Function End Module Thanks. Wind.zip Quote Link to comment Share on other sites More sharing options...
GuardMoony Posted November 20, 2013 Share Posted November 20, 2013 Euhm just a quick glance. ( not a VB writer ) but you don't call any functions from you main function. Quote Link to comment Share on other sites More sharing options...
Solution UnKn0wnBooof Posted November 20, 2013 Author Solution Share Posted November 20, 2013 Euhm just a quick glance. ( not a VB writer ) but you don't call any functions from you main function. Aaaahh. I've fixed it now. I forgot to call the functions (like you said). I fixed it now. I'm new to the language but I seem to be learning fast. New code: Imports System Imports System.IO Imports Microsoft.Win32 Module Main Sub Main() Console.Title = "Lavanoid-Project Wind" Console.WriteLine("-----------------------------------------------") Console.WriteLine("LAVANOID-PROJECT -- WIND RECOVERY VERSION: 1.6") Console.WriteLine("-----------------------------------------------") Console.WriteLine("Windows Product Key Recovery Tool") Console.WriteLine() Console.WriteLine(GetKeyData) Console.WriteLine("Press any key to exit.") Console.ReadKey() End Sub Public Function GetKeyData() As String Dim RegKey As RegistryKey = _ Registry.LocalMachine.OpenSubKey("Software\Microsoft\Windows NT\CurrentVersion", False) Dim bytDPID() As Byte = RegKey.GetValue("DigitalProductID") Dim bytKey(14) As Byte '0-14 = 15 bytes Array.Copy(bytDPID, 52, bytKey, 0, 15) Dim strChar As String = "BCDFGHJKMPQRTVWXY2346789" Dim strKey As String = "" For j As Integer = 0 To 24 Dim nCur As Short = 0 For i As Integer = 14 To 0 Step -1 nCur = CShort(nCur * 256 Xor bytKey(i)) bytKey(i) = CByte(Int(nCur / 24)) nCur = CShort(nCur Mod 24) Next strKey = strChar.Substring(nCur, 1) & strKey Next For i As Integer = 4 To 1 Step -1 strKey = strKey.Insert(i * 5, "-") Next Return strKey End Function End Module Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.