Skip to main content

Gitlab

GitLab is a web-based DevOps lifecycle tool that provides source code management (SCM), CI/CD pipelines, issue tracking, and security features. It supports Git repositories and enables teams to collaborate efficiently on software development projects.

Tech Stack of GitLab

  • Backend: Ruby on Rails (Main application), Go (Gitaly for Git storage), Workhorse (Reverse proxy in Go)
  • Frontend: HTML, CSS, JavaScript (Vue.js)
  • Database: PostgreSQL (Primary), Redis (Caching and background jobs)
  • Server: Runs on Linux (Ubuntu, Debian, CentOS), can be self-hosted or cloud-based

File Structure

/gitlab-root
│── bin/ # Executable scripts for GitLab services
│── config/ # Configuration files
│ ├── gitlab.rb # Main GitLab configuration file (settings for URLs, authentication, etc.)
│ ├── database.yml # Database connection settings (PostgreSQL)
│ ├── secrets.yml # Encryption keys for sensitive data
│── logs/ # Log files for debugging and monitoring
│ ├── application.log # Logs for GitLab web application
│ ├── gitlab-shell.log # Logs for Git operations
│── public/ # Public assets (static files, error pages)
│── tmp/ # Temporary files and cache
│── uploads/ # User-uploaded files (avatars, attachments, etc.)
│── vendor/ # Third-party dependencies
│── db/ # Database migration scripts and schema files
│── app/ # Main Ruby on Rails application code
│── lib/ # Core libraries for GitLab functionality
│── services/ # Various background services (Sidekiq, Puma, Gitaly)
│── scripts/ # Custom scripts for maintenance and automation
│── .gitlab-ci.yml # Default CI/CD pipeline configuration
│── .env # Environment variables for GitLab instance
│── LICENSE # GitLab license file
│── README.md # Basic information about GitLab

Enumeration

  • To determine the GitLab version in use, we first need to log in and visit the /help endpoint.
  • Visit the /explore endpoint to search for interesting public repositories.

Exploitation

Remote Code Execution (Authenticated)