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.




Using the free AlienVault.com Nessus feed on your Mac

Tenable has changed their license and you can no longer use their vulnerability feeds for commercial use.   Alienvault.com has a free nessus feed you can subscribe to.  It is available for use here.   You will notice two update programs there.  One for Unix and one for Windows.   What about the MAC?   To subscribe the nessus feeds on your macintosh do this:

1) Download the linux update script.
2) Update it so it works on your MAC as described below.

First, in the "#Plugin dir" section you will need to to change the line that reads:

NVT_DIR="/var/lib/nessus/plugins/"
to 
NVT_DIR="/Library/Nessus/run/lib/nessus/plugins"

3) chmod +x alienvault-feed-sync.sh

If you run the script by typing :

./alienvault-feed-sync.sh  nessus 

you will see an error about not being able to find the command "md5sum".   The nessus feed update did work, but the script was unable to compare the hashes to verify it completed successfully.   That might be good enough for you and you can go about using your updated feeds.   BUT,  I want to see that those hashes match.   Really, it is not buying me much security because I'm downloading the "md5sum" file that I am using for comparison from the same location as the files, but its still a good integrity check.   To fix it, you might waste your time as I did and change "findcmd md5sum" in the update script to "findcmd md5" since MD5 is the name of the MD5SUM utility on OS X.   But if you do you will get the following error:

"Error: md5sums not correct. Your NVT collection might be broken now."

Why?  The version of default version of MD5  that comes with the OS doesn't support the --check (-c) option.    For the file check to work you will want to install the version of md5 that is installed on most linux distributions.  It is called md5sum and it is available for install through fink.   

Happy bug hunting.

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