A Perl script called logHunter.pl

Ok here is a perl script that is pretty much useless in Linux, becuase linux has the grep command, but I’m a geek so I wrote it anyways. Hey, it could be usefull in windows…lol. So if you haven’t figured it out yet, this script will look thru a file for keywords and only print out the lines that contain the keyword. Of course you could also just output the results to a new file.

Linux, Perl Scripts, Tutorials/Whitepapers, Windows Read More

Monitor processes in Linux using Perl script

This is another perl script I wrote to monitor critical processes in Linux and report status to log. This script is alot like the earlier script I wrote to check mount points in that it opens a command and write it to a file in order to use regular expressions to check if something is true or not. Also this script can be edited to monitor any number of process and report it any number of ways including syslog, Nagios, or just system mail.

Linux, Perl Scripts, Tutorials/Whitepapers Read More

Alternate Data Streams… WARNING

I came across this issue today… thankfully my network environement security uses both eTrust and Tripwire, so this should not be a big problem here, but I think it’s should be watched for. Basically, this is a way to hide spyware or incriminating (hacker) tools by casting or forking the file into another file. The original size will show the same and even the actual running process is hidden from process explorers, the only thing that changes is the modification date. Also, this only runs on NTFS and moving the file to another file system will corrupt the hidden file.

Network Security, Tutorials/Whitepapers, Virus Alerts, Windows Read More

Text Formatting Perl Script

Here is a pretty basic Perl script that will take a tab seperated file and format it accoring to the arguments you pass with the command. This script will only work if the file has three fields, but can be edited for more. I am working on a way to unlimit this using arrays, but have not found a working solution yet. Also, this script is protable to windows. Just edit the environment path to reflect where your perl executable is located. Code below:

Linux, Microsoft Office, Perl Scripts, Tutorials/Whitepapers, Windows Read More

Multiple host ping sweep Perl script

I was tasked with verify host connectivity after some server patches were pushed out.  So instead of manually pinging each one, and I already had a text file with all the affected hostnames, I decided to put together a little script that would read from the text file and print out whether the host was up or down. 

I have simplified my original multiple host ping sweep script. All you need for this script to work is a hosts.txt file with a list of host names or IP addresses and of course the script below.

Linux, Network Security, Perl Scripts, Tutorials/Whitepapers, Windows Read More