Skip to main content


Welcome to Mark Baggett - In Depth Defense

I am the course Author of SANS SEC573 Automating Information Security with Python. Check back frequently for updated tools and articles related to course material.

New tool

I read an article on Fireeye's website the other day where they used Machine Learning to eliminate a lot of the noise that comes out of tools like strings.  It's pretty interesting and looks like it would save me some time when looking through malware.

I wondered how effective scores would be in helping to eliminate the noise.  45 minutes and 29 lines of Python code later I have something that looks like it works.  Check out

Before here is the output of strings on a piece of malware:

student@573:~/freq$ strings -n 6 malware.exe | head -n 20
!This program cannot be run in DOS mode.
|$ H;_
|$ AVH

After the useful stings quickly bubble to the top.  Its not perfect but th…
Recent posts

SRUM-DUMP and SRUM_DUMP_CSV Ported to Python 3

SRUM_DUMP and SRUM_DUMP_CSV have been ported to Python3 and are available for download from the PYTHON3 branch of my github page.

In moving to Python3 I also updated the modules that I depend upon to parse and create XLSX files and access the ESE database that contains the SRUM data.  I hope that this will fix the issue that some users have experienced with SRUDB.dat files that create very large spreadsheets.  If it does not please let me know and continue to use SRUM_DUMP_CSV.EXE to avoid the XLSX problem.

In moving to Python3 you will find the process to be faster.

If you would like to run the tools from source instructions for doing so are in the README on the github page.

Three Free Python apps to improve your defenses and incident response

I did a SANS Webcast on a couple of tools I developed to use automation to enhance your network defenses and incident response capability.    If you missed it you can check it out here:

Kringlecon Escaping Python Shells

If you had told 8 year old me that one day I would get to travel to the North Pole, meet Santa Claus and speak at Kringlecon I would, in complete honestly, have thought you were crazy and ran screaming to my parents in fear of you.   But it happened!   I gave a short talk at Kringlecon.   The talk was an abbreviated version of the talk I gave at SANS Pen Test Hackfest in 2018.   I will also be giving the full talk a few time at SANS conferences in 2019 so come by and see it.
You can download the associated sample code and follow along at here.
Check out Kringlecon here.

You can watch the Kringlecon talk here:

Security Onion getting the most from and Domain States

My talk at Security Onion conference has been posted and is available for viewing here.

Python Decorators Webcast

In October I did a SANS Webcast on Python Decorators.  It was recorded and is available on YouTube.   Check it out.


An issue was reported where is some conditions SRUM_DUMP would stop processing and print the following error to the screen.

UnboundLocalError: local variable 'sid_str' referenced before assignment
The issue was that sometimes the SRUM database had entries in it that were all zeros.

OrderedDict([('IdType', 3), ('IdIndex', 38127), ('IdBlob', '0000000000000000')])

I've released an update that handles the anomoly althought I do not understand the circomstances of why Windows would record all zero's for as the user SID.

The issue was fixed and new versions of both SRUM DUMP and SRUM DUMP CSV were released.