Commit Graph

5 Commits

Author SHA1 Message Date
cgranleese-r7 f6faa5598b Fixes modules to now correctly use a hash with report note 2025-05-22 10:59:50 +01:00
Jack Heysel 8b48d3d056 Print RPORT as well as IP when printing version 2024-04-24 10:20:59 -07:00
Jack Heysel bd2b1e5f00 Removed redundant use of Object#to_s in interpolation 2024-04-24 10:09:20 -07:00
Jack Heysel f018295509 Ensure range of Rex::Version objects are always returned 2024-04-24 10:00:16 -07:00
jvoisin e5bb593607 Improve how we fingerprint Gitlab versions
Since I was the one suggesting it in #18716, I kinda volunteered to implement
it. This improvement is based on [Censys's blogpost](https://censys.com/cve-2021-22205-it-was-a-gitlab-smash/)
on the topic, making use of the `/assets/application-….css` files that have
a unique name per gitlab versions.

The fingerprints were acquired with this bash script:

```bash
assetdir="/opt/gitlab/embedded/service/gitlab-rails/public/assets"
tags=$(curl "https://hub.docker.com/v2/repositories/gitlab/gitlab-ce/tags?page_size=100" | jq -r '.results[].name')

for tag in $tags; do
    filename=$(docker run --quiet --rm -it --entrypoint "" gitlab/gitlab-ce:$tag ls $assetdir|egrep '^application-.*\.css' | grep -v \.gz | cut -d' ' -f1)
    echo $tag,$filename
done
```

Co-authored-by: cgranleese-r7 <69522014+cgranleese-r7@users.noreply.github.com>
2024-04-23 01:05:57 +02:00