Arvind S Raj's Blog

A simple blog with simple things to say:)

InCTF 2010 is here

Amrita University & TIFAC CORE in association with VeriSign proudly present InCTF’10, India’s First National Level “Capture the Flag” Style Ethical HACKING contest.

InCTF’10 is from February to March 2010 and is focused exclusively on the student community. You can participate from your own university and no travel is required. No prior exposure or experience in cyber security needed to participate.

Prerequisite to participate is familiarity with any programming language. Working knowledge of Linux is highly desirable but not necessary; learn essential skills as you participate!!!

We help you learn if you get stuck!!

What you need to do?

(a) Form a team (max five members from your college)
(b) Approach a faculty/mentor and request him/her to mentor your team
(c) Register online at http://inctf.amrita.ac.in/register.php
(d) Send a demand draft for and amount of Rs. 150/- per team to the address mentioned.

Hurry! You can participate as soon as your complete the registration.
Exciting prizes to be won:
1st Prize Rs. 40000/-
2nd Prize Rs. 30,000/-
3rd Prize Rs. 20,000/-
Special Prizes

(a) Top 30 teams get CASH prize and Certificates of merit
(b) Faculty mentors of top 5 teams get special prizes
(c) College with the winning team will be awarded a “Champion University” award
(d) Winning teams will be considered to participate in an internship program at VeriSign for the next cycle which starts in July 2010

So, what are you waiting for?
Here is your chance to win bragging rights to be called “India’s No.1 Ethical Hacking Team!!”

It’s simple Register, Learn, Hack!

More details visit us online at Inctf

Follow us on Twitter @inctf | Facebook
Event Sponsor : Verisign | Media Partner: InfoSecurity | Publicity: Event Poster

PS:
1. Inform all your friends about this opportunity
2. For further details, do feel free to get in touch.

January 30, 2010 Posted by Arvind | CTF/BIOS, InCTF 2010 | , , , , , , , , , , , , , , , , , , , | No Comments Yet

Hey reader of my blog…

I know i have been getting quite a bit of traffic; though not phenomenal as gmail or orkut or something.

I however would like all to do something; more than just read my blog; tell me who you are.

Surely the people who i know and who read this blog is just a small percentage of the whole traffic. So if you dont mind, do introduce yourselves to me. Send a comment or something: i can always delete your comment if you have privacy issues (yeah right; who’s gonna spam ya? Me? I dont even know how email’s work; how can i spam ya huh?).

So what do you say reader? Will you introduce yourselves to me? Or no? You be the judge.

June 29, 2009 Posted by Arvind | Miscellaneous | | 2 Comments

Keep it small and sweet: creating archives using command line

So, next up in my living in command line is creating archives using command line. I know this is like a big jump but well it’s pretty straight forward and simple.

I used the wiki guide of ubuntu to learn this but going to explain a bit more probably. Though actually it’s pretty much what is there in the wiki page because it mentions various archive types and I’ll be dealing with the most common ones only.

https://help.ubuntu.com/community/FileCompression

So the command that we’ll be using to create archives is tar. The archives that I’ll be teaching you to create are tape archives, gunzip archives and bz2?

First up tape archives. These don’t really offer a great compression but they are the base to most other efficient archiving formats. Tape archives derive their name from the fact that they contents are “taped” together like when we put a lot of things in a box and tape them up. They were mainly used to avoid the often painful recursive copying of directories which often can cause problems (like it did for me when copying files to a VM from host).

So to actually help you do it hands on, create a new directory say test and put all the files you want to archive into it.

To create a tape archive of these, execute the following command from the parent directory of test
tar -cf myarchive.tar test/

You should see a file with the name myarchive.tar in the present working.

To extract a tape archive, execute
tar -xf myarchive.tar

You should find the directory test in the present directory.(Note: Remove the directory test before extracting)

Gunzip archives are an improvement over the tape archives since the offer better compression compared to them.

To create a gunzip archive of the above files,
tar zcvf myarchive.tar.gz test/

To extract a gunzip archive,
tar zxvf myarchive.tar.gz

bzip2 archives are a much better improvement over the gunzip archives since they offer much more compression but require that much more processing power than gunzip archives.

To create a bzip2 archive,
tar jcvf myarchive.tar.bz2 test/

To extract a bzip2 archive
tar jxvf myarchive.tar.bz2

If you notice that -c is the option to create archive and -x is to extract the archive. This is common to all formats. Also -j is for bzip2 archives and -z is for gunzip archives.

Well I hope you understood how to create archives using command line. Till next time, keep learning. Ciao!

December 19, 2009 Posted by Arvind | Live In The Command Line, Ubuntu | , , , , , , | No Comments Yet

The shutdown and reboot commands: a downloader’s boon(and of course sudo too)

So now on to switching off your computer using the command line. Note that all these require sudo privilege to work.

The commands are pretty self-explainatory but their options are what really is the power of these commands. Of course, shutdown is the best and poweroff, halt and reboot simply call the shutdown command with the exceptions with the use of a few options.

So first the easy ones poweroff, reboot and halt. These can just be used as
poweroff
halt
reboot

Often, when needed to shutdown or reboot instantly using the command line, poweroff and reboot are more useful than manipulating the options of shutdown.

Now the most useful part of shutdown is that you can program the computer should shutdown. This is really useful for all you nightbirds with unlimited like me. I start downloading at 2:15 am and just leave the computer with a shell that’s running the shutdown command take care of shutting down when it’s time: no hassles at all!

The poweroff, halt and reboot can be implemented using shutdown command as
shutdown -h now,
shutdown -h now,
and shutdown -r
respectively.

The coolest part is that you can automate the time when your computer should switch off using shutdown command.

For example,
shutdown -h 07:45
shutdown -h 20:30
would switch off the computer at 07:45am and 8:30pm respectively.

So that’s how you can shutdown the computer, reboot it and also automate the shutdown. Pretty neat huh? And quite easy too!

sudo command
Since I’ve talked about sudo command, thought I’d write about it as well(there’s nothing much).

sudo stands for Super User DO. Basically, the command let’s you execute commands as the all-powerful superuser. Do read about this unique security feature that was partially copied in Vista if you don’t know already.

To execute a command as superuser,
sudo

Till next time, ciao!

December 19, 2009 Posted by Arvind | Live In The Command Line, Ubuntu | , , , , , | No Comments Yet

What does that file contain? Ask cat!

This is going to be a short entry that deals with a very small command: cat. It’s basically used to manipulate the contents of a file in the shell. But do not under-estimate the power of cat by it’s seemingly small definition!

To print out the contents of a file try,
cat try
That’s it! Neat eh?

Of course, you can print out multiple files at the same time:
cat try1 try2 try3
and so on.

Of course you’ve to read and find out where does one file end and where does the next one begin. (If you know another way to do so, leave a comment in this entry.)

You can get numbered output i.e. each line will be numbered.
cat -n try

Here’s a way to copy a file using cat
cat try1 > try2
Just print all contents of try1 and redirect it to try2. Simple!

However, the coolest part should be writing to a file using cat. Here’s how it’s done.
cat > try
When you execute cat without the filename, the standard input is taken as input file and redirect the contents of standard input to try instead of standard output and voila! It’s working! To stop, just cancel it by keyboard interrupt – Ctrl+C.

Till next time, ciao!

December 19, 2009 Posted by Arvind | Live In The Command Line, Ubuntu | , , , | No Comments Yet

Creating and deleting files and directories

So, next up I think it’s time we learn how to create stuff using the command line.

Creating files
To create a file, the command is touch.
For example,
touch try1
creates an empty file try1 in the present working directory.

Multiple arguments can be passed to touch like touch try1 try2 try3 and so on. This will create 3 empty files try1, try2 and try3.

Also, touch can create files if you pass the path too.
For example,
touch /home/user/try1 /home/user/try2
will create 2 files try1 and try2 in the home folder of user “user”.

Creating directories
To create a directory, the command is mkdir.
For example,
mkdir try
creates an empty directory try in the present working directory.

Just like the touch command, the mkdir command also can accept multiple arguments like mkdir dir1 dir2 dir3 and so on. This will create 3 empty directories in the present directory dir1, dir2 and dir3.

Similar to the touch command, one can also pass the path in which the directory should be created to mkdir. Go ahead and try it: it’s really simple

Deleting files
To delete a file, the command is rm.
For example,
rm try1
will remove the file try1 if such a file exists in the present directory.

Just like the other commands stated above, rm also accepts multiple arguments.

Deleting directories
The command to delete directories is also rm. But, to delete a directory you need to use the -r option(stands for recursive delete).

This is where it differs from DOS; DOS requires that a directory be empty before it can be deleted. But in UNIX, just the -r option needs to be used – it’ll delete the directory and it’s contents, if any.
For example,
rm -r dir1
removes the dir1 and it’s contents, if any.

Multiple arguments, paths to directories to be deleted all can be used just like in deleting files.
Hope you understood how to create and delete files and folders. Till next time!

December 19, 2009 Posted by Arvind | Live In The Command Line, Ubuntu | , , , , | No Comments Yet

The return trip home: an eye-opener

Today, I was reading the newspaper when I came across this interesting article “Sir we pay for selling cigarettes in the train”. I didn’t understand what the title means but well the article did shock me at the audacity of the smokers described in the article.

Here’s the link to the article in today’s newspaper. It’s in today’s Hindu page 14(at least in the Coimbatore edition that we get but well I think the editorials and international page are same all across). Link

Read more »

December 13, 2009 Posted by Arvind | Miscellaneous | , , , , , | 4 Comments

The ls command: Know what’s beneath you

So we’ve done one command that’s the pwd. Next up ls.

ls is used for listing the contents of the present directory. Go ahead and type ls in the shell. You’ll get a list of file and folders in the present directory.

The best part of ls is that there are various options that let you do many things. For example, if I’ve got a folder with large amount of contents in it. And I need to find out if a file, say foo, is there in the folder, all I have to do is type in the command ls foo in the shell. If there’s file called foo, ls will return the filename to us. Else it’ll return an error similar to this ls: cannot access foo: No such file or directory.

Read more »

December 9, 2009 Posted by Arvind | Live In The Command Line, Ubuntu | , , , | 1 Comment

The pwd command: Find out where you are

Before we begin, here are a few important things:
1.I use bash(bourne-again shell) to demonstrate the functionality of these commands. So, if you use a different shell, check the documentation of that respective shell.
2.Also, I use ubuntu. So some commands may not necessarily be available across all distros. For example, apt-get is used to install applications in Ubuntu but Fedora uses yum I believe. So, this may not necessarily universal to all shells across all distros.

Read more »

December 9, 2009 Posted by Arvind | Live In The Command Line, Ubuntu | , , , | No Comments Yet

And the curtains fall on FOSS.IN(from NIMHANS Convention Centre, Bangalore)…

So the curtain falls on the 2009 edition of FOSS.IN. It’s been a 5 day journey that I thought might not make.

It’s been boring here. Sure I feel as if now I know I’m an even smaller speck in the FOSS world; that too only in the national level. But well, the speck never grew up. I’m still the same. I made no progress: ILUG-C refuses to answer my question(wonder why). And so no progress in the sudo bug fixing. Perhaps I should just start reading the code and find out where the bug is and just fix it rather than finding out how sudo works. But, I’m sure some system library calls outside the sudo source will play a central role and should know which is that(based on what Zubin said).

Read more »

December 9, 2009 Posted by Arvind | Miscellaneous | , , , , | No Comments Yet

Live in the command line

Well I’ve been thinking about this for a long time “Won’t it be cool to write on the various linux commands that I know? Won’t it be useful for some newbie who wants to learn more on this? Plus terminal is something I like a lot. So why not?”

So, in adherence to this thought, here is a new section in my blog “Live in the command line” – all about Linux commands which will eliminate the need for the GUI(hopefully)! Of course this will need you to remember a whole host of commands and the various options that come with each. And most of all, you’ll need to get used to the “only-keyboard” console – that’s right no mousey mousey.

Read more »

November 28, 2009 Posted by Arvind | Live In The Command Line, Ubuntu | , , , , | No Comments Yet