Skip to content

asktgt: /opsec flag is not respected when using PKINIT with /certificate #161

@MexHigh

Description

@MexHigh

I'm currently trying to mimic the behaviour of Windows' Smartcard authentication, but Rubeus and asktgt acts differently, causing detection by Defender for Identity (MDI). The /opsec flag tries to mimic the smartcard behaviour as observed with Wireshark, but only when no certificate is used to authenticate (Kerberos' PKINIT extension).

This can be seen here (https://github.com/GhostPack/Rubeus/blob/master/Rubeus/Commands/Asktgt.cs#L258), where the opsec variable, populated by the /opsec flag, is not passed to the overloaded Ask.TGT function. Especially the AS-REQ without pre-authentication, which is usually issued when using smartcard auth, is missing.

I might find some time next week to fix this myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions