Ruby not Playing well with Metasploit
A few days late on the metasploit blog post update. A recent Pen test bought about some great headaches for me as I encountered all sorts of issues with the 3.1 framework. According to HD updates to ruby have broken the ability to use short name constants which are littered throughout the framework. Some of the things I experienced were issues with backgrounding sessions, exiting back to meterpreter after executing a cmd shell on a system. 95% of my meterpreter scripts failed with similar errors that are displayed on the metasploit blog post. This resulted in me having to go back to hand jamming quite a few of my normal tasks after obtaining initial access. What made it even more of a pain in the ass was the fact that the backgrounding sessions interfered with my ability to create a route into the private network through the established session. For one reason or another it was a 50% chance I’d lose my sessions if I attempted to background it. In many instances I would lose visualization of what I typed. So every time I tried to background a sessions and start typing I’d get nothing showing up. This created the headache of me having to type very slowly to make sure what I wanted to execute was actually going to the shell. The route issue caused me to have to go back to my main stock pile of exploits for things like PNP, and MS06-040. Uploading the binaries and executing them from within the initial compromised host. It’s sad because I think I’ve been spoiled by metasploit and the meterpreter shell :/
The Pen test still went off well, despite the issues with meterpreter and the framework in general. We also had a very broad scope and a tight time frame. Scope creep is a bitch, watch out for it! The customer tried to switch things up on us in the middle of the pen test but we stood our ground. After all, we only had 50 hours to get everything done and what was being asked was just impossible. All in all it was expected that the perimeter would be clean, quite a few DMZ’s are! We didn’t find any vulnerabilities from the outside but man… They opened up damn near every PDF we sent them, along with quite a few visiting the website we set up that included a nice Malware dropper which downloaded and executed the meterpreter shell in EXE form. The sad part is, during testing almost everything was caught on my “secure” victim machine. The Anti Virus caught the dropper, caught the meterpreter executable. Thanks to MC though with his Ninja type skillz the PDF was pretty much transparent to EVERYTHING! You should have seen it though, after we sent out the spoofed emails shells started flying in. We realized really quick that we needed to change up the payload from a reverse TCP shell to a meterpreter shell due to Policy issues restricting the CMD shell to be spawned. Of course we resent the email saying “The PDF was blank and the website was broken, sorry please open these instead.” BAM! 50 meterpreter shells in the first hour! What’s even worse though, is two day’s after the phishing attempt we still had shells connecting back to us.
Recommendation:
Anti virus and user awareness training is definitely needed!
