diff --git a/afl/dict/add b/afl/dict/add new file mode 100644 index 0000000000000000000000000000000000000000..f5f1d7b86baa55b814b710e1c3008965293f47f1 --- /dev/null +++ b/afl/dict/add @@ -0,0 +1 @@ +add (1), (2) diff --git a/afl/dict/inc b/afl/dict/inc new file mode 100644 index 0000000000000000000000000000000000000000..8d7dd875a4aa61f7a57061449ae0b88f10353045 --- /dev/null +++ b/afl/dict/inc @@ -0,0 +1 @@ +inc (1), (2) diff --git a/afl/dict/int b/afl/dict/int new file mode 100644 index 0000000000000000000000000000000000000000..dc46b0bed599c012ea27ac6f2b5e5c379d76d3b9 --- /dev/null +++ b/afl/dict/int @@ -0,0 +1 @@ +int (1)h diff --git a/afl/dict/mov b/afl/dict/mov new file mode 100644 index 0000000000000000000000000000000000000000..b9220580f86733047efe165472bcd6c5860e182c --- /dev/null +++ b/afl/dict/mov @@ -0,0 +1 @@ +mov (1), (2) diff --git a/afl/dict/movzx b/afl/dict/movzx new file mode 100644 index 0000000000000000000000000000000000000000..8d2d4daccc3b0662239db58dc492027ad219ca57 --- /dev/null +++ b/afl/dict/movzx @@ -0,0 +1 @@ +movzx (1), (2) diff --git a/afl/dict/nop b/afl/dict/nop new file mode 100644 index 0000000000000000000000000000000000000000..c27745a58f6979cf0b0329e5921b56c9e8d07090 --- /dev/null +++ b/afl/dict/nop @@ -0,0 +1 @@ +nop diff --git a/afl/tests/instr-1 b/afl/tests/instr-1 new file mode 100644 index 0000000000000000000000000000000000000000..4222a3b5705262fbcc56eaf2e124f5afbb37dd87 --- /dev/null +++ b/afl/tests/instr-1 @@ -0,0 +1 @@ +add rsp,0x438 diff --git a/afl/tests/instr-10 b/afl/tests/instr-10 new file mode 100644 index 0000000000000000000000000000000000000000..7f2d4b8b1abe1da5f340d97e1512fea064472aaa --- /dev/null +++ b/afl/tests/instr-10 @@ -0,0 +1 @@ +lea rsp,[rsp-0x98] diff --git a/afl/tests/instr-11 b/afl/tests/instr-11 new file mode 100644 index 0000000000000000000000000000000000000000..9a0c23ff4fb24aa61605cb7a5909bb5748abb47f --- /dev/null +++ b/afl/tests/instr-11 @@ -0,0 +1 @@ +mov QWORD PTR [rsp+0x8],rcx diff --git a/afl/tests/instr-12 b/afl/tests/instr-12 new file mode 100644 index 0000000000000000000000000000000000000000..f78c106940afc9d79f635c50e1abba96940d48fc --- /dev/null +++ b/afl/tests/instr-12 @@ -0,0 +1 @@ +mov eax,0x4 diff --git a/afl/tests/instr-13 b/afl/tests/instr-13 new file mode 100644 index 0000000000000000000000000000000000000000..db4b6f4f5d9eb0d2f34ee81d3a8f9e1be21588a6 --- /dev/null +++ b/afl/tests/instr-13 @@ -0,0 +1 @@ +mov ecx,eax diff --git a/afl/tests/instr-14 b/afl/tests/instr-14 new file mode 100644 index 0000000000000000000000000000000000000000..60e63aeee55acceef47b0401539dfbd6fa59800e --- /dev/null +++ b/afl/tests/instr-14 @@ -0,0 +1 @@ +mov r13,QWORD PTR [r14+0x10] diff --git a/afl/tests/instr-15 b/afl/tests/instr-15 new file mode 100644 index 0000000000000000000000000000000000000000..512119dd5b0781b65c7fe29a700af28ae4dd6c91 --- /dev/null +++ b/afl/tests/instr-15 @@ -0,0 +1 @@ +mov ecx, 0x17e9 diff --git a/afl/tests/instr-16 b/afl/tests/instr-16 new file mode 100644 index 0000000000000000000000000000000000000000..c27745a58f6979cf0b0329e5921b56c9e8d07090 --- /dev/null +++ b/afl/tests/instr-16 @@ -0,0 +1 @@ +nop diff --git a/afl/tests/instr-17 b/afl/tests/instr-17 new file mode 100644 index 0000000000000000000000000000000000000000..660173d13037d97895ecf8bcff8b9f2b8de90dfc --- /dev/null +++ b/afl/tests/instr-17 @@ -0,0 +1 @@ +or edx,0x4 diff --git a/afl/tests/instr-18 b/afl/tests/instr-18 new file mode 100644 index 0000000000000000000000000000000000000000..5a699ee63a73b4dee2827d8375ccc734f9c4a15d --- /dev/null +++ b/afl/tests/instr-18 @@ -0,0 +1 @@ +pop r12 diff --git a/afl/tests/instr-19 b/afl/tests/instr-19 new file mode 100644 index 0000000000000000000000000000000000000000..ce273d2aae66128635de0106f8d4f8e4c4eb1d42 --- /dev/null +++ b/afl/tests/instr-19 @@ -0,0 +1 @@ +push r12 diff --git a/afl/tests/instr-2 b/afl/tests/instr-2 new file mode 100644 index 0000000000000000000000000000000000000000..284dc75ffc577e9e51beec48001caed1b4a31ed8 --- /dev/null +++ b/afl/tests/instr-2 @@ -0,0 +1 @@ +call 100002ce0 <_usage> diff --git a/afl/tests/instr-20 b/afl/tests/instr-20 new file mode 100644 index 0000000000000000000000000000000000000000..4c75d7d2d3c76c18d962628ce6524deed3690cee --- /dev/null +++ b/afl/tests/instr-20 @@ -0,0 +1 @@ +ret diff --git a/afl/tests/instr-21 b/afl/tests/instr-21 new file mode 100644 index 0000000000000000000000000000000000000000..d1b08305cf6ea9f85dd92c612fc02e794bcf368d --- /dev/null +++ b/afl/tests/instr-21 @@ -0,0 +1 @@ +sub rsp,0x438 diff --git a/afl/tests/instr-22 b/afl/tests/instr-22 new file mode 100644 index 0000000000000000000000000000000000000000..d90ae2dcb8ee15cb3d4e091f03264d5dceb6ef2f --- /dev/null +++ b/afl/tests/instr-22 @@ -0,0 +1 @@ +test eax,eax diff --git a/afl/tests/instr-23 b/afl/tests/instr-23 new file mode 100644 index 0000000000000000000000000000000000000000..f003afdf634806958e6cfdfd5d8fa65b31c91ce9 --- /dev/null +++ b/afl/tests/instr-23 @@ -0,0 +1 @@ +xchg ax,ax diff --git a/afl/tests/instr-24 b/afl/tests/instr-24 new file mode 100644 index 0000000000000000000000000000000000000000..c29e7ec7e3707cc58c8f736dbea159c8ab5c6d18 --- /dev/null +++ b/afl/tests/instr-24 @@ -0,0 +1 @@ +xor r13d,r13d diff --git a/afl/tests/instr-3 b/afl/tests/instr-3 new file mode 100644 index 0000000000000000000000000000000000000000..9c9f788b45e08e14efd2914297ee8e005c2fdf51 --- /dev/null +++ b/afl/tests/instr-3 @@ -0,0 +1 @@ +cmove edx,eax diff --git a/afl/tests/instr-4 b/afl/tests/instr-4 new file mode 100644 index 0000000000000000000000000000000000000000..7701fa0d28d9baa7507dc167c7b0b2cf4ff02aa6 --- /dev/null +++ b/afl/tests/instr-4 @@ -0,0 +1 @@ +cmp QWORD PTR [rbp-0x450],0x0 diff --git a/afl/tests/instr-5 b/afl/tests/instr-5 new file mode 100644 index 0000000000000000000000000000000000000000..3a4ade0a6db2eea2e404e879135509f77e21939b --- /dev/null +++ b/afl/tests/instr-5 @@ -0,0 +1 @@ +cmp eax,0xffffffff diff --git a/afl/tests/instr-6 b/afl/tests/instr-6 new file mode 100644 index 0000000000000000000000000000000000000000..4c4572f23ecadd2cb3495e06044f91df62e7aa8a --- /dev/null +++ b/afl/tests/instr-6 @@ -0,0 +1 @@ +inc rbx diff --git a/afl/tests/instr-7 b/afl/tests/instr-7 new file mode 100644 index 0000000000000000000000000000000000000000..53ab3d060ad8475f13e237e6ffb244591cf6a5ff --- /dev/null +++ b/afl/tests/instr-7 @@ -0,0 +1 @@ +je 100002b58 <_main+0x1a58> diff --git a/afl/tests/instr-8 b/afl/tests/instr-8 new file mode 100644 index 0000000000000000000000000000000000000000..721071be114d4512510f0c49d019ffbafe9858b7 --- /dev/null +++ b/afl/tests/instr-8 @@ -0,0 +1 @@ +jne 100002c9a <_main+0x1b9a> diff --git a/afl/tests/instr-9 b/afl/tests/instr-9 new file mode 100644 index 0000000000000000000000000000000000000000..ac47d4c55c094a76e9e6c068cab530ace1d1a9ef --- /dev/null +++ b/afl/tests/instr-9 @@ -0,0 +1 @@ +lea r12,[rbp-0x430] diff --git a/fuzz.sh b/fuzz.sh new file mode 100755 index 0000000000000000000000000000000000000000..e4db66297df0a9ee916bd4360ff46f24edc88e06 --- /dev/null +++ b/fuzz.sh @@ -0,0 +1,8 @@ +#!/bin/bash +pushd . +cd build && ../make-afl.sh +popd +pushd . +cd ./afl +afl-fuzz -i ./tests -o ./findings -x ./dict -- ../build/kstool/kstool x32 +popd diff --git a/make-afl.sh b/make-afl.sh new file mode 100755 index 0000000000000000000000000000000000000000..8b7ac0ee7404a969f86134da64a17aa7b9e91164 --- /dev/null +++ b/make-afl.sh @@ -0,0 +1,5 @@ +#!/bin/sh -ex + +cmake -DCMAKE_C_COMPILER=afl-clang -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DLLVM_TARGETS_TO_BUILD="all" -G "Unix Makefiles" .. +time make -j8 +