winafl icon indicating copy to clipboard operation
winafl copied to clipboard

WARNING: Target function was never called. Incorrect target_offset?

Open akirilov opened this issue 10 years ago • 2 comments

I'm getting the above warning in my output and failing to fuzz, but my offset is correct.

OS: Windows Server 2012 R2 (x64) WinAFL: Current master DynamoRIO: 6.1.1-3

Command line: "E:\temp\WinAFL\DynamoRIO-Windows-6.1.1-3\bin64\drrun.exe" -c "E:\temp\WinAFL\winafl-master\bin64\winafl.dll" -debug -target_module "E:\temp\WinAFL\winafl-master\bin64\test_gdiplus.exe" -target_offset 0x1270 -fuzz_iterations 10 -nargs 2 -- "E:\temp\WinAFL\winafl-master\bin64\test_gdiplus.exe" "E:\temp\WinAFL\winafl-master\testcases\images\bmp\not_kitty.bmp"

WinDBG:

0:000> x test_gdiplus!main
00007ff6`92411270 test_gdiplus!main (<no parameter info>)
0:000> u test_gdiplus!main
test_gdiplus!main:
00007ff6`92411270 4053            push    rbx
00007ff6`92411272 4883ec40        sub     rsp,40h
00007ff6`92411276 488bda          mov     rbx,rdx
00007ff6`92411279 83f902          cmp     ecx,2
00007ff6`9241127c 7d18            jge     test_gdiplus!main+0x26 (00007ff6`92411296)
00007ff6`9241127e 488b12          mov     rdx,qword ptr [rdx]
00007ff6`92411281 488d0d28350000  lea     rcx,[test_gdiplus!`string' (00007ff6`924147b0)]
00007ff6`92411288 ff1502710000    call    qword ptr [test_gdiplus!_imp_printf (00007ff6`92418390)]
0:000> !peb
PEB at 00007ff6915d4000
    InheritedAddressSpace:    No
    ReadImageFileExecOptions: No
    BeingDebugged:            Yes
    ImageBaseAddress:         00007ff692410000
    Ldr                       00007ffd804f1320
    Ldr.Initialized:          Yes
    Ldr.InInitializationOrderModuleList: 0000000000792d90 . 00000000007934a0
    Ldr.InLoadOrderModuleList:           0000000000792f40 . 00000000007971d0
    Ldr.InMemoryOrderModuleList:         0000000000792f50 . 00000000007971e0
                    Base TimeStamp                     Module
            7ff692410000 57769e0b Jul 01 09:44:59 2016 E:\temp\WinAFL\winafl-master\bin64\test_gdiplus.exe
...

0x00007ff692411270 - 0x00007ff692410000 = 0x1270

Not sure what else could be causing the issue?

akirilov avatar Sep 26 '16 20:09 akirilov

it seems that at target_module option you only need provide name rather than full path. you can try
-target_module test_gdiplus.exe

Rogertest avatar Sep 27 '16 01:09 Rogertest

That seemed to do it. Makes sense, but a little unclear from the example.

akirilov avatar Sep 27 '16 19:09 akirilov