Operator On The Wire
Join
← Back to Knowledge Base
BLUE TEAM / THREAT HUNT / LINUX / LATERAL MOVEMENT

Credential Reuse

This note documents detection patterns related to Credential Reuse on Linux systems.


Direct Indicators

SourceGrep Pattern / ArtifactMeaningForensic ValueNotes
Shell historyssh user@host repeated across hostsSame credential reusedCriticalCommon lateral movement pattern.
Shell historysshpass -pExplicit password reuseCriticalStrong operator indicator.
Shell historysu - userLocal credential reuseCriticalAlternate account pivot.
Shell historysudo -u userCross-account executionHighMay indicate credentialed pivot.
Auth logssame account from multiple hostsReused valid accountCriticalStrong timeline signal.
Auth logsrapid multi-host successCredential spreadCriticalStrong lateral indicator.
known_hostsmany new hosts under same userBroad reuseHighHost expansion artifact.
SSH key usesame key across multiple systemsKey reuseCriticalCommon Linux lateral path.
authorized_keysreused inserted keyPersistence + reuseCriticalStrong credential chain.
auditdrepeated ssh/su/sudo executionProcess attributionCriticalBest attribution if enabled.
Shell historyscp after repeated sshCredential-backed transferCriticalConfirms operational use.
Journaldmultiple auth successesRuntime clueHighUseful across host timeline.

Indirect Indicators

IndicatorWhat To Look ForForensic ValueNotes
Same account across internal serversLateral credential reuseCriticalStrong compromise chain.
SSH key read then multi-host loginKey-driven movementCriticalCommon attacker progression.
Password auth after shadow accessCredential theft followed by useCriticalStrong hostile sequence.
Dormant account suddenly multi-host activeSuspicious reuseCriticalHigh anomaly value.
Same user plus sudo on multiple hostsBroad privilege reuseCriticalStrong campaign signal.
Reused key under service accountSuspicious contextCriticalOften exploitation-driven.

Common Tools

ToolUsage
sshCredential-backed remote access.
sshpassPassword automation.
suLocal account pivot.
sudo -uAlternate user execution.
scpTransfer after credential reuse.

Relevant Artifacts

ArtifactPath / CommandForensic ValueNotes
Auth logs/var/log/auth.log, /var/log/secureCriticalPrimary reuse truth.
SSH keys~/.ssh/CriticalKey source.
Known hosts~/.ssh/known_hostsHighHost spread evidence.
Shell history.bash_historyCriticalCommand chain.
Audit logs/var/log/audit/audit.logCriticalProcess attribution.

MITRE ATT&CK References

  • T1078 Valid Accounts
  • T1021.004 SSH
  • T1550 Use Alternate Authentication Material

Decision Tree

  1. Was same credential used repeatedly?
  2. Across which hosts?
  3. Password or key?
  4. Did reuse follow credential theft?
  5. Did reuse enable privilege escalation?

Example Detection Templates

Grep

grep -R "ssh \|sshpass\|su - \|sudo -u " /home/*/.bash_history /root/.bash_history 2>/dev/null

Journalctl

journalctl | grep ssh

Sigma

title: Linux Credential Reuse
id: linux-credential-reuse
status: experimental
description: Detects repeated credential-backed access patterns across Linux hosts
logsource:
  product: linux
detection:
  selection_keywords:
    message|contains:
      - 'sshpass'
      - 'su -'
      - 'sudo -u'
  condition: selection_keywords
level: high
tags:
  - attack.lateral_movement
  - attack.t1078

Mitigation & Hardening

Control AreaMitigationEffectivenessNotes
MFAProtect SSH and privileged accountsCriticalReduces reuse success.
Key hygieneRotate exposed keysCriticalLimits spread.
Log correlationCross-host auth reviewHighDetects reuse patterns.

Fast Triage Checks

QuestionCommand / ArtifactWhy It Matters
Same account across hosts?auth logsReuse proof.
Same key reused?ssh artifactsLateral clue.
Followed credential theft?correlate historyAttack chain.