Skip navigation.

How can I download malware samples from this site automatically?


Hello everyone,

I am a computer science Ph.D. student from FIU in U.S. and my research area is system security. I need a large number of malware samples(about 3000) for Windows. I want to know is it posible for me to download malware samples from this site automatically(e.g., using a batch script)?


Here is a bash script I

Here is a bash script I whipped up to download executables on an hourly basis from Clean MX's mailing list. This places all samples in a folder I created in /usr/share/malware

day=`date +%Y%m%d`

url=`echo "wget -qO -$day/thread.html |\
awk '/\[Virus/'|tail -n 1|sed 's:\": :g' |\
awk '{print \"$day/\"$3}'"|sh`

filename=`wget -qO -$day/thread.html |\
awk '/\[Virus/'|tail -n 1|sed 's:": :g' |awk '{print $3}'`

links -dump $url$filename | awk '/Up/'|grep "TR\|exe" | awk '{print $2,$8,$10,$11,$12"\n"}' > $rootdir/$filename

dirname=`wget -qO -$day/thread.html |\
awk '/\[Virus/'|tail -n 1|sed 's:": :g' |awk '{print $3}'|sed 's:.html::g'`

rm -rf $rootdir/$dirname
mkdir $rootdir/$dirname

cd $rootdir

grep "exe$" $filename |awk '{print "wget \""$5"\""}' | sh 
ls *.exe | xargs md5 >> checksums
mv *.exe $dirname

rm -r $rootdir/*exe*
mv checksums $rootdir/$dirname
mv $filename $rootdir/$dirname

Not able to get it to work

I am not very good at linux, but I am interested in Malware Analysis. I tried this script.
Copied it to text editor. Saved it as
chmod 700 and tried to run it. line 11: /usr/share/malware/: Is a directory
URL expected after -dump

Edit: Figured out the prob. Timezone. Its working great.. thanks :-)