Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Create Entities:
- WPA2-AP
- WPA-AP
- WEP-AP
- OPEN-AP
- Unknown-AP
- WPA2-AP-WPS
- WPA-AP-WPS
- Path-to-svs-file
- Create transform:
- <TransformSettings enabled="true" disclaimerAccepted="false" showHelp="true">
- <Properties>
- <Property name="transform.local.command" type="string" popup="false">/usr/bin/perl</Property>
- <Property name="transform.local.parameters" type="string" popup="false">listAPs_WPS.pl</Property>
- <Property name="transform.local.working-directory" type="string" popup="false">/usr/share/MaltegoCE/Airgraph-NG/</Property>
- <Property name="transform.local.debug" type="boolean" popup="false">true</Property>
- </Properties>
- </TransformSettings>
- --------------{ listAPs_WPS.pl }------------------------------------
- #!/usr/bin/perl
- ############################################
- # search all APs in airodump CSV file #
- # and search WPS enable among of them #
- # use path without extentions e.g.: #
- # /root/capture-01 to got files: #
- # capture-01.csv and capture-01.cap #
- # #
- # (c) r3dh4t #
- ############################################
- use Text::CSV;
- $path = $ARGV[0];
- $file = "$ARGV[0].csv";
- $file_wps = "$path-wps.csv";
- $csv = Text::CSV->new();
- #use WASH utility from REAVER package. If not find try remove -C key
- system('/usr/local/bin/wash -C -f "'.$path.'.cap" -o "'.$file_wps.'"');
- open (WPS, "<", $file_wps) or die $!;
- @wps_list = <WPS>;
- close WPS;
- open (CSV, "<", $file) or die $!;
- print "<MaltegoMessage>\n<MaltegoTransformResponseMessage>\n<Entities>\n";
- while (<CSV>) {
- if ($csv->parse($_)) {
- my @columns = $csv->fields();
- $bssid = $columns[0];
- $channel = $columns[3];
- $proto = $columns[5];
- $proto =~s/\s//g;
- $auth = $columns[6];
- $chifer = $columns[7];
- $power = $columns[8];
- $essid = $columns[13];
- if ($essid){
- if ($proto ne "Privacy") {
- #print "\n+++$proto+++";
- if (($proto eq "WPA2") or ($proto eq "WPA2WPA")){
- $entity_type="WPA2-AP";
- } else {
- if ($proto eq "WPA") {
- $entity_type="WPA-AP";
- } else {
- if ($proto eq "WEP") {
- $entity_type="WEP-AP";
- } else {
- if ($proto eq "OPN") {
- $entity_type="OPEN-AP";
- } else {
- $entity_type="Unknown-AP";
- }
- }
- }
- }
- #Search active WPS APs from WASH output file
- $wps_search=grep(/^$bssid/,@wps_list);
- if ($wps_search){
- $entity_type="$entity_type-WPS";
- }
- $weight = ($power*-1);
- &print_maltego($entity_type,$bssid,$channel,$proto,$auth,$chifer,$power,$essid,$weight,$file);
- }
- }
- } else {
- my $err = $csv->error_input;
- print "Failed to parse line: $err";
- }
- }
- print "</Entities>\n<UIMessages>\n</UIMessages>\n</MaltegoTransformResponseMessage>\n</MaltegoMessage>\n";
- close CSV;
- sub print_maltego()
- {
- print '<Entity Type="'.$entity_type.'"><Value>'.$essid.'</Value><Weight>'.$weight.'</Weight><AdditionalFields>';
- print "\n";
- print '<Field Name="bssid" DisplayName="BSSID">'.$bssid.'</Field>';
- print "\n";
- print '<Field Name="channel" DisplayName="Channel">'.$channel.'</Field>';
- print "\n";
- print '<Field Name="proto" DisplayName="Encription">'.$proto.'</Field>';
- print "\n";
- print '<Field Name="chifer" DisplayName="Chifer">'.$chifer.'</Field>';
- print "\n";
- print '<Field Name="power" DisplayName="Power">'.$power.'</Field>';
- print "\n";
- print '<Field Name="file" DisplayName="file CSV">'.$file.'</Field>';
- print "\n";
- print "</AdditionalFields></Entity>\n";
- }
Add Comment
Please, Sign In to add comment