Sunday, June 2, 2013

Setting up flash in Kali

Ok, I recently installed Kali, great stuff, however on a recent pentest I found I needed flash and did not have ready access to a windows machine. Remembering what a pain it was back in the day to get flash to work on Backtrack I was a little afraid to start down this path. Surprisingly it was a lot better and a lot easier than I expected.

Step 1.
Go fetch yourself the flash install.

Go to http://get.adobe.com/flashplayer/ and select the ".tar.gz for other Linux" option in the drop down menu.

You should end up with a file called "install_flash_player_11_linux.x86_64.tar.gz" (or which ever version is popular at the time you are reading this)

Step 2.
Unpack it.

I have personally been moving it to the / directory but it seems to work no matter where you extract it. Once you are ready run this command:

tar -xzvf install_flash_player_11_linux.x86_64.tar.gz

You will see it unpack a bunch of files into a /usr folder and one file outside of that folder.

Step 3.
Moving the libflashplayer.so file

You need to place the libflashplayer.so into the plugins directory for Firefox Iceweasel. To do this run the following command:

cp libflashplayer.so /usr/lib/mozilla/plugins/

Step 4.
Confirm the install.

The quickest way I find is to just go to youtube.com. It will either warn you that Flash is not installed or will start its fancy flash banner to greet you with the latest and greatest videos of the interwebs.


Thats it. Quick simple and easy..... however it got me thinking, Adobe updates this thing like every other day, and I tend to forget how to do stupid tasks like this quickly so I wrote a quick script that does all this for you and will work for the updates too.

Now keep in mind this is just a quick script, no error checking, no gaurantess, no nothing. It is very simple and I commented it to help the k!ddi3z understand what is going on. Run at your own risk.



---------- Script exists below this line -------------
#!/bin/bash

#NS21's flash updater v1.1
#3 Jun 2013


#make sure no other copies fo installer exist
rm ns21-flash.tar.gz

#change to root dir
cd /

#Find if x32 or x64
arch=`uname -a | awk -F\  '{print $8}'`

#DL right file
if [ "$(arch)" == 'i686' ]; then
    wget -O ns21-flash.tar.gz http://fpdownload.macromedia.com/get/flashplayer/current/licensing/linux/install_flash_player_11_linux.i386.tar.gz

elif [ "$(arch)" == 'x86_64' ]; then
    wget -O ns21-flash.tar.gz http://fpdownload.macromedia.com/get/flashplayer/current/licensing/linux/install_flash_player_11_linux.x86_64.tar.gz

else
    echo "Cannot determine architecture"
fi

#unpack it
tar -xzvf ns21-flash.tar.gz

#move the .so file to the mozilla plugins dir
mv libflashplayer.so /usr/lib/mozilla/plugins/

#clean up
rm ns21-flash.tar.gz

#clear screen
clear

#notify of completion
echo "All done!"
---------- Script exists above this line -------------

This should work with the current flash version (11) and hopefully needs only minor obvious tweaks in the future to keep working.

Right now I keep this file on my desktop and that reminds me enough to run it periodically, I suppose I could make a cron job but I am being lazy right now. :-)

EDIT 3 Jun 2013: I updated the script to work for both x32 and x64 bit versions.






No comments:

Post a Comment