Skip to Content
Practical Malware Analysis
book

Practical Malware Analysis

by Michael Sikorski, Andrew Honig
February 2012
Intermediate to advanced
800 pages
23h 55m
English
No Starch Press
Content preview from Practical Malware Analysis

Identifying Structs

Structures (or structs, for short) are similar to arrays, but they comprise elements of different types. Structures are commonly used by malware authors to group information. It’s sometimes easier to use a structure than to maintain many different variables independently, especially if many functions need access to the same group of variables. (Windows API functions often use structures that must be created and maintained by the calling program.)

In Example 6-26, we define a structure at made up of an integer array, a character, and a double. In main, we allocate memory for the structure and pass the struct to the test function. The struct gms defined at is a global variable.

Example 6-26. C code for a struct example

struct ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Malware Analysis

Learning Malware Analysis

Monnappa K A
Security in Computing, 6th Edition

Security in Computing, 6th Edition

Charles Pfleeger, Shari Lawrence Pfleeger, Lizzie Coles-Kemp
Evasive Malware

Evasive Malware

Kyle Cucci

Publisher Resources

ISBN: 9781593272906Errata Page