Introduction¶
GitLab is an open-source DevOps platform that combines source code management (SCM) with continuous integration and delivery (CI/CD) tools. It allows teams to collaborate on code, track issues, and automate the software development process from a single application. GitLab is widely appreciated for its comprehensive suite of features that support project planning, source code management, testing, deployment, and monitoring.
Public Information Gathering¶
- Search for GitLab usernames:
site:[GITLAB-DOMAIN] "username"
- Google Dorking for Projects:
site:[GITLAB-DOMAIN] inurl:projects "project name"
Identifying GitLab Version¶
- Obtaining Version from Header:
curl -s -I http://[GITLAB-DOMAIN]/ | grep -i "X-Gitlab-Version"
- Obtaining Version from Help Page
http://[GITLAB-DOMAIN]/help
- Obtaining Version Using Nmap:
nmap -sV -p 80,443 [GITLAB-DOMAIN]
- Using GitLab API to List Users:
curl -s http://[GITLAB-DOMAIN]/api/v4/users?private_token=[YOUR_TOKEN]
Default Configuration and Credentials¶
- Attempt default credentials (e.g., root:5iveL!fe) on the login page:
http://[GITLAB-DOMAIN]/users/sign_in
- Check for exposed .git directory:
wget -r -np -R "index.html*" http://[GITLAB-DOMAIN]/.git/
- Search for leaked secrets using TruffleHog:
trufflehog --json https://gitlab.com/[USERNAME]/repository.git