13 September 2012

"Congratulations! You've defused the bomb!"


Guess what? The famous Bomb Lab of Computer Systems: A Programmer's Perspective! I have done this before in the university, three years ago. After three years, I do it again. However, the lab has changed so much that I can not believe I have ever seen this . . . or maybe just because I am forgetful.

Fortunately time did not rust my skills. There is no substantial difficulty for me to do reverse engineering on this binary bomb. Identifying the transfer of control, determining the control flow, identifying the function calls, finding out the function prototypes, identifying the names of global variables, analyzing the data structures, and so on, everything can be done in a certain routine. Nevertheless, seeing the success message appearing on the screen still excited me a lot.

What is worth mentioning is the secret phase, which I did not ever find three years ago. Its entry is in the phase_defused function. The function decides whether to enter the secret phase by checking the string buffer of a certain phase. The read_line function read the user input into the string buffers. Actually it can take more than needed into the buffers, which we can exploit. To solve the secret phase, you just need to be aware that it operates recursively on a binary tree.

From the lab you can learn many things about GDB. Like me, I found that GDB can print the variable names associated with the memory addresses when I use x to check them, which helped me a lot. Another discovery is that Python is a really good command line calculator. Now I shall continue to the other lab of this chapter—the Buffer Lab.

11 September 2012

Preparing for Academic Career

Today I read a very interesting article (in Chinese) which is about the guidance to students who are pursuing their Master's degree, telling them how to read papers, how to get the state-of-the-art information in their fields, and how to face the difficulties that one may run into during research activities. Though I am not able to find the source of the article, it should be written by a student who studied artificial intelligence at MIT. Despite the fact that I have just graduated from university, I still think I should read it carefully since I have the long-term plan to get a PhD degree and to pursue an academic career.

Several books mentioned in the article are also worth reading. Alan Lakein's How to Get Control of Your Time and Your Life talking about time management. I have started reading it, and hope to find some tips that can help me manage my time better. In the very start of the book, it reminds us not to become a time nut, who makes himself and everyone else nervous with his concern about never wasting a minute. I feel I should keep this advice in mind, because in a very busy situation like now, it is very easy for me to become that kind of person. Another book, Notebooks of the Mind by Vera John-Steiner,  is about the ideas and creativity.

Writing is a very important skill for anyone who wants to work in university. That is why I bought three books about writing today, The Elements of Style (William Strunk and E. B. White), Simple & Direct (Jacques Barzun) and Line by Line: How to Edit Your Own Writing (Claire Kehrwald Cook), all of which are recommended by the article. And most important, to improve writing proficiency, one needs years of consistent practices. Therefore I shall write the blog more frequently. Even though I am maybe never going to study for my PhD or to become a professor, I will surely still need these writing skills since they are useful almost everywhere.

Last but not least, the article mentioned the lecture about lecturing (pardon my bad wording) given by Patrick Winston. Lecturing is a very important and useful way to present your ideas and yourself. The video of the lecture helped me a lot not only in the lecturing skill which I will need in the far future, but also in other forms of oral communication such as job interview which I probably need very soon.