Use WMI to find the serial number of the system

I am stuck with finding serial number of the system or maybe I am not… I have used command that gave me serial number (WMIC BIOS GET SERIALNUMBER), and response looked like

VMWare-14 68 12 da 64 34 35 43-r3 32 d6 a3 f2 aa 21 nm (i have modified it from real serial number I got)

and I pasted it to answers and it was not accepted. Whats wrong thing I am doing

I am not 100% because I dont know the lab you are working on (I haven’t done the academy labs).

If I run that on my local machine, the response is:

wmic bios get serialnumber

but if I run it from a VM I get

wmic bios get serialnumber
VMware-56 4d b6 94 3f 9d c2 78-02 64 c0 a1 f1 a0 cc c8

Given that the HTB boxes are virtual machines, that implies the command you are running is returning expected data.

If it isn’t being accepted as an answer:

  • check you have pasted it into the answer box correctly without adding spaces etc
  • check your formatting is correct
  • check you have understood the question and this is the information they are asking for

@TazWake Yeah, that’s what I got but answer is not accepting for some reason…

@hajdarevicedin said:

@TazWake Yeah, that’s what I got but answer is not accepting for some reason…

If you are confident the formatting is correct and you’ve copied it correctly then it leaves two possible outcomes.
1 - this is not the correct answer and the question is asking for something else.
2 - the answer is broken and it’s worth raising a ticket on HTB’s jira for them to fix it.

Where can I raise that ticket, as I am pretty sure I am copying it correctly and I tried all possible combinations (atleast I think so)

At the top of the forum is an announcement with the link:

Problem is, that wmic bios get serialnumber is completely wrong command, the other command should be used.

Hint for those that will face this problem:
Answer is in following format - XXXXX-XXXXX-XXXXX-XXXXX

1 Like

I am also getting the VMWare-42 xx xx xx bunch of numbers if I get it from WMIC in command or get-wmiobject in powershell. Does anyone have any good advice on this?

I checked on Discord and it is a different WMI command, as @hajdarevicedin mentioned.

In CLI: wmic OS get SerialNumber
In PowerShell: Get-WmiObject -Class Win32_OperatingSystem | select SerialNumber

Thanks, I got this worked out yesterday using a different win32 class other than BIOS. I am not sure if that is the same thing that you are referring to as your answer is masked as it is too direct of an answer. Thanks for much for helping though!

Yes, I used the blur spoiler markup for those not interested in the direct answer (though I assumed it could be unmasked if clicked on). Yes, I also used a different class other than BIOS as well. Glad you got it figured out!

1 Like