[LINPEAS] Add privilege escalation check: HTB Build Rsync’d Jenkins backup → Jenki... - #488
Closed
carlospolop wants to merge 1 commit into
Closed
Conversation
…ins backup → Jenkinsfile RCE → DNS-assisted rlogin to hos
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 Privilege Escalation Check Addition
This PR was automatically generated by the HackTricks News Bot to add new privilege escalation detection capabilities to LINPEAS.
📝 Source Information
🔍 Technical Analysis
Offline decryption of Jenkins credentials from backups: If rsync exposes a Jenkins backup, retrieve it and extract
secrets/master.keyandsecrets/hudson.util.Secret. Run jenkins-credentials-decryptor against the relevant job’sconfig.xmlto recover plaintext credentials for Git/SCM ...🤔 Privilege Escalation Reasoning
The post documents a concrete local privilege escalation path on Linux via hostname-based trust in r-commands (rlogin/rsh/rexec). Specifically, root’s /root/.rhosts contains trusted hostnames and the host is running netkit rshd/rlogind. Because r-services typically validate trust using hostname lookups (often a double-lookup of A and PTR), an attacker who can influence DNS to align forward+reverse records can obtain passwordless root access. This is a classic Unix/Linux misconfiguration privesc vector suitable for detection by linpeas: (1) presence and content of ~/.rhosts or /etc/hosts.equiv (especially '+' or broad trust), (2) r-commands listeners active (ports 512/513/514 or inetd/xinetd/systemd sockets), (3) pam_rhosts or equivalent enabled, and (4) warning about DNS-based hostname spoofing implications when trust entries are hostnames. Other elements in the post (rsync’d Jenkins backup decryption, multibranch Jenkinsfile RCE, chisel tunneling, DB access) are initial access/pivoting techniques rather than local Linux privesc checks and are outside linpeas scope.
🤖 Implementation Details
PEASS linpeas agent completed successfully with 134 items. Agent Comment: Summary of work performed
New module added
What the module does (fast, compatible, no heavy scans)
A) Trust files discovery
B) r-commands listeners
C) Activation by inetd/xinetd/systemd
D) PAM rhosts trust
E) Container hint
F) Actionable guidance
Coding standards and performance
Detection logic summary (what linpeas will now show)
Where it was added
Why this matters for the provided blog chain
🏗️ Builder Agent Response
LinPEAS build agent completed successfully with 17 items. Agent Comment: Status: Success — LinPEAS built without errors.
What I did:
No code changes were required; the repository built cleanly on the first attempt. If you want to run it quickly:
If you need me to generate a “small” version or add a custom module/search pattern, I can do that next.
This PR was automatically created by the HackTricks Feed Bot. Please review the implementation carefully and test thoroughly before merging.