Giter VIP home page Giter VIP logo

globocom / secdevlabs Goto Github PK

View Code? Open in Web Editor NEW
867.0 33.0 405.0 187.53 MB

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

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.50% PHP 46.46% CSS 14.21% HTML 13.41% JavaScript 14.51% Dockerfile 0.08% Go 1.73% Shell 1.17% Python 1.08% Hack 0.01% Kotlin 0.01% Swift 0.02% Objective-C 0.01% Dart 1.10% Ruby 0.10% SCSS 2.79% Less 2.43% Java 0.13% TypeScript 0.25%
owasp-top-10 labs development training security vulnerability hacktoberfest hacktoberfest2022

secdevlabs's Introduction

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
A4 - Insecure Design React/Go Super Recovery Password App
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
A6 - Vulnerable and Outdated Components Python Golden Hat Society
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. πŸ“–

secdevlabs's People

Contributors

alexandrebn avatar alvesgabriel avatar aranhams avatar beescuit avatar dependabot[bot] avatar eduquintanilha avatar fguisso avatar gabhendm avatar gabriel-cantergiani avatar gitter-badger avatar gustavocovas avatar henriporto avatar joserenatosilva avatar krlier avatar marcelomagina avatar mdjunior avatar n8eloy avatar pedrokiefer avatar rafaveira3 avatar rodrigondec avatar smcamara avatar spimpaov avatar thiagobfiorenza avatar thiagolotufo avatar vitor-fernandes avatar vitoriario avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

secdevlabs's Issues

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?

Add intentionally vulnerable mobile apps

Smartphones are everywhere nowadays and there are thousands of developers dedicated to creating new apps for them every day. With that in mind, it would be awesome with could help them by providing intentionally vulnerable mobile applications, so they could get to know better the most common vulnerabilities and how to fix them.

With that in mind, we could use OWASP's mobile top 10 list as a guide.
The topics featured in the list are:

The new apps' path should be something along the lines of: secDevLabs/owasp-top10-2016-mobile.

Add PR template for mitigation proposals

Is your feature request related to a problem? Please describe.
Sometimes it's difficult for the secDevLabs community to identify which app a solution is proposed to and what was done.

Describe the solution you'd like
Create a template for the solutions with:

  • This solution refers to which of the apps?
  • What did you do to mitigate the vulnerability?
  • Did you test your changes? What commands did you run?

Create another app for A9 - Using Components With Known Vulnerabilities

Currently we have only one app for this topic written in PHP exploring a known vulnerability for an old version of Drupal. It would be awesome having another application with a different language for this topic, exploring another know vulnerability of any other software or lib.

Some suggestions of languages to write your app are:

  • Ruby
  • Golang
  • Java

You can check our Contributing Guidelines on creating a new app.
If you want to learn more about this topic, a very good reference would be OWASP's page.

A9 Cimentech not exploitable on Linux machines

After building the app, it is not possible to follow the attack narrative and reproduce the exploitation.

Maybe docker running in Linux has some different protections.

Issue found by @mbenford . Thanks for that! πŸ‘πŸ»

Add intentionally vulnerable M8 mobile app

Following OWASP's mobile top 10 list, it would be awesome if we had an intentionally vulnerable M8-Code Tampering.

This app can be done in both iOS or Android environment, just be sure to add how one can deploy it and test it locally.

Just like the web applications, we also expect an attack narrative to demonstrate why this vulnerability is critical and should be fixed ASAP by its development team.

Add intentionally vulnerable M7 mobile app

Following OWASP's mobile top 10 list, it would be awesome if we had an intentionally vulnerable M7-Poor Code Quality.

This app can be done in both iOS or Android environment, just be sure to add how one can deploy it and test it locally.

Just like the web applications, we also expect an attack narrative to demonstrate why this vulnerability is critical and should be fixed ASAP by its development team.

Your app is still starting...

The way the project is today when we execute make install, the containers relative to the app are built and a script validates if the app started successfully. If it did, this message should appear:

image

The problem lies when, after coding the desired changes to mitigate a vulnerability, the container fails to start due to a mistake and the check lasts for a very long time, as shown by the image below:

image

It would be great if we could tell the developer early that something went wrong. This way, there's no need to wait for the timeout.

Change apps' ports to be more intuitive to each vulnerability

In most of our apps, the ports were chosen randomly, which might leave people lost as to which port to access to get to the action.

In order to standardize all of our apps, it would be great if we could change the ports to this pattern:

  • A1 App - Port : 10001
  • A2 App - Port: 10002
  • A3 App - Port: 10003
  • A4 App - Port: 10004
  • A5 App - Port: 10005
  • A6 App - Port: 10006
  • A7 App - Port: 10007
  • A8 App - Port: 10008
  • A9 App - Port: 10009
  • A10 App - Port: 10010

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.

Login and Register routes in A1 CopyNPaste app returns 405

After building CopyNPaste app and sending a login or register request through the web interface buttons, a 405 Method Not Allowed message is returned.

This seems to happen only on the application's web interface. If we use curl the application works as intended as shown below.

Request:

curl -s -H "Content-Type: application/json" -d '{"user":"test", "pass":"test"}' http://127.0.0.1:3000/login

Response:

User not found or wrong password!

Add intentionally vulnerable M9 mobile app

Following OWASP's mobile top 10 list, it would be awesome if we had an intentionally vulnerable M9-Reverse Engineering.

This app can be done in both iOS or Android environment, just be sure to add how one can deploy it and test it locally.

Just like the web applications, we also expect an attack narrative to demonstrate why this vulnerability is critical and should be fixed ASAP by its development team.

Add a How To section for those who want to contribute

It would be nice if we have a guidance for people that are willing to contribute to SecDevLabs. Examples:

  • Mitigation PR Template (How do I request a mitigation solution review from SecDevLabs community?)
  • Attack Narrative PR Template (What if I have another attack narrative?)
  • What labels must I use?
  • I have just created an app! How can I send to SecDevLabs? (Building local environment guidance, etc..
  • I have found an error! How do I report?

Add manual SQL Injection steps into A1 app

Motivation

Copy-and-Paste's attack narrative makes use only of SQLMap to show how an automated SQL injection could be performed.

It would be great if

We could also have the queries needed to perform an exploration of the intentionally vulnerable app manually. This would be interesting due to the fact that SQLMap can be very intrusive and dangerous to the application functionality.

What we expect

We expect to have the manual steps written down in the README.md with an explanation on how and why these commands work.

curl -s -H "Content-Type: application/json" -d '{"user":"-1'\'' <sqli payload here> ", "pass":"password"}' http://127.0.0.1:10001/login

Tips

Design a new logo for secDevLabs

This Hacktoberfest seems to be a good opportunity to update secDevLab's visual identity.

With that in mind, it would be awesome if we could update our logo to something different.

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.