Thursday, December 8, 2011

Analyzing Flash Files


A friend told me about this, so I thought I'd share....

xxxswf.py is a Python script for carving, scanning, compressing, decompressing and analyzing Flash SWF files. The script can be used on an individual SWF, single SWF or multiple SWFs embedded in a file stream or all files in a directory. The tool could be useful for system admistrators, incident response, exploit analyst, malware analyst or web developers.

http://hooked-on-mnemonics.blogspot.com/2011/12/xxxswfpy.html

Tuesday, August 9, 2011

Australian DSD Strategies to Mitigate Targetted Attacks

The annual Blackhat/Defcon cyber security conferences took place last week in Las Vegas, NV. There were more vendors than ever, however the underlying theme of the conference remained the same...understanding/defending/preventing targetted cyber intrusions (a.k.a. APT).

Vendors certainly have their place when it comes to the cyber war against protecting your information, but it is important to understand that there is no silver bullet. Below you will find a very informative (arguably conclusive) list of mitigations (most of which don't require additional hardware/software) to defend against targeted cyber intrustions.

Australian DSD Strategies to Mitigate Targetted Attacks
 

Wednesday, July 6, 2011

Linux Password Protect Zips


Those of us who work around malware often need to password protect malware specimen within a zip archive in order to avoid accidental infection and/or antivirus quarantine. I can never remember the syntax for doing this from the Linux command line and it always seems hard to find via google, so I thought I would document it here.

To Zip: zip -P <password> -r <output.zip> <input file(s)>

To Unzip: unzip <output.zip>

Wednesday, June 1, 2011

Northrup Grumman...Another one bites the dust!

A Northrop Grumman E-2C Hawkeye 2000 surveillance and reconnaisance plane lands on a carrier.

In a story recently released by Fox (http://www.foxnews.com/scitech/2011/05/31/northrop-grumman-hit-cyber-attack-source-says/) we see that Northrup Grumman was also compromised via remote access. We can chalk this up to yet another compromise as a result of the intrusion at RSA where the secret sauce was stolen. I wonder if any of these companies are going to go after EMC/RSA for damages?

The article is fairly vague (surprise), but it looks as though the "bad guys" were able to get in. That is unless somebody just accidentally tripped over the cable for the remote access network.

Saturday, May 28, 2011

Hackers breached U.S. defense contractors (Reuters)

(Reuters) - "Unknown hackers have broken into the security networks of Lockheed Martin Corp (LMT.N) and several other U.S. military contractors, a source with direct knowledge of the attacks told Reuters. "

"They breached security systems designed to keep out intruders by creating duplicates to "SecurID" electronic keys from EMC Corp's (EMC.N) RSA security division, said the person who was not authorized to publicly discuss the matter." Reuters

Here's another link to a similar story from the Taipei Times


Monday, May 23, 2011

Remove Character From Bash Variable


 Sometimes, it is the little things that take an extra few minutes to find on the Internet that really slow you down...

Remove the first character from a bash variable:
VAR=${VAR#?}

Remove the last character from a bash variable
VAR=${VAR%?}

Friday, May 20, 2011

Rename Perl script on the Mac



I love Linux and BSD. I also love my Mac. I really like the user interface, and the underlying BSD roots. (Insert generic Mac fan-pitch)

There are a few things which drive me NUTS about the BSD underpinnings of the Mac, though. MacPorts is a great step in the direction of bringing better Linux/BSD program onto the Mac platform, but it doesn't always have everything you need (And it's pretty slow). The most recent annoyance is the lack of the 'rename' linux command, my favorite of which enables me to bulk rename files based on a regular expression. Yes, I could hack together an awk or bash script to do this each time, but (like Matt), I like simpler == better.

So, when I ran into this issue yesterday, I decided I had enough. It turns out that the rename linux command that I like (based on regular expressions, not some other more simplistic syntax shipped with Redhat) is just a perl script.

So, I found the script on one of my Ubuntu servers (prename), slapped it into /usr/local/bin, and away I went. Much easier than some other custom compiling Mac solutions.

Wednesday, May 18, 2011

Android and the long-lived authToken



I was very disappointed to hear about Android sending long lived (~2 weeks) auth tokens in the clear for Google services...very similar to the Facebook/Firesheep issue. There are a few writeups, but the research was originally done by Ulm University (http://www.uni-ulm.de/en/in/mi/staff/koenings/catching-authtokens.html).

This specific vulnerability is addressable by server-side changes to enforce SSL when exchanging the tokens. I'm glad to hear that Google is moving forward on fixing this side of things. People are also saying it's only exploitable via WiFi, but I wouldn't be surprised to hear some type of 3G snooping as well.

BUT, this brings up major concerns that the Operating System versions for Android are so fractured, and ultimately are controlled by the wireless providers. Even though the latest version of Android don't exhibit this behavior, the mobile phone companies continue to drag their feet pushing the updates. This is akin to vendors which only support IE6...they drag their feet because they can. I think larger customers need to push back that we need prompt patching (or the ability to self-update!)

Saturday, May 14, 2011

Splunk For Dummies

Splunk can be instrumental when it comes to aggregating and correlating data. However, like any tool there is a learning curve involved. Migrating away from Linux command line tools and learning something new when you're already pressed for time can slow the learning process. I've included a tidbit below that will help you get your data into splunk as quickly as possible.

Use the Sinkhole:
/opt/splunk/var/spool/splunk

Any data you move to this directory will be indexed by splunk and the original log files deleted. No modifying a GUI or adding a listener. Simply getting the data in splunk so that it can be searched quickly. Enjoy!

Tuesday, May 10, 2011

Chrome Falls, Maybe

VUPEN's recent announcement about a possible Chrome flaw has to make everyone say - HEY! Where's the Beef? In a video. Lame. Give us PoC code or keep your mouth shut. I understand security research and selling discoveries. I don't understand selling them and then bragging about your discovery with half-assed details and a video. Sell and shut the hell up to allow your customers to get the full value for their cash. I'd be rather miffed if I were your customer _and had intent_ to use the vulnerability. Responsible disclosure is always an option...

The claim in the advisory:
... we have now uncovered a reliable way to execute arbitrary code on any default installation of Chrome despite its sandbox, ASLR and DEP.
Good find VUPEN! Gratz on taking down Big G's Chrome! Your advisory looks like a Jedi Mindtrick though - "We have the vulnerability you're looking for". Again, I ask you "Where's the Beef, good sirs?" And while you're at it, please explain your intent behind disclosing without Proof of Concept code and lack of vendor contact.

Thursday, May 5, 2011

Interesting Bredo Phish..



Sending MTA: 183.7.110.61, Wed,  4 May 2011 08:31:43 +0000 (UTC)
From: FBI <info87644@fbi.gov> (not real, duuh)
Subject: You visit illegal websites
Body: Sir/Madam,we have logged your IP-address on more than 40 illegal Websites. Important: Please answer our questions!The list of questions are attached. pj  aom  vf
Guess what's attached... Document.zip (9a2bb7c1cfd069e4db5e7d46dadce561) containing document.exe (bd3648a60c4c4760db19bba544c2e8d2)


I found this one interesting because most messages attempting to spread a Bredo variant have been something regarding undeliverable UPS, DHL, or FedEx packages, or your credit card was just billed $700.. Now, you get notified that the FBI wants you to fill out a survey to explain your web browsing habits. Nice change of pace. :)

So sad that this works still.

Tuesday, May 3, 2011

The Cyber Security Conundrum


Ever wonder why cyber security is so hard?
Ever wonder why we deserve more money, resources, etc.?

The graphic above (borrowed) is a simple representation of why defending a network is so much more difficult than penetrating it. Yea I said it, (rebuttals are welcome)! Above we graphically demonstrate the massive landscape within cyber security. The volume of things we support, run, maintain and analyze within a cyber security program on a daily basis is extraordinary. As the capability stack continues to grow (i.e. Data Loss Prevention, Phishing Excercises, <enter new buzzword here>) we must also continue to maintain the cutting edge technology of previous days with a finite set of resources. Meanwhile, an adversary just needs one exploit or an oblivious user to jeopardize the Confidentiality, Availability, or Integrity of the entire operation.        

So when you feel like the chips are stacked against you, they are. So don't dwell and keep fighting!

Monday, May 2, 2011

Blue Coat Partners With FireEye

Last week two of my favorite companies Bluecoat and FireEye announced a partnership. The highlights are below:

"The integration enables malicious domains to be automatically shared from the FireEye MPS to Blue Coat ProxySG appliances, allowing administrators to implement a block/deny policy to stop all attempted connections to such domains and provide logging for customizable reporting specific to the defined categories. Administrators can customize categories and policies to deal separately with zero-day infection URLs and callback URLs. For zero-day, infection URLs, for example, customers can create a policy that refers end users to a coaching page that informs them a drive-by download was blocked. For the callback URL policy, the end user could be alerted that their machine was previously infected and to immediately take remediation steps.  The technical integration works seamlessly and adds significant value to organizations."

This is significant for me as I have done some work in the past at trying to get these two technologies to work together. One such example is a script to scrape certain snort rules (within the FireEye MPS) for domains so that I could feed them to Blue Coat. Use caution with this one as FireEye has some rules for domains that you may not want to block.

I am always in favor of vendors stepping up to create and support a stable solution as opposed to some scripts I hacked up to make my life easier. Hopefully the vendors will do a decent job and not charge an arm and a leg to their customers who already pay top dollar for these technologies!

Sunday, May 1, 2011

A Little About Luck...

Luck is when opportunity meets preparation. - Pete Lopez (professor de Monzy)

Saturday, April 30, 2011

Pay For Secure Coding, Not Lawyers

Is it cheaper to get a lawyer to fix your buggy software than to hire or train your programmers how to handle data safely? Must be, cauz that's what drives business decisions, right?! Money. Apparently this is the case in Germany with the Magix Incident.

Here the researcher appears to have tried responsible disclosure. Notifying the vendor, even working with the vendor. All PoC code and flaw description is given to the vendor then the vendor sues! Wait, WTF!?! Someone is trying to help you fix flaws in your software, then you bend them over?! Someone who was helping you with his time FOR FREE (as in beer), donating time. Someone who went to the vendor with the flaw, not the exploit market, not directly to public disclosure. WTF?!

Filing a lawsuit against a security researcher that has attempted to follow responsible disclosure practices shows the company doesn't really understand the business environment of software. I can't help but think the management conversation that led to the decision went something like this. "Let's throw lawyers at the problem, Jim. The problem isn't ours! These damn haxors breaking our beloved software. Someone should show them a thing or two about business.", "Sure Bob, that sounds great." No conversation about secure coding. No taking responsibility for the issue.

The way I see it, rather than paying full time employees to sit and audit code for a decent salary + benefits, throw a few bucks at the security researchers that spend their own time looking at your code. What's $500, $1000 (Mozilla bug bounty anyone?!) in the big scheme of things? A cheap ass code audit if you ask me! Surely you'll get more press and relationship mileage out of cooperating with researchers rather than bullying them with ridiculous law and people so far from the issue that they can't even begin to understand it.

Friday, April 29, 2011

Small Businesses = Excellent Target

Reading this article describing actual unauthorized bank account transfers to oversees accounts reminds me of the size of the pink elephant in the room. Large organizations can incur the expense of security specific IT staff. Bigger orgs are more likely to also understand the business risk of Incidents. Not so for the little guy.

Tuesday, April 26, 2011

Defending Against The APT

Advanced Persistent Threat

Everybody has heard of the APT, yet very few people actually know what they can do to protect themselves. Below is a list of The Top 5 Things you can do to reduce the success of an APT attack:

1) Analyze Incoming Email:  
 a. Pay extra attention to FREE webmail providers like yahoo, gmail, etc.
 b. Attachments that contain embedded exploits to vulnerable software and/or .exe's w/ a modified icon
 c. Links directly to executables, compressed executables (i.e. .zip containing an exe) and web pages attempting to exploit your browser.

2)  Analyze Outbound Connections:
 a. Many HTTP Get requests for long filenames
 b. Many HTTP Post requests (careful not to trip on all that streaming media traffic)
 c. Anomalies on any other outbound protocol you allow outbound
 
3) Ingress Filter:
 a. Make sure all traffic enters the network through YOUR Mail/DNS servers.
 b. This makes #1 Easier


Monday, April 25, 2011

Quick Virus Total Batch Submission



Every now and then you end up with a boat load of potentially "interesting" executables you've recovered from various suspect systems. Where do you start your analysis? Rule out the known stuff first with this handy script to batch submit hashes to Virus Total.

Saturday, April 23, 2011

Move Over Arobat Reader, Foxit Reader Is Taking Over

Most of the time I'm a go with the flow, best of breed, don't rock the boat kind of guy. However, everyone has their limits and I've recently reached mine with Adobe! I don't hate all Adobe products (like some other large companies ), but there is one that really rubs me the wrong way and that is Adobe Acrobat Reader.

Adobe pretty much invented the pdf so one would think they would be the best suited to provide a reader for their own format. As it turns out, this intuitive sounding argument is false. At least for me and the use cases in the enterprises that I've come across. The list below provides reason why I think most people should abandon Adobe Acrobat Reader and embrace the Foxit Reader, which sucks wayyy less...I promise!

1) The Installer: No, I don't want all of this browser plugin crap, that doesn't work half of the time. I just want the damn installer. What do you mean I have to install all of this browser plugin crap because that is the ONLY way to get your silly software!
2) The Size: This application is HUGE! It the Portable Document Format...so why isn't the viewer very portable? Also, did  you know that there is some other acrobat executable that gets run when you just hover over a pdf?  Hopefully this code has no bugs...or you'll be pwned by simply hovering over a malicious pdf. 
3) The "Features": Nobody uses 90% of the capabilities of their reader. Perhaps they have never heard of the KISS (Keep It Simple Stupid) concept?
4) The Security: Last but certainly not least! Its only April and Adobe has already released 5 security updates this year alone. Most of which were actively being exploited long before Adobe decided to bless us with a patch. Most software is insecure, I get it. But when you produce a product with a ton of unnecessary bloat this increases the security risk unnecessarily as well.

I'm done ranting...(yes, I do feel better now). Thanks for reading. If you have any Reader horror stories or better solutions, please feel free to share...