General questions
0.1 Explain pointers, how they work, what they can be used for, how would you use them with arrays?
0.2 Explain classes, and how they are used in an Object-Oriented design?
0.3 Using MSDN Library, explain how to make use any API
0.4 Whats the difference between an array and a vector. What are the advantages of using a vector? Which is safer, and why?
(vector here reffers to the class defined in vector.h header)
0.5 What are the uses of the bit-shifting, and, or and exclusive or operators? How would you make use of them? How would you use them with flags?
0.6 What are namespaces, what are they used for?
0.7 What is class inheritance? What is it used for? How do protected, private, and public members come into play when working with inheritance?
0.8 What would a static library be used for? In what situation would you use it in?
0.9 What is a dyamically linked library used for? In what situation would you use it in?
1.0 What's the use of a class constructor and destructor
1.1 When is an approriate time to use enumerators?
1.2 In which situations would you use a struct opposed to a class and vise-versa
1.3 What is a buffer-overflow. How can you avoid it? What risks does it introduce to your software?
1.4 What's the difference between static variables in the scope of a function, opposed to non-static variables in the scope of a function?
1.5 What's the difference between an inline method versus a normal method?
1.6 How would you override a method, what is it's purpose, and when is it a appropriate to do so?
1.7 What's the purpose of a virtual method in a class?
1.8 How would you write a method with an undefined number of parameters using functions or macros defined in the stdarg.h header.
1.9 What is an exception handler, what is it's purpose, and how is it exploited by a reverse engineer?
2.0 What's the difference between a software and a hardware breakpoint?
2.1 What problems to you see with the code below(Ignore syntax errors if they exist, and exclusion of required headers):
enum e_flagsText
{
FlagsTextBold = 0x1,
FlagsTextItalic = 0x2,
FlagsTextUnderlined = 0x4,
FlagsTextRed = 0x5,
};
int main(int argc, char** argv);
int count = 0;
int main(int argc, char** argv)
{
if(argv <= 1)
print_usage();
int totalArgs = argc;
for(count = 0; count < totalArgs; count++)
printf("Arg:%d, %s", count, argv[count]);
char buffer[50];
strcpy(buffer, argv[1]);
MessageBox(0, TEXT("MsgBox"), "MsgBox" , MB_OK);
return -1;
}
2.2 What is a stack frame? How does the caller perform a cleanup(in the cdecl calling convention). And how are parameters accessed and passed using registers and the stack?
2.3 List at least four segment registers.
2.4 Write a quick diagram, which demonstrates how a driver should interface with it's counterpart(I.e usermode application). Does it involve
a library to middleman the communication?
Problem Solving
I'll try my best to make them difficult :S
0.1 You're developing a piece of software that needs to communicate with a customer's software. The protocol used for communication may change as the product
advances, and you want to create a simple interface the customer can use to program their software. How can you solve this problem?
0.2 You have a diamond, and you need to figure out if a given point is within or outside of the diamond, how would you do this mathimatically, given only the position of
the diamond, it's size(width\height), and the position of the point being variables x, and y in the formula.
- Location: x: 10 y: 15. Size: Width = 30. Height = 30.
0.3 You have an array of characters such as "element1.element2.element3.element4", where '.' is the delimiter. How would you parse each element individually. Without using a buffer or creating an array of any sort. Write your own method(s) to perform the task.
0.4 You have a large 4GBs of physical memory. You need to figure out which regions of that memory are in use, and which regions are not. You can do this by keeping track of all memory allocation and deallocation, however, your solution needs to be memory efficient, and quick to locate allocatable regions. What is your solution to this problem? Write some pseudo code to demonstrate how it is deallocated and allocated. You must not make use of any libraries to do this.