IsraelTorres

bdienst.sh

May 7th, 2011
388
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. #./bdienst.sh
  3. # Israel Torres
  4. # malware research
  5. # observation analyzed stripped and extrapolated to work via bash for intelligible input
  6. url="http://ludihumor.com/wp-admin/solar-energy&page=7"
  7. log="malware-log.txt"
  8. while [ 1 ]
  9.     do
  10.         logstamp=$(date +%s)
  11.         echo "timestamp:$logstamp">>$log
  12.         curl -s --referer http://www.google.com "$url" >> $log
  13.         echo -e "\n" >>$log
  14.         # update filter inside loop using backslash for readablity
  15.         cat malware-log.txt \
  16.         | tr -d '\n' \
  17.         | sed "s/<\/script>/\\`echo -e '\n\r'`/g" \
  18.         | cut -d '?' -f 1 \
  19.         | sed 's/<script>var url = \"//g' \
  20.         | sed "s/http:/\\`echo -e '\t'`http:/g" \
  21.         | sed 's/\/in.cgi//g' \
  22.         | cut -d ':' -f 2,3 \
  23.         | uniq -f 1
  24.         #
  25.         sleep 900
  26.     done
  27. #output using filters is
  28. # unixtimestampe tab poisoned_url  
  29. # EOF
RAW Paste Data