Winafl error opening pidfile txt

Dear! I was doing some tests with a line to fuzzing firefox. I wanted to try it and I also wanted to try doing a brute force of offset, the question that I tried with everyone and always gives me t...

@jplopezy

Dear!

I was doing some tests with a line to fuzzing firefox.

I wanted to try it and I also wanted to try doing a brute force of offset, the question that I tried with everyone and always gives me the same error, do you know why it is?

Error:

[-] PROGRAM ABORT : Error opening pidfile.txt
Location : create_target_process(), c:workwinaflsourceafl-fuzz.c:2361

Line :

afl-fuzz.exe -i in -o out -D C:winafl-masterdynobin64 -t 100 — -coverage_module mozglue.dll -coverage_module firefox.exe -fuzz_iterations 100 -target_module lgpllibs.dll -target_offset 0xB1D1 -nargs 2 — C:Program FilesMozilla Firefoxfirefox.exe @@

@ifratric

First time I see this error, but in general, the pid file is created in
https://github.com/googleprojectzero/winafl/blob/master/afl-fuzz.c#L2302
with -pidfile dynamorio flag. Perhaps instrumentation fails for some reason. These issues can be debugged by running the target in DynamoRIO directly (see the -debug mode in Readme).
Looking at the command line, the most likely reason I can see for instrumentation failing is the target path containing spaces, and not being quoted. It should probably be
«C:Program FilesMozilla Firefoxfirefox.exe»
instead of
C:Program FilesMozilla Firefoxfirefox.exe

Also, I would be really surprised if you could fuzz the whole of firefox (rather than a specific part) in this way and also if you could bruteforce a (meaningful) target_offset.

@xinali

I meet the same issue, I solved this by open «cmd.exe» with administrator.

@mengfei-ren

Hi, I also meet the same issue. I just test a very simple C program to make sure it works. The program simply reads from a file to check if it’s ‘bad!’. If so, then crashes. When I run WinAFL with static instrumentation mode -Y, it also shows «All programs time out.» issue.

Line:
afl-fuzz.exe -i D:Workspaceswinafltestcase -o D:Workspaceswinaflfindings -D D:SoftwareDynamoRIObin64 -t 20000 — -coverage_module testprog.exe — D:Workspaceswinaflprogramstestprog.exe @@

@ifratric

I’m not sure if this is related to this issue but your command line seems to be missing some required instrumentation flags (such as target module/function, number of function arguments and number of iterations). You should always run the debug mode first (see https://github.com/googleprojectzero/winafl/blob/master/readme_dr.md) and only run afl-fuzz if the debug log looks good.

@jplopezy

@yuexizhumeng

The solution is change D:Workspaceswinaflprogramstestprog.exe to «D:Workspaceswinaflprogramstestprog.exe» like says @xinali

@anshuman-goel

I was receiving the same error. I was mistakenly using DynamoRio bin32 executable instead of bin64.

@HuanGMZzz

The path string is the key。I also meet this error。

@Taolaw

I have encountered the same problem. Have you solved this problem? The following is my command parameters and error message

C:UserslunaDesktopwinafl-masterbin64>afl-fuzz.exe -i C:UserslunaDesktop
input -o C:UserslunaDesktopout -D C:UserslunaDesktopDynamoRIO-Windows-7.
1.0-1bin64 -t 20000 -- -coverage_module test.exe -coverage_module
 test.dll -fuzz_iterations 5000 -target_module test.exe -target
_method wWinMain -nargs 2 -- E:testforwinafltest.exe @@
WinAFL 1.16b by <ifratric@google.com>
Based on AFL 2.43b by <lcamtuf@google.com>
[+] You have 1 CPU cores and 0 runnable tasks (utilization: 0%).
[*] Setting up output directories...
[+] Output directory exists but deemed OK to reuse.
[*] Deleting old session data...
[+] Output dir cleanup successful.
[*] Scanning 'C:UserslunaDesktopinput'...
[+] No auto-generated dictionary tokens to reuse.
[*] Creating hard links for all input files...
[*] Attempting dry run with 'id_000000'...

[-] PROGRAM ABORT : Error opening pidfile.txt
         Location : create_target_process(), c:workwinaflsourceafl-fuzz.c:2357

Below is the feedback of debugging mode, I did not see the relevant debugging file generated, if I did not use the error

C:UserslunaDesktopwinafl-masterbin64>C:UserslunaDesktopDynamoRIO-Window
s-7.1.0-1bin64drrun.exe -c winafl.dll -debug -coverage_module test.dll -tar
get_module test.exe -target_offset 0x0 -fuzz_iterations 10 -nargs
2 -- "E:testforwinafltest.exe @@"
 C:UserslunaDesktopinputalphatrans.png
ERROR: Target process E:testforwinafltest.exe is for the wrong architecture

I have tested the above methods. I have received the same results on both windows7 x86 and x64, and I started cmd.exe with Administartor.

@symeonp

Hi Taolaw,

As @anshuman-goel mentioned earlier, and because I lost a few minutes trying
to figure out what’s wrong, you are using wrong architecture for the DynamoRIO.
If it’s x86 make sure you use the bin32drrun.exe and bin32afl-fuzz.exe,
and consequently if it’s x64 use bin64drrun.exe and bin64afl-fuzz.exe.

From your command line above, it looks like you have compiled for x86 architecture.

Hope that helps,
Symeon

@Austin-Src

I am getting this same problem regardless of the combination of dynamoRIO and winafl that I use. I’m starting to wonder if the problem isn’t deeper than that, but digging into the .c file doesn’t illuminate the situation much.

@debach

I had a similar problem (pidfile error) with a command of the form

afl-fuzz.exe … -- -coverage_module … -- pathtoapp.exe someArg pathtosomeotherfile @@

I had to wrap each whitespace-separated part after the second -- in quotes, like so:

afl-fuzz.exe … -- -coverage_module … -- "pathtoapp.exe" "someArg" "pathtosomeotherfile" @@

It took me a while to figure it out because someArg was a simple number like 1000, so I had not expected to have to wrap it in quotes.

@Hongyuan-Li

I met a similar problem (pidfile opening error) when I try to fuzz my application with below command:
afl-fuzz.exe -i in -o out -D «D:winaflDynamoRIO-Windows-8.0.0-1bin64» -t 20000 — -coverage_module «pathto*.dll» -coverage_module «pathtomyapp.exe» -fuzz_iterations 10 -target_module «pathtomyapp.exe» -target_offset 0x16e0 -nargs 2 — «pathtomyapp.exe» «-i» @@

myapp.exe also has a parameter «-i» to run it.

Don’t know why it does not work.

@bheem1007

how to

I met a similar problem (pidfile opening error) when I try to fuzz my application with below command: afl-fuzz.exe -i in -o out -D «D:winaflDynamoRIO-Windows-8.0.0-1bin64» -t 20000 — -coverage_module «pathto*.dll» -coverage_module «pathtomyapp.exe» -fuzz_iterations 10 -target_module «pathtomyapp.exe» -target_offset 0x16e0 -nargs 2 — «pathtomyapp.exe» «-i» @@

myapp.exe also has a parameter «-i» to run it.

Don’t know why it does not work.

how to get target_offset value

@bheem1007

how to avoid, Error opening pidfile.txt
Screenshot 2022-09-15 180409

Содержание

  1. PROGRAM ABORT : All test cases time out, giving up! about winafl HOT 3 CLOSED
  2. Comments (3)
  3. Related Issues (20)
  4. Recommend Projects
  5. React
  6. Vue.js
  7. Typescript
  8. TensorFlow
  9. Django
  10. Laravel
  11. Recommend Topics
  12. javascript
  13. server
  14. Machine learning
  15. Visualization
  16. Recommend Org
  17. Facebook
  18. Microsoft
  19. WinAFL Crashes with testing code about winafl HOT 15 OPEN
  20. Comments (15)
  21. Related Issues (20)
  22. Recommend Projects
  23. React
  24. Vue.js
  25. Typescript
  26. TensorFlow
  27. Django
  28. Laravel
  29. Recommend Topics
  30. javascript
  31. server
  32. Machine learning
  33. Visualization
  34. Recommend Org
  35. Facebook
  36. Microsoft
  37. WinAFL Crashes with testing code #62
  38. Comments

PROGRAM ABORT : All test cases time out, giving up! about winafl HOT 3 CLOSED

You’re missing a lot of mandatory instrumentation options, please see the readme.

In any case you should always first run the debug mode (also described in readme) before running afl-fuzz to make sure everything is working correctly.

sanjeevk001 commented on January 16, 2023

ivanfratric commented on January 16, 2023

The debug log is a file created in the current directory when you run drrun.exe -c winafl.dll -debug . Can you find that file and take a look at its content.

  • Attach mode with PID as an option for in-app persistence HOT 5
  • winafl_cmin.py stuck at [*] Testing the target binary HOT 3
  • Unrecoginized command received over pipe HOT 2
  • custom_winafl_server.dll getaddrinfo failure HOT 2
  • network mode: custom_net_fuzzer.dll sendto() failed with error code 10040 HOT 2
  • Error in DynamoRIO mode HOT 2
  • custom_net_fuzzer.dll failed with 10022 HOT 1
  • Integer divide-by-zero in afl-fuzz.exe HOT 3
  • Is it possible to detect when the target exits with exit code != 0, and interpret this as a ‘crash’? HOT 4
  • winafl.dll instrumentation crashes with access violation when running drrun.exe HOT 1
  • [-] PROGRAM ABORT : Error opening pidfile.txt
  • drrun throws error invalid target function offset HOT 2
  • ASSERT FAILURE winafl.c:526: fase (unrecognized command received over pipe) HOT 4
  • fatal error C1189
  • Emulator based fuzzing
  • WinAFL can not fuzzy Windows service. HOT 4
  • Target function HOT 2
  • Security Policy violation Binary Artifacts HOT 4
  • My environment is not running? HOT 4
  • WinAFL internal crash at PC 0x74c7f94b

Recommend Projects

React

A declarative, efficient, and flexible JavaScript library for building user interfaces.

Vue.js

🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

Typescript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

TensorFlow

An Open Source Machine Learning Framework for Everyone

Django

The Web framework for perfectionists with deadlines.

Laravel

A PHP framework for web artisans

Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

javascript

JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

Some thing interesting about web. New door for the world.

server

A server is a program made to process requests and deliver data to clients.

Machine learning

Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

Visualization

Some thing interesting about visualization, use data art

Some thing interesting about game, make everyone happy.

Recommend Org

Facebook

We are working to build community through open source technology. NB: members must have two-factor auth.

Microsoft

Open source projects and samples from Microsoft.

Источник

WinAFL Crashes with testing code about winafl HOT 15 OPEN

ivanfratric commented on January 16, 2023

Which WinAFL version are you using?

I’m not sure this is the cause of your crash, but
-target_module should take just the name, not a path, so -target_module FuzzSample.exe
-nargs is missing (unless it’s intended to be 0)

Does the debug log get created at all?
Can you run your target under DynamoRIO but without WinAFL like this:

C:Usersin3oDesktopacrobatdynamoriobuildbin32drrun.exe — «C:Usersin3oDocumentsFuzzSampleReleaseFuzzSample.exe» insample.txt

shba24 commented on January 16, 2023

I got the latest winAFL from the github. Compiled with latest DynamoRio.

When I tried to run
C:Usersin3oDesktopacrobatdynamoriobuildbin32drrun.exe -c winafl.dll -debug -target_module FuzzSample.exe -target_method Fuzz -coverage_module vulnerable.dll -fuzz_iterations 10000 -nargs 0 — «C:Usersin3oDocumentsFuzzSampleReleaseFuzzSample.exe» insample.txt

I got the following log:

Module loaded, MFC140ENU.DLL
Module loaded, drreg.dll
Module loaded, FuzzSample.exe
Exception caught: c0000005
crashed
WARNING: Target function was never called. Incorrect target_offset?
Coverage map follows:

If you need the sample Fuzz Code which I am fuzzing, I can provide you that too.

I tried — C:Usersin3oDesktopacrobatdynamoriobuildbin32drrun.exe — «C:Usersin3oDocumentsFuzzSampleReleaseFuzzSample.exe» insample.txt. Its giving me the same error.

ivanfratric commented on January 16, 2023

Wait, how can you get the same error when the command line doesn’t incude WinAFL at all and the error log references winafl.dll (that shouldn’t even exist in the same address space). Can you doublecheck and try again? Your error log also references test_gdiplus.exe that isn’t present anywhere in the command line.

shba24 commented on January 16, 2023

Sorry, I added the wrong log. Here is the correct log.

http://dynamorio.org/issues/. Program aborted.
0xc0000005 0x00000000 0x7063cffb 0x7063cffb 0x00000003 0x00000000
Base: 0x70570000
Registers: eax=0x00000000 ebx=0x00aff6c8 ecx=0xd27a70b4 edx=0x00000000
esi=0x24ee2080 edi=0x24ee207c esp=0x00aff6e8 ebp=0x00aff798
eflags=0x0001
version 6.2.17367, custom build
-no_dynamic_options -code_api -probe_api -stack_size 56K -max_elide_jmp 0 -max_elide_call 0 -no_inline_ignored_syscalls -native_exec_default_list » -no_native_exec_managed_code -no_indcall2direct -no_aslr_dr -pad_jmps_mark_no_trace
0x00aff798 0x706176f4
0x00aff7c4 0x70617591
0x00affcd0 0x706172db
0x00affd10 0x705a095d
0x00affd38 0x70610f2c
0x00affd58 0x7063c8c8>

ivanfratric commented on January 16, 2023

Hmm in that case the issue seems to be with how DR interacts with your target and not in WinAFL. Can you try disabling your antivirus? Antivirus software caused similar issues in the past.

shba24 commented on January 16, 2023

Seems like it. Can you confirm which version of DR would work perfectly with winafl?

I don’t have any antivirus, just windows defender but I don’t think that’s interfering here.

ivanfratric commented on January 16, 2023

shba24 commented on January 16, 2023

I tried it the with version 6.2.0-2, its working there. I don’t know what bug DynamoRIO introduced.
Anyways, I am running Winafl on linked code.

I am getting following statistics.

+- process timing ————————————-+- overall results —-+
| run time : 0 days, 0 hrs, 10 min, 35 sec | cycles done : 1 |
| last new path : none seen yet | total paths : 2 |
| last uniq crash : none seen yet | uniq crashes : 0 |
| last uniq hang : none seen yet | uniq hangs : 0 |
+- cycle progress ———————+- map coverage -+———————-+
| now processing : 0 (0.00%) | map density : 0.00% / 0.01% |
| paths timed out : 0 (0.00%) | count coverage : 1.00 bits/tuple |
+- stage progress ———————+ findings in depth ———————+
| now trying : splice 7 | favored paths : 2 (100.00%) |
| stage execs : 1/16 (6.25%) | new edges on : 2 (100.00%) |
| total execs : 420 | total crashes : 0 (0 unique) |
| exec speed : 0.69/sec (zzzz. ) | total tmouts : 0 (0 unique) |
+- fuzzing strategy yields ————+—————+- path geometry ——-+
| bit flips : 0/0, 0/0, 0/0 | levels : 1 |
| byte flips : 0/0, 0/0, 0/0 | pending : 0 |
| arithmetics : 0/0, 0/0, 0/0 | pend fav : 0 |
| known ints : 0/0, 0/0, 0/0 | own finds : 0 |
| dictionary : 0/0, 0/0, 0/0 | imported : n/a |
| havoc : 0/306, 0/96 | stability : 100.00% |
| trim : n/a, n/a +————————+
^C—————————————————-+

exec speed : 0.69/sec (zzzz. ) speed is way to slow. What do you think is the problem?

Here is the command line I am using ->

afl-fuzz.exe -i — -o out -D C:Usersin3odynamorio-6.2.0-2bin32 -t 20000+ — -fuzz_iterations 50000 -covtype edge -target_module FuzzSample.exe -target_method Fuzz -nargs 0 -coverage_module vulnerable.dll — «C:Usersin3oFuzzSample.exe» @@
Here is the log during my test run. I dont see any issue here but still.
afl.FuzzSample.exe.27696.0000.proc.txt

ivanfratric commented on January 16, 2023

Please see «WinAFL runs slower than expected» in the FAQ section of the readme. I’d say that «return;» without first closing the file is the problem.

shba24 commented on January 16, 2023

Yes. That was the problem. Thanks ivanfrantic.

shba24 commented on January 16, 2023

@ivanfratric Is there any tool or feature for visualization of code coverage?

I can’t see if my code is reaching certain function or not.

shba24 commented on January 16, 2023

@0vercl0k I have to do it automatically also can’t afford IDA Pro as of now. Nice tool btw, useful during CTFs for sure.

Looking for something like https://github.com/mrash/afl-cov if there is, otherwise I will have to write it myself.

ivanfratric commented on January 16, 2023

@iN3O I’d also suggest filing a bug with DynamoRIO and mention yo have an app that works fine on DR 6 but crashes on DR 7, perhaps DR devs will be interested in this.

ksloven commented on January 16, 2023

Hi, I have the same issue with both winafl and dynamorio crashing with «internal crash; program aborted» as reported above. Following the thread, i thought it was because I used dynamorio 7 but I downloaded and used Dynamorio6 and still get same error.

Anti-virus (defender) disabled from real-time scanning.
Even running it directly with drrun, I still get the same error (and its not just adobe, almost any binary I have run thus far).
C:DynamoRIObin32>drrun.exe — «C:Program Files (x86)AdobeAcrobat Reader DCReaderAcroRd32.exe» C:winafltestcasesotherspdfsmall.pdf

  • Attach mode with PID as an option for in-app persistence HOT 5
  • winafl_cmin.py stuck at [*] Testing the target binary HOT 3
  • Unrecoginized command received over pipe HOT 2
  • custom_winafl_server.dll getaddrinfo failure HOT 2
  • network mode: custom_net_fuzzer.dll sendto() failed with error code 10040 HOT 2
  • Error in DynamoRIO mode HOT 2
  • custom_net_fuzzer.dll failed with 10022 HOT 1
  • Integer divide-by-zero in afl-fuzz.exe HOT 3
  • Is it possible to detect when the target exits with exit code != 0, and interpret this as a ‘crash’? HOT 4
  • winafl.dll instrumentation crashes with access violation when running drrun.exe HOT 1
  • [-] PROGRAM ABORT : Error opening pidfile.txt
  • drrun throws error invalid target function offset HOT 2
  • ASSERT FAILURE winafl.c:526: fase (unrecognized command received over pipe) HOT 4
  • fatal error C1189
  • Emulator based fuzzing
  • WinAFL can not fuzzy Windows service. HOT 4
  • Target function HOT 2
  • Security Policy violation Binary Artifacts HOT 4
  • My environment is not running? HOT 4
  • WinAFL internal crash at PC 0x74c7f94b

Recommend Projects

React

A declarative, efficient, and flexible JavaScript library for building user interfaces.

Vue.js

🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

Typescript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

TensorFlow

An Open Source Machine Learning Framework for Everyone

Django

The Web framework for perfectionists with deadlines.

Laravel

A PHP framework for web artisans

Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

javascript

JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

Some thing interesting about web. New door for the world.

server

A server is a program made to process requests and deliver data to clients.

Machine learning

Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

Visualization

Some thing interesting about visualization, use data art

Some thing interesting about game, make everyone happy.

Recommend Org

Facebook

We are working to build community through open source technology. NB: members must have two-factor auth.

Microsoft

Open source projects and samples from Microsoft.

Источник

WinAFL Crashes with testing code #62

I am getting the following crash on running the winafl.

I am running the fuzzer with following command line.

C:Usersin3oDesktopacrobatdynamoriobuildbin32drrun.exe -c winafl.dll -debug -target_module C:Usersin3oDocumentsFuzzSampleReleaseFuzzSample.exe -target_method Fuzz -coverage_module vulnerable.dll -fuzz_iterations 10000 — «C:Usersin3oDocumentsFuzzSampleReleaseFuzzSample.exe» insample.txt

The text was updated successfully, but these errors were encountered:

Which WinAFL version are you using?

I’m not sure this is the cause of your crash, but
-target_module should take just the name, not a path, so -target_module FuzzSample.exe
-nargs is missing (unless it’s intended to be 0)

Does the debug log get created at all?
Can you run your target under DynamoRIO but without WinAFL like this:

C:Usersin3oDesktopacrobatdynamoriobuildbin32drrun.exe — «C:Usersin3oDocumentsFuzzSampleReleaseFuzzSample.exe» insample.txt

I got the latest winAFL from the github. Compiled with latest DynamoRio.

When I tried to run
C:Usersin3oDesktopacrobatdynamoriobuildbin32drrun.exe -c winafl.dll -debug -target_module FuzzSample.exe -target_method Fuzz -coverage_module vulnerable.dll -fuzz_iterations 10000 -nargs 0 — «C:Usersin3oDocumentsFuzzSampleReleaseFuzzSample.exe» insample.txt

I got the following log:

Module loaded, MFC140ENU.DLL
Module loaded, drreg.dll
Module loaded, FuzzSample.exe
Exception caught: c0000005
crashed
WARNING: Target function was never called. Incorrect target_offset?
Coverage map follows:

If you need the sample Fuzz Code which I am fuzzing, I can provide you that too.

I tried — C:Usersin3oDesktopacrobatdynamoriobuildbin32drrun.exe — «C:Usersin3oDocumentsFuzzSampleReleaseFuzzSample.exe» insample.txt. Its giving me the same error.

Wait, how can you get the same error when the command line doesn’t incude WinAFL at all and the error log references winafl.dll (that shouldn’t even exist in the same address space). Can you doublecheck and try again? Your error log also references test_gdiplus.exe that isn’t present anywhere in the command line.

Sorry, I added the wrong log. Here is the correct log.

http://dynamorio.org/issues/. Program aborted.
0xc0000005 0x00000000 0x7063cffb 0x7063cffb 0x00000003 0x00000000
Base: 0x70570000
Registers: eax=0x00000000 ebx=0x00aff6c8 ecx=0xd27a70b4 edx=0x00000000
esi=0x24ee2080 edi=0x24ee207c esp=0x00aff6e8 ebp=0x00aff798
eflags=0x0001
version 6.2.17367, custom build
-no_dynamic_options -code_api -probe_api -stack_size 56K -max_elide_jmp 0 -max_elide_call 0 -no_inline_ignored_syscalls -native_exec_default_list » -no_native_exec_managed_code -no_indcall2direct -no_aslr_dr -pad_jmps_mark_no_trace
0x00aff798 0x706176f4
0x00aff7c4 0x70617591
0x00affcd0 0x706172db
0x00affd10 0x705a095d
0x00affd38 0x70610f2c
0x00affd58 0x7063c8c8>

Hmm in that case the issue seems to be with how DR interacts with your target and not in WinAFL. Can you try disabling your antivirus? Antivirus software caused similar issues in the past.

Seems like it. Can you confirm which version of DR would work perfectly with winafl?

I don’t have any antivirus, just windows defender but I don’t think that’s interfering here.

I tried it the with version 6.2.0-2, its working there. I don’t know what bug DynamoRIO introduced.
Anyways, I am running Winafl on linked code.

I am getting following statistics.

+- process timing ————————————-+- overall results —-+
| run time : 0 days, 0 hrs, 10 min, 35 sec | cycles done : 1 |
| last new path : none seen yet | total paths : 2 |
| last uniq crash : none seen yet | uniq crashes : 0 |
| last uniq hang : none seen yet | uniq hangs : 0 |
+- cycle progress ———————+- map coverage -+———————-+
| now processing : 0 (0.00%) | map density : 0.00% / 0.01% |
| paths timed out : 0 (0.00%) | count coverage : 1.00 bits/tuple |
+- stage progress ———————+ findings in depth ———————+
| now trying : splice 7 | favored paths : 2 (100.00%) |
| stage execs : 1/16 (6.25%) | new edges on : 2 (100.00%) |
| total execs : 420 | total crashes : 0 (0 unique) |
| exec speed : 0.69/sec (zzzz. ) | total tmouts : 0 (0 unique) |
+- fuzzing strategy yields ————+—————+- path geometry ——-+
| bit flips : 0/0, 0/0, 0/0 | levels : 1 |
| byte flips : 0/0, 0/0, 0/0 | pending : 0 |
| arithmetics : 0/0, 0/0, 0/0 | pend fav : 0 |
| known ints : 0/0, 0/0, 0/0 | own finds : 0 |
| dictionary : 0/0, 0/0, 0/0 | imported : n/a |
| havoc : 0/306, 0/96 | stability : 100.00% |
| trim : n/a, n/a +————————+
^C—————————————————-+

exec speed : 0.69/sec (zzzz. ) speed is way to slow. What do you think is the problem?

Источник

Dear!

I was doing some tests with a line to fuzzing firefox.

I wanted to try it and I also wanted to try doing a brute force of offset, the question that I tried with everyone and always gives me the same error, do you know why it is?

Error:

[-] PROGRAM ABORT : Error opening pidfile.txt
Location : create_target_process(), c:workwinaflsourceafl-fuzz.c:2361

Line :

afl-fuzz.exe -i in -o out -D C:winafl-masterdynobin64 -t 100 — -coverage_module mozglue.dll -coverage_module firefox.exe -fuzz_iterations 100 -target_module lgpllibs.dll -target_offset 0xB1D1 -nargs 2 — C:Program FilesMozilla Firefoxfirefox.exe @@

First time I see this error, but in general, the pid file is created in
https://github.com/googleprojectzero/winafl/blob/master/afl-fuzz.c#L2302
with -pidfile dynamorio flag. Perhaps instrumentation fails for some reason. These issues can be debugged by running the target in DynamoRIO directly (see the -debug mode in Readme).
Looking at the command line, the most likely reason I can see for instrumentation failing is the target path containing spaces, and not being quoted. It should probably be
«C:Program FilesMozilla Firefoxfirefox.exe»
instead of
C:Program FilesMozilla Firefoxfirefox.exe

Also, I would be really surprised if you could fuzz the whole of firefox (rather than a specific part) in this way and also if you could bruteforce a (meaningful) target_offset.

I meet the same issue, I solved this by open «cmd.exe» with administrator.

Hi, I also meet the same issue. I just test a very simple C program to make sure it works. The program simply reads from a file to check if it’s ‘bad!’. If so, then crashes. When I run WinAFL with static instrumentation mode -Y, it also shows «All programs time out.» issue.

Line:
afl-fuzz.exe -i D:Workspaceswinafltestcase -o D:Workspaceswinaflfindings -D D:SoftwareDynamoRIObin64 -t 20000 — -coverage_module testprog.exe — D:Workspaceswinaflprogramstestprog.exe @@

I’m not sure if this is related to this issue but your command line seems to be missing some required instrumentation flags (such as target module/function, number of function arguments and number of iterations). You should always run the debug mode first (see https://github.com/googleprojectzero/winafl/blob/master/readme_dr.md) and only run afl-fuzz if the debug log looks good.

@yuexizhumeng

The solution is change D:Workspaceswinaflprogramstestprog.exe to «D:Workspaceswinaflprogramstestprog.exe» like says @xinali

I was receiving the same error. I was mistakenly using DynamoRio bin32 executable instead of bin64.

The path string is the key。I also meet this error。

I have encountered the same problem. Have you solved this problem? The following is my command parameters and error message

C:UserslunaDesktopwinafl-masterbin64>afl-fuzz.exe -i C:UserslunaDesktop
input -o C:UserslunaDesktopout -D C:UserslunaDesktopDynamoRIO-Windows-7.
1.0-1bin64 -t 20000 -- -coverage_module test.exe -coverage_module
 test.dll -fuzz_iterations 5000 -target_module test.exe -target
_method wWinMain -nargs 2 -- E:testforwinafltest.exe @@
WinAFL 1.16b by <[email protected]>
Based on AFL 2.43b by <[email protected]>
[+] You have 1 CPU cores and 0 runnable tasks (utilization: 0%).
[*] Setting up output directories...
[+] Output directory exists but deemed OK to reuse.
[*] Deleting old session data...
[+] Output dir cleanup successful.
[*] Scanning 'C:UserslunaDesktopinput'...
[+] No auto-generated dictionary tokens to reuse.
[*] Creating hard links for all input files...
[*] Attempting dry run with 'id_000000'...

[-] PROGRAM ABORT : Error opening pidfile.txt
         Location : create_target_process(), c:workwinaflsourceafl-fuzz.c:2357

Below is the feedback of debugging mode, I did not see the relevant debugging file generated, if I did not use the error

C:UserslunaDesktopwinafl-masterbin64>C:UserslunaDesktopDynamoRIO-Window
s-7.1.0-1bin64drrun.exe -c winafl.dll -debug -coverage_module test.dll -tar
get_module test.exe -target_offset 0x0 -fuzz_iterations 10 -nargs
2 -- "E:testforwinafltest.exe @@"
 C:UserslunaDesktopinputalphatrans.png
ERROR: Target process E:testforwinafltest.exe is for the wrong architecture

I have tested the above methods. I have received the same results on both windows7 x86 and x64, and I started cmd.exe with Administartor.

Hi Taolaw,

As @anshuman-goel mentioned earlier, and because I lost a few minutes trying
to figure out what’s wrong, you are using wrong architecture for the DynamoRIO.
If it’s x86 make sure you use the bin32drrun.exe and bin32afl-fuzz.exe,
and consequently if it’s x64 use bin64drrun.exe and bin64afl-fuzz.exe.

From your command line above, it looks like you have compiled for x86 architecture.

Hope that helps,
Symeon

I am getting this same problem regardless of the combination of dynamoRIO and winafl that I use. I’m starting to wonder if the problem isn’t deeper than that, but digging into the .c file doesn’t illuminate the situation much.

I had a similar problem (pidfile error) with a command of the form

afl-fuzz.exe … -- -coverage_module … -- pathtoapp.exe someArg pathtosomeotherfile @@

I had to wrap each whitespace-separated part after the second -- in quotes, like so:

afl-fuzz.exe … -- -coverage_module … -- "pathtoapp.exe" "someArg" "pathtosomeotherfile" @@

It took me a while to figure it out because someArg was a simple number like 1000, so I had not expected to have to wrap it in quotes.

I met a similar problem (pidfile opening error) when I try to fuzz my application with below command:
afl-fuzz.exe -i in -o out -D «D:winaflDynamoRIO-Windows-8.0.0-1bin64» -t 20000 — -coverage_module «pathto*.dll» -coverage_module «pathtomyapp.exe» -fuzz_iterations 10 -target_module «pathtomyapp.exe» -target_offset 0x16e0 -nargs 2 — «pathtomyapp.exe» «-i» @@

myapp.exe also has a parameter «-i» to run it.

Don’t know why it does not work.

how to

I met a similar problem (pidfile opening error) when I try to fuzz my application with below command: afl-fuzz.exe -i in -o out -D «D:winaflDynamoRIO-Windows-8.0.0-1bin64» -t 20000 — -coverage_module «pathto*.dll» -coverage_module «pathtomyapp.exe» -fuzz_iterations 10 -target_module «pathtomyapp.exe» -target_offset 0x16e0 -nargs 2 — «pathtomyapp.exe» «-i» @@

myapp.exe also has a parameter «-i» to run it.

Don’t know why it does not work.

how to get target_offset value

how to avoid, Error opening pidfile.txt
Screenshot 2022-09-15 180409

Recommend Projects

  • React photo

    React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo

    Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo

    Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo

    TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo

    Django

    The Web framework for perfectionists with deadlines.

  • Laravel photo

    Laravel

    A PHP framework for web artisans

  • D3 photo

    D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Visualization

    Some thing interesting about visualization, use data art

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo

    Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo

    Microsoft

    Open source projects and samples from Microsoft.

  • Google photo

    Google

    Google ❤️ Open Source for everyone.

  • Alibaba photo

    Alibaba

    Alibaba Open Source for everyone

  • D3 photo

    D3

    Data-Driven Documents codes.

  • Tencent photo

    Tencent

    China tencent open source team.


#3528

sssd refuses to start when pidfile is present, but the process is gone




Closed: Fixed
5 years ago


Opened 5 years ago

by laggyluke.




Hmm, I haven’t tried to reproduce this issue, but it does sound like a bug, because the pidfile() function explicitly calls kill(pid, 0) to find out if the process with the number in the pidfile exists..



I was able to reproduce this one on a quick test. Didn’t check any further than «yes, I can reproduce the issue», though.



I do not think it is a bug. It is just wrong use-case.
pkill -KILL -F /var/run/sssd.pid is a wrong way how to stop sssd.

Anyway in case of container and some shared directories there needn’t be process with PID stored in /var/run/sssd.pid due to namespaces. So if you can see message «pidfile exists at /var/run/sssd.pid» then there is something fishy. and sssd should not try to clean this file itself. Such case should be investigated and file manually removed after finding + fixing reason/problem.



Anyway, we might enhance debug/error message.



I completely agree that killing sssd like that is a wrong use-case, obviously I only used it as an example of hard failure that results in a dangling pidfile. In my specific case it was OOM-killed — server misconfiguration plus some bad luck. But it would be great if sssd could be simply restarted by systemd instead of having to reboot the whole server.

I found the bit of code that apparently does the right thing:
https://github.com/SSSD/sssd/blob/0fba03cab9580cab6898e855bcd0ca9b2e54ce67/src/util/server.c#L181

Unfortunately my C skills are not good enough to prepare a pull request, although I might give it a try if noone else is interested.



I completely agree that killing sssd like that is a wrong use-case, obviously I only used it as an example of hard failure that results in a dangling pidfile. In my specific case it was OOM-killed — server misconfiguration plus some bad luck. But it would be great if sssd could be simply restarted by systemd instead of having to reboot the whole server.

You needn’t reboot whole server. You need to investigate thing a bit and find out why pid file exists. So in your case you will need to just remove pidfile.
and start sssd.

This is a reason why better error message might make it clear. But as i wrote in previous message. It needn’t be straightforward in container world.



BTW which version of sssd do you use? becasue later version of sssd use systemd + type notify and pidfile needn’t be use there.



I was able to reproduce this in a fresh VM running CentOS Linux release 7.3.1611 (Core) and sssd v1.15.2.

After further investigation we found out that in our setup sssd was hard killed after not being able to gracefully shut down in time on an overloaded server. But I still believe the actual reason for a hard kill is irrelevant. One way or another, we end up in a situation where the pidfile exists, but the corresponding process is no longer running. The pidfile can even be empty and it will still refuse to start.

I’m not sure I fully understand the container case that you’ve mentioned, but it looks like you’re describing a setup that has a pid namespace isolation together with a shared filesystem — is that actually a setup you want to support?



I was able to reproduce this in a fresh VM running CentOS Linux release 7.3.1611 (Core) and sssd v1.15.2.

This version of CentOS has sssd 1-14 by default.

After further investigation we found out that in our setup sssd was hard killed after not being able to gracefully shut down in time on an overloaded server. But I still believe the actual reason for a hard kill is irrelevant. One way or another, we end up in a situation where the pidfile exists, but the corresponding process is no longer running. The pidfile can even be empty and it will still refuse to start.
I’m not sure I fully understand the container case that you’ve mentioned, but it looks like you’re describing a setup that has a pid namespace isolation together with a shared filesystem — is that actually a setup you want to support?

Following steps should be sufficient workaround. sssd creates pidfile even though we moved from Type forking -> notify. So pid file is cleaned by SSSD in most cases but systemd does not know anything about it and cannot clean the file in case of corner cases (OOM …)

  • echo -e ‘[Service]nPIDFile=/var/run/sssd.pidn’ > /etc/systemd/system/sssd.service.d/sssd_pidfile.conf
  • systemctl daemon-reload
  • systemctl restart sssd.service

I still am not sure whether it is bug or feature :-) Because current state allows us to return back to «Type=forking» for testing purposes.



That’s exactly the kind of workaround that we’re going to use, thanks!

But there’s one more argument to fixing this on sssd side without relying on systemd or any other init system:

If sssd creates a pidfile in the first place, it is probably reasonable to expect it to take full ownership of the whole lifecycle around that pidfile, including cleaning up the stale one in case something goes wrong.



If sssd creates a pidfile in the first place, it is probably reasonable to expect it to take full ownership of the whole lifecycle around that pidfile, including cleaning up the stale one in case something goes wrong.

sssd takes care of PIDfile but it does not have a chance in case of OOM.

And as i mentioned few times we cannot remove files due to container use case.
Because containers usually have different PID namespace and we cannot say whether file is leftover after force shutdown (kill -9; OOM …) or files was created by different process in different PID namespace.



Lukas said he would tune the default systemd unit file, but nonetheless, this is a minor issue.

Metadata Update from @jhrozek:
— Issue assigned to lslebodn

5 years ago

Metadata Update from @jhrozek:
— Issue set to the milestone: SSSD 1.16.0

5 years ago

Metadata Update from @jhrozek:
— Issue priority set to: minor

5 years ago



Since we are required to release a new upstream tarball no later than Friday Oct-20, I’m moving tickets that will not be closed by that date to the next milestone, 1.16.1

Metadata Update from @jhrozek:
— Issue set to the milestone: SSSD 1.16.1 (was: SSSD 1.16.0)

5 years ago

Metadata Update from @lslebodn:
— Issue close_status updated to: Fixed
— Issue status updated to: Closed (was: Open)

5 years ago



SSSD is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in SSSD’s github repository.

This issue has been cloned to Github and is available here:
— https://github.com/SSSD/sssd/issues/4554

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Login
to comment on this ticket.

Metadata

Во-первых, обзор Winafl

Winafl — версия Windows AFL. AFL хочет быть не измельченным, но AFL не поддерживает платформу Windows, поэтому существует отличный бог для пересадки AFL на платформу Windows, которая является Winafl. AFL достигает своих функций, составив ворс и генетический алгоритм. Из-за взаимосвязей поддержки платформы склада в WinaFLL заменяется динамио динамической вставки вставки, а API Windows переписан. Так winafl = AFL + DynamoRio.

При использовании Winafl, чтобы сделать незма, вам необходимо указать целевую программу и соответствующий файл корпуса ввода теста, и должна быть такая целевая функция для вставленных свай. Эта функция включает в себя открытие и закрытие входного файла и анализа файла. Такие после обработки кучи можно гарантировать файл выполнения файла выполнения целевой программы, чтобы избежать повторного создания нового целевого процесса каждый раз, когда вновь создана разжигательная операция. В то же время входные файлы незма преобразуются в соответствии с соответствующим алгоритмом, и он определяется, используется ли охват целевого модуля для последующих незвающих операций.

Во-вторых, установка среды

1. Скачать winafl (https://github.com/ivanfratric/winafl), загруженный код сама содержит сборкущую версию, в том числе 32-битную и 64-битную, вы также можете составить его самостоятельно, так легко понять, изменить, модифицировать и использовать Winafl.

2. Скачать CMake (http://www.cmake.org), сборник Winafl требует CMake, Cmake — это программное обеспечение для перекрестной платформы. Установите Cmake, обратите внимание на автоматическое создание переменных среды при установке.

3. Скачать Dynamoorio (http://dynamorio.org/), кроссплатформенная платформа с открытым исходным кодом анализа динамического инструментального программного обеспечения для инструмента.

4. Затем вам нужен компилятор, вы можете использовать Visual Studio C ++, версия проблемы связана с Cmake, загружая последнюю модель Cmake, поддержку VS 2005-2015, но поскольку VS 2010 не полностью совместима с C99, так когда Компиляция, в STDINT не будет найдено ошибок. Вы можете скопировать один из других и C99 совместимых компиляторов, таких как MINGW, или поиск непосредственно из онлайн.

5. Реконструкция, пожалуйста, обратитесь к описанию Winafl в Github.

For a 32-bit build:

mkdir build32
cd build32
cmake -G"Visual Studio 15 2017" .. -DDynamoRIO_DIR=..pathtoDynamoRIOcmake -DINTELPT=1
cmake --build . --config Release

For a 64-bit build:

mkdir build64
cd build64
cmake -G"Visual Studio 15 2017 Win64" .. -DDynamoRIO_DIR=..pathtoDynamoRIOcmake -DINTELPT=1
cmake --build . --config Release

В-третьих, используйте опыт

Окружающая среда Win7, не запустилась на Win10

1.fuzz winafl тестовая программа test_gdiplus.exe

Сначала нам нужно определить целевую функцию незма, которая устанавливает -target_offset или -Target_Method, соответствующий параметрам. В этом примере основная функция представляет собой условную целевую функцию. Чтобы использовать -target_offset, вы можете просто просматривать смещение этой функции, этот пример равен 0x1680 (адрес начала IDA по умолчанию — 0x400000).

Введите каталог winafl bin32, создайте папку, вставьте копию файла BMP под bmp testCases Images BMP в каталог, который только что создан.

Если есть файл символа, вы можете напрямую установить параметры atarget_method в качестве основного, в противном случае вам нужно будет использовать Target_offset, и оба не могут использоваться одновременно. Для параметров -Coverage_Module мы можем выполнить следующую команду, чтобы получить его, обратите внимание, что каталог Dynamorio должен быть установлен в соответствии с фактической ситуацией. Модуль, загруженный во время реализации целевой программы, приведен в полученном файле журнала.

В текущем каталоге появится следующий файл, этот файл журнала фактически записывает модуль, загруженный во время теста Test_gdiplus.exe, и изменение положения функции смещения записано.


Затем мы можем ввести следующую команду, чтобы сделать незрение, «@@@» означает файл тестового случая, чтобы быть разбитым в каталоге в каталоге.


Результаты каждого этапа в пупугах будут сохранены в каталоге OUT, установленном опцией -O -O, где каталог сбоя или зависания сохраняет файл тестирования ошибок, как для доступной программы назначения Доступно уязвимость требует дальнейшего подтверждения.

Понравилась статья? Поделить с друзьями:
  • Win7 подключение не защищено как исправить
  • Win7 как изменить расширение файла
  • Win7 как изменить имя пользователя
  • Win32ui error createcompatibledc failed
  • Win32kbase sys синий экран windows 10 x64 как исправить