how to get imphash same as sysmon

feizzer 120 Reputation points
2023-07-21T06:08:32.69+00:00

User's image

i want to calculate imphash. How to piece together import data.

i have tried this, kernel.dll.funcname1kernel.dll.funcname2..... It work out different with sysmon`s result.

Windows for business | Windows Client for IT Pros | Devices and deployment | Other
0 comments No comments
{count} votes

Accepted answer
  1. Limitless Technology 44,766 Reputation points
    2023-07-21T14:22:02.5733333+00:00

    Hello there,

    To get an ImpHash (Import Hash) similar to Sysmon, you can use the following steps:

    Download the Sysinternals Suite: Sysmon is part of the Sysinternals Suite, a collection of powerful Windows utilities created by Mark Russinovich and Bryce Cogswell. You can download it from the Microsoft website or from the official Sysinternals Suite page.

    Install and configure Sysmon: Install Sysmon on the target system where you want to generate the ImpHash. During installation, you can choose to configure Sysmon using a configuration file or command-line options. The configuration allows you to specify the events you want to monitor and log.

    Generate Sysmon logs: Once Sysmon is installed and configured, let it run for a while to generate logs. Sysmon will start monitoring various events on the system, including process creations and loads of DLLs.

    Extract ImpHash from Sysmon logs: You can use various methods to extract the ImpHash from Sysmon logs. One common approach is to use a log analysis tool like "Log Parser" or "ELK Stack" (Elasticsearch, Logstash, and Kibana) to parse and search the logs for process creation events. Extract the DLLs loaded during each process creation event and compute the ImpHash of these DLLs.

    Calculate the ImpHash: The ImpHash is calculated based on the imported functions of a binary or DLL. There are various tools and scripts available to compute the ImpHash of a file. One popular tool is the "pehash.py" script by Mark Russinovich. You can find this script on the Sysinternals GitHub repository.

    I used AI provided by ChatGPT to formulate part of this response. I have verified that the information is accurate before sharing it with you.

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer–

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. feizzer 120 Reputation points
    2023-07-21T23:08:06.7766667+00:00

    piece together importData like that kernel32.func1,kernel32.func2. it is same with sysmon.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.