Giter Club home page Giter Club logo

optee_fuzzer's People

Contributors

martijnb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

optee_fuzzer's Issues

Where is "afl-tee" directory?

In optee_os.diff around line 420:

+#include "../../../afl-tee/shared/info.c"
+#include "../../../afl-tee/shared/validate.c"
+
+#include "../../../afl-tee/shared/include/afl-tee-trace.h"

However this repo DOES NOT contain afl-tee.

Besides, build.diff generates build/Makefile like this:

##########
# AFL-TEE
##########
.PHONY: afl
afl:
	cd ../afl && AFL_NO_X86=1 CC=$(AARCH64_CROSS_COMPILE)gcc make clean all

.PHONY: afl-tee
afl-tee:
	cd ../afl-tee && CC=$(AARCH64_CROSS_COMPILE)gcc make CROSS_COMPILE_S_USER=$(CROSS_COMPILE_S_USER) \
														 CROSS_COMPILE_NS_USER=$(CROSS_COMPILE_NS_USER) \
														 TEEC_EXPORT=$(OPTEE_CLIENT_EXPORT) \
														 TA_DEV_KIT_DIR=$(OPTEE_OS_TA_DEV_KIT_DIR)

Where are these two directories: afl and afl-tee ? This really confused me a lot.

I have modified the wrong patches, but still stuck at this problem.

How to get seeds

Question: How to get seeds as fuzzer input

AFL_POST_LIBRARY=/path/to/fuzzer/afl_validate.so afl-fuzz -i /path/to/fuzzer/seeds -t 300+ -o /tmp/state -M $1 -- /path/to/fuzzer/tee_invoke_svc

Prerequisite:

  • I have applayed the patches.
  • I have watched the video and readed the pdf.
  • I have some questions,because I am not familiar with optee. But first,I want to run it.
  • In the codes,we use system calls as data.

but we how to get the system calls data as fuzzer seed?
I think the struct CTX in afl-tee/shared/include/afl-tee.h maybe important.

typedef struct {
    uint8_t nr;

    uint8_t __pad[3]; // It seems it's cheaper to have aligned accesses with 3 pad bytes than unaligned mem

    uint32_t arg_type; /* arg_type[TEE_SVC_MAX_ARGS]; */

    SYSCALL_ARG args[]; /* args[TEE_SVC_MAX_ARGS]; */
} SYSCALL_INVOKE __attribute__ (( aligned(8) ));

typedef struct {
    const void* const buf;
    const size_t buf_len;

    const SYSCALL_INVOKE* const cmd_first;
    const SYSCALL_INVOKE* cmd_current;

    const void* const data;
    const size_t data_len;

    char** p_error;
} CTX;

For argument generating

Hi there,
I'm wondering how you handle with complicated structures which are used by syscalls……
For example, when fuzzing the function "cipher_update", the first parameter is "cryp_handle", which should be a meaningful pointer that points to a real complex structure, and this structure contains even more pointers and sub-structures. Simply doing bitflip of the function calls seems not feasible. How did you solve this problem?
So grateful if you could help me with it :)

AFL_TRACE_SVC

Hello,
When I use AFL_TRACE_SVC=/tmp hello_world in normal world, it doesn't work and runs the same as hello_world. What's the problem TAT
image

make error

When I do "make" I have this error. How can I solve it?

make

For seeding formats

Hi there,

I am wondering if the hex format for collected system call sequences was defined by you?
0
If so, would it be possible for you to give some documentation links to understand the format?

Build Instructions

How do they apply the patches to the OP-TEE build system, client library and OS?
what is there to do?

An unexpected error while fuzzing optee

When I fuzz the optee system, the afl often stops running after a while. The error in secure world is shown as follows. Have you ever encountered this problem, or could you give me any suggestion?
6ZEF4SUQTBN6 YV`$6XXN3A

For coverage

Hello, I have read part of your code and watched your video, and learned a lot. Thank you very much.
I have a question that I don't know how you get coverage, I can see that you are handling bitmaps in TA, but I'm not sure if you have instrumentation or anything like that.
The code looks a little difficult. If possible, could you please help me solve it
Looking forward to your reply

How to call __afl_log

we konw before use afl-fuzz , we need to insert code by afl-gcc ;
However, in this response ,wo dont use afl-gcc;
So, we have to call __afl_log by optee fuzzer ;

I dont find any code,that use __afl_log.

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.