Tuesday, April 22, 2014

Below is script that illustrates the use of File::Copy to
copy files to a UNC path on a Windows network.The example code downloads a copy of the hosts file made available by
the Malware Domain List and copies it to the appropriate directory on a Windows
machine in order to prevent the machine from being able to successfully resolve
those malicious sites.

Sunday, January 26, 2014

A Perl script that will download the Malware Domain List
hosts file and compare the domains listed in the file to domains present in the
Chrome History database (an SQLite DB).It
will print out a list of any domains in the History DB that are listed on
the Malware Domain list.Note: the
script assumes that a copy of the History DB is in the same directory as the
script.

#!usr/bin/perl

use
DBI;

use
List::MoreUtils qw(uniq);

use
List::Compare;

use
LWP::Simple;

use
strict;

use
warnings;

my
@MalDomains;

my
@VisitedDomains;

#obtains
a list of malicious domains from a the malware domain list hosts file

Friday, January 24, 2014

Recently, I’ve been doing a bit of scripting for use inside
a Windows environment and as such became somewhat interested in some of the
functionality that is offered up by PowerShell.As a result I began experimenting with calling PowerShell commands from
within a Perl script.Below is a simple
example, that when run with appropriate privileges can take a list of PC names
and clear the security log on each PC.