Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fuzzing chapter #3

Merged
merged 75 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
358923f
Add fuzzing materials
maxammann Jan 11, 2024
84e7b1b
Update script
maxammann Jan 30, 2024
2ecc54e
Add further example
maxammann Jan 30, 2024
c18ba2c
Remove submodule
maxammann Feb 5, 2024
eca5087
Add nix-shell
maxammann Feb 5, 2024
1374171
Add manual for Google Docs
maxammann Feb 5, 2024
68e7774
Add basic structure
maxammann Feb 5, 2024
60ab531
Add internal link checker
maxammann Feb 5, 2024
3b5f7c1
Add blank for extenral links
maxammann Feb 5, 2024
5c04d3d
Add migrated docs
maxammann Feb 6, 2024
0a07162
Add required infrastructure for fuzzing chapter and notes
maxammann Feb 6, 2024
ea8926a
Finish including Rust section
maxammann Feb 7, 2024
c2b833b
Finish migrating content and moving things around
maxammann Feb 7, 2024
cc3496c
Update infrastructure code
maxammann Feb 7, 2024
667b706
Add notes
maxammann Feb 7, 2024
19bf937
Fix internal links
maxammann Feb 7, 2024
3abc253
Fix ref vs relref
maxammann Feb 7, 2024
dd0e30e
Fix minor formatting issues
maxammann Feb 7, 2024
9abaf80
Test preview workflow
maxammann Feb 7, 2024
1073ae2
Replace unicode with asci chars
maxammann Feb 7, 2024
30b566a
Fix workflow
maxammann Feb 7, 2024
ba792d0
Update hugo
maxammann Feb 7, 2024
573d458
Add permission to preview
maxammann Feb 7, 2024
f63500c
Deploy to 3rd parte repo
maxammann Feb 7, 2024
ff32f3b
Fix repo link
maxammann Feb 7, 2024
0c38d72
Correct base url
maxammann Feb 7, 2024
85eb072
Fix typo
maxammann Feb 7, 2024
7afa977
Make techniques sections non-clickable
maxammann Feb 8, 2024
dc730fb
Resolve todo comments
maxammann Feb 8, 2024
c0736c5
Fix headings
maxammann Feb 8, 2024
9cc34d8
Update
maxammann Feb 8, 2024
d660880
Update dictionary
maxammann Feb 8, 2024
4702eca
Use archlinux man pages
maxammann Feb 8, 2024
220c8cc
Update readme
maxammann Feb 8, 2024
db1df8d
Make linter happy
maxammann Feb 8, 2024
0af1ed2
Improve linting
maxammann Feb 8, 2024
441710e
Update lint action
maxammann Feb 8, 2024
42dd5f2
Ignore broken twitter links (500 errors)
maxammann Feb 8, 2024
d70d11a
Fix ignore pattern
maxammann Feb 8, 2024
caf8ccc
Fix figures
maxammann Feb 8, 2024
8b5e502
Revert render link
maxammann Feb 8, 2024
51985a8
Fix two small bugs
maxammann Feb 8, 2024
c1187e4
Fix typo
maxammann Feb 8, 2024
32067dd
typo
ahpaleus Feb 9, 2024
c82ddce
remove space
ahpaleus Feb 9, 2024
5c58664
fix link to asan
ahpaleus Feb 9, 2024
0b1ec5e
missing space
ahpaleus Feb 9, 2024
6a2cb6c
bold fix
ahpaleus Feb 9, 2024
a26aa79
asan link fix in rust
ahpaleus Feb 9, 2024
2ca07ac
asan link fix
ahpaleus Feb 9, 2024
869dad7
links to asan in fuzzers
ahpaleus Feb 9, 2024
b93dccc
differentiate awesome fuzzing lists
ahpaleus Feb 9, 2024
84bc7fa
semgrep resource fix
ahpaleus Feb 9, 2024
5625471
typo in dict
ahpaleus Feb 9, 2024
b3da048
dictionary fix and typo
ahpaleus Feb 9, 2024
605f548
Add beta tooltips
maxammann Feb 8, 2024
efc9c1c
Fix tooltips
maxammann Feb 8, 2024
628e489
Add a shortcode for highlighted listings
maxammann Feb 9, 2024
8b68740
semgrep in org initial commit
ahpaleus Jan 12, 2024
9f8585f
lints and dict
ahpaleus Jan 12, 2024
83a3694
minor formatting
ahpaleus Jan 12, 2024
05b17e2
indentation fix
ahpaleus Jan 12, 2024
48cc5e1
Update content/docs/static-analysis/semgrep/30-org.md
ahpaleus Jan 12, 2024
8015502
Update 99-resources.md
Vasco-jofra Jan 16, 2024
38260da
dict update
ahpaleus Jan 16, 2024
f5adbdf
Update 99-resources.md
ahpaleus Jan 16, 2024
18cf18d
Update _index.md
ahpaleus Jan 18, 2024
04a87b1
argument fix
ahpaleus Jan 18, 2024
0fb557d
additional typo and dict
ahpaleus Feb 9, 2024
5ec8bd1
Merge branch 'fuzzing-new' of github.com:trailofbits/testing-handbook…
ahpaleus Feb 9, 2024
23e5b89
Fix typos
maxammann Feb 9, 2024
05ba452
Fix typo
maxammann Feb 9, 2024
e8c490c
as llvm typo dict fix
ahpaleus Feb 9, 2024
f65df3e
Merge branch 'fuzzing-new' of github.com:trailofbits/testing-handbook…
ahpaleus Feb 9, 2024
9fb484e
Add todo comments for tooltips
maxammann Feb 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use nix
180 changes: 180 additions & 0 deletions .github/workflows/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Fuzzer
GCatch
Ghidra
GitLab
GraphQL
go-fuzz
golang
Golang
Expand Down Expand Up @@ -90,6 +91,7 @@ Pohekar
postMessage
pre-built
pre-compiled
README
QL
repo
relref
Expand All @@ -100,6 +102,7 @@ sanitization
SARIF
SARIF-file
SAST
SDLC
semgrep
Semgrep
SEMGREP_SEND_METRICS
Expand All @@ -114,12 +117,189 @@ src
subdirectories
trailofbits
Triaging
Trello
unhandled
unsanitized
untracked
untrusted
VSCode
vuln
XSS
YAML
Yaml-file
ZKDocs

# From fuzzing chapter
.gnca
.profdata
.profraw
03-asan
04-env
0x61
0x63
10-libfuzzer
1000s
100s
10k
10⁶
16TB
1k
20TB
25k
2x
AFL_PIZZA_MODE
ASan
AUTODICTIONARIES
Additional
AddressSanitizer
Base64
Bazel
CMake-based
CMakeLists
CNCF
CNCF-Fuzzing
CVE-2021-3156
CVE-2023-4863
ChatGPT
Codebases
DigitalOcean
Dockerfile
Dockerhub
Entrypoint
Fuzzers
GCC-compatible
Hongfuzz
Instrumentations
LLM
LLMs
LLVM
LLVM's
LLVM-based
LLVMFuzzerTestOneInput
LTO
LibAFL
LiveOverflow
MSVC
Mitigations
OpenAI's
OpenSSL
PNG
PRNG
Parsers
Protobuf
Pseudocode
SUT
SUTs
SanitizerCoverage
Spectre
Sudo
TCP
TLS
TODO
UTF-8
UndefinedBehaviorSanitizer
VM
VMs
Walkthrough
XCode
addresssanitizer
afl
afl-whatsup
aflpp
argc
argv
as
LLVM
asan
big-endian
bitstring
blackbox
bootloader
c-cpp
cargo-binutils
cargo-crate-ogg
cargo-geiger
checksums
close_fd_mask
cloudexec
cloudinit
cmake-based-project
code-coverage-using-gcov-and-gcovr
code-coverage-using-llvm-sanitizercoverage
codecs
concat
cryptographic
customFigure
de
demangler
deserialize
deserializers
durations
entrypoint
enum
facto
faq
faq-fuzzily-asked-questions
forkserver
function
fuzzer's
fuzzer-defined
fuzzer-options
fuzzers
gcc_plugin
gcov
gcovr
gnuplot
graybox
instrumentations
interestingness
intro-os
introduction-to-fuzzers
iteratively
lcov
libFuzzer's
libFuzzer-compatible
libFuzzer-like
libFuzzer-style
libfuzzer
libfuzzer-sys
libpng
llvm-cov
llvm-tools-preview
max_len=4000
mitigations
mutators
nondeterministically
ogg
optimizing-the-fuzzer-enable-persistent-mode
parsers
performant
permalink
precompiled
protobuf
pseudocode
rawHtml
readd
reconfigures
reproducibility
resourceFigure
rustfilt
rustup
standard-input-stdin-fuzzing
stdin
struct
structs
subcommand
subdirectory
sudo
sut-patching-overcoming-obstacles
th
toolchain
tradeoff
ubuntu
unparsable
uplevel
version
when-should-i-use-which-fuzzer
x64_64

2 changes: 1 addition & 1 deletion .github/workflows/hugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.108.0
HUGO_VERSION: 0.122.0
steps:
- name: Install Hugo CLI
run: |
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/markdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: DavidAnson/markdownlint-cli2-action@v9
- uses: DavidAnson/markdownlint-cli2-action@v15
with:
command: config
globs: |
.github/workflows/.markdownlint.jsonc
**/*.md
globs: "**/*.md"
# Spellcheck Markdown files using `retext` and `remark`
# Uses: a custom dictionary file
spellcheck:
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# .github/workflows/preview.yml
name: Deploy PR previews

on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed

concurrency: preview-${{ github.ref }}

permissions:
pull-requests: write

# Default to bash
defaults:
run:
shell: bash

jobs:
# Build job
build-deploy:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.122.0
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass Embedded
run: sudo snap install dart-sass-embedded
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo \
--minify \
--baseURL "https://trailofbits.github.io/testing-handbook-preview/pr-preview/pr-${{ github.event.number }}/"
- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./public/
token: ${{ secrets.TESTING_HANDBOOK_PREVIEW_REPO }}
deploy-repository: trailofbits/testing-handbook-preview
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ node_modules/*

.hugo_build.lock
resources/

.direnv/
3 changes: 3 additions & 0 deletions .markdownlint-cli2.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ignores": ["content/docs/fuzzing/**", "themes/book/**", "node_modules/**"]
}
File renamed without changes.
42 changes: 41 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Your browser will be automatically refreshed with changes whenever you save a fi

6. Edit, add, and create pull requests to merge your changes into `main`.

7. ❗Keep in mind that when you merge your PR into `main`, the content goes live in https://appsec.guide.
7. ❗Keep in mind that when you merge your PR into `main`, the content goes live in <https://appsec.guide>.
Our current policy forces at least one review before merging.

8. For updates to the home page, edit [content/_index.md](content/_index.md)
Expand Down Expand Up @@ -117,3 +117,43 @@ Your browser will be automatically refreshed with changes whenever you save a fi
- Familiarize yourself with the [Hugo Book theme](https://hugo-book-demo.netlify.app/)
as it has a couple of nice features (buttons, etc.)
- Reach out in [#testing-handbook](https://empirehacking.slack.com/archives/C06CSLSQAMB) Empire Hacking Slack if you have any questions.

## Editing

### Writing Guidelines

- The term "Testing Handbook" should be capitalized any time it appears on the website (whether in a header/subheader or running text),
since it is the title of a document. But if you'd like to avoid the capitalization because it looks strange, you can substitute
"Testing Handbook" for "this handbook" (since it's clear enough what the title of the handbook is).

### Workflow: From Google Docs

1. Make your document viewable via a link share.
2. Create a Google account or use your private one (If you use this method, then your document should be regarded as public, but unpublished).
3. Install [Docs to Markdown](https://workspace.google.com/marketplace/app/docs_to_markdown/700168918607).
This addon works better than pandoc.
4. Open the document and make a copy.
5. Open the copy and run the Addon.
6. Export the markdown and apply fixes:
- Search for occurences of `<code>` or `<strong>` or any other html tags
- Replace HTML tables with markdown ones (<https://jmalarcon.github.io/markdowntables/>)
- If you split your document, fix internal links.
- Add missing images.
- Fix `&lt;`, …, “, ’
- Adjust markdown captions ## -> #
- Verify missing formatting in PRO TIPs
- . at the end of fig captions?
- Note that index bundles do not use the "slug"

### Custom enviornments

```md
{{< customFigure "Caption" >}}
{{< /customFigure >}}

{{< resourceFigure "cov1.png" >}}
{{< /resourceFigure >}}

{{< hint info >}}
{{< /hint >}}
```
Loading
Loading