Courses:

Offensive Countermeasures: The Art Of Active Defense: SANSFIRE June 15-16, Blackhat USA July 27-28 & 29-30


Defensive Countermeasures: Foundations for Becoming A Devious Defender: Blackhat USA July 27-28 & 29-30


Conferences:

Check out the entire PaulDotCom crew at BsidesRI June 14-15th!



Subscribe:

Blog:
Videos:
Podcast:


PaulDotCom EspaƱol


Hack Naked TV


Hack Naked At Night


Stogie Geeks


Sponsored By:


www.coresecurity.com


www.tenablesecurity.com


www.sans.org



Follow Us On:


twitter.com/pauldotcom

PaulDotCom YouTube Channel


June 2009 Archives

How to create a persistent install for BackTrack 4 Pre-release (via the Informer) on an SD card (or USB thumb drive)

I was excited to be able to use the new pre-release version of Backtrack 4, as I love to use it on my Asus EEE 1000HA. When it was released I was eager to make it work, booting off of an SD card in the EEE so that I would not have to mess with additional USB thumb drives (they stick out of the laptop, and the SD card is internal). During the process, I was happy to discover that both the internal wireless and bluetooth adapters are now supported. The wireless card even appears to support injection!

backtrack-4-beta.png

I'll be tailoring this to use on an SD card, but the steps are exactly the same as a USB thumb drive.

Thank you to the Offensive Security folks who put together LINK this video, as this guide is based on it exactly. I wanted to put it down in text as it isn't always that easy to print out video, or view when you don't have internet access (such as on a plane...), where I initially wanted to accomplish this.

Additionally, this is a signifiant departure from the previous methods for creating a persistent install. This will not work for the BT4 beta versions.

Let's get started.

Two things that you will need:

4GB_SD_CARD.jpg

  • The Backtrack 4 Pre-release ISO, booted on a machine with an SD card reader
  • An SD Card 4 gigs or larger (or USB thumb drive 4 gigs or larger) that we can completely wipe. This is a destructive method, as we need to create a few partitions.

After Booting in to BT4, and insert your SD card. Issue the command "dmesg". At the very bottom of the output, we should be able to identify the plug in of our SD card, and the device to which it was assigned. Mine happened to be /dev/sdc, so that's how the rest of the instructions will progress. Replace /dev/sdc with your assignment from the output of dmesg.

Now, as root (the default user for BT4), we need to fdisk our SD Card. BE CAREFUL, as selecting the wrong drive here can potentially hose your system. That's why I like doing this from within a VM. Start fdisk with the appropriate drive:

# fdisk /dev/sdc

Within the fdisk utility, print the existing partition table with "p". If there are existing partitions, delete them with "d", and select the appropriate partition, and repeat until they are all gone. You can reverify by reprinting the partition table with "p".

We now need to create two new partitions with in fdisk. For the first partition enter "n" for a new partition, "p" for primary partiton, "1" for first. Use a size of "+1500M" for 1.5 Gig. For the second partition, "n" for a new partition, "p" for primary partition, 2 for second. You can accept the default for size, or at a minimum of 1.5 Gig with "+1500M"

Activate (set as bootable) the first partition with "a", and select partition 1. Assign a type to partition 1 by issuing "t", select partition 1, and use the code of "b" to identify it as W95 FAT32

Verify the new partition table by issuing a "p" with in fdisk. If all looks OK, write it to disk (and exit) with "w"

Ok, you can breathe again. The dangerous part is done.

In order to use our new partitions, we need to format them. The first partition (/dev/sdc1) will be vfat, and the second (/dev/sdc2) will be ext3. We can format them with the following commands:

# mkfs.vfat -F 32 -n BT4 /dev/sdc1
# mkfs.ext3 -b 4096 -L casper-rw /dev/sdc2

The mkfs.ext3 command will take some time, so be patient.

Before we can begin copying over the files, we need to mount the forst partition after creating a directory to mount it to. We accomplish that with:

# mkdir /mnt/sdc1
# mount /dev/sdc1 /mnt/sdc1

Copy away! We're going to copy the contents of our current, booted BT4 enviroment to the new partition on the SD card:

# rsync -avh /media/cdrom/ /mnt/sdc1

Again, this one will take some time, so be patient. Also, note that the extra "/" at the end of /media/cdrom/ is important. If you use tab completion to add that directory to the command, it will not be included and the rsync copy will fail.

Let's install the grub bootloader so that the thumbdrive will actually boot, and know where to fund all of the appropriate files:

# grub-install --no-floppy --root-directory=/mnt/sdc1 /dev/sdc

Editing the startup items will make our experience that much better. You can use your favorite text editor here (vi for example), but nano is included on the BT 4 install, so feel free to use that:

# nano /mnt/sdc1/boot/grub/menu.lst 

At the top of the file, change the default boot option to 5 to automatically use the persistent install at boot time if no user interaction is provided. the line should now read as:

default 5

Also, edit the block towards the end of the file with the title of "Start Persistent Live CD". You'll want the kernel line to be updated, and at the at the end add 0x315. This sets the default video mode for boot, and was the highest resolution available on my EEE. For normal installations (such as on non-netbooks), use 0x317. The updated line should be as follows:
the_force.gif

/boot/vmlinuz BOOT=casper boot=casper persistent rw quiet vga=0x315 

Exit nano and save the file to the default location (with ctrl x).

We are almost done! Just unmount the SD card ad reboot:

# umount /mnt/sdc1
# init 6

Enjoy your persistent Backtrack 4 installation on an SD card!

- Larry "haxorthematrix" Pesce

Special guest Valsmith comes to talk to us about Phishing, post exploitation, recon and al sorts of other evil goodies!

DontPanic_1024.jpg

Full Show Notes

Direct Audio Download

Hosts: Larry "HaxorTheMatrix" Pesce, Paul "PaulDotCom" Asadoorian, John Strand, Mick Douglas, Carlos "Dark0perator" Perez

Audio Feeds:

An all out, no holds barred PCI Round Table Featuring all types of industry luminaries, including Anton Chauvakin, Jericho and others. The gloves come off and the debate gets bloody!

ninjamobile.jpg

Direct Audio Download

Hosts: Paul "PaulDotCom" Asadoorian, Carlos "Dark0perator" Perez

Audio Feeds:

I See Your Dirty Laundry And Its Okay

|

Some people get really worried if a complete stranger sees their dirty laundry. In order to hide their "secrets" they will air their dirty laundy in a dark basement. The problem is the laundry is still dirty, kids are sleeping in dirty sheets, all because you are ashamed.

laundry.jpg

An excuse some will use not to have a penetration test is, "Our data is too sensitive for you to ever have access to, so you just need to do an audit". Even better, "Our systems cannot go down, so just do a portscan". Wow, this is just an amazing security fail! If you don't trust an outsider, and lets face it, some organizations just can't, then develop an internal pen test team and program. This is not an excuse not to have a penetration test, its a reason to create your own team! In addition to your own team, consider expanding the scope for external testers. This is something that you've heard so many professional penetration testers saying, and its time to start listening and sleeping in clean sheets.

Paul Asadoorian
PaulDotCom Enterprises

The stream should be active around 18:45 EDT (6:45 PM Eastern), Thursday, June 25th. We should begin recording the live show around 19:00 EDT. Please keep in mind that these times are estimates.

Our Technical Segment this episode is by Larry 'roll your p0wn' Pesce. Larry will discuss BackTrack3/4 on an SD Card.

Our guest this Episode is Val Smith, who will discuss SpearPhishing Automation and MetaSploit Phishing Frameworks.

spear_monkey.jpeg

Don't forget to join in on the IRC channel during the stream - we can take live comments and discussion from the channel! Find us on IRC at irc.freenode.net #pauldotcom.

When active, the live stream(s) can be found at:

Ustream: PaulDotCom UStream Channel

Icecast: PaulDotCom Radio

Please join us, enjoy the show live, and thanks for listening!

- Larry, Paul, Mick, John, & Carlos

We are very excited to release two interviews with some of the leaders in the field when it comes to web application testing and vulnerabilities.

w3af.jpg

The first interview is with Andres Riancho, lead developer of w3af, one of the most comprehensive open-source web application testing frameworks. We talk with Andres about breaking up with girlfriends, the differences between w3af and commercial web
application testing packages and much more!

wafw00f.png

The second interview is with Sandro Gauci, founder of Enable Security and the co-author of WafW00f, a suite of tools to test web application firewalls. There is some serious security FAIL going on here, and we get all of the details.

Direct Audio Download

Hosts: Larry "HaxorTheMatrix" Pesce, Paul "PaulDotCom" Asadoorian, Carlos "dark0perator" Perez

Audio Feeds:

Tonight there may be brief outages of the PaulDotCom web site (and the items hosted on it -- the blogs, the wiki, the forums, etc) while we do some housekeeping. These outages and other noticeable things will happen around 10 PM Eastern and should be over by 11 PM Eastern. So if you have some strange error or a timeout -- no worries, it's all according to plan.

Thanks for understanding!

The PDC web goon squad
- Mick & Byte_Bucket

EMAIL.jpg

The June Late-Breaking Computer Attack Vectors webcast this month will be held on:

Wednesday, June 24, 2009 2:00 pm EDT (GMT -04:00, New York)

Register Here For This Webcast

This month Dark0perator will discuss some of the latest attacks, including:

  • Mobile Device Threats
  • Client Side Attacks and Defense
  • Major Virtualization Gotchas
  • P2P Data Leakage

This webcast will run about one hour.

- Carlos "Dak0perator" Perez and The PaulDotCom Crew

PaulDotCom Security Weekly - Episode 156 - June 18, 2009

|

Special guest speaker Rob talking about MiTM and virtualization, live from SANSFIRE!

larryhappycannon.png

Full Show Notes

Direct Audio Download

Hosts: Larry "HaxorTheMatrix" Pesce, Paul "PaulDotCom" Asadoorian, John Strand, Mick Douglas

Audio Feeds:

Podcast Tonight! - Episode 156

|

The stream should be active around 18:45 EDT (6:45 PM Eastern), Thursday, June 18th. We should begin recording the live show around 19:00 EDT. Please keep in mind that these times are estimates.

We have a Guest Technical Segment this episode by Rob VandenBrink. Rob will present "Man in the Middle Attacks in a Virtual World'.

Don't forget to join in on the IRC channel during the stream - we can take live comments and discussion from the channel! Find us on IRC at irc.freenode.net #pauldotcom.

When active, the live stream(s) can be found at:

Ustream: PaulDotCom UStream Channel

Icecast: PaulDotCom Radio

Please join us, enjoy the show live, and thanks for listening!

- Paul, Larry, Mick, John, & Carlos

Common Sense: Your Greatest Weapon

|

Taking Time To Go Fishing (Not Phishing)

I was enjoying a relaxing day of fishing last weekend, a low-tech hobby that I have enjoyed since I was probably 5 years old. I had all of the essential components that make for a successful day of fishing: good weather, cigars, beer, and beef jerky. I set out to fish some of my favorite spots on the pond, using my tried and true artificial lures that are known to work on this pond in these conditions (I will spare you all the details). I noticed that there was one other fishing party on the pond who had navigated their small boat over to the dam and begun fishing, albeit with live bait. If there is one thing I believe in as a fisherman, it is that using live bait is cheating. I mean sure its fun every once and a while, and certainly useful for keeping the kids occupied while fishing as you tend to catch a lot more fish. In any case, I was fishing within site of the folks on the dam who were not catching any fish and caught two small fish right in front of them. On the second fish I noticed something interesting sticking out of the fish's mouth, a set of nasty little pinchers! The fish must have been hungry because not only did it consume a crawfish, but also my imitation worm. I decided to change spots to just across the pond where there was a prime spot with some logs sticking out of the water. I changed baits to an imitation crawfish (digging through the tackle box to find one) and on my first cast as soon as the lure hit the water my line started pulling. I reached forward and then quickly leaned back to set the hook. To my pleasant surprise it was a 3 pound large mouth bass, the largest I had caught all season! Needless to say this had to frustrate the folks fishing off the dam with live bait. Am I a master fisherman headed for the professional fishing circuit? Not even close, but it speaks to common sense that we all need to have.

yellingatbass.png
Yes, I frequently yell at the fish; they like it though.

Adapting To The Changing Landscape

How does this relate to our field? It doesn't really, i just wanted to share my fishing story with you. Just kidding (sorta)! We certainly need to exercise common sense in the security field, and there are far too many areas where we are using tried and true methods of defense (or offense) and its just not working as well as it used to. The big question is, why? The landscape and environment is constantly changing, and we need to observe what's in our environment if we are to be successful hackers, defenders, and fisherman. For example, consider the following areas:

  • Web application assessments - Some customers may give push back about this one, but we need to continue to put this on the forefront of our penetration testing agendas. Web application testing, by real human beings, should be a part of every external penetration test. Attackers are exploiting our web applications, stealing our data, and using it to trick users, and we should too!
  • Wireless "security" - Ah yes, of course, WPA2 came out and we're all safe, right? This is a prime example of how the crawfish is hanging out of the fish's mouth, but we're still fishing with worms. Attackers are exploiting wireless to gain access to your networks. Here's another secret: the protections you've put in place to stop them aren't working! WEP, WPA/WPA2, and most IDA/IPS devices do little to stop attackers, yet we see so many organizations doing little about it except recognizing that it's broken and going off to work on the firewall upgrade project.
  • Collecting logs and not checking them - This is the equivalent of catching the fish, but never even looking in it's mouth to see what its eating. Some organizations have spent a lot of money on solutions that collect, aggregate, and correlate their logs. Sure,it takes some work to configure and use these solutions, but how many are being used to prop open the server room door? (thanks to Carole Fennelly for that story!)
  • "Client security" - Its pretty clear that attackers are going after the client. Everything from phishing, to xss, to straight up exploiting client software (like adobe products), the client is the low hanging fruit in your network and has been for some time. Guess what? This isn't changing! As penetration testers one theme that I gathered from many people and presentations at the penetration testing summit was we are beefing up post-exploitation, in a big way. At the center of this effort is our very own Carlos "darkoperator" Perez who is writing and maintaining several Metaspoloit Meterpreter scripts to automate post-exploitation. During our own penetration testing exercises once we've gained access to a client, we can use that as a jumping off point to gain access to other systems. I don't mean jumping off exclusively from the network necessarily, but maybe that client has some piece of information that leads us to your data, like a browser history, stored password, re-used password, or spreadsheet of passwords. Don't even get me started on anti-virus software and how its supposed to help...
  • bass-holding.png

    Conclusion

    Organizations need to take a long hard look at their overall defensive strategies on a regular basis. Adjust your strategies and be adaptive. I think the hardest part is keeping management up to speed. It seems like just when we convince them that one technology is vital to your survival from attacks, something new or different crops up and changes the landscape. Then, well, lather, rinse, repeat (we started with firewalls, to Anti-Virus, to IDS/IPS). You need to identify security strategies that stand the test of time and put effort into them, such as:

  • Well-formed security policies
  • Procedures that enforce the policies
  • Vulnerability management programs
  • System Hardening

  • The above items are like a net - they will always catch some fish regardless of the conditions.

    Paul Asadoorian
    PaulDotCom Enterprises

    PaulDotCom Security Weekly - Episode 155 - June 11, 2009

    |

    Special guest Peter Kleissner, WMIC command line fun, and more!

    3426887143_e648d3792b.jpg

    Full Show Notes

    Direct Audio Download

    Hosts: Larry "HaxorTheMatrix" Pesce, Paul "PaulDotCom" Asadoorian, John Strand, Mick Douglas

    Audio Feeds:

    Episode 155 Announcement - Getting stoned with Peter Kleissner

    |

    The stream should be active around 18:45 EDT (6:45 PM Eastern), Thursday, June 11th. We should begin recording the live show around 19:00 EDT. Please keep in mind that these times are estimates.

    Our guest this episode is Ikarus Security Software's Peter Kleissner. Peter will discuss his research regarding his "Stoned Vienna" project for Windows Bootkits, which will be presented at Black Hat this summer.

    stoned.jpg

    Dark0perator will discuss running wmic in a shell.

    Don't forget to join in on the IRC channel during the stream - we can take live comments and discussion from the channel! Find us on IRC at irc.freenode.net #pauldotcom.

    When active, the live stream(s) can be found at:

    Ustream: PaulDotCom UStream Channel

    Icecast: PaulDotCom Radio

    Please join us, and thanks for listening!

    - Carlos, Larry, Mick, John, & Paul

    PaulDotCom Security Weekly - Episode 154 - June 1, 2009

    |

    Live from Las Vegas, the entire crew gets together for the first time live on stage!

    paris-tv.jpg

    Note: We did NOT figure out a way to get free access to "adult" programming at the hotel. Although we heard some reports that it was as easy going into the setup menu, add/delete channels, then using the regular channel up/down buttons. So we heard...

    Full Show Notes

    Direct Audio Download

    Hosts: Larry "HaxorTheMatrix" Pesce, Paul "PaulDotCom" Asadoorian, John Strand, Mick Douglas

    Audio Feeds:

    Information Disclosure via P2P Networking

    |

    Peer-To-Peer Networking Information Gathering

    Users of P2P networks will sometimes inadvertently disclose too much information via the files they are sharing from their computer. With the potentially large amount of personal data one can gather, all manner of fraud and identity theft is much easier to accomplish.

    P2P Research & Results

    At the PenTest Summit '09 in Las Vegas, Larry Pesce and Mick Douglas revealed their findings based on reconnaissance of the Gnutella P2P network. This reconnaissance was inspired by the breach of top secret details pertaining to the Joint Strike Fighter Aircraft. This breach allegedly happened via a P2P client installed on a system with this highly sensitive information.

    Harkening back to the now defunct seewhatyoushare.com, the duo attempted to see what sort of information can be gathered via Gnutella. The results were shocking and rather sobering.

    In this first round of research, using readily available software, they focused on the acquisition of personal information one could use to perpetrate fraud. They were able to acquire high resolution images of social security cards, passports, visitation visas, tax returns, retirement planning forms, and drivers licenses. In one instance, they were able to uncover personal data on an former Iraqi national who fled to the US fearing retribution for themselves and their family for assisting the US lead coalition forces.

    usa-passport.jpg

    Based off these findings, they are strongly suggesting that users think twice before installing and using P2P software of any sort. Additionally, network and systems administrators should be reminded to check for the presence of P2P systems which violate company policies. If you must use P2P software, please be extremely cautious about the data you share with others.

    You can download the slides from out presentations section and listen to the audio recording on PaulDotCom Security Weekly Episode 154 where is was the feature technical segment. Those who wish to learn more about this research are encouraged to contact Larry and Mick at the following email address: psw /at/ pauldotcom.com.

    At least for just a second or two.

    There is a problem that I have been fighting with. Lately many security testers are becoming like the TSA... Trained to look for very specific things.

    For example, TSA agents appear to be focused on looking for things like scissors, containers with the ability to hold more then 3 to 3.4 ounces of fluid. Rather then looking for threats we are focusing our TSA to look for specific things.

    And that is the problem with many penetration tests today, they are looking for specific things. Many of us are reducing our craft to the search for XSS, XSRF and SQLi vulnerabilities (just to name a few). However, I would say that a test that looks for only those types of vulnerabilities is sub-par at best.

    Here is why. We need to be looking at how the application and the network functions. We need to understand how it is transferring data from the back end to the web front-end. We need to try to understand how the data is being segmented and protected. All of this requires us to try and understand how the application works. Trying to understand how something worked used to be the goal and definition of hacking.

    Do you see the difference in perspective? If you are hunting for missing patches and other vulnerabilities you will find them, but you are missing out on the bigger (and probably more important) picture.

    This goal with looking for specific vulnerabilities is weakening our profession in two ways. First, it is locking us into very small and well defined roles. Unfortunately, this type of mindset is driving many of the audit standards that help us get work. Audit standard X says we should look for Y vulnerability, so that is what we look for. Second, and somewhat related, there are a number of outstanding tools that are automating that process. If at any point in your career the opportunity exists to replace you with a tool your employer/customer will do it.

    If we continue to allow this to happen the modern penetration tester will quickly become a thing of the past. We will have been replaced by a number of tools that look for the same defined sets of vulnerabilities.

    The reason I am writing this is the past couple of tests I have been on the tools have turned up squat. In-fact a couple of the customers use the exact same tools I use on a regular basis. However, I have been able to find fairly major holes in their applications or network architectures without tools. I just start messing around with different applicants and accounts. To be honest, this approach is where I started. I strongly believe that this is where a good number of you started as well. We probably do our best work this way.

    Automation and tools are great. I love all of the wonderful tools I have on my computers. But they are not sufficient to do a penetration test. If they are, we are all in big trouble. Run the tools, automate and print reports.

    However, when the tools are done running. It is time to get back to basics. Consider a new definition of "Hack Naked", put all of your tools away and just use what you have at your disposal. A browser, a OS and a couple of test accounts are all you need.


    -strandjs