Qiling fuzzer is not working
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- docker, python
- Ambito
- reverse-engineering, testing-qa
Direzione di ricerca
Start by reproducing the x86_64 example from the issue in the described Ubuntu Docker environment, using the supplied fuzz_x8664_linux.py flow and x8664_fuzz target. Inspect where the binary crashes immediately and how afl.ql_afl_fuzz is reached through the hook at the shown entry point. Done means the example starts fuzzing without an immediate crash.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I pulled clear docker Ubuntu image and followed the instruction and the example for x86_64 fuzzing is not working. The Binary crashes immediately.
Sample Code
#!/usr/bin/env python3
"""Simple example of how to use Qiling together with AFLplusplus.
Steps:
o Clone and build AFL++
$ git clone https://github.com/AFLplusplus/AFLplusplus.git
$ make -C AFLplusplus
o Build Unicorn support
$ ( cd AFLplusplus/unicorn_mode ; ./build_unicorn_support.sh )
o Start fuzzing
$ AFL_AUTORESUME=1 AFL_PATH="$(realpath ./AFLplusplus)" PATH="$AFL_PATH:$PATH" afl-fuzz -i afl_inputs -o afl_outputs -U -- python3 ./fuzz_x8664_linux.py @@
o Cleanup results
$ rm -fr afl_outputs/default/
"""
# No more need for importing unicornafl, try afl.ql_afl_fuzz instead!
import os
import sys
from typing import Optional
sys.path.append("../../..")
from qiling import Qiling
from qiling.const import QL_VERBOSE
from qiling.extensions import pipe
from qiling.extensions import afl
def main(input_file: str):
ql = Qiling(["./x8664_fuzz"], "../../rootfs/x8664_linux",
verbose=QL_VERBOSE.OFF, # keep qiling logging off
console=False) # thwart program output
# redirect stdin to our mock to feed it with incoming fuzzed keystrokes
ql.os.stdin = pipe.SimpleInStream(sys.stdin.fileno())
def place_input_callback(ql: Qiling, input: bytes, persistent_round: int) -> Optional[bool]:
"""Feed generated stimuli to the fuzzed target.
This method is called with every fuzzing iteration.
"""
# feed fuzzed input to our mock stdin
ql.os.stdin.write(input)
# signal afl to proceed with this input
return True
def start_afl(ql: Qiling):
"""Have Unicorn fork and start instrumentation.
"""
afl.ql_afl_fuzz(ql, input_file=input_file, place_input_callback=place_input_callback, exits=[ql.os.exit_point])
# get image base address
ba = ql.loader.images[0].base
# make the process crash whenever __stack_chk_fail@plt is about to be called.
# this way afl will count stack protection violations as crashes
ql.hook_address(callback=lambda x: os.abort(), address=ba + 0x126e)
# set afl instrumentation [re]starting point. we set it to 'main'
ql.hook_address(callback=start_afl, address=ba + 0x1275)
# okay, ready to roll
ql.run()
if __name__ == "__main__":
if len(sys.argv) == 1:
raise ValueError("No input file provided.")
main(sys.argv[1])
- Lingua principale
- Python
- Stelle
- 6.2k
- Fork
- 806
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di qilingframework/qiling
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
qilingframework/qiling#1690 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
qilingframework/qiling#1689 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
qilingframework/qiling#1688 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
qilingframework/qiling#1686 ·
-
Difficoltà 2/5 Mezza giornata Idoneità per principianti 82/100
qilingframework/qiling#1640 ·
Tutte le issue di qilingframework/qiling
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
huggingface/datasets#9128 ·
I maintainer di solito rispondono entro 1 giorno
-
priority:low ready-for-dev
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
OpenHands/extensions#975 ·
I maintainer di solito rispondono entro 1 giorno
-
Function/dict state handlers can't supply provider-state injected values (`generate.provider_state`)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
pact-foundation/pact-python#1789 ·
I maintainer di solito rispondono entro 9 giorni
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
juandresrodca/AdminForge#66 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno