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.




2013 Posts and Publications

Here is a collection of blog posts and other things I did or found interesting in 2013.

Violent Python - TJ OConnor
I was the technical editor for Violent Python.
http://www.amazon.com/Violent-Python-Cookbook-Penetration-Engineers/dp/1597499579

SHMOOCON 2013
Here are some links to my 2013 Shmoocon presentation.  Unofficial sources report 1200+ people in the room for my presentation with Jake Williams.  
http://www.wipethedrive.com

Here is a video: http://www.youtube.com/watch?v=R16DmDMvPeI

I also did a series on the Internet Storm Center on the topic.   Here are some posts.

Part 1 -  http://isc.sans.edu/diary/Wipe+the+drive!++Stealthy+Malware+Persistence+Mechanism+-+Part+1/15394
Part 2 -  http://isc.sans.edu/diary/Wipe+the+drive!++Stealthy+Malware+Persistence+-+Part+2/15406
Part 3 -  http://isc.sans.edu/diary/Wipe+the+drive!++Stealthy+Malware+Persistence+-+Part+3/15448
Part 4 -  http://isc.sans.edu/diary/Wipe+the+drive!++Stealthy+Malware+Persistence+-+Part+4/15460

SANS SEC573 PYTHON FOR PENETRATION TESTERS
I authored a SANS Course!   SEC573 Python for Penetration Testers.    This is awesome!
https://www.sans.org/course/python-for-pen-testers

File Hiding and Process Obfuscation 
Here is a post I did on Pauldotcom.com on hiding processes.
http://pauldotcom.com/2013/02/file-hiding-and-process-obfusc.html

Python PSEXEC rocks
http://pen-testing.sans.org/blog/pen-testing/2013/03/27/psexec-python-rocks 

Manipulate Volume Shadow Copies from Python
http://pen-testing.sans.org/blog/pen-testing/2013/04/12/using-volume-shadow-copies-from-python

SMB Relay Demystified and NTLMv2 Pwnage with Python
 http://pen-testing.sans.org/blog/pen-testing/2013/04/25/smb-relay-demystified-and-ntlmv2-pwnage-with-python

TDS, MSSQL and Python
http://pen-testing.sans.org/blog/2013/05/21/tds-mssql-and-python-oh-my

Antivirus Evasion - A peak under the Veil
http://pen-testing.sans.org/blog/pen-testing/2013/07/12/anti-virus-evasion-a-peek-under-the-veil

Windows is 0wned by Default! 
Well.  This is pretty scary stuff.  Rootkits without Rootkits.  AV Evasion.   My latest research project hit some serious pay dirt here.    Sitting in Jason Fossen's SEC505 Securing Windows class is always inspiring and educational.   Two years ago I was watching him play with the Application Compatibility Toolkit.   I commented that it looked a lot like a rootkit.   Jason (one of the smartest guys I know) said, "Yep, I think there is probably a lot of things you could do with that."   Jason is awesome.  I dug into it for a while, shared it with a few friends, then presented it publicly at this years Derbycon!   Check it out.
 http://www.youtube.com/watch?v=SVqiDdVS7Wo


 


Popular posts from this blog

Awesome Keyboard Tricks - Clevo/Sager Backlight control from Powershell

I'm back on Windows.   After 8 years on a Macintosh I just couldn't go another day with ONLY 16GB of RAM.   I priced it out and for the cost of a top of the line MacBook I could get a tricked out PC with 32GB of ram and 2.5 TB or hard drive space (1.5 of it being SSD).   So I made the switch.  To get a top performing laptop I ended up buying a gaming machine from xoticpc.com.   The model is Sager NP9752 ( Clevo P750ZM ).    I have to say I like it quite a bit.    One of the features I was curious about was the "Programmable backlit keyboard".   With it you can set your keyboard backlight to various colors and light movement patterns.    Now, when I hear "programmable" I think APIs.   I was a little disappointed to find out there weren't any documented APIs that I could use to control the keyboard.    Your only choice is to use their built in tool to configure the lights on the keyboard.   That stinks.  I want to be able to change key colors automatically

New tool Freq_sort.py

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. https://www.fireeye.com/blog/threat-research/2019/05/learning-to-rank-strings-output-for-speedier-malware-analysis.html I wondered how effective freq.py 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 freq_sort.py. Before freq_sort.py 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. e!Rich `.rdata @.data .pdata @.gfids @.rsrc @.reloc \$0u"H L$ SVWH K SVWH |$ H;_ <bt%<xt!<Zt |$ AVH l$ VWAV L$ SUVWH UVWATAUAVAWH 0A_A^A]A\_^] UVWATAUAVAWH @A_A^A]A\_^] After freq_sort.py the useful stings quickly bubble to t

Security Onion getting the most from Freq.py and Domain States

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

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. https://github.com/MarkBaggett/srum-dump/tree/python3 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.

Reverse Pivots with Metasploit - How NOT to make the lightbulb

In a penetration test your target is PII kept on a corporate file server which I will call Victim2. You are outside the firewall but have gained access to an internal host, Victim1, when a user opened your word document with an embeeded Meterpreter payload . The stager embedded in the word document made a REVERSE_TCP connection to your machine which uploaded metsrv.dll to the victim. The machine you have access to (Victim1) has unfiltered access to your target (Victim2). Victim2 is vulnerable to ms08_067_netapi. Victim2 however, has NO access to the internet at all. Were it not for the strict egress firewall rules controlling Victim2 you could have used the ROUTE command to pivot your attack through your meterpreter session on Victim1 to Victim2, and have Victim2 send you a shell directly like this... Your IP = 192.168.1.1 Victim1 = 10.4.4.4 Victim2 = 10.5.5.5 Background session 1? [y/N] y msf exploit(ms08_067_netapi) > route add 10.5.5.5 255.255.255.255 1 msf exploit(m