@i

I hear and I forget. I see and I remember. I do and I understand. — Chinese Proverb


Leave a comment

Download Youtube videos

This is not a new topic. But I have recently been looking for a simpler way to download Youtube videos I have bookmarked over the past (and currently growing rapidly). There are very useful tools already created including many many plugins, etc. I also came across mps-youtube and youtube-dl.

It is surprising how easy it is to write your own script using many opensource libraries already available. mps-youtube is based on Pafy. So I wrote my own python script to download the best quality videos from a list of youtube urls in a plain text file.

PyYoutubeDL code is available on github (https://github.com/ai8rahim/PyYoutubeDL).

 

Thaana Unicode Sheet


2 Comments

Dhivehi ASCII to Dhivehi Unicode

Thaana Unicode Sheet

Thaana Unicode Sheet

Now a days Dhivehi ASCII is almost unheard of as Unicode has been widely adopted for quite sometime, especially for content published on the Internet. However, there is still the case of legacy support and the mountains of content created by Accent Express, Recorder, and not to forget the repetitive pressing of the Left-Arrow key. Those were the good times when typing Dhivehi was an art and only mastered by an elite :).

So recently one old document came back to haunt us in a project that I was collaborating with a close friend of mine. I couldn’t bear to watch my friend re-type hundreds of lines all over again in Unicode. So I created a simple python script to convert the text file to its Unicode equivalent. The input has to be a text file, so the focus is only to convert the text, and not to create a fully word processed document.

The code is available on GitHub.


Leave a comment

Dual Boot and Virtualize same partition on Mac

I recently installed Linux Mint on my old MacBook and set it up to dual boot. I needed this for some tools that I was developing for my research. However all my documents were still on the Mac installation and going back and forth on the dual boot would be counter productive hence with some google magic, found out a guide by Whitson Gordon on how to run the dual boot installation on a virtual machine. He suggested using Parallels or VMWare Fusion (not free) for Mac, however I made some changes and used VirtualBox (free) instead. This is how:

  1. Firstly you would need the dual boot installation. There are several guides out there, I used the rEFIt method.
  2. Create the Virtual Machine (vmdk) file. I created this in a separate folder called “vmstuff” in my home directory.
    • You’d first need to get the id of the physical partition Linux is installed on. Run “diskutil list” without the quotes. It would be something like “disk0s4“.
    • Run the following command to create the vmdk (in my case mint.vmdk) file using the partition id found in the previous step. Please note “~” refers to your home directory in both Mac and Linux.
    • sudo VBoxManage internalcommands createrawvmdk -filename ~/vmstuff/mint.vmdk -rawdisk /dev/disk0s4
  3. Create the GRUB iso file.
    • You have to copy the required GRUB files in to a specific directory structure. So open the terminal and create a directory called “iso”, then another directory called “boot” inside “iso”, then another directory called “grub” inside “boot”. So you’d have ~/iso/boot/iso as the directory structure.
    • Now run the following two commands.
    • cp /usr/lib/grub/i386-pc/* ~/iso/boot/grub
    • cp /boot/grub/grub.cfg ~/iso/boot/grub
    • Customize the Grub menu by editing the grub.cfg file you copied. It’s your preference. Personally I don’t see any reason why you would even need a Grub menu for the VirtualMachine. Changing this file will not effect the original Grub menu that you see when you dual boot.
    • Now after editing the menu to your preference, create the iso file.
    • grub-mkrescue -o boot.iso ~/iso/
    • If you get an error saying “xorriso: not found“, then do an apt-get and install “xorriso“.
    • You would end up with an iso file called “boot.iso“, which you must copy back to the Mac installation. You can either mount the linux partition from Mac, or just use a flash drive to copy it back. If you chose to mount the Linux partition from Mac, make sure you unmount it before proceeding with step 4.
  4. Start the new virtual machine in VirtualBox.
    • Start VirtualBox, you would need sudo/root level to do the next steps.
    • Create a new virtual machine, choose the desired RAM, BUT choose to use an “Existing Virtual Hard Drive File”, and choose the vmdk file that you created in step 1, and press create.
    • In the storage settings, add the boot.iso file created in step 3 to the “Controller:IDE”.
    • Start the virtual machine and hopefully it would work.

For more details it would be worth having a look at the original article I used as my guide.

 


1 Comment

What is your learning style?

Recently I have been to a staff development workshop and one of the sessions was about how students learn. This was important for me from a teacher’s point of view as well as a student’s.

The trainer introduced a simple tool that can be used to classify a person to the preferred learning style that suited best based on a series of questions and preferences. What I found most interesting was how accurate it was when I did it for my self.

I was in the blue category. This meant that my strengths were in concepts, theory and reflection. I would prefer to:-

  • learn by thinking through experience, judging the accuracy of the encounter and examining details and specifics
  • take time to reflect and ponder on the experiences
  • excel in traditional lecture-style environments
  • in conflict situations dissect the problem – determine facts, presenting them systematically in a conclusion.

I would NOT prefer:-

  • information that is out of sequence
  • pass/fail grading rather than scores
  • group grades
  • teachers who do not prevent cheating

The full list and the assessment tool can be downloaded from the following links (full credit goes to Centre for Learning and Development, ECU). What is your learning style? While it may not be completely accurate for everyone, it definitely gives a few thoughts to ponder.

Learner Style (PDF)

Learning Style Tool (PDF)


2 Comments

Cherished Mother

Cherished Mother

Every day since I was born,
My mother cared for me.
Now that’s a lot of caring,
As anyone can see.

Please, Lord, protect my mother,
And keep her safe from harm,
For she is a cherished person,
With great wisdom, love and charm.

Lord, it’s my mother’s birthday
So please, help her to see
How much she means to us,
Her loving family.

By Karl Fuchs

May Allah, the Lord of worlds bestow His forgiveness and blessing on you, and fill your life with happiness.

Happy Birthday Mom

Image Source: Courtesy of Nimmy’s Experiment with Blogging


4 Comments

Parallel programming with MPI for beginners

I’ve recently started reading about parallel programming, which I found to be fascinating and extremely useful if you are into computation intensive projects. I am starting work on a project that deals with processing millions of images from the Internet and checking if there are any stego content hidden in it.

There have been similar attempts made in the past (e.g. work done by Neils Provos and Peter Honeyman).

This project is just a precursor to the lager work that I’m doing for my research, and also as an excuse to learn more about parallel computing. More details about the project will be posted as it develops…

The following two part video lectures are really good and to the point and covers all the ground work needed to get a good picture of what MPI programming is.


Leave a comment

Play to feed the hungry

Play the following game to feed the hungry around the world. www.freerice.com in association with World Food Programme donates 10 grains of rice for every correct answer. The games are for everyone and you also have the option to select a subject of your liking, which includes English, Math, Chemistry, etc.

Play Freerice and feed the hungry

Have a go, its kind of addictive 😛


10 Comments

Hiding Secrets

1  Background

A German poet called Johann Wolfgang Von Goethe once said, “Whoever wishes to keep a secret must hide the fact that he possesses one”. This somehow captures the essence of this article in its fullest. Please carry on reading and you will see what I mean.

It is undeniable that the ability to maintain secrecy has been a consequence of human intelligence throughout the ages. And it will continue to be used for applications and reasons that are manifold.

This science of hiding secrets is called Steganography (stego) and today we are dealing with electronic steganography where we use images, audio and video files [10]. A variety of methods have been used in the past; such as using invisible ink or masking the secret text inside some inconspicuous text [8]. The ancient Greeks used to send secret messages by tattooing the secret message on the shaved head of the messenger. And once the hair grew back, then would send the messenger to the destination and he would have to get a shave again to reveal the secret message. Besides covert communication, stego is also used to protect intellectual property by watermarking the media using digital fingerprints [11].

Steganography has also been showcased in the movies. One example is Tony Scott’s Enemy of the State, which mainly revolves around video surveillance and spying by the US government.

In most instances, one would resort to Cryptography to ensure secrecy of confidential information, whether for communication or storage. And there are a number of useful and very reliable tools/techniques available even to the general public. However ulterior motives have encouraged people to seek alternative approaches and stego has been gaining attention recently.

According to [6], the U.S. government has raised concerns under the suspicion that terrorist organisation using websites and newsgroups to send stego-secret messages. There has also been a reported case of corporate espionage where an employee leaked confidential documents to rival company by hiding it in music and picture files [7]. And more recently, the FBI arrested 10 Russian spies [1] in the US, who used a commercially available stego tool to hide secret messages in images available on websites [3]. This is enough evidence that steganography is being for practical purposes, and is far more superior than cryptography in concealing the secret. Because cryptography/encryption simply makes the secret unreadable, but stego hides the secret and has to be first detected in the first place to retrieve the message [10], thus enforcing what Goethe said. So far, this has been all talk, so lets demystify stego and have a look at what goes on under the hood.

2  Technical Perspective of Image-Stego

There are several techniques used in image-stego; such as using the Least Significant Bits (LSB) of the image, manipulation of image and compressions algorithms, and modifications of image properties such as its luminance [4].

Since LSB is one of most commonly used technique, this will be looked at in more in-depth. Since computers only understand binary data (i.e. 1s and 0s), bitwise operators are used to manipulate the LSB [6]. e.g. in the binary value 10010101, the LSB would be the right most bit. Hence this would be changed resulting in 10010100. This simply results as ordinary noise in the images, which is visually impossible to detect by the naked eye.

The following image by [2] illustrates LSB very nicely. All images have been taken from the his website. Starting from the left, the first image on (a) is the original image, the second image show the LSB enhanced, the third image (c) shows the original image after applying steganography to hide 5KB of random data, and lastly the fourth image (d) shows the LSB of steg-image. The enhanced LSB simply shows the last bit out of the eight bits (each colour pixel has eight bits per colour channel RGB) used to represent the image data, and the first seven bits are eliminated.

Figure 1: (a) Original Image (b) LSB enhanced (c)Original Image with hidden message (d) LSB with hidden message

Figure 1: (a) Original Image (b) LSB enhanced (c)Original Image with hidden message (d) LSB with hidden message

As it can be seen, there isn’t any visual differences between (a) and (c). However, once we compare (b) and (d), i.e. the LSB, it is easy to detect that something foreign has been embedded in the original image. This example shows a very simple stego-technique to hide the secret. However, there are more sophisticated stego-tools that can be very difficult or impossible to detect.

3  Stego-tools

There are several setgo-tools available. Some commercial and several for free. The following table lists some tools available.

Tool Image Format Platform Source
Steghide JPEG, BMP Windows, Linux http://steghide.sourceforge.net
Outguess JPEG, PNM Windows, Linux http://www.outguess.org
Digital Invisible Ink PNG, BMP Windows, Linux, Mac http://diit.sourceforge.net

While this is not an exhaustive list, there are several more on the Internet which can be easily revealed by a simple Google search.

4  Detection and Challenges

Security is now paramount in any facet of life and we are living in an age where people are more sensitive and effected by security. Thus there are several security implications due to the growing trend of using stego for covert communication.

Detecting stego, also called Steganalysis, is quite a challenge and while there has been more interest among the research community recently, not much advancements have been made. It has been even a greater challenge for forensic investigators while analysing electronic evidence. This because most of the existing techniques or forensic tools predominantly rely on known stego-signatures (fingerprint left by the stego-tool) or knowledge of the stego-system (i.e. knowing which tools were used or possessing the original cover images, etc.) [9,5]. Thus if the user used a new stego-too/technique which the existing tools does not recognize, then it would not be able to make a successful detection. Much like an anti-virus program not being able to detect a virus without the specific virus definition.

5  Conclusion

Steganography is definitely a very practical and reliable way of ensuring privacy and security of confidential information. And to raise the bar even further, one could encrypt the information before being hidden away in the media of choice.

Several reported cases and also supposed cases are proof that it is already being used and driven by various motives.

References

[1]
CBSNews.Fbi: 10 russian spies arrested in u.s., 2010.

[2]
Guillermito.Steganography: A few tools to discover hidden data, 2004.

[3]
Kelly Jackson Higgins.Busted alleged russian spies used steganography to concealcommunications, 2010.

[4]
N.F. Johnson and S. Jajodia.Steganalysis: The investigation of hidden information.pages 113-116. IEEE, 1998.

[5]
G.C. Kessler.An overview of steganography for the computer forensics examiner.Forensic science communications, 6(3):1-27, 2004.

[6]
R. Krenn.Steganography and steganalysis.Retrieved September, 8:2007, 2004.

[7]
S.P. Phadnis.Data leak: Cyber sherlocks outwit hackers, 2007.

[8]
J. Pieprzyk, T. Hardjono, and J. Seberry.Fundamentals of computer security.Springer Verlag, 2003.

[9]
N. Provos and P. Honeyman.Detecting steganographic content on the internet.Ann Arbor, 1001:48103-4943, 2001.

[10]
B. Schneier.Secrets and lies: digital security in a networked world.Wiley, 2000.

[11]
J. Silman.Steganography and steganalysis: an overview, 2001.

File translated from LATEX by TTH, version 4.03.


1 Comment

Fundamentals

by Manuel Blum (Bruce Nelson Professor of Computer Science Carnegie Mellon University Professor)

05-JUN-96

Bird must soar. Skunk must stink.
Cat must prowl. Man must think.

What sets man apart from beast is his engine of
thought. His mind. His
BRAIN
makes him unique
and gives him his greatest pleasure.

But fundamental as is thought for human beings,
there is stuff more basic still that underlies and
DRIVES
not only man
but all great beasts,

And that is nature’s call to each of us… to be special.
To be distinguished in some way. To be
UNIQUE.
To BE something, to DO something, BETTER than everyone else.

Like the leather nosed chimpanzee,
dragging noisy cans and branches,
frightening peers into submission,

One does not have to be brilliant, a genius, to be special.
To do something better than anyone/everyone else. To be
UNMATCHED,
One has only to choose an END
any END
that MATTERS
that INSPIRES
YOU
And then DO IT.

source (http://www.cs.cmu.edu/~mblum/research/pdf/grad.html)


1 Comment

Selamat Hari Raya Eid ul-Fitr, Maaf Zahir dan Batin to all Muslims

A happy Eid ul-Fitr to family, friends and the rest of the world and forgive my physical and emotional wrongdoings. May Allah bestow his infinite mercy and blessings on you.

Eid prayer in Badhshahi Mosque in Lahore, Pakistan

While we celebrate and eat delicious food on this day, let us not forget about those who are not so fortunate. Alhamdhulillah for everything I have and everything I am to receive.

A women attending to her malnourished child outside a camp in Somalia (August 28, 2011)