|
| 1 | +## Vulnerable Application |
| 2 | + |
| 3 | +This module was successfully tested on: |
| 4 | + |
| 5 | + * gitlab-ce (v17.2.2-ce.0) installed with Docker on Kali Linux 6.6.15 |
| 6 | + |
| 7 | +### Description |
| 8 | + |
| 9 | +This module is a brute-force login scanner that attempts to authenticate to the GitLab with username and password combinations. |
| 10 | + |
| 11 | +## Installation (latest version of gitlab-ce at the time of this writing) |
| 12 | + |
| 13 | +1. `docker pull gitlab/gitlab-ce:17.2.2-ce.0` |
| 14 | +2. `sudo mkdir -p /srv/gitlab/config /srv/gitlab/logs /srv/gitlab/data` |
| 15 | +3. Run the GitLab. |
| 16 | +``` |
| 17 | +docker run --detach \ |
| 18 | +--hostname localhost \ |
| 19 | +--publish 443:443 --publish 80:80 --publish 22:22 \ |
| 20 | +--name gitlab \ |
| 21 | +--restart always \ |
| 22 | +--volume /srv/gitlab/config:/etc/gitlab \ |
| 23 | +--volume /srv/gitlab/logs:/var/log/gitlab \ |
| 24 | +--volume /srv/gitlab/data:/var/opt/gitlab \ |
| 25 | +gitlab/gitlab-ce:17.2.2-ce.0 |
| 26 | +``` |
| 27 | +4. (Get initial password) |
| 28 | + `docker exec gitlab cat etc/gitlab/initial_root_password | grep Password:` |
| 29 | + |
| 30 | +## Verification Steps |
| 31 | + |
| 32 | +1. Install GitLab and start it |
| 33 | +2. Start `msfconsole` |
| 34 | +3. Do: `use auxiliary/scanner/http/gitlab_login` |
| 35 | +4. Do: `set rhosts` |
| 36 | +5. Do: set usernames and passwords via the `username` and `password` options, or pass a list via `user_file` and `pass_file` options |
| 37 | +5. Do: `run` |
| 38 | +6. You will hopefully see something similar to: |
| 39 | + |
| 40 | +``` |
| 41 | +[+] 192.168.56.6:80 - Login Successful: root:strongpasswordcannotguess |
| 42 | +``` |
| 43 | + |
| 44 | +## Options |
| 45 | + |
| 46 | +## Scenarios |
| 47 | + |
| 48 | +### Single set of credentials being passed |
| 49 | +``` |
| 50 | +msf6 > use auxiliary/scanner/http/gitlab_login |
| 51 | +msf6 auxiliary(scanner/http/gitlab_login) > run rhosts=192.168.56.6 username=root password=strongpasswordcannotguess |
| 52 | +
|
| 53 | +[*] 192.168.56.6:80 - GitLab v7 login page |
| 54 | +[!] No active DB -- Credential data will not be saved! |
| 55 | +[+] 192.168.56.6:80 - Login Successful: root:strongpasswordcannotguess |
| 56 | +[*] Scanned 1 of 1 hosts (100% complete) |
| 57 | +[*] Auxiliary module execution completed |
| 58 | +``` |
| 59 | + |
| 60 | +### Multiple credentials being passed |
| 61 | +``` |
| 62 | +msf6 > use auxiliary/scanner/http/gitlab_login |
| 63 | +msf6 auxiliary(scanner/http/gitlab_login) > run rhosts=192.168.56.6 user_file=/tmp/user.txt pass_file=/tmp/pass.txt |
| 64 | +
|
| 65 | +[*] 192.168.56.6:80 - GitLab v7 login page |
| 66 | +[!] No active DB -- Credential data will not be saved! |
| 67 | +[-] 192.168.56.6:80 - LOGIN FAILED: root:123456 (Incorrect) |
| 68 | +[-] 192.168.56.6:80 - LOGIN FAILED: root:123456789 (Incorrect) |
| 69 | +[-] 192.168.56.6:80 - LOGIN FAILED: root:picture1 (Incorrect) |
| 70 | +[-] 192.168.56.6:80 - LOGIN FAILED: root:password (Incorrect) |
| 71 | +[-] 192.168.56.6:80 - LOGIN FAILED: root:12345678 (Incorrect) |
| 72 | +[+] 192.168.56.6:80 - Login Successful: root:strongpasswordcannotguess |
| 73 | +[-] 192.168.56.6:80 - LOGIN FAILED: admin:123456 (Incorrect) |
| 74 | +[-] 192.168.56.6:80 - LOGIN FAILED: admin:123456789 (Incorrect) |
| 75 | +[-] 192.168.56.6:80 - LOGIN FAILED: admin:picture1 (Incorrect) |
| 76 | +[-] 192.168.56.6:80 - LOGIN FAILED: admin:password (Incorrect) |
| 77 | +[-] 192.168.56.6:80 - LOGIN FAILED: admin:12345678 (Incorrect) |
| 78 | +[-] 192.168.56.6:80 - LOGIN FAILED: admin:strongpasswordcannotguess (Incorrect) |
| 79 | +[-] 192.168.56.6:80 - LOGIN FAILED: test:123456 (Incorrect) |
| 80 | +[-] 192.168.56.6:80 - LOGIN FAILED: test:123456789 (Incorrect) |
| 81 | +[-] 192.168.56.6:80 - LOGIN FAILED: test:picture1 (Incorrect) |
| 82 | +[-] 192.168.56.6:80 - LOGIN FAILED: test:password (Incorrect) |
| 83 | +[-] 192.168.56.6:80 - LOGIN FAILED: test:12345678 (Incorrect) |
| 84 | +[-] 192.168.56.6:80 - LOGIN FAILED: test:strongpasswordcannotguess (Incorrect) |
| 85 | +[*] Scanned 1 of 1 hosts (100% complete) |
| 86 | +[*] Auxiliary module execution completed |
| 87 | +``` |
0 commit comments