Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LDAP to the set of interactive session types #19809

Merged

Conversation

dwelch-r7
Copy link
Contributor

Adds LDAP to the set of interactive session types, it was already interactive just not marked as such

Also fixes an issue with getuid command when interacting with the LDAP session when the whoami command is not available

Testing

docker compose build
docker compose up --wait -d
  • Interact with the session
  • Run getuid

@adfoster-r7
Copy link
Contributor

msf6 auxiliary(scanner/ldap/ldap_login) > run rhost=127.0.0.1 username=DEV-AD\\Administrator password=admin123! CreateSession=true
...
msf6 auxiliary(scanner/ldap/ldap_login) > sessions -i -1
[*] Starting interaction with 1...

LDAP (127.0.0.1) > getuid
[-] 127.0.0.1:389 LDAP Error: Extended Operation(1.3.6.1.4.1.4203.1.11.3) not supported
LDAP (127.0.0.1) > 

# This is not the only occurrence of a patch for this functionality.
def ldapwhoami(args = {})
instrument "ldapwhoami.net_ldap", args do |payload|
@result = use_connection(args, &:ldapwhoami)
@result.success? ? @result.extended_response : nil
@result.success? ? @result.extended_response : ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is dead code now

@dwelch-r7 dwelch-r7 force-pushed the mark-ldap-session-as-interactive branch from 8a468fd to 4c478a5 Compare January 15, 2025 09:51
@adfoster-r7 adfoster-r7 merged commit de0cde7 into rapid7:master Jan 15, 2025
70 checks passed
@adfoster-r7 adfoster-r7 added rn-no-release-notes no release notes rn-enhancement release notes enhancement and removed rn-no-release-notes no release notes rn-enhancement release notes enhancement labels Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rn-no-release-notes no release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants