Questions about this topic? Sign up to ask in the talk tab.

Kolkata

From NetSec
Revision as of 20:41, 27 April 2012 by User (Talk | contribs)

Jump to: navigation, search

<syntaxhighlight lang="perl">

  1. !/usr/bin/perl
  2. @url http://www.blackhatacademy.org/
  3. @author fxm+hats

use strict; use LWP::Simple; use Getopt::Long; use YAML::XS; use LWP::UserAgent; use HTTP::Request; use HTTP::Response; use Digest::MD5 qw(md5_hex); use Data::Dumper;

my $opts; my %tree; my $sigtree = \%tree; my $sigdir = '/home/fxm/Desktop/Code/appscan/sigs';

my $custom = undef; my $debug = 0;

&check_args; &load_sigs;

my $digestobj = Digest::MD5->new; my $ua = new LWP::UserAgent;

  1. my $content;
  2. $ua->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10");
  3. my $req = new HTTP::Request GET => "$fullurl";
  4. my $res = $ua->request($req);
  5. if ($res->is_error) {
  6. print $res->status_line;
  7. }
  8. if ($res->is_success) {
  9. $content = $res->content;
  10. my $md5 = $digestobj->add("$content");
  11. my $final = $md5->hexdigest;
  12. print "MD5:\t\t$final\n";
  13. print "Version:\t$ver_hash{$final}\n\n";
  14. }


sub load_sigs {

 if (defined $custom && -f "$sigdir/$custom.yml")
 {
   print "Loaded custom profile $custom\n";
   $sigtree->{$custom} = YAML::XS::LoadFile("$sigdir/$custom.yml");
 } else {
   opendir(SIGDIR, "$sigdir") or die $!;
   my @fingerprints = grep {
     /\.yml$/
     && -f "$sigdir/$_"
   } readdir(SIGDIR);
   foreach my $yf (@fingerprints)
   {
     my $yfname = $yf;
     $yfname =~ s/\.yml//;
     $sigtree->{$yfname} = YAML::XS::LoadFile("$sigdir/$yf");
     printf "Loaded '%s' (%s)\n", $sigtree->{$yfname}->{'app_name'}, $yf;
   }
 }
 closedir(SIGDIR);

}

sub check_args {

 $opts = GetOptions(
   "custom=s"	=> \$custom,
   "debug"	=> \$debug
 );

}

print Dumper $sigtree; </syntaxhighlight>

Wordpress

---
1.0.11: 1d28094f16c310591b855982759bc992
1.0.14: 9570ccaab7cdac45e6727740515ce69a
1.0.15: 9570ccaab7cdac45e6727740515ce69a
1.0.4: 1080567bb801a301e3be618805a55125
1.0.6: 1080567bb801a301e3be618805a55125
1.0.8: 222ab5eb9cb8136619053a4f8358b9a5
1.5.1: b891f61dc9b85a9193592c9d13e9c97a
1.5.10: 326412fc179cb787500adffada69c4e7
1.5.11: 326412fc179cb787500adffada69c4e7
1.5.14: 326412fc179cb787500adffada69c4e7
1.5.15: 326412fc179cb787500adffada69c4e7
1.5.4: 326412fc179cb787500adffada69c4e7
1.5.5: 326412fc179cb787500adffada69c4e7
1.5.8: 326412fc179cb787500adffada69c4e7
1.5.9: 326412fc179cb787500adffada69c4e7
app_name: Joomla
file_name: /includes/js/joomla.javascript.js

Joomla

---
1.0.11: 1d28094f16c310591b855982759bc992
1.0.14: 9570ccaab7cdac45e6727740515ce69a
1.0.15: 9570ccaab7cdac45e6727740515ce69a
1.0.4: 1080567bb801a301e3be618805a55125
1.0.6: 1080567bb801a301e3be618805a55125
1.0.8: 222ab5eb9cb8136619053a4f8358b9a5
1.5.1: b891f61dc9b85a9193592c9d13e9c97a
1.5.10: 326412fc179cb787500adffada69c4e7
1.5.11: 326412fc179cb787500adffada69c4e7
1.5.14: 326412fc179cb787500adffada69c4e7
1.5.15: 326412fc179cb787500adffada69c4e7
1.5.4: 326412fc179cb787500adffada69c4e7
1.5.5: 326412fc179cb787500adffada69c4e7
1.5.8: 326412fc179cb787500adffada69c4e7
1.5.9: 326412fc179cb787500adffada69c4e7
app_name: Joomla
file_name: /includes/js/joomla.javascript.js

MediaWiki

---
1.10.0: 31ef23cbcdf689bd68d957ae0d8b8a19 
1.10.2: 31ef23cbcdf689bd68d957ae0d8b8a19
1.10.3: 31ef23cbcdf689bd68d957ae0d8b8a19
1.13.0: 6781b4412fbc451b792c4cdc88b0a1fa
1.13.5: 6781b4412fbc451b792c4cdc88b0a1fa
1.14.0: 846eec3b6696476a79548b82bf48e492
1.14.1: 846eec3b6696476a79548b82bf48e492
1.15.1: b6301262680144f1709d995a6c097db8
1.5.2: 2fb3891102f9fe2d37a4bdb47b8f42de
1.5.8: 2fb3891102f9fe2d37a4bdb47b8f42de
1.8.2: 5d52c4473189e70e4878a5a7b38e3a82
1.9.2: 24b79f325b32661fd24c93d7d2e8ccef
1.9.4: 24b79f325b32661fd24c93d7d2e8ccef
app_name: MediaWiki
file_name: /skins/simple/main.css