Ruby On Rails
Outil
Brakeman
Structure d'un projet RoR
.
├── Dockerfile #software version, hardcoded credentials
├── Gemfile #software versions
├── Gemfile.lock #software versions
├── app
│ ├── assets # images, video etc
│ ├── controllers #all application logic located here
│ │ ├── admin_controller.rb
│ │ ├── users_controller.rb
│ ├── helpers #helper - method that is (mostly) used to share reusable code
│ │ ├── admin_helper.rb
│ ├── mailers #allows send emails from your application using mailer classes
│ │ └── user_mailer.rb
│ ├── models #Ruby class that is used to represent data
│ │ ├── user.rb
│ └── views # HTML templates
│ ├── admin
│ │ ├── get_all_users.html.erb
├── config #app configuration, should be reviewed because developers can disable security features
│ ├── application.rb #application configuration
│ ├── boot.rb
│ ├── database.yml #database config, may contain hard-coded creds
│ ├── environment.rb
│ ├── environments
│ │ ├── development.rb #application configuration
│ ├── initializers
│ │ ├── constants.rb #hardcoded credentials
│ │ ├── filter_parameter_logging.rb #logging
│ │ ├── html_entities.rb #Enables or disables the escaping of HTML entities in JSON serialization
│ │ ├── key.rb #hardcoded credentials
│ │ ├── secret_token.rb #cookie signing
│ │ ├── session_store.rb #how session store is organized
│ ├── locales
│ │ └── en.yml #hardcoded credentials
│ ├── routes.rb #First thing to investigate, application routing
│ ├── secrets.yml #Is credentials/secrets encrypted?
│ └── secrets2.yml #Is credentials/secrets encrypted?
├── db
│ ├── schema.rb #database schema
│ └── seeds.rb #database data, may contain hard-coded creds
├── lib #extended modules
│ ├── encryption.rb #encryption
├── log #log files
├── public #static files and compiled assets
│ ├── 404.html
│ └── robots.txt
├── script
├── spec #for testing purposes
└── vendor #third-party codePoints d'interet
Routing
Controllers
Views
Models
Mauvaises pratiques
SSL forcé désactivé
Crypto
Cookies
Env
Mass assignement
XSS
Exemples
OS injection
SQLi
SSTI
Insecure deserialization
Mis à jour