Commit Graph

3195 Commits

Author SHA1 Message Date
adeherdt-r7 a3a24418a8 MS-9517 Jenkins Login Scanner
Jenkins does not implement Authentication challenges.

By default, Jenkins responds with a HTTP 403 FORBIDDEN response, and does not include the `WWW-Authenticate` header.
This causes problems with the underlying http client, as this one expects the challenge to come forward and resend
the request with the auth header.

By changing the code to look for the HTTP 403 response, and setting the default URL to the correct login validation endpoint
Pro will have an easier time to investigate whether Jenkins can be bruteforced or not.

The original code checks for a 401 response only.
Overwriting the behavior for Jenkins allows us to handle this use-case properly and report the correct behavior.
2024-08-13 11:16:01 +02:00
adfoster-r7 89cf0223d1 Kerberos asrep roasting improvements 2024-07-24 18:01:11 +01:00
Spencer McIntyre a6fd6defcb Escape LDAP query strings 2024-06-18 17:47:56 -04:00
Jack Heysel c1826cd2f3 Land #18829, Allow multiple HttpServers in module
Adding multiple HttpServer services in a module is sometimes complex
since they share the same methods. This usually this causes issues where
on_request_uri needs to be overridden to handle requests coming from
each service. This updates the cmdstager and the Java HTTP ClassLoader
mixins, since these are commonly used in the same module. This also
updates the manageengine_servicedesk_plus_saml_rce_cve_2022_47966 module
to make use of these new changes
2024-06-18 09:51:38 -07:00
dwelch-r7 17a6d443b5 Land #19260, Update windows acceptance tests 2024-06-17 10:19:25 +01:00
adfoster-r7 30c9ea2064 Update windows acceptance tests 2024-06-13 18:05:30 +01:00
Christophe De La Fuente 764dc89997 Update Java::HTTP::ClassLoader and CmdStager::HTTP
- Add specific #on_request_uri, #start_service and #resource_uri methods with distinct names
2024-06-13 16:39:24 +02:00
Jack Heysel b9b638dd83 Land #19196, Cacti import package RCE
This exploit module leverages an arbitrary file write vulnerability
(CVE-2024-25641) in Cacti versions prior to 1.2.27 to achieve RCE. It
abuses the Import Packages feature to upload a specially crafted package
that embeds a PHP file.
2024-06-12 15:43:46 -07:00
Christophe De La Fuente 45815a4cb5 Code review 2024-06-12 19:47:02 +02:00
bcoles 4eecb8ee96 Moodle::Login.moodle_login: fix login success verification regex 2024-06-03 01:49:04 +10:00
Christophe De La Fuente 06cb6aa713 Update cacti_pollers_sqli_rce to use the new library
- Update the CSRF token logic in the library
- Update cacti_package_import_rce and cacti_pollers_sqli_rce modules
- Update the FETCH_DELETE logic in cacti_package_import_rce to only
  regenerate the payload when necessary
2024-05-23 11:30:48 +02:00
Christophe De La Fuente c6c5f2bf7a Add module, lib and documentation 2024-05-22 17:38:53 +02:00
adfoster-r7 25a1318052 Land #19170, Refactor smb lookupsid module 2024-05-17 13:43:52 +01:00
Spencer McIntyre 638ad36b12 Fixed names that were missed while refactoring 2024-05-17 10:59:37 +01:00
sjanusz-r7 34ab7d97b2 Follow MS-LSAD and MS-LSAT spec for LSARPC & LookupSids 2024-05-17 10:59:37 +01:00
sjanusz-r7 138a553b36 Add support for configurable RPORT, session & default rports to lookupsid 2024-05-17 10:59:37 +01:00
sjanusz-r7 d569077564 Refactor smb_lookupsid module to use RubySMB 2024-05-17 10:59:37 +01:00
Dean Welch 68f7334348 Fix kerberos auth and missing method error when querying with -a 2024-05-15 16:11:40 +01:00
Dean Welch 7cdea94000 Convert ldap modules to use the new ldap session type 2024-05-15 15:12:51 +01:00
Dean Welch e693b9588c Update ldap modules to support an ldap session 2024-05-15 15:12:51 +01:00
Dean Welch df32ce2db9 Add ldap query support to the ldap session 2024-05-15 15:12:51 +01:00
Dean Welch 3cedb20f75 Add initial ldap session support 2024-05-15 15:12:51 +01:00
Spencer McIntyre 69e35005ee Add TLS channel binding for kerberos 2024-05-08 16:30:24 -04:00
Spencer McIntyre cc3fd3bfa0 Update #build_gss_ap_req_checksum_value
This updates the #build_gss_ap_req_checksum_value method to allow
control over the flags and channel binding information.
2024-05-08 16:24:54 -04:00
Spencer McIntyre 8dabe17121 Pass the ticket storage setting 2024-05-08 16:24:54 -04:00
Spencer McIntyre 942d47bec5 Add TLS channel binding for NTLM 2024-05-08 16:24:48 -04:00
Christophe De La Fuente 8c76143a9d Land #19127, Ldap signing 2024-05-07 17:28:36 +02:00
Spencer McIntyre 5523f13394 Fix a message that should refer to LDAP::Signing 2024-05-06 09:40:28 -04:00
Spencer McIntyre 69d603e6fc Switch to an enum option for the signing 2024-05-03 10:27:10 -04:00
adfoster-r7 4c84f8830f Land #18907, add mssql_version module 2024-05-03 14:33:35 +01:00
cgranleese-r7 bb473f4004 Reimplement password_spray into login modules 2024-05-03 13:00:24 +01:00
Simon Janusz 76d7fe8dbd Land #19095, Refactor smb_enumusers 2024-04-25 15:45:23 +01:00
Jack Heysel aea95c052e Land #18723, Improve Gitlab fingerprinting
A webpage exists that can be reached without authentication that
contains a hash that can be used to determine the approximate version of
gitlab running on the endpoint. This PR adds enhances our current GitLab
fingerprinting capabilities to include the aforementioned technique.
2024-04-24 12:13:15 -07:00
Zach Goldman d0a714d1e8 refactor packet parsing code 2024-04-24 15:06:36 -04:00
Zach Goldman 3897b49ca6 add mssql_version module 2024-04-24 15:06:36 -04:00
Jack Heysel bc4a532cd7 Changed format of GITLAB_CSS_MAP 2024-04-24 11:38:22 -07:00
Jack Heysel f018295509 Ensure range of Rex::Version objects are always returned 2024-04-24 10:00:16 -07:00
adfoster-r7 e5cf357f9e Land #19078, ldap acceptance tests 2024-04-24 17:59:24 +01:00
Ashley Donaldson 6d915dbb55 Fix unit tests 2024-04-24 15:54:57 +10:00
Ashley Donaldson 68966b86f1 Give warning on invalid config (SSL and REQUIRE_SIGNING both set to true) 2024-04-24 15:05:03 +10:00
Ashley Donaldson a4b3c27e28 Provide more meaningful error message when signing is required 2024-04-24 13:37:27 +10:00
Ashley Donaldson b5f4dfae71 Make encrypting/signing an option 2024-04-24 13:24:05 +10:00
Ashley Donaldson 9aead31bb9 Support encrypted LDAP (ldap signing) over Kerberos and NTLM 2024-04-24 12:56:06 +10:00
jvoisin 5ff05b7cec Add more fingerprints 2024-04-24 00:12:01 +02:00
Zach Goldman 26a108aadc Land #19046, Apache Solr Backup Restore RCE [CVE-2023-50386] 2024-04-23 14:08:33 -04:00
Julien Voisin 0b1a4e2a99 Apply suggestions from code review
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2024-04-23 01:05:57 +02: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
Spencer McIntyre 837e503170 Refactor the MsSamr mixin to split it out 2024-04-22 13:45:20 -04:00
Spencer McIntyre a008288e05 Readd support for multiple ports 2024-04-22 13:45:20 -04:00
Spencer McIntyre f5046d0c2a Fix the return value of a few methods 2024-04-19 09:06:48 -04:00