Skip to content

Extracting api call sequence of malware to analyze their behavior

Notifications You must be signed in to change notification settings

merlingo/API-call-Seq---Malware-beh

Repository files navigation

Extracting api call sequences of malware to analyze its behavior.

ApiCall Class: This class now stores the API call address, its potential name (if available), and a list of argument values obtained from the call site.

hook_call Function:
    It checks if the call originates from a different function using get_func_start to identify potentially external calls.
    It retrieves the function name at the called address using Name (might be unavailable for external functions).
    It iterates through arguments using get_arg_qty and get_arg_addr and retrieves their values using idc.Dword (might be just data pointers).

Main Script:
    The script only hooks the Code analysis event (find_code) focusing on call instructions.
    Extracted information includes potential names and argument values (might be limited).

Important Notes:

Identifying external functions with certainty can be challenging. This script uses a heuristic approach.
Extracting argument values might not always provide meaningful data due to limitations in static analysis.

Further Enhancements:

Consider using data flow analysis techniques to improve the accuracy of argument identification.
Explore using information from the IDA database about imported functions to improve name identification.

Remember, this approach has limitations, and manual analysis might be necessary for a complete understanding of API calls.

About

Extracting api call sequence of malware to analyze their behavior

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages