detections
- ID: DT088
- Created: 25th July 2024
- Updated: 25th July 2024
- Platforms: LinuxMacOS
- Contributor: Ismael Briones-Vilar
Bash History
Bash history refers to the commands, files, and shortcuts that record the commands run in a Bash shell. Bash history can be viewed in a Bash shell with the history command.
By default, history stores commands in RAM until the user logs out of the terminal, then writes them to ~/.bash_history. The history buffer is limited to 1,000 command entries, and the history file to 2,000 entries.
It is trivial for the ~/.bash_history file to be modified with a text editor, where entries can be deleted or falsified.
Sections
| ID | Name | Description |
|---|---|---|
| AF035 | Trusted Tool Misuse | The subject uses applications, binaries, scripts, services, or administrative utilities already trusted or commonly present within the organizational environment to support or conceal an infringement without introducing new software.
Trusted tool misuse may involve operating system utilities, command and scripting environments, archive tools, managed browsers, synchronization clients, productivity applications, remote management components, or administrative consoles. Because these capabilities are routinely used for legitimate purposes, the subject’s activity may avoid software installation alerts, application control restrictions, and indicators associated with unfamiliar executables.
The anti-forensic significance arises where the subject deliberately selects a trusted capability to reduce detection, obscure intent, or make unauthorized activity appear consistent with normal operational use. Investigators should assess the subject’s role, command-line activity, file access, timing, tool combinations, and surrounding investigative indicators. The execution of a trusted tool should not be treated as inherently suspicious.
Example Behaviors
|
| PR048 | System Profiling | The subject gathers technical information about an organizational system to understand its operating environment and to assess how it may support subsequent activities. Information collected may include the system name, operating system, version, architecture, hardware configuration, firmware or BIOS details, patch level, installed hotfixes, and other characteristics that identify the system’s capabilities or technical state.
System profiling is preparatory where the information allows the subject to select compatible tools, identify potential weaknesses, assess the suitability or value of the system, or plan subsequent access, privilege elevation, persistence, security control circumvention, or infringement. |
| PR020.001 | Renaming Files or Changing File Extensions | A subject may rename a file to obscure the content of the file or change the file extension to hide the file type. This can aid in avoiding suspicion and bypassing certain security filers and endpoint monitoring tools. For example, renaming a sensitive document from FinancialReport.docx to Recipes.txt before copying it to a USB mass storage device. |
| PR025.007 | File Download via Remote Access or Transfer Tools | The subject downloads files through remote session tools or file transfer mechanisms such as RDP drive mapping, SCP, SFTP, or remote desktop clipboard/file transfer features. |