Monday, March 17, 2008

Interview with Arundhati Roy on Taslima and Nandigram

Good responses by Arundhati Roy on the issue of Taslima and nandigram.

http://mumbaigirl.net/2007/12/04/ibn-interview-with-arundhati-roy-on-taslima-and-nandigram/

Good interview by Karan Johar

Wednesday, March 12, 2008

0x1A

I was using this Dev C++ version 4 to compile to code written to convert the jpeg to exif format. and after trying for 2 hours to debug my code, I came to know the actual bug.

Actually, whenever it encounters 0x1A in the source file, it reads it as 0xFF. I tried fscanf, fgetc, fread, but none of them seem to work with this. When I am reading using fgetc and printing on the stdout, it prints 0xFF, when it should actually print ox1A, and after that the program hangs. I think this is a bug in the compiler :)

yeye, no bug in my code :)

Tuesday, March 11, 2008

Exif forensic

Hey
Most of the forensic information about computer essentials are publicized by the official documentation only and as these kinds of documentation tend to be very huge and lengthy to be understood easily, the importance of unofficial, easy to be understood forensic links are great. This is a very good link that I have come across, a forensic of exif file format.

http://park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html#AboutExif

Really good.

Sunday, March 09, 2008

Extracting information about FAT-32 from Volume Boot Sector

From long time, I was thinking of posting the forensic on how to extract crucial information from FAT-32, so that whoever wants to explore the digital caves of file systems, can do it easily. What I will do is that I will give some pointers and rest is on you to explore it.

So any disk has the following parts:

Volume boot sector is 512 bytes in size and is present after 63 sectors which are fixed for MBR (master boot record). Volume boot sector is a key part of the fat-32 file system present on the disk and it keeps all the necessary information to know where the FAT-table,i.e, File Allocation Table, exists, from where the root directory starts (knowledge of this location is crucial, as it is the top of the directory tree in FAT-32), how many clusters are there on the disk, how many sectors on the disk, how many sectors in each cluster, what is the sector size and all.

To begin with, I will show how each of these crucial information can be extracted from the VBS. Also, this introduction is only to give a kick start to the people, and hence, I will only go to the very basic things. If you want to learn more advance things, "google" is where your should look for .

In VBS, the Big-endian notation is used, i.e, if you want to write 0x12345678 on the disk, you should first write ox78, on the next location 0x56, on the next location 0x34, and on the next location 0x12. Now if you want to read from , say offset 17 and 18, then the offset 17 will contains lower 8-bits of the result and the offset 18 will contain higher 8-bits of the result.

The disk is often divided into tracks.
The tracks are divided into clusters.
The clusters are divided into sectors.
The sectors are composed of "a-fixed-number-of-byte". These fixed number of byte are given in VBS and it is from here our journey will start.

I will call start of VBS as offset '0' and offset 'x' will mean xth byte of the VBS.

Now, to extract "number of bytes per sector", you should read offset 11 and 12. For example, if offset 11 contains "0x00" and offset 12 contains "ox02" , then the number of bytes per sector are 0x0200, i.e. 512,.

The offset 13 contains the number of sectors present in a cluster.

Once you know this, then it is time to familiarize you with the structure of FAT-32 formatted disk, unless you know it already. A fat-32 formatted disk will have following sections in order:
1. MBR - master boot record
2. VBS - volume boot record
3. Researved Sector - for future extention
4. FAT1- first file allocation table
5. FAT2 - second file allocation table, This is nothing but a copy of the FAT1.
6. DATA area.

Now, read offset 14 and 15 of the VBS to know the number of sectors in the reserved area. If you multiply this value by the "number of bytes per sector", you will get the location from where the FAT1 starts. This is one very important location. Now, read the location 36,37,38 and 39. This will give the total number of sector in each FAT, i.e, FAT1 and FAT2. If you know the start of the FAT1 table location (which we have aleady calculated earlier) and if you know the "number of sectors in each FAT" and if you know "number-of-bytes in each sector", you can easily calculate the start of the DATA area as following :
start of DATA area = start of FAT1 + "number-of-sector-in-each-FAT" * "bytes-per-sector" * 2

Multiply by 2 because there are 2 fat tables, FAT1 and FAT2, replica of FAT1.

So, now you should be knowing the following:
1. how many byte per sector,
2. how many sector per cluster
3. location of FAT1
4. location of FAT2 = start of FAT + "number-of-sector-in-each-FAT" * "bytes-per-sector"
5. start of DATA area

:)

I hope this post will help you to better understand the FAT-32 file system with all the theoritical information available on the internet, explaining the structure of data area and FAT-table, and will give you a better understanding of actual structure and will help to analyze the FAT-32 in a forensic way.

:)

Friday, March 07, 2008

The language professor

Hemant,
After your third-rate performance in class, if you don't remove my name from your blog, I will legally sue you, please note.

http://those4days.wordpress.com/2009/03/25/the-language-professor/

anyone can guess the password

Wednesday, March 05, 2008

The great Windows

Almost a month back, I had to format my laptop and I couldn't find any Windows Xp cd except one trial version. I was in such a hurry that I formatted it with that cd c0ntaining trial version. This trial version cd would let you experience windows xp home for a month and then you must activate windows. I thought I will reformat it after a month and it would do. A week remaining in a month, it started giving warnings that your installed windows trial time is about to expire and blahblahblah... In the morning it said that 2 days are remaining, after that you must activate it. Meanwhile, I was busy writting a paper and I thought I will reformat it tomorrow and guess what.... it expired in the evening itself.... In the morning it said 2 days are remaining... and in the evening it expired .... where is my one and half day remining ???? I was busy writting my paper, that paper is only in the harddisk and now I will have to do many silly things, like boot with floppy or boot with another operating system to copy all my documents.... and then format with a proper cd.... sometimes, the sucking level of windows reaches its heights...... its an amazing sucker

Thursday, February 07, 2008

I could be more dangerous

year 2003: I was a king at mbm. August 2003 to Dec 2003, I lived one of the best time of my life. The memories will remain their for a life time and I will always cherish them, will always love to have them with me for my life time.
year 2004: First Time I realized competition at DAIICT. I was afraid I could be left behing being a hindi medium student. All my concentration was getting good grades. Bang 5th rank among 240. can't believe it but well , study was not what I wanted to do.
year 2005 : I wasted my time, every day sleeping and every night nightouts. everymorning eating at canteen before going to bed at 8:00 am, what a life was that
year 2006 . realized that my pointer is on sharp decline, need to maintain it, again studied and Bang great pointer again.
year 2007 : Once the pointer was on track, who cares afterwards. Did everything , more importance to projects, that actualy fascinates and only because they are fascinating and fun. Who cares for course work
Year 2008 : I am realizing my efforts could be more directed and concentrated. I should have decided earlier what I want to do. Is it Gre/CAT or whatever and I should have studied according to that. I could be more dangerous than.

m not happy

kafa hu aaj apne aap se , chubhan hai , kashish si kahin chupi hui ..... final semester of engineering, and when i look back, i see my self waisting time working for everything unuseful, working for what i am not supposed to work, working only what i wanted to ... all this is fine when u are only interested in enjoying college life and joining whatever company u get thru in placements but when u consider coll life as a professional, when u want ur career after coll to kickstart with the kind of job that u wish and with a good pay package, then the undirected efforts can always be a villain in ur dreams. What happened with me is something similar to this.

I did work, but only the things that I liked doing. I learned but only the things I liked learning and now I am at such an stage of my career that I have good expertise on many domains but but but ... of only few domains from IT, few from hardware, few from design. Collectively, I possess good experience of many but DIFFERENT things. For ex. I know C, JAVA C++, but not database, not data structures but algorithms. I have experience of designing embedded systems but never studied VLSI. I never did any design or animation course, but have made movies using flash, posters using photoshop. General question: whats big deal, u can learn few topics now, but thats what the big deal is... i am not happy with myself... myself = the one who only cares about what he wants and never give a damn to anything else. This decision, I should have taken at an early stage of my life that what I really want to do and I should have directed my efforts in that direction. I was advised to do so, by my teachers, my seniors etc. I am damn idiot. I am foolish. I could be the need of the market, today I need it.

PS: You can not understand this post and feelings behind this post, unless you have seen my transcripts, and myself oscillating my mind between career choices