Home Pilgrimage Notes
Post
Cancel

Pilgrimage Notes

Pilgrimage Report


Information gathering


Scope: 10.10.11.219/32 (Linux)

Open ports:

22/ssh (Secure shell protocol):

  • Banner grabbing:
    • netcat: OpenSSH_8.4p1 Debian-5+deb11u1

80/http (Hypertext transfer protocol)

  • Banner grabbing:
    • netcat:
      • Server: nginx/1.18.0
    • whatweb:
      • RedirectLocation [http://pilgrimage.htb/]
    • curl:
  • Firefox: “A free online image shrinker. Create an account to save your images!”
    • Interesting path:
      • href=”login.php”
      • href=”logout.php”
      • href=”register.php”
    • Account created:
      • Username: marss123
      • Password: marss123
      • Save image function:
        • Name: (Probably hash generated by upload time)
          • http://pilgrimage.htb/shrunk/64cebf “2ea9b1f.jpeg”
          • http://pilgrimage.htb/shrunk/64cebf “d9543a9.jpeg”
    • Directory Fuzzing:
      • .git (403 forbidden):
        • /config
        • Download git folder: Not permissions
        • Fuzzing
      • Manual enumeration:
        • Locate last commit of proyect: (HEAD)
        • Examine the current commit:
          • Ruby
            • Reverse: (sha1sum)
          • Python
          • Author: emily@pilgrimage.htb (probably system user)
          • Content:
          • Git modes: https://krishnabiradar.com/blogs/deconstructing-a-git-commit/
            • 100644 for a normal file
            • 100755 for an executable file
            • 040000 for a directory
            • 120000 for a symbolic link
          • Download required files to create a valid git repository (.git)
            • HEAD
            • Head object and respective tree
            • master branch
            • We can reconstruct more git objects with same process:
              • Then we can extract objects content with bash:
            • With python we can extract hash of tree object, only we need to convert some ascii to hexadecimal: (compare with previous image)
      • Automate process

Vulnerability assessment


Exploitation


Post-exploitation


Lateral movement


Proof of concept



This post is licensed under CC BY 4.0 by the author.