Friday
Dec232011

Getting Monitor Mode to work for the Alfa AWUS036H

If you’ve done much work with BackTrack and wireless penetration testing you’re likely using (or at least have heard of) the Alfa AWUS036H . If you haven’t, it is simply a USB-connected wireless adapter that supports long range, various external antennas, has built-in driver support in BackTrack, and supports the all-important (for this type of work) monitor mode.

After doing a bit of reading, and preparing my lab equipment, I fired up BackTrack, attempted to put the card into monitor mode and… nothing. The following is a listing of the steps I took and what I did to get it working. At this point I should also note that I’m doing this work on an HP EliteBook 2760p which has its own in-built wireless adapter.

Start the wireless adapter by issuing ifconfig wlan1 up (my in-built adapter was wlan0). Running ifconfig confirmed that my adapter was seen by the operating system
ifconfig01

Then I attempted to list the available interfaces for monitoring using the aircrack-ng toolsairmon01

and it would just hang here for as long as I wanted to wait.

I spent a good bit of time poking around and trying to ascertain what was/wasn’t working and assumed that maybe it was a driver issue. I ran lshw –c network to get a list of my network devices and the drivers that they were using.
lshw01

From this, I could see that both devices were loaded and appeared to be running the correct drivers. On a whim, I decided to eliminate extra variables and disable the in-built wireless card by issuing modprobe –r iwlagn (the driver for the built-in card).

I then went back to see if airmon-ng would see my Alfa card, which it did:airmon02
Encouraged by this, I attempted to put it in monitor mode (airmon-ng start wlan1) which also succeeded:
airmon03

At this point, running ifconfig showed both the wireless card and the monitor-mode device.
ifconfig02

And running WireShark or other tools were now able to see the device and capture packets.

Wednesday
Nov302011

Ramblings on a Private Cloud (part 1 of ?)

As many of you are aware, a few months ago I changed jobs (more like positions) and with that change has come a shift in the focus of much of my work. I’m spending less time in the abstract (i.e. “how could we solve problem X" in the cloud”) and working more in the concrete (“we have agency Y that has problem X that needs to be deployed in the cloud yesterday… what do you think?”). One unfortunate (at least in my way of thinking) is that many of these projects have legislative requirements that prohibit the use of public cloud platforms (at least currently). While I’m always looking for ways to avoid building individual, private “Cirrus1” clouds, and I remain hopeful that the day will come when we all can leave the infrastructure build-outs to someone else, the reality is that in today’s world there is some data that simply cannot live outside of an organization’s boundaries – leaving us to look at “private cloud” approaches.

Overview

We have been experimenting with a few different approaches for some of the projects I’ve been working on and are learning a number of interesting things. I want to be quick to say that I don’t think we’ve “arrived” by any stretch of the imagination and our work (and this space in general) is changing/evolving rapidly. Our initial requirements included using free/OSS solutions wherever possible and to, as much as possible, avoid vendor lock-in (always great in theory, frequently falls apart in application). The hardware used for this exercise includes 45 physical nodes spread over two racks with a total of 1160 cores, 3.8 TB of RAM, 200 TB (RAW) of local node storage and 288 TB (RAW) of iSCSI-connected storage. Our plan is to provide 8 VLANS across the environment (Management, Dev, Test, Prod + corresponding disk-traffic networks for each). The physical nodes/nics would all default to the management network and all of the actual compute resources (VMs used by researchers) would live in one of the other three zones (Dev/Test/Prod). For reasons that I won’t get to in this post, we standardized on CentOS for the primary OS and Xen as the target hypervisor. While some of the uses of the platform include data serving (i.e. web sites, data services, etc.), most of the workloads will tend to be heavy data analytics. The above scenario is complicated by the fact that the entire environment needed to be air-gapped (i.e. not connected to the Internet or other networks in any way).

Open Stack

While we have a good bit of experience using Eucalyptus on the Ubuntu stack, our initial plan was to go with the current wisdom of the crowds and deploy OpenStack as our cloud orchestration layer. The intent was to buy in fully and deploy their storage, image, and compute services. Unfortunately, while there are some very interesting things happening in this realm, we didn’t find this toolset to be at the level we needed it to be given our platform selections. After a few weeks of trying to get this working, we bailed due to simply needing to get something working2. We are hopeful that this situation will evolve in the future and we will reconsider down the road, but for the present we had to scrap it and move on.

Refactoring / Current Approach

Having burned a bit of our grace period, we were faced with the need to get something running fast and spent a weekend digging through our options. Where we ended up is using the free XenServer (via Citrix Systems) as the host OS in combination with XenCenter for managing the nodes. This – while not a cloud or cloud orchestration layer – allowed us to quickly meet some of our sponsor’s needs while buying some time to fill in the gaps. Our team is currently evaluating CloudStack as the cloud/orchestration layer to sit on top of XenServer and be the researcher-facing interface to the platform. Our hope is that as the story evolves (Citrix, XenServer, XenCenter, CloudStack, OpenStack, etc) that the deployment of future platforms will become easier and the “best” approach will become clearer.

main-search-menu

XenCenter management console. Image credit Citrix Systems (http://community.citrix.com/display/xs/XenCenter)

 

 

Notes
1. I spent a good bit of time looking on the web for the official name of the tiniest cloud but didn’t come up with anything better than “Cirrus” which is defined as a “thin, wispy cloud.” Not exactly what I was looking for, but I’ll use it for now.

2. Our issues included (among other things) Python version conflicts between what OpenStack needed and the version of Centos (5.6) we were running, the lack of a good Web UI/self-service portal, getting the VLANS talking properly between hosts, vhosts, storage, etc., and a number of smaller miscellaneous items.

Friday
Nov042011

Windows 7, Windows 8, and Linux

This post may not be of interest to everyone, but I finally got my laptop configured the way I want it and thought I’d document what I did in case anyone else finds themselves in a similar position. It took me 4 or 5 full install/repeat processes to get this right (don’t ask…) so this description is where I ended up.

Let’s start by discussing some of my requirements:

  1. It needs to run Windows 7. The software we use to support our secure email platform is only available on Windows or Mac, and I can’t meet my other requirements on a Mac.
  2. It needs to run Linux (Scientific Linux is the distro I’m using).
  3. It needs to run Windows 8: This will be for dev/testing and not my primary OS
  4. The Windows 7 partition must be encrypted using BitLocker
  5. The Linux partition must be encrypted
  6. I should be able to easily update Windows 8 without overly affecting the other platforms
  7. Performance should be as good as possible – I don’t want to do this all in VMWare from within a main host OS.
  8. While not directly related, the system should be easily bootable from external media (i.e. usb stick) to temporarily run network utilities or other tools (another strike against a Mac)

EliteBookThe laptop I’m using is an HP EliteBook 2760p. I selected this unit as I wanted to be able to do some touch & tablet development and it works as a solid convertible as well as having a decent touch screen. The machine comes with a modest 4GB of RAM (I might upgrade this) and a 300GB hard drive.

I started by performing a normal Windows 7 installation. During the phase where you select a disk, created three equally-sized partitions and then chose the first one for the installation. Windows split the first partition giving me a small boot partition (~100 MB) and then the remaining as my “C” drive. I continued through the install, applied drivers, patched it, etc. and everything was running fine. Note that I did *not* run the BitLocker configuration at this time. 

scientificlinuxNext, I installed Linux. I learned from earlier tests, that I didn’t want to install GRUB to my Master Boot Record (MBR) as that tends to mess up your ability to use BitLocker. Instead, I inserted a memory card (SD card actually), and created a 200 MB /boot partition on it (EXT4) and selected it as the location for the GRUB installation. I then created a EXT4 partition for the / mount point that used the third partition on the main disk and was encrypted. This lets me then end up with the option of controlling whether or not I boot into Linux or not by simply inserting the memory card or not – actually quite handy for my use case. The SD card is a good option on this machine because it sits in such a way that, when inserted, is barely noticeable and can be left inserted for weeks at a time without getting caught on anything.

windows8Windows 8 was the next install, but I decided to install it a bit differently in order to possibly give me greater flexibility in the long run. Rather than installing directly onto my “middle” partition, I booted into Windows 7, formatted the partition as NTFS, and created a VHD file (expandable). Then following the instructions here and here, I mounted the VHD during installation and installed Windows 8 to that (virtual) volume.

While I’m glad to have the opportunity to play with Windows 8, I don’t want it to be my default, so I changed the bootloader to use Windows 7 as the default (unless, of course, the SD card is inserted which will preempt the Windows boot process and take me directly to Linux.

Finally, I switched back to Windows 7 and ran the BitLocker tools to encrypt that partition.

Finally, I’m done with my laptop and my configuration is complete. The following is the disk/partition configuration on my machine. In this diagram, Disk 1 is the SD card I’m using to control my Linux installation.

DiskPartitions

Thursday
Oct202011

Windows Azure Development Cookbook

For the last week or so, I’ve been reading the Windows Azure Development Cookbook written by a fellow Azure MVP, Neil Mackenzie. I was actually rather pleased when Packt asked if I would be willing to review the book as I’d been meaning to pick up a copy and read through it but hadn’t yet.


I should admit that I didn’t pay much attention to the front matter or explanation of the book and just dove right in. I mention this only because it was a bit jolting due to the fact that (as could easily be gleaned from the title) this is a cookbook. This means that there is not a lot of un-necessary ensemble, but rather a collection of highly focused technical nuggets. While this structure became obvious rather quickly, I decided to continue on and read it straight through just to see what I learned.

I appreciated the fact that the book was devoid of a large section of text dedicated to the now-worn-out question of “what is cloud computing”. Nor was there any prologue describing Windows Azure to be found. Instead, the assumption (I presume) is that if you’ve picked up the book, you likely know the answer to both of those questions (within reason) and simply need help getting past some of nuances of the platform. If this describes you, this book is for you.

Light on fluff, heavy on details, this is a solid book that deals with a number of real-world issues using the Azure platform. This book works great as a reference tool: have a problem, look it up in the index or table of contents, read the recipe, put it back on the shelf.

One of the things that impressed me about the book was Neil’s work to point the reader to external resources. There were a number of places where there is something along the lines of “for a more detailed explanation of topic X, visit person Y’s website at http://….” [and, in case you are wondering, this comment was not influenced by Neil’s excellent external references on blob storage interactions… at least not much] Further, I thought that the pointing of the reader to external tools and libraries that were not necessarily required to solve the stated problem but add significant value to the actual solution was great (such as the library for handling connection failures when working with SQL Azure and AppFabric). It is attention to detail such as this that gives the reader confidence that the author wasn’t just pounding out tasks to meet a deadline but rather was sharing solutions that he had used to solve real-world problems.

Taking a more critical view of the book, I’d mention just a few things. The first is that there are a number of key points that begin with “Note:” or something similar that have key tips that are very important to the success of the recipe however (at least in the eBook version I have) they are easily lost in the rest of the text. This is likely due to the format/structure of the book and the intention is for you to read one recipe end-to-end and be done rather than reading start to finish as I did, but I would encourage the reader to be sure to read the entire recipe text and not just copy/paste the code. Neil often uses the code to teach concepts and if you just copy the code you will miss this instruction.

My second criticism is that there are a number of places in the text where the author says something along the lines of “xyz is related to this. See the Using XYZ recipe for details”. While not possible in the print copy, it would have been great in the eBook version for these to be hyperlinks to the referenced section

Being that it is a first edition, there are also a few places where there are minor errors such as task numbers not lining up exactly with the numbers used in the related “how it works” section, but in such cases it was rather easy to intuit what was being referred to and didn’t detract from the book.

All told, it is a good book and I’d quickly recommend it as a reference tool for Azure developers.

In the interest of full disclosure, I was sent a copy of the book and asked to read it and post a review.

Monday
Oct032011

Different, yet the Same

While some of you are aware, to others it may come as somewhat of a surprise that about a week ago I ended my tenure at Planet Technologies after nearly 11.5 years. As I shared with some of the Planet folks in an email, my experience at Planet was great, and I am leaving with fond memories of my time there and the people I have been privileged to work with.

I started there as a "systems engineer" racking/stacking boxes in a colocation center. Since then, I've had the privilege of working on a wide spectrum of projects, covering an equally broad range of technologies, and a fairly wide customer set. I've worked on both small teams and larger teams. I've been part of the management team, and later returned to the technical team (a better fit, I might add). I've traveled the globe, and met/worked with folks in a number of different cultures. I'm proud to have been part of that organization - to see it grow into what is now a world-renowned team deploying technical solutions for their customers and doing a great job at it.

Many of you know I've been working (on Planet's behalf) at the Oak Ridge National Laboratory for a little over 4 years now and I have been given the opportunity to join the research organization in a full time capacity. While not an easy decision, I'm excited about the new opportunities and work that lies ahead.

Officially, I'm going to be part of the Computational Intelligence and Machine Learning team, which is in the Computational Data Analytics group within the Computational Sciences and Engineering Directorate - trust me, it sounds stuffier than it actually is. On a daily basis, I'll be working with a number of researchers to flesh-out ideas and prototypes of their research projects and to facilitate a marriage between the new technologies that are being developed and the state-of-the-art commercial software tools. I'll be bringing to bear the work I've been involved over the past few years using technical computing in the cloud, big data analytics, GPGPU's, and cyber security research. I expect to continue to be involved in community events and am looking forward to continuing to collaborate with many of you on various initiatives.

Monday
Sep052011

Slides from DevLink 2011

I had the privilege of speaking at DevLink 2011 a few weeks ago in Downtown Chattanooga, TN. I have been a bit OBE (overcome by events) since I left the conference and have been unable to post my slides until now. I hope to get the videos and other materials up in the coming week or so. If you came to one of these sessions – thanks – the attendance at both was great and I appreciated the questions from the audience.

 

Source code for GPGPU Talk

 

Source code for AWS Guest Book Demo

Source code for Azure Guest Book Demo

Thursday
Jun092011

Using Nevron Controls in Azure

I’ve been playing around with the Nevron Controls for an Azure application I’m building (hopefully more on that soon) and I’ve been fighting with a simple problem that I’m posting here for my own remembrance and hopefully to help a few others.

The problem has been, that the Nevron controls worked fine when I was testing the web app directly, but would cause the dev fabric to blow up if I tried to run it there. I even tried to simply deploy it to Azure assuming that possibly it was a “feature” of the dev fabric – no dice.

Well, today I had some time to dig to the bottom of it and found that it was a simple problem with the way the http handlers were registered. By default, I had the handlers registered like this:

<system.web>
    <httpHandlers>
        <add verb="*" path="NevronDiagram.axd" type="Nevron.Diagram.WebForm.NDiagramImageResourceHandler" validate="false"/>
        <add verb="GET,HEAD" path="NevronScriptManager.axd" type="Nevron.UI.WebForm.Controls.NevronScriptManager" validate="false"/>
    </httpHandlers>
</system.web>

 

However, as Shan points out in this post: http://social.msdn.microsoft.com/Forums/en/windowsazure/thread/0103ca2d-e952-4c28-8733-47630535c05c, you need to use the newer IIS 7 integrated pipeline. A closer look at the official Nevron samples, shows that they accounted for this and I simply missed it. The setup should be something like this:

 

<system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <handlers>
        <add name="NevronDiagram" preCondition="integratedMode" verb="*" path="NevronDiagram.axd" type="Nevron.Diagram.WebForm.NDiagramImageResourceHandler"/>
        <add name="NevronScriptManager" preCondition="integratedMode" verb="*" path="NevronScriptManager.axd" type="Nevron.UI.WebForm.Controls.NevronScriptManager"/>
    </handlers>
</system.webServer>

 

Notice in particular that not only is the structure a little different, the declarations are under the system.webServer node rather than the system.web node.

Tuesday
Jun072011

How many people does it take to stop diabetes?

As many of you know, last year I participated in the 100 mile Knoxville Tour de Cure ride for the American Diabetes Association. Through the generous support of many of you, we were able to raise nearly $1500 in honor of my mother-in-law, Ann Black. I and my extended family were and are grateful for your support.

This year, I'm joined in the ride by my sister in law (Michelle Adams) and my father in law (Gary Black) in the 25 mile ride celebrating Ann's life. I've been terribly far behind in sending out notices and raising money, and realized this morning that the ride is *this Saturday* which means I have quite a bit of work to do. The point of this email is to see if any of you would be willing to contribute a little to the effort using the links below. If so, we certainly appreciate it and if not, we definitely understand. Thanks again!

Join our Tour de Cure Friends & Family Team! With your support, there's hope! Diabetes can take an enormous emotional and physical toll on people with diabetes and their families. You can help us stop diabetes by joining our Friends & Family Team and raising funds to help the American Diabetes Association provide community-based education programs, protect the rights of people with diabetes and fund critical research for a cure.

Please contact me at  for more information or visit our Team Web page using the link below. Thank you in advance for any help and support you can provide.

Together we can stop diabetes. One mile at a time.

Monday
Jun062011

A Comparison of AWS and Azure

This past weekend at CodeStock, I gave a double-length session that was a side-by-side comparison of Amazon Web Services and Microsoft Windows Azure. The objective was to introduce the products, walk through the similarities and differences, and have a discussion around where the different offerings fit various needs better than the other (or not). 

The sessions were fairly well attended and we had some good conversations. The slides from both sessions are provided below and, if you attended, I’d appreciate it if you’d also take a minute to rate the sessions (button below) and provide feedback as to how they might be improved for the next time.

 

At the end of the second session, we walked through some code that demonstrated a guestbook on both the Amazon and Azure platforms. The source code bundles are available here:

Monday
Jun062011

Introduction to GPGPU Programming with CUDA

[Updated 6/7/2011 with embedded video]

This past weekend I had the honor of giving a talk at CodeStock 2011 here in Knoxville. This was the third year I’ve participated in this conference and I really enjoy it. I decided to “step out” a bit and do a talk that was a bit outside of my norm and tackle a topic of interest to me – GPU computing. The talk seemed to go OK, and there was some good conversation in the room. The slides are provided below and, if you attended, I’d appreciate it if you’d take a moment to rate the talk (button below) and provide feedback on how it might be improved for the next time. I’ve also included a rough video of the session at the bottom for those who are interested.