A laboratory for learning secure web and mobile development in a practical manner.

Overview

A laboratory for learning secure web and mobile development in a practical manner.

Build your lab

By provisioning local environments via docker-compose, you will learn how the most critical web application security risks are exploited and how these vulnerable codes can be fixed to mitigate them. ๐Ÿ‘ฉโ€๐Ÿ’ป

How do I start?

After forking this repository, you will find multiple intended vulnerable apps based on real-life scenarios in various languages such as Golang, Python and PHP. A good start would be installing the ones you are most familiar with. You can find instructions to do this on each of the apps. ๐Ÿ’ก

Each of them has an Attack Narrative section that describes how an attacker would exploit the corresponding vulnerability. Before reading any code, it may be a good idea following these steps so you can better understand the attack itself. ๐Ÿ’‰

Now it's time to shield the application up! Imagine that this is your application and you need to fix these flaws! Your mission is writing new codes that mitigate them and sending a new Pull Request to deploy a secure app! ๐Ÿ”

How secure is my new code?

After mitigating a vulnerability, you can send a Pull Request to gently ask the secDevLabs community to review your new secure codes. If you're feeling a bit lost, try having a look at this mitigation solution, it might help! ๐Ÿš€

OWASP Top 10 (2021) apps: ๐Ÿ’ป

Disclaimer: You are about to install vulnerable apps in your machine! ๐Ÿ”ฅ

Vulnerability Language Application
A1 - Broken Access Control Golang Vulnerable Ecommerce API
A1 - Broken Access Control NodeJS Tic-Tac-Toe
A1 - Broken Access Control Golang Camplake-API
A2 - Cryptographic Failures Golang SnakePro
A3 - Injection Golang CopyNPaste API
A3 - Injection NodeJS Mongection
A3 - Injection Python SSType
A3 - Injection (XSS) Python Gossip World
A3 - Injection (XSS) React Comment Killer
A3 - Injection (XSS) Angular/Spring Streaming
A5 - Security Misconfiguration (XXE) PHP ViniJr Blog
A5 - Security Misconfiguration PHP Vulnerable Wordpress Misconfig
A5 - Security Misconfiguration NodeJS Stegonography
A6 - Vulnerable and Outdated Components PHP Cimentech
A7 - Identity and Authentication Failures Python Saidajaula Monster Fit
A7 - Identity and Authentication Failures Golang Insecure go project
A8 - Software and Data Integrity Failures Python Amarelo Designs
A9 - Security Logging and Monitoring Failures Python GamesIrados.com

OWASP Top 10 (2016) Mobile apps: ๐Ÿ“ฒ

Disclaimer: You are about to install vulnerable mobile apps in your machine! ๐Ÿ”ฅ

Vulnerability Language Application
M2 - Insecure Data Storage Dart/Flutter Cool Games
M4 - Insecure Authentication Dart/Flutter Note Box
M5 - Insufficient Cryptography Dart/Flutter Panda Zap

Contributing

We encourage you to contribute to SecDevLabs! Please check out the Contributing to SecDevLabs section for guidelines on how to proceed! ๐ŸŽ‰

License

This project is licensed under the BSD 3-Clause "New" or "Revised" License - read LICENSE.md file for details. ๐Ÿ“–

Comments
  • Refactoring app's directories and Create labels for each of them

    Refactoring app's directories and Create labels for each of them

    The current directory organization is a little confusing. We have the folder owasp-top10-2017-apps that has only OWASP Top 10 2017 vulnerability list. What about OWASP API Security Top 10 2019 (or another lists)? If we create a new folder for Top 10 2019 how would we handle with vulnerabilities that belongs to both lists?

    opened by vitoriario 12
  • Create a container with all tools needed to perform the analyses

    Create a container with all tools needed to perform the analyses

    Through some of the apps, such as CopyNPaste API, Vulnerable Wordpress Misconfig, Stegonography and Amarelo Designs, the following tools are used to perform automated tasks: SQLMap, WPScan and Dirb.

    Sometimes it can be a hassle for people to properly install these tools, some can be quite challenging to install on Mac OS. With that in mind, it would be great if we could build a container with all these security tools already installed and ready to go. Having that, all a developer would need to do is run the container and use the tools on the intentionally vulnerable apps of secDevLabs.

    opened by Krlier 9
  • [A1] - Broken Access Control - Camplake-API

    [A1] - Broken Access Control - Camplake-API

    This solution refers to which of the apps?

    a1 - camplake-api

    What did you do to mitigate the vulnerability?

    Replaces the manual parser with the jwt.ParseWithClaims() provided by the github.com/dgrijalva/jwt-go module as it already contains the signature and TTL validations necessary to ensure the legitimacy of the user-provided token.

    Did you test your changes? What commands did you run?

    After correction:

    1. Created the user.
    $ curl -s -H "Content-Type: application/json" -d '{"username":"campLakeAdmin","password":"campLake2021"}' http://localhost:20001/register
    Register: success!
    
    1. Logged in.
    $ curl -s -H "Content-Type: application/json" -d '{"username":"campLakeAdmin","password":"campLake2021"}' http://localhost:20001/login
    Hello, campLakeAdmin! This is your token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImNhbXBMYWtlQWRtaW4iLCJleHAiOjE2NTA5OTQ5OTR9.TWf6_jpPSDTsCJ68MpkzWLIpVFr2H51-Cuf1A-VVsnE
    
    1. Validated token
    $ curl -s -H 'Content-Type: application/json' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImNhbXBMYWtlQWRtaW4iLCJleHAiOjE2NTA5OTQ5OTR9.TWf6_jpPSDTsCJ68MpkzWLIpVFr2H51-Cuf1A-VVsnE' -d '{"title": "New member ", "post": "Today a new member ..."}' http://localhost:20001/newpost
    "New post created successfully!\nCreated by: campLakeAdmin!"
    
    1. Attempted validation with forged token.
    $ curl -s -H 'Content-Type: application/json' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImNhbXBMYWtlQWRtaW5uIiwiZXhwIjoxNjUwOTk0OTk0fQ.aBG86wE0Oi9yxZzYXjskBog5_AjfhqfAqMsqocKWupc' -d '{"title": "New member ", "post": "Today a new member ..."}' http://localhost:20001/newpost
    "unautorized"
    
    1. Validation attempt with original token, but expired.
    $ curl -s -H 'Content-Type: application/json' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImNhbXBMYWtlQWRtaW4iLCJleHAiOjE2NTA5OTQ5OTR9.TWf6_jpPSDTsCJ68MpkzWLIpVFr2H51-Cuf1A-VVsnE' -d '{"title": "New member ", "post": "Today a new member ..."}' http://localhost:20001/newpost
    "unautorized"
    
    mitigation solution ๐Ÿ”’ Camplake-API 
    opened by ragoso 8
  • A9/cimentech

    A9/cimentech

    This solution refers to which of the apps?

    A/M# - owasp-top10-2017-apps/a9/cimentech

    What did you do to mitigate the vulnerability?

    This is a contribution to secDevLabs. For a better use of exercise a9, I made some changes to the Docker Compose file, so that it is possible to update Drupal through lines of code.

    Did you test your changes? What commands did you run?

    The vulnerability has not been mitigated :satisfied:

    enhancement ๐Ÿš€ A9-OWASP-2017 Cimentech 
    opened by thiagolotufo 8
  • Add new A7 - Cross-Site Scripting (XSS) web app (JS)

    Add new A7 - Cross-Site Scripting (XSS) web app (JS)

    Motivation

    SecDevLab's goal is to provide examples of how security vulnerabilities could be fixed, but we only have one example of Cross-Site Scripting from OWASP's 2017 Top 10.

    It would be great if

    We had another app illustrating this vulnerability and how it could be exploited by an attacker.

    What we expect

    The new app must have a complete README.md with all the steps on how to get the environment ready to run it, how it can be installed, and how an attacker could compromise it.

    The app should be similar to the existing web apps, such as this one.

    Note: It would be great if this app could be powered by anything other than Python. ๐Ÿ™‚

    Tips

    hacktoberfest2022 
    opened by Krlier 8
  • A1 - Remotely perform the SQLi

    A1 - Remotely perform the SQLi

    I'm trying to exploit the SQLi remotely but when I perform the dump after successfully exploit the vulnerability, it returns me no entries in the 'Users' table. But if I exploit it locally, it returns me the entries properly. I also noticed that I'm not able to register an user in a remote access via web browser, when I call the registration page, I got:

    • "Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:3000/register. (Reason: CORS header โ€˜Access-Control-Allow-Originโ€™ missing)." Are there any configs that I have to change to get to use the LAB remotely?
    opened by ball4me 7
  • [A8] - Software and Data Integrity Failures - Python - Amarelo Designs - Solution

    [A8] - Software and Data Integrity Failures - Python - Amarelo Designs - Solution

    opened by henriporto 6
  • Owasp top10 2017 apps/a8/amarelo designs

    Owasp top10 2017 apps/a8/amarelo designs

    This solution refers to which of the apps?

    A/M# - owasp-top10-2017-apps/a8/amarelo-designs

    What did you do to mitigate the vulnerability?

    The pickle should only be used when we have a reliable source accessing that information. In this lab, we are using pickle to serialize a cookie, and this is not safe. To mitigate this vulnerability, I replaced the pickle with JWT, to generate the session token.

    Did you test your changes? What commands did you run?

    To mitigate this vulnerability, I used JWT to create and validate the user's session token. To test, I used the deserialization file created for the pickle. When we type the code on the command line, it does not return any information, as it does not have access to the application.

    • Vulnerability test

    Screen Shot 2021-04-15 at 17 23 21

    The token that the command returns is generated in the code itself, and is not retrieved from the http request.

    mitigation solution ๐Ÿ”’ A8-OWASP-2017 Amarelo Designs 
    opened by thiagolotufo 6
  • Standardize App ports

    Standardize App ports

    Closes #164

    Altered ports for every application following the standard guidelines as listed in the issue mentioned above. Documentation was updated as well.

    refact 
    opened by n8eloy 6
  • Create another app for A1 - Injection

    Create another app for A1 - Injection

    We currently only have one app for A1 (Injection) topic containing an SQL Injection vulnerability. Since Injection is a big topic, it would be awesome if we had another application approaching a different type of Injection, like:

    and many more!

    This new app could also be written in a different language than the current one (Golang). Some suggestions are:

    • Ruby
    • Python
    • Java

    You can check our Contributing Guidelines on creating a new app.

    opened by spimpaov 6
  • Happysnake

    Happysnake

    This solution refers to which of the apps?

    A2 - Snake Pro

    What did you do to mitigate the vulnerability?

    Used the lib bcrypt to hash the password and changed the http to https with echo lib, using TLS and generate certificate + priv key in .pem extension

    Did you test your changes? What commands did you run?

    Yes, using the same commands of readme.md said:

    • brew install tcpdump
    • sudo tcpdump -i lo0 -X host localhost | grep -C 2 pass --color
    mitigation solution ๐Ÿ”’ SnakePro 
    opened by InesCardinot 5
  • Add XSS owasp 2017 rake-my-cake rails app

    Add XSS owasp 2017 rake-my-cake rails app

    This PR add a XSS owasp 2017 Rails app following #438.

    Since this PR was open way back in 2020 referring Owasp 2017 I end up putting the code inside a folder called owasp-top10-2017-apps, let me know if i did it right.

    I also took the liberty of using part of the exemple of Gossip World specifically the GO Keylogger for lack of imagination.

    hacktoberfest-accepted 
    opened by Perkles 2
  • fix: Update broken links all secDevLabs #588

    fix: Update broken links all secDevLabs #588

    I looked at the whole project and checked the broken links.

    In case I left a link that I couldn't verify. Please let me know that I merge with this PR.

    NOTE I HAVE LOOKED AT THE ENTIRE GITHUB PROJECT

    #588

    hacktoberfest-accepted 
    opened by fabiohcnobre 3
  • Check and update broken links

    Check and update broken links

    image

    Motivation

    There are a lot of links inside SecDevLabs and everyone needs to work correctly with new users to follow the right directions.

    It would be great if

    Update broken links and add missing fix-mitigation PR's links.

    What we expect

    All normal links and the fix-mitigation PR's links works.

    hacktoberfest2022 
    opened by fguisso 3
  • Check and update exercise setups names

    Check and update exercise setups names

    image

    Motivation

    SecDevLab provides exercises based on OWASP Top 10 since 2021 the vulnerable list has been updated, but some details inside the setup of the exercise don't be updated.

    It would be great if

    All exercise setups correspond to correct exercise names.

    What we expect

    Check and update all exercise setups to reflect the correct name.

    image

    For example, for exercise A1 - Broken Authentication (eCommerce-API) inside docker-compose.yml the container name doesn't correspond to the correct numeration, update a5 to a1: docker-compose.yml#5

    hacktoberfest2022 
    opened by fguisso 2
  • Use gitpod

    Use gitpod

    Use gitpod to an option to setup.

    Needs to change all Setup.md from exercises and explain the usage from Gitpod.

    Needs to change all Makefiles and verify if users is using gitpod and show the link to the "localhost" inside Gitpod.

    # to verify
    $ whoami
    gitpod
    $ gp url <port>
    https://<port>-globocom-secdevlabs-1qppj14zvqu.ws-us67.gitpod.io/
    
    enhancement ๐Ÿš€ 
    opened by fguisso 0
Owner
Globo.com
Globo.com
YCOM Impersonate. Login as selected YCOM user ๐Ÿง™โ€โ™‚๏ธin frontend.

YCOM Impersonate Login as selected YCOM user in frontend. Features: Backend users with admin rights or YCOM[] rights, can be automatically logged in v

Friends Of REDAXO 17 Sep 12, 2022
ใ€Œ๐ŸŒŽใ€Web Exploration Laboratory

ใ€Œ ?? ใ€About Web Exploration Laboratory The Web Exploration Laboratory (WEL) is a project created for people just entering the information security bus

null 3 Oct 10, 2022
A list of ICs and IPs for AI, Machine Learning and Deep Learning.

AI Chip (ICs and IPs) Editor S.T.(Linkedin) Welcome to My Wechat Blog StarryHeavensAbove for more AI chip related articles Latest updates Add news of

Shan Tang 1.4k Jan 3, 2023
A high-level machine learning and deep learning library for the PHP language.

Rubix ML A high-level machine learning and deep learning library for the PHP language. Developer-friendly API is delightful to use 40+ supervised and

Rubix 1.7k Jan 1, 2023
Rubix ML - A high-level machine learning and deep learning library for the PHP language.

A high-level machine learning and deep learning library for the PHP language. Developer-friendly API is delightful to use 40+ supervised and

Rubix 1.7k Jan 6, 2023
PHP Machine Learning Rain Forecaster is a simple machine learning experiment in predicting rain based on a few forecast indicators.

PHP Machine Learning Rain Forecaster is a simple machine learning experiment in predicting rain based on a few forecast indicators.: forecasted "HighT

null 4 Nov 3, 2021
A web app for the resolution of a mobile game in wich you have 4 images and a list of letters, then a few boxes to fill with the word connecting the four images.

4images_1mot_solutions A web app for the resolution of a mobile game in wich you have 4 images and a list of letters, then a few boxes to fill with th

FOTSO Claude 3 Jan 13, 2022
Get mobile app version and other related data from Google Play Store, Apple App Store and Huawei AppGallery

Mobile App Version Get mobile app version and other related data from Google Play Store, Apple App Store and Huawei AppGallery. Installation Add to co

Omer Salaj 11 Mar 15, 2022
Web Site developed for the subject of Web Development 2

Trabalho - DW2 Web Site developed for the discipline of Web Development 2. It has been developed to simulate a FIFA World Cup's system where you can C

Erik Gaborim 1 Feb 15, 2022
Foundation 3 Framework for Magento 1.7. Foundation styles and libraries. Magento Responsive theme. Off-canvas Left-Right sidebar columns for mobile.

Magento Foundation 3 Framework Zurb Foundation 3 framework for Magento 1.7. Magento Foundation 3 Version 1.3.0. Demo page: http://magendation.internet

Nando Boronat 62 Apr 1, 2022
Mobile detect change theme and redirect based on device type. Magento 2 module.

Magento 2 Mobile Detect Theme Change Magento 2 Mobile detect system can be used to load different themes base on the client device (desktop, tablet, m

EAdesign 27 Jul 5, 2022
Xenon\LaravelBDSms is a sms gateway package for sending text message to Bangladeshi mobile numbers using several gateways like sslcommerz, greenweb, dianahost,metronet in Laravel framework

Xenon\LaravelBDSms is a sms gateway package for sending text message to Bangladeshi mobile numbers using several gateways for Laravel. You should use

Ariful Islam 95 Jan 3, 2023
Pat if amp - โšก A Textpattern Conditional Plugin for Google's Accelerated Mobile Pages Project (AMP)

pat_if_amp Download | Packagist AMP pages for Textpattern CMS. This conditional tag examines the URL of the current page and determines if the URL end

Patrick LEFEVRE 4 Dec 15, 2019
React Native mobile app for Magento 2.x

Open source React Native mobile app for Magento 2 Magento React Native is a fully functional eCommerce App for your Magento 2 website. It uses Magento

Dima Portenko 290 Dec 1, 2022
This document provides the details related to Remittance API. This APIs is used to initiate payment request from Mobile client/others exchange house.

City Bank Remittance API This is where your description should go. Limit it to a paragraph or two. Consider adding a small example. Installation You c

MD ARIFUL HAQUE 2 Oct 2, 2022
Learning about - Basic HTML & CSS, JSON, XML, Session & Cookies, CRUD Operations in Php using MySQL and Create MVC from scratch

This Project is based on course CSC 3215. Learning about - Basic HTML & CSS, JSON, XML, Session & Cookies, CRUD Operations in Php using MySQL and Create MVC (Modelโ€“Viewโ€“Controller) from scratch. Just learning about web technologies, Not focusing on UI (Bootstrap or other 3rd-Party UI libraries or frameworks).

Alvi Hasan 5 Sep 21, 2022
Learning and Using ร˜MQ

ร˜MQ - The Guide =============== Written by Pieter Hintjens [email protected], CEO iMatix Corporation. A ร˜MQ socket is what you get when you take a normal

null 3.3k Jan 2, 2023
Explore , Experiment with data science and machine learning.

sodiumchloride Project name : sodium chloride objective : Explore,Experiment your data with datascience and machine learning version : beta 0.1.2 rele

sodium chloride 2 Jan 9, 2022