Skip to content

[-] RunasCsException: Selected logon type '2' is not granted to the user 'user'. Use available logon type '3'. #7

@nuts7

Description

@nuts7

Hi, while trying to use RunasCs on a HackTheBox machine I came across this error.

*Evil-WinRM* PS C:\> .\RunasCs.exe user password "cmd /c echo test > C:\test" -domain domain.local -l 3 --force-profile
[-] RunasCsException: Selected logon type '2' is not granted to the user 'user'. Use available logon type '3'.

I have several misunderstandings: why does the error imply that I am using logon type 2 when I have correctly entered logon type network (3)?

Out of curiosity, I tested all the logon types and 9 behaved like this: 😄

image

Does anyone have any idea of the source of the problem? Don't hesitate to ask me if you need more details about the environment, even if I don't know it well since it's a machine coming from HTB.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions