This post is part of the series of Practical Malware Analysis Exercises.
Boolean check for an internet connection. Returns true if so, returns false if not.
printf()
Parses a page for a command hidden in an HTML comment.
- Opens URL
http://www.practicalmalwareanalysis.com/cc.htm
- Reads 512 bytes.
- Checks for
<!--
, reverses bytes (network to host order). - Save next byte in
AL
.
A series of if/then conditional checks.
User agent:Internet Explorer 7.5/pma
URL: http://www.practicalmalwareanalysis.com/cc.htm
Fetch a remote command. Likely a bot for a botnet, or some sort of backdoor.
- Sends a
GET
request to a CC page, with a special user agent to identify itself. - Gets the embedded command by parsing the first 512 bytes, looking for an HTML comment.
- Sleeps for one minute.