All lessons Leer en español

Security in depth · Unit 19

Initial access and credentials

Understand how network services recognize accounts, protect credentials, and limit the authority of a session.

11 minready

ATT&CK TA0001 Initial Access · TA0006 Credential Access

Helpful before thisAuthenticationLearn with care: permission, people, and AI

After this lesson you can

  • distinguish a reachable service from authenticated and authorized access
  • compare online credential misuse with exposure of a copied verifier
  • explain session authority, transfer controls, and useful access evidence

Lessons in this unit

Browse 8 lessons in this topic
  1. Ports do not authenticate a serviceDistinguish a familiar port number from evidence of an authenticated connection.3 min
  2. A connection is not an authorizationUse a layered record to distinguish a connection problem from an expected permission decision.3 min
  3. TLS protects between its endpointsReview each protected connection and the separate handling of decrypted data.3 min
  4. Store verifiers, not reusable passwordsSeparate salt, password-hashing cost, and account recovery when reviewing stored credentials.3 min
  5. Recovery belongs in the MFA designDistinguish recovery notifications from evidence that factor replacement was authorized.3 min
  6. A token needs an intended recipientUse a simplified token-validation record to keep issuer trust, audience, and application permission separate.3 min
  7. Reuse joins separate failure boundariesCompare credential material and accepted authority instead of relying on account names.3 min
  8. Revocation is a defined behaviorUse a retirement timeline to distinguish blocked new sign-ins from continuing application sessions.3 min

A network connection answers “can these systems communicate?” Authentication and authorization answer different questions: “which account context is accepted?” and “what may that context do?” A service can be reachable while correctly denying access, or deliberately publish information without requiring an account.

Connection, account, and permissionReachability, authentication when required, and resource authorization are distinct decisions.ReachabilityCan systems communicate?AuthenticationWhen required by the serviceAuthorizationActor + action + resource
Reachability, account proof, and permission are distinct decisions. A session has only the authority actually granted to its context.

Initial access can result from exposed credentials, software weaknesses, misplaced trust, or other mechanisms. There is no universal sequence or single most likely cause for every environment. Begin by understanding the service’s purpose and intended users.

Authentication is a protocol

A Credential supplies evidence for an account or workload. Passwords, cryptographic keys, certificates, and tickets work differently. A certificate may be public; authentication normally requires proving control of its corresponding private key. Recognizing an account does not necessarily establish a person’s legal identity.

An anonymous or guest role can be intentional. The important distinction is the resource and operation allowed. A public brochure and a confidential backup have different access requirements. Accounts used by applications are also legitimate identities; access does not require a human to type a password.

Common service families

Ports below are common defaults, not reliable product identification or complete deployment rules.

Family Examples Defensive question
Remote access SSH 22, RDP 3389 Who may establish a session, and how is it protected?
File sharing FTP control 21, SMB 445, NFS 2049 Which folders and operations are intended for each identity?
Directory and identity LDAP 389/636, Kerberos 88 Which account evidence and directory permissions apply?
Management SNMP requests 161, notifications 162 Who may read or change management information?
Databases SQL Server 1433, PostgreSQL 5432 Which applications need access to which data?

FTP anonymous access and transport encryption are separate properties. Plain FTP does not itself protect credentials and file contents with encryption. SMB permissions involve the resource and context; seeing a share name does not prove its contents are readable.

SNMPv1/v2c community strings provide a shared access mechanism without modern message confidentiality. SNMPv3 supports security models with authentication and privacy, but the version label alone does not prove encryption is configured. SSH provides protected transport and several authentication methods; key ownership, account permissions, and lifecycle still matter.

Credential misuse has different forms

Credential stuffing uses previously compromised account-and-password pairs. Password spraying applies a small candidate set across many accounts. Offline guessing evaluates candidates against an obtained verifier or protected copy rather than a live sign-in service. These are categories for understanding controls, not interchangeable names.

Online attempts may produce logs, throttling, lockouts, and service load. A slow rate does not guarantee safety or avoid detection. Suitable controls combine strong authentication, account recovery, monitoring, and rate limits designed to avoid unnecessary disruption.

Copied verifiers require separate protection: restricted access, suitable salted password hashing, and an appropriate work factor. MFA can prevent a recovered password alone from completing a protected sign-in. It does not stop calculations against an offline copy or make an exposed password secret again.

A password changes. Does every existing session end?

Only if the service implements that behavior for the relevant sessions and tokens. Recovery should define which access is revoked, what remains valid, and what the user is told. Expiry, revocation, and credential rotation solve related but different problems.

Transfers depend on both ends

Moving a file requires an authorized source, destination, identity, and purpose. An existing session does not automatically authorize every copy. Encryption protects transport; file permissions, storage protection, integrity checks, retention, and auditability protect other parts of the journey.

Routine administration and incident response should minimize sensitive data collected and retain evidence according to an agreed plan. Cleanup must preserve required evidence and service dependencies. Network architectures explains how network policy and endpoint permissions protect different parts of a system.

A session is backed by a process

A command interpreter can be interactive or run a script. Its effective authority follows its process context, credentials, and applicable controls. A terminal’s appearance and convenience features do not grant more privilege.

A Bind listener accepts an incoming connection; a Reverse connection starts from the remote process. Neither direction proves malicious intent or administrative rights. Network policy and endpoint observations should be evaluated together.

A web shell is code that exposes command execution through a web application. It may involve files, runtime state, or other deployment artifacts; investigating only one presumed file is insufficient. “Payload” is also broader than a shell: it describes the functional content delivered in a particular context.

Tools and evidence

Assessment frameworks such as Metasploit organize modules and sessions. Their presence or output does not establish permission, successful exploitation, or business impact. A useful access finding identifies the service, accepted identity, relevant resource and operation, supporting evidence, and corrective control.

Continue with authentication for account lifecycle or privilege boundaries for process authority.

Worked review: one reset, two different results

The fictional Harbor library supplies correlated application records from a controlled review. All times use the same clock.

N1, owner policy: Guests may read the public brochure. Staff may read their assigned archive, without changing its contents. An account recovery reset must end that account’s existing archive sessions before recovery is marked complete.

N2, session S4: The service authenticates Ari, permits an assigned-archive read, and denies an archive write.

N3, recovery: At 11:00, recovery is marked complete. A fresh sign-in using the old password is rejected. At 11:02, S4 still successfully reads the assigned archive.

PredictDoes rejection of the old password establish that recovery met N1?

No. It verifies one authentication result. S4’s continued read shows the existing session still worked after the required completion boundary. The supported finding concerns this account and session, not every session in the system.

The application owner should examine how recovery invalidates session state or otherwise prevents further accepted use. Password authentication and session continuity have different evidence. Simply lowering login attempt limits would not address S4’s demonstrated persistence.

Acceptance should show that the recovered account can establish a new approved session, that S4 is rejected, and that the public brochure remains available. N2’s write denial is already consistent with the staff role; granting write to eliminate that denial would introduce an authorization error.

If a copied password verifier were also exposed, it would require separate handling. Successful session invalidation would not remove an external copy. Keep each correction tied to the evidence and the specific protection it restores.

Terms you met

Initial accessCredentialPassword sprayingReverse connectionBind listener

Check yourself

No timer. No penalties. Read the explanation and try again whenever you like.

  1. N2 contains a successful staff read and a denied write. Which interpretation fits N1?

    Show the answer

    Correct answer: The service accepted Ari and enforced the supplied read-only authorization. Both outcomes fit the owner’s role definition. Authentication success does not require every operation to succeed.

  2. Why should a review of live authentication have an explicit owner and activity limits?

    Show the answer

    Correct answer: Even unsuccessful attempts can affect accounts, service availability, and other users. Operational limits must reflect those effects; a low rate alone does not establish harmlessness.

  3. An exposed verifier copy exists, while live staff sign-in requires MFA. Which assessment is accurate?

    Show the answer

    Correct answer: MFA protects the covered sign-in flow; verifier storage and password hashing address the separate copy. A live second factor does not change material already copied outside the authentication service.

  4. An approved monitoring agent initiates its connection outward. What additional evidence describes its authority?

    Show the answer

    Correct answer: The agent’s process context and the receiving service’s permitted operations. Endpoint authority and remote authorization complement the connection observation.

  5. Which finding is supported by N3?

    Show the answer

    Correct answer: Recovery completed while S4 retained archive access, contrary to the owner’s policy. This ties a specific session and time to the required boundary without overgeneralizing.

Try it

  • WriteWrite an access-boundary note from N1-N3. Separate public access, staff authorization, password authentication, and existing-session behavior. State one confirmed policy failure, one expected denial, an owner for the correction, and positive/negative acceptance criteria that preserve the public brochure.
References