---
title: Log your Bash history ?
description: Based on some recent events related to Equation Group, logging commandline history became a more interesting topic for me to investigate.  There were
---

- [Home](https://mydev.netwitness.com/home)
- Integrations 
    - [Netwitness Platform Integrations](https://mydev.netwitness.com/netwitnessplatformintegrations)
    - [Third Party Integrations](https://mydev.netwitness.com/thirdpartyintegrations)
- [Knowledge Center](https://mydev.netwitness.com/knowledge-base)
- Community 
    - [Blogs](https://mydev.netwitness.com/netwitness-security-llc-blog)
    - Discussions
- Customers 
    - [Manage Products and Licenses](https://mydev.netwitness.com/nwportal)
    - Downloads
- Partners 
    - [Partner Program](https://mydev.netwitness.com/partner)
    - [Partner Resources](https://mydev.netwitness.com/partnerresources)
    - [Submit a New Deal Registration](https://mydev.netwitness.com/dealregistration)
    - [Become a Partner](https://mydev.netwitness.com/becomeapartner)
    - [Update Your Partner Locator Profile](https://www.netwitness.com/partner-locator/?utm_source=pardotnewsletter&utm_medium=email&utm_campaign=partner_march)
    - [NetWitness LinkedIn Partner Hub](https://linkedin.com/showcase/netwitnesspartners/)
- Education 
    - [Instructor Led Training Schedule](https://mydev.netwitness.com/instructorledtrainingschedule)
    - [NetWitness Training Catalog](https://mydev.netwitness.com/netwitnesstrainingcatalog)
    - [Security Awareness Training](https://mydev.netwitness.com/securityawarenesstraining)
    - [New Product Readiness](https://mydev.netwitness.com/newproductreadiness)
    - [On-Demand Virtual Labs](https://mydev.netwitness.com/ondemandvirtuallabs)
    - [Additional Training Information](https://mydev.netwitness.com/additionaltraininginformation)
    - [Frequently Asked Questions](https://mydev.netwitness.com/educationfaq)
    - [Contact NetWitness Education Team](https://mydev.netwitness.com/contact-netwitness-education-team)
- Support 
    - [Contact Support](https://mydev.netwitness.com/contact-support)
    - [Create a New Case](https://mydev.netwitness.com/create-support-case)
    - [View My Cases](https://mydev.netwitness.com/viewmycase)
    - [Product Version Life Cycle](https://mydev.netwitness.com/product-version-life-cycle)
    - [Warranty & Replacement Parts](https://mydev.netwitness.com/warranty-and-replacement-parts)
    - [Community Support Forum](https://mydev.netwitness.com/community-support-forum)
    - [Technical Support Guide](https://mydev.netwitness.com/technical-support-guide)

![search](https://21725316.fs1.hubspotusercontent-na1.net/hubfs/21725316/Ladder/Image/search.svg)

![search](https://21725316.fs1.hubspotusercontent-na1.net/hubfs/21725316/Ladder/Image/search.svg)

![search](https://21725316.fs1.hubspotusercontent-na1.net/hubfs/21725316/Ladder/Image/search.svg)

![search](https://21725316.fs1.hubspotusercontent-na1.net/hubfs/21725316/Ladder/Image/search.svg)

# Log your Bash history ?

- Home
 */*- [Netwitness blogs](https://mydev.netwitness.com/netwitness-security-llc-blog)
*/*- log your bash history ?

 12 Apr, 2017

**Author:** EricPartington

Based on some recent events related to Equation Group, logging commandline history became a more interesting topic for me to investigate.  There were some indicators that were published here that might have been useful to look for if analysts had a way to look at Linux commandline/bash history.

[https://github.com/Neo23x0/sigma/blob/master/rules/apt/apt\_equationgroup\_lnx.yml](https://github.com/Neo23x0/sigma/blob/master/rules/apt/apt_equationgroup_lnx.yml)

So the question became, how do enterprises log commandline information for all or targeted users or commands much like powershell can be used to get useful windows endpoint information for forensic investigations?

Natively there appeared to be many hacks to get some form of logging via syslog to a SIEM but the consensus appeared to be using Auditd to create rules to log events of interest and forward via syslog.  Still investigating how to get that to work on my demo environment but I took a slight pivot and looked at NetWitness Endpoint to see what information could be extracted from that database to leverage.

[https://community.rsa.com/community/products/netwitness/blog/2017/03/10/investigations-with-endpoint-tracking-data](https://community.rsa.com/community/products/netwitness/blog/2017/03/10/investigations-with-endpoint-tracking-data)

Using the post from Chris Thomas as a template to create a similar ODBC connection for Linux machines, a similar event source and ODBC typespec were created to pull linux bash history into NetWitness Logs where you could leverage the native investigation capabilities to look for the indicators in the first link (as well as any others that might be useful).  THe bash history is captured at scan time only (not like windows tracking data) but still gets you some potentially useful information into the SIEM.

This is what we can extract currently for linux endpoint agents:

specifically we are pulling in the client mac, client IP, client hostname, user, command (param)

The commandline parameters are written into the same metakey as the windows tracking data so that eveything is grouped together (with a different device.type = nwe\_tracking\_linux)

![pastedImage\_1.png](https://mydev.netwitness.com/hubfs/Imported_Blog_Media/25691iA64B9705A978FF69.png "pastedImage_1.png")

![pastedImage\_3.png](https://mydev.netwitness.com/hubfs/Imported_Blog_Media/25693iB88518C81569BB66.png "pastedImage_3.png")

![pastedImage\_2.png](https://mydev.netwitness.com/hubfs/Imported_Blog_Media/25692iD0C75C66DEB96693.png "pastedImage_2.png")

typespec and parser included below, same implementation as the Windows Tracking data.

 Topic:

[0 Comment](https://mydev.netwitness.com/netwitness-security-llc-blog/517586#comments-listing)

###### CATEGORIES

- All
- [Blog](https://mydev.netwitness.com/netwitness-security-llc-blog/tag/blog)

##### RECENT POST

[Netwitness Platform Integration with AWS Application Load Balancer Access logs](https://mydev.netwitness.com/netwitness-security-llc-blog/netwitnessplatformintegrationwithawsapplicationloadbalanceraccesslogs)

 23 Jul, 2024

[The Sky Is Crying: The Wake of the 19 JUL 2024 CrowdStrike Content Update for Microsoft Windows and We Should Take Away From It](https://mydev.netwitness.com/netwitness-security-llc-blog/715124)

 20 Jul, 2024

[DDoS using BotNet Use Case](https://mydev.netwitness.com/netwitness-security-llc-blog/ddosusingbotnetusecase)

 7 May, 2024

[NetWitness Platform](https://www.netwitness.com/)

[Acceptable Use Policy](https://www.netwitness.com/wp-content/uploads/Acceptable-Use-Policy-092022.pdf) [Privacy Statement](https://www.netwitness.com/wp-content/uploads/NetWitness-Privacy-Statement-07292024.pdf)

![NetWitness Logo](https://mydev.netwitness.com/hubfs/Portal-Partner%20Program/netwitness-logo-RGB-white%201.png)

[![LinkedIn](https://mydev.netwitness.com/hubfs/Portal-Partner%20Program/linkedin.png)](https://www.linkedin.com/company/netwitness-platform/) [![YouTube](https://mydev.netwitness.com/hubfs/Portal-Partner%20Program/Youtube.jpg)](https://www.youtube.com/@netwitness)

© 2026 NetWitness LLC. All rights reserved.

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "EricPartington",
    "url" : "https://mydev.netwitness.com/netwitness-security-llc-blog/author/ericpartington"
  },
  "dateModified" : "2026-03-20T11:01:55.652Z",
  "datePublished" : "2017-04-12T04:00:00.000Z",
  "headline" : "Log your Bash history ?",
  "mainEntityOfPage" : {
    "@id" : "https://mydev.netwitness.com/netwitness-security-llc-blog/517586",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://mydev.netwitness.com/hubfs/netwitness-logo-CMYK.jpg"
    }
  }
}
```