IntelLabs / kAFL

A fuzzer for full VM kernel/driver targets
https://intellabs.github.io/kAFL/
MIT License
645 stars 87 forks source link

Fix libvirt issue while make init #258

Open 5angjun opened 11 months ago

5angjun commented 11 months ago

Hi, i'm sangjun who is very interested in this project.

When i'm following kAFL windows tutorial, i found some problem.

libvirt issue

  1. I think you should change your ansible yaml like below: There is a libvirt issue in the make init step.
    b@b:~/kAFL-patch$ git diff HEAD
    diff --git a/deploy/intellabs/kafl/roles/examples/tasks/template_windows.yml b/deploy/intellabs/kafl/roles/examples/tasks/template_windows.yml
    index 1338d39..4324f7d 100644
    --- a/deploy/intellabs/kafl/roles/examples/tasks/template_windows.yml
    +++ b/deploy/intellabs/kafl/roles/examples/tasks/template_windows.yml
    @@ -76,3 +76,29 @@
     path: /usr/lib/qemu/qemu-bridge-helper
     mode: 'u+s'
    become: true
    +
    +
    +- name: Install required for init
    +  ansible.builtin.apt:
    +    # https://askubuntu.com/questions/1225216/failed-to-connect-socket-to-var-run-libvirt-libvirt-sock
    +    name: 
    +      - pax-utils
    +      - qemu
    +      - qemu-kvm
    +      - libvirt-clients
    +      - libvirt-daemon-system
    +      - virtinst
    +      - bridge-utils
    +    state: present
    +  become: true
    +  tags:
    +    - virtualization_packages
    +
    +- name: Enable and start libvirtd service
    +  ansible.builtin.systemd:
    +    name: libvirtd
    +    enabled: yes
    +    state: started
    +  become: true
    +  tags:
    +    - libvirtd_service

    스크린샷, 2023-11-07 13-07-10

libvirt box name changed

When Windows was completely boxed using the make build command, the name of the output changed from packer_windows_libvirt.box to packer_windows_libvirt_amd64.box as shown in the picture below.

i think this caused by libvirt package ( i guess so ) 스크린샷, 2023-11-07 14-18-54