Skip to content

Cleartext Credential Recovery in ServiceNow - #2855

Open
carlospolop wants to merge 1 commit into
masterfrom
update_Cleartext_Credential_Recovery_in_ServiceNow_e10efea73b9df96d
Open

carlospolop wants to merge 1 commit into
masterfrom
update_Cleartext_Credential_Recovery_in_ServiceNow_e10efea73b9df96d

Conversation

@carlospolop

Copy link
Copy Markdown
Collaborator

🤖 Automated Content Update

This PR was automatically generated by the HackTricks News Bot based on a technical blog post.

📝 Source Information

🎯 Content Summary

Overview: The post presents two privileged ServiceNow post-exploitation techniques for recovering credentials in cleartext by abusing server-side JavaScript components known as script includes. The first technique modifies the existing CredentialTestAjax script include so that its client-callable testCredential function returns the JSON generated by the internal _decryptCredentialData() function. This exposes secrets from ...

🔧 Technical Details

Exposing plaintext at an internal decryption boundary: When a server-side workflow decrypts a credential before passing it to another component, attackers with server-side code-modification rights can target the point where plaintext temporarily exists. Insert an early return immediately after the internal decryption call, then invoke the normal client-callable wrapper and collect the plaintext from its HTTP response. In ServiceNow, CredentialTestAjax.testCredential calls _decryptCredentialData() and normally passes its JSON output to SNC.CredentialTest.test(); returning that JSON instead converts the legitimate credential-testing workflow into a credential-disclosure endpoint.


Temporarily backdooring server-side components: If an attacker can modify a server-side script record, they can save its original source, insert an exfiltration or return statement, invoke the modified component, retrieve the ...

🤖 Agent Actions

Plan:

  1. Map existing ServiceNow and related credential-decryption documentation.
  2. Read at least five candidate pages and compare for overlap.
  3. Add only the novel post-exploitation technique to the best existing page, with numbered citations.
  4. Validate the diff, references, formatting, and repository scope.
    Repository mapping is complete: the existing servicenow.md page is the precise fit, and repository-wide searches show the two decryption paths are not yet documented. I’m now verifying the supplied research against the author’s PoCs and ServiceNow’s own field/script documentation before editing that single page.
    Verification found one useful implementation nuance: the current Discovery PoC injects an AJAX method using sn_cc.StandardCredentialsProvider, while the article demonstrates an early return after _decryptCredentialData(). I’ll document both as variants of the same plaintext-boundary abuse and keep the edition scoped to servicenow.md.
    The documentation update is written. Final validation will check whitespace, citation/reference consistency, forbidden-source absence, changed-file scope, and mdBook parsing if the local builder is available.
    Updated src/network-services-pentesting/pentesting-web/servicenow.md with:
  • Discovery credential extraction through CredentialTestAjax
  • Current StandardCredentialsProvider PoC workflow
  • LDAP Password2 decryption using getDecryptedValue()
  • Required ServiceNow roles and access paths
  • PoC commands and request format
  • Detection guidance for Script Include modifications and AJAX activity
  • Numbered references to the SpecterOps research and both PoCs

Validation passed: git diff --check, citation numbering, forbidden-source checks, and single-file scope. mdbook was unavailable locally.


This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.

@carlospolop

Copy link
Copy Markdown
Collaborator Author

🔗 Additional Context

Original Blog Post: https://specterops.io/blog/2026/08/27/cleartext-credential-recovery-servicenow

Content Categories: Based on the analysis, this content was categorized under "Network Services Pentesting > 80,443 - Pentesting Web Methodology > ServiceNow > Post-Exploitation and Cleartext Credential Extraction".

Repository Maintenance:

  • MD Files Formatting: 1029 files processed

Review Notes:

  • This content was automatically processed and may require human review for accuracy
  • Check that the placement within the repository structure is appropriate
  • Verify that all technical details are correct and up-to-date
  • All .md files have been checked for proper formatting (headers, includes, etc.)

Bot Version: HackTricks News Bot v1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant