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

Final Submission: Fuzzing Executable Tutorial #1705

Merged
merged 5 commits into from
Apr 6, 2022
Merged

Conversation

bpalagi
Copy link

@bpalagi bpalagi commented Apr 5, 2022

Assignment Proposal

Title

Katacoda Executable Tutorial demonstrating and explaining Fuzzing

Names and KTH ID

Deadline

Task 1

Category

Executable Tutorial

Description

Fuzz testing is an essential topic for testing and security.

We created a Katacoda Scenario with the goal of teaching the user how to effectively use Atheris, Google's Python Fuzzing tool which is a part of OSS-Fuzz and can be integrated into ones own git repository using ClusterFuzzLite.

In the tutorial we covered: Background information on fuzzing as a testing technique, the Pros and Cons of Fuzzing versus standard or other testing methods, how to integrate Google's Atheris Python fuzzer with a Python program, and how to add this type of fuzzing into a CI workflow with GitHub Actions using ClusterFuzzLite.

Final Submission Links:

Katacoda-Scenario Repository: https://github.com/bencivjan/katacoda-scenarios

Katacoda-Scenario Tutorial: https://www.katacoda.com/bencivjan/scenarios/fuzzing-exec-tutorial


Grading Criteria We Intended To Meet

Yes No
executable: The tutorial can be automatically executed from beginning to the end, in the browser or in CI (see below) Mandatory -
ilo: The tutorial states the intended learning outcomes. Mandatory -
motivation: The tutorial is clearly motivated (why it matters for Devops?) Yes No
browser-based: The tutorial can be successful executed in the browser (katacoda is recommended) Yes No
ci-based: The tutorial can successful be executed as a CI job Yes No
background: The tutorial gives enough background Yes No
illustrated: The tutorial is illustrated with an informative figure (eg a flowchart) Yes No
pedagogical: The tutorial is easy to follow Yes No
original: The tutorial is original, no or few similar tutorials exist on the web Yes No
easter-eggs: The tutorial contains an easter egg Yes No
language: The language is appropriate (structure, grammar, spelling) Yes No

@cesarsotovalero cesarsotovalero self-assigned this Apr 6, 2022
@cesarsotovalero cesarsotovalero added final_submission The final submission of a task tutorial One of the task categories listed in README.md labels Apr 6, 2022
@cesarsotovalero
Copy link

LGTM!

@cesarsotovalero cesarsotovalero merged commit 18a33ee into KTH:2022 Apr 6, 2022
Eyskha added a commit to Eyskha/devops-course that referenced this pull request Apr 6, 2022
* Executable tutorial: How to automate E2E-testing in React & Jest, using Github actions. (KTH#1589)

* Project proposal for Executable tutorial

* fix: renamed itle

* doc: Add readme for the task (KTH#1591)

* Added README.md for Project Proposal (KTH#1588)

* Added README.md for Project Proposal (KTH#1590)

Co-authored-by: Johanna Loev <[email protected]>

* Presentation Proposal: Optimization Strategies for Test Suite Runtimes in Large Software Applications (KTH#1573)

* Project proposal

* Project proposal

* Move readme to correct location

* Rename proposal dir

* Rename proposal dir

* Rename proposal dir

* Small format change

* Small format change

* Small format change

* Small format change

Co-authored-by: Luke LeVasseur <[email protected]>

* Presentation Proposal: gatien-myechui (KTH#1597)

* Executable Tutotial: Adding bugs to code to evaluate tests Using Stryker Mutator in JS (KTH#1575)

* feat: test

* feat: first proporsal

* feat: first proporsal

* demo proposal: Automated embedded testing of FreeRTOS using Jenkins and AWS (KTH#1578)

* assignment proposal: demonstration for week1: testing & continuous integration

* Rename markdown file

* not ignoring cases anymore

* fix titles

* Delete Readme.md

* put proposal inside week folder

* fix schema

* Update README.md

* Update README.md

* Open source proposal: enhancement of embedded Rust libraries (testing) (KTH#1587)

* open source proposal: embedded rust libraries

* changed email email

* added missing assignment

* Demo proposal - Real-Time testing of a video game (KTH#1581)

* Add README for demo

* moved the readme

* fixed readme

* Demo: Testing frameworks for JavaScript in frontend and backend (KTH#1594)

* added our demo proposal

* modified demo proposal

* Weekly schedules

We'll update the schedule for presentations and demos here

* Update sessions on bots and dependencies

* update the script based on the new folder structure

* action: update the target branch name (KTH#1609)

* added README describing our presentation proposal (KTH#1593)

* added README describing our presentation proposal

* updated readme to fit the expected format

* Update week 2 agenda

* Update demo + presentation weeks

* First proposal for course automation (KTH#1579)

* Add proposal for course automation task (KTH#1586)

* Add proposal for course automation task

* Rework proposal

* Slight modification

* Update README.md

Co-authored-by: Khashayar Etemadi <[email protected]>

* Essay proposal: CI comparison (KTH#1598)

* docs: add README for proposal (KTH#1603)

* executable-tutorial: proposal GH Action optimization (KTH#1572)

* executable-tutorial: proposal GH Action optimization

* fix: formatting of README.md

* Update readme.md

* Update readme.md

* Presentation proposal - Facebook blackout (KTH#1592)

* added our presentation proposal

* added presentation

* Rename contributions/presentation/README.md to contributions/presentation/week2-testing-and-CI/svanhol-libl/README.md

Co-authored-by: vladomitrovic <[email protected]>

* Update readme.md

* Presentation proposal - Code Coverage (KTH#1582)

* Added a presentation proposal for code coverage.

* Correct folder

* Changed readme to comply with necessary formatting.

* Reformulated our proposal to be more specific.

Co-authored-by: vladomitrovic <[email protected]>

* Update week 2 agenda

* Update readme.md

* Update README.md

* Presentation : robot framework and end user test (KTH#1611)

* Delete README.md

* Update readme.md

* Delete README.md

* Added demo proposal (KTH#1614)

Co-authored-by: Preston Chao <[email protected]>

* Create README.md (KTH#1612)

* Create Proposal for presentation: deployment of code with Buddy (KTH#1604)

* Create Proposal for presentation: deployment of code with Buddy

* Rename contributions/presentation/week3-CD-and-feature-flag/lhagm-shotaro/Proposal for presentation: deployment of code with Buddy to contributions/presentation/week3-CD-and-feature-flag/lhagm-shotaro: README.md

* Update lhagm-shotaro: README.md

* DEMO Proposal: Eiffel Protocol demonstration of usage (KTH#1610)

* Update README.md

* moved proposal to correct space

* added slides used in the presentation and a link to them (if needed) in the README. (KTH#1621)

* Presentation Proposal Update: Add link to slides (KTH#1613)

* link to slides

* format

* ugh format

Co-authored-by: Luke LeVasseur <[email protected]>

* Final submission: Presentation (gatien-myechui) (KTH#1620)

* unregistere user removed from foldername

* unregistered user removed from the readme

* Update and rename readme.md to README.md

* Update README.md

* Demo proposal : Continuous Delivery of a Tauri app (KTH#1628)

* Added task 1 proposal

* Fixed typo

* Updated folder name

* Added demo proposal

* Fixed email address

* Fixed typos

* Course automation proposal - Automatic labeling of PRs (KTH#1608)

* add proposal for course automation task

* add new proposal

* align demo length with presentation length (KTH#1618)

* course-automation: Automatic verification for mandatory parts of course-automation final (KTH#1629)

* docs: 📝 task: course-automation complete

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Adds proposal for course automation task. (KTH#1606)

Adds proposal for a course automation task that would automatically fetch calendar events for the course to display in a file of choice.

* Add slides week 1 presentation slides (KTH#1640)

* Presentation proposal : Robot framework


Assignment Proposal
Robot framework and user test 


Names and KTH ID

    Pauline Vaillant ([email protected])
    Asim Jarrar ([email protected])

Deadline

Task 1
Category
Presentation


Description
Presentation of robot framework

* Change readme place

* Delete paulinev-asmi

* Create readme

* Correction file name

* Delete typo directory

* Correct typo 2

* Delete paulinev-asim

* Create readme.md

* Remove wrong typo directory

* Update readme.md

* Add presentation slide

* Add presentation slides

* Delete useless directory

* Demo proposal: Demonstration of continuous deployment using Bitbucket Pipes (KTH#1641)

* Create proposal template

* Update readme.md

* Added task proposal

* Fixed kth name

* fix readme

* Finished Executable Tutorial - Build automation with Maven and Selenium to maintain test automation  (KTH#1632)

* Added README.md for Project Proposal

* Added grading information for the executable tutorial

* cleaning

* executed tutorial: Github Action CI pipeline using CodeQL for static code scanning (DevSecOps Application) (KTH#1616)

* Adding Assignment proposal

* Update README.md

Adding links to our GitHub handles

* Update README.md

Edit description

* Update README.md

Removing Github handles as it crashes the script

* Updating folder name

* Add repository links of "Testing frameworks for JavaScript in frontend and backend" demo to respective readme (KTH#1625)

* ADD tutorial proposal for Randoop (KTH#1648)

* added readme for demo proposal (KTH#1642)

* Presentation Proposal: An overview of continuous deployment in the Microsoft Azure environment (KTH#1644)

* Create README.md

* Update README.md

* Update README.md

* Added readme for presentation proposal (KTH#1637)

* presentation: Serverless in a hybrid architecture (KTH#1615)

* Adding initial proposal

* Fixing folder name

* Added readme for tutorial (KTH#1627)

* executable tutorial (KTH#1643)

* demo proposal for argocd (KTH#1649)

* Course Automation: Enforcing course submission rules (KTH#1650)

* civjan-palagi course automation proposal

* Update README.md

Co-authored-by: Khashayar Etemadi <[email protected]>

* demo proposal: CD using React Native and Google Cloud (KTH#1635)

Co-authored-by: Filip Bäck <[email protected]>

* Course Automation Proposal: Make Pull Request shell script (KTH#1645)

* add proposal for mpr shell script

* update readme

* update

Co-authored-by: Luke LeVasseur <[email protected]>

* Essay proposal - Continuous deployment - How does feature toggle fit in? (KTH#1630)

* Demo proposal: CD of a Node.js web service on Heroku with a Github Actions pipeline (KTH#1636)

* Create demo proposal readme

* Update README.md

* Update README.md

* Update README.md

Co-authored-by: Khashayar Etemadi <[email protected]>

* Presentation proposal: Canary Deployment - Why you and your friends might have different versions of the same app (KTH#1623)

* Added README for presentation for week three

* Blank line for PR update

Now that the asim not registered problem is fixed

* Added presentation in Category

Co-authored-by: tobiasgg <[email protected]>

* Add files via upload (KTH#1653)

* Proposal Executable Tutorial: Test automation using Cucumber with Gradle (KTH#1658)

* WIP: program of week 3 (KTH#1647)

* Update readme.md

* Update readme.md

* Update week 4 presentation/demo schedule (KTH#1672)

Co-authored-by: Khashayar Etemadi <[email protected]>

* Create README.md (KTH#1651)

* Update readme.md (KTH#1676)

* Update readme.md

* Delete README.md

* Update readme.md

* Update required number of words for essays check

* Essay: Gitlab CI vs Github Actions (KTH#1688)

* Presentation Proposal: Handling multiple services in a monorepo using Docker (KTH#1677)

Co-authored-by: Luciano <[email protected]>

* Update readme.md

* Course Automation: Implementation of MPR shell script (KTH#1654)

* initial script

* MPR functionality working

* Clean up

* Update alias in help

* Clean Up

* Small change for demo

* Small change for demo

* Auto-fill description body with readme contents

* Update description logic

* Update description logic

* Tweaks

* Only use GH Username if user not populated

* Tweak

* Add link to readme for submission

* Remove script from submission

Co-authored-by: Luke LeVasseur <[email protected]>

* Proposal: Contribution to open-source (KTH#1721)

* Add completed demo branch (KTH#1719)

* Create demo proposal readme

* Update README.md

* Update README.md

* Update README.md

* Add demo repo link

* Remove unnecessary section

Co-authored-by: Khashayar Etemadi <[email protected]>

* Tutorial proposal: Massively cutting server costs for model training with spot instances on Azure (KTH#1718)

* Add proposal for course automation task

* Rework proposal

* Slight modification

* Update README.md

* Add essay proposal

* Add Khalid to proposal

* Delete README.md

Co-authored-by: Khashayar Etemadi <[email protected]>
Co-authored-by: César Soto Valero <[email protected]>

* Submission : Demonstration of Continuous Deployment of a Tauri app (KTH#1717)

* Updated readme for submission

* Fixed some typos

* Fixed README

* Final Submission for Task 1 (KTH#1715)

* demo proposal for argocd

* Submission for Task 1

* Update README.md

* update submission git link

* Update README.md

* Update README.md

* Final submission - Github Action CI pipeline using CodeQL for static code scanning (DevSecOps Application) (KTH#1714)

* Adding Assignment proposal

* Update README.md

Adding links to our GitHub handles

* Update README.md

Edit description

* Update README.md

Removing Github handles as it crashes the script

* Updating folder name

* Adding assignment description

* Final Submission: Docker swarm executable tutorial (KTH#1709)

* docs: add README for proposal

* Final submission: exec tutorial

* Final Submission for Task 1 - CI/CD pipeline for K8s Cluster in Digital Ocean for Microservices application. (KTH#1701)

* added readme for demo proposal

* Submission for Task 1

Co-authored-by: César Soto Valero <[email protected]>

* Final Submission: Fuzzing Executable Tutorial (KTH#1705)

* Proposal for OSS-Fuzz executable tutorial

* final submission README

* working on final submission

* marked easter-egg

Co-authored-by: Palagi, Brad <[email protected]>

* Finished E2E testing with React executable tutorial (KTH#1699)

* Final Submission: Deployment of Ccde Using Buddy (KTH#1697)

* Adds Assignment Proposal (KTH#1689)

Co-authored-by: Pontus Cowling Mantefors <[email protected]>

* Added demo repo & key takeaway (KTH#1702)

* Create proposal template

* Update readme.md

* Added task proposal

* Fixed kth name

* fix readme

* Add bitbucket repo link

* Submission: Essay: DevOps and Security - How to fit them together? (KTH#1706)

* Create README.md

* Create DevSecOps.pdf

* Updated to pass word count

* Less word count

* Update DevOps_and_Security - How_to_fit_them_together.pdf

* Created final submission for civjan-palagi course automation (KTH#1704)

* Mockito Presentation (KTH#1595)

* Update README.md

* Update README.md

* Rename contributions/presentation/README.md to contributions/presentation/week2-testing-and-CI/ddnadjar/README.md

* Update README.md

Co-authored-by: Khashayar Etemadi <[email protected]>
Co-authored-by: vladomitrovic <[email protected]>

* Final Submission: Executable Tutorial (KTH#1692)

* executable-tutorial: proposal GH Action optimization

* fix: formatting of README.md

* [ Final Submission ] executable tutorial

* fix: assignment and README seperation

* fix: added links

* fix: put links in proposal README

* fix: removed header to pass action

Co-authored-by: lucianozapata <[email protected]>
Co-authored-by: isabelredtzer <[email protected]>
Co-authored-by: joloev <[email protected]>
Co-authored-by: Johanna Loev <[email protected]>
Co-authored-by: Luke LeVasseur <[email protected]>
Co-authored-by: Luke LeVasseur <[email protected]>
Co-authored-by: EDChui <[email protected]>
Co-authored-by: Diego Chahuan <[email protected]>
Co-authored-by: Fabian Segatz <[email protected]>
Co-authored-by: vladomitrovic <[email protected]>
Co-authored-by: Aïssata Maiga <[email protected]>
Co-authored-by: lnsandnkth <[email protected]>
Co-authored-by: elibon99 <[email protected]>
Co-authored-by: Benoit Baudry <[email protected]>
Co-authored-by: gluckzhang <[email protected]>
Co-authored-by: Per Arn <[email protected]>
Co-authored-by: Deepika Tiwari <[email protected]>
Co-authored-by: Philip Hamelink <[email protected]>
Co-authored-by: Neproxx <[email protected]>
Co-authored-by: Khashayar Etemadi <[email protected]>
Co-authored-by: Niko <[email protected]>
Co-authored-by: Joakim Olsson <[email protected]>
Co-authored-by: Arvid Gotthard <[email protected]>
Co-authored-by: Fredrik Svanholm <[email protected]>
Co-authored-by: vladomitrovic <[email protected]>
Co-authored-by: Max Persson <[email protected]>
Co-authored-by: paulinev-kth <[email protected]>
Co-authored-by: Martin Monperrus <[email protected]>
Co-authored-by: pdchao23 <[email protected]>
Co-authored-by: Preston Chao <[email protected]>
Co-authored-by: Zehao Jiang <[email protected]>
Co-authored-by: Linnea55 <[email protected]>
Co-authored-by: LukasGutenberg <[email protected]>
Co-authored-by: corentinguilloteau <[email protected]>
Co-authored-by: Daniel Gustafsson <[email protected]>
Co-authored-by: John Landeholt <[email protected]>
Co-authored-by: Johan Edman <[email protected]>
Co-authored-by: Abyel Tesfay <[email protected]>
Co-authored-by: Bassam Gamal <[email protected]>
Co-authored-by: nalenz <[email protected]>
Co-authored-by: Mustafa Ali <[email protected]>
Co-authored-by: Abdullah <[email protected]>
Co-authored-by: Noah Rahimzadagan <[email protected]>
Co-authored-by: sandy-e <[email protected]>
Co-authored-by: FilipSannervik <[email protected]>
Co-authored-by: Ayushman Khazanchi <[email protected]>
Co-authored-by: Ben Civjan <[email protected]>
Co-authored-by: Filip Bäck <[email protected]>
Co-authored-by: Filip Bäck <[email protected]>
Co-authored-by: persman96 <[email protected]>
Co-authored-by: Nick Smyrnioudis <[email protected]>
Co-authored-by: Samuel Söderberg <[email protected]>
Co-authored-by: tobiasgg <[email protected]>
Co-authored-by: gogo432754 <[email protected]>
Co-authored-by: shotaroi <[email protected]>
Co-authored-by: Javier Ron Arteaga <[email protected]>
Co-authored-by: simonebonato <[email protected]>
Co-authored-by: Bror Sebastian Sjövald <[email protected]>
Co-authored-by: Luciano <[email protected]>
Co-authored-by: César Soto Valero <[email protected]>
Co-authored-by: Brad Palagi <[email protected]>
Co-authored-by: Palagi, Brad <[email protected]>
Co-authored-by: Pontus Mantefors <[email protected]>
Co-authored-by: Pontus Cowling Mantefors <[email protected]>
Co-authored-by: mindany2 <[email protected]>
@monperrus
Copy link
Member

@bpalagi in Step 7, the commands cannot be copy/pasted and the file contents (eg .clusterfuzzlite) are not put in the editor (as opposed to the previous steps). Also there is no final command to run.

could you fix step 7 that so that I can proceed with grading?

Thanks!

@bpalagi
Copy link
Author

bpalagi commented Apr 6, 2022

@monperrus

Professor, we were unable to find how to have a local git repository inside of the Katacoda environment which would allow any user to create git actions and push/pull to see the fuzzer run.

We have updated the scenario to make it clear that step 7 would need to be done on ones own local repository. Please advise us if it is better to just remove that step because it is unable to be performed in the browser. We wanted to leave it in just to emphasize the value that fuzzing adds when used in a CI workflow.

@monperrus
Copy link
Member

@bpalagi ack, thanks.

@thomassrour
Copy link

Hey @bpalagi @bencivjan, @BastienFaivre and I find the topic of your tutorial interesting and would like to do our feedback task on it. Would you be open to that ?

@bencivjan
Copy link

@thomassrour @BastienFaivre Yes, we'd be open to it. However, we already submitted and received our grade for it so we wouldn't be able to implement any of the changes. If that works for you though you definitely have our permission!

@thomassrour
Copy link

Feedback for Katacoda Executable Tutorial demonstrating and explaining Fuzzing

This tutorial describes and showcases Fuzzing, which is a prominent and very used testing method, which can detect bugs and errors on code at any scale. This method is particularly important nowadays since it can automatically detect bugs that could lead to security breaches, which are hard to detect with usual testing strategies, thus making this tutorial relevant. After completing and analyzing this tutorial thoroughly, here is our feedback :

High level strengths and weaknesses

Strengths

  • The tutorial provides a strong theoretical background about fuzzing and its different instances.
  • The tutorial is easily readable, the language is errorless, there are no typos.
  • There are no bugs in the code, all steps which require an execution work as intended.
  • The real life example (finding a bug in a widely used library) that was given is a very nice feature, and clearly demonstrates the usefulness of this technique.
  • Most of the material is well referenced.

Weaknesses and Improvements

  • The definition of instrumentation in the context of fuzzing is missing in step 4. This term is often used later on in the tutorial, which makes the overall understanding of the further explanations harder. Another technical term whose explanation we couldn't find is ClusterFuzz, which is first referenced in Step 4.

    Possible improvement: Obviously, add the definition of instrumentation, explain what ClusterFuzz is, and describe the concepts a little more when mentionning them later.

  • The use of Katacoda is kind of unecessary, most of the steps are just theoretical background. Furthermore, there are very few commands to execute, and they are limited to running some Python files.

    Possible alternative: You might have been better off making a demo/presentation about the subject. The way the tutorial is organized (high level explanation then an interesting showcase) would have been a good structure for a demo.

    Otherwise, a simple blog post or a README would have been enough for someone to grasp the concepts shown, as there is not that much to execute.

  • Step 4 is essentially a copy paste of the link given at the end of the page, no additional information is provided.

    Possible improvement: We understand that it is important to understand these concepts before going into step 5, but again, such a step doesn't really belong in a tutorial. Simply giving the link to the definitions in a previous step and asking the reader to visit it and understand the definitions given would have been sufficient.

  • Even though it's a bonus section, step 7 is a bit all over the place, it gives a shallow description of how to use fuzzing in CI without actually explaining the steps required to do so. We tried following the steps given in the Katacoda and found ourselves a bit lost, especially since some things are referenced without proper introduction (eg : oss-fuzz repo).

    Possible improvement: This part remains very interesting and important, so it would definitely warrant a tutorial of its own, since there is actually has a lot of hands-on potential. It could be very useful to people who want to implement this. Therefore, simply referencing an actual tutorial about this might have been better than going over it that quickly and broadly.

  • Although it is good to have references, we didn't immediatly understand that the footnotes were actually on the finish page. Additionally, we cannot click on the reference number throughout the tutorial.

    Possible improvement: You could place the reference links on the bottom of the step where it is referenced, or you could make the number clickable (if possible).

Additional pointers

  • We would have liked to have a deeper understanding of how Atheris understands how to choose inputs to maximize code coverage. In the given example, it is obvious that is chooses the input based on the branching condition, but in a more complex setting, choosing such an input would not be as simple. The Atheris README on GitHub is a good start.

  • We also were wondering if implementing fuzzing in other languages than Python would be as straightforward. This might be a relevant topic to expand on, as your title doesn't limit the subject to Python. For example, here is how to implement fuzzing in Golang.

  • Finally it could also be interesting to check out how to fuzz web applications (for example using Burp Suite)

Concluding Remarks

Despite not being a very hands-on tutorial, this Katacoda still gives very valuable information on what fuzzing is and how it works. Thank you for allowing us to review your tutorial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
final_submission The final submission of a task tutorial One of the task categories listed in README.md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants