Security Stuff
  • About
  • HackTheBox
    • Windows
      • Forest
      • Escape
      • Timelapse
      • Support
    • Linux
      • TwoMillion
      • Soccer
      • Pollution
      • Pilgrimage
      • Sandworm
  • Windows
    • Authentication
      • Overview
      • Logon
      • Kerberos
      • Credential
    • Active Directory
      • Domain Service
        • LDAP
        • AD Objects
      • Key Distribution Center
      • Certificate Service
    • Windows Protocols
      • SMB
    • Windows Server
      • MSSQL
    • Execution
      • Windows APIs
      • Remote Access
        • WinRM
    • Credential Access
      • Kerberos Ticket
        • Kerberoasting Attack
        • Golden/Silver Ticket Attack
        • AS-REP Roasting Attack
      • OS Credential Dumping
        • DCsync Attack
      • Certified Pre-Owned
  • Linux
    • Management
      • Package
    • Process
      • Namespace
      • Terminal
  • Web
    • Authentication
      • SAML
      • OAuth
    • Enumeration
  • Defense
    • Windows
      • Windows Event Logs
  • Development
    • Programming Language
    • Database
      • MySQL
    • Virtualization
      • Container
    • Cryptography
      • GnuPG
Powered by GitBook
On this page
  • Introduction
  • Security Principal
  • Types
  • Security Identifier (SID)
  • Account Database
  • Generic Security Services (GSS)
  • Security Token
  • Authentication Service
  • Authentication Process
  • Simple and Protected GSS-API Negotiation Mechanism (SPNEGO)
  • Security Support Provider Interface (SSPI)
  • Security Support Package (SSP)
  • Windows Negotiate
  • Kerberos & NTLM
  1. Windows
  2. Authentication

Overview

PreviousAuthenticationNextLogon

Last updated 1 year ago

The Authentication Services protocols verify the identity of users, computers, and services through the interactive logon and network logon authentication processes. Once authenticated, these entities can be authorized to access network resources securely.

Introduction

Security Principal

An entity with an identity that can be authenticated.

Types

A security principal can be

  • a user

  • an autonomous program within the system, such as a logging daemon, a system backup program, or a network application.

  • a computer, a service, or a security group that represents a set of users

Security Identifier (SID)

  • a smaller integer representing an identity relative to the account authority termed the relative identifier (RID)

as an identity of a security principal.

Account Database

Generic Security Services (GSS)

GSS API decoupled application protocols from authentication protocols by providing an abstraction layer between application-level protocols and security protocols.

The Windows implementation, SSPI, thus also allows an application to use various security models available on a computer or network without changing the interface to the security system.

SSPI is the Windows equivalent of GSS-API, and the two sets of APIs are on-the-wire compatible; hence the terms GSS-API and SSPI are used interchangeably.

Security Token

For example, Kerberos tickets.

Authentication Service

The Authentication Services protocols provide authentication services to client and server applications.

Client and server applications interact with

components of Authentication Services respectively.

Authentication Process

  1. The client application contacts the local Authentication Client through a generic interface that abstracts the underlying authentication protocols for creating a security token.

  2. The Authentication Client creates a security token with the help of the underlying authentication protocols and returns it to the calling application.

  3. The client application embeds the security token within application messages of the application protocol and transmits them as an authentication request to the server side of the application.

  4. On receipt of the authentication messages, the server application extracts the security token and supplies it to the Authentication Server.

  5. The Authentication Server processes the security token with the help of the underlying authentication protocols and generates a response determining whether that authentication is complete for the server-side application.

  6. If another security token is generated, the server-side application sends it back to the client, where the process continues.

When authentication is complete, session-specific security services are available.

Simple and Protected GSS-API Negotiation Mechanism (SPNEGO)

  • to negotiate different options within a given security mechanism or different options from several security mechanisms

  • to select a service, and

Security Support Provider Interface (SSPI)

SSPI is implemented as DLLs containing SSPs for different types of authentication protocols.

Security Support Package (SSP)

Both the client and server versions of Windows implement standard authentication protocols including:

as part of an extensible architecture that consists of security support provider (SSP) security packages to enable the authentication of users, computers, and services. The authentication process, in turn, enables authorized users and services to access resources securely.

Each SSP provides mappings between the SSPI function calls of an application and the functions of an actual security model.

Windows Negotiate

A security support provider (SSP) acts as an application layer between Security Support Provider Interface (SSPI) and the other SSPs.

Negotiate analyzes the request and picks the best SSP to handle the request based on customer-configured security policy.

Kerberos & NTLM

  • It can't be used by one of the systems involved in the authentication.

  • The calling app didn't provide sufficient information to use Kerberos.

  • A user principal name (UPN).

  • A NetBIOS account name as the target name.

Windows uses a , composed of

an account authority portion (typically a ) and

An account database maintains the and necessary information for authentication and other purposes.

an maintains the domain security principals, whereas

the maintains local security principals

In the GSS style or model, the authentication protocol produces opaque messages that are known as . The application protocol is responsible for security token exchange between sender and receiver but does not parse or interpret the security tokens.

the and

When Microsoft adopted the Kerberos protocol for Windows and moved away from , Microsoft chose to insert a protocol, in this case, SPNEGO, to allow security protocol selection and extension.

SPNEGO is an authentication mechanism that allows peers to determine whether their credentials support a common set of GSS-API security mechanisms

to establish a among themselves using that service.

The is the Windows-specific API implementation of the GSS-style authentication model.

SSPI provides the means for connected network applications to call one of several , associated with different authentication protocols, to establish authenticated connections and to exchange data securely over those connections.

,

, and

Simple and Protected Generic Security Service Application Program Interface (-API) Negotiation Mechanism (),

and their extensions, as specified in , , , and respectively.

Currently, the Negotiate security package selects between and . Negotiate selects Kerberos unless one of the following conditions applies:

To allow Negotiate to select the security provider, the client app must provide one of the following:

A (SPN).

Otherwise, Negotiate always selects the security provider.

security identifier (SID)
domain
security account manager (SAM) built-in database
security tokens
Authentication Client
Authentication Server
NT LAN Manager (NTLM) Protocol
Generic Security Services (GSS)
security context
Security Support Provider Interface (SSPI)
security support providers (SSPs)
Kerberos
Transport Layer Security (TLS)
GSS
SPNEGO
[MS-KILE]
[MS-TLSP]
[MS-SPNG]
[MS-NEGOEX]
Kerberos
NTLM
Kerberos
service principal name
NTLM
security principals
Active Directory database
[MS-AUTHSOD]: OverviewMicrosoftLearn
Logo
[MS-AUTHSOD]: GSS-Style AuthenticationMicrosoftLearn
Logo
[MS-AUTHSOD]: Security PrincipalMicrosoftLearn
Logo
https://www.rfc-editor.org/rfc/rfc4178.txt
[RFC4178] The Simple and Protected Generic Security Service Application Program Interface (GSS-API) Negotiation Mechanism
[MS-AUTHSOD]: Authentication Services Protocols OverviewMicrosoftLearn
Logo
SSPI - Win32 appsMicrosoftLearn
Microsoft Negotiate - Win32 appsMicrosoftLearn
Logo
Logo
GSS API decoupled application protocols from authentication protocols.