Cleartext Credential Recovery in ServiceNow - #2855
Open
carlospolop wants to merge 1 commit into
Open
carlospolop wants to merge 1 commit into
carlospolop wants to merge 1 commit into
Conversation
Collaborator
Author
🔗 Additional ContextOriginal 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:
Review Notes:
Bot Version: HackTricks News Bot v1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 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
CredentialTestAjaxscript include so that its client-callabletestCredentialfunction returns the JSON generated by the internal_decryptCredentialData()function. This exposes secrets from...🔧 Technical DetailsExposing 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.testCredentialcalls_decryptCredentialData()and normally passes its JSON output toSNC.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:
Repository mapping is complete: the existing
servicenow.mdpage 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 toservicenow.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.mdwith:CredentialTestAjaxStandardCredentialsProviderPoC workflowgetDecryptedValue()Validation passed:
git diff --check, citation numbering, forbidden-source checks, and single-file scope.mdbookwas unavailable locally.This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.