This post is part of the series of Practical Malware Analysis Exercises.
An if/else conditional jump, after InternetGetConnectedState()
return.
- It checks if there is an internet connection.
- Returns 1 if success, 0 if error.
- It calls a jump table after that, but not directly called by main.
Function was an unlabelled printf()
. Went down the "rabbit hole" during first look.
Checks for an Internet connection.
- Checks for 32 or 64 bit system.
- Opens a file handle.
- Iterates through characters in a string, processing them with a switch.
- Writes characters to a file.
From imports, looks like: Memory, file, process, heap manipulation, and process termination.
- IDA doesn't always recognize library code, making it easy to get lost in the forest.
- Take a top down, breadth first approach to reversing, focusing on overall code constructs and flow.
- Before getting into the details of a function, identify what the arguments passed to it are. Can then try debugging to see a before and after, instead of going line by line.