Opening conhost.exe without Terminal installed leads to an administrator command prompt without asking user for administrator authentication #803

Closed
opened 2026-01-30 22:04:40 +00:00 by claunia · 7 comments
Owner

Originally created by @connormcdermid on GitHub (May 8, 2019).

Noob question: I seem to be able to get an administrator command prompt without confirming that I am, in fact, a system administrator (I am not).

I am running Windows 10.0.17134.706

I open conhost.exe from the Run dialog (Win + R) or from the start menu

An administrator command prompt opens without prompting me for an administrator password (my account is not an administrator account) (cmd line prompt is C:\WINDOWS\system32>
I tested this by running a command that would require administrator privileges to execute:
net user xxxx /active:yes and received output The command completed successfully.

This seems like a rather large security flaw; while I don't think this is a widespread issue (might be a bug with my version), I'd like to know if I can fix this.

Originally created by @connormcdermid on GitHub (May 8, 2019). Noob question: I seem to be able to get an administrator command prompt without confirming that I am, in fact, a system administrator (I am not). I am running Windows 10.0.17134.706 I open `conhost.exe` from the Run dialog (Win + R) or from the start menu An administrator command prompt opens without prompting me for an administrator password (my account is *not* an administrator account) (cmd line prompt is `C:\WINDOWS\system32>` I tested this by running a command that would require administrator privileges to execute: `net user xxxx /active:yes` and received output `The command completed successfully`. This seems like a rather large security flaw; while I don't think this is a widespread issue (might be a bug with my version), I'd like to know if I can fix this.
claunia added the Issue-QuestionResolution-Answered labels 2026-01-30 22:04:41 +00:00
Author
Owner

@honglibin commented on GitHub (May 8, 2019):

I have the same issue

@honglibin commented on GitHub (May 8, 2019): I have the same issue
Author
Owner

@fghzxm commented on GitHub (May 8, 2019):

I think in Windows you don't have to be Administrator literally in order to carry out administrative activities, as long as your personal account is marked as "administrator". When you launch programs like taskmgr.exe and mmc.exe, you are still on your personal account, but your administrative privileges get somehow "activated" (though I'm not entirely clear with the Windows security model).

@fghzxm commented on GitHub (May 8, 2019): I think in Windows you don't have to be `Administrator` literally in order to carry out administrative activities, as long as your personal account is marked as "administrator". When you launch programs like `taskmgr.exe` and `mmc.exe`, you are still on your personal account, but your administrative privileges get somehow "activated" (though I'm not entirely clear with the Windows security model).
Author
Owner

@parkovski commented on GitHub (May 8, 2019):

I'm on the same version Windows version, and I do not get an admin prompt doing this - tbh I'm not sure of the privilege checks on that net user command, but can you try this command?

whoami /groups | findstr /b Mandatory

If you see "High Mandatory Level", this means you have active admin permissions. If it says Medium (or lower), you don't.

Just FYI, the startup directory being system32 doesn't have anything to do with whether you have admin permissions or not, but the command I listed above should tell you for sure.

@parkovski commented on GitHub (May 8, 2019): I'm on the same version Windows version, and I do not get an admin prompt doing this - tbh I'm not sure of the privilege checks on that `net user` command, but can you try this command? ``` whoami /groups | findstr /b Mandatory ``` If you see "High Mandatory Level", this means you have active admin permissions. If it says Medium (or lower), you don't. Just FYI, the startup directory being system32 doesn't have anything to do with whether you have admin permissions or not, but the command I listed above should tell you for sure.
Author
Owner

@zadjii-msft commented on GitHub (May 8, 2019):

Does the titlebar say "Administrator: " at the front of it?

I'm very confident that running conhost.exe by itself won't auto-elevate itself.

@zadjii-msft commented on GitHub (May 8, 2019): Does the titlebar say "Administrator: " at the front of it? I'm very confident that running `conhost.exe` by itself won't auto-elevate itself.
Author
Owner

@honglibin commented on GitHub (May 11, 2019):

Mandatory Label\Medium Mandatory Level 标签 S-1-16-8192
so I have no admin permissions, but how I can get the admin permissions?

在 2019-05-08 21:16:25,"Parker Snell" notifications@github.com 写道:

I'm on the same version Windows version, and I do not get an admin prompt doing this - tbh I'm not sure of the privilege checks on that net user command, but can you try this command?

whoami /groups | findstr /b Mandatory

If you see "High Mandatory Level", this means you have active admin permissions. If it says Medium (or lower), you don't.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@honglibin commented on GitHub (May 11, 2019): `Mandatory Label\Medium Mandatory Level 标签 S-1-16-8192` so I have no admin permissions, but how I can get the admin permissions? 在 2019-05-08 21:16:25,"Parker Snell" <notifications@github.com> 写道: I'm on the same version Windows version, and I do not get an admin prompt doing this - tbh I'm not sure of the privilege checks on that net user command, but can you try this command? whoami /groups | findstr /b Mandatory If you see "High Mandatory Level", this means you have active admin permissions. If it says Medium (or lower), you don't. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Author
Owner

@honglibin commented on GitHub (May 11, 2019):

Mandatory Label\High Mandatory Level ?? S-1-16-12288
I can run powershell as admin, so I must run the new ternimal in powershell?

在 2019-05-08 21:16:25,"Parker Snell" notifications@github.com 写道:

I'm on the same version Windows version, and I do not get an admin prompt doing this - tbh I'm not sure of the privilege checks on that net user command, but can you try this command?

whoami /groups | findstr /b Mandatory

If you see "High Mandatory Level", this means you have active admin permissions. If it says Medium (or lower), you don't.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@honglibin commented on GitHub (May 11, 2019): `Mandatory Label\High Mandatory Level ?? S-1-16-12288` I can run powershell as admin, so I must run the new ternimal in powershell? 在 2019-05-08 21:16:25,"Parker Snell" <notifications@github.com> 写道: I'm on the same version Windows version, and I do not get an admin prompt doing this - tbh I'm not sure of the privilege checks on that net user command, but can you try this command? whoami /groups | findstr /b Mandatory If you see "High Mandatory Level", this means you have active admin permissions. If it says Medium (or lower), you don't. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Author
Owner

@parkovski commented on GitHub (May 12, 2019):

@honglibin - from the UI, right click -> run as administrator. From powershell, start program_name -verb runas.

@parkovski commented on GitHub (May 12, 2019): @honglibin - from the UI, right click -> run as administrator. From powershell, `start program_name -verb runas`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#803