Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

[TUT] How To Get Windows OS Key (VBNet)

Since the link is dead for the other tutorial, here is another way to get the Windows OS key. This will not get the Office key though.

This is based on WMI (Windows Management Instrumentation). It queries the key from the WMI which is included in all Windows OS's (At least most) and is not encrypted. So you'll have the key all ready to be stolen.

Imports:
Code
Imports System.Management

Query Code:
Code
Dim searcher As New ManagementObjectSearcher("root\CIMV2", "SELECT * FROM Win32_OperatingSystem")
                    Dim i As Integer = 0
                    For Each queryObj As ManagementObject In searcher.Get()
                        i += 1
                        ListBox1.Items.Add(queryObj("SerialNumber"))
                        'Replace ListBox1 with wherever you want it.
                        If i = 1 Then Exit For
                    Next

When it queries the key it'll freeze for a couple seconds.

I'm not going to include how to actually steal the key because I don't really have a great way of doing it. My way involves streamwriting the key to a text file and uploading it to one of my webservers which is probably a fairly crappy way.
What can you do with it..?
(May 7, 2010 03:09 AM)xSilent Wrote:  Or just use

Code
Dim TheKey as String
TheKey = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ProductId", Nothing)

Yeah, that's a quicker way but what if someone were to deny reading of the key? Not many, if anyone would actually do this though, lol. The WMI method can't be blocked.
Thanks for this. Useful.
error in windows 8 64 bit :L


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Shell] by Emre_Jan 12, 2021 11:16 PM 0 141 Jan 12, 2021 11:16 PM
Last Post: Emre_
[.NET] by OffCodeSep 13, 2018 03:32 PM 6 329 Sep 13, 2018 03:32 PM
Last Post: ppaida
[.NET] by invocker49Oct 21, 2016 12:38 PM 2 250 Oct 21, 2016 12:38 PM
Last Post: invocker49