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.




PCI - The gaping hole in your IDS/IPS

I’ve come to learn PCI requires business leave their network unmonitored and open to attack!!!   Specifically  on page 4 item  #13 of this document.  
https://www.pcisecuritystandards.org/pdfs/pci_scanning_procedures_v1-1.pdf

It reads:
13. Arrangements must be made to configure the intrusion detection  system/intrusion prevention system (IDS/
IPS) to accept the originating IP address of the ASV. If this is not possible, the scan should be originated in a location that prevents IDS/IPS interference.

I understand what the intention of this requirement is.  If your
IPS is blacklisting the scanner IP's then ASVs don't get a full assessment because they are a loud and proud scan rather than a targeted attack.    For example,  Lets say I have 1000 host on my network.   If during the assessment of host 1 of 1000 the IPS blocks the source IP of the scanner, then serious threats will remain undetected on hosts 2-1000 and portions of host 1.   An attacker who is not nearly as noisy as a scanner would not be blocked by the IPS and could exploit those undetected vulnerabilities.    This is a very legitimate problem and the PCI standard needs to be sure that IPS’s do not cause that.  However, blindly accepting the originating IP of the scanner leaves the hosts vulnerable to various attacks.   Attackers can simply reference various public websites to see what IP addresses they need to use to bypass those detective or preventive controls.   For example:

https://www.mcafeesecure.com/help/scanips.jsp

provides attackers with everything they need to launch
UDP based attacks against any site with the “HackerSafe” logo on it.   Those attacks will not be detected by the merchant and will not be blocked even though the IPS could have prevented the attack.   UDP based attacks are now enabled as a result of this requirement.  Various TCP based spoofing attacks may also be possible (such as NMAP IDLE scans).  Again the merchant is now blind to all of these attacks.   IPS/IDS’s are an important of a comprehensive defense strategy.   I am certainly a proponent of eliminating the vulnerabilities on the server and not relying on IPS’s to block the attacks.  However Defense in Depth is a staple of any good security program.

PCI does strongly encourages and in circumstances require the use of a Web Application firewall.   Today the lines between Web App Firewalls and IPS’s is a gray one in many circumstances.   For example, many IPS's such as McAfee IntruShield, TippingPoint and others does not do any IP blocking by default that would produce the undesirable affect I described above.  They do however drop specific attack packets that match a signature in the same way that Web App firewalls do.   IPSes will drop Cross Site Scripting, SQL  and traditional Web App attacks packets in the exact same way that a web app firewall does.   Further more, some web app firewall may do IP list blacklisting and present the undesired scan scenario described above.  For example the product:  http://www.port80software.com/products/serverdefender/artificialintelligence/    Lists the following on its feature list:

  - Block
IP for subsequent HTTP requests

With so much Web App Firewall functionality in boxes that have “
IPS” printed on the Appliance and IP blocking in Web App Firewalls I think the wording on that requirement needs to be addresses.

PCI may say something like "Just exclude the IP of the scanner during the scan and reenable the IPS when the scan isn't running."   The problem with that approach is that the required UDP exhaustive port scans make the scan very slow.   I have personally seen PCI scans for networks with 2000+ hosts take more than a week to complete.  Then add in time to fix any findings and rescan and large organizations end up with SIGNIFICANT windows of exposure.   In my discussions with various PCI scanning vendors I am told that the OVERWHELMING VAST MAJORITY of business simply exclude the IPS from their IDS/IPS and go about their business.   This is very dangerous indeed leaving them completely blind to attackers.

In summary,  I don’t believe that the wording of this requirement accurately reflects the
PCI Council’s intention.   I think that in practice it creates a significant unmonitored exposure for merchants.   I have attempted to contact the PCI counsel and see if they can address the exposure and risk to credit card data they are unintentionally creating with this requirement, but they are not interested in speaking with me.   But there is a beacon of hope.  As I was about to give up I received an email from David Taylor, founder of www.KnowPCI.com.   KnowPCI.com is a great forum to pose PCI questions to knowledgeable PCI professionals and get answers to questions.   Check out the site.  www.knowpci.com

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 t

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:

SRUM DUMP and SRUM DUMP CSV Updated

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.