Security-as-a-Service paper presentation

It was great to be a part of the conference Cutting Edge 2012 from Symantec Corporation, Chennai on 16, 17th feb. To gear up the event we conducted a treasure hunt contest and the response was huge than my expectation. I was happy to create the portal. Then I was part of the Norton Android lab opening ceremony. Our VP appreciated my app. To say more on it, I presented a paper on “Security-as-a-Service enhancements to the existing Symantec.Cloud services”. It was great to present a paper on Security in a hacker’s perspective. Let me give a link to the presentation after sometime. Expecting a lot in the coming days! :-)

nothing > /dev/null

I thought of blogging often. But I am unable to do. I will make it soon. This is a post doesn’t contain anything specific. I just want to show my presence in online.

Hiding your name into Lover’s photo

I was just browsing through PHP functions from php.net for some other purpose. I have got interested in PHP Pack function. Pack function packs data into binary string.

string pack ( string $format [, mixed $args [, mixed $... ]] )

So I thought of doing some funny things with this. I tried to hide my name into my favorite photo. Just follow the steps.

Create an upload form using html at first. Then create upload_file.php

if ($_FILES["file"]["error"] > 0)
echo "Error: " . $_FILES["file"]["error"];
else
{
echo "Upload: " . $_FILES["file"]["name"];
echo "Type: " . $_FILES["file"]["type"];
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb";
echo "Stored in: " . $_FILES["file"]["tmp_name"];
$file_data = fopen ($_FILES["file"]["tmp_name"], "r");
$reading = fread($file_data, 1048576);
fclose($file_data);
$final_data = bin2hex($reading);
echo $final_data;
}
?>

Now your Hexadecimal data is generated. Then add your name into $final_data string. Now we will restore the original photo from the hex value. We can hide and remove your name using
preg_match() and preg_replace() functions. Try it on your own if you want to waste some time.

$hexadecimaldata="add your hex data into the string here";
//For example I have attached a image hex value file along with the post
$picture_data = pack("H" . strlen($hexadecimaldata), $hexadecimaldata);
header("Content-Type: image/jpeg");
header("Last-Modified: " . date("r", filectime($_SERVER['SCRIPT_FILENAME'])));
header("Content-Length: " . strlen($picture_data));
echo $picture_data;
?>

I was searching a topic related HTML5. In the mean time pack function drags me to spend one more hour in this. I have used references from w3schools.com and php.net sites. Here is the hex value of my favorite photo. Download -> Hex Value file

And the name of the city is Madurai

It is two and half years since I have started staying out of my home town. Basically my city is famous for its cultural enrichment due to the temples and monuments here. It is the second largest city in Tamilnadu. But yet it is lagging in terms of faster development when compared to Coimbatore. But I hope this is the right time to pick up.

Till now it was a helm of local political rowdies. Now they are all taken away from here. I haven’t seen any posters/banners around the city now. It is a very good change. Yesterday I was roaming around the city. I am seeing many changes and more improvements on infrastructure development. And there are many car showrooms opened in the city. But still the roads are not that much vast anywhere. It needs more bridges at many places. The city limit is extended currently. The total city is stimulated to celebrate the upcoming festival Deepavali. Planning to get into the crowd today also. I met a lot of friends on the past two days. Still there are more people to meet.

Here really we don’t have much places to roam around other than old monuments. There is no entertainment other than theaters. I am looking for a change in it. It is really the right time for investors here.

Everybody have a dream of staying in their native itself. Yes, me too. Thinking of the day to come sooner.

One word – One day

I thought of writing a lot of blog posts but I am not able to sit and do it. So I was thinking of writing something very short as I can do it daily. Here after I am going to write to express the biggest moment of the day in a single word!

I was always on Facebook

In the recent vodafone advertisement we can hear the line “He is always on facebook”. Facebook team is making so much effort to make people to spend more time on their portal. They analyses people mind where they will waste time very easily and implements it exactly. It was the same case for me before 15 days. Nowadays I am not using it frequently. Accessing hardly on weekly once or twice for ten minutes. To ensure the constraint I have wrote one batch script. No more time wasting on Facebook hereafter.

I am using Windows 7. If you want to enable this in your system just copy the below scripts to your system and schedule it accordingly.

————————————————–
echo |type c:\Windows\System32\drivers\etc\hosts|findstr /v facebook > C:\Windows\System32\drivers\etc\hosts
ping 1.1.1.1 -n 1 -w 60000 > NUL
echo 127.0.0.1 www.facebook.com>> c:\Windows\System32\drivers\etc\hosts
————————————————–

Save it in your C: on any name of your wish with .bat extension. In the given example I have given access to facebook for 10 minutes which is 60000 milli seconds. You can change the timings accordingly to your need.

The first line deletes all the lines which contains the keyword “facebook”. And in the second line the script waits for ten minutes by pinging a non available IP Address. It is the available way of making wait for a batch script. In the third line, I am adding facebook.com to the restriction list by redirecting it to the localhost(system local URL).

There I had an issue that, for the 10 minutes waiting period the command prompt will be the foreground process. It means we need to minimize the window for that 10 minutes which disturbed me. SO I thought of making it as an invisible process(background process). So I have used an existing VB Script(source:Google) to make it invisible for that period.
—————————————————-
Set WshShell = CreateObject(“WScript.Shell”)
WshShell.Run chr(34) & “C:\goawayfacebook.bat” & Chr(34), 0
Set WshShell = Nothing
—————————————————-

Now schedule the VB script for the time you need using SCHTASKS command or using Task Scheduler.
And forget the problem with facebook!