Coder Social home page Coder Social logo

fuzzware-fuzzer / fuzzware-emulator Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 14.0 152 KB

Fuzzware's emulation component. Belongs to fuzzware main repo.

License: Apache License 2.0

Shell 0.57% Python 29.23% Makefile 0.16% C 70.04%
fuzzing afl aflplusplus unicorn emulator

fuzzware-emulator's People

Contributors

alex-bellon avatar c01dkit avatar codelowsky avatar fabian-thomas avatar mrmatch246 avatar scepticz avatar sww13 avatar vainlystrain avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fuzzware-emulator's Issues

error when compile native_hooks.c

When executing this command(./build_docker.sh), I got following errors:
……
make: Entering directory '/home/user/fuzzware/emulator/harness/fuzzware_harness/native'
rm -rf .o core_peripherals/.o native_hooks.so timer.so interrupt_triggers.so util.so state_snapshotting.so native_tracing.so uc_snapshot.so core_peripherals/cortexm_nvic.so core_peripherals/cortexm_systick.so
clang -fpic -Wall -Werror -I/home/user/fuzzware/emulator/harness/fuzzware_harness/native//../../../unicorn/fuzzware-unicorn/include -g -O3 -c -o native_hooks.o native_hooks.c
native_hooks.c:184:34: error: use of undeclared identifier 'UC_HOOK_BLOCK_UNCONDITIONAL'
res |= uc_hook_add(uc, &tmp, UC_HOOK_BLOCK_UNCONDITIONAL, hook_block_debug, NULL, 1, 0);
^
native_hooks.c:464:65: error: use of undeclared identifier 'UC_HOOK_BLOCK_UNCONDITIONAL'
return uc_hook_add(uc, &hook_block_cond_py_handlers_handle, UC_HOOK_BLOCK_UNCONDITIONAL, hook_block_cond_py_handlers, user_data, 1, 0);
^
native_hooks.c:815:5: error: implicit declaration of function 'uc_fuzzer_init_cov' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
uc_fuzzer_init_cov(uc, bitmap, MAP_SIZE);
^
native_hooks.c:1116:9: error: implicit declaration of function 'uc_fuzzer_reset_cov' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
uc_fuzzer_reset_cov(uc, 1);
^
4 errors generated.
make: *** [native_hooks.o] Error 1
: recipe for target 'native_hooks.o' failed

I have searched all the project and found no file contains "UC_HOOK_BLOCK_UNCONDITIONAL" 、"uc_fuzzer_init_cov" or “uc_fuzzer_reset_cov ”. I want to know how to solve these problems, thanks!

I also tried to install locally, above errors still exist.

Is there a way to disable fuzz and performed like a normal Unicorn with NVIC support?

Hi, teams,

Fuzzware's emulate module implementation is so gorgeous. I have learned it for two weeks. Now I need a Unicorn Engine with a well-implemented NVIC module. Compared with coding from scratch, using fuzzware's module directly will be a better choice. After extracting the code, I found it was coupled with fuzzer tightly. Is there a way to disable fuzzing functionality and make it perform like an extended Unicorn Engine? I have tried to disable a few fuzzing-related functions, but I am very afraid it would do damage to the emulator itself.

I will be appreciated to get your response and help.

The definition and use of [UC_ARM_REG_OTHER_SP, UC_ARM_REG_SPSEL, UC_ARM_REG_CURR_SP_MODE_IS_PSP] registers are unnecessary.

Dear team,

I wanted to bring to your attention an issue I encountered while studying your code. I noticed that you have defined three additional registers that seem to have the same function as those in the original unicorn. However, these registers do not conform to ARM register definitions.

After further investigation, I realized that these registers are only used for stack swapping during interrupts. In order to properly change the stack during ARM interrupts, the value of UCARMREGCONTROL [1] should be modified to determine the current process stack being used. This is also mentioned in The Definitive Guide to ARM Cortex M3 and Cortex M4 Processors, as shown in the attached figure.
Snipaste_2023-01-02_19-50-58

I tried making this change in the code and the running results showed that unicorn was able to correctly handle the stack change request. I would like to submit my changes for your review so that you can see the specific location of the modification.

Thank you for your attention to this matter.

Best regards.

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.

  • 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.

  • 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.

  • D3 photo D3

    Data-Driven Documents codes.