Thanks to the efforts of Justin Collins (@presidentbeef - Brakeman) and Hal Brodigan (@postmodern_mod3 - Bundler-Audit), Rails developers (and Sinatra) can use these two tools in tandem with Guard to protect their applications while under development. For those who aren't familiar, Guard was designed to run while you are developing, when you save a file it triggers Guard to run whatever tests you've specified in your Guardfile.
The following video depicts this.
Friday, April 12, 2013
Rails - Guard, Brakeman, and Bundler-Audit
Posted by
cktricky
at
10:20 AM
0
comments
Labels: cktricky
Wednesday, April 10, 2013
Bundler-Audit -> Auditing your RubyGems
Ruby applications that utilize a Gemfile/Gemfile.lock, file(s) that contain the list of ruby gems an application should use along with their respective version number, can now be audited to determine if those libraries are vulnerable.
Posted by
cktricky
at
11:39 AM
0
comments
Labels: cktricky
Tuesday, April 9, 2013
Quick way to view ruby gems
This post is a very short and very simple tip for easily opening a ruby gem up for closer inspection.
When reviewing a Rails or Sinatra application (code review), it sometimes becomes necessary to view the libraries (ruby gems) that an application is including and using. Instead of navigating to the ~/.rvm/gems/<version>@<gemset name> directory (or wherever else the gems are stored) and opening them with your text editor of choice, you can instead leverage the power of bundler.
For your *nix based systems that leverage a bashrc, bash_profile, etc.
open your ~/.bash_profile file (or whatever the appropriate bash file is)
add this line export BUNDLER_EDITOR=mate
I chose "mate" because I use TextMate. Otherwise, just link to the appropriate editor executable.
(exit and save bash_profile)
type: source ~/.bash_profile
Then, navigate to an app that contains the Gemfile, and switch to the gemset or ruby version where these gems are contained, and choose a gem that you want to open...
bundle open <gem name>
That's all there is to it.
Ken (@cktricky)
Posted by
cktricky
at
10:31 AM
0
comments
Labels: cktricky
Monday, March 25, 2013
Next Level Testing
We've been having a good time doing intensive, month long or longer APT simulation tests for people, acting like malicious insiders, using hardware implants, 0days, human enabled malware, etc. Lately, however, we've been playing around with a new type of testing to take things to the next level. This testing has two basic components:
- Reverse Engineer Testing
- Network Forensics Testing
The basic idea is to exercise your RE and packet ninjas even harder to make them strong.
On the RE side we create progressively more difficult malware for them to analyze. Here is an example of a ramp up path for this kind of test:
- Basic packed binary
- Challenging packed binary
- Staged unpacker with memory checksums
- Binary with analysis detection
- Virtualization detection & retaliation
- Dynamic analysis tools detection & retaliation
- Debugger detection & behavioral changes
- Multiple and increasingly difficult debugger detection from IsDebuggerPresent() to execution timers
- Strong crypto, slack space and other binary tricks
- Phantom routines & dead ends in the code
- Exploits against analysis tools
We pen test your reverse engineer.
(Or your sandbox appliance if you have decided to go that route instead).
On the Network Forensic side we ramp up the difficulty of our command and control and data ex-filtration techniques in order to exercise and improve your network security staff's capabilities in the following ways:
- Randomized timing & changing beacons
- Out of band network communications
- Protocol misuse & covert channels
- False flag / false signature packets
- Complex sequencing & esoteric packet based OP codes
- Port knocking type attacks
- Encoding & encryption
- Exploits against network analysis tools
This allows your network forensic analysts to hone their skills looking for anomalous traffic and finding the tricky ways real bad guys hide from detection. It also shows you how effective (or ineffective) your network security appliances such as IDS/IPS are.
All of the tricks and techniques we use for these tests are taken from real world experience in analyzing some of the trickiest malware and the most complex network evasion schemes during incident response events. In addition we throw in some of our own developed methods to keep the analysts on their toes.
This type of testing is most effective as a component to a larger APT simulation but can be done stand alone as well.
At this point in 2013 you probably know what machines on your network need to be patched. You have automated vulnerability scans in place and you have verified and validated scan reports using an exploitation framework. Maybe you've taken that additional step of doing APT simulations to understand your exposure to malicious insiders and sophisticated targeted threats like nation states. However, unless you are testing that final line of defense, the analysts, forensic specialists and anomaly tools, you are still falling behind.
V.
Posted by
valsmith
at
7:40 PM
2
comments
Wednesday, March 20, 2013
APT PDFs and metadata extraction
One of the modules in our new Rapid Reverse Engineering class is artifact extraction. For this section of the class the students use a python module we create for doing some artifact/metadata extraction from samples. One of the more interesting pieces of metadata that attackers leave behind is the software that the malicious file was created with. In this case I was looking at some PDFs. I then realized that I extract this information for individual samples, but I have never run a test on a large set of known APT malware to see what comes out. So a quick adventure I set out on and wow was I surprised by the information.
I ended up with the following pie graph
The sample size was roughly 300+ known APT samples that we have. It wasn't our whole sample set of PDF's but for starters was a decent size. List (top 10) looked like this
Acrobat Web Capture 8.0 (15%)
Adobe LiveCycle Designer ES 8.2 (15%)
Acrobat Web Capture 9.0 (8%)
Python PDF Library - http://pybrary.net/pyPdf/ (7%)
Acrobat Distiller 9.0.0 (Windows) (7%)
Acrobat Distiller 6.0.1 (Windows) (7%)
pdfeTeX-1.21a (7%)
Adobe Acrobat 9.2.0 (4%)
Adobe PDF Library 9.0 (4%)
From the defensive position it points out the ability for defense organizations to do some early detection. I doubt that most organizations are actually keeping track or analyzing what types of clean, business case pdfs come through the front doors. What do the normal clean pdf's coming through your front doors actually look like? Are the clean business case PDFs being created by the
"Python PDF Library - http://pybrary.net/pyPdf/" software? This is a piece of software that is no longer maintained. If you have a standard set of pdf's that come through your front doors and they aren't using strange libraries such as pyPDF then it might be time to create a nice little snort signature and alert on it. I wouldn't recommend blocking at that level (unless you are up for it), but alerting on something simple like that can create extremely large dividends for response/defense teams. Imagine telling your CIO/CISO that you detected and re-mediated APT* attack coming through the front door by a simple snort sig.
Acrobat Web Capture 6.0 (wow that is old)
¦ d o P D F V e r 6 . 2 B u i l d 2 8 8 ( W i n d o w s X P x 3 2 ) *Ya that is the way it show's up
PDFlib 7.0.3 (C++/Win32)
At the end of April (25-26th) we are debuting Rapid Reverse Engineering in New York City with Trail Of Bits http://www.trailofbits.com/training/#rapidre. Rapid Reverse Engineering is a class designed for helping students learn how to rapidly assess files for incident response scenarios.
Posted by
gideon
at
9:45 AM
4
comments
Monday, March 4, 2013
Attack Research Training Schedule
We have finalized our training schedule for Attack Research for the year. Below is the schedule for our training's for the rest of the year. We can't promise that more opportunities will pop up but below is a confirmed schedule:
Location: New York City at an Attack Research/Trail of Bits training
June (exact dates TBD)
Course: Rapid Reverse Engineering and Offensive Techniques
Location: London, UK
Course: Debuting - 4 day version of Tactical Exploitation
- 2 day version of Tactical Exploitation.
Location: Blackhat, Las Vegas
We have seen our Tactical Exploitation class fill up quite fast in the recent years so register early!
Course: Offensive Techniques or Rapid Reverse Engineering
Location: Source Seattle
November 4th-6th
Location: Countermeasure
Last year we debuted Offensive Techniques at Countermeasure, and this year we will be adding some new content and delivering that class again. Along with Offensive Techniques we will be teaching our new Rapid Reverse Engineering class. Countermeasure was a fantastic conference and look forward to another round of it.
For more info on each class visit our training page at www.attackresearch.com, or click on the links to register for the class!
Posted by
gideon
at
12:20 PM
0
comments
Thursday, January 3, 2013
Training Opportunities
We are hosting two training's at the Attack Research Headquarters over the next few months. The first training is our Operational Post Exploitation class which will be January 29th-January 30th.
We have just added Offensive Techniques in February for an available training as well. We will be hosting the training February 26th-February 28th. More details can be found at our training website.
We are also looking at doing a round of training in the London area in May of this year. Right now we are trying to gauge the interest in this location. If you are interested in taking either Offensive Techniques or Rapid Reverse Engineering in this are please email training@attackresearch.com so that we can gauge interest.
Happy New Year
Posted by
gideon
at
9:32 AM
1 comments
