@aegis-scan/skills 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/ATTRIBUTION.md +75 -0
  2. package/CHANGELOG.md +129 -0
  3. package/LICENSE +21 -0
  4. package/README.md +123 -0
  5. package/dist/bin.d.ts +3 -0
  6. package/dist/bin.d.ts.map +1 -0
  7. package/dist/bin.js +122 -0
  8. package/dist/bin.js.map +1 -0
  9. package/dist/commands/info.d.ts +5 -0
  10. package/dist/commands/info.d.ts.map +1 -0
  11. package/dist/commands/info.js +75 -0
  12. package/dist/commands/info.js.map +1 -0
  13. package/dist/commands/install.d.ts +7 -0
  14. package/dist/commands/install.d.ts.map +1 -0
  15. package/dist/commands/install.js +87 -0
  16. package/dist/commands/install.js.map +1 -0
  17. package/dist/commands/list.d.ts +7 -0
  18. package/dist/commands/list.d.ts.map +1 -0
  19. package/dist/commands/list.js +82 -0
  20. package/dist/commands/list.js.map +1 -0
  21. package/dist/index.d.ts +13 -0
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.js +13 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/skills-loader.d.ts +23 -0
  26. package/dist/skills-loader.d.ts.map +1 -0
  27. package/dist/skills-loader.js +213 -0
  28. package/dist/skills-loader.js.map +1 -0
  29. package/package.json +63 -0
  30. package/skills/defensive/README.md +9 -0
  31. package/skills/mitre-mapped/README.md +10 -0
  32. package/skills/offensive/snailsploit-fork/advanced-redteam/SKILL.md +148 -0
  33. package/skills/offensive/snailsploit-fork/ai-security/SKILL.md +592 -0
  34. package/skills/offensive/snailsploit-fork/basic-exploitation/SKILL.md +10783 -0
  35. package/skills/offensive/snailsploit-fork/bug-identification/SKILL.md +1256 -0
  36. package/skills/offensive/snailsploit-fork/crash-analysis/SKILL.md +12466 -0
  37. package/skills/offensive/snailsploit-fork/deserialization/SKILL.md +185 -0
  38. package/skills/offensive/snailsploit-fork/edr-evasion/SKILL.md +1806 -0
  39. package/skills/offensive/snailsploit-fork/exploit-dev-course/SKILL.md +428 -0
  40. package/skills/offensive/snailsploit-fork/exploit-development/SKILL.md +699 -0
  41. package/skills/offensive/snailsploit-fork/fast-checking/SKILL.md +487 -0
  42. package/skills/offensive/snailsploit-fork/file-upload/SKILL.md +822 -0
  43. package/skills/offensive/snailsploit-fork/fuzzing/SKILL.md +340 -0
  44. package/skills/offensive/snailsploit-fork/fuzzing-course/SKILL.md +2105 -0
  45. package/skills/offensive/snailsploit-fork/graphql/SKILL.md +209 -0
  46. package/skills/offensive/snailsploit-fork/idor/SKILL.md +608 -0
  47. package/skills/offensive/snailsploit-fork/initial-access/SKILL.md +1528 -0
  48. package/skills/offensive/snailsploit-fork/jwt/SKILL.md +276 -0
  49. package/skills/offensive/snailsploit-fork/keylogger-arch/SKILL.md +197 -0
  50. package/skills/offensive/snailsploit-fork/mitigations/SKILL.md +1351 -0
  51. package/skills/offensive/snailsploit-fork/oauth/SKILL.md +366 -0
  52. package/skills/offensive/snailsploit-fork/open-redirect/SKILL.md +487 -0
  53. package/skills/offensive/snailsploit-fork/osint/SKILL.md +399 -0
  54. package/skills/offensive/snailsploit-fork/osint-methodology/SKILL.md +434 -0
  55. package/skills/offensive/snailsploit-fork/parameter-pollution/SKILL.md +595 -0
  56. package/skills/offensive/snailsploit-fork/race-condition/SKILL.md +881 -0
  57. package/skills/offensive/snailsploit-fork/rce/SKILL.md +1069 -0
  58. package/skills/offensive/snailsploit-fork/request-smuggling/SKILL.md +773 -0
  59. package/skills/offensive/snailsploit-fork/shellcode/SKILL.md +477 -0
  60. package/skills/offensive/snailsploit-fork/sqli/SKILL.md +372 -0
  61. package/skills/offensive/snailsploit-fork/ssrf/SKILL.md +830 -0
  62. package/skills/offensive/snailsploit-fork/ssti/SKILL.md +349 -0
  63. package/skills/offensive/snailsploit-fork/vuln-classes/SKILL.md +1229 -0
  64. package/skills/offensive/snailsploit-fork/waf-bypass/SKILL.md +820 -0
  65. package/skills/offensive/snailsploit-fork/windows-boundaries/SKILL.md +15153 -0
  66. package/skills/offensive/snailsploit-fork/windows-mitigations/SKILL.md +14546 -0
  67. package/skills/offensive/snailsploit-fork/xss/SKILL.md +784 -0
  68. package/skills/offensive/snailsploit-fork/xxe/SKILL.md +996 -0
  69. package/skills/ops/README.md +6 -0
@@ -0,0 +1,428 @@
1
+ <!-- aegis-local: forked 2026-04-23 from SnailSploit/Claude-Red@c74d53e2938b59f111572e0819265a1e73029393; attribution preserved, see ATTRIBUTION.md -->
2
+
3
+ # SKILL: Exploit Development
4
+
5
+ ## Metadata
6
+ - **Skill Name**: exploit-dev-curriculum
7
+ - **Folder**: offensive-exploit-dev-course
8
+ - **Source**: https://github.com/SnailSploit/offensive-checklist/blob/main/course.md
9
+
10
+ ## Description
11
+ Full exploit development course roadmap and syllabus: weekly topics, recommended reading, lab setup, and learning path from vulnerability classes through advanced exploitation. Use to structure exploit dev training or onboard new researchers.
12
+
13
+ ## Trigger Phrases
14
+ Use this skill when the conversation involves any of:
15
+ `exploit development course, exploit dev curriculum, learning path, syllabus, exploit dev training, vulnerability research training, course overview`
16
+
17
+ ## Instructions for Claude
18
+
19
+ When this skill is active:
20
+ 1. Load and apply the full methodology below as your operational checklist
21
+ 2. Follow steps in order unless the user specifies otherwise
22
+ 3. For each technique, consider applicability to the current target/context
23
+ 4. Track which checklist items have been completed
24
+ 5. Suggest next steps based on findings
25
+
26
+ ---
27
+
28
+ ## Full Methodology
29
+
30
+ # Exploit Development
31
+
32
+ ## Week 1: Foundations and Fuzzing Basics
33
+
34
+ ### Day 1: Introduction to Fuzzing
35
+
36
+ - **Goal**: Understand the fundamentals of fuzzing and get hands-on experience with `AFL++`.
37
+ - **Activities**:
38
+ - _Reading_: "Fuzzing for Software Security Testing and Quality Assurance" by `Ari Takanen`(From 1.3.2 to 1.3.8 and 2.4.1 to 2.7.5.7).
39
+ - _Online Resource_:
40
+ - [Fuzzing Book by `Andreas Zeller`](https://www.fuzzingbook.org/) - Read "Introduction" and "Fuzzing Basics."
41
+ - [`AFL++` Documentation](https://aflplus.plus/docs/) - Follow the quick start guide.
42
+ - [Interactive Module to Learn Fuzzing](https://github.com/alex-maleno/Fuzzing-Module.git)
43
+ - _Exercise_:
44
+ - Set up a Linux virtual machine (VM) with the necessary tools installed, including compilers and debuggers
45
+ - Run `AFL++` on a C program
46
+
47
+ ```bash
48
+ # Setting up AFL++
49
+ sudo apt install build-essential gcc-13-plugin-dev cpio python3-dev libcapstone-dev pkg-config libglib2.0-dev libpixman-1-dev automake autoconf python3-pip ninja-build cmake
50
+ wget https://apt.llvm.org/llvm.sh
51
+ chmod +x llvm.sh
52
+ sudo ./llvm.sh 19 all
53
+ curl --proto '=https' --tlsv1.2 -sSf "https://sh.rustup.rs" | sh
54
+ mkdir soft
55
+ cd soft
56
+ git clone --branch dev --depth 1 https://github.com/AFLplusplus/AFLplusplus
57
+ cd AFLplusplus
58
+ make distrib
59
+ sudo make install
60
+ # Phase 1
61
+ cd ~/ && mkdir tuts && cd tuts
62
+ git clone --branch main --depth 1 https://github.com/alex-maleno/Fuzzing-Module.git
63
+ cd Fuzzing-Module/exercise1 && mkdir build && cd build
64
+ CC=/usr/local/bin/afl-clang-fast CXX=/usr/local/bin/afl-clang-fast++ cmake ..
65
+ make && cd ../ && mkdir seeds && cd seeds && for i in {0..4}; do dd if=/dev/urandom of=seed_$i bs=64 count=10; done && cd ../build
66
+ afl-fuzz -i /home/dev/tuts/Fuzzing-Module/exercise1/seeds/ -o out -m none -d -- /home/dev/tuts/Fuzzing-Module/exercise1/build/simple_crash
67
+ # Phase 2
68
+ cd /home/dev/tuts/Fuzzing-Module/exercise2 && mkdir build && cd build
69
+ CC=/usr/local/bin/afl-clang-lto CXX=/usr/local/bin/afl-clang-lto++ cmake ..
70
+ make && cd ../ && mkdir seeds && cd seeds && for i in {0..4}; do dd if=/dev/urandom of=seed_$i bs=64 count=10; done && cd ../build
71
+ afl-fuzz -i /home/dev/tuts/Fuzzing-Module/exercise2/seeds/ -o out -m none -d -- /home/dev/tuts/Fuzzing-Module/exercise2/build/medium
72
+ ```
73
+
74
+ ### Day 2: Continue Fuzzing with `AFL++`
75
+
76
+ - **Goal**: Understand and apply advanced fuzzing techniques.
77
+ - **Activities**:
78
+ - _Reading_: Continue with "Fuzzing for Software Security Testing and Quality Assurance" (From 3.3 to 3.9.8).
79
+ - _Exercise_:
80
+ - Experiment with different `AFL++` options (for example, dictionary-based fuzzing, persistent mode).
81
+ - Running `AFL++` with a real-world application like a file format parser to mimic real-world scenarios.
82
+
83
+ ```bash
84
+ cd /home/dev/tuts && git clone --branch master --depth 1 https://github.com/davisking/dlib.git
85
+ cd dlib/tools/imglab && mkdir -p build && cd build && export AFL_USE_UBSAN=1 && export AFL_USE_ASAN=1
86
+ export ASAN_OPTIONS="detect_leaks=1:abort_on_error=1:allow_user_segv_handler=0:handle_abort=1:symbolize=0"
87
+ sudo apt install libx11-dev
88
+ cmake -DCMAKE_C_COMPILER=afl-clang-fast -DDLIB_NO_GUI_SUPPORT=0 -DCMAKE_CXX_COMPILER=afl-clang-fast++ -DCMAKE_CXX_FLAGS="-fsanitize=address,leak,undefined -g" -DCMAKE_C_FLAGS="-fsanitize=address,leak,undefined -g" ..
89
+ make -j8 && mkdir -p fuzz/image/in && cp /home/dev/tuts/dlib/examples/faces/testing.xml fuzz/image/in/
90
+ afl-fuzz -i fuzz/image/in -o fuzz/image/out -M Master -- ./imglab --stats @@
91
+ afl-fuzz -i fuzz/image/in -o fuzz/image/out -S Slave -- ./imglab --stats @@
92
+ sudo apt install gdb
93
+ git clone --branch master --depth 1 https://github.com/jfoote/exploitable.git ~/soft/exploitable
94
+ cd ~/soft/exploitable && sudo python3 setup.py install
95
+ wget -O ~/.gdbinit-gef.py -q https://gef.blah.cat/py && echo source ~/.gdbinit-gef.py >> ~/.gdbinit
96
+ sudo apt install valgrind
97
+ afl-collect -d crashes.db -e gdb_script -r -rr ./fuzz/image/out/Master ./afl-collect -j 8 -- ./imglab --stats @@%
98
+ ```
99
+
100
+ ### Day 3: Introduction to Google FuzzTest
101
+
102
+ - **Goal**: Understand in-process fuzzing with FuzzTest.
103
+ - **Activities**:
104
+ - _Reading_: Continue with "Fuzzing for Software Security Testing and Quality Assurance" (From 4.2.1 to 4.4).
105
+ - _Online Resource_: [Google FuzzTest](https://github.com/google/fuzztest) - Follow the tutorial and examples.
106
+ - _Exercise_: Write a simple fuzz target using FuzzTest.
107
+
108
+ ```bash
109
+ cd /home/dev/tuts && mkdir first_fuzz_project && cd first_fuzz_project
110
+ git clone --branch main --depth 1 https://github.com/google/fuzztest.git
111
+ cat <<EOT >> CMakeLists.txt
112
+ cmake_minimum_required(VERSION 3.19)
113
+ project(first_fuzz_project)
114
+
115
+ # GoogleTest requires at least C++17
116
+ set(CMAKE_CXX_STANDARD 17)
117
+
118
+ add_subdirectory(fuzztest)
119
+
120
+ enable_testing()
121
+
122
+ include(GoogleTest)
123
+ fuzztest_setup_fuzzing_flags()
124
+ add_executable(
125
+ first_fuzz_test
126
+ first_fuzz_test.cc
127
+ )
128
+
129
+ link_fuzztest(first_fuzz_test)
130
+ gtest_discover_tests(first_fuzz_test)
131
+ EOT
132
+ cat <<EOT >> first_fuzz_test.cc
133
+ #include "fuzztest/fuzztest.h"
134
+ #include "gtest/gtest.h"
135
+
136
+ TEST(MyTestSuite, OnePlustTwoIsTwoPlusOne) {
137
+ EXPECT_EQ(1 + 2, 2 + 1);
138
+ }
139
+
140
+ void IntegerAdditionCommutes(int a, int b) {
141
+ EXPECT_EQ(a + b, b + a);
142
+ }
143
+ FUZZ_TEST(MyTestSuite, IntegerAdditionCommutes);
144
+ EOT
145
+ mkdir build && cd build
146
+ CC=clang-18 CXX=clang++-18 cmake -DCMAKE_BUILD_TYPE=RelWithDebug -DFUZZTEST_FUZZING_MODE=on ..
147
+ sudo apt install libssl-dev
148
+ cmake --build .
149
+ ./first_fuzz_test --fuzz=MyTestSuite.IntegerAdditionCommutes
150
+ ```
151
+
152
+ ### Day 4: Introduction to `HonggFuzz`
153
+
154
+ - **Goal**: Understand Fuzz methods, types, ...
155
+ - **Activities**:
156
+ - _Reading_: Continue with "Fuzzing for Software Security Testing and Quality Assurance" (From 5.1.2 to 5.3.7).
157
+ - _Online Resource_: [HongFuzz](https://github.com/google/honggfuzz.git)
158
+ - _Exercise_: Fuzz OpenSSL server and private key
159
+
160
+ ```bash
161
+ cd /home/dev/soft && git clone --branch master --depth 1 https://github.com/google/honggfuzz.git
162
+ sudo apt-get install binutils-dev libunwind-dev libblocksruntime-dev clang
163
+ cd honggfuzz && make && sudo make install
164
+ cd /home/dev/tuts && git clone --branch master --depth=1 https://github.com/openssl/openssl.git
165
+ mv openssl openssl-master && cd openssl-master
166
+ CC=/usr/local/bin/hfuzz-clang CXX="$CC"++ ./config \
167
+ -DPEDANTIC no-shared -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -O0 \
168
+ -fno-sanitize=alignment -lm -ggdb -gdwarf-4 --debug -fno-omit-frame-pointer \
169
+ enable-tls1_3 enable-weak-ssl-ciphers enable-rc5 enable-md2 \
170
+ enable-ssl3 enable-ssl3-method enable-nextprotoneg enable-heartbeats \
171
+ enable-aria enable-zlib enable-egd enable-msan
172
+ make -j$(nproc)
173
+ cat <<EOT >> make.sh
174
+ set -x
175
+ set -e
176
+ echo "Building honggfuzz fuzzers"
177
+ for x in x509 privkey client server; do
178
+ hfuzz-clang -DBORINGSSL_UNSAFE_DETERMINISTIC_MODE -DBORINGSSL_UNSAFE_FUZZER_MODE -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -DBN_DEBUG -DLIBRESSL_HAS_TLS1_3 \\
179
+ -O3 -g -DFuzzerInitialize=LLVMFuzzerInitialize -DFuzzerTestOneInput=LLVMFuzzerTestOneInput -I/home/dev/tuts/openssl-master/include \\
180
+ -I/home/dev/soft/honggfuzz/examples/openssl -I/home/dev/soft/honggfuzz -g "/home/dev/soft/honggfuzz/examples/openssl/\$x.c" -o "libfuzzer.openssl-mastermemory.\$x" \\
181
+ ./libssl.a ./libcrypto.a -lpthread -lz -ldl -fsanitize=\$1
182
+ done
183
+ EOT
184
+ bash make.sh memory
185
+ honggfuzz --input ~/soft/honggfuzz/examples/openssl/corpus_server/ -- ./libfuzzer.openssl-mastermemory.server
186
+ honggfuzz --input ~/soft/honggfuzz/examples/openssl/corpus_privkey/ -- ./libfuzzer.openssl-mastermemory.privkey
187
+ ```
188
+
189
+ ### Day 5: Introduction to `Syzkaller`
190
+
191
+ - **Goal**: Begin kernel fuzzing with `Syzkaller`.
192
+ - **Activities**:
193
+ - _Tool_: Install `Syzkaller` on a Linux VM.
194
+ - _Online Resource_: [`Syzkaller` Documentation](https://github.com/google/syzkaller/blob/master/docs/linux/setup_ubuntu-host_qemu-vm_x86-64-kernel.md)
195
+ - _Exercise_: Start fuzzing the Linux kernel with `Syzkaller`.
196
+
197
+ ```bash
198
+ sudo apt update
199
+ sudo apt install make gcc flex bison libncurses-dev libelf-dev libssl-dev
200
+ cd ~/soft && git clone --branch v6.11 --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git kernel
201
+ cd kernel && make defconfig && make kvm_guest.config
202
+ vim .config
203
+ # Edit these inside .config file
204
+ #CONFIG_KCOV=y
205
+ #CONFIG_DEBUG_INFO_DWARF4=y
206
+ #CONFIG_KASAN=y
207
+ #CONFIG_KASAN_INLINE=y
208
+ #CONFIG_CONFIGFS_FS=y
209
+ #CONFIG_SECURITYFS=y
210
+ #CONFIG_CMDLINE_BOOL=y
211
+ #CONFIG_CMDLINE="net.ifnames=0"
212
+ make olddefconfig && make -j`nproc`
213
+ sudo apt install debootstrap
214
+ mkdir ~/soft/image && cd ~/soft/image
215
+ wget https://raw.githubusercontent.com/google/syzkaller/master/tools/create-image.sh -O create-image.sh
216
+ chmod +x create-image.sh && ./create-image.sh --distribution trixie --feature full
217
+ sudo apt install qemu-system-x86
218
+ cd /tmp/ && sudo qemu-system-x86_64 \
219
+ -m 2G -smp 2 -kernel ~/soft/kernel/arch/x86/boot/bzImage \
220
+ -append "console=ttyS0 root=/dev/sda earlyprintk=serial net.ifnames=0" \
221
+ -drive file=/home/dev/soft/image/trixie.img,format=raw \
222
+ -net user,host=10.0.2.10,hostfwd=tcp:127.0.0.1:10021-:22 \
223
+ -net nic,model=e1000 -enable-kvm -nographic \
224
+ -pidfile vm.pid 2>&1 | tee vm.log
225
+ # ssh to QEMU instance in another terminal.
226
+ ssh -i ~/soft/image/trixie.id_rsa -p 10021 -o "StrictHostKeyChecking no" root@localhost
227
+ wget https://dl.google.com/go/go1.23.3.linux-amd64.tar.gz
228
+ tar -xf go1.23.3.linux-amd64.tar.gz && sudo mv go /usr/local
229
+ cd ~/soft/ && git clone --branch master --depth 1 https://github.com/google/syzkaller
230
+ cd syzkaller && export PATH=$PATH:/usr/local/go/bin && make
231
+ cat <<EOT >> my.cfg
232
+ {
233
+ "target": "linux/amd64",
234
+ "http": "127.0.0.1:56741",
235
+ "workdir": "/home/dev/soft/syzkaller/workdir",
236
+ "kernel_obj": "/home/dev/soft/kernel",
237
+ "image": "/home/dev/soft/image/trixie.img",
238
+ "sshkey": "/home/dev/soft/image/trixie.id_rsa",
239
+ "syzkaller": "/home/dev/soft/syzkaller",
240
+ "procs": 8,
241
+ "type": "qemu",
242
+ "vm": {
243
+ "count": 4,
244
+ "kernel": "/home/dev/soft/kernel/arch/x86/boot/bzImage",
245
+ "cmdline": "net.ifnames=0",
246
+ "cpu": 2,
247
+ "mem": 2048
248
+ }
249
+ }
250
+ EOT
251
+ mkdir workdir && sudo ./bin/syz-manager -config=/home/dev/soft/syzkaller/my.cfg
252
+ sudo apt install w3m w3m-img && w3m http://127.0.0.1:56741
253
+ ```
254
+
255
+ ### Day 6: Analyzing Fuzzing Outputs
256
+
257
+ - **Goal**: Learn how to analyze and triage fuzzing outputs to identify unique crashes and potential vulnerabilities.
258
+ - **Activities**:
259
+ - **Reading**:
260
+ - _Book_: "Fuzzing for Software Security Testing and Quality Assurance" by `Ari Takanen` (Sections 6.1 to 6.5).
261
+ - _Article_: [Understanding Fuzzing and How It Discovers Security Flaws](https://www.synopsys.com/blogs/software-security/what-is-fuzz-testing/)
262
+ - **Online Resources**:
263
+ - [AddressSanitizer Documentation](https://clang.llvm.org/docs/AddressSanitizer.html)
264
+ - [GDB Python API](https://sourceware.org/gdb/onlinedocs/gdb/Python-API.html)
265
+ - [Exploitable Crash Analyzer](https://github.com/jfoote/exploitable)
266
+ - **Exercise**:
267
+ - **Set Up Crash Analysis Tools**:
268
+ - Install GDB and the `exploitable` plugin for crash classification.
269
+ - Ensure AddressSanitizer is set up for detailed memory error reports.
270
+ - **Collect and Triage Crashes**:
271
+ - Use crashes from previous fuzzing sessions with `AFL++`, `HonggFuzz`, or `Syzkaller`.
272
+ - Deduplicate crashes to focus on unique issues.
273
+ - **Analyze Crashes**:
274
+ - Use GDB and AddressSanitizer to investigate the root cause of each crash.
275
+ - Classify the crashes based on severity and `exploitability`.
276
+ - **Automate Crash Analysis**:
277
+ - Write a script to automate the analysis of multiple crash files.
278
+ - **Deduplicate Crashes**:
279
+ - Use stack traces or tools like `afl-collect` to identify unique crashes.
280
+ - **Document Findings**:
281
+ - Create a report summarizing each unique crash, including:
282
+ - The input that caused the crash.
283
+ - The type of vulnerability (buffer overflow, null pointer de-reference,...).
284
+ - Potential impact and severity.
285
+ - **Optional**:
286
+ - Explore other sanitizers like UndefinedBehaviorSanitizer (`UBSan`) for additional checks.
287
+ - **Discussion Points**:
288
+ - The importance of accurately triaging crashes to prioritize security fixes.
289
+ - Understanding false positives and how to filter them out.
290
+ - The role of sanitizers in providing detailed diagnostics.
291
+ - **Tips**:
292
+ - Always test crashes in a controlled environment to prevent unintended effects.
293
+ - Keep your analysis tools up to date for the best results.
294
+ - Collaborate with your team to verify findings and discuss mitigation strategies.
295
+ - **Reflection**:
296
+ - How does effective crash analysis improve the overall security posture of software?
297
+ - What challenges did you face during crash analysis, and how did you overcome them?
298
+
299
+ ```bash
300
+ # Install required tools
301
+ sudo apt update
302
+ sudo apt install gdb python3-pip
303
+
304
+ # Install 'exploitable' GDB plugin
305
+ git clone https://github.com/jfoote/exploitable.git
306
+ cd exploitable
307
+ sudo python3 setup.py install
308
+
309
+ # Ensure AddressSanitizer is available (comes with Clang)
310
+ which clang
311
+ # If not installed, install Clang
312
+ sudo apt install clang
313
+
314
+ # Set up environment variables for AddressSanitizer
315
+ export ASAN_SYMBOLIZER_PATH=$(which llvm-symbolizer)
316
+ export ASAN_OPTIONS=symbolize=1:abort_on_error=1
317
+
318
+ # Compile a target program with AddressSanitizer
319
+ cd ~/tuts/ && git clone --branch master --depth 1 https://github.com/hardik05/Damn_Vulnerable_C_Program vuln
320
+ # change int main(char *argv,int argc) to int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
321
+ # use size instead of argc and data instead of argv
322
+ cd vuln && echo "IMG" > crash_input && clang -g -O1 -fsanitize=address,fuzzer -o target_asan dvcp.c
323
+
324
+ # Example: Analyze a crash using GDB and 'exploitable'
325
+ gdb -ex "run < crash_input" \
326
+ -ex "exploitable" \
327
+ -ex "quit" --args ./target_asan
328
+ # Script to automate crash analysis
329
+ mkdir analyzed_crashes
330
+ for crash in crash-*; do
331
+ echo "Analyzing $crash"
332
+ gdb -batch -ex "run < $crash" \
333
+ -ex "exploitable" \
334
+ --args ./target_asan &> analyzed_crashes/$(basename $crash).log
335
+ done
336
+
337
+ curl --proto '=https' --tlsv1.2 -sSf "https://sh.rustup.rs" | sh
338
+ cargo install casr
339
+ casr-san -o asan.casrep -- ./test_asan_df
340
+
341
+ # Install afl-collect if using AFL++
342
+ sudo apt install afl-utils
343
+
344
+ # Collect and deduplicate crashes
345
+ afl-collect -rr --crashdir crashes_deduped \
346
+ --workdir afl_output -j 4 \
347
+ -- ./target_asan @@
348
+ # Compile with UBSan
349
+ clang -g -O1 -fsanitize=undefined -o target_ubsan target.c
350
+ ```
351
+
352
+ ### Day 7: Review and Recap
353
+
354
+ - **Goal**: Consolidate the knowledge gained during Week 1 by reviewing key concepts, clarifying doubts, and reinforcing practical skills in fuzzing and, initial crash analysis.
355
+ - **Activities**:
356
+ - **Review Session**:
357
+ - Revisit the key concepts from Days 1 to 6:
358
+ - Fundamentals of fuzzing and its importance in security testing.
359
+ - Hands-on experience with fuzzing tools: `AFL++`, `FuzzTest`, `HonggFuzz`, and `Syzkaller`.
360
+ - Setting up fuzzing environments and running basic to advanced fuzzing campaigns.
361
+ - Initial crash analysis and triaging techniques.
362
+ - Discuss any challenges faced during the exercises and share solutions.
363
+ - **Reading**:
364
+ - _Summary Articles_:
365
+ - [A Brief History of Fuzzing](https://www.oreilly.com/library/view/fuzzing-for-software/9780596554024/ch01.html)
366
+ - [Best Practices in Fuzzing](https://owasp.org/www-community/Fuzzing)
367
+ - _Documentation_:
368
+ - Revisit the documentation for the tools used to reinforce understanding of their features and options.
369
+ - **Knowledge Check**:
370
+ - **Quiz**:
371
+ - Prepare a set of questions to test your understanding of the week's material.
372
+ - What are the main differences between `AFL++` and `HonggFuzz`?
373
+ - How does in-process fuzzing with `FuzzTest` differ from traditional fuzzing methods?
374
+ - Explain the purpose of sanitizers like AddressSanitizer in fuzzing campaigns.
375
+ - Describe the process of setting up `Syzkaller` for kernel fuzzing.
376
+ - **Flashcards**:
377
+ - Create flashcards for important terms and concepts, such as:
378
+ - Mutation-based fuzzing
379
+ - Coverage-guided fuzzing
380
+ - Sanitizers
381
+ - Crash triaging
382
+ - Deduplication of crashes
383
+ - **Hands-On Practice**:
384
+ - **Consolidate Exercises**:
385
+ - Re-run previous fuzzing sessions with additional configurations to reinforce learning.
386
+ - Try fuzzing a new simple application using the tools you've learned.
387
+ - **Collaborative Learning**:
388
+ - If possible, discuss with peers or online communities about your findings and methodologies.
389
+ - Share your crash analysis reports and get feedback.
390
+ - **Deep Dive into Topics of Interest**:
391
+ - Choose a topic or tool from the week that you found most challenging or interesting and spend extra time exploring it.
392
+ - For example, delve deeper into `Syzkaller`'s syscall descriptions or explore advanced options in `AFL++`.
393
+ - **Discussion Points**:
394
+ - **Challenges and Solutions**:
395
+ - Reflect on any obstacles you faced during the exercises.
396
+ - Discuss strategies for overcoming common issues in fuzzing campaigns, such as dealing with large numbers of crashes or configuring complex tools.
397
+ - **Real-World Applications**:
398
+ - Consider how the fuzzing techniques learned can be applied to real-world software projects.
399
+ - Discuss the impact of effective fuzzing on software security and quality assurance.
400
+ - **Tips**:
401
+ - **Documentation and Note-Taking**:
402
+ - Maintain detailed notes of your configurations, commands used, and observations from your fuzzing sessions.
403
+ - Document any anomalies or unexpected behavior for future reference.
404
+ - **Tool Mastery**:
405
+ - Familiarize yourself with the command-line options and configurations of each tool.
406
+ - Practice writing custom scripts to automate repetitive tasks in your fuzzing workflow.
407
+ - **Reflection**:
408
+ - **Self-Assessment**:
409
+ - Evaluate your understanding of the week's material.
410
+ - Identify areas where you feel confident and areas that may require additional study.
411
+ - **Goal Setting**:
412
+ - Set specific objectives for the next week based on your reflection.
413
+ - For example, aim to understand advanced features of a particular fuzzing tool or improve your crash analysis skills.
414
+ - **Optional Activity**:
415
+ - **Beginner's Capture the Flag (CTF)**:
416
+ - Participate in a beginner-level CTF that focuses on binary exploitation and fuzzing challenges.
417
+ - Apply the skills you've learned in a competitive and practical environment.
418
+ - **Additional Resources**:
419
+ - **Books**:
420
+ - _"The Art of Software Security Assessment"_ by Mark Dowd, John McDonald, and Justin Schuh – Chapters on fuzzing and vulnerability discovery.
421
+ - **Online Courses**:
422
+ - [Coursera: Software Security](https://www.coursera.org/learn/software-security) – Sections related to input validation and fuzz testing.
423
+ - **Action Items for Next Week**:
424
+ - Prepare for Week 2, which focuses on Crash Analysis.
425
+ - Ensure your environment is set up with debugging tools like GDB, WinDbg (for Windows), and other necessary utilities.
426
+
427
+ ## Week 2: Crash Analysis
428
+