boromir - samuel-richardson/Sam-Tech-Journal GitHub Wiki

boromir

IP Address Network Ports
10.0.6.51 10.0.6.0/24 tcp: 80, 22

Target Overview

Websvn 2.6.0 - Remote Code Execution (Unauthenticated)(CVE)(ExploitDB)

Explanation

websvn < 2.6.0 allows for the execution of shell code using shell metacharacters. This allows for a unauthenticated remote execution of code.

Severity

Critical: 9.8

Remediation

The suggested remediation is to update websvn to a stable and patched version greater than 2.6.0 but ideally the latest release.

Privilege escalation via poor password practices.

Explanation

The apache authentication password hash was found and easily cracked due to the MD5 format. This password was shared not only by the boromir user but also the root user.

Severity

High

Remediation

The suggested fix is to encrypt any hashed passwords with strong encryption furthermore, Apache users, local users, and root users should not share the same password. Changing these to independent passwords is best practice.

Gaining access through fw-rivendell

  • The password to elrond was found in the exploitation of fw-rivendell. {8A83DC0D-8ADE-4D54-B44C-6644255C36D2}

  • An simple cronjob elevation allows root on fw-rivendell.

{F77AC30F-F836-431E-AC43-F2332757DA58}

{BB28C2F0-24AE-48F4-AFF5-A6BE7617461D}

Recon

  • Looking for IPs on the network.

{EDDD287A-8E9D-4FFA-BCE0-DD76949477DC}

  • Port scan of boromir reveals tcp: 80, 20.

{46E55993-962D-49D4-8BA5-390C0572F107}

Exploitation

Gaining a foothold

  • Forwarding port 80 in boromir to 8888.

{B3CA64D0-C958-432C-A725-651C48F0AF47}

  • websvn 2.6.0 on boromir.

{975166B5-17D3-470C-ACD3-2EE813728074}

  • Exploit used to gain a reverse shell to boromir.

{72E1B4A8-A84E-4D57-9084-2200B3545051}

  • Running of script.

{F05807DC-D91C-4748-A621-1A89431D7EAB}

  • Invocation of nc listener on elrond and receiving the reverse shell.

{1371A7F5-550A-46DE-A989-4C793C923265}

Privilege Escalation

  • File containing hashed password.

{4E5FC5BB-D920-431F-8FBB-0420249DB09C}

boromir:$apr1$/dPEVRIP$33jd0o1KAzXVVJaSPDwCV/
  • Cracked with found password hashcat. This password was used by both root and boromir.

image

  • User flag

image

  • root flag

image