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.




Stuff I worked on in 2011 & 2012

I suppose I should update this site more often... So much to hack; so little time.   Here is some of the public stuff I have been working on in 2011, 2012.

Grabbing Usernames, Passwords, Cookies and more from HTTPS websites
http://pauldotcom.com/2012/07/post-exploitation-recon-with-e.html
http://pauldotcom.com/2012/09/data-mining-event-tracing-for.html

Privilege Escalation through VMWare snapshots
http://pen-testing.sans.org/blog/2012/08/03/pen-test-privilege-escalation-through-suspended-virtual-machines

Using Windows Resource Monitor to find hackers
http://isc.sans.edu/diary/13735

A great SCAPY shortcut for TCP Fussing
https://isc.sans.edu/diary.html?storyid=14080

Python Shells:
One liners:
http://pauldotcom.com/2011/10/python-one-line-shell-code.html
Put Meterpreter in Python for 100% evasion:
http://pen-testing.sans.org/blog/2011/10/13/tips-for-evading-anti-virus-during-pen-testing

Cool new SQL Injection Tool - It is different!
http://pen-testing.sans.org/blog/2011/10/31/making-blind-sql-injection-more-efficient-new-tool

Volume Shadow Copy, Symbolic Links and directory name craziness
Execute files up to a month after they have been deleted and "cipher /w" wipes them:
http://www.irongeek.com/i.php?page=videos/hack3rcon2/tim-tomes-and-mark-baggett-lurking-in-the-shadows
http://traffic.libsyn.com/pauldotcom/PaulDotCom-265-Part4-MarkTim-ShadowCopy.mp3
Other related stuff:
http://pauldotcom.com/2011/11/safely-dumping-hashes-from-liv.html
http://pauldotcom.com/2010/10/windows-7-symbolic-links-and-h.html
https://isc.sans.edu/diary.html?storyid=12958
https://isc.sans.edu/diary.html?storyid=13000

EAP MD5 Crack - Attack 802.1X
http://pauldotcom.com/2011/04/eap-md5-offline-password-attac.html
http://lanmaster53.com/2011/04/defeating-802-1x-with-marvin/
http://baggett-scripts.googlecode.com/svn/trunk/eapmd5crack.py

Packet Reassembler for a new IDS ANALYST evasion technique
https://isc.sans.edu/diary/IP+Fragmentation+Attacks/
http://baggett-scripts.googlecode.com/svn/trunk/reassembler/

Convert Iphone Backup to Google Maps & Dump other data
http://blogs.sans.org/pen-testing/files/2012/01/Technical-Team_Baggett-Team-255S.pdf
http://baggett-scripts.googlecode.com/svn/trunk/catsqlite3.py
http://baggett-scripts.googlecode.com/svn/trunk/iphone2kml.py




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 …

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.

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 the top.  Its not perfect but th…

Use Python and Scapy to Easily Do Full Duplex Stream Reassembly!

Check out this blog on how to get scapy to do full packet reassembly in just a few lines of Python code.

https://pen-testing.sans.org/blog/2017/10/13/scapy-full-duplex-stream-reassembly


Windows TCPDUMP without installing WINPCAP!!!!!!!!

IMHO, This is a long time coming for Windows. I love this thing. You probably already know about it, but I haven't read much about it anywhere and Its been very useful to me. Its a version of tcpdump for windows that doesn't require I install the Winpcap drivers. I use it along with PSEXEC to start remote sniffing probes on Windows workstations. I'm sure its NOT forensically sound to do this in on a box that may contain evidence because of the swap file, but for information gathering something like this is very useful.

So with this..
http://www.microolap.com/downloads/tcpdump/tcpdump.zip

Something like this

\mytools\psexec.exe \\remotecomputer -c \mytools\tcpdump.exe -i 1 -s0 -w \\remotefileserver\share\capturename.cap

Lets me turn every node on my network into a remote Snort probe, or just capture anamolies!