Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] IDA will automatically identifies the driver entry as "GsDriverEntry". #31

Open
ycdxsb opened this issue Jun 20, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ycdxsb
Copy link

ycdxsb commented Jun 20, 2023

In IDA Pro 8.2, IDA automatically identifies the driver entry as "GsDriverEntry". However, this can cause a bug as DriverBuddyReloaded might mistakenly determine it is not a driver. To resolve this issue, we need to patch the is_driver function in utils.py.

def is_driver():
    """
    Determine if the loaded file is actually a Windows driver, checking if `DriverEntry` is in the exports section.
    :return: address of `DriverEntry` if found in exports, False otherwise
    """

    for segment_address in idautils.Segments():
        for func_addr in idautils.Functions(idc.get_segm_start(segment_address), idc.get_segm_end(segment_address)):
            func_name = idc.get_func_name(func_addr)
            if func_name == "DriverEntry":
                return func_addr
            elif func_name == "DriverEntry_0":
                return func_addr
            elif func_name == "GsDriverEntry":
                return func_addr
    return False
@ycdxsb ycdxsb added the bug Something isn't working label Jun 20, 2023
@ycdxsb ycdxsb changed the title IDA will automatically identify the driver entry as "GsDriverEntry". IDA will automatically identifies the driver entry as "GsDriverEntry". Jun 20, 2023
@VoidSec VoidSec self-assigned this Jun 21, 2023
@VoidSec VoidSec changed the title IDA will automatically identifies the driver entry as "GsDriverEntry". [BUG] IDA will automatically identifies the driver entry as "GsDriverEntry". Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants