I couldn't find a tool in BackTrack 4 that allowed me to lookup OUIs (Organizationally Unique Identifier), so I decided to write one myself. Of course it could just be me and that I overlooked a tool already present in BackTrack to do this, in that case, please react on this post telling which tool.
The tool I wrote is a small Perl script that uses the OUI list of aircrack-ng located in /usr/local/etc/aircrack-ng/airodump-ng-oui.txt, the code of the tool is listed below together with some example outputs.
I have no idea if anyone else thinks this is useful, but I decided to post it here in case anyone can use it.
Code:#!/usr/bin/perl # MAC address OUI checker # Thijs (Thice) Bosschert # http://www.thice.nl # v0.1 24-06-2010 # Print header print "\n MAC address OUI checker v0.1\n". " by Thijs (Thice) Bosschert\n\n"; # Check if argument has been given if (!$ARGV[0]) { &error; } # Removing seperators from MAC address and uppercase chars $ARGV[0] =~ s/[:|\s|-]//g; $ARGV[0] =~ y/a-z/A-Z/; # Get OUI from MAC if ($ARGV[0] =~ /^([0-9a-f]{6})/i) { $OUI = $1; print " Checking OUI: ".$OUI."\n"; } else { &error; } # Open OUI file from aircrack-ng open(FILE,"/usr/local/etc/aircrack-ng/airodump-ng-oui.txt"); while (<FILE>) { ($checkoui,$company) = split(/\(hex\)/,$_); $checkoui =~ s/[-|\s]//g; # Check if OUI can be found in the list if ($OUI eq $checkoui) { $company =~ s/\t//g; # Output found OUI print " Found OUI: ".$OUI." - ".$company."\n\n"; exit; } } close(FILE); # Show if OUI was not found print " Could not find OUI: ".$OUI."\n\n"; # Error messages sub error { print " Error: No MAC address or OUI specified or could not recognize it.\n". " Usage: perl OUI_lookup.pl <MAC/OUI>\n". " MAC can be submitted as:\n". " 001122334455\n". " 00:11:22:33:44:55\n". " 00-11-22-33-44-55\n". " OUI can be submitted as:\n". " 001122\n". " 00:11:22\n". " 00-11-22\n\n"; exit; }
Output:
Code:root@bt:~/WiFi# perl OUI_lookup.pl test MAC address OUI checker v0.1 by Thijs (Thice) Bosschert Error: No MAC address or OUI specified or could not recognize it. Usage: perl OUI_lookup.pl <MAC/OUI> MAC can be submitted as: 001122334455 00:11:22:33:44:55 00-11-22-33-44-55 OUI can be submitted as: 001122 00:11:22 00-11-22 root@bt:~/WiFi# perl OUI_lookup.pl 00:11:22 MAC address OUI checker v0.1 by Thijs (Thice) Bosschert Checking OUI: 001122 Found OUI: 001122 - CIMSYS Inc root@bt:~/WiFi# perl OUI_lookup.pl 001122334455 MAC address OUI checker v0.1 by Thijs (Thice) Bosschert Checking OUI: 001122 Found OUI: 001122 - CIMSYS Inc root@bt:~/WiFi# perl OUI_lookup.pl FF:FF:FF MAC address OUI checker v0.1 by Thijs (Thice) Bosschert Checking OUI: FFFFFF Could not find OUI: FFFFFF


