Categories > Coding > C# >
[Release] Hwid Grabbing/Logger
Posted
This function retrieves the serial number of the motherboard, the primary hard drive, and the network adapter, as well as the CPU ID and the system BIOS version. It then concatenates these values into a single string and hashes it using SHA256 for security. The resulting hashed string can be used as the Hwid value.
using System.Management;
using System.Security.Cryptography;
using System.Text;
public static string GetHwid()
{
string hwid = "";
// Get the motherboard serial number
ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT SerialNumber FROM Win32_BaseBoard");
foreach (ManagementObject obj in searcher.Get())
{
hwid += obj["SerialNumber"].ToString();
break;
}
// Get the primary hard drive serial number
searcher = new ManagementObjectSearcher("SELECT SerialNumber FROM Win32_DiskDrive WHERE Index = 0");
foreach (ManagementObject obj in searcher.Get())
{
hwid += obj["SerialNumber"].ToString();
break;
}
// Get the network adapter MAC address
searcher = new ManagementObjectSearcher("SELECT MACAddress FROM Win32_NetworkAdapter WHERE AdapterType = 'Ethernet 802.3'");
foreach (ManagementObject obj in searcher.Get())
{
hwid += obj["MACAddress"].ToString();
break;
}
// Get the CPU ID
searcher = new ManagementObjectSearcher("SELECT ProcessorId FROM Win32_Processor");
foreach (ManagementObject obj in searcher.Get())
{
hwid += obj["ProcessorId"].ToString();
break;
}
// Get the system BIOS version
searcher = new ManagementObjectSearcher("SELECT Version FROM Win32_BIOS");
foreach (ManagementObject obj in searcher.Get())
{
hwid += obj["Version"].ToString();
break;
}
// Hash the Hwid string for security
using (SHA256 sha256Hash = SHA256.Create())
{
byte[] bytes = sha256Hash.ComputeHash(Encoding.UTF8.GetBytes(hwid));
StringBuilder builder = new StringBuilder();
for (int i = 0; i < bytes.Length; i++)
{
builder.Append(bytes[i].ToString("x2"));
}
hwid = builder.ToString();
}
return hwid;
}
Added
@atariXD, I also got annoyed of people marking realeases of hwid loggers and they only collect the current user name and call that the hwid with no hashing so I wanted to put a correct example out there for people to use
Cancel
Post
nltr | Wpf/C# & Cpp Developer | Former Fluxus Administrator------------------------------------------------------------------------------------💜 Developer of Kronos 💜
Replied
don't use hwid/ip loggers it's probably illegal and if it not it still unethical unless you add multiple texts saying that exploit uses hwid/ip loggers
Cancel
Post
https://media.discordapp.net/attachments/1009614172478259291/1131512749332115526/synapse.gif?width=244&height=242
Replied
Vouch. Cool release.
Cancel
Post
Languages - C++, C#,Javascript, HTML, CSS, Lua ,Xaml, Python
https://dsc.gg/hackerpluto
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post