Skip to content

Instantly share code, notes, and snippets.

View keithmccammon's full-sized avatar

Keith McCammon keithmccammon

View GitHub Profile
@keithmccammon
keithmccammon / cblr-batch.py
Last active July 27, 2016 19:06
Cb Enterprise Response Live Response batch harness
#!/usr/bin/env python
import argparse
import sys
from cbapi.response import CbEnterpriseResponseAPI
from cbapi.response.models import Process, Sensor
from cbapi.response.live_response_api import LiveResponseSession
#!/usr/bin/env python
"""
Given a sensor ID and a file path, delete the file. This performs no logging
and returns no status. It is generally unhelpful and not a template upon which
you want to build. But if the file is present and not locked it will be
destroyed :)
"""
import argparse
@keithmccammon
keithmccammon / decode-posh-base64string.py
Last active March 30, 2016 16:48
Decode input passed to PowerShell's FromBase64String function
#!/usr/bin/env python
import gzip
import base64
import StringIO
import sys
def gunzip(raw_data):
decoded_data_obj = StringIO.StringIO(raw_data)
@keithmccammon
keithmccammon / keybase.md
Created October 27, 2015 11:24
keybase.md

Keybase proof

I hereby claim:

  • I am keithmccammon on github.
  • I am kwm (https://keybase.io/kwm) on keybase.
  • I have a public key whose fingerprint is 142F DB63 ACB2 E176 484B 184E 0ACD C417 A011 DD72

To claim this, I am signing this object:

@keithmccammon
keithmccammon / netconns-by-domain.py
Created July 20, 2015 13:32
Extracting historical network events (netconns) given a list of domains
"""Dump a comma-separated list of domain,ipaddr pairings where the domain
includes at least one element from the list (domains).
Useful for dumping historical name resolution data, compiling lists of
endpoints that have talked to a domain, etc.
Depends on https://github.com/redcanaryco/cbapi2.
"""